/* ==============================================================
   LUMOSITY COGNITIVE SUITE — CREATIVE UI/UX DESIGN SYSTEM
   4 Bespoke Directions:
   1. Neural Luminescence (Cyber-Synapse Dark HUD)
   2. Nordic Neuro-Minimal (Swiss Clinical Clean Light)
   3. Tactile Neomorphic Atelier (Physical Hardware Workbench)
   4. Editorial Monolith (High-Fashion Architectural Journal)
   ============================================================== */

/* Base Global Reset & Variables */
:root,
[data-theme="tactile"] {
    --bg-dark: #15171c;
    --bg-sidebar: #191c23;
    --bg-card: #1c2028;
    --bg-card-hover: #222731;
    --border-subtle: #2a303d;
    --border-hover: #ff8c00;
    --text-primary: #edf0f5;
    --text-secondary: #9da6b8;
    --text-muted: #6a7487;

    --brand-primary: #ff8c00;
    --brand-glow: rgba(255, 140, 0, 0.35);
    --brand-orange: #ff9f1c;
    --brand-orange-glow: rgba(255, 159, 28, 0.35);
    --brand-accent: #e05e00;

    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Cabinet Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --font-serif: "Georgia", serif;

    --card-radius: 12px;
    --card-shadow: 6px 6px 16px rgba(0, 0, 0, 0.45), inset 1px 1px 1px rgba(255, 255, 255, 0.06), inset -1px -1px 2px rgba(0, 0, 0, 0.35);
    --hero-gradient: linear-gradient(135deg, #181b22, #121419);
}

[data-theme="nordic"] {
    --bg-dark: #f8fafc;
    --bg-sidebar: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --border-subtle: #e2e8f0;
    --border-hover: #2563eb;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;

    --brand-primary: #2563eb;
    --brand-glow: rgba(37, 99, 235, 0.2);
    --brand-orange: #ea580c;
    --brand-orange-glow: rgba(234, 88, 12, 0.25);
    --brand-accent: #0f172a;

    --font-sans: 'Work Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Outfit', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --font-serif: "Georgia", serif;

    --card-radius: 10px;
    --card-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
    --hero-gradient: linear-gradient(135deg, #ffffff, #f8fafc);
}

[data-theme="neural"] {
    --bg-dark: #07090e;
    --bg-sidebar: #0b0e14;
    --bg-card: rgba(14, 18, 28, 0.75);
    --bg-card-hover: rgba(22, 28, 44, 0.9);
    --border-subtle: rgba(0, 240, 255, 0.12);
    --border-hover: rgba(0, 240, 255, 0.4);
    --text-primary: #f0f4f8;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --brand-primary: #00f0ff;
    --brand-glow: rgba(0, 240, 255, 0.3);
    --brand-orange: #ff5722;
    --brand-orange-glow: rgba(255, 87, 34, 0.35);
    --brand-accent: #7000ff;

    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Syne', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --font-serif: "Georgia", serif;

    --card-radius: 16px;
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    --hero-gradient: linear-gradient(135deg, rgba(16, 22, 36, 0.8), rgba(9, 12, 20, 0.95));
}

[data-theme="editorial"] {
    --bg-dark: #0c0b0a;
    --bg-sidebar: #100f0d;
    --bg-card: #141310;
    --bg-card-hover: #1b1915;
    --border-subtle: rgba(197, 160, 89, 0.2);
    --border-hover: #c5a059;
    --text-primary: #f6f3eb;
    --text-secondary: #a39e93;
    --text-muted: #736e65;

    --brand-primary: #c5a059;
    --brand-glow: rgba(197, 160, 89, 0.3);
    --brand-orange: #c5a059;
    --brand-orange-glow: rgba(197, 160, 89, 0.3);
    --brand-accent: #dfba73;

    --font-sans: 'Plus Jakarta Sans', sans-serif;
    --font-display: 'Playfair Display', Georgia, serif;
    --font-mono: 'Space Grotesk', monospace;
    --font-serif: 'Playfair Display', Georgia, serif;

    --card-radius: 4px;
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    --hero-gradient: linear-gradient(135deg, #11100d, #090907);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.5;
    overflow-x: hidden;
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* App Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Left Navigation Sidebar */
.app-sidebar {
    width: 250px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 40;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.brand-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 8px 30px 8px;
}

.brand-logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-orange));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow: 0 4px 14px var(--brand-glow);
}

.brand-title {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-primary);
    text-transform: lowercase;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-grow: 1;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    background: transparent;
    color: var(--text-secondary);
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-icon-badge {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: var(--text-secondary);
}

.nav-link:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.05);
}

