/* ========== Variables & Theme ========== */
:root {
    --bg-color: #030712;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-primary: #818cf8;
    /* Indigo */
    --accent-secondary: #c084fc;
    /* Purple */
    --accent-tertiary: #f472b6;
    /* Pink */
    --accent-glow: rgba(129, 140, 248, 0.5);
    --glass-bg: rgba(17, 25, 40, 0.75);
    --glass-border: rgba(255, 255, 255, 0.08);
    --card-hover-bg: rgba(30, 41, 59, 0.7);
    --nav-height: 70px;
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-code: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    --section-gap: 6rem;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-pill: 100px;
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Light theme overrides */
.light-theme {
    --bg-color: #f8fafc;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --accent-primary: #6366f1;
    --accent-secondary: #a855f7;
    --accent-tertiary: #ec4899;
    --accent-glow: rgba(99, 102, 241, 0.12);
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(15, 23, 42, 0.08);
    --card-hover-bg: rgba(248, 250, 252, 0.95);
}

/* Smooth color transitions for theme switch */
html,
body {
    transition: background-color 300ms var(--ease-out-expo), color 300ms var(--ease-out-expo);
}

/* ========== Global Reset & Base ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    padding-top: 80px;
    position: relative;
}

/* Skip link for keyboard users */
.skip-link {
    position: absolute;
    left: -999px;
    top: auto;
    background: var(--accent-primary);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    z-index: 9999;
    text-decoration: none;
}

.skip-link:focus {
    left: 1rem;
    top: 1rem;
}

/* Visible focus for keyboard users */
:focus-visible {
    outline: 3px solid var(--accent-secondary);
    outline-offset: 3px;
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }

    .star {
        animation: none !important;
    }

    .logo {
        animation: none !important;
        transform: none !important;
    }

    .scroll-indicator {
        animation: none !important;
    }

    .section {
        transition: none !important;
    }
}

/* Fixed background gradient */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: radial-gradient(ellipse at 20% 0%, rgba(99, 102, 241, 0.15), transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(168, 85, 247, 0.1), transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(244, 114, 182, 0.05), transparent 60%);
    pointer-events: none;
}

/* Light theme gradient */
.light-theme body::before,
.light-theme::before {
    background: radial-gradient(ellipse at 20% 0%, rgba(99, 102, 241, 0.06), transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(168, 85, 247, 0.04), transparent 50%);
}

/* ========== Scroll Progress Bar ========== */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary), var(--accent-tertiary));
    z-index: 10000;
    transition: width 50ms linear;
    border-radius: 0 2px 2px 0;
    box-shadow: 0 0 10px var(--accent-glow);
}

/* ========== Background Effects ========== */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: #fff;
    border-radius: 50%;
    opacity: 0.7;
    animation: twinkle 4s infinite ease-in-out;
}

.star.large {
    width: 3px;
    height: 3px;
    box-shadow: 0 0 6px 1px rgba(255, 255, 255, 0.3);
}

@keyframes twinkle {

    0%,
    100% {
        opacity: 0.15;
        transform: scale(0.8);
    }

    50% {
        opacity: 1;
        transform: scale(1.3);
    }
}

.grid-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
    opacity: 0.35;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

/* Light theme: hide stars/grid */
.light-theme .stars {
    opacity: 0;
}

.light-theme .grid-background {
    opacity: 0.15;
}

