:root {
    --primary-color: #6c13ac;
    --bg-color: #1a1a1a;
    --text-color: #e0e0e0;
    --container-bg: #222222;
    --shadow-color: rgba(0, 0, 0, 0.5);
    --accent-color: #ab36ff;
    --accent-secondary: #fc885a;
    --border-color: #333;
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    text-shadow: none;
    line-height: 1.6;
}

.container {
    background-color: var(--container-bg);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 24px var(--shadow-color);
    margin-top: 24px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    border: 1px solid var(--border-color);
}

#main-content {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 20px;
}

/* Navbar */
.navbar {
    background: linear-gradient(135deg, var(--primary-color) 0%, #4a0d7a 100%);
    padding: 0.75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    box-shadow: 0 2px 12px rgba(108, 19, 172, 0.3);
}

.navbar-brand {
    color: #fff;
    text-decoration: none;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.navbar-nav {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.5rem;
    align-items: center;
}

.nav-item {
    margin: 0;
}

.nav-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    padding: 0.5rem 1rem;
    display: block;
    border-radius: 8px;
    transition: background-color 0.2s, color 0.2s;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* Prominent Chat Button in Navbar */
.btn-chat {
    background: linear-gradient(90deg, #fc885a, #ff6b3d);
    color: #fff;
    padding: 0.6rem 1.5rem;
    font-weight: 600;
    border-radius: 50px;
    box-shadow: 0 2px 12px rgba(252, 136, 90, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-chat:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(252, 136, 90, 0.6);
    color: #fff;
}

.nav-chat-btn {
    margin-left: 0.5rem;
}

.navbar-toggler {
    display: none;
    padding: 0.25rem 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 0.25rem;
    cursor: pointer;
    background: none;
}

.navbar-toggler-icon {
    display: inline-block;
    width: 1.5em;
    height: 1.5em;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100%;
}

/* Button styles */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    cursor: pointer;
    border: none;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #5e0ca5 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(108, 19, 172, 0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 19, 172, 0.5);
}

.btn-secondary {
    background-color: #444;
    color: #fff;
}

.btn-secondary:hover {
    background-color: #555;
}

.btn-dark {
    background-color: rgba(0, 0, 0, 0.3);
    color: #fff;
}

.btn-dark:hover {
    background-color: rgba(0, 0, 0, 0.5);
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.15rem;
}

/* Typography */
h1 {
    color: var(--accent-color);
    font-weight: 700;
    letter-spacing: -0.5px;
}

h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff;
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

h4 {
    font-size: 1.1rem;
    font-weight: 600;
}

a {
    color: var(--accent-color);
    transition: color 0.2s;
}

a:hover {
    color: var(--accent-secondary);
}

/* Form elements */
.form-control {
    display: block;
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--text-color);
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
    border-color: var(--accent-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(171, 54, 255, 0.15);
}

.form-label {
    display: inline-block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #ccc;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    color: var(--text-color);
}

.table th,
.table td {
    padding: 0.875rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    color: var(--accent-color);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.table tbody tr:hover {
    background-color: rgba(171, 54, 255, 0.05);
}

/* Footer */
footer {
    background-color: var(--container-bg);
    padding: 40px 0 30px;
    width: 100%;
    margin-top: auto;
    border-top: 1px solid var(--border-color);
}

.motto {
    font-size: 1.3rem;
    color: var(--accent-color);
    text-align: center;
    margin-top: 0;
    margin-bottom: 1rem;
    font-style: italic;
}

.footer-links {
    margin: 0;
    text-align: center;
    color: #888;
}

.footer-links a {
    color: #888;
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

/* Code blocks */
pre {
    background-color: #0d0d0d;
    border-radius: 12px;
    padding: 20px;
    overflow-x: auto;
    border: 1px solid var(--border-color);
}

code {
    font-family: 'SF Mono', 'Monaco', 'Consolas', 'Courier New', monospace;
    font-size: 0.9rem;
}

/* Utility classes */
.text-center {
    text-align: center;
}

.mt-3 {
    margin-top: 1rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

.mt-5 {
    margin-top: 3rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.d-flex {
    display: flex;
}

.justify-content-center {
    justify-content: center;
}

.align-items-center {
    align-items: center;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}

.col {
    flex: 1;
    padding-right: 15px;
    padding-left: 15px;
}

.col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
    padding-right: 15px;
    padding-left: 15px;
}

.mx-2 {
    margin-left: 0.5rem;
    margin-right: 0.5rem;
}

/* Alerts/Messages */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: rgba(40, 167, 69, 0.15);
    border: 1px solid rgba(40, 167, 69, 0.3);
    color: #5cb85c;
}

.alert-error {
    background-color: rgba(220, 53, 69, 0.15);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #dc3545;
}

/* Hidden */
.hidden {
    display: none;
}

/* Mobile responsive navbar */
@media (max-width: 991px) {
    .navbar-toggler {
        display: block;
    }

    .navbar-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: linear-gradient(135deg, var(--primary-color) 0%, #4a0d7a 100%);
        flex-direction: column;
        padding: 1rem;
        z-index: 1000;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }

    .nav-item {
        width: 100%;
        text-align: center;
    }

    .nav-chat-btn {
        margin-left: 0;
        margin-top: 0.5rem;
    }

    .btn-chat {
        display: block;
        width: 100%;
    }

    #nav-toggle:checked ~ .navbar-nav {
        display: flex;
    }

    .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Pagination */
.pagination {
    display: flex;
    list-style: none;
    padding: 0;
    gap: 0.5rem;
}

.page-link {
    display: block;
    padding: 0.5rem 1rem;
    background-color: var(--container-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.2s;
}

.page-link:hover {
    background-color: rgba(171, 54, 255, 0.1);
    border-color: var(--accent-color);
    color: var(--accent-color);
}

/* Highlight styling */
.highlight pre {
    background-color: #0d0d0d;
    padding: 20px;
    border-radius: 12px;
    overflow-x: auto;
    border: 1px solid var(--border-color);
}

/* Selection colors */
::selection {
    background-color: rgba(171, 54, 255, 0.3);
    color: #fff;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}
