/* ==========================================================================
   QUANTUM MACRO — OFFICIAL WEBSITE DESIGN SYSTEM
   Authentic Desktop App Replica & Sweet Cotton Candy Nebula Architecture
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700;800&family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

/* --- Root Design Tokens (Cotton Candy Nebula) --- */
:root {
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Desktop Client Cotton Candy Nebula Tokens */
    --bg-base: #0c0915;
    --bg-surface: #140e26;
    --bg-card: #18122e;
    --bg-card-elevated: #231a40;
    --bg-subtle: rgba(255, 112, 166, 0.06);
    --bg-recessed: #08060f;
    --bg-pill-container: rgba(24, 18, 46, 0.88);

    /* Glass Panels */
    --glass-bg: rgba(24, 18, 46, 0.92);
    --glass-border: rgba(255, 112, 166, 0.18);

    /* Cotton Candy Sugar Spectrum */
    --accent-pink: #ff70a6;
    --accent-sky: #70d6ff;
    --accent-blue: #60a5fa;
    --accent-emerald: #6ee7b7;
    --accent-mint: #6ee7b7;
    --accent-amber: #ffd166;
    --accent-rose: #ff5c8d;
    --accent-purple: #c084fc;
    --accent-magenta: #f472b6;

    /* Border System */
    --border-card: rgba(255, 112, 166, 0.16);
    --border-subtle: rgba(112, 214, 255, 0.12);
    --border-row: rgba(192, 132, 252, 0.12);

    /* Typography */
    --text-primary: #ffffff;
    --text-secondary: #e2d9f3;
    --text-muted: #a79bbd;

    /* Radii & Timing */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    --radius-full: 9999px;
    --transition-fast: 0.15s ease-out;
    --transition-tab: 200ms ease-out;

    /* Cotton Candy Gradients & Glows */
    --gradient-cotton-candy: linear-gradient(135deg, #ff70a6 0%, #c084fc 50%, #70d6ff 100%);
    --gradient-cotton-candy-btn: linear-gradient(135deg, #ff5c8d 0%, #ff70a6 45%, #c084fc 100%);
    --glow-pink: 0 0 25px rgba(255, 112, 166, 0.45);
    --glow-cyan: 0 0 25px rgba(112, 214, 255, 0.45);
}

/* --- Reset & Global Baseline --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
}

input, textarea, [contenteditable="true"] {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

html {
    font-size: 16px;
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    scroll-behavior: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

body {
    overflow-x: hidden;
    min-height: 100vh;
    background-color: var(--bg-base);
    transition: background-color var(--transition-fast), color var(--transition-fast);
    line-height: 1.6;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

/* Complete Scrollbar Removal Across Entire Application */
html::-webkit-scrollbar,
body::-webkit-scrollbar,
::-webkit-scrollbar {
    display: none;
    width: 0px;
    height: 0px;
    background: transparent;
}

/* ==========================================================================
   RIGHT-EDGE ANIMATED CUSTOM SCROLLBAR (Appears on Hover)
   ========================================================================== */
.right-scrollbar-trigger-zone {
    position: fixed;
    right: 0;
    left: auto;
    top: 0;
    bottom: 0;
    width: 38px;
    z-index: 9995;
    display: flex;
    align-items: center;
    pointer-events: auto;
    user-select: none;
}

.custom-scrollbar-panel {
    position: absolute;
    right: 6px;
    left: auto;
    top: 24px;
    bottom: 24px;
    width: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateX(24px) scaleX(0.8);
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.right-scrollbar-trigger-zone:hover .custom-scrollbar-panel,
.right-scrollbar-trigger-zone.active-hover .custom-scrollbar-panel,
.right-scrollbar-trigger-zone.dragging .custom-scrollbar-panel {
    opacity: 1;
    transform: translateX(0) scaleX(1);
    pointer-events: auto;
}

.custom-scrollbar-track {
    position: relative;
    width: 6px;
    height: 100%;
    background: rgba(18, 12, 33, 0.7);
    border: 1px solid rgba(255, 112, 166, 0.2);
    border-radius: 9999px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5), inset 0 1px 2px rgba(0, 0, 0, 0.6);
    cursor: pointer;
    transition: width 0.2s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s ease;
}

.right-scrollbar-trigger-zone:hover .custom-scrollbar-track,
.right-scrollbar-trigger-zone.dragging .custom-scrollbar-track {
    width: 8px;
    background: rgba(22, 15, 42, 0.85);
    border-color: rgba(255, 112, 166, 0.35);
}

.custom-scrollbar-thumb {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 44px;
    border-radius: 9999px;
    background: linear-gradient(180deg, #ff70a6 0%, #c084fc 50%, #70d6ff 100%);
    box-shadow: 0 0 14px rgba(255, 112, 166, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.4);
    cursor: grab;
    transition: transform 0.08s linear, box-shadow 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.right-scrollbar-trigger-zone.dragging .custom-scrollbar-thumb {
    cursor: grabbing;
    box-shadow: 0 0 22px rgba(255, 112, 166, 0.9), 0 0 12px rgba(112, 214, 255, 0.7);
}

.custom-scrollbar-thumb-core {
    width: 2px;
    height: 14px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.9);
    pointer-events: none;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    letter-spacing: -0.02em;
}
p {
    color: var(--text-secondary);
}
a {
    color: inherit;
    text-decoration: none;
}
code, kbd, pre, .font-mono {
    font-family: var(--font-mono);
}
.text-accent {
    color: var(--accent-pink);
}
.container {
    width: 100%;
    max-width: 1560px;
    margin: 0 auto;
    padding: 0 clamp(1.5rem, 3vw, 3rem);
}

/* Ambient Fluid Aurora Canvas */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    opacity: 0.28;
    filter: blur(80px);
    -webkit-filter: blur(80px);
    transition: opacity 0.5s ease;
}
html[data-theme="light"] #particle-canvas {
    opacity: 0.18;
}

/* --- Top Navigation Header (Floating Glass Island) --- */
.navbar {
    position: sticky;
    top: 14px;
    width: 100%;
    z-index: 1000;
    padding: 0 clamp(1rem, 2.5vw, 2rem);
    margin: 0 auto;
    max-width: 1560px;
    pointer-events: none;
}

.navbar-inner {
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    padding: 0 20px;
    background: rgba(13, 9, 24, 0.82);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 112, 166, 0.18);
    border-radius: 18px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5), 0 0 25px rgba(255, 112, 166, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.12);
    gap: 16px;
    transition: all var(--transition-normal);
}

html[data-theme="light"] .navbar-inner {
    background: rgba(255, 255, 255, 0.88);
    border-color: rgba(255, 112, 166, 0.25);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08), 0 0 20px rgba(255, 112, 166, 0.1);
}

/* Brand Logo & Version Group */
.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
    color: inherit;
    text-align: left;
    flex-shrink: 0;
    transition: transform var(--transition-fast);
}
.brand-logo:hover {
    transform: translateY(-1px);
}

.brand-icon-box {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #1e1538 0%, #2b1a4a 100%);
    border: 1px solid rgba(255, 112, 166, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 14px rgba(255, 112, 166, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.2);
    transition: all var(--transition-fast);
}
.brand-logo:hover .brand-icon-box {
    border-color: #ff70a6;
    box-shadow: 0 0 20px rgba(255, 112, 166, 0.45);
    transform: scale(1.05);
}

.brand-text-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand-name {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: 0.06em;
    background: linear-gradient(135deg, #ffffff 40%, #ff9ebb 75%, #70d6ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(255, 112, 166, 0.3);
}

/* Center Tab Pills */
.tab-pill-bar {
    display: inline-flex;
    align-items: center;
    background: rgba(18, 12, 33, 0.65);
    border: 1px solid rgba(255, 112, 166, 0.15);
    border-radius: var(--radius-full);
    padding: 4px;
    gap: 3px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4), 0 2px 10px rgba(0, 0, 0, 0.2);
    max-width: 100%;
    overflow-x: auto;
}
html[data-theme="light"] .tab-pill-bar {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.08);
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 16px;
    border-radius: var(--radius-full);
    background: transparent;
    border: 1px solid transparent;
    color: #a79bbd;
    font-family: var(--font-heading);
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
    user-select: none;
}
.tab-btn:hover {
    color: #ffffff;
    background: rgba(255, 112, 166, 0.09);
}
.tab-btn.active {
    background: linear-gradient(135deg, rgba(255, 112, 166, 0.22) 0%, rgba(192, 132, 252, 0.18) 50%, rgba(112, 214, 255, 0.15) 100%);
    border-color: rgba(255, 112, 166, 0.4);
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35), 0 0 14px rgba(255, 112, 166, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
html[data-theme="light"] .tab-btn.active {
    background: #ffffff;
    border-color: #fbcfe8;
    color: #831843;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.btn-header-action {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(18, 12, 33, 0.7);
    border: 1px solid rgba(255, 112, 166, 0.2);
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}
.btn-header-action:hover {
    color: #ffffff;
    border-color: rgba(255, 112, 166, 0.5);
    background: rgba(255, 112, 166, 0.14);
    box-shadow: 0 0 12px rgba(255, 112, 166, 0.35);
    transform: translateY(-1px);
}
.btn-header-action:active {
    transform: translateY(0);
}

/* --- Top-Right Header Pro Button --- */
.btn-pro-header {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 15px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.14), rgba(251, 191, 36, 0.06));
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: 10px;
    color: #fef3c7;
    font-size: 0.825rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.12);
}
.btn-pro-header:hover {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.26), rgba(251, 191, 36, 0.16));
    border-color: #fbbf24;
    box-shadow: 0 0 18px rgba(245, 158, 11, 0.4);
    transform: translateY(-1px);
    color: #ffffff;
}
.btn-pro-header:active {
    transform: translateY(0);
}