/* ========== Typography ========== */
h1,
h2,
h3,
h4 {
    color: var(--text-primary);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    background: linear-gradient(135deg, #a5b4fc 0%, #c084fc 40%, #f472b6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 30px rgba(192, 132, 252, 0.25));
}

h2 {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    background: linear-gradient(to right, #fff, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
}

p {
    color: var(--text-secondary);
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color 0.2s;
}

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

/* ========== Navigation (Glass Pill) ========== */
.main-nav {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: 92%;
    max-width: 1200px;
    height: 56px;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-pill);
    z-index: 1000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.main-nav.scrolled {
    background: rgba(15, 23, 42, 0.85);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    border-color: rgba(255, 255, 255, 0.12);
}

.light-theme .main-nav {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(0, 0, 0, 0.06);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.light-theme .main-nav.scrolled {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}

.nav-content {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: -0.02em;
}

.light-theme .nav-logo {
    color: var(--text-primary);
}

.nav-links {
    display: flex;
    gap: 0.25rem;
}

/* Install button (PWA) */
.install-btn {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: #fff;
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-sm);
    border: none;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    margin-left: 0.5rem;
    transition: transform 0.2s var(--ease-spring), box-shadow 0.2s;
}

.install-btn:hover {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 4px 15px rgba(129, 140, 248, 0.4);
}

.install-btn[hidden] {
    display: none;
}

.nav-link {
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 500;
    padding: 0.4rem 0.75rem;
    position: relative;
    border-radius: var(--radius-sm);
    transition: color 0.2s, background 0.2s;
}

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

.nav-link.active {
    color: #fff;
    background: rgba(129, 140, 248, 0.12);
}

.light-theme .nav-link {
    color: var(--text-secondary);
}

.light-theme .nav-link:hover {
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.04);
}

.light-theme .nav-link.active {
    color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.08);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--accent-primary);
    box-shadow: 0 0 8px var(--accent-primary);
    border-radius: 2px;
}

/* ========== Layout & Sections ========== */
.section {
    position: relative;
    z-index: 1;
    min-height: 80vh;
    padding: var(--section-gap) 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s var(--ease-out-expo), transform 0.7s var(--ease-out-expo);
    will-change: opacity, transform;
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-content {
    width: 100%;
    max-width: 1000px;
}

/* ========== Hero Section ========== */
.hero {
    min-height: 90vh;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 4rem;
}

.logo {
    width: 130px;
    height: 130px;
    margin: 0 auto 2rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    box-shadow: 0 0 40px rgba(99, 102, 241, 0.15), inset 0 0 20px rgba(168, 85, 247, 0.05); /* Simplified shadow */
    animation: float 8s ease-in-out infinite; /* Slower, less repaints */
    backdrop-filter: blur(4px); /* Reduced blur radius significantly */
    -webkit-backdrop-filter: blur(4px);
    position: relative;
    overflow: visible;
    will-change: transform; /* Hint to browser */
}

/* Optimized static glow instead of an expensive spinning blur */
.logo::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 40px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary), var(--accent-tertiary));
    opacity: 0.15;
    z-index: -1;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

.subtitle {
    font-size: clamp(1.2rem, 2.5vw, 1.6rem);
    background: linear-gradient(to right, #94a3b8, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 2rem;
}

.section-text {
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.scroll-indicator {
    margin-top: 3rem;
    font-size: 1.5rem;
    color: var(--text-secondary);
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

/* ========== Tech Showcase (Glass Card) ========== */
.tech-showcase {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 3rem;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(8px); /* Performance fix: Much lower blur radius */
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    transition: border-color 0.3s ease;
    will-change: transform;
}

.tech-showcase:hover {
    border-color: rgba(129, 140, 248, 0.15);
}

.tech-showcase::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
}

/* Subtle gradient accent on top */
.tech-showcase::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(180deg, rgba(129, 140, 248, 0.04), transparent);
    pointer-events: none;
}

.light-theme .tech-showcase {
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.tech-logo {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.15));
    position: relative;
    z-index: 1;
}

.tech-title {
    position: relative;
    z-index: 1;
}

.tech-description {
    position: relative;
    z-index: 1;
}

.tech-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1.5rem;
    position: relative;
    z-index: 1;
}

.tech-tag {
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.18);
    color: #a5b4fc;
    padding: 0.4rem 1rem;
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s var(--ease-spring);
    cursor: default;
}

.tech-tag:hover {
    background: rgba(99, 102, 241, 0.18);
    transform: translateY(-2px);
}