.nav-link:hover .nav-icon-badge {
    color: var(--brand-primary);
    background: rgba(255, 255, 255, 0.08);
}

.nav-link.active {
    background-color: var(--bg-card-hover);
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.nav-link.active .nav-icon-badge {
    background: var(--brand-primary);
    color: #07090e;
    box-shadow: 0 2px 8px var(--brand-glow);
}

.sidebar-footer {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 18px;
    border-top: 1px solid var(--border-subtle);
}

.sidebar-prototype-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s;
}

.sidebar-prototype-link:hover {
    color: var(--brand-primary);
    border-color: var(--brand-primary);
    background: rgba(255, 255, 255, 0.06);
}

.prototype-icon-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brand-primary);
    box-shadow: 0 0 8px var(--brand-glow);
}

.sound-toggle-btn {
    padding: 10px 14px;
    border-radius: 8px;
    background: transparent;
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: 0.2s;
}

.sound-toggle-btn:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
    background: rgba(255, 255, 255, 0.04);
}

/* Main Wrapper & Top Navbar */
.main-wrapper {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.top-navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 36px;
    border-bottom: 1px solid var(--border-subtle);
    background-color: var(--bg-sidebar);
    backdrop-filter: blur(14px);
    position: sticky;
    top: 0;
    z-index: 30;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.search-container {
    position: relative;
    width: 380px;
}

.search-input {
    width: 100%;
    background-color: var(--bg-card);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    padding: 11px 16px 11px 42px;
    border-radius: 999px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 12px var(--brand-glow);
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    pointer-events: none;
}

.user-status-group {
    display: flex;
    align-items: center;
    gap: 16px;
}

.status-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: var(--bg-card);
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid var(--border-subtle);
    font-size: 13px;
    font-weight: 700;
}

.pill-svg-badge {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.streak-badge {
    background: rgba(255, 87, 34, 0.18);
    color: var(--brand-orange);
}

.bpi-badge {
    background: rgba(0, 240, 255, 0.18);
    color: var(--brand-primary);
}

.pill-number {
    font-family: var(--font-mono);
    color: var(--text-primary);
}

.pill-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.user-profile-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-orange));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 800;
    color: #ffffff;
    box-shadow: 0 2px 10px var(--brand-glow);
}

.user-name {
    font-weight: 700;
    font-size: 14px;
    color: var(--text-primary);
}

/* Page Content Body */
.content-body {
    padding: 36px 40px 100px 40px;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}

.section-header-block {
    margin-bottom: 28px;
}

.header-intro-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 20px;
    gap: 20px;
    flex-wrap: wrap;
}

.page-title {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.page-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    max-width: 600px;
}

.bpi-quick-telemetry {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    padding: 8px 16px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.telemetry-label {
    font-size: 12px;
    color: var(--text-muted);
}

.telemetry-bpi {
    font-family: var(--font-mono);
    font-weight: 800;
    color: var(--brand-primary);
}

.category-nav-bar {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
}

.category-nav-bar::-webkit-scrollbar {
    display: none;
}

.cat-tab {
    padding: 8px 18px;
    border-radius: 999px;
    background-color: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.cat-tab:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
}

.cat-tab.active {
    background-color: var(--brand-primary);
    color: #07090e;
    border-color: var(--brand-primary);
    box-shadow: 0 4px 14px var(--brand-glow);
}

.category-section-title {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    margin: 32px 0 18px 0;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.badge-count {
    font-size: 12px;
    font-family: var(--font-mono);
    color: var(--text-muted);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    padding: 2px 10px;
    border-radius: 999px;
}

/* ==============================================================
   ASYMMETRIC BENTO GRID
   ============================================================== */
.asymmetric-bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.bento-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--card-radius);
    padding: 24px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(12px);
    box-shadow: var(--card-shadow);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.bento-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: 0 16px 36px var(--brand-glow);
    background-color: var(--bg-card-hover);
}