/* --- Top-Right Get Quantum Download Button --- */
.btn-nav-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-family: var(--font-heading);
    font-size: 0.84rem;
    font-weight: 700;
    padding: 7px 18px;
    border-radius: 10px;
    background: linear-gradient(135deg, #ff70a6 0%, #c084fc 50%, #70d6ff 100%);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(255, 112, 166, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.btn-nav-download:hover {
    background: linear-gradient(135deg, #ff5c8d 0%, #a855f7 50%, #38bdf8 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 22px rgba(255, 112, 166, 0.6), 0 0 20px rgba(112, 214, 255, 0.4);
}
.btn-nav-download:active {
    transform: translateY(0);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.55rem 1.1rem;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}
.btn-primary {
    background: linear-gradient(135deg, #ff70a6 0%, #c084fc 100%);
    color: #ffffff;
    border-color: #ff9ebb;
    box-shadow: 0 2px 10px rgba(255, 112, 166, 0.35);
}
.btn-primary:hover {
    background: linear-gradient(135deg, #ff5c8d 0%, #a855f7 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(255, 112, 166, 0.5);
}
.btn-secondary {
    background: var(--bg-card);
    border-color: var(--border-card);
    color: var(--text-primary);
}
.btn-secondary:hover {
    background: var(--bg-card-elevated);
    border-color: rgba(255, 112, 166, 0.3);
    transform: translateY(-1px);
}
.btn-sm {
    padding: 0.42rem 0.85rem;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
}

/* ==========================================================================
   UNIVERSAL KINETIC STAGGERED TAB ENTRANCE ENGINE
   Every section, card, headline, grid, and model animates smoothly on tab switch
   ========================================================================== */
.main-tab-content {
    position: relative;
    z-index: 10;
    padding-top: 2rem;
    padding-bottom: 5rem;
    min-height: calc(100vh - 150px);
}

.tab-pane {
    display: none;
    opacity: 1;
}

.tab-pane.active {
    display: block;
}

/* Base Initial States for Animated Elements inside all Tab Panes */
.tab-pane .overview-hero-left,
.tab-pane .overview-hero-right,
.tab-pane .bento-card,
.tab-pane .custom-benchmark-card,
.tab-pane .simulator-teaser-card,
.tab-pane .simulator-intro-header,
.tab-pane .simulator-window-wrapper,
.tab-pane > .unified-card,
.tab-pane > div:first-child,
.tab-pane .cv-step-card,
.tab-pane .arcade-dual-grid,
.tab-pane .opencv-terminal-card,
.tab-pane .guide-phase-card,
.tab-pane .pricing-card,
.tab-pane .activation-steps-card,
.tab-pane .pro-features-matrix-card,
.tab-pane .pro-spotlight-card,
.tab-pane .dl-package-card,
.tab-pane .faq-card {
    opacity: 0;
    transform: translateY(22px) scale(0.985);
    filter: blur(5px);
    transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.65s cubic-bezier(0.16, 1, 0.3, 1),
                filter 0.65s ease-out;
}

/* STAGGER LEVEL 1: Tab Headlines, Hero Intros, First Card, Primary Tier (0ms delay) */
.tab-pane.tab-anim-active .overview-hero-left,
.tab-pane.tab-anim-active .simulator-intro-header,
.tab-pane.tab-anim-active > div:first-child,
.tab-pane.tab-anim-active > .unified-card:first-of-type,
.tab-pane.tab-anim-active .guide-phase-card:nth-of-type(1),
.tab-pane.tab-anim-active .pricing-card:nth-child(1) {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
    transition-delay: 0ms;
}

/* STAGGER LEVEL 2: Visualizer Deck, Desktop Simulator, Packages, Bento Row 1, Step Cards (80ms delay) */
.tab-pane.tab-anim-active .overview-hero-right,
.tab-pane.tab-anim-active .simulator-window-wrapper,
.tab-pane.tab-anim-active .bento-card:nth-child(1),
.tab-pane.tab-anim-active .bento-card:nth-child(2),
.tab-pane.tab-anim-active .cv-step-card:nth-child(1),
.tab-pane.tab-anim-active .cv-step-card:nth-child(2),
.tab-pane.tab-anim-active .pricing-card:nth-child(2),
.tab-pane.tab-anim-active .dl-package-card:nth-child(1),
.tab-pane.tab-anim-active .dl-package-card:nth-child(2),
.tab-pane.tab-anim-active .guide-phase-card:nth-of-type(2) {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
    transition-delay: 80ms;
}

/* STAGGER LEVEL 3: Full-width Bento, Arcade Stage, Step Cards 3-4, Activation Card (160ms delay) */
.tab-pane.tab-anim-active .bento-card-full,
.tab-pane.tab-anim-active > .unified-card:nth-of-type(2),
.tab-pane.tab-anim-active .arcade-dual-grid,
.tab-pane.tab-anim-active .cv-step-card:nth-child(3),
.tab-pane.tab-anim-active .cv-step-card:nth-child(4),
.tab-pane.tab-anim-active .activation-steps-card,
.tab-pane.tab-anim-active .guide-phase-card:nth-of-type(3) {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
    transition-delay: 160ms;
}

/* STAGGER LEVEL 4: Benchmarks, Teaser, Terminal, Matrix, Spotlight, FAQ (240ms delay) */
.tab-pane.tab-anim-active .custom-benchmark-card,
.tab-pane.tab-anim-active .simulator-teaser-card,
.tab-pane.tab-anim-active .opencv-terminal-card,
.tab-pane.tab-anim-active .pro-features-matrix-card,
.tab-pane.tab-anim-active .pro-spotlight-card,
.tab-pane.tab-anim-active .guide-phase-card:nth-of-type(4),
.tab-pane.tab-anim-active > .unified-card:nth-of-type(3),
.tab-pane.tab-anim-active .faq-card {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
    transition-delay: 240ms;
}

/* Guides & Pro Tab Header Spacing & Gap Retention */
.guides-intro-header,
.pro-intro-header {
    text-align: center;
    padding-top: 2.2rem;
    margin-bottom: 2.5rem;
}

/* ==========================================================================
   PHASE 1: LANDING HERO & BENTO GRID ARCHITECTURE
   ========================================================================== */
.landing-hero {
    text-align: center;
    max-width: 780px;
    margin: 1.5rem auto 3.5rem;
}

.landing-hero-headline {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.12;
    margin-bottom: 1rem;
    color: var(--text-primary);
}
@media (min-width: 768px) {
    .landing-hero-headline {
        font-size: 3.75rem;
    }
}

.text-gradient-shimmer {
    background: linear-gradient(
        90deg,
        #fff0f5 0%,
        #ff70a6 25%,
        #c084fc 50%,
        #70d6ff 75%,
        #fff0f5 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: textShimmer 6s linear infinite;
    display: inline-block;
}

@keyframes textShimmer {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.landing-hero-subtext {
    font-size: 1.15rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 2rem;
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
}

.landing-cta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 2rem;
}

.btn-glow-primary {
    background: linear-gradient(135deg, #ff5c8d 0%, #ff70a6 45%, #c084fc 100%);
    color: #ffffff;
    border: 1px solid #ff9ebb;
    box-shadow: 0 0 25px rgba(255, 112, 166, 0.45), 0 0 45px rgba(112, 214, 255, 0.25);
    font-weight: 700;
    padding: 0.75rem 1.6rem;
    font-size: 0.95rem;
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease;
    cursor: pointer;
    will-change: transform;
}
.btn-glow-primary:hover {
    background: linear-gradient(135deg, #ff4077 0%, #ff5c8d 45%, #a855f7 100%);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 0 35px rgba(255, 112, 166, 0.65), 0 0 55px rgba(112, 214, 255, 0.4);
}
.btn-glow-primary:active {
    transform: translateY(0px) scale(0.98);
}

.btn-ghost-secondary {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    color: var(--text-primary);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
}
.btn-ghost-secondary:hover {
    background: var(--bg-card-elevated);
    border-color: var(--accent-pink);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), 0 0 12px rgba(255, 112, 166, 0.2);
}

/* Feature Bento Grid (Asymmetrical Architecture) */
.bento-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 4rem;
}
@media (min-width: 1024px) {
    .bento-grid {
        grid-template-columns: 1.65fr 1fr;
        gap: 28px;
    }
    .bento-card-wide {
        grid-column: 1 / 2;
    }
    .bento-card-tall {
        grid-column: 2 / 3;
    }
    .bento-card-full {
        grid-column: 1 / -1;
    }
}

.bento-card {
    background: radial-gradient(
        550px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(255, 112, 166, 0.1),
        transparent 50%
    ), var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-xl);
    padding: 36px 32px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
    position: relative;
    overflow: hidden;
}
.bento-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: radial-gradient(
        400px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(255, 112, 166, 0.45),
        transparent 40%
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.bento-card:hover::before {
    opacity: 1;
}
.bento-card:hover {
    border-color: rgba(255, 112, 166, 0.5);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4), 0 0 25px rgba(255, 112, 166, 0.15);
}

.bento-card-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.bento-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.bento-card:hover .bento-icon-wrapper {
    transform: scale(1.08) translateY(-2px);
}

.bento-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.bento-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.65;
}

/* Curve Visual Preview in Bento */
.bento-curve-preview {
    background: #06080e;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-lg);
    padding: 18px 22px;
    margin-top: 6px;
}
.curve-visual-box {
    width: 100%;
    overflow: hidden;
}
.curve-svg-demo {
    width: 100%;
    height: 85px;
    display: block;
}

/* Spec Stat Box in Bento */
.bento-spec-stat-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 10px;
}
.bento-spec-metric {
    background: #06080e;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.bento-spec-num {
    font-size: 1.5rem;
    font-weight: 800;
    font-family: var(--font-mono);
    line-height: 1.1;
}
.bento-spec-lbl {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-weight: 600;
}

.bento-full-inner {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
@media (min-width: 900px) {
    .bento-full-inner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 36px;
    }
}

/* Pulsing LED Dot Helper */
.pulse-led-cyan {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #70d6ff;
    box-shadow: 0 0 8px #70d6ff;
    display: inline-block;
    animation: ledPulse 1.8s infinite ease-in-out;
}
.pulse-led-pink {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ff70a6;
    box-shadow: 0 0 8px #ff70a6;
    display: inline-block;
    animation: ledPulse 1.8s infinite ease-in-out;
}
.pulse-led-emerald {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #6ee7b7;
    box-shadow: 0 0 8px #6ee7b7;
    display: inline-block;
    animation: ledPulse 1.8s infinite ease-in-out;
}
.pulse-led-purple {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #c084fc;
    box-shadow: 0 0 8px #c084fc;
    display: inline-block;
    animation: ledPulse 1.8s infinite ease-in-out;
}
@keyframes ledPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.45; transform: scale(1.25); }
}

/* Feature Highlight Showcase Teaser Card */
.simulator-teaser-card {
    background: radial-gradient(
        550px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(255, 112, 166, 0.12),
        transparent 50%
    ), linear-gradient(135deg, rgba(26, 18, 48, 0.92) 0%, rgba(16, 12, 32, 0.96) 100%);
    border: 1px solid rgba(255, 112, 166, 0.25);
    border-radius: var(--radius-xl);
    padding: 32px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4), 0 0 25px rgba(255, 112, 166, 0.1);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}
@media (min-width: 900px) {
    .simulator-teaser-card {
        grid-template-columns: 1.2fr 0.8fr;
        padding: 40px;
    }
}
.simulator-teaser-card:hover {
    border-color: #ff70a6;
    transform: translateY(-3px);
    box-shadow: 0 20px 50px rgba(255, 112, 166, 0.3), 0 0 35px rgba(112, 214, 255, 0.2);
}

.teaser-mini-deck {
    background: #0d0918;
    border: 1px solid rgba(255, 112, 166, 0.15);
    border-radius: var(--radius-lg);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.simulator-teaser-card:hover .teaser-mini-deck {
    transform: scale(1.02);
}

/* ==========================================================================
   AUTHENTIC 1:1 QUANTUM MACRO DESKTOP APP FRAME (EXACT ORIGINAL DEPICTION)
   ========================================================================== */
#tab-simulator {
    padding-top: 1.5rem;
    padding-bottom: 4rem;
}

.simulator-intro-header {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 2.5rem auto;
    opacity: 0;
    transform: translateY(24px) scale(0.98);
    filter: blur(5px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1), filter 0.7s ease-out;
}

.simulator-intro-title {
    font-size: 2.15rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.025em;
    margin-bottom: 0.65rem;
    line-height: 1.25;
    background: linear-gradient(135deg, #ffffff 40%, #ff9ebb 75%, #70d6ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 25px rgba(255, 112, 166, 0.2);
}

.simulator-intro-desc {
    color: var(--text-secondary);
    font-size: 0.98rem;
    line-height: 1.65;
}

:root {
    --qm-color-bg: #090A0E;
    --qm-color-card: #0E1017;
    --qm-color-primary-rgb: 59, 130, 246;
    --qm-color-secondary-rgb: 139, 92, 246;
    --qm-border-dark: rgba(255, 255, 255, 0.065);
    --qm-border-subtle: rgba(255, 255, 255, 0.08);
    --qm-titlebar-bg: #090A0E;
}

.simulator-window-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-top: 0.5rem;
    margin-bottom: 3rem;
    perspective: 1200px;
    opacity: 0;
    transform: translateY(32px) scale(0.96);
    filter: blur(6px);
    transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1) 0.12s, transform 0.85s cubic-bezier(0.16, 1, 0.3, 1) 0.12s, filter 0.85s ease-out 0.12s;
}

/* Staggered Spring Animation on Notice Dismissal / Tab Arrival */
#tab-simulator.tab-anim-active .simulator-intro-header,
#tab-simulator.tab-anim-active .simulator-window-wrapper,
#tab-simulator.sim-ready .simulator-intro-header,
#tab-simulator.sim-ready .simulator-window-wrapper {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
}

.simulator-window-container {
    width: 100%;
    max-width: 950px;
    height: 550px;
    min-height: 550px;
    background-color: var(--qm-color-bg);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.75), 0 0 30px rgba(59, 130, 246, 0.15);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    margin: 0 auto;
    user-select: none;
    transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
    transform-style: preserve-3d;
}

/* Custom Titlebar (Exact 40px Height) */
#title-bar {
    height: 40px;
    background-color: var(--qm-titlebar-bg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--qm-border-subtle);
    width: 100%;
    z-index: 100;
    flex-shrink: 0;
    user-select: none;
    box-sizing: border-box;
}

.title-bar-brand {
    padding-left: 16px;
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
    cursor: default;
}

.title-bar-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #3b82f6;
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.8);
    margin-right: 8px;
    flex-shrink: 0;
}

.title-bar-controls {
    display: flex;
    height: 100%;
    flex-shrink: 0;
}

.title-bar-btn {
    width: 44px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    transition: background-color var(--transition-fast), color var(--transition-fast);
}
.title-bar-btn:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}
.title-bar-btn.btn-close:hover {
    background-color: #ef4444;
    color: #ffffff;
}

/* --- Centered Desktop Modal Overlays --- */
.modal-overlay {
    position: absolute;
    inset: 0;
    top: 40px;
    background: rgba(9, 10, 14, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 170;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.open {
    display: flex !important;
    animation: modalFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

.modal-card {
    background: #0D0E13;
    border: 1px solid #24262E;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 25px rgba(59, 130, 246, 0.15);
    overflow: hidden;
    position: relative;
    z-index: 10;
}

.modal-header {
    padding: 12px 16px;
    background: #0D0E13;
    border-bottom: 1px solid #24262E;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Desktop App Main Deck */
.desktop-main-layout {
    flex: 1;
    display: flex;
    padding: 20px;
    gap: 20px;
    overflow: hidden;
    height: calc(100% - 40px);
    background: #090A0E;
}

.simulator-window-container .glass-panel {
    background: rgba(14, 16, 23, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.065);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
    border-radius: 16px;
}

/* Left Controls Deck (Exact 340px Width, 16px Gap) */
.desktop-left-deck {
    width: 340px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex-shrink: 0;
    height: 100%;
}

.desktop-btn-row {
    display: flex;
    gap: 16px;
    height: 144px;
}

/* Record Button Aesthetics (1:1 with Original Desktop App) */
.record-btn-card {
    flex: 1;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}
.record-btn-card:hover {
    background: rgba(255, 255, 255, 0.05);
}
.record-btn-card:active {
    transform: scale(0.92) translateZ(-8px);
    transition: transform 0.08s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.record-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid rgba(239, 68, 68, 0.3);
    transition: all 0.3s ease;
}
.record-core {
    width: 48px;
    height: 48px;
    background: rgba(239, 68, 68, 0.85);
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.5);
}
.record-btn-card.is-recording .record-ring {
    border-color: #ef4444;
    animation: recordPulse 1.2s infinite ease-in-out;
}
.record-btn-card.is-recording .record-core {
    border-radius: 8px;
    transform: scale(0.75);
    background: #ef4444;
}
@keyframes recordPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.12); opacity: 0.6; }
}

/* Play/Loop Button Aesthetics (1:1 with Original Desktop App) */
.play-btn-card {
    flex: 1;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}
.play-btn-card:hover {
    background: rgba(255, 255, 255, 0.05);
}
.play-btn-card:active {
    transform: scale(0.92) translateZ(-8px);
    transition: transform 0.08s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.play-core-box {
    position: absolute;
    inset: 0;
    border-radius: 12px;
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.3);
    transition: all 0.3s ease;
}
.play-btn-card.is-playing .play-core-box {
    background: rgba(16, 185, 129, 0.35);
    border-color: #10b981;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.6);
}

/* Desktop Sliders Card */
.desktop-sliders-card {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex-shrink: 0;
    border-radius: 16px;
}

.desktop-slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.desktop-slider-title {
    font-size: 14px;
    font-weight: 600;
    color: #cbd5e1;
}
.desktop-slider-badge {
    font-family: var(--font-mono);
    font-size: 12px;
    background: #0D0E13;
    padding: 3px 10px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
}
.simulator-window-container input[type=range] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    background: transparent;
    cursor: pointer;
}

.simulator-window-container input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: #3b82f6;
    cursor: pointer;
    margin-top: -6px;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.6);
    border: 2px solid white;
    transition: transform var(--transition-fast);
}
.simulator-window-container input[type=range]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.simulator-window-container input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}
html[data-theme="light"] .simulator-window-container input[type=range]::-webkit-slider-runnable-track {
    background: rgba(0, 0, 0, 0.12);
}
html[data-theme="light"] .desktop-slider-title {
    color: #334155;
}
html[data-theme="light"] .desktop-slider-badge {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #334155;
    box-shadow: none;
}