.light-theme .tech-tag {
    background: rgba(99, 102, 241, 0.06);
    border-color: rgba(99, 102, 241, 0.15);
    color: var(--accent-primary);
}

/* ========== Feature Grid ========== */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-top: 2.5rem;
}

.feature-card {
    background: rgba(30, 41, 59, 0.5); /* Opaque enough to remove need for heavy blur */
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 2rem;
    transition: background 0.3s, border-color 0.3s, transform 0.3s var(--ease-out-expo);
    position: relative;
    overflow: hidden;
    /* Stagger animation */
    opacity: 0;
    transform: translateY(20px);
}

.section.visible .feature-card {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered card animations */
.section.visible .feature-card:nth-child(1) { transition-delay: 0.05s; }
.section.visible .feature-card:nth-child(2) { transition-delay: 0.1s; }
.section.visible .feature-card:nth-child(3) { transition-delay: 0.15s; }
.section.visible .feature-card:nth-child(4) { transition-delay: 0.2s; }
.section.visible .feature-card:nth-child(5) { transition-delay: 0.25s; }
.section.visible .feature-card:nth-child(6) { transition-delay: 0.3s; }

.feature-card:hover {
    background: var(--card-hover-bg);
    border-color: rgba(129, 140, 248, 0.25);
    transform: translateY(-4px); /* Smoothed/reduced translate */
    box-shadow: 0 16px 40px -8px rgba(0, 0, 0, 0.3);
}

/* Mouse-follow glow */
.feature-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(400px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(129, 140, 248, 0.05), transparent 40%);
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
}

.feature-card:hover::after {
    opacity: 1;
}

.light-theme .feature-card {
    background: rgba(255, 255, 255, 0.6);
    border-color: rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.light-theme .feature-card:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(99, 102, 241, 0.2);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: inline-block;
}

/* App logo styles */
.app-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    display: inline-block;
}

.feature-title {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.light-theme .feature-title {
    color: var(--text-primary);
}

.feature-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ========== Terminal / Code Box ========== */
.command-box {
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 14px;
    padding: 3rem 1.5rem 1.5rem;
    font-family: var(--font-code);
    font-size: 0.88rem;
    color: #38bdf8;
    margin-top: 2rem;
    position: relative;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    line-height: 1.7;
}

.light-theme .command-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #1e40af;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

/* Mac-style window controls */
.command-box::before {
    content: ' ';
    position: absolute;
    top: 14px;
    left: 14px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ef4444;
    box-shadow: 20px 0 0 #eab308, 40px 0 0 #22c55e;
}

/* "bash" title */
.command-box::after {
    content: 'terminal';
    position: absolute;
    top: 11px;
    left: 0;
    right: 0;
    text-align: center;
    color: #475569;
    font-family: var(--font-main);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.05em;
}

/* ========== Buttons ========== */
.learn-more-section {
    margin-top: 3rem;
    text-align: center;
}

.learn-more-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.learn-more-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.learn-more-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 0.7rem 1.3rem;
    border-radius: 12px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s var(--ease-spring);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.learn-more-btn:hover {
    background: rgba(129, 140, 248, 0.1);
    border-color: rgba(129, 140, 248, 0.3);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(129, 140, 248, 0.15);
}

.light-theme .learn-more-btn {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.08);
    color: var(--text-primary);
}

.light-theme .learn-more-btn:hover {
    background: rgba(99, 102, 241, 0.08);
    border-color: rgba(99, 102, 241, 0.2);
    color: var(--accent-primary);
}

/* ========== Getting Started Steps ========== */
.getting-started-steps {
    margin-top: 2rem;
}

.step {
    background: transparent;
    border-left: 2px solid #334155;
    padding: 2rem 2rem 3rem 3rem;
    position: relative;
    margin-left: 1rem;
    transition: border-color 0.4s var(--ease-out-expo);
}

.step:hover {
    border-left-color: var(--accent-primary);
}