/* Featured Hero Bento Card (Span 2 Columns) */
.bento-hero-span {
    grid-column: span 2;
    background: var(--hero-gradient);
    min-height: 290px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 24px;
}

.bento-hero-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
    z-index: 2;
}

.bento-badge-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.badge-featured-live {
    background: rgba(0, 240, 255, 0.12);
    color: var(--brand-primary);
    border: 1px solid var(--border-subtle);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
    letter-spacing: 0.5px;
}

.badge-cat-pill {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bento-hero-title {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.bento-hero-sub {
    font-size: 12px;
    font-weight: 700;
    color: var(--brand-orange);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.bento-hero-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    max-width: 480px;
}

.bento-hero-telemetry {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border-subtle);
}

.telemetry-stat {
    display: flex;
    flex-direction: column;
}

.stat-name {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-number {
    font-family: var(--font-mono);
    font-size: 15px;
    font-weight: 800;
    color: var(--text-primary);
}

.telemetry-cta {
    margin-left: auto;
}

.bento-launch-btn {
    background: var(--brand-primary);
    color: #07090e;
    font-weight: 800;
    font-size: 13px;
    padding: 10px 20px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 14px var(--brand-glow);
    transition: transform 0.2s;
}

.bento-hero-span:hover .bento-launch-btn {
    transform: scale(1.04);
}

.bento-hero-art {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 220px;
    flex-shrink: 0;
}

.art-svg-wrapper {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-primary);
    transition: transform 0.3s ease;
}

.bento-hero-span:hover .art-svg-wrapper {
    transform: scale(1.08) rotate(4deg);
    border-color: var(--brand-primary);
}

.art-ambient-glow {
    position: absolute;
    width: 100px;
    height: 100px;
    background: var(--brand-glow);
    filter: blur(40px);
    border-radius: 50%;
    z-index: 1;
    pointer-events: none;
}

/* Medium & Compact Bento Cards */
.bento-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.stat-pill-sm {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
}

.bento-card-center-art {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-primary);
    margin-bottom: 16px;
    transition: transform 0.3s;
}

.bento-card:hover .bento-card-center-art {
    transform: scale(1.1);
}

.game-svg-art {
    width: 60px;
    height: 60px;
}

.bento-title {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.bento-sub {
    font-size: 11px;
    font-weight: 700;
    color: var(--brand-orange);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.bento-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.45;
    margin-bottom: 18px;
}

.bento-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid var(--border-subtle);
}

.train-prompt {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}

.bento-action-circle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--brand-primary);
    color: #07090e;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px var(--brand-glow);
    transition: transform 0.2s;
}

.bento-card:hover .bento-action-circle {
    transform: scale(1.12);
}

/* ==============================================================
   PERSISTENT FLOATING THEME SWITCHER BAR
   ============================================================== */
.floating-theme-bar {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(14, 18, 28, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(16px);
    border-radius: 999px;
    padding: 6px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 95;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}

.theme-bar-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.theme-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brand-primary);
    box-shadow: 0 0 10px var(--brand-glow);
}

.theme-bar-options {
    display: flex;
    align-items: center;
    gap: 6px;
}

.theme-pill-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.theme-pill-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.theme-pill-btn.active {
    background: #ffffff;
    color: #07090e;
    border-color: #ffffff;
    box-shadow: 0 2px 10px rgba(255, 255, 255, 0.25);
}

.theme-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

/* ==============================================================
   TODAY DAILY WORKOUT VIEW
   ============================================================== */
.today-workout-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 22px;
}

.today-workout-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--card-radius);
    padding: 24px;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: all 0.25s;
    cursor: pointer;
}

.today-workout-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: var(--card-shadow);
}

.workout-step-indicator {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 16px;
}

.step-num {
    font-family: var(--font-mono);
    font-size: 24px;
    font-weight: 800;
    color: var(--brand-primary);
}

.step-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 700;
    letter-spacing: 0.5px;
}

.workout-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.workout-duration-tag {
    font-size: 11px;
    font-family: var(--font-mono);
    color: var(--text-muted);
}

.workout-art-thumb {
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-primary);
    margin-bottom: 16px;
}