/* Desktop Status Card */
.desktop-status-card {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    overflow: hidden;
}
.desktop-status-inner {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
    gap: 12px;
}
.desktop-status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}
.desktop-status-row.border-subtle {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 8px;
}
html[data-theme="light"] .desktop-status-row.border-subtle {
    border-bottom-color: rgba(0, 0, 0, 0.05);
}

/* Right Panel: Sequence Card (Exact 1:1 with Original Desktop App) */
#sequence-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.sequence-header-bar {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: transparent;
    flex-shrink: 0;
    padding: 18px 20px 14px 20px;
}

.sequence-header-title {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}
html[data-theme="light"] .sequence-header-title {
    color: #0f172a;
}

.sequence-btn-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-seq-tool {
    padding: 6px 16px;
    background: #1C1E26;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    color: #e2d9f3;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
.btn-seq-tool:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.5);
    color: #ffffff;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.25);
}
.btn-seq-tool:active {
    transform: scale(0.95);
}

.btn-seq-save {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.3);
    color: #60a5fa;
}
.btn-seq-save:hover {
    background: rgba(59, 130, 246, 0.3);
    color: #ffffff;
}

.btn-seq-icon {
    padding: 6px 10px;
    background: #1C1E26;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #e2d9f3;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
.btn-seq-icon:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.5);
    color: #ffffff;
}
.btn-seq-icon:active {
    transform: scale(0.95);
}

.btn-seq-hud {
    background: linear-gradient(to right, rgba(59, 130, 246, 0.2), rgba(139, 92, 246, 0.2));
    border-color: rgba(59, 130, 246, 0.3);
    color: #60a5fa;
}
.btn-seq-hud:hover {
    background: linear-gradient(to right, rgba(59, 130, 246, 0.3), rgba(139, 92, 246, 0.3));
    color: #ffffff;
}

html[data-theme="light"] .btn-seq-tool,
html[data-theme="light"] .btn-seq-icon {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #334155;
}
html[data-theme="light"] .btn-seq-tool:hover,
html[data-theme="light"] .btn-seq-icon:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.sequence-list-container {
    flex: 1;
    overflow-y: auto;
    width: 100%;
    background: transparent;
    padding: 8px 20px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.empty-state-view {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #64748b;
    gap: 12px;
}
.empty-state-view p {
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
}
.empty-state-view span {
    font-weight: 700;
    color: #cbd5e1;
}
html[data-theme="light"] .empty-state-view span {
    color: #0f172a;
}

/* Full-Window Settings Modal Overlay */
#settings-tab {
    position: absolute;
    inset: 0;
    top: 40px;
    z-index: 150;
    display: none;
    flex-direction: row;
    background: rgba(9, 10, 14, 0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    overflow: hidden;
    animation: settingsFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
#settings-tab.open {
    display: flex !important;
}
@keyframes settingsFadeIn {
    from { opacity: 0; transform: scale(0.99); }
    to { opacity: 1; transform: scale(1); }
}

.settings-sidebar-deck {
    width: 220px;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    background: #0D0E13;
    flex-shrink: 0;
    padding: 16px 12px;
    gap: 12px;
    height: 100%;
}
html[data-theme="light"] .settings-sidebar-deck {
    background: #eaecf1;
    border-right-color: #cbd5e1;
}

.settings-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4px 4px 4px;
}

.settings-sidebar-title {
    display: flex;
    align-items: center;
    gap: 8px;
}
.settings-sidebar-title h2 {
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.02em;
}
html[data-theme="light"] .settings-sidebar-title h2 {
    color: #0f172a;
}

.settings-search-box {
    position: relative;
    width: 100%;
}
.settings-search-box i {
    position: absolute;
    left: 10px;
    top: 9px;
    width: 14px;
    height: 14px;
    color: #64748b;
}
.settings-search-input {
    width: 100%;
    background: #141720;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 7px 10px 7px 32px;
    font-size: 12px;
    color: #f8fafc;
    outline: none;
    transition: border-color var(--transition-fast);
}
.settings-search-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.25);
}
html[data-theme="light"] .settings-search-input {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #0f172a;
}

/* Sidebar Nav Items (Clean, Transparent, Sleek) */
.settings-nav-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.settings-nav-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    background: transparent;
    border: 1px solid transparent;
    font-size: 13px;
    font-weight: 500;
    color: #94a3b8;
    cursor: pointer;
    text-align: left;
    transition: all var(--transition-fast);
}
.settings-nav-item i {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}
.settings-nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}
.settings-nav-item.active {
    background: rgba(59, 130, 246, 0.16);
    border-color: rgba(59, 130, 246, 0.4);
    color: #60a5fa;
    font-weight: 600;
}
html[data-theme="light"] .settings-nav-item {
    color: #64748b;
}
html[data-theme="light"] .settings-nav-item:hover {
    background: rgba(0, 0, 0, 0.04);
    color: #0f172a;
}
html[data-theme="light"] .settings-nav-item.active {
    background: rgba(56, 189, 248, 0.15);
    border-color: rgba(56, 189, 248, 0.4);
    color: #0284c7;
}

/* Authentic Dark Slate "Apply Changes" Button */
.settings-apply-btn {
    margin-top: auto;
    width: 100%;
    background: #1C1E26;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #f8fafc;
    border-radius: 8px;
    padding: 10px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}
.settings-apply-btn:hover {
    background: #242838;
    border-color: rgba(59, 130, 246, 0.5);
    color: #ffffff;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.3);
}
.settings-apply-btn:active {
    transform: scale(0.97);
}
html[data-theme="light"] .settings-apply-btn {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #0f172a;
}
html[data-theme="light"] .settings-apply-btn:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}

.settings-panels-viewport {
    flex: 1;
    overflow-y: auto;
    padding: 24px 28px;
    background: #090A0E;
}
html[data-theme="light"] .settings-panels-viewport {
    background: #dfe3e8;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
    border-radius: var(--radius-lg);
    padding: 16px;
}
html[data-theme="light"] .glass-panel {
    background: #e2e8f0;
    border-color: #cbd5e1;
}

/* Left Deck Control Cards */
.deck-left {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Dual Buttons Row */
.action-buttons-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.deck-btn-card {
    height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: var(--radius-lg);
    transition: transform var(--transition-fast), background-color var(--transition-fast);
}
.deck-btn-card:hover {
    background: rgba(255, 255, 255, 0.05);
}
.deck-btn-card:active {
    transform: scale(0.96);
}

/* Desktop App Tool Buttons & Spinboxes */
.btn-tool-sm {
    padding: 5px 12px;
    background: #1C1E26;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    color: #e2d9f3;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btn-tool-sm:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.5);
    color: #ffffff;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.25);
}
.btn-tool-primary {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.4);
    color: #60a5fa;
}
.btn-tool-primary:hover {
    background: rgba(59, 130, 246, 0.35);
    color: #ffffff;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.35);
}
.btn-tool-icon {
    padding: 6px 8px;
    background: #1C1E26;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #e2d9f3;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btn-tool-icon:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.5);
    color: #ffffff;
}
html[data-theme="light"] .btn-tool-sm,
html[data-theme="light"] .btn-tool-icon {
    background: #f1f4f8;
    border-color: #cbd5e1;
    color: #1e293b;
}

.spin-btn {
    width: 28px;
    height: 28px;
    background: transparent;
    border: none;
    color: #94a3b8;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    transition: all var(--transition-fast);
}
.spin-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}
.spin-input {
    background: transparent;
    border: none;
    color: #ffffff;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 13px;
    width: 44px;
    text-align: center;
    outline: none;
}
html[data-theme="light"] .spin-input {
    color: #0f172a;
}

.btn-bind-box {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 6px 20px;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 13px;
    color: #ffffff;
    cursor: pointer;
    width: 120px;
    text-align: center;
    transition: all var(--transition-fast);
}
.btn-bind-box:hover {
    border-color: #3b82f6;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}
.btn-bind-box.listening {
    border-color: #ffd166;
    color: #ffd166;
    animation: keybindPulse 1s infinite alternate;
}
@keyframes keybindPulse {
    from { box-shadow: 0 0 4px #ffd166; }
    to { box-shadow: 0 0 12px #ffd166; }
}

.macro-file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    color: #f8fafc;
    transition: all var(--transition-fast);
}
.macro-file-item:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.15);
}
html[data-theme="light"] .macro-file-item {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #0f172a;
}

/* Authentic Desktop Action Rows */
.action-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(14, 16, 23, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all var(--transition-fast);
    animation: fadeInRow 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.action-row:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
}
html[data-theme="light"] .action-row {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.06);
}
html[data-theme="light"] .action-row:hover {
    background: #f1f5f9;
}

@keyframes fadeInRow {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.badge-move {
    background: #141720;
    color: #94a3b8;
    border: 1px solid #24262e;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-family: var(--font-mono);
    font-weight: 700;
}
.badge-click {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.25);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-family: var(--font-mono);
    font-weight: 700;
}
.badge-key {
    background: rgba(59, 130, 246, 0.12);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.25);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-family: var(--font-mono);
    font-weight: 700;
}
.badge-wheel {
    background: rgba(16, 185, 129, 0.12);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.25);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-family: var(--font-mono);
    font-weight: 700;
}
.badge-wait {
    background: rgba(100, 116, 139, 0.12);
    color: #94a3b8;
    border: 1px solid rgba(100, 116, 139, 0.25);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-family: var(--font-mono);
    font-weight: 700;
}

/* Record Button Aesthetics */
.record-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid rgba(239, 68, 68, 0.3);
    transition: all 0.3s ease;
}
.record-core {
    width: 32px;
    height: 32px;
    background: rgba(239, 68, 68, 0.85);
    border-radius: 50%;
    transition: all 0.3s ease;
}
.deck-btn-card.is-recording .record-ring {
    border-color: #ef4444;
    animation: recordPulse 1.2s infinite ease-in-out;
}
.deck-btn-card.is-recording .record-core {
    border-radius: 6px;
    transform: scale(0.85);
    background: #ef4444;
}

@keyframes recordPulse {
    0%, 100% { transform: scale(1); opacity: 1; box-shadow: 0 0 10px rgba(239, 68, 68, 0.4); }
    50% { transform: scale(1.18); opacity: 0.6; box-shadow: 0 0 20px rgba(239, 68, 68, 0.7); }
}

/* Play/Loop Button Aesthetics */
.play-core-box {
    position: absolute;
    inset: 0;
    border-radius: var(--radius-md);
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    transition: all 0.3s ease;
}
.deck-btn-card.is-playing .play-core-box {
    background: rgba(16, 185, 129, 0.35);
    border-color: #10b981;
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.5);
}

/* Sliders */
.slider-group {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.slider-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.825rem;
    font-weight: 600;
    color: var(--text-primary);
}
.slider-badge {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    background: #0d0e13;
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}
html[data-theme="light"] .slider-badge {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #0f172a;
}

input[type=range] {
    -webkit-appearance: none;
    width: 100%;
    height: 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.15);
    outline: none;
    cursor: pointer;
}
input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #3b82f6;
    cursor: pointer;
    box-shadow: 0 0 6px rgba(59, 130, 246, 0.6);
}

/* Status Card */
.status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    padding: 6px 0;
}
.status-row:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Right Panel: Sequence Card */
.deck-right {
    display: flex;
    flex-direction: column;
    min-height: 380px;
    position: relative;
}

.sequence-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: 12px;
    margin-bottom: 12px;
}
.sequence-btn-group {
    display: flex;
    align-items: center;
    gap: 6px;
}
.seq-action-btn {
    padding: 4px 12px;
    border-radius: 6px;
    background: #1c1e26;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-fast);
}
.seq-action-btn:hover {
    border-color: #3b82f6;
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.15);
}
.seq-action-btn.icon-only {
    padding: 4px 8px;
}

/* Sequence Recorded List View */
.sequence-list-box {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 260px;
}
.sequence-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-primary);
    animation: itemSlideIn 0.2s ease-out;
}
@keyframes itemSlideIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.empty-sequence-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    gap: 8px;
    padding: 40px 0;
}

/* ==========================================================================
   AUTHENTIC 1:1 FULL DESKTOP SETTINGS MODAL & EXPLORER OVERLAYS
   ========================================================================== */
.settings-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(9, 10, 14, 0.96);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    z-index: 100;
    border-radius: var(--radius-xl);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: modalFadeIn 0.2s ease-out;
}
.settings-modal-overlay.open {
    display: flex;
}
@keyframes modalFadeIn {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

.settings-modal-layout {
    display: grid;
    grid-template-columns: 1fr;
    height: 100%;
    overflow: hidden;
}
@media (min-width: 768px) {
    .settings-modal-layout {
        grid-template-columns: 220px 1fr;
    }
}

.settings-modal-sidebar {
    background: #0d0e13;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
}
html[data-theme="light"] .settings-modal-sidebar {
    background: #eaecf1;
    border-right-color: #cbd5e1;
}

.settings-search-box {
    position: relative;
    margin-bottom: 4px;
}
.settings-search-box input {
    width: 100%;
    background: #141720;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 6px 10px 6px 28px;
    font-size: 0.75rem;
    color: #f8fafc;
    outline: none;
}
html[data-theme="light"] .settings-search-box input {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #0f172a;
}
.settings-search-box svg {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.settings-nav-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: all var(--transition-fast);
}
.settings-nav-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
}
.settings-nav-btn.active {
    background: rgba(56, 189, 248, 0.15);
    border-color: rgba(56, 189, 248, 0.35);
    color: var(--accent-sky);
}

.settings-content-area {
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Custom Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 20px;
}
.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.15);
    transition: 0.25s;
    border-radius: 20px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.25s;
    border-radius: 50%;
}
input:checked + .slider {
    background-color: #0284c7;
}
input:checked + .slider:before {
    transform: translateX(18px);
}

/* Spin Box */
.spin-box {
    display: flex;
    align-items: center;
    background: #0d0e13;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 2px;
}
html[data-theme="light"] .spin-box {
    background: #f1f5f9;
    border-color: #cbd5e1;
}
.spin-btn {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 4px;
}
.spin-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}
.spin-input {
    width: 44px;
    background: transparent;
    border: none;
    color: #f8fafc;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 700;
    text-align: center;
    outline: none;
}
html[data-theme="light"] .spin-input {
    color: #0f172a;
}