.step::before {
    content: '';
    position: absolute;
    left: -9px;
    top: 2rem;
    width: 16px;
    height: 16px;
    background: var(--bg-color);
    border: 2px solid #334155;
    border-radius: 50%;
    transition: all 0.4s var(--ease-spring);
}

.step:hover::before {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    box-shadow: 0 0 20px var(--accent-primary);
    transform: scale(1.2);
}

.step h3 {
    color: #fff;
    font-size: 1.35rem;
    margin-bottom: 0.75rem;
}

.light-theme .step h3 {
    color: var(--text-primary);
}

.light-theme .step {
    border-left-color: #cbd5e1;
}

.light-theme .step::before {
    border-color: #cbd5e1;
    background: var(--bg-color);
}

.light-theme .step:hover::before {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

/* ========== Table of Contents Sidebar ========== */
.toc-sidebar {
    position: fixed;
    top: 140px;
    left: max(2rem, calc(50% - 760px)); /* Dynamically sits 40px left of the 1000px center container */
    width: 250px;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    z-index: 50;
    opacity: 0; 
    visibility: hidden;
    transition: opacity 0.4s var(--ease-out-expo), visibility 0.4s;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.light-theme .toc-sidebar {
    background: rgba(255, 255, 255, 0.6);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

/* We'll use JS to add a .has-toc class to body if there are headings to show */
body.has-toc .toc-sidebar {
    opacity: 1;
    visibility: visible;
}

.toc-title {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
}

.light-theme .toc-title {
    color: var(--text-secondary);
}

.toc-nav {
    display: flex;
    flex-direction: column;
    position: relative;
}

.toc-nav::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
}

.light-theme .toc-nav::before {
    background: rgba(0, 0, 0, 0.05);
}

.toc-link {
    display: block;
    width: 100%;
    font-size: 0.88rem;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.5rem 0 0.5rem 1.25rem;
    position: relative;
    transition: color 0.2s, transform 0.2s;
    line-height: 1.4;
    cursor: pointer;
    visibility: visible;
    opacity: 1;
}

.toc-link:hover {
    color: var(--text-primary);
    transform: translateX(4px);
}

.toc-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: transparent;
    transition: background 0.3s, box-shadow 0.3s, transform 0.3s var(--ease-spring);
    z-index: 1;
}

/* Active State */
.toc-link.active {
    color: #fff;
    font-weight: 600;
}

.light-theme .toc-link.active {
    color: var(--accent-primary);
}

.toc-link.active::before {
    background: var(--accent-primary);
    box-shadow: 0 0 12px var(--accent-primary);
    transform: translateY(-50%) scale(1.6);
}

/* ========== Mobile/Responsive ========== */
@media (max-width: 1600px) {
    .toc-sidebar {
        display: none;
    }
}

.hamburger {
    display: none;
    border: none;
    background: none;
    cursor: pointer;
    padding: 0;
    z-index: 2000;
}

.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: #fff;
    margin: 5px 0;
    transition: 0.3s var(--ease-out-expo);
    border-radius: 2px;
}