.workout-game-title {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.workout-game-sub {
    font-size: 11px;
    font-weight: 700;
    color: var(--brand-orange);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.workout-game-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.45;
    margin-bottom: 22px;
    flex-grow: 1;
}

.workout-start-btn {
    background: var(--brand-primary);
    color: #07090e;
    border: none;
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 4px 12px var(--brand-glow);
    transition: transform 0.2s;
}

.workout-start-btn:hover {
    transform: scale(1.03);
}

.workout-progress-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
}

.chip-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brand-orange);
}

/* ==============================================================
   MY BRAIN ANALYTICS & 3D TOPOLOGY VIEW
   ============================================================== */
.my-brain-wrapper {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.bpi-score-card {
    background: var(--hero-gradient);
    border: 1px solid var(--border-subtle);
    border-radius: var(--card-radius);
    padding: 32px 36px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--card-shadow);
    gap: 24px;
    flex-wrap: wrap;
}

.bpi-primary-val {
    font-family: var(--font-display);
    font-size: 56px;
    font-weight: 900;
    line-height: 1;
    color: var(--text-primary);
    margin-bottom: 6px;
    letter-spacing: -1px;
}

.bpi-primary-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 8px;
}

.bpi-percentile-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(0, 240, 255, 0.12);
    color: var(--brand-primary);
    border: 1px solid var(--border-subtle);
    font-size: 11px;
    font-weight: 700;
}

.bpi-metrics-stats {
    display: flex;
    gap: 36px;
}

.metric-number-highlight {
    font-family: var(--font-mono);
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 4px;
}

.streak-accent {
    color: var(--brand-orange);
}

.session-accent {
    color: var(--brand-primary);
}

.metric-label {
    font-size: 12px;
    color: var(--text-muted);
}

.category-bars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.cat-bar-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 16px 20px;
}

.cat-bar-header {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 8px;
}

.cat-bar-score {
    font-family: var(--font-mono);
}

.cat-bar-track {
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 999px;
    overflow: hidden;
}

.cat-bar-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Three.js 3D Brain Stage */
.brain-3d-card {
    background: var(--hero-gradient);
    border: 1px solid var(--border-subtle);
    border-radius: var(--card-radius);
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    box-shadow: var(--card-shadow);
}

.cortex-telemetry-header {
    font-size: 13px;
    color: var(--text-secondary);
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.live-webgl-badge,
.nodes-online-tag {
    font-size: 11px;
    background: rgba(0, 240, 255, 0.15);
    color: var(--brand-primary);
    padding: 3px 10px;
    border-radius: 999px;
    font-family: var(--font-mono);
    font-weight: 700;
}

.brain-3d-canvas-wrapper {
    width: 100%;
    height: 340px;
    border-radius: 12px;
    overflow: hidden;
    cursor: grab;
}

.brain-node-legend {
    display: flex;
    gap: 16px;
    margin-top: 16px;
    flex-wrap: wrap;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}

/* History Table */
.history-table-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--card-radius);
    overflow: hidden;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 13px;
}

.history-table th {
    background: rgba(0, 0, 0, 0.2);
    padding: 14px 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-subtle);
}

.history-table td {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-primary);
}

.history-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.empty-history-state,
.empty-search-state {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
    .asymmetric-bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .bento-hero-span {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }
    .app-sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    .asymmetric-bento-grid {
        grid-template-columns: 1fr;
    }
    .bento-hero-span {
        grid-column: span 1;
        flex-direction: column;
    }
    .bento-hero-art {
        width: 100%;
    }
    .top-navbar {
        padding: 14px 18px;
        flex-wrap: wrap;
        gap: 12px;
    }
    .search-container {
        width: 100%;
    }
    .content-body {
        padding: 20px 16px 120px 16px;
    }
    .floating-theme-bar {
        width: 90%;
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* ==============================================================
   GAME MODAL / ACTIVE GAME OVERLAY
   ============================================================== */
.game-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(10, 11, 14, 0.94);
    backdrop-filter: blur(14px);
    z-index: 100;
    display: none;
    flex-direction: column;
    overflow-y: auto;
}

.game-modal-overlay.active {
    display: flex;
}

.game-modal-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 28px;
    border-bottom: 1px solid var(--border-subtle);
    background-color: rgba(18, 19, 22, 0.8);
    position: sticky;
    top: 0;
    z-index: 20;
}