/* Explorer Modals (Load, Save, Overwrite) */
.explorer-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(12px);
    z-index: 120;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.explorer-overlay.open {
    display: flex;
}
.explorer-modal {
    background: #0d0e13;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 420px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
    animation: modalFadeIn 0.2s ease-out;
}
html[data-theme="light"] .explorer-modal {
    background: #eaecf1;
    border-color: #cbd5e1;
}
.explorer-header {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 700;
}
.explorer-list {
    padding: 12px;
    max-height: 220px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.explorer-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}
.explorer-item:hover, .explorer-item.selected {
    background: rgba(56, 189, 248, 0.12);
    border-color: var(--accent-sky);
    color: var(--accent-sky);
}

/* ==========================================================================
   UNIFIED CARD & SETTING ROW STYLING
   ========================================================================== */
.unified-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-xl);
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}
.unified-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 22px;
    background: rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid var(--border-row);
}
.unified-card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.15rem;
    font-weight: 700;
}
.unified-card-title svg {
    color: var(--accent-pink);
}
.unified-card-body {
    padding: 20px 22px;
}

.setting-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-row);
}
@media (min-width: 640px) {
    .setting-row {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}
.setting-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.setting-row:first-child {
    padding-top: 0;
}

.setting-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}
.setting-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
}
.hero-pill-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    background: rgba(255, 112, 166, 0.12);
    border: 1px solid rgba(255, 112, 166, 0.3);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--accent-pink);
    font-family: var(--font-body);
    letter-spacing: normal;
    text-transform: none;
    width: fit-content;
}

/* ==========================================================================
   OPENCV 2D MINI-GAME ARCADE & MACRO AUTOMATION ENGINE
   ========================================================================== */

/* Arcade Header Mode Switcher */
.arcade-mode-switcher {
    display: flex;
    background: var(--bg-recessed);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    padding: 3px;
    gap: 3px;
}
.arcade-mode-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.775rem;
    font-weight: 600;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.arcade-mode-btn:hover {
    color: var(--text-primary);
}
.arcade-mode-btn.active {
    background: linear-gradient(135deg, #ff70a6 0%, #70d6ff 100%);
    color: #0c0915;
    box-shadow: 0 0 16px rgba(255, 112, 166, 0.45);
    font-weight: 700;
}
html[data-theme="light"] .arcade-mode-btn.active {
    background: #ff70a6;
    color: #ffffff;
}

/* Arcade Game Selector Bar (Dual 50/50 Layout) */
.arcade-selector-bar {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}
@media (max-width: 640px) {
    .arcade-selector-bar {
        grid-template-columns: 1fr;
    }
}
.arcade-game-btn {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    text-align: left;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}
.arcade-game-btn:hover {
    border-color: rgba(255, 112, 166, 0.4);
    transform: translateY(-2px);
    background: var(--bg-card-elevated);
}
.arcade-game-btn.active {
    background: rgba(255, 112, 166, 0.14);
    border-color: #ff70a6;
    box-shadow: 0 0 20px rgba(255, 112, 166, 0.25);
}
.arcade-btn-icon-box {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}
.icon-fishing {
    background: rgba(112, 214, 255, 0.14);
    border: 1px solid rgba(112, 214, 255, 0.35);
    box-shadow: 0 0 10px rgba(112, 214, 255, 0.2);
}
.icon-parry {
    background: rgba(255, 112, 166, 0.14);
    border: 1px solid rgba(255, 112, 166, 0.4);
    box-shadow: 0 0 10px rgba(255, 112, 166, 0.2);
}
.arcade-btn-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.arcade-btn-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
}
.arcade-btn-subtitle {
    font-size: 0.725rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}
html[data-theme="light"] .arcade-game-btn.active {
    background: rgba(255, 112, 166, 0.15);
    border-color: #ff70a6;
}

/* Dual-Pane Viewport Grid */
.arcade-dual-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}
@media (min-width: 1024px) {
    .arcade-dual-grid {
        grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.75fr);
        gap: 28px;
    }
}

/* Left Pane: High-DPI 2D Game Canvas */
.arcade-canvas-frame {
    position: relative;
    width: 100%;
    height: 480px;
    border-radius: var(--radius-lg);
    background: #08060f;
    border: 1px solid rgba(255, 112, 166, 0.25);
    overflow: hidden;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5);
    user-select: none;
    cursor: crosshair;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.arcade-canvas-frame.manual-mode {
    border-color: rgba(255, 112, 166, 0.45);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6), 0 0 24px rgba(255, 112, 166, 0.15);
}

/* Feudal Master Ninja / Shinobi Dojo Canvas Animations */
@keyframes shinobiMistPulse {
    0%, 100% {
        border-color: rgba(185, 28, 28, 0.45);
        box-shadow: 0 14px 40px rgba(0, 0, 0, 0.75), 0 0 24px rgba(185, 28, 28, 0.18);
    }
    50% {
        border-color: rgba(220, 38, 38, 0.65);
        box-shadow: 0 16px 44px rgba(0, 0, 0, 0.85), 0 0 34px rgba(220, 38, 38, 0.28);
    }
}

@keyframes shinobiScarfFlutter {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-2px) rotate(1.5deg);
    }
}

.arcade-canvas-frame[data-game="parry"] {
    border-color: rgba(185, 28, 28, 0.45);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.75), 0 0 24px rgba(185, 28, 28, 0.18);
    animation: shinobiMistPulse 3.5s ease-in-out infinite;
}
.arcade-canvas-frame[data-game="parry"].manual-mode {
    border-color: rgba(217, 119, 6, 0.65);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.8), 0 0 32px rgba(217, 119, 6, 0.25);
    animation: none;
}
html[data-theme="light"] .arcade-canvas-frame {
    background: #eaecf1;
    border-color: #cbd5e1;
}
html[data-theme="light"] .arcade-canvas-frame.manual-mode {
    border-color: #ff70a6;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.08), 0 0 20px rgba(255, 112, 166, 0.15);
}
html[data-theme="light"] .arcade-canvas-frame[data-game="parry"] {
    border-color: rgba(185, 28, 28, 0.4);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.08), 0 0 20px rgba(185, 28, 28, 0.12);
}

#cv-game-canvas {
    width: 100%;
    height: 100%;
    display: block;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    image-rendering: pixelated;
}

/* Canvas Top & Bottom HUD Overlays */
.cv-canvas-hud {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: none;
    z-index: 20;
}

.cv-hud-chip {
    background: rgba(14, 10, 24, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 112, 166, 0.25);
    border-radius: 6px;
    padding: 5px 10px;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 700;
    color: #f8fafc;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

html[data-theme="light"] .cv-hud-chip {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 112, 166, 0.25);
    color: #0f172a;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

/* Glowing Micro Status LEDs */
.pulse-led-cyan,
.pulse-led-emerald,
.pulse-led-amber,
.pulse-led-rose {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}
.pulse-led-cyan {
    background: #70d6ff;
    box-shadow: 0 0 8px #70d6ff, 0 0 12px rgba(112, 214, 255, 0.6);
}
.pulse-led-emerald {
    background: #6ee7b7;
    box-shadow: 0 0 8px #6ee7b7, 0 0 12px rgba(110, 231, 183, 0.6);
}
.pulse-led-amber {
    background: #ffd166;
    box-shadow: 0 0 8px #ffd166, 0 0 12px rgba(255, 209, 102, 0.6);
}
.pulse-led-rose {
    background: #ff70a6;
    box-shadow: 0 0 8px #ff70a6, 0 0 12px rgba(255, 112, 166, 0.6);
}

/* Interactive Manual Controls Guide Overlay */
.cv-manual-controls-guide {
    position: absolute;
    bottom: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 12;
    pointer-events: none;
    opacity: 0;
    transform: translateY(6px);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    flex-wrap: wrap;
    justify-content: flex-end;
}
.cv-manual-controls-guide.visible {
    opacity: 1;
    transform: translateY(0);
}
.manual-guide-pill {
    background: rgba(18, 13, 34, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 112, 166, 0.25);
    border-radius: 8px;
    padding: 6px 12px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    color: #f8fafc;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    letter-spacing: 0.03em;
}
.manual-guide-pill kbd {
    background: rgba(255, 112, 166, 0.15);
    border: 1px solid rgba(255, 112, 166, 0.35);
    color: var(--accent-pink);
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 0.65rem;
    font-weight: 800;
}
html[data-theme="light"] .manual-guide-pill {
    background: rgba(255, 255, 255, 0.88);
    border-color: rgba(255, 112, 166, 0.3);
    color: #0f172a;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}
html[data-theme="light"] .manual-guide-pill kbd {
    background: rgba(255, 112, 166, 0.1);
    border-color: rgba(255, 112, 166, 0.3);
    color: #ff70a6;
}

.cv-trigger-flash {
    position: absolute;
    inset: 0;
    background: rgba(110, 231, 183, 0.2);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.12s ease-out;
    z-index: 15;
}
.cv-trigger-flash.active {
    opacity: 1;
}

/* Right Pane: Quantum Vision Terminal & Macro Inspector */
/* Right Pane: Quantum Vision Terminal & Macro Inspector (Cotton Candy Nebula Glass UI) */
.opencv-terminal-card {
    background: rgba(24, 18, 46, 0.78);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 112, 166, 0.22);
    border-radius: var(--radius-lg);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.terminal-header-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.terminal-meta-box {
    background: rgba(35, 26, 64, 0.55);
    border: 1px solid rgba(255, 112, 166, 0.16);
    border-radius: var(--radius-md);
    padding: 9px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transition: border-color 0.2s ease, transform 0.2s ease;
}
.terminal-meta-box:hover {
    border-color: rgba(255, 112, 166, 0.35);
    transform: translateY(-1px);
}
.terminal-meta-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-family: var(--font-body);
}
.terminal-meta-val {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-primary);
}

/* Seamless Integrated Fishing Difficulty Control */
.terminal-difficulty-control {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    user-select: none;
}
.diff-step-btn {
    width: 20px;
    height: 20px;
    border-radius: 5px;
    background: rgba(255, 112, 166, 0.08);
    border: 1px solid rgba(255, 112, 166, 0.18);
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    outline: none;
    padding: 0;
}
.diff-step-btn:hover {
    background: rgba(255, 112, 166, 0.22);
    border-color: var(--accent-pink);
    color: #ffffff;
    box-shadow: 0 0 8px rgba(255, 112, 166, 0.4);
    transform: scale(1.12);
}
.diff-step-btn:active {
    transform: scale(0.92);
}
#cv-difficulty-val {
    min-width: 48px;
    text-align: center;
    letter-spacing: 0.02em;
    cursor: default;
    line-height: 1;
}
html[data-theme="light"] .diff-step-btn {
    background: rgba(255, 112, 166, 0.06);
    border-color: rgba(255, 112, 166, 0.2);
}

/* Template Inspector Card */
.template-inspector-card {
    background: rgba(35, 26, 64, 0.55);
    border: 1px solid rgba(255, 112, 166, 0.16);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.template-preview-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}
.template-preview-box {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(255, 112, 166, 0.16), rgba(192, 132, 252, 0.16));
    border: 1px solid rgba(255, 112, 166, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 14px rgba(255, 112, 166, 0.22);
}
.template-preview-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.template-name {
    font-family: var(--font-heading);
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--text-primary);
}
.template-dim {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-muted);
}
.search-region-chip {
    background: rgba(112, 214, 255, 0.08);
    border: 1px solid rgba(112, 214, 255, 0.26);
    border-radius: 6px;
    padding: 6px 12px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    color: #70d6ff;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 0 10px rgba(112, 214, 255, 0.08);
}

/* Confidence Threshold Slider */
.terminal-slider-box {
    background: rgba(35, 26, 64, 0.55);
    border: 1px solid rgba(255, 112, 166, 0.16);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.terminal-slider-box .slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-primary);
}
.terminal-slider-box .slider-badge {
    background: rgba(255, 112, 166, 0.15);
    border: 1px solid rgba(255, 112, 166, 0.4);
    color: var(--accent-pink);
    font-family: var(--font-mono);
    font-weight: 800;
    font-size: 0.76rem;
    padding: 2px 8px;
    border-radius: 6px;
    box-shadow: 0 0 10px rgba(255, 112, 166, 0.15);
}
.terminal-slider-box input[type="range"] {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: 9999px;
    outline: none;
    background: rgba(14, 10, 26, 0.9);
    border: 1px solid rgba(255, 112, 166, 0.22);
    cursor: pointer;
}
.terminal-slider-box input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff70a6 0%, #c084fc 100%);
    border: 2px solid #ffffff;
    box-shadow: 0 0 12px rgba(255, 112, 166, 0.75);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.terminal-slider-box input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 18px rgba(255, 112, 166, 0.95);
}
.terminal-slider-box input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff70a6 0%, #c084fc 100%);
    border: 2px solid #ffffff;
    box-shadow: 0 0 12px rgba(255, 112, 166, 0.75);
    cursor: pointer;
}

/* Live Macro Stream Terminal */
.terminal-stream-container {
    background: rgba(14, 10, 26, 0.92);
    border: 1px solid rgba(255, 112, 166, 0.18);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex: 1;
    min-height: 160px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), inset 0 2px 6px rgba(0, 0, 0, 0.3);
}

.terminal-stream-header {
    background: rgba(35, 26, 64, 0.65);
    padding: 8px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 112, 166, 0.14);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    color: #e2d9f3;
    letter-spacing: 0.05em;
}
.btn-clear-terminal {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 112, 166, 0.1);
    border: 1px solid rgba(255, 112, 166, 0.25);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn-clear-terminal:hover {
    background: rgba(255, 112, 166, 0.25);
    border-color: var(--accent-pink);
    color: #ffffff;
    box-shadow: 0 0 10px rgba(255, 112, 166, 0.4);
}

.terminal-log-stream {
    padding: 10px 14px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    line-height: 1.55;
    overflow-y: auto;
    max-height: 140px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.terminal-log-stream::-webkit-scrollbar {
    width: 4px;
}
.terminal-log-stream::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}
.terminal-log-stream::-webkit-scrollbar-thumb {
    background: rgba(192, 132, 252, 0.35);
    border-radius: 2px;
}
.terminal-log-stream::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 112, 166, 0.6);
}