.light-theme .hamburger span {
    background: var(--text-primary);
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.25rem;
    }

    h2 {
        font-size: 1.6rem;
    }

    .main-nav {
        top: 0;
        left: 0;
        transform: none;
        width: 100%;
        border-radius: 0;
        border-top: none;
        border-left: none;
        border-right: none;
        height: 64px;
    }

    .hamburger {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        background: rgba(3, 7, 18, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transform: translateX(100%);
        transition: transform 0.4s var(--ease-out-expo);
        z-index: 1500;
        gap: 0.5rem;
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .nav-link {
        font-size: 1.35rem;
        padding: 0.75rem 1.5rem;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    body.menu-open {
        overflow: hidden;
    }

    .section {
        padding: 3rem 1rem;
    }

    .tech-showcase {
        padding: 2rem 1.25rem;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

}

/* ========== Utilities ========== */
.spacing-top {
    margin-top: 2rem;
}

/* DNS Section specifics */
.dns-layer {
    background: rgba(30, 41, 59, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    transition: border-color 0.3s ease, background 0.3s ease;
}

.dns-layer:hover {
    border-color: rgba(129, 140, 248, 0.15);
    background: rgba(30, 41, 59, 0.5);
}

.light-theme .dns-layer {
    background: rgba(255, 255, 255, 0.5);
}

.dns-layer-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.dns-section-title {
    color: var(--text-primary);
}

.benefit-item {
    background: rgba(255, 255, 255, 0.02);
    padding: 1.25rem;
    border-radius: var(--radius-sm);
    margin-bottom: 0.75rem;
    display: flex;
    gap: 1rem;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.benefit-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--glass-border);
}

.light-theme .benefit-item {
    background: rgba(0, 0, 0, 0.02);
}

/* ========== Light Theme Extended ========== */
.light-theme .logo {
    background: rgba(99, 102, 241, 0.04);
    border-color: rgba(99, 102, 241, 0.1);
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.08);
}

.light-theme .logo::before {
    opacity: 0.15;
}

.light-theme h1 {
    background: linear-gradient(135deg, #4f46e5, #7c3aed, #db2777);
    -webkit-background-clip: text;
    background-clip: text;
    filter: none;
}

.light-theme h2 {
    background: linear-gradient(to right, #0f172a, #334155);
    -webkit-background-clip: text;
    background-clip: text;
}

.light-theme .subtitle {
    background: none;
    -webkit-text-fill-color: var(--text-secondary);
}

.light-theme .step h3 {
    background: none;
    -webkit-text-fill-color: var(--text-primary);
}

.light-theme .feature-title {
    background: none;
    -webkit-text-fill-color: var(--text-primary);
}

.light-theme .dns-section-title {
    background: none;
    -webkit-text-fill-color: var(--text-primary);
}

/* ========== Selection ========== */
::selection {
    background: rgba(129, 140, 248, 0.3);
    color: #fff;
}

.light-theme ::selection {
    background: rgba(99, 102, 241, 0.2);
    color: #0f172a;
}


/* ==========================================================================
   COMPONENT: HARDWARE RACK (HOMEPAGE)
   ========================================================================== */
.hardware-rack {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    max-width: 900px;
    margin: 3rem auto 0;
}

.rack-frame {
    background: #0f172a;
    border: 4px solid #1e293b;
    border-radius: 8px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
}

.rack-unit {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 4px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.2s;
}

.rack-unit:hover {
    border-color: var(--accent-primary);
    background: #25334a;
}

.unit-status { display: flex; gap: 4px; }
.led { width: 6px; height: 6px; border-radius: 50%; background: #334155; }
.led.green { background: #10b981; box-shadow: 0 0 8px #10b981; }
.led.blue { background: #3b82f6; box-shadow: 0 0 8px #3b82f6; }

.unit-icon { font-size: 1.2rem; filter: grayscale(1); transition: 0.2s; }
.rack-unit:hover .unit-icon { filter: grayscale(0); }

.unit-info { flex: 1; }
.unit-name { font-size: 0.85rem; font-weight: 700; color: #f1f5f9; display: block; }
.unit-specs { font-size: 0.7rem; color: #64748b; font-family: ui-monospace, monospace; }

.rack-meta {
    margin-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    padding: 0 10px;
    font-size: 0.65rem;
    font-weight: 800;
    color: #475569;
    letter-spacing: 0.1em;
}

/* ==========================================================================
   COMPONENT: NETWORK TOPOLOGY (ADVANCED)
   ========================================================================== */
.topology-container {
    background: rgba(15, 23, 42, 0.3);
    border-radius: 20px;
    padding: 4rem 2rem !important;
    border: 1px solid rgba(255,255,255,0.05);
}

.topology-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    max-width: 1000px;
    margin: 0 auto;
}

.topo-node {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 1.5rem;
    width: 140px;
    text-align: center;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.topo-node:hover {
    transform: translateY(-5px);
    border-color: var(--accent-primary);
    background: rgba(30, 41, 59, 0.9);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3), 0 0 20px rgba(99, 102, 241, 0.2);
}

.topo-node::before {
    content: attr(data-label);
    position: absolute;
    top: -30px;
    left: 0;
    right: 0;
    font-size: 0.6rem;
    font-weight: 800;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.topo-icon { font-size: 2.2rem; margin-bottom: 0.5rem; }
.topo-text { font-size: 0.8rem; font-weight: 700; color: #f1f5f9; }

.topo-connector { width: 60px; height: 20px; }
.flow-line { overflow: visible; }

.topo-split-wrapper {
    display: flex;
    align-items: center;
    width: 250px;
    height: 120px;
    position: relative;
}

.split-lines { width: 100px; height: 100%; overflow: visible; }

.topo-nodes-group { display: flex; flex-direction: column; gap: 12px; flex: 1; }

.topo-node-mini {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255,255,255,0.05);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #cbd5e1;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.topo-node-mini:hover {
    background: rgba(30, 41, 59, 1);
    border-color: rgba(255,255,255,0.2);
    transform: translateX(5px);
}

/* ==========================================================================
   COMPONENT: VPN MESH (VPN PAGE)
   ========================================================================== */
.mesh-visualization {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 3rem;
    overflow: hidden;
}

.mesh-canvas { max-width: 800px; margin: 0 auto; }
.mesh-links line { stroke: rgba(99, 102, 241, 0.15); stroke-width: 1; }

.node-pulse {
    fill: var(--accent-primary);
    opacity: 0.2;
    animation: node-ping 3s infinite;
}

.node-core {
    fill: var(--accent-primary);
    box-shadow: 0 0 20px var(--accent-primary);
}

.node-label { fill: #fff; font-size: 11px; font-weight: 800; letter-spacing: 0.1em; }
.node-label-small { fill: #94a3b8; font-size: 9px; font-weight: 700; }

@keyframes node-ping {
    0% { r: 6; opacity: 0.4; }
    70% { r: 25; opacity: 0; }
    100% { r: 25; opacity: 0; }
}

/* ==========================================================================

.status-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.6rem;
    font-weight: 800;
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
    padding: 0.25rem 0.6rem;
    border-radius: 100px;
    letter-spacing: 0.05em;
}

.status-pulse { width: 6px; height: 6px; background: #10b981; border-radius: 50%; position: relative; }
.status-pulse::after {
    content: '';
    position: absolute;
    inset: -2px;
    background: #10b981;
    border-radius: 50%;
    opacity: 0.4;
    animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
    0% { transform: scale(1); opacity: 0.4; }
    100% { transform: scale(2.5); opacity: 0; }
}

.app-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

/* ==========================================================================
   GLOBAL RESPONSIVE REFINEMENTS
   ========================================================================== */
@media (max-width: 900px) {
    .topology-flow { flex-direction: column; gap: 2rem; }
    .topo-connector { transform: rotate(90deg) scale(2); height: 40px; }
    .topo-split-wrapper { flex-direction: column; width: auto; height: auto; }
    .split-lines { display: none; }
    .topo-nodes-group { margin-top: 1rem; }
}

@media (max-width: 600px) {
    .cluster-hud { grid-template-columns: 1fr; }
    .rack-unit { flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* ==========================================================================
   FIX: APP SEARCH & HUD REFINEMENTS
   ========================================================================== */
.search-container {
    margin-top: 2rem;
    position: relative;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    z-index: 10;
}

#app-search {
    width: 100%;
    padding: 1.25rem 2rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #fff;
    font-size: 1.2rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

#app-search:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px rgba(129, 140, 248, 0.2), 0 12px 40px rgba(0,0,0,0.4);
    background: rgba(15, 23, 42, 0.6);
    transform: translateY(-2px);
}

.cluster-hud {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.5rem;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 16px;
    max-width: 600px;
    margin: 2rem auto 0;
}

@media (max-width: 600px) {
    .cluster-hud { grid-template-columns: 1fr !important; }
}

/* ==========================================================================
   FIX: HIDING DYNAMIC SECTIONS
   ========================================================================== */
.hidden {
    display: none !important;
}

/* ==========================================================================
   APPS & PROXMOX CARDS - PREMIUM REDESIGN
   ========================================================================== */

.app-category-section h2 {
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.app-card, .proxmox-card {
    display: flex !important;
    flex-direction: column !important;
    padding: 1.75rem !important;
    background: rgba(15, 23, 42, 0.7) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 20px !important;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1) !important;
    position: relative !important;
    overflow: hidden !important;
    height: auto !important;
}

/* Ensure consistent header scaling */
.app-card-header, .card-hero {
    display: flex !important;
    align-items: center !important;
    gap: 1.25rem !important;
    margin-bottom: 1.25rem !important;
    width: 100% !important;
}

.app-card::before, .proxmox-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.05), transparent 60%);
    pointer-events: none;
}

.app-card:hover, .proxmox-card:hover {
    transform: translateY(-5px);
    background: rgba(30, 41, 59, 0.7);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.5);
}

.card-hero {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 0px; /* Reset for flex control */
}

.feature-icon {
    font-size: 2.25rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 64px !important;
    height: 64px !important;
    background: rgba(255, 255, 255, 0.03) !important;
    border-radius: 16px !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.feature-icon img.app-logo {
    width: 52px !important;
    height: 52px !important;
    min-width: 52px !important;
    min-height: 52px !important;
    border-radius: 12px !important;
    background: #fff !important;
    padding: 6px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    transition: transform 0.3s ease !important;
    object-fit: contain !important;
}

.card-header-info {
    flex: 1;
}

.feature-title {
    font-size: 1.15rem !important;
    font-weight: 700 !important;
    color: #f1f5f9 !important;
    margin-bottom: 0.25rem !important;
    line-height: 1.3 !important;
    display: block !important;
}

.card-links {
    display: flex;
    gap: 0.75rem;
}

.mini-link {
    font-size: 0.7rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

.mini-link:hover {
    color: var(--accent-primary);
}

.feature-description {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #94a3b8;
    margin: 1.25rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.app-link-hint {
    margin-top: auto;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap 0.3s ease;
}

.app-card:hover .app-link-hint {
    gap: 0.75rem;
}

/* Proxmox Specifics */
.script-badge-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.script-badge {
    font-size: 0.65rem !important;
    font-weight: 800 !important;
    padding: 0.3rem 0.6rem !important;
    border-radius: 6px !important;
    letter-spacing: 0.05em !important;
    background: rgba(255, 255, 255, 0.08) !important;
    color: #cbd5e1 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    display: inline-block !important;
    text-transform: uppercase !important;
}

.script-badge.updateable { color: #22c55e; background: rgba(34, 197, 94, 0.1); border-color: rgba(34, 197, 94, 0.2); }
.script-badge.type-ct { color: #3b82f6; background: rgba(59, 130, 246, 0.1); border-color: rgba(59, 130, 246, 0.2); }
.script-badge.type-vm { color: #a855f7; background: rgba(168, 85, 247, 0.1); border-color: rgba(168, 85, 247, 0.2); }

.resource-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin: 1.25rem 0;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.res-item {
    display: flex;
    flex-direction: column;
}

.res-item span {
    font-size: 0.65rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
}

.res-item strong {
    font-size: 0.85rem;
    color: #e2e8f0;
    font-family: var(--font-code);
}

.creds-box, .config-section {
    padding: 1rem;
    background: rgba(15, 23, 42, 0.4);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 1rem;
}

.config-label {
    font-size: 0.7rem;
    font-weight: 800;
    color: #64748b;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.creds-row {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.cred-pill {
    font-size: 0.8rem;
    padding: 0.4rem 0.75rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #94a3b8;
    cursor: copy;
    transition: all 0.2s;
}

.cred-pill:hover {
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.1);
}

.cred-pill span {
    color: #fff;
    font-family: var(--font-code);
    font-weight: 600;
}

.notes-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.note-box {
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-size: 0.8rem;
    line-height: 1.5;
    background: rgba(255, 255, 255, 0.03);
    border-left: 3px solid #334155;
    display: flex;
    gap: 0.75rem;
}

.note-box.warning { border-color: #eab308; background: rgba(234, 179, 8, 0.05); color: #fde68a; }
.note-box.info { border-color: #3b82f6; background: rgba(59, 130, 246, 0.05); color: #bfdbfe; }

.config-path-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0.8rem;
    background: #020617;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: copy;
}

.config-path-box code {
    font-size: 0.75rem;
    color: #38bdf8;
    font-family: var(--font-code);
}

.copy-command-btn {
    width: 100%;
    padding: 0.9rem;
    background: var(--accent-primary);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.copy-command-btn:hover {
    transform: translateY(-2px) scale(1.02);
    filter: brightness(1.1);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

.copy-command-btn.copied {
    background: #10b981;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Adaptive Card Height */
.app-card { min-height: 240px; }
.proxmox-card { min-height: 480px; }

.app-badges {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.type-tag {
    font-size: 0.6rem;
    font-weight: 800;
    color: #94a3b8;
    background: rgba(148, 163, 184, 0.1);
    padding: 0.25rem 0.6rem;
    border-radius: 100px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 1px solid rgba(148, 163, 184, 0.15);
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.6rem;
    font-weight: 800;
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
    padding: 0.25rem 0.6rem;
    border-radius: 100px;
    letter-spacing: 0.08em;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-pulse {
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
    position: relative;
    box-shadow: 0 0 8px #10b981;
}

.status-pulse::after {
    content: '';
    position: absolute;
    inset: -2px;
    background: #10b981;
    border-radius: 50%;
    opacity: 0.4;
    animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
    0% { transform: scale(1); opacity: 0.4; }
    100% { transform: scale(2.5); opacity: 0; }
}

@media (max-width: 768px) {
    .feature-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   COMMAND PALETTE (CTRL+K)
   ========================================================================== */

.cmd-palette-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(2, 6, 23, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 15vh;
    opacity: 1;
    transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.cmd-palette-backdrop.hidden {
    opacity: 0;
    pointer-events: none;
}

.cmd-palette {
    width: 90%;
    max-width: 600px;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(99, 102, 241, 0.2);
    border-radius: 16px;
    overflow: hidden;
    transform: translateY(0) scale(1);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.cmd-palette-backdrop.hidden .cmd-palette {
    transform: translateY(-10px) scale(0.98);
}

.cmd-input-wrapper {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.02);
}

.cmd-search-icon {
    font-size: 1.25rem;
    color: #94a3b8;
    margin-right: 1rem;
}

#cmd-search-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #f8fafc;
    font-size: 1.25rem;
    font-weight: 500;
    font-family: var(--font-main);
    outline: none;
}

#cmd-search-input::placeholder {
    color: #475569;
}

.cmd-esc-hint {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: #64748b;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cmd-results {
    max-height: 50vh;
    overflow-y: auto;
    padding: 0.5rem;
}

.cmd-results::-webkit-scrollbar {
    width: 6px;
}
.cmd-results::-webkit-scrollbar-track {
    background: transparent;
}
.cmd-results::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.cmd-result-group {
    padding: 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.5rem;
}

.cmd-result-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    color: #cbd5e1;
    text-decoration: none;
    transition: all 0.1s ease;
    cursor: pointer;
}

.cmd-result-item:hover,
.cmd-result-item.active {
    background: rgba(99, 102, 241, 0.15);
    color: #f8fafc;
}

.cmd-result-icon {
    font-size: 1.25rem;
    width: 1.5rem;
    text-align: center;
}

.cmd-result-title {
    font-weight: 600;
    flex: 1;
}

.cmd-result-shortcut {
    font-size: 0.7rem;
    color: #64748b;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
}

.cmd-result-item.active .cmd-result-shortcut {
    color: #a5b4fc;
}