.modal-game-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.modal-game-name {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
}

.modal-cat-tag {
    background: rgba(255, 122, 48, 0.15);
    color: var(--brand-orange);
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
}

.modal-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-icon-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-icon-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--text-muted);
}

.game-render-stage {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

/* ==============================================================
   SCHULTE TABLE STYLING (MATCHING IMAGE 2)
   ============================================================== */
.schulte-game-wrapper {
    display: flex;
    width: 100%;
    max-width: 980px;
    background-color: #14161a;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    min-height: 560px;
}

.schulte-sidebar {
    width: 250px;
    background-color: #111317;
    border-right: 1px solid var(--border-subtle);
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
}

.schulte-brand h2 {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
}

.schulte-sub {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 28px;
}

.schulte-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.schulte-grid-sizes {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
}

.grid-size-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    padding: 8px 12px;
    text-align: left;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: 0.15s;
}

.grid-size-btn:hover {
    color: #fff;
    background-color: var(--bg-card);
}

.grid-size-btn.active {
    color: #fff;
    border-color: #3b82f6;
    background-color: rgba(59, 130, 246, 0.12);
}

.schulte-options {
    margin-bottom: 24px;
}

.schulte-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1.4;
}

.schulte-stats {
    border-top: 1px solid var(--border-subtle);
    padding-top: 20px;
    margin-top: auto;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.schulte-stat-item {
    display: flex;
    flex-direction: column;
}

.stat-name {
    font-size: 12px;
    color: var(--text-muted);
}

.stat-val {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
}

.schulte-restart-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    padding: 10px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: 0.2s;
}

.schulte-restart-btn:hover {
    background: var(--bg-card-hover);
    color: #fff;
}

.schulte-main-area {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    position: relative;
}

.schulte-hud {
    width: 360px;
    max-width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    font-size: 14px;
}

.schulte-next-badge {
    color: var(--text-secondary);
}

.highlight-next {
    font-weight: 700;
    color: #ffffff;
    font-size: 16px;
}

.schulte-timer-display {
    font-family: monospace;
    font-size: 16px;
    color: var(--text-secondary);
}

.schulte-board-container {
    position: relative;
    width: 380px;
    height: 380px;
    max-width: 85vw;
    max-height: 85vw;
}

.schulte-board {
    display: grid;
    grid-template-columns: repeat(var(--grid-dim, 5), 1fr);
    grid-template-rows: repeat(var(--grid-dim, 5), 1fr);
    width: 100%;
    height: 100%;
    border: 1px solid #374151;
    background-color: #1a1d24;
}

.schulte-cell {
    background: transparent;
    border: 1px solid #2a2e38;
    color: #f3f4f6;
    font-size: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    transition: background 0.1s, transform 0.05s;
}

.schulte-cell:hover {
    background-color: rgba(255, 255, 255, 0.04);
}

.schulte-cell:active {
    transform: scale(0.96);
}

.schulte-cell.cell-correct {
    background-color: rgba(16, 185, 129, 0.28);
    color: #34d399;
}

.schulte-cell.cell-wrong {
    background-color: rgba(239, 68, 68, 0.35);
    color: #f87171;
    animation: shake 0.25s ease-in-out;
}

.schulte-center-point {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background-color: #ef4444;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    display: none;
    box-shadow: 0 0 10px #ef4444;
}

.schulte-center-point.visible {
    display: block;
}

.schulte-instruction {
    margin-top: 18px;
    font-size: 13px;
    color: var(--text-muted);
}

.schulte-actions {
    margin-top: 14px;
}

.schulte-btn-primary {
    background-color: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.15s;
    text-decoration: underline;
}

.schulte-btn-primary:hover {
    color: #ffffff;
}

/* Schulte Completion Card */
.schulte-finish-card {
    grid-column: 1 / -1;
    grid-row: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #181b22;
    padding: 24px;
    text-align: center;
}

.finish-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.finish-time {
    font-size: 38px;
    font-weight: 800;
    color: #38bdf8;
    margin: 8px 0;
}

.finish-stat {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 14px;
}

.new-record-pill {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.4);
    padding: 4px 14px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 16px;
}