.log-entry {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    line-height: 1.5;
}
.log-time {
    color: #a79bbd;
    font-weight: 500;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}
.log-tag-scan,
.log-tag-match,
.log-tag-macro,
.log-tag-delay,
.log-tag-lock {
    flex-shrink: 0;
    white-space: nowrap;
    font-weight: 700;
}
.log-tag-scan {
    color: #70d6ff;
}
.log-tag-match {
    color: #ff70a6;
    text-shadow: 0 0 8px rgba(255, 112, 166, 0.4);
}
.log-tag-macro {
    color: #ffd166;
    text-shadow: 0 0 8px rgba(255, 209, 102, 0.4);
}
.log-tag-delay {
    color: #c084fc;
}
.log-tag-lock {
    color: #6ee7b7;
}
.log-msg {
    color: #e2d9f3;
    word-break: break-word;
}

/* Light Mode Adaptations */
html[data-theme="light"] .opencv-terminal-card {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(255, 112, 166, 0.25);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
html[data-theme="light"] .terminal-meta-box,
html[data-theme="light"] .template-inspector-card,
html[data-theme="light"] .terminal-slider-box {
    background: rgba(248, 246, 252, 0.85);
    border-color: rgba(255, 112, 166, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
html[data-theme="light"] .terminal-stream-container {
    background: #1e1933;
    border-color: rgba(255, 112, 166, 0.25);
}
html[data-theme="light"] .terminal-stream-header {
    background: rgba(45, 34, 75, 0.85);
    border-color: rgba(255, 112, 166, 0.2);
}

/* Downloads Hub Grid */
.downloads-dual-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}
@media (min-width: 900px) {
    .downloads-dual-grid {
        grid-template-columns: 1fr 1fr;
        gap: 28px;
    }
}
.dl-package-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-xl);
    padding: 32px 28px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.dl-package-card.recommended {
    border-color: rgba(255, 112, 166, 0.45);
    box-shadow: 0 0 25px rgba(255, 112, 166, 0.15);
}

/* FAQ List & Transitions */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.faq-row {
    border: 1px solid var(--border-card);
    border-radius: var(--radius-md);
    margin-bottom: 10px;
    background: var(--bg-card);
    overflow: hidden;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}
.faq-row:hover {
    border-color: rgba(255, 112, 166, 0.35);
}
.faq-row.active {
    border-color: rgba(255, 112, 166, 0.5);
    background: var(--bg-card-elevated);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), 0 0 15px rgba(255, 112, 166, 0.15);
}
.faq-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    transition: color var(--transition-fast);
}
.faq-head svg {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    color: var(--text-muted);
}
.faq-row.active .faq-head {
    color: var(--accent-pink);
}
.faq-row.active .faq-head svg {
    transform: rotate(180deg);
    color: var(--accent-pink);
}
.faq-body {
    padding: 0 20px 18px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.65;
    display: none;
    animation: faqSpringOpen 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.faq-row.active .faq-body {
    display: block;
}
@keyframes faqSpringOpen {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Footer */
.app-footer {
    border-top: 1px solid var(--border-card);
    padding: 36px 0;
    background: var(--bg-surface);
    color: var(--text-muted);
    font-size: 0.85rem;
}
.app-footer a {
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}
.app-footer a:hover {
    color: var(--accent-pink);
}

/* Global Micro-Animations & Glow Effects */
.pulse-badge {
    animation: statusBadgePulse 2s infinite ease-in-out;
}
@keyframes statusBadgePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.65; }
}

/* Toast Root */
#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}
.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    background: var(--bg-card-elevated);
    border: 1px solid var(--border-card);
    border-left: 3px solid var(--accent-pink);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 500;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    animation: toastSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: auto;
}
@keyframes toastSlideIn {
    from { transform: translateY(16px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@media (max-width: 860px) {
    .navbar {
        top: 8px;
        padding: 0 12px;
    }
    .navbar-inner {
        height: auto;
        padding: 10px 14px;
        flex-wrap: wrap;
        border-radius: 14px;
        gap: 12px;
    }
    .tab-pill-bar {
        order: 3;
        width: 100%;
        justify-content: flex-start;
        padding: 4px;
        overflow-x: auto;
    }
    .tab-btn {
        padding: 6px 12px;
        font-size: 0.78rem;
    }
}

/* ==========================================================================
   OPENCV ARCHITECTURE EXPLAINER SECTION
   ========================================================================== */
.cv-explainer-card {
    margin-bottom: 28px;
    border-color: rgba(255, 112, 166, 0.25);
    background: radial-gradient(circle at 100% 0%, rgba(255, 112, 166, 0.08) 0%, transparent 40%), var(--bg-card);
}

.cv-pipeline-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}
@media (min-width: 640px) {
    .cv-pipeline-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (min-width: 1024px) {
    .cv-pipeline-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.cv-step-card {
    background: var(--bg-recessed);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 18px 16px;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: all var(--transition-fast);
}
.cv-step-card:hover {
    border-color: rgba(255, 112, 166, 0.35);
    transform: translateY(-2px);
    background: var(--bg-card-elevated);
}

.cv-step-num {
    position: absolute;
    top: 14px;
    right: 16px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--text-muted);
    opacity: 0.5;
}

.cv-step-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.cv-step-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
}

.cv-step-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* --- Asymmetric Overview Hero Grid --- */
.overview-hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 36px;
    align-items: center;
    margin: 2rem 0 4rem 0;
}
@media (min-width: 1024px) {
    .overview-hero-grid {
        grid-template-columns: 1.22fr 0.98fr;
        gap: 48px;
    }
}

.overview-hero-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.overview-hero-headline {
    font-size: clamp(2.8rem, 3.8vw, 4.4rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin: 16px 0;
}

.overview-hero-subtext {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 28px;
    max-width: 680px;
}

/* Right Interactive Bézier Trajectory Canvas Deck */
.hero-canvas-deck {
    background: var(--bg-card);
    border: 1px solid rgba(255, 112, 166, 0.25);
    border-radius: var(--radius-xl);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 112, 166, 0.1);
    position: relative;
    overflow: hidden;
}

.hero-canvas-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 12px;
}

.trajectory-mode-switcher {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-full);
    padding: 3px;
}

.traj-mode-btn {
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-full);
    padding: 4px 12px;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}
.traj-mode-btn:hover {
    color: var(--text-primary);
}
.traj-mode-btn.active {
    background: rgba(255, 112, 166, 0.18);
    border-color: rgba(255, 112, 166, 0.45);
    color: var(--accent-pink);
    box-shadow: 0 0 10px rgba(255, 112, 166, 0.25);
}

.hero-canvas-viewport {
    position: relative;
    width: 100%;
    height: 310px;
    background: #08060f;
    border: 1px solid rgba(255, 112, 166, 0.12);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: crosshair;
}

#hero-bezier-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.canvas-overlay-hint {
    position: absolute;
    bottom: 10px;
    left: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(14, 10, 24, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 112, 166, 0.15);
    border-radius: var(--radius-full);
    padding: 3px 8px;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-muted);
    pointer-events: none;
}

.canvas-telemetry-badge {
    position: absolute;
    top: 10px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(14, 10, 24, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 112, 166, 0.25);
    border-radius: var(--radius-full);
    padding: 3px 8px;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: #70d6ff;
    font-weight: 600;
    pointer-events: none;
}

/* --- Custom Bespoke Benchmark Matrix Styling --- */
.custom-benchmark-card {
    border-color: rgba(255, 112, 166, 0.25);
    background: radial-gradient(circle at 50% 0%, rgba(255, 112, 166, 0.05) 0%, transparent 60%), var(--bg-card);
}

.benchmark-matrix-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
    font-size: 0.85rem;
}

.benchmark-matrix-table th {
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--border-row);
    text-align: left;
}

.col-feature {
    width: 25%;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.col-quantum {
    width: 33%;
    background: rgba(255, 112, 166, 0.06);
    border-left: 1px solid rgba(255, 112, 166, 0.25);
    border-right: 1px solid rgba(255, 112, 166, 0.25);
}

.quantum-th-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.92rem;
    color: var(--accent-pink);
    letter-spacing: -0.01em;
}

.col-other {
    width: 21%;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.benchmark-matrix-table td {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-row);
    vertical-align: middle;
}

.benchmark-matrix-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.015);
}

.row-feature-title {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.row-feature-title strong {
    color: var(--text-primary);
    font-size: 0.88rem;
}
.row-feature-title span {
    font-size: 0.725rem;
    color: var(--text-muted);
}

.cell-quantum {
    background: rgba(255, 112, 166, 0.03);
    border-left: 1px solid rgba(255, 112, 166, 0.15);
    border-right: 1px solid rgba(255, 112, 166, 0.15);
}

/* --- Unboxed Matrix Cell Typography --- */
.matrix-pill {
    display: block;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
    font-family: var(--font-body);
    font-size: 0.85rem;
    line-height: 1.4;
}

.pill-sky {
    color: #70d6ff;
    font-weight: 700;
}

.pill-emerald {
    color: #ff70a6;
    font-weight: 700;
}

.pill-neutral {
    color: #cbd5e1;
    font-weight: 500;
}

.pill-muted {
    color: #64748b;
    font-weight: 500;
}

/* --- Appearance Tab Theme Preset Cards --- */
.theme-selection-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.theme-card {
    background: #150f28;
    border: 1px solid rgba(255, 112, 166, 0.12);
    border-radius: 12px;
    padding: 14px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
}
.theme-card:hover {
    border-color: rgba(255, 112, 166, 0.4);
    background: #1c1435;
    transform: translateY(-2px);
}
.theme-card.active {
    border: 1.5px solid #ff70a6;
    background: #19122f;
    box-shadow: 0 0 16px rgba(255, 112, 166, 0.25);
}

/* Mini Window Previews */
.theme-card-preview {
    height: 95px;
    width: 100%;
    border-radius: 8px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4);
}
.theme-card-preview.dark-preview {
    background: #0d0918;
    border: 1px solid rgba(255, 112, 166, 0.12);
}
.theme-card-preview.light-preview {
    background: #e2e8f0;
    border: 1px solid #cbd5e1;
}

.theme-mini-titlebar {
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.light-preview .theme-mini-titlebar {
    border-bottom: 1px solid #cbd5e1;
}

.theme-mini-dots {
    display: flex;
    gap: 4px;
}
.theme-mini-dots span {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    display: block;
}

.theme-mini-body {
    display: flex;
    gap: 8px;
    flex: 1;
    padding-top: 6px;
}

.theme-mini-sidebar {
    width: 28px;
    background: #150f28;
    border: 1px solid rgba(255, 112, 166, 0.1);
    border-radius: 4px;
    padding: 4px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.light-preview .theme-mini-sidebar {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.mini-bar-accent {
    height: 3px;
    background: #ff70a6;
    border-radius: 2px;
    width: 100%;
}
.mini-bar-accent.light {
    background: #0284c7;
}

.mini-bar-subtle {
    height: 2px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    width: 75%;
}
.mini-bar-subtle.light {
    background: #94a3b8;
}

.theme-mini-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 4px;
}

.mini-bar-line {
    height: 3px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 2px;
    width: 85%;
}
.mini-bar-line.short {
    width: 55%;
}
.mini-bar-line.light {
    background: #64748b;
}

.mini-bar-box {
    height: 14px;
    background: rgba(255, 112, 166, 0.1);
    border: 1px solid rgba(255, 112, 166, 0.25);
    border-radius: 3px;
    width: 100%;
}
.mini-bar-box.light {
    background: rgba(2, 132, 199, 0.1);
    border-color: rgba(2, 132, 199, 0.25);
}

.theme-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.theme-card-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #f8fafc;
}

.theme-check-icon {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Scoped Simulator Window Light Theme --- */
.simulator-window-container[data-theme="light"] {
    background-color: #f1f5f9;
    border-color: rgba(0, 0, 0, 0.12);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.15);
}

.simulator-window-container[data-theme="light"] #title-bar {
    background-color: #ffffff;
    border-bottom-color: #e2e8f0;
}

.simulator-window-container[data-theme="light"] .title-bar-brand span:first-of-type {
    color: #0f172a !important;
}

.simulator-window-container[data-theme="light"] .title-bar-btn {
    color: #475569;
}

.simulator-window-container[data-theme="light"] .title-bar-btn:hover {
    background-color: rgba(0, 0, 0, 0.06);
    color: #0f172a;
}

.simulator-window-container[data-theme="light"] .glass-panel {
    background: #e2e8f0;
    border-color: #cbd5e1;
}

.simulator-window-container[data-theme="light"] .desktop-slider-title,
.simulator-window-container[data-theme="light"] .desktop-status-row span:first-child {
    color: #334155;
}

.simulator-window-container[data-theme="light"] .desktop-slider-badge {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #334155;
    box-shadow: none;
}

.simulator-window-container[data-theme="light"] .sequence-header-title {
    color: #0f172a;
}

.simulator-window-container[data-theme="light"] .btn-seq-tool,
.simulator-window-container[data-theme="light"] .btn-seq-icon {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #334155;
}

.simulator-window-container[data-theme="light"] .btn-seq-tool:hover,
.simulator-window-container[data-theme="light"] .btn-seq-icon:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.simulator-window-container[data-theme="light"] .settings-sidebar-deck {
    background: #eaecf1;
    border-right-color: #cbd5e1;
}

.simulator-window-container[data-theme="light"] .settings-sidebar-title h2 {
    color: #0f172a;
}

.simulator-window-container[data-theme="light"] .settings-search-input {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #0f172a;
}

.simulator-window-container[data-theme="light"] .settings-nav-item {
    color: #64748b;
}

.simulator-window-container[data-theme="light"] .settings-nav-item:hover {
    background: rgba(0, 0, 0, 0.04);
    color: #0f172a;
}

.simulator-window-container[data-theme="light"] .settings-nav-item.active {
    background: rgba(56, 189, 248, 0.15);
    border-color: rgba(56, 189, 248, 0.4);
    color: #0284c7;
}

.simulator-window-container[data-theme="light"] .settings-panels-viewport {
    background: #dfe3e8;
}

.simulator-window-container[data-theme="light"] .settings-panel h2 {
    color: #0f172a !important;
}

.simulator-window-container[data-theme="light"] .settings-apply-btn {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #0f172a;
}

.simulator-window-container[data-theme="light"] .settings-apply-btn:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}

