:root {
    --bg-color: #121212;
    --sidebar-bg: #1E1E1E;
    --text-color: #E0E0E0;
    --accent-color: #00E5FF;
    --accent-secondary: #9D00FF;
    --border-color: #333333;
    --font-heading: 'Inter', sans-serif;
    --font-body: 'Roboto', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar */
#sidebar {
    width: 300px;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 2rem 1rem;
    overflow-y: auto;
    transition: transform 0.3s ease;
}

.brand {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 2rem;
    padding-left: 1rem;
}

.nav-item {
    padding: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    color: #888;
}

.nav-item:hover {
    background-color: rgba(0, 229, 255, 0.1);
    color: var(--accent-color);
}

.nav-item.active {
    background: linear-gradient(90deg, rgba(0, 229, 255, 0.1), transparent);
    border-left: 3px solid var(--accent-color);
    color: var(--text-color);
    padding-left: calc(1rem - 3px);
}

/* Main Content */
#main-content {
    flex: 1;
    padding: 4rem;
    overflow-y: auto;
    scroll-behavior: smooth;
    max-width: 1000px;
    margin: 0 auto;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    color: #FFF;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
    margin-top: 0;
}

h3 {
    font-size: 1.5rem;
    color: var(--accent-color);
}

p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

ul,
ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

li {
    margin-bottom: 0.5rem;
}

blockquote {
    border-left: 4px solid var(--accent-secondary);
    padding: 1rem 1.5rem;
    background-color: rgba(157, 0, 255, 0.05);
    font-style: italic;
    margin: 2rem 0;
    border-radius: 0 8px 8px 0;
}

.code-block {
    font-family: monospace;
    background-color: #000;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    color: var(--accent-color);
    margin: 1rem 0;
}

.formula-box {
    border: 1px dashed var(--accent-color);
    padding: 1.5rem;
    text-align: center;
    font-weight: bold;
    border-radius: 8px;
    margin: 1.5rem 0;
    font-family: var(--font-heading);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Mobile Responsive */
/* Mobile Responsive (Professional Off-Canvas) */
/* Mobile/Tablet Responsive (Force Off-Canvas) */
@media (max-width: 1024px) {

    html,
    body {
        overflow-x: hidden !important;
        overflow-y: auto !important;
        height: auto !important;
        min-height: 100vh !important;
        position: static !important;
        -webkit-overflow-scrolling: touch !important;
    }

    body {
        flex-direction: column !important;
        display: block !important;
        padding-bottom: 0 !important;
        /* Remove excessive body padding */
    }

    /* Floating Burger Button */
    #mobile-menu-btn {
        display: flex !important;
        position: fixed;
        bottom: 20px;
        right: 20px;
        z-index: 9999;
        width: 55px;
        /* Slightly smaller for elegance */
        height: 55px;
        background: var(--accent-color);
        border: none;
        border-radius: 50%;
        color: #000;
        font-size: 1.6rem;
        box-shadow: 0 4px 20px rgba(0, 229, 255, 0.6);
        cursor: pointer;
        align-items: center;
        justify-content: center;
    }

    /* Hide Sidebar by Default (Off-Screen) - Use !important to override everything */
    #sidebar {
        position: fixed !important;
        top: 0;
        left: 0;
        bottom: 0;
        /* Full Height Force */
        width: 85% !important;
        max-width: 320px !important;
        height: 100vh !important;
        z-index: 10000 !important;
        /* Super High Z-Index */
        transform: translateX(-100%) !important;
        transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1) !important;
        background-color: #111 !important;
        /* Solid Background */
        border-right: 1px solid #333;
        box-shadow: 5px 0 25px rgba(0, 0, 0, 0.8) !important;
        flex-direction: column !important;
        display: flex !important;
    }

    #sidebar.open {
        transform: translateX(0) !important;
    }

    .brand {
        display: block !important;
        border-bottom: 1px solid #333;
        padding-bottom: 1rem;
        margin-bottom: 1rem;
    }

    /* Main Content Full Width */
    #main-content {
        padding: 0.75rem !important;
        /* Minimal side padding for max text width */
        padding-bottom: 4rem !important;
        /* Reduced to 64px (button is 55px + 20px bottom offset) */
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        height: auto !important;
        overflow-x: hidden !important;
        /* Prevent horizontal overflow */
        overflow-y: visible !important;
        box-sizing: border-box !important;
    }

    /* Force all content to wrap and fit */
    #main-content * {
        max-width: 100% !important;
        overflow-wrap: break-word !important;
        word-wrap: break-word !important;
        word-break: break-word !important;
    }

    h1 {
        font-size: 1.6rem;
        margin-top: 0.75rem;
        line-height: 1.3;
    }

    h2,
    h3,
    h4 {
        margin-top: 1rem !important;
        margin-bottom: 0.75rem !important;
    }

    p,
    ul,
    ol {
        margin-bottom: 1rem !important;
    }

    /* Remove excessive bottom margins from last elements */
    #main-content>*:last-child,
    #main-content *:last-child {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }

    /* Dark Overlay when menu opens */
    body.menu-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.8);
        z-index: 5000;
        backdrop-filter: blur(3px);
    }

    /* Make tables scrollable on mobile */
    .comparison-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        font-size: 0.85rem !important;
        /* Smaller text for better fit */
    }

    /* Allow table text to wrap */
    .comparison-table td,
    .comparison-table th {
        white-space: normal !important;
        /* Allow wrapping instead of clipping */
        padding: 0.5rem !important;
        /* Reduced padding */
        word-break: break-word !important;
    }

    /* Reduce spacing in special boxes */
    .cta-box,
    .formula-box,
    .code-block {
        padding: 1rem !important;
        margin: 1rem 0 !important;
        font-size: 0.95rem !important;
    }
}

/* Default button hidden on desktop */
#mobile-menu-btn {
    display: none;
}


/* GLabelPrime Special Styles */
.glow-text {
    text-shadow: 0 0 10px rgba(0, 229, 255, 0.5);
    color: #fff;
    font-style: italic;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    overflow: hidden;
}

.comparison-table th {
    background: rgba(157, 0, 255, 0.2);
    color: var(--accent-color);
    padding: 1rem;
    text-align: left;
}

.comparison-table td {
    padding: 1rem;
    border-bottom: 1px solid #333;
    font-size: 0.95rem;
}

.cta-box {
    background: linear-gradient(135deg, rgba(81, 0, 255, 0.2), rgba(0, 229, 255, 0.1));
    border: 1px solid var(--accent-color);
    padding: 2rem;
    text-align: center;
    border-radius: 16px;
    margin-top: 3rem;
    font-size: 1.2rem;
    font-weight: bold;
    box-shadow: 0 0 30px rgba(0, 229, 255, 0.1);
    animation: pulse 3s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 20px rgba(0, 229, 255, 0.1);
    }

    50% {
        box-shadow: 0 0 40px rgba(157, 0, 255, 0.3);
    }

    100% {
        box-shadow: 0 0 20px rgba(0, 229, 255, 0.1);
    }
}

.feature-list li {
    background: url('data:image/svg+xml;utf8,<svg fill="%2300E5FF" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 2L15 9L22 9L16 14L18 21L12 17L6 21L8 14L2 9L9 9Z"/></svg>') no-repeat left center;
    background-size: 16px;
    padding-left: 24px;
    margin-bottom: 10px;
    list-style: none;
}