/* ==============================================================
   FORMULA GAME STYLING
   ============================================================== */
.formula-game-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.formula-header-hud {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

.hud-pill {
    background-color: var(--bg-card);
    border: 1px solid var(--border-subtle);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.highlight-stat {
    color: var(--brand-orange);
}

.tech-pill {
    background: rgba(0, 229, 255, 0.12);
    border-color: rgba(0, 229, 255, 0.4);
    color: #00e5ff;
}

.formula-badge-3d {
    background: linear-gradient(135deg, #00e5ff, #3b82f6);
    color: #0f172a;
    font-size: 11px;
    font-weight: 800;
    padding: 3px 12px;
    border-radius: var(--radius-full);
    display: inline-block;
    letter-spacing: 1px;
    margin-bottom: 12px;
    box-shadow: 0 0 14px rgba(0, 229, 255, 0.4);
}

.formula-canvas-container {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 2px solid var(--border-subtle);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6);
    background-color: #121316;
}

#formula-canvas {
    display: block;
    max-width: 100%;
    height: auto;
}

.formula-touch-controls {
    position: absolute;
    bottom: 20px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-around;
    padding: 0 20px;
    pointer-events: none;
}

.touch-btn {
    pointer-events: auto;
    background: rgba(27, 30, 35, 0.75);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    padding: 14px 24px;
    border-radius: var(--radius-full);
    cursor: pointer;
    touch-action: manipulation;
    user-select: none;
}

.touch-btn.boost {
    background: rgba(255, 122, 48, 0.85);
    color: #fff;
    font-size: 14px;
}

.formula-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(14, 15, 18, 0.92);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 10;
}

.formula-modal-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    text-align: center;
    max-width: 380px;
    width: 100%;
}

.formula-title {
    font-size: 24px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 6px;
}