.simulator-window-container[data-theme="light"] .modal-card {
    background: #ffffff;
    border-color: #cbd5e1;
}

.simulator-window-container[data-theme="light"] .modal-header {
    background: #f1f5f9;
}

/* --- Settings Panel Light Mode Typography & Card Contrast Overrides --- */
.simulator-window-container[data-theme="light"] .settings-panel .glass-panel {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06) !important;
}

/* Override inline white titles */
.simulator-window-container[data-theme="light"] .settings-panel span[style*="#f8fafc"],
.simulator-window-container[data-theme="light"] .settings-panel span[style*="#ffffff"],
.simulator-window-container[data-theme="light"] .settings-panel strong,
.simulator-window-container[data-theme="light"] .settings-panel h2,
.simulator-window-container[data-theme="light"] .settings-panel h3 {
    color: #0f172a !important;
}

/* Override inline muted subtext / descriptions */
.simulator-window-container[data-theme="light"] .settings-panel span[style*="#94a3b8"],
.simulator-window-container[data-theme="light"] .settings-panel span[style*="#64748b"],
.simulator-window-container[data-theme="light"] .settings-panel p {
    color: #475569 !important;
}

/* Light Mode Row Dividers */
.simulator-window-container[data-theme="light"] .settings-panel div[style*="border-bottom"],
.simulator-window-container[data-theme="light"] .settings-panel div[style*="border-top"] {
    border-color: #e2e8f0 !important;
}

/* Light Mode Spinboxes & Inputs */
.simulator-window-container[data-theme="light"] .spin-input {
    color: #0f172a !important;
}
.simulator-window-container[data-theme="light"] .spin-btn {
    color: #475569 !important;
}
.simulator-window-container[data-theme="light"] .spin-btn:hover {
    background: rgba(0, 0, 0, 0.05) !important;
    color: #0f172a !important;
}
.simulator-window-container[data-theme="light"] div[style*="background: rgba(0, 0, 0, 0.4)"] {
    background: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
}

/* Light Mode Keybind Buttons */
.simulator-window-container[data-theme="light"] .btn-bind-box {
    background: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}

/* Light Mode Toggle Inactive State Contrast */
.simulator-window-container[data-theme="light"] .toggle-switch .slider {
    background-color: #cbd5e1 !important;
}
.simulator-window-container[data-theme="light"] .toggle-switch input:checked + .slider {
    background-color: #0284c7 !important;
}

/* ==========================================================================
   SIMULATOR LIGHT MODE COMPREHENSIVE CONTRAST & TYPOGRAPHY FIXES
   ========================================================================== */

/* 1. Modal Dialog Cards, Headers & Inputs */
.simulator-window-container[data-theme="light"] .modal-card {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.05) !important;
}

.simulator-window-container[data-theme="light"] .modal-header {
    background: #f8fafc !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

.simulator-window-container[data-theme="light"] .modal-header h3,
.simulator-window-container[data-theme="light"] .modal-header span {
    color: #0f172a !important;
}

.simulator-window-container[data-theme="light"] .modal-header button {
    color: #64748b !important;
}
.simulator-window-container[data-theme="light"] .modal-header button:hover {
    color: #0f172a !important;
}

/* Save Input Field */
.simulator-window-container[data-theme="light"] #inp-save-name {
    background: #f8fafc !important;
    border: 1.5px solid #cbd5e1 !important;
    color: #0f172a !important;
}
.simulator-window-container[data-theme="light"] #inp-save-name::placeholder {
    color: #94a3b8 !important;
}
.simulator-window-container[data-theme="light"] #inp-save-name:focus {
    border-color: #0284c7 !important;
    background: #ffffff !important;
}

/* Load Modal Macro File List */
.simulator-window-container[data-theme="light"] .macro-file-item {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    color: #0f172a !important;
}
.simulator-window-container[data-theme="light"] .macro-file-item span:first-child {
    color: #0f172a !important;
    font-weight: 600 !important;
}
.simulator-window-container[data-theme="light"] .macro-file-item span:last-child {
    color: #64748b !important;
}
.simulator-window-container[data-theme="light"] .macro-file-item:hover {
    background: #f1f5f9 !important;
    border-color: #0284c7 !important;
}
.simulator-window-container[data-theme="light"] .macro-file-item:hover span:first-child {
    color: #0284c7 !important;
}

/* 2. Main Deck Panels (Cards & Buttons) */
.simulator-window-container[data-theme="light"] .glass-panel {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05) !important;
}

/* Record & Play Button Labels */
.simulator-window-container[data-theme="light"] #lbl-record,
.simulator-window-container[data-theme="light"] #lbl-play {
    color: #0f172a !important;
}

.simulator-window-container[data-theme="light"] .record-btn-card:hover,
.simulator-window-container[data-theme="light"] .play-btn-card:hover {
    background: #f8fafc !important;
}

/* Sliders Header & Badges */
.simulator-window-container[data-theme="light"] .desktop-slider-title {
    color: #0f172a !important;
}
.simulator-window-container[data-theme="light"] .desktop-slider-badge {
    background: #f1f5f9 !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
    box-shadow: none !important;
}

/* 3. Status Card Labels & Active Macro Text */
.simulator-window-container[data-theme="light"] .desktop-status-row span:first-child {
    color: #475569 !important;
    font-weight: 600 !important;
}

.simulator-window-container[data-theme="light"] #status-text {
    color: #0f172a !important;
}

.simulator-window-container[data-theme="light"] #status-macro {
    color: #0284c7 !important;
    font-weight: 700 !important;
}

/* 4. Sequence Deck & Empty State View */
.simulator-window-container[data-theme="light"] .sequence-header-title {
    color: #0f172a !important;
}

.simulator-window-container[data-theme="light"] .empty-state-view {
    color: #64748b !important;
}
.simulator-window-container[data-theme="light"] .empty-state-view p {
    color: #475569 !important;
}
.simulator-window-container[data-theme="light"] .empty-state-view span,
.simulator-window-container[data-theme="light"] #hint-record {
    color: #0f172a !important;
    font-weight: 800 !important;
}

/* 5. Sequence Action Items in Light Mode */
.simulator-window-container[data-theme="light"] .action-row {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
}
.simulator-window-container[data-theme="light"] .action-row:hover {
    background: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
}
.simulator-window-container[data-theme="light"] .action-row span[style*="#f8fafc"] {
    color: #0f172a !important;
}

/* ==========================================================================
   KEYBINDS PANE LIGHT MODE CONTRAST FIXES
   ========================================================================== */

/* 1. Keybind Action Labels */
.simulator-window-container[data-theme="light"] #cat-keybinds span[style*="#cbd5e1"],
.simulator-window-container[data-theme="light"] #cat-keybinds span {
    color: #0f172a !important;
    font-weight: 600 !important;
}

/* 2. Keybind Input Box Buttons */
.simulator-window-container[data-theme="light"] .btn-bind-box {
    background: #f8fafc !important;
    border: 1.5px solid #cbd5e1 !important;
    color: #0f172a !important;
    font-weight: 700 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

.simulator-window-container[data-theme="light"] .btn-bind-box:hover {
    background: #f1f5f9 !important;
    border-color: #0284c7 !important;
    color: #0284c7 !important;
}

/* 3. Panic Stop (DELETE) Button */
.simulator-window-container[data-theme="light"] #btn-bind-panic {
    background: #fef2f2 !important;
    border: 1.5px solid #fca5a5 !important;
    color: #dc2626 !important;
}

.simulator-window-container[data-theme="light"] #btn-bind-panic:hover {
    background: #fee2e2 !important;
    border-color: #ef4444 !important;
    color: #b91c1c !important;
}

/* 4. Active Listening (Press Key...) State */
.simulator-window-container[data-theme="light"] .btn-bind-box.listening {
    background: #fffbeb !important;
    border-color: #f59e0b !important;
    color: #d97706 !important;
}

/* ==========================================================================
   GUIDES TAB DESIGN SYSTEM
   ========================================================================== */
.guide-phase-card {
    margin-bottom: 24px;
    border-color: rgba(255, 112, 166, 0.15);
}
.guide-phase-card:hover {
    border-color: rgba(255, 112, 166, 0.4);
}

.guide-step-tag {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--accent-pink);
    background: rgba(255, 112, 166, 0.14);
    border: 1px solid rgba(255, 112, 166, 0.35);
    border-radius: 4px;
    padding: 2px 8px;
    text-transform: uppercase;
}

.guide-grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}
@media (min-width: 860px) {
    .guide-grid-2 {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }
}

.guide-instruction-box {
    background: var(--bg-recessed);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.guide-box-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.guide-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}
.guide-list li {
    position: relative;
    padding-left: 18px;
}
.guide-list li::before {
    content: "•";
    position: absolute;
    left: 4px;
    color: var(--accent-pink);
    font-weight: 800;
}

.guide-list kbd {
    background: rgba(255, 112, 166, 0.15);
    border: 1px solid rgba(255, 112, 166, 0.35);
    color: var(--accent-pink);
    border-radius: 4px;
    padding: 1px 6px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
}

.guide-callout-notice {
    background: rgba(255, 112, 166, 0.08);
    border: 1px solid rgba(255, 112, 166, 0.25);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.875rem;
    color: var(--text-primary);
    line-height: 1.55;
}

.guide-path-box {
    background: #08060f;
    border: 1px solid rgba(112, 214, 255, 0.2);
    border-radius: 6px;
    padding: 8px 12px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: #70d6ff;
    display: inline-block;
}

/* ==========================================================================
   UNIFIED QUANTUM PRO TAB LAYOUT (EXPANSIVE WIDESCREEN)
   ========================================================================== */
.pricing-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
    max-width: 1080px;
    margin: 0 auto 36px auto;
}
@media (min-width: 860px) {
    .pricing-grid {
        grid-template-columns: 1fr 1.05fr;
        align-items: stretch;
    }
}

.pricing-card {
    background: #140e28;
    border: 1px solid rgba(255, 112, 166, 0.15);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease;
}
.pricing-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 112, 166, 0.35);
}

.pricing-card.pro {
    background: linear-gradient(180deg, #1c1338 0%, #100b22 100%);
    border: 1.5px solid rgba(255, 112, 166, 0.5);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(255, 112, 166, 0.2);
}
.pricing-card.pro:hover {
    border-color: #ff70a6;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7), 0 0 45px rgba(255, 112, 166, 0.35);
}

.pro-glow-badge {
    position: absolute;
    top: -11px;
    right: 24px;
    background: linear-gradient(135deg, #ff5c8d 0%, #ff70a6 50%, #70d6ff 100%);
    color: #0c0915;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 9999px;
    letter-spacing: 0.06em;
    box-shadow: 0 2px 12px rgba(255, 112, 166, 0.5);
}

.pricing-badge {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 12px;
    text-transform: uppercase;
}
.pricing-badge.free {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}
.pricing-badge.pro {
    background: rgba(255, 112, 166, 0.15);
    border: 1px solid rgba(255, 112, 166, 0.4);
    color: var(--accent-pink);
}

.pricing-title {
    font-size: 1.45rem;
    font-weight: 800;
    color: #f8fafc;
    margin-bottom: 8px;
}

.pricing-price-box {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 10px;
}
.pricing-amount {
    font-size: 2.25rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.02em;
}
.pricing-card.pro .pricing-amount {
    color: #ff70a6;
}
.pricing-term {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.pricing-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.pricing-divider {
    height: 1px;
    background: var(--border-subtle);
    margin: 20px 0;
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 0 0 28px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.pricing-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}
.pricing-features li strong {
    color: #f8fafc;
}
.pricing-features li.disabled {
    color: #5d5475;
}

.pricing-check-icon {
    width: 16px;
    height: 16px;
    color: #a79bbd;
    flex-shrink: 0;
}
.pricing-check-icon.pro {
    color: var(--accent-pink);
}

.pricing-dash-icon {
    width: 16px;
    height: 16px;
    color: #5d5475;
    flex-shrink: 0;
}

.pricing-cta-btn {
    width: 100%;
    justify-content: center;
    padding: 12px 20px;
    font-weight: 700;
    border-radius: var(--radius-md);
}
.pricing-cta-btn.pro-btn {
    background: linear-gradient(135deg, #ff5c8d 0%, #ff70a6 50%, #c084fc 100%);
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(255, 112, 166, 0.45);
}
.pricing-cta-btn.pro-btn:hover {
    box-shadow: 0 6px 26px rgba(255, 112, 166, 0.65);
    filter: brightness(1.1);
}

.activation-guide-container {
    max-width: 1080px;
    margin: 0 auto 28px auto;
    background: #140e28;
    border: 1px solid rgba(255, 112, 166, 0.25);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
}

.activation-header-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 112, 166, 0.12);
    border: 1px solid rgba(255, 112, 166, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.activation-steps-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}
@media (min-width: 768px) {
    .activation-steps-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.activation-step-item {
    background: #0d0918;
    border: 1px solid rgba(255, 112, 166, 0.12);
    border-radius: var(--radius-md);
    padding: 20px 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: all 0.2s ease;
}
.activation-step-item:hover {
    border-color: rgba(255, 112, 166, 0.4);
    background: #1c1435;
    transform: translateY(-2px);
}

.activation-step-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.activation-step-badge {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: rgba(255, 112, 166, 0.15);
    border: 1px solid rgba(255, 112, 166, 0.35);
    color: var(--accent-pink);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

.activation-step-tag {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.activation-step-content h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 6px;
}

.activation-step-content p {
    font-size: 0.825rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin: 0;
}

.key-code {
    background: rgba(255, 112, 166, 0.12);
    border: 1px solid rgba(255, 112, 166, 0.3);
    color: #ff70a6;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.pro-spotlight-card {
    max-width: 880px;
    margin: 0 auto;
    background: rgba(255, 112, 166, 0.05);
    border: 1px solid rgba(255, 112, 166, 0.25);
    border-radius: var(--radius-md);
    padding: 16px 20px;
}

/* ==========================================================================
   HIGH-END COTTON CANDY TECH FOOTER
   ========================================================================== */
.pulse-led-emerald {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #6ee7b7;
    box-shadow: 0 0 8px #6ee7b7;
    display: inline-block;
    animation: ledPulse 2s infinite;
}
.pulse-led-amber {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ffd166;
    box-shadow: 0 0 8px #ffd166;
    display: inline-block;
    animation: ledPulse 2s infinite;
}
@keyframes ledPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
}

.app-footer {
    border-top: 1px solid var(--border-card);
    background: linear-gradient(180deg, #0e0a1c 0%, #06040e 100%);
    padding: 48px 0 28px 0;
    color: var(--text-muted);
    font-size: 0.85rem;
    position: relative;
    z-index: 10;
}

.footer-top-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    margin-bottom: 36px;
}
@media (min-width: 768px) {
    .footer-top-grid {
        grid-template-columns: 1.5fr 1fr 1fr 1fr;
        gap: 24px;
    }
}

.footer-brand-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-bio-text {
    font-size: 0.825rem;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 320px;
}

.footer-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    border-radius: var(--radius-full);
    background: rgba(110, 231, 183, 0.1);
    border: 1px solid rgba(110, 231, 183, 0.3);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: #6ee7b7;
    width: fit-content;
    margin-top: 4px;
}

.footer-nav-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-col-title {
    font-size: 0.75rem;
    font-family: var(--font-mono);
    font-weight: 700;
    color: #f8fafc;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.footer-link-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-link-list a {
    color: var(--text-secondary);
    font-size: 0.825rem;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
}
.footer-link-list a:hover {
    color: var(--accent-pink);
    transform: translateX(2px);
}

.footer-ext-link svg {
    opacity: 0.6;
    transition: opacity 0.2s ease;
}
.footer-ext-link:hover svg {
    opacity: 1;
}

.footer-divider {
    height: 1px;
    background: var(--border-subtle);
    margin-bottom: 20px;
}

.footer-bottom-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    font-size: 0.775rem;
    color: var(--text-muted);
}
@media (min-width: 640px) {
    .footer-bottom-row {
        flex-direction: row;
    }
}

.footer-copyright {
    color: var(--text-muted);
}

.footer-build-tag {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: #5d5475;
}

/* ==========================================================================
   GLOBAL SIMULATOR NOTICE MODAL (HIGH-END GLASSMORPHISM OVERLAY)
   ========================================================================== */
.global-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: radial-gradient(circle at 50% 40%, rgba(20, 14, 38, 0.72) 0%, rgba(6, 4, 14, 0.88) 100%);
    backdrop-filter: blur(28px) saturate(200%);
    -webkit-backdrop-filter: blur(28px) saturate(200%);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.global-modal-backdrop.open {
    display: flex !important;
    opacity: 1 !important;
}

.disclaimer-modal-card {
    max-width: 460px;
    width: 100%;
    position: relative;
    background: linear-gradient(145deg, rgba(28, 19, 52, 0.65) 0%, rgba(13, 9, 26, 0.75) 100%);
    backdrop-filter: blur(32px) saturate(210%);
    -webkit-backdrop-filter: blur(32px) saturate(210%);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-top: 1px solid rgba(255, 255, 255, 0.35);
    border-left: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 22px;
    padding: 30px 28px;
    box-shadow: 0 35px 80px rgba(0, 0, 0, 0.85), 0 0 50px rgba(255, 112, 166, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.35), inset 0 0 24px rgba(255, 112, 166, 0.04);
    transform: scale(0.92) translateY(14px);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow: hidden;
}

/* Subtle Glass Surface Sheen */
.disclaimer-modal-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 45%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 100%);
    border-radius: 22px 22px 0 0;
    pointer-events: none;
}

