header {
    position: fixed;
    z-index: 999;
    top: 20px;
    left: 20px;
    right: 20px;
    height: 72px;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: var(--space-md);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--panel-strong);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
    transition: transform 0.4s ease, border-color 0.3s ease;
}

header:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.18);
}

.header-container {
    display: flex;
    align-items: center;
    gap: 14px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: auto;
}


.header-time-value {
    font-family: var(--font-mono, 'JetBrains Mono', 'Fira Code', monospace);
    font-size: 13px;
    letter-spacing: 0.08em;
}

.nav-pill,
.nav-item > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text);
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.04);
    transition: all 0.25s ease;
    min-height: 36px;
    cursor: default;
}

.nav-item > a,
.nav-pill {
    text-decoration: none;
}

a.nav-pill {
    cursor: pointer;
}

.nav-item > a:hover,
.nav-pill:hover {
    color: #0b0f1b;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    box-shadow: var(--shadow);
}

#cursor-speed-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 150px;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    outline: none;
    cursor: pointer;
}

#cursor-speed-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.15);
    transition: transform 0.2s ease;
}

#cursor-speed-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent);
    border: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.15);
    transition: transform 0.2s ease;
}

#cursor-speed-slider:active::-webkit-slider-thumb,
#cursor-speed-slider:active::-moz-range-thumb {
    transform: scale(1.15);
}

.cursor-speed-control[aria-disabled="true"] {
    opacity: 0.4;
    cursor: not-allowed;
}

.cursor-toggle-control input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--accent);
}

.cursor-toggle-control[aria-disabled="true"] {
    opacity: 0.4;
    cursor: not-allowed;
}

.logo-image {
    height: 40px;
    width: 40px;
    border-radius: var(--radius-sm);
    padding: 6px;
    background: rgba(255, 255, 255, 0.04);
    box-shadow: var(--glow);
}

.title {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.01em;
}

.title.animate {
    overflow: hidden;
    white-space: nowrap;
    border-right: 10px solid rgba(255, 255, 255, 0.75);
    animation: typewriter 1s steps(10) 1 forwards, cursorBlink 2.6s steps(10) infinite;
}

@keyframes typewriter { from { width: 0; } to { width: 10ch; } }
@keyframes cursorBlink { 0%, 30%, 60%, 100% { border-color: transparent; } 15%, 45% { border-color: rgba(255, 255, 255, 0.75); } }

nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.navigation-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.page-body {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: var(--space-lg);
    align-items: start;
    padding: 140px var(--space-md) var(--space-xl);
    flex: 1;
}

.page-body.sidebar-hidden {
    grid-template-columns: 1fr;
}

.sidebar {
    position: sticky;
    top: 120px;
    align-self: start;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
    border: 1px solid var(--panel-strong);
    border-radius: var(--radius-lg);
    padding: var(--space-lg) var(--space-md);
    box-shadow: var(--shadow);
}

.sidebar .menu-title {
    margin-top: 0;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 14px;
    color: var(--muted);
}

.sidebar a {
    display: block;
    color: var(--text);
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    transition: background 0.2s ease, color 0.2s ease;
}

.sidebar a:hover {
    background: var(--accent-soft);
    color: #dbeafe;
}

.content-area {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.content-card {
    position: relative;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.04));
    border: 1px solid var(--panel-strong);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.content-card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at 20% 20%, rgba(92, 200, 255, 0.14), transparent 30%),
                radial-gradient(circle at 80% 10%, rgba(168, 85, 247, 0.12), transparent 30%);
    opacity: 0.8;
}

.content-card > * { position: relative; z-index: 1; }

footer {
    display: none;
}

@media (max-width: 1100px) {
    .page-body {
        grid-template-columns: 1fr;
    }

    .cursor-speed-control {
        display: none;
    }

    .sidebar {
        position: relative;
        top: 0;
    }
}

@media (max-width: 1024px) {
    .sidebar,
    #sidebar {
        display: none;
    }

    .page-body {
        grid-template-columns: 1fr;
        padding-top: 130px;
    }
}

@media (max-width: 720px) {
    header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0px;
        height: auto;
    }

    header nav {
        display: none;
    }

    nav {
        width: 100%;
        flex-wrap: wrap;
    }

    .page-body {
        padding: 140px var(--space-md) var(--space-lg);
    }

    footer {
        position: fixed;
        z-index: 999;
        background: rgba(255, 255, 255, 0.04);
        color: var(--text);
        border-radius: var(--radius-md);
        bottom: 20px;
        left: var(--space-md);
        right: var(--space-md);
        padding: 10px 14px;
        height: 56px;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 1px solid var(--panel-strong);
        box-shadow: var(--shadow);
        backdrop-filter: blur(12px);
    }

    footer .navigation-menu {
        justify-content: center;
        gap: 10px;
    }

    footer .nav-item a {
        padding: 6px 10px;
    }
    
    .content-area {
        padding-bottom: 6rem;
    }
}