.formula-sub {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.formula-guide {
    background-color: #121316;
    border-radius: var(--radius-md);
    padding: 16px;
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: left;
    margin-bottom: 24px;
}

.key-badge {
    background: #252830;
    color: #fff;
    padding: 2px 7px;
    border-radius: 4px;
    font-family: monospace;
    font-weight: bold;
    border: 1px solid #3d424e;
}

.formula-btn-start {
    background: linear-gradient(135deg, #ff7a30, #ff3d00);
    color: #fff;
    border: none;
    font-size: 15px;
    font-weight: 700;
    padding: 14px 28px;
    border-radius: var(--radius-full);
    cursor: pointer;
    width: 100%;
    box-shadow: 0 6px 16px var(--brand-orange-glow);
    transition: transform 0.15s;
}

.formula-btn-start:hover {
    transform: scale(1.02);
}

.formula-final-score {
    font-size: 42px;
    font-weight: 900;
    color: #ff7a30;
    margin: 10px 0;
}

.bpi-gain-badge {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 700;
    margin: 16px auto;
    display: inline-block;
}

/* ==============================================================
   BARISTA WORD RECALL STYLING (MATCHING IMAGE 3)
   ============================================================== */
.barista-game-container {
    width: 100%;
    max-width: 820px;
    background-color: #16181c;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 36px 32px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.barista-badge {
    background-color: #242218;
    color: #eab308;
    border: 1px solid #713f12;
    padding: 8px 24px;
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.barista-badge.coffee-served {
    background-color: #143522;
    color: #4ade80;
    border-color: #166534;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background-color: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 8px #22c55e;
}

.barista-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    text-align: center;
}

.barista-card-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    width: 100%;
    align-items: center;
}

.barista-cup-column {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.coffee-cup-wrap {
    margin-bottom: 16px;
}

.barista-progress-wrap {
    width: 220px;
    margin-bottom: 20px;
}

.barista-progress-track {
    height: 6px;
    background-color: #262930;
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 6px;
}

.barista-progress-fill {
    height: 100%;
    background-color: #f59e0b;
    border-radius: var(--radius-full);
    transition: width 1s linear;
}

.barista-progress-text {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
}

.barista-timer-large {
    font-size: 48px;
    font-weight: 800;
    color: #fdba74;
    line-height: 1;
}

.barista-timer-sub {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.barista-btn-ready {
    background: transparent;
    border: 1px solid #78350f;
    color: #f59e0b;
    padding: 10px 24px;
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.barista-btn-ready:hover {
    background-color: rgba(245, 158, 11, 0.12);
    border-color: #f59e0b;
    color: #ffffff;
}

/* Word Menu Card */
.barista-menu-column {
    display: flex;
    justify-content: center;
}

.barista-menu-box {
    border: 2px solid #574026;
    border-radius: 20px;
    padding: 28px 24px;
    background-color: #17181c;
    width: 100%;
    max-width: 320px;
}

.barista-menu-title {
    font-family: var(--font-serif);
    font-size: 16px;
    letter-spacing: 2px;
    color: #eab308;
    text-align: center;
    margin-bottom: 20px;
    font-weight: 700;
}

.barista-words-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.word-menu-item {
    background-color: #21242a;
    border: 1px solid #373b44;
    color: #f3f4f6;
    padding: 12px 10px;
    border-radius: 20px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
}

/* Recall View */
.barista-recall-wrapper {
    width: 100%;
    max-width: 640px;
}

.recall-counter-bar {
    display: flex;
    justify-content: space-between;
    background-color: #1b1e24;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    font-size: 14px;
}

.counter-val {
    font-weight: 700;
    color: #38bdf8;
}

.barista-recall-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
    margin-bottom: 30px;
}

.word-recall-pill {
    background-color: #21252d;
    border: 1px solid #373d4a;
    color: #e5e7eb;
    padding: 14px 10px;
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.word-recall-pill:hover {
    background-color: #2c313c;
    border-color: #64748b;
}

.word-recall-pill.picked-correct {
    background-color: rgba(16, 185, 129, 0.25);
    border-color: #10b981;
    color: #34d399;
    cursor: default;
}

.word-recall-pill.picked-wrong {
    background-color: rgba(239, 68, 68, 0.25);
    border-color: #ef4444;
    color: #f87171;
    cursor: default;
}

.barista-recall-footer {
    display: flex;
    justify-content: center;
}

.barista-btn-submit {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    border: none;
    font-size: 15px;
    font-weight: 700;
    padding: 12px 32px;
    border-radius: var(--radius-full);
    cursor: pointer;
}

/* Result Card */
.barista-result-card {
    text-align: center;
    padding: 30px;
}

.result-badge {
    color: #f59e0b;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.result-title {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 6px;
}

.result-score {
    font-size: 46px;
    font-weight: 900;
    color: #fbbf24;
    margin-bottom: 16px;
}

.result-details {
    display: flex;
    justify-content: center;
    gap: 24px;
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 20px;
}

/* ==============================================================
   COLOR MATCH (CHROMA SWITCH) STYLING
   ============================================================== */
.color-match-wrapper, .speed-match-wrapper, .chalkboard-wrapper {
    width: 100%;
    max-width: 680px;
    background-color: #16181d;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    position: relative;
}

.color-hud {
    display: flex;
    justify-content: space-between;
    margin-bottom: 24px;
}

.color-arena, .sm-arena, .chalkboard-arena {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    border-radius: var(--radius-md);
    padding: 16px;
    transition: background-color 0.2s;
}

.flash-correct {
    background-color: rgba(16, 185, 129, 0.12) !important;
}

.flash-wrong {
    background-color: rgba(239, 68, 68, 0.12) !important;
}

.color-rule-box {
    background-color: #1f232b;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 12px 20px;
    text-align: center;
    margin-bottom: 24px;
    width: 100%;
}

.rule-tag {
    font-size: 10px;
    font-weight: 800;
    background-color: var(--brand-orange);
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    letter-spacing: 1px;
    display: inline-block;
    margin-bottom: 4px;
}

.rule-text {
    font-size: 15px;
    color: #e5e7eb;
}

.color-cards-container {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
    width: 100%;
    justify-content: center;
}

.color-card {
    background-color: #1d2128;
    border: 2px solid #2d3340;
    border-radius: var(--radius-md);
    width: 200px;
    height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.card-label {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.card-word {
    font-size: 32px;
    font-weight: 900;
    letter-spacing: 1px;
}

.color-vs-divider {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-muted);
}

.color-timebar-track {
    width: 100%;
    max-width: 440px;
    height: 6px;
    background-color: #272b35;
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 24px;
}

.color-timebar-fill {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #10b981, #f59e0b, #ef4444);
}

.color-buttons-row {
    display: flex;
    gap: 20px;
    width: 100%;
    max-width: 440px;
}

.color-btn {
    flex: 1;
    padding: 16px 20px;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.1s, opacity 0.15s;
    user-select: none;
}

.color-btn:active {
    transform: scale(0.97);
}

.btn-no {
    background-color: #ef4444;
    color: #fff;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
}

.btn-yes {
    background-color: #10b981;
    color: #fff;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.btn-subtext {
    font-size: 11px;
    opacity: 0.8;
    margin-bottom: 2px;
}

.btn-main {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.5px;
}

/* Speed Match Arena */
.sm-prompt {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    text-align: center;
}

.sm-card-box {
    width: 180px;
    height: 180px;
    background-color: #1f232a;
    border: 2px solid #333945;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    transition: transform 0.15s;
}

.card-pop {
    animation: pop 0.18s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.sm-symbol {
    font-size: 80px;
    user-select: none;
}

/* Chalkboard Challenge */
.chalk-instruction {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.chalk-slates-container {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    width: 100%;
    justify-content: center;
}

.chalk-slate {
    background: #1a221f;
    border: 2px solid #283731;
    border-radius: var(--radius-md);
    padding: 24px 20px;
    min-width: 150px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #e5e7eb;
    transition: transform 0.1s, border-color 0.15s;
}

.chalk-slate:hover {
    border-color: #10b981;
    transform: translateY(-2px);
}

.slate-tag {
    font-size: 11px;
    color: #6ee7b7;
    font-weight: 700;
    margin-bottom: 8px;
}

.slate-expr {
    font-size: 26px;
    font-weight: 800;
    font-family: monospace;
}

.slate-equal {
    min-width: 80px;
    background: #1f232b;
    border-color: #374151;
}

.chalk-shortcuts-hint {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: var(--text-muted);
}

/* Start Overlay */
.color-start-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(18, 19, 23, 0.94);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-lg);
    padding: 24px;
}

.color-modal-card {
    text-align: center;
    max-width: 380px;
}

.color-guide-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 8px 0 20px 0;
}

.color-instructions {
    background-color: #111317;
    border-radius: var(--radius-md);
    padding: 16px;
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
    margin-bottom: 24px;
}

.color-finish-card {
    text-align: center;
    padding: 24px;
    width: 100%;
}

.color-final-score {
    font-size: 46px;
    font-weight: 900;
    color: #ff7a30;
    margin: 10px 0;
}

.color-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    background-color: #1d2128;
    padding: 16px;
    border-radius: var(--radius-md);
    margin: 20px 0;
    font-size: 13px;
    color: var(--text-secondary);
}

/* ==============================================================
   MY BRAIN ANALYTICS VIEW
   ============================================================== */
.my-brain-wrapper {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.bpi-score-card {
    background: linear-gradient(135deg, #1e222b, #15181f);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
}

.bpi-main-number {
    font-size: 64px;
    font-weight: 900;
    color: #fbbf24;
    line-height: 1;
}

.bpi-label {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 6px;
}

.category-bars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.cat-bar-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 20px;
}

.cat-bar-header {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 10px;
}

.cat-bar-track {
    height: 8px;
    background-color: #282c35;
    border-radius: var(--radius-full);
    overflow: hidden;
}

.cat-bar-fill {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* History table */
.history-table-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 24px;
    overflow-x: auto;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.history-table th {
    text-align: left;
    color: var(--text-muted);
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-subtle);
}

.history-table td {
    padding: 14px;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-primary);
}

/* Animations */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

@keyframes pop {
    0% { transform: scale(0.85); opacity: 0.7; }
    60% { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}

/* Responsive */
@media (max-width: 900px) {
    .app-sidebar {
        width: 72px;
        padding: 16px 8px;
    }
    .brand-title, .nav-text, .schulte-sidebar {
        display: none;
    }
    .sidebar-footer {
        justify-content: center;
    }
    .top-navbar {
        padding: 14px 20px;
    }
    .content-body {
        padding: 20px;
    }
    .barista-card-layout {
        grid-template-columns: 1fr;
    }
}