.global-modal-backdrop.open .disclaimer-modal-card {
    transform: scale(1) translateY(0);
}

.disclaimer-header {
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
    z-index: 2;
}

.disclaimer-icon-box {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 112, 166, 0.18) 100%);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-top: 1px solid rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(255, 112, 166, 0.25), inset 0 1px 2px rgba(255, 255, 255, 0.5);
    flex-shrink: 0;
}

.disclaimer-title-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.disclaimer-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.015em;
    line-height: 1.2;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.disclaimer-subtitle {
    font-size: 0.72rem;
    font-family: var(--font-mono);
    color: var(--accent-pink);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-weight: 700;
}

.disclaimer-desc {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin: 0;
    position: relative;
    z-index: 2;
}

.disclaimer-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 4px;
    position: relative;
    z-index: 2;
}

/* Glassmorphic Checkbox Pill */
.custom-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    transition: opacity 0.2s ease;
}
.custom-checkbox-label:hover {
    opacity: 0.92;
}

.custom-checkbox-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
}

.custom-checkbox-box {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

.custom-checkbox-box canvas {
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.custom-checkbox-input:checked + .custom-checkbox-box {
    background: linear-gradient(135deg, rgba(255, 112, 166, 0.95) 0%, rgba(192, 132, 252, 0.95) 100%);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 16px rgba(255, 112, 166, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.5);
}

.custom-checkbox-input:checked + .custom-checkbox-box canvas {
    opacity: 1;
    transform: scale(1);
}

.custom-checkbox-label:hover .custom-checkbox-box {
    border-color: rgba(255, 112, 166, 0.8);
    transform: scale(1.06);
}

.custom-checkbox-text {
    font-size: 0.86rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.custom-checkbox-input:checked ~ .custom-checkbox-text {
    color: #f8fafc;
}

.btn-modal-confirm {
    width: 100%;
    justify-content: center;
    padding: 13px 20px;
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: 12px;
    background: linear-gradient(135deg, #ff70a6 0%, #a855f7 50%, #38bdf8 100%);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-top: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 30px rgba(255, 112, 166, 0.42), inset 0 1px 1px rgba(255, 255, 255, 0.4);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-modal-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 35px rgba(255, 112, 166, 0.65), inset 0 1px 2px rgba(255, 255, 255, 0.6);
}

/* Mobile Warning Modal Custom Aesthetics */
.mobile-warning-card {
    border-color: rgba(255, 209, 102, 0.25);
    box-shadow: 0 35px 80px rgba(0, 0, 0, 0.85), 0 0 50px rgba(255, 209, 102, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.mobile-icon-box {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 209, 102, 0.18) 100%);
    border-color: rgba(255, 209, 102, 0.35);
    box-shadow: 0 8px 24px rgba(255, 209, 102, 0.25), inset 0 1px 2px rgba(255, 255, 255, 0.5);
}

.mobile-device-callout {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(255, 209, 102, 0.08);
    border: 1px solid rgba(255, 209, 102, 0.22);
    border-radius: var(--radius-md);
    font-size: 0.78rem;
    font-family: var(--font-mono);
    color: #ffd166;
    line-height: 1.4;
    position: relative;
    z-index: 2;
}

/* ==========================================================================
   ULTRA-PREMIUM GLASSMORPHIC TOAST NOTIFICATIONS
   ========================================================================== */
#toast-container {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px 10px 12px;
    background: linear-gradient(135deg, rgba(28, 19, 52, 0.72) 0%, rgba(13, 9, 26, 0.84) 100%);
    backdrop-filter: blur(28px) saturate(220%);
    -webkit-backdrop-filter: blur(28px) saturate(220%);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-top: 1px solid rgba(255, 255, 255, 0.4);
    border-left: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: var(--radius-full);
    color: #f8fafc;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.75), 0 0 30px rgba(255, 112, 166, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.35);
    transform: translateY(16px) scale(0.95);
    opacity: 0;
    animation: toastSpringEntrance 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    position: relative;
    overflow: hidden;
}

.toast::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 46%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0) 100%);
    border-radius: var(--radius-full) var(--radius-full) 0 0;
    pointer-events: none;
}

.toast-icon-box {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 112, 166, 0.25) 0%, rgba(192, 132, 252, 0.2) 100%);
    border: 1px solid rgba(255, 112, 166, 0.4);
    border-top: 1px solid rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 12px rgba(255, 112, 166, 0.35), inset 0 1px 1px rgba(255, 255, 255, 0.5);
    flex-shrink: 0;
}

.toast-message {
    position: relative;
    z-index: 2;
    color: #ffffff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

@keyframes toastSpringEntrance {
    0% {
        opacity: 0;
        transform: translateY(16px) scale(0.95);
        filter: blur(4px);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

/* ==========================================================================
   PROCEDURAL CANVAS ICON HARD SIZING GUARD
   ========================================================================== */
canvas[data-q-icon] {
    display: inline-block !important;
    vertical-align: middle !important;
    flex-shrink: 0 !important;
}
canvas[data-q-icon][data-size="12"] { width: 12px !important; height: 12px !important; }
canvas[data-q-icon][data-size="13"] { width: 13px !important; height: 13px !important; }
canvas[data-q-icon][data-size="14"] { width: 14px !important; height: 14px !important; }
canvas[data-q-icon][data-size="15"] { width: 15px !important; height: 15px !important; }
canvas[data-q-icon][data-size="16"] { width: 16px !important; height: 16px !important; }
canvas[data-q-icon][data-size="18"] { width: 18px !important; height: 18px !important; }
canvas[data-q-icon][data-size="20"] { width: 20px !important; height: 20px !important; }
canvas[data-q-icon][data-size="22"] { width: 22px !important; height: 22px !important; }
canvas[data-q-icon][data-size="24"] { width: 24px !important; height: 24px !important; }
canvas[data-q-icon][data-size="28"] { width: 28px !important; height: 28px !important; }
canvas[data-q-icon][data-size="40"] { width: 40px !important; height: 40px !important; }

/* ==========================================================================
   19. CUSTOM ACCOUNT PORTAL & LICENSE KEY SYSTEM
   Pure Obsidian Cyberdeck / Silver Architecture (No Tacky Tinted Outlines)
   ========================================================================== */

/* Navbar Account Action Button - Matches exact 36x36 header action button */
#nav-account-btn {
    position: relative;
    overflow: hidden;
    padding: 0;
}

.nav-account-pfp-slot {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-account-pfp-quantum {
    width: 20px;
    height: 20px;
    object-fit: contain;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.45));
    transition: transform 0.2s ease;
}

#nav-account-btn:hover .nav-account-pfp-quantum {
    transform: scale(1.1);
}

.nav-account-pfp-photo {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
}

.nav-account-pfp-initial {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-family: var(--font-heading);
    font-size: 0.72rem;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #4285F4, #34A853);
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
}

#nav-account-btn.is-logged-in {
    border-color: rgba(255, 255, 255, 0.35);
    box-shadow: 0 0 14px rgba(255, 255, 255, 0.15);
}

#nav-account-btn.is-logged-in::after {
    content: '';
    position: absolute;
    top: 4px;
    right: 4px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #6ee7b7;
    box-shadow: 0 0 6px #6ee7b7;
    z-index: 2;
}

/* Pro Activation Guide Inline Button */
.btn-claim-guide-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #cbd5e1;
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-claim-guide-pill:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
    transform: translateY(-1px);
}

/* Account Modal Shell Card */
.account-modal-card {
    max-width: 580px;
    width: 100%;
    position: relative;
    background: linear-gradient(155deg, rgba(20, 14, 38, 0.96) 0%, rgba(10, 7, 20, 0.98) 100%);
    backdrop-filter: blur(36px) saturate(210%);
    -webkit-backdrop-filter: blur(36px) saturate(210%);
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-top: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 22px;
    padding: 32px 30px;
    box-shadow: 0 45px 110px rgba(0, 0, 0, 0.92), 0 0 40px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    transform: scale(0.94) translateY(14px);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow: hidden;
}

.global-modal-backdrop.open .account-modal-card {
    transform: scale(1) translateY(0);
}

/* Close Button */
.account-modal-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.15s ease;
}

.account-modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
    transform: scale(1.05);
}

/* Modal View Panels Switching */
.account-view-panel {
    display: none;
    flex-direction: column;
    gap: 18px;
    width: 100%;
}

.account-view-panel.active {
    display: flex;
}

/* Header & Typography */
.account-modal-header {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.account-brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px;
    width: fit-content;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.account-badge-text {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #cbd5e1;
}

.account-modal-title {
    font-size: 1.45rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin: 4px 0 0 0;
}

.account-modal-subtitle {
    font-size: 0.88rem;
    color: #a79bbd;
    line-height: 1.5;
    margin: 0;
}

/* Auth Navigation Tabs (Pure obsidian bar, no tacky outline-tint box) */
.account-auth-tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    border-radius: 12px;
    background: rgba(7, 5, 14, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.account-tab-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 12px;
    border-radius: 8px;
    background: transparent;
    border: 1px solid transparent;
    color: #94a3b8;
    font-family: var(--font-heading);
    font-size: 0.825rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    white-space: nowrap;
}

.account-tab-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.04);
}

.account-tab-btn.active {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* Panel Content Toggling */
.account-panel-content {
    display: none;
    flex-direction: column;
    gap: 14px;
    animation: panelFadeIn 0.2s ease-out;
}

.account-panel-content.active {
    display: flex;
}

@keyframes panelFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-step-block {
    display: none;
    flex-direction: column;
    gap: 14px;
}

.auth-step-block.active {
    display: flex;
}

/* Forms, Inputs & Labels */
.account-field-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.account-field-label {
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #cbd5e1;
}

.account-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.account-input-icon {
    position: absolute;
    left: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.account-text-input {
    width: 100%;
    height: 44px;
    padding: 0 14px 0 42px;
    border-radius: 11px;
    background: #080612;
    border: 1px solid rgba(255, 255, 255, 0.11);
    color: #ffffff;
    font-size: 0.9rem;
    font-family: var(--font-body);
    transition: all 0.18s ease;
}

.account-text-input::placeholder {
    color: #64748b;
}

.account-text-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.35);
    background: #0c0818;
    box-shadow: 0 0 18px rgba(255, 255, 255, 0.06);
}

.account-field-hint {
    font-size: 0.72rem;
    color: #64748b;
    line-height: 1.4;
}

/* Primary, Secondary & Discord Buttons */
.btn-account-primary {
    width: 100%;
    height: 44px;
    border-radius: 11px;
    background: linear-gradient(135deg, #2a1e45 0%, #3a2860 100%);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #ffffff;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.22);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
}

.btn-account-primary:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.35);
    background: linear-gradient(135deg, #322352 0%, #442f70 100%);
}

.btn-account-primary:active {
    transform: translateY(0);
}

.btn-account-secondary {
    width: 100%;
    height: 38px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.825rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.15s ease;
}

.btn-account-secondary:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.22);
    color: #ffffff;
}

.btn-account-discord {
    width: 100%;
    height: 44px;
    border-radius: 11px;
    background: linear-gradient(135deg, #1b1735 0%, #26214d 100%);
    border: 1px solid rgba(88, 101, 242, 0.4);
    color: #ffffff;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45), 0 0 20px rgba(88, 101, 242, 0.15);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-account-discord:hover {
    transform: translateY(-1px);
    border-color: #5865F2;
    background: linear-gradient(135deg, #221d42 0%, #302a5f 100%);
    box-shadow: 0 6px 24px rgba(88, 101, 242, 0.35);
}

.account-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 4px 0;
}

.account-divider::before,
.account-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.account-divider span {
    padding: 0 10px;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: #64748b;
    letter-spacing: 0.06em;
}

/* ==========================================================================
   GOOGLE AUTHENTICATION CARD & ACCOUNT CHOOSER
   ========================================================================== */
.google-auth-card {
    background: #080612;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 22px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.google-auth-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.google-auth-titles {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.google-auth-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #ffffff;
}

.google-auth-sub {
    font-size: 0.78rem;
    color: #94a3b8;
}

/* Origin Warning for file:/// protocol */
.google-origin-warning {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 12px;
    font-size: 0.76rem;
    line-height: 1.45;
    color: #fbbf24;
    animation: panelFadeIn 0.2s ease-out;
}

.google-origin-warning code {
    background: rgba(0, 0, 0, 0.4);
    padding: 1px 5px;
    border-radius: 4px;
    color: #fef08a;
    font-family: var(--font-mono);
}

/* Real Google Action Button */
.btn-google-real-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    height: 48px;
    padding: 0 18px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-top: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 12px;
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-google-real-action:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.06) 100%);
    border-color: rgba(255, 255, 255, 0.35);
    border-top-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 15px rgba(255, 255, 255, 0.08);
}

.btn-google-real-text {
    flex: 1;
    text-align: left;
    letter-spacing: -0.01em;
}

.google-official-btn-container {
    display: flex;
    justify-content: center;
}

.account-panel-divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: #64748b;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    margin: 4px 0;
}

.account-panel-divider::before,
.account-panel-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.account-panel-divider span {
    padding: 0 10px;
}

.google-accounts-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.google-account-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    text-align: left;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
    width: 100%;
}

.google-account-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.22);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.google-avatar-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.google-avatar-other {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.google-avatar-quantum {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.04);
    transition: all 0.2s ease;
}

.google-account-item:hover .google-avatar-quantum {
    border-color: rgba(255, 255, 255, 0.35);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.18);
    transform: scale(1.05);
}

.google-account-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.google-account-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: #ffffff;
}

.google-account-email {
    font-size: 0.76rem;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.google-signedin-pill {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    color: #6ee7b7;
    background: rgba(110, 231, 183, 0.12);
    border: 1px solid rgba(110, 231, 183, 0.28);
    border-radius: 9999px;
    padding: 2px 8px;
    text-transform: uppercase;
}

.google-custom-input-box {
    padding-top: 10px;
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
    animation: panelFadeIn 0.2s ease-out;
}

.google-custom-btn-row {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.btn-account-cancel {
    height: 44px;
    padding: 0 16px;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #cbd5e1;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-account-cancel:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.google-footer-disclaimer {
    font-size: 0.72rem;
    color: #64748b;
    line-height: 1.45;
}

/* ==========================================================================
   DISCORD OAUTH AUTHORIZATION SCREEN CARD (Obsidian Silver Cyberdeck)
   ========================================================================== */
.discord-oauth-card {
    background: #06040c;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 24px 22px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65);
}

.discord-app-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 6px 0;
}

.discord-app-avatar-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #0d0a18;
    border: 1px solid rgba(255, 255, 255, 0.14);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.discord-app-avatar-box.discord-target-box {
    background: #0d0a18;
    border-color: rgba(255, 255, 255, 0.18);
}

.discord-app-connection {
    display: flex;
    align-items: center;
    gap: 6px;
}

.discord-link-line {
    width: 22px;
    height: 2px;
    background: rgba(255, 255, 255, 0.14);
}

.discord-center-badge {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #0f0b1c;
    border: 1px solid rgba(255, 255, 255, 0.16);
    display: flex;
    align-items: center;
    justify-content: center;
}

.discord-app-titles {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.discord-app-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.discord-app-name {
    font-size: 1.15rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.01em;
}

.discord-verified-tag {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 700;
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 4px;
    padding: 1px 6px;
    letter-spacing: 0.06em;
}

.discord-req-subtitle {
    font-size: 0.825rem;
    color: #94a3b8;
    margin: 0;
}

.discord-permissions-box {
    background: #040208;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.discord-perm-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.discord-perm-check {
    color: #22c55e;
    font-size: 0.8rem;
    font-weight: bold;
    margin-top: 1px;
}

.discord-perm-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.discord-perm-text strong {
    font-size: 0.8rem;
    color: #f1f5f9;
    font-weight: 600;
}

.discord-perm-text span {
    font-size: 0.72rem;
    color: #64748b;
}

.discord-user-card {
    background: #040208;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 12px 14px;
}

.discord-user-info-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.discord-user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #110d22;
    border: 1px solid rgba(255, 255, 255, 0.14);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.discord-user-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.discord-tag-input {
    height: 34px;
    font-size: 0.82rem;
    background: #07050e;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    color: #f8fafc;
    font-family: var(--font-mono);
    padding: 0 10px;
}

.discord-tag-input:focus {
    border-color: rgba(255, 255, 255, 0.35);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.08);
}

.discord-signed-in-label {
    font-size: 0.68rem;
    color: #94a3b8;
}

.discord-actions-row {
    display: flex;
    gap: 10px;
    margin-top: 4px;
}

.btn-discord-cancel {
    flex: 1;
    height: 42px;
    border-radius: 10px;
    background: #0a0714;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-discord-cancel:hover {
    background: #130f24;
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.btn-discord-authorize {
    flex: 2;
    height: 42px;
    border-radius: 10px;
    background: linear-gradient(135deg, #1b152d 0%, #291f42 100%);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-discord-authorize:hover {
    background: linear-gradient(135deg, #241c3c 0%, #342754 100%);
    border-color: rgba(255, 255, 255, 0.35);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.7);
}

.btn-discord-authorize:active {
    transform: translateY(0);
}

.discord-ext-link-wrap {
    text-align: center;
    margin-top: 2px;
}

.discord-external-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.74rem;
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.15s ease;
}

.discord-external-link:hover {
    color: #70d6ff;
    text-decoration: underline;
}

/* Itch.io Claim Banner */
.claim-notice-banner {
    background: #080612;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 4px;
}

.claim-notice-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #ffffff;
}

.claim-notice-desc {
    font-size: 0.78rem;
    color: #94a3b8;
    line-height: 1.5;
    margin: 0;
}

/* OTP Code Input Boxes */
.otp-instruction-box {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: center;
    margin-bottom: 4px;
}

.otp-sent-text {
    font-size: 0.825rem;
    color: #94a3b8;
}

.otp-email-highlight {
    font-family: var(--font-mono);
    font-size: 0.88rem;
    font-weight: 700;
    color: #ffffff;
}

.otp-input-row {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 10px 0 6px 0;
}

.otp-digit-input {
    width: 46px;
    height: 52px;
    border-radius: 11px;
    background: #080612;
    border: 1px solid rgba(255, 255, 255, 0.15);
    font-family: var(--font-mono);
    font-size: 1.4rem;
    font-weight: 800;
    color: #ffffff;
    text-align: center;
    transition: all 0.15s ease;
}

.otp-digit-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.5);
    background: #0c0818;
    box-shadow: 0 0 16px rgba(255, 255, 255, 0.12);
}

.otp-quick-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 6px;
}

.btn-otp-text {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 0.76rem;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.15s ease;
}

.btn-otp-text:hover {
    color: #ffffff;
}

/* ==========================================================================
   CUSTOMER DASHBOARD VIEW (AUTHENTICATED)
   ========================================================================== */

/* User Header Profile Bar */
.dashboard-user-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-radius: 14px;
    background: #080612;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.dashboard-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dashboard-avatar-box {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
}

.dashboard-pfp-quantum-wrap {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.12) 0%, rgba(8, 11, 18, 0.8) 100%);
}

.dashboard-pfp-quantum-img {
    width: 26px;
    height: 26px;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.4));
    animation: quantumPfpGlow 3s ease-in-out infinite alternate;
}

@keyframes quantumPfpGlow {
    0% { filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.25)); }
    100% { filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.55)); }
}

.dashboard-pfp-photo {
    width: 100%;
    height: 100%;
    border-radius: 9px;
    object-fit: cover;
    display: block;
}

.dashboard-pfp-initial {
    width: 100%;
    height: 100%;
    border-radius: 9px;
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 800;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.dashboard-pfp-discord {
    width: 100%;
    height: 100%;
    background: #5865F2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dashboard-user-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.dashboard-user-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dashboard-user-id {
    font-family: var(--font-mono);
    font-size: 0.88rem;
    font-weight: 700;
    color: #ffffff;
}

.badge-pro-tier {
    font-family: var(--font-heading);
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    padding: 2px 7px;
    border-radius: 4px;
    background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 45%, #94a3b8 100%);
    color: #05070e;
    text-transform: uppercase;
    line-height: 1.2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 14px rgba(255, 255, 255, 0.35);
    user-select: none;
}

.dashboard-user-meta {
    font-size: 0.72rem;
    color: #64748b;
}

.btn-account-logout {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 11px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.09);
    color: #94a3b8;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-account-logout:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.22);
    color: #ffffff;
}

/* License Key Display Card (Dark obsidian surface with micro-borders) */
.license-display-card {
    background: #070510;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5);
}

.license-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.license-card-title-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.license-icon-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #cbd5e1;
}

.license-tier-title {
    font-family: var(--font-heading);
    font-size: 0.88rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #ffffff;
}

.license-telemetry-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    padding: 0;
    user-select: none;
}

.telemetry-beacon {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981, 0 0 16px rgba(16, 185, 129, 0.5);
    flex-shrink: 0;
    animation: telemetryPulse 2.4s ease-in-out infinite alternate;
}

@keyframes telemetryPulse {
    0% { opacity: 0.75; transform: scale(0.95); }
    100% { opacity: 1; transform: scale(1.15); box-shadow: 0 0 12px #10b981, 0 0 22px rgba(16, 185, 129, 0.7); }
}

.telemetry-status-text {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: #f8fafc;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.telemetry-slash {
    color: rgba(255, 255, 255, 0.25);
    font-weight: 400;
    margin: 0 3px;
}

/* Unbound / Ready state */
.license-telemetry-status.status-unbound .telemetry-beacon {
    background: #f59e0b;
    box-shadow: 0 0 8px #f59e0b, 0 0 16px rgba(245, 158, 11, 0.5);
    animation-name: telemetryPulseAmber;
}

@keyframes telemetryPulseAmber {
    0% { opacity: 0.75; transform: scale(0.95); }
    100% { opacity: 1; transform: scale(1.15); box-shadow: 0 0 12px #f59e0b, 0 0 22px rgba(245, 158, 11, 0.7); }
}

/* License Key Box */
.license-key-box {
    background: #030206;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.license-key-field {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.license-key-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    color: #64748b;
    font-weight: 700;
}

.license-key-value-wrap {
    display: flex;
    align-items: center;
}

.license-key-string {
    font-family: var(--font-mono);
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #f8fafc;
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.15);
}

.license-key-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-key-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #cbd5e1;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}

.btn-key-action:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.28);
    color: #ffffff;
}

.btn-copy-key {
    background: linear-gradient(135deg, #2b1d45 0%, #3a275e 100%);
    border-color: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.btn-copy-key:hover {
    border-color: rgba(255, 255, 255, 0.45);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
}

/* HWID Telemetry Specs */
.license-hwid-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.hwid-specs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

@media (max-width: 640px) {
    .hwid-specs-grid {
        grid-template-columns: 1fr;
    }
}

.hwid-spec-item {
    background: #030206;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 9px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.hwid-spec-label {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hwid-spec-value {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 700;
    color: #e2d9f3;
}

/* HWID Reset Action Bar */
.license-hwid-reset-row {
    background: #040208;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 2px;
}

@media (max-width: 600px) {
    .license-hwid-reset-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .btn-hwid-reset {
        width: 100%;
        justify-content: center;
    }
}

.hwid-reset-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.hwid-reset-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: #f1f5f9;
    letter-spacing: 0.01em;
}

.hwid-reset-subtext {
    font-size: 0.72rem;
    color: #94a3b8;
}

.btn-hwid-reset {
    height: 34px;
    padding: 0 14px;
    background: #0e0a1b;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 7px;
    color: #e2e8f0;
    font-family: var(--font-heading);
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    transition: all 0.16s ease;
}

.btn-hwid-reset:hover:not(:disabled) {
    background: #17112c;
    border-color: rgba(255, 255, 255, 0.28);
    color: #ffffff;
    transform: translateY(-1px);
}

.btn-hwid-reset:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    background: #080610;
    border-color: rgba(255, 255, 255, 0.06);
    color: #64748b;
}

/* Secondary Dashboard Grid */
.dashboard-secondary-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (max-width: 540px) {
    .dashboard-secondary-grid {
        grid-template-columns: 1fr;
    }
}

.secondary-panel-card {
    background: #080612;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.secondary-panel-title {
    font-size: 0.86rem;
    font-weight: 700;
    color: #ffffff;
}

.secondary-panel-desc {
    font-size: 0.74rem;
    color: #94a3b8;
    line-height: 1.4;
    margin: 0;
}

.secondary-inline-form {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.secondary-input {
    height: 34px !important;
    padding: 0 10px !important;
    font-size: 0.8rem !important;
}

.btn-account-inline {
    height: 34px;
    padding: 0 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.btn-account-inline:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.3);
}

.secondary-download-actions {
    margin-top: 4px;
}

.claim-feedback-msg {
    font-size: 0.74rem;
    line-height: 1.35;
    margin-top: 6px;
    font-weight: 500;
}

.claim-feedback-msg.success {
    color: #34d399;
}

.claim-feedback-msg.error {
    color: #f87171;
}



