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

/* =============================================
   DESIGN TOKENS
   ============================================= */
:root {
    /* Backgrounds */
    --bg-primary:    #060611;
    --bg-secondary:  #0c0c1a;
    --bg-tertiary:   #12121f;
    --bg-card:       rgba(16, 16, 30, 0.55);
    --bg-card-hover: rgba(20, 20, 42, 0.70);
    --bg-glass:      rgba(255, 255, 255, 0.03);

    /* Semantic surface helpers — collapse repeated rgba(255,255,255,0.0x) */
    --surface-raised:     rgba(255, 255, 255, 0.05);  /* buttons, pills, rows */
    --surface-subtle:     rgba(255, 255, 255, 0.03);  /* card shimmers, shimmer ::before */
    --surface-inset:      rgba(0, 0, 0, 0.25);        /* inset wells, pickers */
    --interactive-subtle: rgba(255, 255, 255, 0.06);  /* hover over surface-raised */
    --interactive-hover:  rgba(255, 255, 255, 0.10);  /* active/focus surface */
    --shimmer:            rgba(255, 255, 255, 0.03);  /* card ::before gradient start */
    --divider-color:      rgba(255, 255, 255, 0.05);  /* horizontal rule, section dividers */
    --modal-overlay-bg:   rgba(0, 0, 0, 0.65);        /* modal backdrop */

    /* Badge */
    --tier-badge-bg:     rgba(255, 255, 255, 0.06);
    --tier-badge-border: rgba(255, 255, 255, 0.08);
    --tier-badge-color:  var(--text-muted);

    /* Borders */
    --border-color:       rgba(255, 255, 255, 0.07);
    --border-hover:       rgba(255, 255, 255, 0.14);
    --border-active:      rgba(124, 58, 237, 0.45);

    /* Text */
    --text-primary:   #f0f0ff;
    --text-secondary: #9898b8;
    --text-muted:     #4a4a6a;

    /* Brand Palette — Violet / Cyan */
    --primary-color:       #7c3aed;
    --primary-light:       #a855f7;
    --primary-hover:       #6d28d9;
    --primary-glow:        rgba(124, 58, 237, 0.4);
    --accent-color:        #06b6d4;
    --accent-light:        #22d3ee;
    --accent-glow:         rgba(6, 182, 212, 0.35);

    /* Timer States */
    --timer-work:          #f59e0b;
    --timer-work-glow:     rgba(245, 158, 11, 0.45);
    --timer-break:         #10b981;
    --timer-break-glow:    rgba(16, 185, 129, 0.45);

    /* Semantic */
    --success-color:  #10b981;
    --warning-color:  #f59e0b;
    --danger-color:   #ef4444;

    /* Typography */
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', SFMono-Regular, Consolas, monospace;

    /* Radius */
    --radius-sm:  6px;
    --radius-md:  12px;
    --radius-lg:  20px;
    --radius-xl:  28px;
    --radius-2xl: 40px;

    /* Shadows */
    --shadow-sm:  0 1px 3px rgba(0,0,0,0.4);
    --shadow-md:  0 4px 16px rgba(0,0,0,0.45);
    --shadow-lg:  0 12px 40px rgba(0,0,0,0.55);
    --shadow-xl:  0 24px 60px rgba(0,0,0,0.65);
    --shadow-glow-primary: 0 0 24px var(--primary-glow), 0 8px 32px rgba(0,0,0,0.5);
    --shadow-glow-accent:  0 0 24px var(--accent-glow),  0 8px 32px rgba(0,0,0,0.5);

    /* Transitions */
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --ease-out:    cubic-bezier(0.0, 0.0, 0.2, 1);
    --transition:  all 0.25s var(--ease-smooth);

    /* Heatmap Levels */
    --heat-0: #12121f;
    --heat-1: #1e1b4b;
    --heat-2: #312e81;
    --heat-3: #3730a3;
    --heat-4: #4338ca;
    --heat-5: #4f46e5;
    --heat-6: #818cf8;
    --heat-7: #a5b4fc;

    /* Legacy compatibility aliases */
    --border-radius-sm: var(--radius-sm);
    --border-radius-md: var(--radius-md);
    --border-radius-lg: var(--radius-lg);
    --border-radius-xl: var(--radius-xl);
    --transition-smooth: var(--transition);
    --primary-color-hover: var(--primary-hover);
}

/* =============================================
   FLAGSHIP THEME 1: AMBER OBSIDIAN (PREMIUM DARK AMBER)
   ============================================= */
:root[data-theme="obsidian"] {
    --bg-primary:    #090807;
    --bg-secondary:  #12100d;
    --bg-tertiary:   #1a1713;
    --bg-card:       rgba(22, 19, 15, 0.80);
    --bg-card-hover: rgba(30, 26, 18, 0.92);
    --bg-glass:      rgba(255, 255, 255, 0.04);

    --surface-raised:     rgba(245, 158, 11, 0.07);
    --surface-subtle:     rgba(245, 158, 11, 0.04);
    --surface-inset:      rgba(0, 0, 0, 0.35);
    --interactive-subtle: rgba(245, 158, 11, 0.11);
    --interactive-hover:  rgba(245, 158, 11, 0.17);
    --shimmer:            rgba(245, 158, 11, 0.04);
    --divider-color:      rgba(245, 158, 11, 0.12);
    --modal-overlay-bg:   rgba(5, 3, 2, 0.72);

    --tier-badge-bg:     rgba(245, 158, 11, 0.10);
    --tier-badge-border: rgba(245, 158, 11, 0.22);
    --tier-badge-color:  #d6b265;

    --border-color:       rgba(245, 158, 11, 0.20);
    --border-hover:       rgba(245, 158, 11, 0.50);
    --border-active:      #f59e0b;

    --text-primary:   #fef3c7;
    --text-secondary: #d6d3d1;
    --text-muted:     #78716c;

    --primary-color:       #f59e0b;
    --primary-light:       #fbbf24;
    --primary-hover:       #d97706;
    --primary-glow:        rgba(245, 158, 11, 0.40);
    --accent-color:        #d97706;
    --accent-light:        #fbbf24;
    --accent-glow:         rgba(245, 158, 11, 0.35);

    --timer-work:          #fbbf24;
    --timer-work-glow:     rgba(251, 191, 36, 0.5);
    --timer-break:         #34d399;
    --timer-break-glow:    rgba(52, 211, 153, 0.5);

    --success-color:  #34d399;
    --warning-color:  #fbbf24;
    --danger-color:   #f87171;

    --shadow-sm:  0 2px 6px rgba(0, 0, 0, 0.6);
    --shadow-md:  0 6px 24px rgba(0, 0, 0, 0.7);
    --shadow-lg:  0 16px 52px rgba(0, 0, 0, 0.85);
    --shadow-xl:  0 24px 72px rgba(0, 0, 0, 0.95);
    --shadow-glow-primary: 0 0 32px rgba(245, 158, 11, 0.45), 0 10px 40px rgba(0, 0, 0, 0.7);
    --shadow-glow-accent:  0 0 32px rgba(234, 88, 12, 0.40),  0 10px 40px rgba(0, 0, 0, 0.7);

    --heat-0: #1a1713;
    --heat-1: #451a03;
    --heat-2: #78350f;
    --heat-3: #92400e;
    --heat-4: #b45309;
    --heat-5: #d97706;
    --heat-6: #f59e0b;
    --heat-7: #fbbf24;
}

/* =============================================
   FLAGSHIP THEME 2: WARM LINEN (CINNAMON TERRACOTTA & ROASTED ESPRESSO)
   ============================================= */
:root[data-theme="linen"] {
    --bg-primary:    #fbf8f3;
    --bg-secondary:  #f3eee6;
    --bg-tertiary:   #e8e1d5;
    --bg-card:       #ffffff;
    --bg-card-hover: #fdfbf7;
    --bg-glass:      rgba(255, 255, 255, 0.90);

    --surface-raised:     rgba(194, 94, 0, 0.06);
    --surface-subtle:     rgba(194, 94, 0, 0.03);
    --surface-inset:      rgba(44, 26, 14, 0.04);
    --interactive-subtle: rgba(194, 94, 0, 0.08);
    --interactive-hover:  rgba(194, 94, 0, 0.14);
    --shimmer:            rgba(255, 255, 255, 0.85);
    --divider-color:      rgba(168, 122, 85, 0.12);
    --modal-overlay-bg:   rgba(44, 26, 14, 0.45);

    --tier-badge-bg:     rgba(194, 94, 0, 0.10);
    --tier-badge-border: rgba(194, 94, 0, 0.25);
    --tier-badge-color:  #9a4700;

    --border-color:       rgba(168, 122, 85, 0.16);
    --border-hover:       rgba(194, 94, 0, 0.40);
    --border-active:      #c25e00;

    --text-primary:   #2c1a0e;
    --text-secondary: #6b584a;
    --text-muted:     #a39182;

    --primary-color:       #c25e00;
    --primary-light:       #d97706;
    --primary-hover:       #9a4700;
    --primary-glow:        rgba(194, 94, 0, 0.22);
    --accent-color:        #0284c7;
    --accent-light:        #38bdf8;
    --accent-glow:         rgba(2, 132, 199, 0.20);

    --timer-work:          #c25e00;
    --timer-work-glow:     rgba(194, 94, 0, 0.35);
    --timer-break:         #059669;
    --timer-break-glow:    rgba(5, 150, 105, 0.35);

    --success-color:  #059669;
    --warning-color:  #d97706;
    --danger-color:   #dc2626;

    --shadow-sm:  0 1px 4px rgba(44, 26, 14, 0.05);
    --shadow-md:  0 4px 16px rgba(44, 26, 14, 0.08);
    --shadow-lg:  0 12px 36px rgba(44, 26, 14, 0.10);
    --shadow-xl:  0 24px 60px rgba(44, 26, 14, 0.13);
    --shadow-glow-primary: 0 0 20px rgba(194, 94, 0, 0.22), 0 6px 24px rgba(44, 26, 14, 0.06);
    --shadow-glow-accent:  0 0 20px rgba(2, 132, 199, 0.20),  0 6px 24px rgba(44, 26, 14, 0.06);

    --heat-0: #e8e1d5;
    --heat-1: #fef3c7;
    --heat-2: #fde68a;
    --heat-3: #fcd34d;
    --heat-4: #fbbf24;
    --heat-5: #f59e0b;
    --heat-6: #d97706;
    --heat-7: #c25e00;
}

/* ==============================================
   WARM LINEN — COMPLETE COMPONENT OVERRIDES
   ============================================== */
html[data-theme="linen"] body {
    background-color: #fbf8f3 !important;
    background-image:
        radial-gradient(ellipse 80% 60% at 10% -10%,  rgba(194, 94, 0, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 90% 110%,  rgba(217, 119, 6, 0.06) 0%, transparent 55%),
        radial-gradient(ellipse 100% 100% at 50% 50%, #f3eee6 0%, #fbf8f3 100%) !important;
    color: #2c1a0e !important;
}

/* Linen: All card surfaces */
html[data-theme="linen"] .ui-card,
html[data-theme="linen"] .modal-content,
html[data-theme="linen"] .settings-section-card,
html[data-theme="linen"] .dashboard-card,
html[data-theme="linen"] .notes-card,
html[data-theme="linen"] .task-card,
html[data-theme="linen"] .task-item,
html[data-theme="linen"] .ritual-card,
html[data-theme="linen"] .ambient-track-card,
html[data-theme="linen"] .fab-nav-menu,
html[data-theme="linen"] .task-composer,
html[data-theme="linen"] .notes-category-group,
html[data-theme="linen"] .timer-display-card,
html[data-theme="linen"] .timer-card-main,
html[data-theme="linen"] .capsules-mgmt-row,
html[data-theme="linen"] .stat-card,
html[data-theme="linen"] .category-card,
html[data-theme="linen"] .ritual-bottom-tile {
    background: #ffffff !important;
    border-color: rgba(168, 122, 85, 0.16) !important;
    color: #2c1a0e !important;
    box-shadow: 0 4px 20px rgba(44, 26, 14, 0.05), 0 1px 3px rgba(44, 26, 14, 0.03) !important;
}

html[data-theme="linen"] .ui-card:hover {
    box-shadow: 0 12px 36px rgba(44, 26, 14, 0.09), 0 1px 3px rgba(44, 26, 14, 0.03) !important;
    border-color: rgba(194, 94, 0, 0.35) !important;
}

/* Linen: Active task */
html[data-theme="linen"] .task-item.active-focus-task {
    background: #fffbf5 !important;
    border-color: rgba(194, 94, 0, 0.40) !important;
    box-shadow: 0 4px 18px rgba(194, 94, 0, 0.15) !important;
}

html[data-theme="linen"] .task-item.active-focus-task .task-title { color: #2c1a0e !important; }

html[data-theme="linen"] .task-item.active-focus-task .task-timer-live-badge {
    background: rgba(194, 94, 0, 0.10) !important;
    color: #9a4700 !important;
    border-color: rgba(194, 94, 0, 0.25) !important;
}

/* Linen: hover/focus on task item */
html[data-theme="linen"] .task-item:hover {
    border-color: rgba(194, 94, 0, 0.30) !important;
    background: #fdfbf7 !important;
    box-shadow: 0 4px 16px rgba(44, 26, 14, 0.06) !important;
}

/* Linen: All inputs, textareas, selects */
html[data-theme="linen"] input,
html[data-theme="linen"] textarea,
html[data-theme="linen"] select,
html[data-theme="linen"] .text-input,
html[data-theme="linen"] .select-input,
html[data-theme="linen"] .settings-number-input,
html[data-theme="linen"] .notes-search-input {
    background: #f3eee6 !important;
    color: #2c1a0e !important;
    border-color: rgba(168, 122, 85, 0.18) !important;
}

html[data-theme="linen"] input::placeholder,
html[data-theme="linen"] textarea::placeholder,
html[data-theme="linen"] .text-input::placeholder {
    color: #a39182 !important;
    opacity: 1;
}

html[data-theme="linen"] input:focus,
html[data-theme="linen"] textarea:focus,
html[data-theme="linen"] .text-input:focus {
    border-color: #c25e00 !important;
    box-shadow: 0 0 0 3px rgba(194, 94, 0, 0.18) !important;
    background: #ffffff !important;
}

/* Linen: Composer-specific controls */
html[data-theme="linen"] .date-picker-wrap,
html[data-theme="linen"] .pomodoro-estimate-wrap {
    background: #f3eee6 !important;
    border-color: rgba(168, 122, 85, 0.18) !important;
    color: #2c1a0e !important;
}

html[data-theme="linen"] .date-picker-wrap:hover,
html[data-theme="linen"] .pomodoro-estimate-wrap:hover {
    border-color: rgba(194, 94, 0, 0.35) !important;
    background: rgba(194, 94, 0, 0.06) !important;
}

html[data-theme="linen"] .date-picker-wrap svg,
html[data-theme="linen"] .pomodoro-estimate-wrap svg,
html[data-theme="linen"] .pomo-estimate-icon,
html[data-theme="linen"] .composer-info-btn svg {
    stroke: #6b584a !important;
    color: #6b584a !important;
}

html[data-theme="linen"] .date-input {
    background: transparent !important;
    color: #2c1a0e !important;
    border: none !important;
}

html[data-theme="linen"] .composer-capsule-inline .capsule-select-dropdown {
    background: #f3eee6 !important;
    border-color: rgba(168, 122, 85, 0.18) !important;
    color: #2c1a0e !important;
}

html[data-theme="linen"] .composer-capsule-inline .capsule-select-dropdown option,
html[data-theme="linen"] .select-input option {
    background: #ffffff !important;
    color: #2c1a0e !important;
}

/* Linen: Priority toggles */
html[data-theme="linen"] .priority-toggle-group {
    background: #f3eee6 !important;
    border-color: rgba(168, 122, 85, 0.16) !important;
}

html[data-theme="linen"] .priority-toggle-btn {
    color: #6b584a !important;
    background: transparent !important;
}

html[data-theme="linen"] .priority-toggle-btn:not(:last-child) {
    border-right-color: rgba(168, 122, 85, 0.14) !important;
}

html[data-theme="linen"] .priority-toggle-btn:hover {
    color: #2c1a0e !important;
    background: rgba(194, 94, 0, 0.06) !important;
}

/* Linen: Filter pills */
html[data-theme="linen"] .filter-pill {
    background: rgba(194, 94, 0, 0.05) !important;
    border-color: rgba(168, 122, 85, 0.14) !important;
    color: #6b584a !important;
}

html[data-theme="linen"] .filter-pill:hover {
    background: rgba(194, 94, 0, 0.09) !important;
    color: #2c1a0e !important;
}

html[data-theme="linen"] .filter-pill.active {
    background: linear-gradient(135deg, #c25e00 0%, #d97706 100%) !important;
    border-color: transparent !important;
    color: #ffffff !important;
    box-shadow: 0 3px 12px rgba(194, 94, 0, 0.30) !important;
    font-weight: 700 !important;
}

/* Linen: Tab groups */
html[data-theme="linen"] .settings-tabs,
html[data-theme="linen"] .view-switcher-pill,
html[data-theme="linen"] .task-filters,
html[data-theme="linen"] .dashboard-tabs {
    background: #f3eee6 !important;
    border-color: rgba(168, 122, 85, 0.16) !important;
}

html[data-theme="linen"] .settings-tab-btn,
html[data-theme="linen"] .view-switcher-btn,
html[data-theme="linen"] .dashboard-tab-btn {
    background: transparent !important;
    color: #6b584a !important;
    border-color: transparent !important;
}

html[data-theme="linen"] .settings-tab-btn:hover,
html[data-theme="linen"] .view-switcher-btn:hover,
html[data-theme="linen"] .dashboard-tab-btn:hover {
    background: rgba(194, 94, 0, 0.08) !important;
    color: #2c1a0e !important;
}

html[data-theme="linen"] .settings-tab-btn.active,
html[data-theme="linen"] .view-switcher-btn.active,
html[data-theme="linen"] .dashboard-tab-btn.active {
    background: linear-gradient(135deg, #c25e00 0%, #d97706 100%) !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 3px 12px rgba(194, 94, 0, 0.32) !important;
}

/* Linen: Buttons */
html[data-theme="linen"] .btn-primary,
html[data-theme="linen"] #capsule-form-submit-btn,
html[data-theme="linen"] .task-submit-btn,
html[data-theme="linen"] #add-task-btn {
    background: linear-gradient(135deg, #c25e00 0%, #d97706 100%) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    border: none !important;
    box-shadow: 0 4px 16px rgba(194, 94, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.35) !important;
}

html[data-theme="linen"] .btn-primary:hover,
html[data-theme="linen"] #add-task-btn:hover {
    background: linear-gradient(135deg, #d97706 0%, #c25e00 100%) !important;
    box-shadow: 0 6px 22px rgba(194, 94, 0, 0.45) !important;
}

html[data-theme="linen"] .tier-badge--pro {
    background: linear-gradient(135deg, #c25e00 0%, #d97706 100%) !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
    box-shadow: 0 3px 12px rgba(194, 94, 0, 0.32) !important;
}

html[data-theme="linen"] .fab-nav-btn {
    background: linear-gradient(135deg, #c25e00 0%, #d97706 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 6px 24px rgba(194, 94, 0, 0.40) !important;
}

html[data-theme="linen"] .fab-nav-btn::after {
    border-color: rgba(194, 94, 0, 0.35) !important;
}

html[data-theme="linen"] .btn-secondary,
html[data-theme="linen"] .btn:not(.btn-primary):not(.btn-accent) {
    background: rgba(194, 94, 0, 0.06) !important;
    color: #2c1a0e !important;
    border-color: rgba(168, 122, 85, 0.18) !important;
}

html[data-theme="linen"] .btn-secondary:hover {
    background: rgba(194, 94, 0, 0.11) !important;
}

html[data-theme="linen"] .btn-icon {
    color: #6b584a !important;
    background: transparent !important;
}

html[data-theme="linen"] .btn-icon:hover {
    background: rgba(194, 94, 0, 0.10) !important;
    color: #c25e00 !important;
}

/* Linen: Task-right icons */
html[data-theme="linen"] .task-right .btn-icon {
    background: transparent !important;
    color: #a39182 !important;
}

html[data-theme="linen"] .task-right .btn-icon:hover {
    background: rgba(194, 94, 0, 0.10) !important;
    color: #c25e00 !important;
}

/* Linen: Checkbox */
html[data-theme="linen"] .checkbox-custom {
    border-color: rgba(168, 122, 85, 0.28) !important;
    background: transparent !important;
}

html[data-theme="linen"] .checkbox-custom:hover {
    border-color: #c25e00 !important;
    box-shadow: 0 0 10px rgba(194, 94, 0, 0.28) !important;
}

html[data-theme="linen"] .checkbox-custom:checked {
    background: linear-gradient(135deg, #c25e00, #d97706) !important;
    border-color: transparent !important;
    box-shadow: 0 0 12px rgba(194, 94, 0, 0.4) !important;
}

/* Linen: Meta badges */
html[data-theme="linen"] .meta-tag {
    font-weight: 700 !important;
}

html[data-theme="linen"] .meta-tag.priority-low {
    background: rgba(5, 150, 105, 0.10) !important;
    color: #047857 !important;
    border-color: rgba(5, 150, 105, 0.25) !important;
}

html[data-theme="linen"] .meta-tag.priority-medium {
    background: rgba(194, 94, 0, 0.10) !important;
    color: #9a4700 !important;
    border-color: rgba(194, 94, 0, 0.25) !important;
}

html[data-theme="linen"] .meta-tag.priority-high {
    background: rgba(220, 38, 38, 0.10) !important;
    color: #b91c1c !important;
    border-color: rgba(220, 38, 38, 0.25) !important;
}

html[data-theme="linen"] .meta-tag.category {
    background: rgba(194, 94, 0, 0.06) !important;
    color: #6b584a !important;
    border-color: rgba(168, 122, 85, 0.14) !important;
}

html[data-theme="linen"] .meta-tag.due-date {
    background: rgba(194, 94, 0, 0.08) !important;
    color: #9a4700 !important;
    border-color: rgba(194, 94, 0, 0.20) !important;
}

html[data-theme="linen"] .category-capsule,
html[data-theme="linen"] .notes-group-capsule,
html[data-theme="linen"] .capsule-badge {
    background: rgba(194, 94, 0, 0.08) !important;
    color: #9a4700 !important;
    border-color: rgba(194, 94, 0, 0.22) !important;
}

html[data-theme="linen"] .pomo-run-badge {
    background: rgba(194, 94, 0, 0.05) !important;
    border-color: rgba(168, 122, 85, 0.14) !important;
    color: #6b584a !important;
}

/* Linen: header title */
html[data-theme="linen"] .header-title-wrap h1,
html[data-theme="linen"] .modal-title {
    background: linear-gradient(135deg, #2c1a0e 0%, #854d0e 55%, #c25e00 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

/* ═══════════════════════════════════════════════
   LINEN: TIMER — FULL 3D PREMIUM TREATMENT
   ═══════════════════════════════════════════════ */

/* ── Main container warm top-glow halo ── */
html[data-theme="linen"] .timer-card-main::before {
    background: radial-gradient(ellipse at 50% -15%, rgba(217, 119, 6, 0.20) 0%, rgba(251, 191, 36, 0.06) 50%, transparent 70%) !important;
}

/* ── The timer box: warm alabaster with real depth ── */
html[data-theme="linen"] .timer-display-box {
    background: linear-gradient(
        170deg,
        #ffffff 0%,
        #fdfaf5 40%,
        #f8f0e4 80%,
        #f3e8d5 100%
    ) !important;
    border-color: rgba(194, 140, 74, 0.20) !important;
    box-shadow:
        /* Outer lift shadow — gives card elevation */
        0 2px 3px rgba(140, 80, 20, 0.10),
        0 8px 24px rgba(100, 55, 10, 0.09),
        0 20px 50px rgba(44, 26, 14, 0.10),
        /* Top specular highlight — catches the light */
        inset 0 2px 1px rgba(255, 255, 255, 1),
        /* Bottom base shadow — grounds the card */
        inset 0 -2px 4px rgba(160, 100, 30, 0.12),
        /* Left edge highlight */
        inset 2px 0 2px rgba(255, 255, 255, 0.7),
        /* Right edge shadow */
        inset -1px 0 2px rgba(160, 100, 30, 0.06) !important;
}

/* ── 3D gradient border ring: warm copper-gold ── */
html[data-theme="linen"] .timer-display-box::before {
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 1.0)    0%,    /* TL: bright specular white  */
        rgba(251, 191, 36, 0.90)    18%,   /* top: warm gold             */
        rgba(217, 119, 6, 0.80)     38%,   /* right upper: amber copper  */
        rgba(180, 90, 20, 0.55)     58%,   /* right lower: dark copper   */
        rgba(217, 119, 6, 0.40)     78%,   /* bottom: soft amber         */
        rgba(255, 248, 230, 0.85)   100%   /* BL: warm cream             */
    ) !important;
    opacity: 1 !important;
    /* re-assert the border mask trick so it clips correctly */
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0) !important;
    -webkit-mask-composite: xor !important;
    mask-composite: exclude !important;
    padding: 1.5px !important;
    inset: -1.5px !important;
    border-radius: 23.5px !important;
}

/* ── Inner bottom ambient backlight: warm sunrise glow ── */
html[data-theme="linen"] .timer-display-box::after {
    background: radial-gradient(
        ellipse at 50% 100%,
        rgba(251, 191, 36, 0.18) 0%,
        rgba(217, 119, 6, 0.10) 40%,
        transparent 75%
    ) !important;
}

/* ── Hover: the card lifts with a warm glow bloom ── */
html[data-theme="linen"] .timer-display-box:hover {
    box-shadow:
        0 4px 6px rgba(140, 80, 20, 0.12),
        0 14px 36px rgba(100, 55, 10, 0.12),
        0 28px 64px rgba(44, 26, 14, 0.12),
        0 0 48px rgba(217, 119, 6, 0.12),
        inset 0 2px 1px rgba(255, 255, 255, 1),
        inset 0 -2px 4px rgba(160, 100, 30, 0.14),
        inset 2px 0 2px rgba(255, 255, 255, 0.8),
        inset -1px 0 2px rgba(160, 100, 30, 0.07) !important;
    transform: translateY(-2px) !important;
}

/* ── Countdown digits: deep espresso → rich terracotta ── */
html[data-theme="linen"] .timer-countdown {
    background: linear-gradient(
        180deg,
        #1e0d04 0%,
        #3d1e08 40%,
        #7c3800 75%,
        #b85d06 100%
    ) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    filter: drop-shadow(0 2px 0 rgba(255, 248, 220, 0.6)) drop-shadow(0 4px 12px rgba(184, 93, 6, 0.20)) !important;
}

/* ── Session dots ── */
html[data-theme="linen"] .timer-dot {
    border-color: rgba(184, 115, 51, 0.30) !important;
    background: rgba(251, 191, 36, 0.07) !important;
}

html[data-theme="linen"] .timer-dot.active {
    background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%) !important;
    border-color: #d97706 !important;
    box-shadow: 0 0 8px rgba(251, 191, 36, 0.75), 0 0 2px rgba(217, 119, 6, 0.9) !important;
}

/* ── Play/Pause CTA: warm amber pill ── */
html[data-theme="linen"] .timer-btn-round.play-pause,
html[data-theme="linen"] .zen-play-btn {
    background: linear-gradient(145deg, #f59e0b 0%, #d97706 55%, #b85d06 100%) !important;
    color: #ffffff !important;
    box-shadow:
        0 2px 4px rgba(120, 50, 0, 0.25),
        0 8px 24px rgba(194, 94, 0, 0.40),
        inset 0 1.5px 0.5px rgba(255, 255, 255, 0.50),
        inset 0 -1px 2px rgba(100, 30, 0, 0.30) !important;
    border: 1px solid rgba(255, 255, 255, 0.30) !important;
}

html[data-theme="linen"] .timer-btn-round.play-pause:hover,
html[data-theme="linen"] .zen-play-btn:hover {
    background: linear-gradient(145deg, #fbbf24 0%, #f59e0b 55%, #d97706 100%) !important;
    box-shadow:
        0 4px 8px rgba(120, 50, 0, 0.28),
        0 12px 32px rgba(194, 94, 0, 0.50),
        inset 0 1.5px 0.5px rgba(255, 255, 255, 0.60),
        inset 0 -1px 2px rgba(100, 30, 0, 0.25) !important;
    transform: scale(1.10) !important;
}

/* ── Secondary control buttons (skip, reset, mute) ── */
html[data-theme="linen"] .timer-btn-round:not(.play-pause) {
    background: rgba(255, 250, 242, 0.85) !important;
    border-color: rgba(184, 115, 51, 0.22) !important;
    color: #7c4a18 !important;
    box-shadow: 0 2px 8px rgba(44, 26, 14, 0.06), inset 0 1px 0 rgba(255,255,255,0.8) !important;
}

html[data-theme="linen"] .timer-btn-round:not(.play-pause):hover {
    background: rgba(255, 245, 225, 0.95) !important;
    border-color: rgba(217, 119, 6, 0.45) !important;
    color: #b85d06 !important;
    box-shadow: 0 4px 14px rgba(194, 94, 0, 0.18), inset 0 1px 0 rgba(255,255,255,0.9) !important;
    transform: scale(1.08) !important;
}

/* ═══════════════════════════════════════════════
   LINEN: ZEN MODE — WARM PARCHMENT ATMOSPHERE
   ═══════════════════════════════════════════════ */

/* Full-screen warm parchment backdrop */
html[data-theme="linen"] .zen-overlay,
html[data-theme="linen"] .zen-overlay.ambiance-linen {
    background: radial-gradient(
        ellipse at 40% 35%,
        #fdf6e9 0%,
        #f8edd8 30%,
        #f2e3c8 60%,
        #e8d5b0 100%
    ) !important;
}

/* Zen display card: premium cream glass with warm copper border */
html[data-theme="linen"] .zen-display-box {
    background: linear-gradient(
        145deg,
        rgba(255, 255, 255, 0.82) 0%,
        rgba(253, 247, 234, 0.72) 50%,
        rgba(247, 235, 210, 0.65) 100%
    ) !important;
    backdrop-filter: blur(32px) saturate(1.4) !important;
    -webkit-backdrop-filter: blur(32px) saturate(1.4) !important;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.60),
        inset 0 2px 0 rgba(255, 255, 255, 0.90),
        inset 0 -2px 0 rgba(180, 110, 30, 0.14),
        0 24px 70px rgba(100, 55, 10, 0.18),
        0 8px 24px rgba(140, 80, 20, 0.12),
        0 0 60px rgba(251, 191, 36, 0.08) !important;
}

/* Warm copper 3D gradient border on zen box */
html[data-theme="linen"] .zen-display-box::before {
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 1.0)    0%,
        rgba(251, 191, 36, 0.85)    20%,
        rgba(217, 119, 6, 0.75)     42%,
        rgba(175, 87, 15, 0.50)     62%,
        rgba(217, 119, 6, 0.35)     80%,
        rgba(255, 248, 230, 0.80)   100%
    ) !important;
    opacity: 1 !important;
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0) !important;
    -webkit-mask-composite: xor !important;
    mask-composite: exclude !important;
    padding: 1.5px !important;
    inset: -1.5px !important;
    border-radius: 29.5px !important;
}

/* Warm amber bottom glow inside zen box */
html[data-theme="linen"] .zen-display-box::after {
    background: radial-gradient(
        ellipse at 50% 100%,
        rgba(251, 191, 36, 0.22) 0%,
        rgba(217, 119, 6, 0.12) 45%,
        transparent 75%
    ) !important;
}

/* Zen countdown: deep espresso on warm background */
html[data-theme="linen"] .zen-display-box .timer-countdown,
html[data-theme="linen"] .zen-overlay #zen-countdown-text {
    background: linear-gradient(
        180deg,
        #1e0d04 0%,
        #3d1e08 35%,
        #7c3800 70%,
        #b85d06 100%
    ) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    color: unset !important;
    text-shadow: none !important;
    filter: drop-shadow(0 2px 0 rgba(255, 248, 220, 0.55)) drop-shadow(0 5px 15px rgba(184, 93, 6, 0.18)) !important;
}

/* Immersive zen text: stay on the warm espresso spectrum */
html[data-theme="linen"] .zen-overlay.immersive #zen-countdown-text {
    background: linear-gradient(
        180deg,
        #2c1404 0%,
        #5a2a08 40%,
        #9a4a00 75%,
        #c96a0a 100%
    ) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    color: unset !important;
    text-shadow: none !important;
    filter: drop-shadow(0 3px 0 rgba(255, 245, 210, 0.50)) drop-shadow(0 6px 20px rgba(184, 93, 6, 0.20)) !important;
}

/* Immersive progress ring: warm amber */
html[data-theme="linen"] .zen-overlay.immersive #zen-rect-progress {
    filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.65)) drop-shadow(0 0 18px rgba(217, 119, 6, 0.35)) !important;
}

/* Zen playback bar: frosted cream pill */
html[data-theme="linen"] .zen-playback-bar {
    background: rgba(255, 250, 238, 0.70) !important;
    backdrop-filter: blur(28px) saturate(1.3) !important;
    -webkit-backdrop-filter: blur(28px) saturate(1.3) !important;
    border: 1px solid rgba(194, 140, 74, 0.22) !important;
    box-shadow:
        0 12px 36px rgba(100, 55, 10, 0.14),
        0 4px 12px rgba(140, 80, 20, 0.10),
        inset 0 1px 0 rgba(255, 255, 255, 0.85) !important;
}

/* Zen stop/action buttons inside playback bar */
html[data-theme="linen"] .zen-stop-btn {
    color: rgba(100, 60, 20, 0.65) !important;
    border-color: rgba(184, 115, 51, 0.18) !important;
    background: transparent !important;
}

html[data-theme="linen"] .zen-stop-btn:hover {
    background: rgba(255, 240, 210, 0.85) !important;
    border-color: rgba(217, 119, 6, 0.35) !important;
    color: #7c3800 !important;
    transform: scale(1.06) !important;
}

/* Zen immersive icon buttons (top-right corner) */
html[data-theme="linen"] .zen-immersive-icon-btn {
    background: rgba(255, 250, 238, 0.55) !important;
    border-color: rgba(184, 115, 51, 0.22) !important;
    color: rgba(100, 60, 20, 0.65) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
}

html[data-theme="linen"] .zen-immersive-icon-btn:hover {
    background: rgba(255, 245, 220, 0.88) !important;
    border-color: rgba(217, 119, 6, 0.45) !important;
    color: #7c3800 !important;
    box-shadow: 0 4px 14px rgba(194, 94, 0, 0.18) !important;
}

/* Zen task detail text */
html[data-theme="linen"] .zen-overlay .timer-inner-title {
    color: #3d1e08 !important;
    text-shadow: 0 2px 8px rgba(255, 245, 210, 0.8) !important;
}

/* Zen capsule badges */
html[data-theme="linen"] .zen-overlay .timer-inner-capsule {
    background: rgba(251, 191, 36, 0.12) !important;
    border-color: rgba(217, 119, 6, 0.28) !important;
    color: #7c3800 !important;
}

html[data-theme="linen"] .zen-overlay .time-capsule {
    background: rgba(217, 119, 6, 0.10) !important;
    border-color: rgba(217, 119, 6, 0.28) !important;
    color: #7c3800 !important;
}

/* Zen session dots */
html[data-theme="linen"] .zen-overlay .timer-dot {
    border-color: rgba(184, 115, 51, 0.35) !important;
    background: rgba(251, 191, 36, 0.10) !important;
}

html[data-theme="linen"] .zen-overlay .timer-dot.active {
    background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%) !important;
    border-color: #d97706 !important;
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.80), 0 0 3px rgba(217, 119, 6, 1.0) !important;
}


/* ═══════════════════════════════════════════════════════════════
   FOCUS RITUAL — THEME-SENSITIVE OVERRIDES
   Replaces all hardcoded violet/purple with per-theme colors
   ═══════════════════════════════════════════════════════════════ */

/* ─── AMBER OBSIDIAN & WARM LINEN: AMBER RITUAL ──────────────────── */
html[data-theme="obsidian"] .ritual-overlay,
html[data-theme="linen"] .ritual-overlay {
    background: radial-gradient(ellipse at 50% 30%, #1c1408 0%, #0d0a05 100%) !important;
}

html[data-theme="obsidian"] .ritual-badge,
html[data-theme="linen"] .ritual-badge {
    border-color: rgba(245, 158, 11, 0.35) !important;
    background: rgba(245, 158, 11, 0.10) !important;
    color: #fbbf24 !important;
}

html[data-theme="obsidian"] .ritual-ring-outer,
html[data-theme="linen"] .ritual-ring-outer {
    background: radial-gradient(ellipse, rgba(245, 158, 11, 0.12) 0%, transparent 70%) !important;
}

html[data-theme="obsidian"] .ritual-circle-track,
html[data-theme="linen"] .ritual-circle-track {
    stroke: rgba(245, 158, 11, 0.12) !important;
}

html[data-theme="obsidian"] .ritual-sphere,
html[data-theme="linen"] .ritual-sphere {
    background: radial-gradient(ellipse at 38% 35%,
        rgba(251, 191, 36, 0.30) 0%,
        rgba(245, 158, 11, 0.20) 40%,
        rgba(180, 83, 9, 0.12) 70%,
        transparent 100%
    ) !important;
    border-color: rgba(251, 191, 36, 0.22) !important;
    box-shadow:
        0 0 45px rgba(245, 158, 11, 0.22),
        0 0 90px rgba(245, 158, 11, 0.08),
        inset 0 0 30px rgba(251, 191, 36, 0.08) !important;
}

html[data-theme="obsidian"] .ritual-sphere.inhale,
html[data-theme="linen"] .ritual-sphere.inhale {
    box-shadow:
        0 0 65px rgba(245, 158, 11, 0.40),
        0 0 130px rgba(245, 158, 11, 0.16),
        inset 0 0 45px rgba(251, 191, 36, 0.18) !important;
}

html[data-theme="obsidian"] .ritual-sphere.hold,
html[data-theme="linen"] .ritual-sphere.hold {
    box-shadow:
        0 0 55px rgba(245, 158, 11, 0.35),
        0 0 110px rgba(245, 158, 11, 0.12),
        inset 0 0 38px rgba(251, 191, 36, 0.14) !important;
}

html[data-theme="obsidian"] .ritual-sphere.exhale,
html[data-theme="linen"] .ritual-sphere.exhale {
    box-shadow:
        0 0 28px rgba(245, 158, 11, 0.14),
        0 0 55px rgba(245, 158, 11, 0.05),
        inset 0 0 22px rgba(251, 191, 36, 0.05) !important;
}

html[data-theme="obsidian"] .ritual-phase-label,
html[data-theme="linen"] .ritual-phase-label {
    background: linear-gradient(135deg, #fffbeb 0%, #fde68a 35%, #f59e0b 80%, #d97706 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    filter: drop-shadow(0 2px 18px rgba(245, 158, 11, 0.45)) !important;
}

html[data-theme="obsidian"] .ritual-phase-sub,
html[data-theme="linen"] .ritual-phase-sub {
    color: #fde68a !important;
    opacity: 0.88 !important;
    text-shadow: 0 2px 10px rgba(245, 158, 11, 0.30) !important;
}

html[data-theme="obsidian"] .ritual-cycle-dot,
html[data-theme="linen"] .ritual-cycle-dot {
    background: rgba(245, 158, 11, 0.10) !important;
    border-color: rgba(245, 158, 11, 0.18) !important;
}

html[data-theme="obsidian"] .ritual-cycle-dot.done,
html[data-theme="linen"] .ritual-cycle-dot.done {
    background: #f59e0b !important;
    border-color: #fbbf24 !important;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.55) !important;
}

html[data-theme="obsidian"] .ritual-cycle-dot.active,
html[data-theme="linen"] .ritual-cycle-dot.active {
    background: rgba(245, 158, 11, 0.35) !important;
    border-color: #fbbf24 !important;
}

html[data-theme="obsidian"] .ritual-start-btn,
html[data-theme="linen"] .ritual-start-btn {
    background: linear-gradient(135deg, #d97706, #b45309) !important;
    box-shadow: 0 6px 24px rgba(217, 119, 6, 0.45), 0 0 0 1px rgba(255,255,255,0.08) inset !important;
}

html[data-theme="obsidian"] .ritual-start-btn:hover,
html[data-theme="linen"] .ritual-start-btn:hover {
    box-shadow: 0 10px 36px rgba(217, 119, 6, 0.60), 0 0 0 1px rgba(255,255,255,0.10) inset !important;
}

html[data-theme="obsidian"] .ritual-tile-glow,
html[data-theme="linen"] .ritual-tile-glow {
    background: radial-gradient(circle, rgba(245, 158, 11, 0.10) 0%, transparent 60%) !important;
}

html[data-theme="obsidian"] .ritual-bottom-tile:hover,
html[data-theme="linen"] .ritual-bottom-tile:hover {
    border-color: rgba(245, 158, 11, 0.45) !important;
    box-shadow: 0 12px 40px rgba(245, 158, 11, 0.18), 0 8px 32px rgba(0, 0, 0, 0.4) !important;
}

html[data-theme="obsidian"] .ritual-tile-icon,
html[data-theme="linen"] .ritual-tile-icon {
    background: rgba(245, 158, 11, 0.12) !important;
    border-color: rgba(245, 158, 11, 0.28) !important;
}

html[data-theme="obsidian"] .ritual-bottom-tile:hover .ritual-tile-icon,
html[data-theme="linen"] .ritual-bottom-tile:hover .ritual-tile-icon {
    background: rgba(245, 158, 11, 0.22) !important;
    box-shadow: 0 0 18px rgba(245, 158, 11, 0.35) !important;
}

html[data-theme="obsidian"] .ritual-bottom-tile:hover .ritual-tile-arrow,
html[data-theme="linen"] .ritual-bottom-tile:hover .ritual-tile-arrow {
    color: #fbbf24 !important;
}

/* Linen: Notes */

html[data-theme="linen"] .notes-editor-overlay {
    background: #fbf8f3 !important;
    color: #2c1a0e !important;
}

html[data-theme="linen"] .notes-editor-content {
    color: #2c1a0e !important;
}

html[data-theme="linen"] .notes-format-toolbar {
    background: #ffffff !important;
    border-color: rgba(168, 122, 85, 0.16) !important;
    box-shadow: 0 6px 24px rgba(44, 26, 14, 0.08) !important;
}

html[data-theme="linen"] .notes-format-toolbar::after {
    background: #ffffff !important;
    border-color: rgba(168, 122, 85, 0.16) !important;
}

html[data-theme="linen"] .notes-fmt-btn { color: #6b584a !important; }

html[data-theme="linen"] .notes-fmt-btn:hover,
html[data-theme="linen"] .notes-fmt-btn.active {
    background: rgba(194, 94, 0, 0.10) !important;
    color: #c25e00 !important;
}

html[data-theme="linen"] .notes-library-panel,
html[data-theme="linen"] .notes-list-panel {
    background: #fbf8f3 !important;
    border-color: rgba(168, 122, 85, 0.12) !important;
}

html[data-theme="linen"] .notes-list-item { color: #2c1a0e !important; }

html[data-theme="linen"] .notes-list-item:hover,
html[data-theme="linen"] .notes-list-item.active {
    background: rgba(194, 94, 0, 0.08) !important;
    color: #2c1a0e !important;
}

/* Linen: Settings text */
html[data-theme="linen"] h3,
html[data-theme="linen"] label,
html[data-theme="linen"] .settings-label,
html[data-theme="linen"] .settings-value-label {
    color: #2c1a0e !important;
}

html[data-theme="linen"] .settings-description,
html[data-theme="linen"] p {
    color: #6b584a !important;
}

/* Linen: Dashboard stat values */
html[data-theme="linen"] .stat-card-value {
    background: linear-gradient(135deg, #2c1a0e 0%, #c25e00 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

/* Linen: color picker grid */
html[data-theme="linen"] .color-picker-grid {
    background: #f3eee6 !important;
    border-color: rgba(168, 122, 85, 0.14) !important;
}

/* Linen: selection & scrollbars */
html[data-theme="linen"] ::selection {
    background: rgba(194, 94, 0, 0.20) !important;
    color: #2c1a0e !important;
}

html[data-theme="linen"] ::-webkit-scrollbar-thumb {
    background: rgba(168, 122, 85, 0.22) !important;
}

html[data-theme="linen"] ::-webkit-scrollbar-thumb:hover {
    background: rgba(194, 94, 0, 0.35) !important;
}

/* ==============================================
   AMBER OBSIDIAN — COMPLETE COMPONENT OVERRIDES
   ============================================== */
html[data-theme="obsidian"] body {
    background-color: #090807 !important;
    background-image:
        radial-gradient(ellipse 80% 60% at 10% -10%,  rgba(245, 158, 11, 0.18) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 90% 110%,  rgba(217, 119, 6, 0.14) 0%, transparent 55%),
        radial-gradient(ellipse 100% 100% at 50% 50%, #12100d 0%, #090807 100%) !important;
    color: #fef3c7 !important;
}

/* Obsidian: cards */
html[data-theme="obsidian"] .ui-card,
html[data-theme="obsidian"] .modal-content,
html[data-theme="obsidian"] .settings-section-card,
html[data-theme="obsidian"] .dashboard-card,
html[data-theme="obsidian"] .notes-card,
html[data-theme="obsidian"] .task-card,
html[data-theme="obsidian"] .task-item,
html[data-theme="obsidian"] .ritual-card,
html[data-theme="obsidian"] .ambient-track-card,
html[data-theme="obsidian"] .fab-nav-menu,
html[data-theme="obsidian"] .task-composer,
html[data-theme="obsidian"] .notes-category-group,
html[data-theme="obsidian"] .timer-card-main,
html[data-theme="obsidian"] .stat-card,
html[data-theme="obsidian"] .category-card,
html[data-theme="obsidian"] .ritual-bottom-tile {
    background: rgba(22, 19, 15, 0.80) !important;
    border-color: rgba(245, 158, 11, 0.18) !important;
    box-shadow: 0 6px 28px rgba(0, 0, 0, 0.65) !important;
}

html[data-theme="obsidian"] .ui-card:hover {
    border-color: rgba(245, 158, 11, 0.38) !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(245, 158, 11, 0.14) !important;
}

/* Obsidian: active task */
html[data-theme="obsidian"] .task-item.active-focus-task {
    background: rgba(245, 158, 11, 0.12) !important;
    border-color: rgba(245, 158, 11, 0.55) !important;
    box-shadow: 0 0 28px rgba(245, 158, 11, 0.22), inset 0 0 12px rgba(245, 158, 11, 0.05) !important;
}

/* Obsidian: header title */
html[data-theme="obsidian"] .header-title-wrap h1,
html[data-theme="obsidian"] .modal-title {
    background: linear-gradient(135deg, #fef3c7 0%, #fbbf24 55%, #ea580c 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

/* Obsidian: buttons */
html[data-theme="obsidian"] .btn-primary,
html[data-theme="obsidian"] #capsule-form-submit-btn,
html[data-theme="obsidian"] .task-submit-btn,
html[data-theme="obsidian"] #add-task-btn {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    color: #181104 !important;
    font-weight: 700 !important;
    letter-spacing: 0.02em !important;
    border: 1px solid rgba(251, 191, 36, 0.4) !important;
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
}

html[data-theme="obsidian"] .btn-primary:hover,
html[data-theme="obsidian"] #add-task-btn:hover {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%) !important;
    box-shadow: 0 6px 24px rgba(245, 158, 11, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
}

html[data-theme="obsidian"] .btn-icon {
    color: #d6d3d1 !important;
}

html[data-theme="obsidian"] .btn-icon:hover {
    background: rgba(245, 158, 11, 0.12) !important;
    color: #fbbf24 !important;
}

/* Obsidian: Filter pills */
html[data-theme="obsidian"] .filter-pill {
    background: rgba(245, 158, 11, 0.06) !important;
    border-color: rgba(245, 158, 11, 0.16) !important;
    color: #d6d3d1 !important;
}

html[data-theme="obsidian"] .filter-pill:hover {
    background: rgba(245, 158, 11, 0.12) !important;
    border-color: rgba(245, 158, 11, 0.30) !important;
    color: #fbbf24 !important;
}

html[data-theme="obsidian"] .filter-pill.active {
    background: rgba(245, 158, 11, 0.20) !important;
    border-color: rgba(245, 158, 11, 0.50) !important;
    color: #fbbf24 !important;
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.22) !important;
    font-weight: 700 !important;
}

/* Obsidian: Composer controls */
html[data-theme="obsidian"] .date-picker-wrap,
html[data-theme="obsidian"] .pomodoro-estimate-wrap {
    background: rgba(245, 158, 11, 0.07) !important;
    border-color: rgba(245, 158, 11, 0.20) !important;
}

html[data-theme="obsidian"] .date-picker-wrap:hover,
html[data-theme="obsidian"] .pomodoro-estimate-wrap:hover {
    background: rgba(245, 158, 11, 0.13) !important;
    border-color: rgba(245, 158, 11, 0.38) !important;
}

html[data-theme="obsidian"] .composer-capsule-inline .capsule-select-dropdown {
    background: rgba(245, 158, 11, 0.07) !important;
    border-color: rgba(245, 158, 11, 0.20) !important;
    color: #fef3c7 !important;
}

html[data-theme="obsidian"] .priority-toggle-group {
    background: rgba(245, 158, 11, 0.06) !important;
    border-color: rgba(245, 158, 11, 0.18) !important;
}

html[data-theme="obsidian"] .priority-toggle-btn:not(:last-child) {
    border-right-color: rgba(245, 158, 11, 0.14) !important;
}

html[data-theme="obsidian"] .priority-toggle-btn:hover {
    background: rgba(245, 158, 11, 0.10) !important;
    color: #fbbf24 !important;
}

/* Obsidian: Checkbox */
html[data-theme="obsidian"] .checkbox-custom {
    border-color: rgba(245, 158, 11, 0.30) !important;
}

html[data-theme="obsidian"] .checkbox-custom:hover {
    border-color: #f59e0b !important;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.35) !important;
}

html[data-theme="obsidian"] .checkbox-custom:checked {
    background: linear-gradient(135deg, #f59e0b, #fbbf24) !important;
    border-color: transparent !important;
    box-shadow: 0 0 14px rgba(245, 158, 11, 0.5) !important;
}

/* Obsidian: task timer badge */
html[data-theme="obsidian"] .task-timer-live-badge {
    background: rgba(245, 158, 11, 0.14) !important;
    color: #fbbf24 !important;
    border-color: rgba(245, 158, 11, 0.30) !important;
}

/* Obsidian: meta tags */
html[data-theme="obsidian"] .meta-tag.category {
    background: rgba(245, 158, 11, 0.08) !important;
    color: #d6d3d1 !important;
    border-color: rgba(245, 158, 11, 0.18) !important;
}

html[data-theme="obsidian"] .meta-tag.due-date {
    background: rgba(245, 158, 11, 0.14) !important;
    color: #fbbf24 !important;
}

/* Obsidian: tab/switcher groups */
html[data-theme="obsidian"] .settings-tabs,
html[data-theme="obsidian"] .view-switcher-pill,
html[data-theme="obsidian"] .dashboard-tabs {
    background: rgba(22, 19, 15, 0.90) !important;
    border-color: rgba(245, 158, 11, 0.18) !important;
}

html[data-theme="obsidian"] .settings-tab-btn,
html[data-theme="obsidian"] .view-switcher-btn,
html[data-theme="obsidian"] .dashboard-tab-btn {
    color: #d6d3d1 !important;
    background: transparent !important;
}

html[data-theme="obsidian"] .settings-tab-btn:hover,
html[data-theme="obsidian"] .view-switcher-btn:hover,
html[data-theme="obsidian"] .dashboard-tab-btn:hover {
    color: #fbbf24 !important;
    background: rgba(245, 158, 11, 0.09) !important;
}

html[data-theme="obsidian"] .settings-tab-btn.active,
html[data-theme="obsidian"] .view-switcher-btn.active,
html[data-theme="obsidian"] .dashboard-tab-btn.active {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    color: #181104 !important;
    font-weight: 700 !important;
    border: 1px solid rgba(251, 191, 36, 0.35) !important;
    box-shadow: 0 3px 12px rgba(245, 158, 11, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
}

/* Obsidian: FAB Navigation Button */
html[data-theme="obsidian"] .fab-nav-btn {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    color: #181104 !important;
    box-shadow: 0 6px 24px rgba(245, 158, 11, 0.45), inset 0 1.5px 0 rgba(255, 255, 255, 0.35) !important;
}

html[data-theme="obsidian"] .fab-nav-btn::after {
    border-color: rgba(245, 158, 11, 0.45) !important;
}

/* Obsidian: stat values */
html[data-theme="obsidian"] .stat-card-value {
    background: linear-gradient(135deg, #fef3c7 0%, #fbbf24 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

/* Obsidian: Timer */
html[data-theme="obsidian"] .timer-countdown {
    background: linear-gradient(180deg, #fef3c7 30%, #fbbf24 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    filter: drop-shadow(0 2px 14px rgba(245, 158, 11, 0.40)) !important;
}

html[data-theme="obsidian"] .timer-card-main::before {
    background: radial-gradient(ellipse at 50% -20%, rgba(245, 158, 11, 0.14) 0%, transparent 65%) !important;
}

html[data-theme="obsidian"] .timer-dot {
    border-color: rgba(245, 158, 11, 0.25) !important;
    background: transparent !important;
}

html[data-theme="obsidian"] .timer-dot.active {
    background: #f59e0b !important;
    border-color: #f59e0b !important;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.90) !important;
}

/* Obsidian: Notes */
html[data-theme="obsidian"] .notes-editor-overlay {
    background: #0e0c09 !important;
    color: #fef3c7 !important;
}

html[data-theme="obsidian"] .notes-editor-content {
    color: #fef3c7 !important;
}

html[data-theme="obsidian"] .notes-format-toolbar {
    background: rgba(22, 19, 15, 0.96) !important;
    border-color: rgba(245, 158, 11, 0.25) !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.65) !important;
}

html[data-theme="obsidian"] .notes-fmt-btn { color: #d6d3d1 !important; }

html[data-theme="obsidian"] .notes-fmt-btn:hover,
html[data-theme="obsidian"] .notes-fmt-btn.active {
    background: rgba(245, 158, 11, 0.15) !important;
    color: #fbbf24 !important;
}

/* Obsidian: nav */
html[data-theme="obsidian"] .sidebar,
html[data-theme="obsidian"] .top-nav {
    background: rgba(14, 12, 9, 0.96) !important;
    border-color: rgba(245, 158, 11, 0.16) !important;
}

/* Obsidian: Selection & scrollbar */
html[data-theme="obsidian"] ::selection {
    background: rgba(245, 158, 11, 0.28) !important;
    color: #0c0a06 !important;
}

html[data-theme="obsidian"] ::-webkit-scrollbar-thumb {
    background: rgba(245, 158, 11, 0.25) !important;
}

html[data-theme="obsidian"] ::-webkit-scrollbar-thumb:hover {
    background: rgba(245, 158, 11, 0.45) !important;
}

/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html { scroll-behavior: smooth; }

/* =============================================
   HEADER TITLE & BRAND LOGO TYPOGRAPHY
   ============================================= */
.header-title-wrap h1 {
    font-size: 1.85rem !important;
    font-weight: 800 !important;
    font-family: var(--font-sans) !important;
    letter-spacing: -0.035em !important;
    background: linear-gradient(135deg, #ffffff 0%, #e2e8ff 35%, #a855f7 70%, #06b6d4 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    filter: drop-shadow(0 2px 14px rgba(124, 58, 237, 0.45)) !important;
    margin: 0 !important;
    line-height: 1 !important;
    transition: filter 0.3s ease, transform 0.3s ease !important;
}

.header-title-wrap:hover h1 {
    filter: drop-shadow(0 4px 22px rgba(124, 58, 237, 0.70)) drop-shadow(0 0 25px rgba(6, 182, 212, 0.45)) !important;
    transform: translateY(-0.5px);
}

body {
    background-color: var(--bg-primary);
    background-image:
        radial-gradient(ellipse 80% 60% at 10% -10%,  var(--primary-glow) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 90% 110%,  var(--accent-glow) 0%, transparent 55%),
        radial-gradient(ellipse 100% 100% at 50% 50%, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body.zen-open {
    overflow: hidden !important;
}

/* Custom Scrollbars */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(124,58,237,0.25); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(124,58,237,0.45); }

/* =============================================
   APP SHELL
   ============================================= */
.app-shell {
    display: grid;
    grid-template-columns: 1fr;
    min-height: 100vh;
}

.app-sidebar { display: none !important; }

/* =============================================
   MAIN CONTENT AREA
   ============================================= */
.app-main {
    padding: 1rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* =============================================
   HEADER
   ============================================= */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.header-title-wrap h1 {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.75px;
    background: linear-gradient(135deg, #ffffff 0%, rgba(168,139,250,0.9) 60%, rgba(6,182,212,0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.15;
}

.header-title-wrap p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 5px;
    font-weight: 400;
}

.header-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* =============================================
   VIEW PANELS
   ============================================= */
.view-panel { display: none; }

.view-panel.active {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    animation: viewFadeIn 0.35s var(--ease-smooth);
}

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

/* =============================================
   CARDS
   ============================================= */
.ui-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(24px) saturate(1.8);
    -webkit-backdrop-filter: blur(24px) saturate(1.8);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.ui-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 20px 60px rgba(0,0,0,0.55), 0 0 0 1px rgba(124,58,237,0.08);
    transform: translateY(-1px);
}

/* =============================================
   BUTTONS
   ============================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--surface-raised);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-sans);
    letter-spacing: 0.2px;
    white-space: nowrap;
}

.btn:hover {
    background: var(--interactive-subtle);
    border-color: var(--border-hover);
    transform: translateY(-1px);
}

.btn:active { transform: scale(0.97) translateY(0); }

.btn-primary {
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 55%, #4338ca 100%);
    border: 1px solid rgba(255, 255, 255, 0.32);
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 6px 22px rgba(124, 58, 237, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.50);
    transition: all 0.22s var(--ease-spring);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #9333ea 0%, #7e22ce 55%, #4c1d95 100%);
    box-shadow: 0 8px 28px rgba(147, 51, 234, 0.70), inset 0 1px 0 rgba(255, 255, 255, 0.65);
    border-color: rgba(255, 255, 255, 0.40);
    transform: translateY(-1px);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-light) 100%);
    border-color: transparent;
    color: #060611;
    font-weight: 700;
    box-shadow: 0 4px 20px var(--accent-glow);
}

/* =============================================
   TIER BADGE (Pro / Free)
   ============================================= */
.tier-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 5px 12px;
    border-radius: 99px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    cursor: pointer;
    transition: all 0.22s var(--ease-spring);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #c7d2fe;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 2px 8px rgba(0, 0, 0, 0.25);
    user-select: none;
}

.tier-badge:hover {
    transform: translateY(-1px);
    background: rgba(124, 58, 237, 0.15);
    border-color: rgba(168, 85, 247, 0.40);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.30);
}

.tier-badge--pro {
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 55%, #4338ca 100%) !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    border: 1px solid rgba(255, 255, 255, 0.32) !important;
    box-shadow: 0 6px 22px rgba(124, 58, 237, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.50) !important;
    transition: all 0.22s var(--ease-spring) !important;
}

.tier-badge--pro:hover {
    background: linear-gradient(135deg, #9333ea 0%, #7e22ce 55%, #4c1d95 100%) !important;
    box-shadow: 0 8px 28px rgba(147, 51, 234, 0.70), inset 0 1px 0 rgba(255, 255, 255, 0.65) !important;
    transform: translateY(-1px) !important;
}

/* Obsidian: pro badge gets metallic amber gold finish */
html[data-theme="obsidian"] .tier-badge--pro {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    color: #181104 !important;
    font-weight: 800 !important;
    border: 1px solid rgba(251, 191, 36, 0.45) !important;
    box-shadow: 0 3px 12px rgba(245, 158, 11, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.35) !important;
}

/* Linen: pro badge uses amber gold */
html[data-theme="linen"] .tier-badge--pro {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    color: #ffffff;
    border-color: rgba(217, 119, 6, 0.20);
    box-shadow: 0 0 12px rgba(217, 119, 6, 0.35);
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 7px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.btn-icon:hover {
    background: var(--bg-glass);
    color: var(--text-primary);
}

/* =============================================
   PRODUCTIVITY HUB GRID
   ============================================= */
.productivity-hub-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: start;
    width: 100%;
}

.hub-left-column,
.hub-right-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-width: 0;
}

.hub-tasks-column {
    gap: 0.6rem;
}

/* View mode overrides */
.productivity-hub-grid.view-tasks .hub-timer-column { display: none !important; }
.productivity-hub-grid.view-tasks {
    grid-template-columns: 1fr !important;
    max-width: 100%;
    margin: 0 auto;
}

.productivity-hub-grid.view-timer .hub-tasks-column { display: none !important; }
.productivity-hub-grid.view-timer {
    grid-template-columns: 1fr !important;
    max-width: 600px;
    margin: 0 auto;
}

.productivity-hub-grid.view-split {
    grid-template-columns: 1fr;
}

/* =============================================
   VIEW SWITCHER PILL
   ============================================= */
.view-switcher-pill {
    display: inline-flex;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 4px;
    gap: 3px;
    align-items: center;
    backdrop-filter: blur(12px);
}

.view-switcher-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.view-switcher-btn:hover {
    color: var(--text-secondary);
    background: rgba(255,255,255,0.05);
}

.view-switcher-btn.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: #ffffff;
    box-shadow: 0 4px 14px var(--primary-glow);
}

.view-switcher-btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.2;
}

/* =============================================
   SELECT INPUTS
   ============================================= */
.select-input {
    width: 100%;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    padding: 10px 36px 10px 14px;
    font-family: var(--font-sans);
    font-size: 0.88rem;
    outline: none;
    transition: var(--transition);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.select-input:focus,
.select-input:hover {
    border-color: var(--border-hover);
    box-shadow: 0 0 14px var(--primary-glow);
    background: var(--bg-card-hover);
}

.select-input option {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.composer-select-wrapper {
    position: relative;
    width: auto;
    display: inline-block;
}

.composer-select-wrapper::after {
    content: '';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border: 4px solid transparent;
    border-top-color: var(--text-secondary);
    pointer-events: none;
}

/* =============================================
   CATEGORY CAPSULE
   ============================================= */
.category-capsule {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: none;
    transition: var(--transition);
}

/* =============================================
   COLOR PICKER
   ============================================= */
.color-picker-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 12px;
    padding: 10px 14px;
    background: var(--surface-inset);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    height: auto !important;
    min-height: 48px;
    align-items: center;
    overflow: visible;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.25);
}

.color-picker-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.22s var(--ease-spring);
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.color-picker-dot:hover {
    transform: scale(1.22);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.color-picker-dot.selected {
    border-color: #ffffff;
    transform: scale(1.2);
    box-shadow: 0 0 14px currentColor, 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* =============================================
   CAPSULE MANAGEMENT LIST
   ============================================= */
.capsules-mgmt-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    padding-right: 4px;
    margin-top: 6px;
}

.capsules-mgmt-list::-webkit-scrollbar { width: 4px; }
.capsules-mgmt-list::-webkit-scrollbar-track { background: transparent; }
.capsules-mgmt-list::-webkit-scrollbar-thumb { background: rgba(124,58,237,0.2); border-radius: 2px; }

.capsules-mgmt-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 14px;
    background: var(--surface-subtle);
    border: 1px solid var(--divider-color);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.capsules-mgmt-row:hover { background: var(--surface-raised); }

.capsules-mgmt-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.capsules-default-badge {
    font-size: 0.62rem;
    font-weight: 700;
    color: var(--success-color);
    background: rgba(16,185,129,0.12);
    border: 1px solid rgba(16,185,129,0.25);
    padding: 2px 7px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

/* =============================================
   MODALS
   ============================================= */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: var(--modal-overlay-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: backdropFadeIn 0.2s ease;
}

@keyframes backdropFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.modal-content {
    width: 95%;
    max-width: 480px;
    max-height: 88vh;
    overflow-y: auto;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2rem;
    position: relative;
    box-shadow: 0 32px 80px rgba(0,0,0,0.7), 0 0 0 1px var(--shimmer);
    backdrop-filter: blur(32px);
    -webkit-backdrop-filter: blur(32px);
    animation: modalSlideIn 0.3s var(--ease-spring) forwards;
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(20px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0)   scale(1);    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.3px;
    background: linear-gradient(135deg, #ffffff, var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-close-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-raised);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1.2rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    line-height: 1;
}

.modal-close-btn:hover {
    background: rgba(239,68,68,0.15);
    border-color: rgba(239,68,68,0.3);
    color: #f87171;
}

/* =============================================
   UNIFIED FAB NAVIGATION SYSTEM
   ============================================= */
.fab-nav-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1010;
    pointer-events: none; /* Let clicks pass through empty outer bar */
    display: flex;
    justify-content: center;
    width: 100%;
}

.fab-nav-aligner {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    position: relative;
    height: 80px; /* Contains vertical offset */
    padding: 0 2.5rem;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    pointer-events: none;
}

.fab-nav-btn {
    pointer-events: auto; /* Re-enable clicks */
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border: none;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px var(--primary-glow), 0 4px 12px rgba(0,0,0,0.5), inset 0 1.5px 0 rgba(255,255,255,0.25);
    transition: all 0.3s var(--ease-spring);
    position: absolute;
    bottom: 24px;
    right: 2.5rem; /* Pin inside aligner padding */
}

.fab-nav-btn::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 1px solid rgba(124,58,237,0.35);
    pointer-events: none;
    animation: fabBtnPulse 3s ease-in-out infinite;
}

@keyframes fabBtnPulse {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 0.9; transform: scale(1.08); }
}

.fab-nav-btn:hover {
    transform: scale(1.08) rotate(90deg);
    box-shadow: 0 12px 40px rgba(124,58,237,0.65), inset 0 1.5px 0 rgba(255,255,255,0.3);
}

.fab-nav-btn:active {
    transform: scale(0.95);
}

.fab-nav-btn svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    transition: var(--transition);
}

.fab-nav-menu {
    position: absolute;
    bottom: 90px;
    right: 2.5rem;
    pointer-events: auto; /* Re-enable clicks */
    background: rgba(10, 10, 24, 0.9);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-xl);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 220px;
    box-shadow: 0 24px 72px rgba(0,0,0,0.8), inset 0 1px 0 rgba(255,255,255,0.05);
    opacity: 0;
    transform: translateY(20px) scale(0.9);
    pointer-events: none;
    transition: all 0.3s var(--ease-spring);
    transform-origin: bottom right;
}

.fab-nav-container.open .fab-nav-menu {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.fab-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 600;
    text-align: left;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

.fab-menu-item:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
}

.fab-menu-item.active {
    background: rgba(124, 58, 237, 0.12);
    color: var(--primary-light);
}

.fab-menu-item svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.2;
    flex-shrink: 0;
    transition: var(--transition);
}

.fab-menu-item.active svg {
    filter: drop-shadow(0 0 4px var(--primary-glow));
}

.fab-menu-divider {
    height: 1px;
    background: rgba(255,255,255,0.06);
    margin: 4px 6px;
}

.fab-menu-item.gopro-item {
    background: rgba(124, 58, 237, 0.08) !important;
    border: 1px solid rgba(124, 58, 237, 0.2) !important;
    color: var(--primary-light) !important;
    text-decoration: none !important;
}

.fab-menu-item.gopro-item:hover {
    background: rgba(124, 58, 237, 0.16) !important;
    border-color: rgba(124, 58, 237, 0.35) !important;
    box-shadow: 0 0 15px rgba(124, 58, 237, 0.15);
}

@media (max-width: 768px) {
    .fab-nav-aligner {
        padding: 0 1.25rem;
        height: calc(56px + 16px + env(safe-area-inset-bottom));
    }
    .fab-nav-btn {
        bottom: calc(16px + env(safe-area-inset-bottom));
        right: 1.25rem;
    }
    .fab-nav-menu {
        bottom: calc(56px + 28px + env(safe-area-inset-bottom));
        right: 1.25rem;
    }

    /* Ambient Sound Cards mobile overrides */
    .ambient-list {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px;
    }

    .ambient-track-card {
        flex-direction: column !important;
        justify-content: center;
        align-items: center !important;
        padding: 14px 10px !important;
        text-align: center;
        gap: 7px !important;
    }

    .ambient-track-card.active .ambient-volume-slider-mini {
        display: block !important;
        width: 80% !important;
        margin-top: 6px !important;
    }
}

/* =============================================
   SETTINGS VIEW (FULL PAGE)
   ============================================= */
.settings-page-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.settings-back-btn {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.settings-back-btn:hover {
    background: rgba(124,58,237,0.1);
    border-color: rgba(124,58,237,0.3);
    color: var(--primary-light);
}

.settings-back-btn svg { width: 18px; height: 18px; stroke: currentColor; }

/* Settings Tabs */
.settings-tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 5px;
    width: fit-content;
}

.settings-tab-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.settings-tab-btn svg { width: 15px; height: 15px; stroke: currentColor; }

.settings-tab-btn:hover {
    color: var(--text-primary);
    background: var(--surface-raised);
}

.settings-tab-btn.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: #ffffff;
    box-shadow: 0 4px 14px var(--primary-glow);
}

/* Settings Content Panels */
.settings-tab-panel { display: none; }
.settings-tab-panel.active {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    animation: viewFadeIn 0.25s ease;
}

.settings-content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 1.5rem;
    align-items: start;
}

.settings-section-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-md);
}

.settings-section-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary-light);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.settings-section-title svg { width: 14px; height: 14px; stroke: currentColor; }

.settings-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 1rem;
}

.settings-field:last-child { margin-bottom: 0; }

.settings-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.2px;
}

/* Settings number inputs */
.settings-number-input {
    width: 100%;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    padding: 11px 14px;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 500;
    outline: none;
    transition: var(--transition);
}

.settings-number-input:focus {
    border-color: var(--border-hover);
    box-shadow: 0 0 16px var(--primary-glow);
    background: var(--bg-card-hover);
}

/* ── Settings Toggle Switch (iOS-style) ── */
.settings-toggle-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    width: 44px;
    height: 24px;
    cursor: pointer;
    flex-shrink: 0;
}

.settings-toggle-switch input[type="checkbox"] {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.settings-toggle-slider {
    position: absolute;
    inset: 0;
    border-radius: 24px;
    background: var(--surface-raised);
    border: 1px solid var(--border-color);
    transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.settings-toggle-slider::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--text-muted);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), background 0.25s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.settings-toggle-switch input:checked + .settings-toggle-slider {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-color: transparent;
    box-shadow: 0 0 10px var(--primary-glow);
}

.settings-toggle-switch input:checked + .settings-toggle-slider::before {
    transform: translateX(20px);
    background: #ffffff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

.settings-toggle-switch:hover .settings-toggle-slider {
    border-color: var(--border-hover);
}


/* Backup buttons row */
.settings-action-row {
    display: flex;
    gap: 10px;
}

.settings-action-row .btn { flex: 1; }

/* =============================================
   AMBIENT SOUND CARDS
   ============================================= */
.ambient-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.ambient-track-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 10px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    box-shadow: var(--shadow-sm);
}

.ambient-track-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    background: var(--bg-card-hover);
}

.ambient-track-card.active {
    background: var(--surface-raised);
    border-color: var(--primary-color);
    box-shadow: 0 0 20px var(--primary-glow);
}

.ambient-track-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.ambient-track-card.active .ambient-track-icon { color: var(--primary-light); }
.ambient-track-card.active .ambient-track-icon svg { filter: drop-shadow(0 0 6px var(--primary-light)); }

.ambient-track-icon svg { width: 20px; height: 20px; }
.ambient-track-name { font-size: 0.73rem; font-weight: 600; letter-spacing: 0.4px; }

/* Volume Slider */
.volume-slider-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 10px 14px;
    border-radius: var(--radius-md);
}

.volume-slider-wrap svg { width: 16px; height: 16px; stroke: var(--text-secondary); flex-shrink: 0; }

.volume-range {
    flex: 1;
    appearance: none;
    height: 4px;
    border-radius: 2px;
    background: var(--surface-raised);
    outline: none;
    cursor: pointer;
}

.volume-range::-webkit-slider-thumb {
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--primary-light);
    cursor: pointer;
    box-shadow: 0 0 10px var(--primary-glow);
    transition: var(--transition);
}

.volume-range::-webkit-slider-thumb:hover { transform: scale(1.3); }

/* =============================================
   TOAST NOTIFICATIONS
   ============================================= */
#toast-container {
    position: fixed;
    bottom: 2rem;
    right: 6rem;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
    .productivity-hub-grid {
        display: flex;
        flex-direction: column;
        width: 100%;
    }
    .hub-left-column,
    .hub-right-column {
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 768px) {
    .app-main {
        padding: 1rem;
        gap: 1rem;
    }

    .main-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .header-title-wrap h1 { font-size: 1.45rem; }

    .productivity-hub-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .hub-left-column,
    .hub-right-column {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }

    .settings-content-grid {
        grid-template-columns: 1fr;
    }

    .settings-tabs {
        width: 100%;
        overflow-x: auto;
    }
}

@media (max-width: 480px) {
    .settings-tabs { gap: 2px; }
    .settings-tab-btn { padding: 8px 12px; font-size: 0.82rem; }
}

/* =============================================
   UTILITY ANIMATIONS
   ============================================= */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes toastIn {
    from { opacity: 0; transform: translateY(16px) scale(0.92); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastOut {
    from { opacity: 1; transform: translateY(0) scale(1); }
    to   { opacity: 0; transform: translateY(10px) scale(0.92); }
}

/* Shake animation for composer */
@keyframes shake {
    10%, 90%  { transform: translate3d(-1px, 0, 0); }
    20%, 80%  { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60%  { transform: translate3d(4px, 0, 0); }
}

.shake-animation { animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both; }

/* Sidebar nav (hidden, legacy) */
.brand-section { display: flex; align-items: center; gap: 10px; }
.nav-links { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 10px 14px; color: var(--text-secondary); text-decoration: none; font-weight: 500; border-radius: var(--radius-md); cursor: pointer; transition: var(--transition); }
.nav-item:hover, .nav-item.active { color: var(--text-primary); background: var(--bg-glass); }
.nav-item.active { background: rgba(124,58,237,0.1); color: var(--primary-light); }
.sidebar-footer { margin-top: auto; display: flex; flex-direction: column; gap: 12px; }

/* Settings section legacy alias */
.settings-section { margin-bottom: 0; }

/* History filters */
.history-filters { display: flex; gap: 10px; justify-content: flex-end; align-items: center; }

/* Login Prompt Modal Styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(6, 6, 17, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}
.modal-container {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.2rem;
    width: 90%;
    max-width: 450px;
    box-shadow: var(--shadow-xl);
    text-align: center;
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.modal-overlay.open .modal-container {
    transform: translateY(0);
}
.modal-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-family: var(--font-sans);
}
.modal-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 1.8rem;
    font-family: var(--font-sans);
}
.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.modal-btn {
    padding: 12px 24px;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    transition: var(--transition);
}
.modal-btn-primary {
    background: var(--primary-color);
    color: #fff;
    border: none;
}
.modal-btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 0 16px var(--primary-glow);
}
.modal-btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}
.modal-btn-secondary:hover {
    background: var(--bg-glass);
    color: var(--text-primary);
}
.leaderboard-row-highlight {
    background: rgba(124, 58, 237, 0.15) !important;
    border: 1px solid var(--primary-color) !important;
}
.leaderboard-gap {
    text-align: center;
    color: var(--text-muted);
    font-weight: bold;
    padding: 4px 0;
    font-size: 1.2rem;
    letter-spacing: 4px;
}

/* Profile Card Styling (MCQ Kash Style) */
.profile-card {
    display: flex;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    gap: 32px;
    align-items: center;
    box-shadow: var(--shadow-lg);
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.profile-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 250px;
    text-align: center;
}
.profile-avatar-wrapper {
    position: relative;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.profile-avatar-wrapper::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    border: 4px solid var(--timer-work);
    box-shadow: 0 0 12px var(--timer-work-glow);
}
.profile-avatar-wrapper.pro::before {
    border: 4px solid var(--accent-color);
    box-shadow: 0 0 16px var(--accent-glow);
}
.profile-avatar-inner {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
}
.profile-name {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
}
.profile-username {
    font-size: 0.95rem;
    color: var(--timer-work);
    font-weight: 600;
    font-family: var(--font-mono);
}
.profile-username.pro {
    color: var(--accent-light);
}
.profile-rank-badge {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: var(--timer-work);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-top: 4px;
}
.profile-rank-badge.pro {
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.3);
    color: var(--accent-light);
}
.profile-right {
    flex: 1.2;
    min-width: 250px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.profile-stat-row {
    display: flex;
    align-items: center;
    gap: 16px;
}
.profile-stat-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.profile-stat-icon-wrap.rank {
    background: rgba(245, 158, 11, 0.1);
    color: var(--timer-work);
}
.profile-stat-icon-wrap.percent {
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
}
.profile-stat-icon-wrap.today {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}
.profile-stat-info {
    display: flex;
    flex-direction: column;
}
.profile-stat-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.profile-stat-value {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-primary);
}
.avatar-selector-grid {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 8px 4px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.avatar-selector-grid::-webkit-scrollbar {
    display: none;
}
.avatar-select-item {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: var(--transition);
    flex-shrink: 0;
    background: var(--bg-secondary);
    padding: 2px;
}
.avatar-select-item.selected {
    border-color: var(--primary-color);
    box-shadow: 0 0 12px var(--primary-glow);
}
/* Native Diamond Badge CSS */
.pro-diamond-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #06b6d4, #7c3aed);
    color: #ffffff;
    font-weight: 800;
    font-size: 0.72rem;
    padding: 3px 8px;
    border-radius: 12px;
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Premium Profile Card (MCQ Kash Inspired) */
.profile-card-premium {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #0c0d14;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 35px;
    gap: 30px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6);
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.profile-card-premium.pro {
    background: linear-gradient(135deg, #0e0d16 0%, #16110a 50%, #0a0b10 100%);
    border: 1px solid rgba(245, 158, 11, 0.35) !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 35px rgba(245, 158, 11, 0.08), inset 0 0 15px rgba(245, 158, 11, 0.02) !important;
}
.profile-left-section-premium {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    flex: 1.3;
    min-width: 320px;
}
.profile-header-flex-wrapper {
    display: flex;
    align-items: center;
    gap: 28px;
    width: 100%;
}
.profile-details-column-premium {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    text-align: left;
}
.profile-avatar-premium-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.profile-avatar-premium-inner {
    width: 86px;
    height: 86px;
    border-radius: 50%;
    overflow: hidden;
    background: #131622;
    border: 2px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    position: absolute;
}
.profile-avatar-premium-inner svg {
    width: 100%;
    height: 100%;
}
.profile-badge-pro-premium {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.25);
    color: #f59e0b;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.profile-badge-free-premium {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
}
.profile-name-premium {
    font-size: 2.1rem;
    font-weight: 900;
    color: #ffffff;
    margin: 2px 0 0 0;
    line-height: 1.15;
    letter-spacing: -0.5px;
}
.profile-handle-premium {
    font-size: 0.95rem;
    font-weight: 600;
    color: #a78bfa;
    font-family: var(--font-mono);
}
.profile-handle-premium.pro {
    color: #f59e0b;
}
.profile-rank-premium-capsule {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(124, 58, 237, 0.06);
    border: 1px solid rgba(124, 58, 237, 0.18);
    color: #a78bfa;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-top: 6px;
}
.profile-rank-premium-capsule.pro {
    background: rgba(245, 158, 11, 0.06);
    border: 1px solid rgba(245, 158, 11, 0.18);
    color: #f59e0b;
}
.profile-right-panel-premium {
    flex: 1;
    min-width: 290px;
    background: #0f111a;
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 20px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.profile-stat-row-premium {
    display: flex;
    align-items: center;
    gap: 16px;
}
.profile-stat-icon-wrapper-premium {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.profile-stat-icon-wrapper-premium.rank {
    color: #f59e0b;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.1);
}
.profile-stat-icon-wrapper-premium.percent {
    color: #6366f1;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.1);
}
.profile-stat-icon-wrapper-premium.goal {
    color: #10b981;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.1);
}
.profile-stat-label-premium {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.profile-stat-value-premium {
    font-size: 1.35rem;
    font-weight: 800;
    color: #ffffff;
}

/* Premium Pro Banner card */
.premium-upsell-banner-card {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.08) 0%, rgba(124, 58, 237, 0.08) 100%);
    border: 1px solid rgba(6, 182, 212, 0.2);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin-top: 15px;
}
.premium-upsell-banner-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.03) 0%, transparent 60%);
    pointer-events: none;
}
.premium-edit-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.25s ease;
}
.premium-edit-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.2);
}
@media (max-width: 768px) {
    /* Mobile Responsive Discord Community Banners */
    .discord-community-card,
    .lb-discord-banner {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 14px !important;
        padding: 16px !important;
    }
    .discord-community-card-left,
    .lb-discord-banner-left {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        width: 100% !important;
        min-width: unset !important;
    }
    .discord-community-btn,
    .lb-discord-btn {
        width: 100% !important;
        margin-left: 0 !important;
        justify-content: center !important;
        padding: 11px 18px !important;
    }

    .profile-card-premium {
        flex-direction: column !important;
        align-items: center !important;
        padding: 24px 20px;
        gap: 24px;
        text-align: center;
        justify-content: center;
    }
    .profile-left-section-premium {
        align-items: center !important;
        width: 100% !important;
        min-width: unset !important;
        flex: unset !important;
    }
    .profile-header-flex-wrapper {
        flex-direction: column;
        align-items: center !important;
        text-align: center !important;
        gap: 16px;
        width: 100%;
    }
    .profile-details-column-premium {
        align-items: center !important;
        text-align: center !important;
    }
    .profile-rank-premium-capsule {
        margin: 12px auto 0 auto !important;
        text-align: center;
        width: fit-content;
    }
    .premium-edit-btn {
        position: static;
        margin-top: 10px;
        width: 100%;
        justify-content: center;
    }
    .profile-left {
        width: 100%;
    }
    .profile-right-panel-premium {
        width: 100% !important;
        min-width: unset !important;
        flex: unset !important;
    }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* =============================================
   PICTURE IN PICTURE BUTTON
   ============================================= */
.timer-btn-round#timer-pip-btn svg {
    width: 20px;
    height: 20px;
}

/* =============================================
   AMBIENT MIXER INDIVIDUAL SLIDERS
   ============================================= */
.ambient-volume-slider-mini {
    width: 80%;
    height: 4px;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    outline: none;
    margin-top: 6px;
    display: none;
}
.ambient-volume-slider-mini::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary-light);
    cursor: pointer;
    box-shadow: 0 0 6px var(--primary-glow);
}
.ambient-track-card.active .ambient-volume-slider-mini {
    display: block;
}

/* =============================================
   BREATHING DECOMPRESSION MODAL
   ============================================= */
.breathing-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(4, 4, 10, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 11000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.4s ease-out;
}

.breathing-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2rem;
    max-width: 440px;
    padding: 24px;
}

.breathing-title {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #ffffff;
    margin-bottom: 4px;
}

.breathing-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    max-width: 320px;
    line-height: 1.5;
}

.breathing-sphere-wrap {
    width: 220px;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin: 1rem 0;
}

.breathing-sphere-outer {
    position: absolute;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: rgba(124, 58, 237, 0.05);
    border: 1px dashed rgba(124, 58, 237, 0.2);
}

.breathing-sphere {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--primary-light), var(--primary-color));
    box-shadow: 0 0 25px var(--primary-glow);
    transition: all 4s ease-in-out;
}

.breathing-sphere.inhale {
    transform: scale(2.2);
    background: radial-gradient(circle, var(--accent-light), var(--accent-color));
    box-shadow: 0 0 50px rgba(6, 182, 212, 0.6);
}

.breathing-sphere.hold {
    transform: scale(2.2);
    background: radial-gradient(circle, var(--success-color), #059669);
    box-shadow: 0 0 55px rgba(16, 185, 129, 0.6);
}

.breathing-sphere.exhale {
    transform: scale(1);
    background: radial-gradient(circle, var(--primary-light), var(--primary-color));
    box-shadow: 0 0 25px var(--primary-glow);
}

.breathing-instruction {
    font-size: 1.6rem;
    font-weight: 800;
    color: #ffffff;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.breathing-timer {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 600;
}

.breathing-skip-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 10px 26px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.breathing-skip-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.2);
}

/* =============================================
   COMMAND PALETTE
   ============================================= */
.command-palette-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(4, 4, 8, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 15vh;
    animation: fadeIn 0.2s ease-out;
}

.command-palette-container {
    width: 90%;
    max-width: 560px;
    background: rgba(15, 17, 26, 0.88);
    border: 1px solid rgba(124, 58, 237, 0.25);
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.03);
    overflow: hidden;
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
}

.command-palette-search-row {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    gap: 12px;
}

.palette-search-icon {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
    stroke: currentColor;
    flex-shrink: 0;
}

.command-palette-input {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 1.05rem;
    font-weight: 500;
    outline: none;
}

.command-palette-input::placeholder {
    color: var(--text-muted);
}

.command-palette-results {
    max-height: 320px;
    overflow-y: auto;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.command-palette-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.12s ease;
    color: var(--text-secondary);
    border: 1px solid transparent;
}

.command-palette-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 80%;
    text-align: left;
}

.command-palette-item-icon {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}

.command-palette-item-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.command-palette-item-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.command-palette-shortcut {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.command-palette-item.active {
    background: rgba(124, 58, 237, 0.16);
    border: 1px solid rgba(124, 58, 237, 0.35);
    color: #ffffff;
}

.command-palette-item.active .command-palette-item-title {
    color: #ffffff;
}

.command-palette-item.active .command-palette-shortcut {
    background: rgba(124, 58, 237, 0.28);
    border-color: rgba(124, 58, 237, 0.45);
    color: var(--primary-light);
}

.command-palette-footer {
    display: flex;
    padding: 10px 18px;
    background: rgba(0,0,0,0.25);
    border-top: 1px solid rgba(255,255,255,0.04);
    font-size: 0.75rem;
    color: var(--text-muted);
    justify-content: space-between;
}


/* ==========================================================================
   GAMIFICATION & PREMIUM LUXURY STYLES (Focus Flame, Pedestals, Teasers, Modals)
   ========================================================================== */

/* 1. Animated Focus Flame */
.focus-flame-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(14, 14, 26, 0.55);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(14px);
    transition: var(--transition);
}

.focus-flame-container:hover {
    border-color: rgba(124, 58, 237, 0.25);
    box-shadow: 0 12px 30px rgba(124, 58, 237, 0.1), var(--shadow-md);
}

.flame-svg {
    width: 90px;
    height: 90px;
    transform-origin: center bottom;
    transition: filter 0.5s ease;
}

/* Flame State Colors & Animations */
.flame-state-ember {
    fill: #475569;
    filter: drop-shadow(0 0 4px rgba(71, 85, 105, 0.3));
    animation: flame-pulse 3s infinite ease-in-out;
}

.flame-state-spark {
    fill: #f59e0b;
    filter: drop-shadow(0 0 12px rgba(245, 158, 11, 0.6));
    animation: flame-flicker 1.8s infinite alternate ease-in-out;
}

.flame-state-flame {
    fill: #8b5cf6;
    filter: drop-shadow(0 0 16px rgba(139, 92, 246, 0.7));
    animation: flame-flicker 1.4s infinite alternate ease-in-out;
}

.flame-state-blaze {
    fill: #ec4899;
    filter: drop-shadow(0 0 20px rgba(236, 72, 153, 0.8));
    animation: flame-flicker 1.1s infinite alternate ease-in-out;
}

.flame-state-ignite {
    fill: #06b6d4;
    filter: drop-shadow(0 0 24px rgba(6, 182, 212, 0.9));
    animation: flame-flicker 0.8s infinite alternate ease-in-out;
}

.flame-state-supercharged {
    fill: url(#supercharged-gradient);
    filter: drop-shadow(0 0 30px rgba(16, 185, 129, 0.9)) drop-shadow(0 0 45px rgba(245, 158, 11, 0.6));
    animation: flame-supercharged 0.5s infinite alternate ease-in-out, flame-shake 0.2s infinite;
}

@keyframes flame-pulse {
    0%, 100% { transform: scale(0.95); opacity: 0.7; }
    50% { transform: scale(1.05); opacity: 0.95; }
}

@keyframes flame-flicker {
    0% { transform: scale(0.95) rotate(-1deg); }
    100% { transform: scale(1.06) rotate(1deg); }
}

@keyframes flame-supercharged {
    0% { transform: scale(0.98) skewX(-1deg); }
    100% { transform: scale(1.1) skewX(1deg); }
}

@keyframes flame-shake {
    0%, 100% { transform: translate(0, 0) scale(1.05); }
    25% { transform: translate(-1px, 1px) scale(1.06); }
    75% { transform: translate(1px, -1px) scale(1.04); }
}

/* 2. Ambient Mixer & Zen locks */
.ambient-track-card.premium-locked {
    position: relative;
    border-color: rgba(6, 182, 212, 0.15) !important;
}

.ambient-track-card.premium-locked::after {
    content: '💎';
    position: absolute;
    top: 6px;
    right: 6px;
    font-size: 0.75rem;
    filter: drop-shadow(0 0 3px rgba(6, 182, 212, 0.8));
    animation: gem-sparkle 2.5s infinite ease-in-out;
}

.paradise-locked-tile:hover {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.22), rgba(139, 92, 246, 0.22)) !important;
    border-color: rgba(245, 158, 11, 0.75) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.25);
}

@keyframes gem-sparkle {
    0%, 100% { transform: scale(0.9) rotate(0); opacity: 0.7; }
    50% { transform: scale(1.15) rotate(15deg); opacity: 1; filter: drop-shadow(0 0 6px rgba(6, 182, 212, 1)); }
}

/* Premium Beats Tiles styling inside unified grid */
.beat-track-card {
    background: rgba(124, 58, 237, 0.05);
    border: 1px solid rgba(124, 58, 237, 0.15);
}
.beat-track-card.active {
    background: rgba(124, 58, 237, 0.25) !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 15px rgba(124, 58, 237, 0.25) !important;
}

/* ================================================================
   PREMIUM LEADERBOARD DESIGN SYSTEM
   ================================================================ */

/* ── Container */
#leaderboard-content {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ── Column header */
.lb-table-header {
    display: grid;
    grid-template-columns: 80px 1fr 170px;
    align-items: center;
    padding: 8px 20px 10px 20px;
    font-size: 0.63rem;
    font-weight: 600;
    letter-spacing: 1.4px;
    color: rgba(255, 255, 255, 0.25);
    text-transform: uppercase;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    margin-bottom: 6px;
}
.lb-col-rank { text-align: center; }
.lb-col-user { padding-left: 14px; }
.lb-col-time { text-align: right; }

/* ── Rows */
.lb-row {
    display: grid;
    grid-template-columns: 80px 1fr 170px;
    align-items: center;
    padding: 13px 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.045);
    background: rgba(255, 255, 255, 0.018);
    transition: background 0.2s ease, border-color 0.2s ease;
    margin-bottom: 5px;
    gap: 14px;
}
.lb-row:hover {
    background: rgba(255, 255, 255, 0.032);
    border-color: rgba(255, 255, 255, 0.075);
}
/* Current user highlight — warm, not loud */
.lb-row--current {
    background: linear-gradient(135deg, rgba(236,201,75,0.055) 0%, rgba(236,201,75,0.015) 100%) !important;
    border-color: rgba(236,201,75,0.22) !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2), inset 0 0 20px rgba(236,201,75,0.025) !important;
}
.lb-gap-divider {
    text-align: center;
    color: rgba(255,255,255,0.14);
    font-size: 0.85rem;
    letter-spacing: 5px;
    padding: 4px 0;
}

/* ── Rank Medallions */
.lb-rank-medal {
    position: relative;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    flex-shrink: 0;
    margin: 0 auto;
}
/* Gold: warm amber with subtle depth */
.lb-medal-gold {
    background: radial-gradient(ellipse at 36% 32%, #f5d870 0%, #c8920a 50%, #7a5400 100%);
    box-shadow: 0 0 0 1.5px rgba(200,146,10,0.7), 0 4px 14px rgba(200,146,10,0.18), inset 0 1px 0 rgba(255,255,255,0.28);
}
/* Silver: cool chrome */
.lb-medal-silver {
    background: radial-gradient(ellipse at 36% 32%, #e8eef4 0%, #98aabb 50%, #5a6c7e 100%);
    box-shadow: 0 0 0 1.5px rgba(140,160,180,0.65), 0 4px 12px rgba(140,160,180,0.12), inset 0 1px 0 rgba(255,255,255,0.35);
}
/* Bronze: warm copper */
.lb-medal-bronze {
    background: radial-gradient(ellipse at 36% 32%, #e8a060 0%, #a05818 55%, #5e2e06 100%);
    box-shadow: 0 0 0 1.5px rgba(160,88,24,0.65), 0 4px 12px rgba(160,88,24,0.12), inset 0 1px 0 rgba(255,255,255,0.18);
}
/* Subtle wreath ring */
.lb-medal-wreath {
    position: absolute;
    inset: -7px;
    border-radius: 50%;
    border: 1.5px solid transparent;
    background-clip: padding-box;
}
.lb-wreath-gold   { box-shadow: 0 0 0 2px rgba(200,146,10,0.2); }
.lb-wreath-silver { box-shadow: 0 0 0 2px rgba(140,160,180,0.15); }
.lb-wreath-bronze { box-shadow: 0 0 0 2px rgba(160,88,24,0.18); }

.lb-medal-crown {
    color: rgba(255,255,255,0.85);
    font-size: 0.62rem;
    position: absolute;
    top: 7px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}
.lb-medal-number {
    font-size: 1rem;
    font-weight: 900;
    color: rgba(255,255,255,0.95);
    text-shadow: 0 1px 3px rgba(0,0,0,0.55);
    margin-top: 7px;
    line-height: 1;
    font-family: var(--font-mono);
}

/* Rank 4+ */
.lb-rank-plain {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(10, 15, 28, 0.6);
    border: 1px solid rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.35);
    font-size: 0.82rem;
    font-weight: 700;
    font-family: var(--font-mono);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.4);
    margin: 0 auto;
}

/* ── Avatar + PRO pill */
.lb-col-user-cell {
    display: flex;
    align-items: center;
    gap: 13px;
    min-width: 0;
}
.lb-avatar-wrap {
    position: relative;
    flex-shrink: 0;
    padding-bottom: 8px;
}
.lb-mobile-badge-wrap {
    display: none;
}
.lb-desktop-badge-wrap {
    display: block;
    margin-left: 14px;
    flex-shrink: 0;
}
.lb-avatar-img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}
.lb-avatar-img svg,
.lb-avatar-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}
/* Gold PRO pill — understated but luxurious */
.lb-avatar-pro-pill {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #92691a 0%, #d4a82a 50%, #92691a 100%);
    color: rgba(255,240,180,0.95);
    font-size: 0.5rem;
    font-weight: 900;
    letter-spacing: 0.9px;
    padding: 2px 6px;
    border-radius: 3px;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0,0,0,0.45);
    border: 1px solid rgba(212,168,42,0.4);
}

/* ── User info typography */
.lb-user-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 3px;
}
/* Username — primary element, largest weight */
.lb-username {
    font-size: 0.95rem;
    font-weight: 600;
    color: #f0f4f8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    letter-spacing: -0.1px;
}
/* Pro gem — supportive, not competing */
.lb-pro-gem {
    color: rgba(6,182,212,0.75);
    font-size: 0.65rem;
    flex-shrink: 0;
}
/* Handle — most muted */
.lb-handle {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.28);
    font-family: var(--font-mono);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.1px;
}

/* ── Badge column */
.lb-col-badge-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
}

/* ─────────────────────────────────────────────
   GAME-STYLE LEAGUE BADGES — Unified Pill System
   Identical geometry across every tier.
   Only the color palette changes.
   ───────────────────────────────────────────── */
.lb-league-badge {
    display: inline-flex;
    align-items: stretch;
    position: relative;
    overflow: hidden;
    border-radius: 12px;   /* Premium squircle-like capsule shape */
    user-select: none;
    height: 30px;           /* Unified height */
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.35));
    transition: filter 0.25s ease, transform 0.15s ease;
}
.lb-league-badge:hover {
    filter: brightness(1.08) drop-shadow(0 3px 6px rgba(0,0,0,0.45));
    transform: translateY(-0.5px);
}
/* Icon wrap — left capsule cap */
.lb-badge-icon-wrap {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0; /* Let container overflow:hidden clip it perfectly with zero gaps */
    flex-shrink: 0;
    font-size: 0.72rem;
    position: relative;
    z-index: 1;
}
/* Label band — overlapping right capsule cap with slanted clip-path divider */
.lb-badge-label {
    display: flex;
    align-items: center;
    padding: 1px 14px 0 16px;  /* Added top padding for vertical centering */
    height: 100%;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.7px;  /* Reduced letter spacing for premium look */
    text-transform: uppercase;
    clip-path: polygon(7px 0%, 100% 0%, 100% 100%, 0% 100%);
    white-space: nowrap;
    margin-left: -7px;      /* Overlap icon wrap to reveal slant */
    text-shadow: -0.5px -0.5px 0.5px rgba(0, 0, 0, 0.4), 0.5px 0.5px 0.5px rgba(255, 255, 255, 0.08); /* Engraved typography */
}

/* Elegant blended divider overlay on label */
.lb-badge-label::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 8px;
    height: 100%;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.25) 0%, rgba(255, 255, 255, 0.1) 40%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
    z-index: 2;
}

/* Unified physical object lighting overlay */
.lb-league-badge::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    box-shadow: 
        inset 0 1px 0.5px rgba(255, 255, 255, 0.2), /* Delicate top highlight */
        inset 0 -1.5px 2px rgba(0, 0, 0, 0.3);      /* Gentle inner bottom shadow */
    background: linear-gradient(to bottom, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0) 50%, rgba(0,0,0,0.1) 100%);
    pointer-events: none;
    z-index: 3;
}

/* 3D Raised Icon treatment — Specular bevel highlight and deep offset shadow */
.lb-badge-icon-wrap i {
    filter: brightness(0.85) drop-shadow(-0.5px -0.5px 0.5px rgba(0, 0, 0, 0.55)) drop-shadow(0.5px 0.5px 0.5px rgba(255, 255, 255, 0.12));
    display: inline-block;
    transition: transform 0.2s ease, filter 0.2s ease;
}

/* Specific specular and glow enhancements for each tier's 3D icon */
.league-badge-bronze .lb-badge-icon-wrap i {
    text-shadow: 0 -0.5px 0.5px rgba(255, 255, 255, 0.2), 0 0.5px 0px rgba(0, 0, 0, 0.4);
}
.league-badge-silver .lb-badge-icon-wrap i {
    text-shadow: 0 -0.5px 0.5px rgba(255, 255, 255, 0.4), 0 0.5px 1px rgba(0, 0, 0, 0.35);
}
.league-badge-gold .lb-badge-icon-wrap i {
    text-shadow: 0 -0.5px 0.5px rgba(255, 255, 255, 0.5), 0 1px 2px rgba(0, 0, 0, 0.5), 0 0 6px rgba(232, 184, 64, 0.45);
}
.league-badge-platinum .lb-badge-icon-wrap i {
    text-shadow: 0 -0.5px 0.5px rgba(255, 255, 255, 0.6), 0 1px 2px rgba(0, 0, 0, 0.4), 0 0 5px rgba(168, 192, 212, 0.3);
}
.league-badge-diamond .lb-badge-icon-wrap i {
    text-shadow: 0 -0.5px 0.5px rgba(255, 255, 255, 0.7), 0 1px 2px rgba(0, 0, 0, 0.5), 0 0 8px rgba(24, 192, 216, 0.5);
}
.league-badge-titan .lb-badge-icon-wrap i {
    /* Engraved bolt: dimmed center, raised specular on upper-left edge */
    text-shadow:
        -0.5px -0.5px 0px rgba(0, 0, 0, 0.7),
        0.5px  0.5px 1px rgba(255, 255, 255, 0.08),
        0 0 5px rgba(255, 115, 0, 0.28);
    filter: brightness(0.78) drop-shadow(-0.5px -0.5px 0.5px rgba(0,0,0,0.65)) drop-shadow(0.5px 0.5px 0.5px rgba(255,160,60,0.1));
}
.league-badge-immortal .lb-badge-icon-wrap i {
    /* Engraved crown: dimmed, pressed into the surface with a white-gold catch-light */
    text-shadow:
        -0.5px -0.5px 0px rgba(0, 0, 0, 0.8),
        0.5px  0.5px 1.5px rgba(255, 255, 255, 0.07),
        0 0 6px rgba(210, 180, 100, 0.2);
    filter: brightness(0.72) drop-shadow(-0.5px -0.5px 0.5px rgba(0,0,0,0.7)) drop-shadow(0.5px 0.5px 0.5px rgba(243,227,188,0.08));
}

/* Metallic Shine Sweep effect for premium leaderboard badges */
.lb-league-badge.league-badge-diamond::before,
.lb-league-badge.league-badge-titan::before,
.lb-league-badge.league-badge-immortal::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -150%;
    width: 30%;
    height: 200%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.22) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(25deg);
    pointer-events: none;
    z-index: 2;
    animation: lb-shine-sweep 8s infinite cubic-bezier(0.43, 0.19, 0.15, 0.88);
}

@keyframes lb-shine-sweep {
    0% { left: -150%; }
    15% { left: 150%; }
    100% { left: 150%; }
}

/* ── Bronze */
.lb-league-badge.league-badge-bronze {
    border: 1px solid rgba(135, 75, 40, 0.6);
    background: linear-gradient(135deg, #3d1c10 0%, #5c2f1a 50%, #3d1c10 100%);
}
.lb-league-badge.league-badge-bronze .lb-badge-icon-wrap {
    background: linear-gradient(135deg, #241109 0%, #462211 100%);
    color: #c58961;
}
.lb-league-badge.league-badge-bronze .lb-badge-label {
    color: #d4956a;
}

/* ── Silver */
.lb-league-badge.league-badge-silver {
    border: 1px solid rgba(120, 140, 160, 0.5);
    background: linear-gradient(135deg, #25333f 0%, #3d4f5c 50%, #25333f 100%);
}
.lb-league-badge.league-badge-silver .lb-badge-icon-wrap {
    background: linear-gradient(135deg, #18222b 0%, #303f4c 100%);
    color: #8da4b8;
}
.lb-league-badge.league-badge-silver .lb-badge-label {
    color: #b8d0e0;
}

/* ── Gold */
.lb-league-badge.league-badge-gold {
    border: 1px solid rgba(212, 175, 55, 0.6);
    background: linear-gradient(135deg, #4f3408 0%, #7d5718 50%, #4f3408 100%);
}
.lb-league-badge.league-badge-gold .lb-badge-icon-wrap {
    background: linear-gradient(135deg, #332003 0%, #634310 100%);
    color: #dcb043;
}
.lb-league-badge.league-badge-gold .lb-badge-label {
    color: #f0ce60;
}

/* ── Platinum */
.lb-league-badge.league-badge-platinum {
    border: 1px solid rgba(145, 170, 190, 0.45);
    background: linear-gradient(135deg, #1c2b38 0%, #354a5c 50%, #1c2b38 100%);
}
.lb-league-badge.league-badge-platinum .lb-badge-icon-wrap {
    background: linear-gradient(135deg, #121d26 0%, #293a4a 100%);
    color: #9cb5c9;
}
.lb-league-badge.league-badge-platinum .lb-badge-label {
    color: #c8dce8;
}

/* ── Diamond */
.lb-league-badge.league-badge-diamond {
    border: 1px solid rgba(34, 186, 215, 0.55);
    background: linear-gradient(135deg, #03202e 0%, #07475c 50%, #03202e 100%);
}
.lb-league-badge.league-badge-diamond .lb-badge-icon-wrap {
    background: linear-gradient(135deg, #01141f 0%, #053c4f 100%);
    color: #1fc7df;
}
.lb-league-badge.league-badge-diamond .lb-badge-label {
    color: #60d8ec;
    text-shadow: 0 0 4px rgba(34,211,238,0.2);
}

/* ── Titan — Dark Steel-Blue / Forged Gunmetal */
.lb-league-badge.league-badge-titan {
    /* Dark steel-blue slate — clear color identity, not black */
    background:
        linear-gradient(170deg,
            rgba(255,255,255,0.035) 0%,
            rgba(255,255,255,0) 40%,
            rgba(0,0,0,0.1) 100%
        ),
        linear-gradient(135deg,
            #0d1e2c 0%,
            #152a3c 20%,
            #0f2030 40%,
            #1a3248 60%,
            #0c1a28 80%,
            #142436 100%
        );
    /* Forged border: orange edge-illumination against the steel-blue */
    border: 1px solid rgba(255, 120, 20, 0.28);
    border-top-color:  rgba(255, 150, 50, 0.48); /* brighter catch-light top */
    border-bottom-color: rgba(180, 80, 0, 0.20); /* darker forged bottom */
    /* Machined plate depth */
    box-shadow:
        inset 0 1.5px 0px rgba(255, 255, 255, 0.09),
        inset 0 -1.5px 2px rgba(0, 0, 0, 0.5),
        inset 0 0 0 0.5px rgba(255, 255, 255, 0.03),
        0 1px 3px rgba(0, 0, 0, 0.5),
        0 0 5px rgba(255, 120, 20, 0.1);
    animation: lb-titan-pulse 5s ease-in-out infinite alternate;
}
.lb-league-badge.league-badge-titan .lb-badge-icon-wrap {
    background: linear-gradient(160deg, #071018 0%, #0e1e2c 100%);
    color: #e8803a; /* Warm burnt-orange accent — pops against steel-blue */
}
.lb-league-badge.league-badge-titan .lb-badge-label {
    color: #c8dae6;
    letter-spacing: 0.55px;
    text-shadow:
        -0.5px -0.5px 0.5px rgba(0,0,0,0.5),
        0.5px 0.5px 0.5px rgba(255,255,255,0.05);
}

/* ── Immortal — Rich Amethyst / Polished White-Gold */
.lb-league-badge.league-badge-immortal {
    /* Deep amethyst royal purple — saturated, unmistakably royal */
    background:
        linear-gradient(170deg,
            rgba(255,255,255,0.03) 0%,
            rgba(255,255,255,0) 45%,
            rgba(0,0,0,0.15) 100%
        ),
        linear-gradient(135deg,
            #120430 0%,
            #250a58 22%,
            #3d0d80 44%,
            #280a60 66%,
            #160538 88%,
            #0e0228 100%
        );
    /* White-gold border — asymmetric metallic edge lighting */
    border: 1px solid rgba(220, 200, 150, 0.40);
    border-top-color:  rgba(245, 228, 178, 0.62);
    border-bottom-color: rgba(160, 140, 90, 0.22);
    /* Enamel-over-metal depth */
    box-shadow:
        inset 0 1.5px 0px rgba(255, 248, 210, 0.12),
        inset 0 -1.5px 2px rgba(0, 0, 0, 0.5),
        inset 0 0 0 0.5px rgba(255, 255, 255, 0.025),
        0 1px 3px rgba(0, 0, 0, 0.5),
        0 0 6px rgba(120, 40, 240, 0.12);
    animation: lb-immortal-pulse 5s ease-in-out infinite alternate;
}
.lb-league-badge.league-badge-immortal .lb-badge-icon-wrap {
    background: linear-gradient(160deg, #0a0120 0%, #1c0548 100%);
    color: #d4bc86;
}
.lb-league-badge.league-badge-immortal .lb-badge-label {
    color: #ede8f8;
    letter-spacing: 0.5px;
    text-shadow:
        -0.5px -0.5px 0.5px rgba(0,0,0,0.55),
        0.5px 0.5px 0.5px rgba(255,255,255,0.05),
        0 0 4px rgba(140, 60, 240, 0.15);
}

@keyframes lb-titan-pulse {
    0% {
        box-shadow:
            inset 0 1.5px 0px rgba(255,255,255,0.07),
            inset 0 -1.5px 2px rgba(0,0,0,0.5),
            inset 0 0 0 0.5px rgba(255,255,255,0.02),
            0 1px 3px rgba(0,0,0,0.45),
            0 0 4px rgba(255,120,20,0.07);
        border-top-color: rgba(255,140,40,0.40);
        border-bottom-color: rgba(170,75,0,0.16);
    }
    100% {
        box-shadow:
            inset 0 1.5px 0px rgba(255,255,255,0.11),
            inset 0 -1.5px 2px rgba(0,0,0,0.5),
            inset 0 0 0 0.5px rgba(255,255,255,0.04),
            0 1px 4px rgba(0,0,0,0.5),
            0 0 8px rgba(255,120,20,0.16);
        border-top-color: rgba(255,160,60,0.58);
        border-bottom-color: rgba(190,85,0,0.26);
    }
}

@keyframes lb-immortal-pulse {
    0% {
        box-shadow:
            inset 0 1.5px 0px rgba(255,248,210,0.10),
            inset 0 -1.5px 2px rgba(0,0,0,0.5),
            inset 0 0 0 0.5px rgba(255,255,255,0.02),
            0 1px 3px rgba(0,0,0,0.45),
            0 0 5px rgba(120,40,240,0.09);
        border-top-color: rgba(242,225,172,0.54);
        border-bottom-color: rgba(155,132,82,0.18);
    }
    100% {
        box-shadow:
            inset 0 1.5px 0px rgba(255,248,210,0.16),
            inset 0 -1.5px 2px rgba(0,0,0,0.5),
            inset 0 0 0 0.5px rgba(255,255,255,0.03),
            0 1px 4px rgba(0,0,0,0.5),
            0 0 12px rgba(120,40,240,0.18);
        border-top-color: rgba(250,235,188,0.68);
        border-bottom-color: rgba(168,143,86,0.26);
    }
}

/* ── Unranked */
.lb-league-badge.league-badge-unranked {
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(20,28,44,0.8);
}
.lb-league-badge.league-badge-unranked .lb-badge-icon-wrap {
    background: rgba(18,26,42,0.9);
    color: rgba(255,255,255,0.22);
}
.lb-league-badge.league-badge-unranked .lb-badge-label {
    color: rgba(255,255,255,0.22);
}


/* ── Study time — large but not overpowering */
.lb-col-time-cell {
    text-align: right;
    min-width: 115px;
}
.lb-study-time {
    display: flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: 4px;
    line-height: 1;
}
.lb-time-num {
    font-size: 1.72rem;
    font-weight: 700;
    letter-spacing: -0.8px;
    font-family: var(--font-sans);
    line-height: 1;
    /* Glow reduced — present but not competing */
    filter: drop-shadow(0 0 5px currentColor);
    opacity: 0.85;
}
.lb-time-unit {
    font-size: 0.82rem;
    font-weight: 500;
    opacity: 0.45;
    padding-bottom: 2px;
}

/* ── Footer */
.lb-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px 2px 20px;
    margin-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    flex-wrap: wrap;
    gap: 10px;
}
.lb-footer-left {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
}
.lb-footer-right {
    display: flex;
    align-items: center;
    gap: 7px;
    color: rgba(255,255,255,0.3);
    font-size: 0.78rem;
    font-weight: 500;
}
.lb-footer-icon {
    font-size: 0.82rem;
    opacity: 0.4;
    flex-shrink: 0;
}
.lb-footer-tagline {
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255,255,255,0.55);
    line-height: 1.3;
}
.lb-footer-sub {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.28);
    margin-top: 1px;
}
.lb-footer-right strong {
    color: rgba(255,255,255,0.6);
}

/* ── Mobile responsive */
@media (max-width: 750px) {
    .lb-table-header { display: none; }
    .lb-row {
        grid-template-columns: 52px 1fr auto;
        grid-template-rows: auto;
        padding: 12px 14px;
        gap: 12px;
        align-items: center;
    }
    .lb-col-rank-cell  { grid-column: 1; align-self: center; }
    .lb-col-user-cell  { grid-column: 2; align-self: center; }
    .lb-col-badge-cell { display: none; }
    .lb-col-time-cell  { grid-column: 3; align-self: center; text-align: right; }
    .lb-mobile-badge-wrap {
        display: block;
        margin-top: 6px;
    }
    .lb-desktop-badge-wrap {
        display: none !important;
    }
    .lb-mobile-badge-wrap .lb-league-badge {
        transform: scale(0.9);
        transform-origin: left center;
        margin: 0;
    }
    .lb-study-time {
        justify-content: flex-end;
    }
    .lb-time-num { font-size: 1.6rem; }
    .lb-avatar-img { 
        width: 50px !important; 
        height: 50px !important; 
    }
    .lb-avatar-wrap {
        padding-bottom: 0 !important;
    }
    .lb-avatar-pro-pill {
        font-size: 0.55rem !important;
        padding: 1px 4px !important;
        bottom: -2px !important;
        left: 50%;
        transform: translateX(-50%);
    }
    .lb-rank-medal { width: 40px; height: 40px; }
    .lb-badge-label { padding: 0 8px 0 11px; font-size: 0.58rem; }
    .lb-badge-icon-wrap { width: 28px; height: 28px; font-size: 0.72rem; }
    .lb-footer { flex-direction: column; align-items: flex-start; }
}


/* 3. Achievements System: Study Leagues & Rank Chips */
.league-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 5px 10px 4px 10px; /* Adjusted padding for perfect vertical text centering */
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px; /* Slightly reduced letter spacing */
    position: relative;
    overflow: hidden;
    user-select: none;
    line-height: 1;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
    text-shadow: -0.5px -0.5px 0.5px rgba(0, 0, 0, 0.4), 0.5px 0.5px 0.5px rgba(255, 255, 255, 0.08); /* Engraved typography */
}

.league-badge i {
    font-size: 0.7rem;
    filter: brightness(0.85) drop-shadow(-0.5px -0.5px 0.5px rgba(0, 0, 0, 0.5)) drop-shadow(0.5px 0.5px 0.5px rgba(255, 255, 255, 0.12));
}

/* Metallic Shine Sweep effect for premium leagues */
.league-badge::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -150%;
    width: 30%;
    height: 200%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.22) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(25deg);
    animation: shine-sweep 10s infinite cubic-bezier(0.43, 0.19, 0.15, 0.88);
}

@keyframes shine-sweep {
    0% { left: -150%; }
    12% { left: 150%; }
    100% { left: 150%; }
}

/* Bronze: The Journey Begins (Rugged shield) */
.league-badge-bronze {
    background: linear-gradient(135deg, #3d1c10 0%, #5c2f1a 50%, #3d1c10 100%);
    border: 1px solid rgba(135, 75, 40, 0.6);
    color: #d4956a;
    border-radius: 5px 5px 9px 9px; /* Refined custom shield-like shape */
    box-shadow: 
        inset 0 1px 0.5px rgba(255, 255, 255, 0.15),
        inset 0 -1.5px 2px rgba(0, 0, 0, 0.4),
        0 1.5px 3px rgba(0, 0, 0, 0.3);
}
.league-badge-bronze::after {
    animation: none; /* No shine for bronze to keep it raw/rugged */
}

/* Silver: Consistent Performer (Medal medallion) */
.league-badge-silver {
    background: linear-gradient(135deg, #25333f 0%, #3d4f5c 50%, #25333f 100%);
    border: 1px solid rgba(120, 140, 160, 0.5);
    color: #b8d0e0;
    border-radius: 10px 10px 5px 5px; /* Refined custom medallion shape */
    box-shadow: 
        inset 0 1px 0.5px rgba(255, 255, 255, 0.2),
        inset 0 -1.5px 2px rgba(0, 0, 0, 0.3),
        0 1.5px 3px rgba(0, 0, 0, 0.2);
}

/* Gold: Dedicated Scholar (Royal Crown) */
.league-badge-gold {
    background: linear-gradient(135deg, #4f3408 0%, #7d5718 50%, #4f3408 100%);
    border: 1px solid rgba(212, 175, 55, 0.6);
    color: #f0ce60;
    border-radius: 5px; /* Refined custom corners */
    box-shadow: 
        inset 0 1px 0.5px rgba(255, 255, 255, 0.22),
        inset 0 -1.5px 2px rgba(0, 0, 0, 0.35),
        0 1.5px 4px rgba(212, 175, 55, 0.15);
}

/* Platinum: Elite Discipline (Cool chrome) */
.league-badge-platinum {
    background: linear-gradient(135deg, #1c2b38 0%, #354a5c 50%, #1c2b38 100%);
    border: 1px solid rgba(145, 170, 190, 0.45);
    color: #c8dce8;
    border-radius: 12px; /* Smooth, modern custom pill corners */
    box-shadow: 
        inset 0 1px 0.5px rgba(255, 255, 255, 0.2),
        inset 0 -1.5px 2px rgba(0, 0, 0, 0.25),
        0 1.5px 3px rgba(0, 0, 0, 0.2);
}

/* Diamond: Exceptional Focus (Blue crystal glass) */
.league-badge-diamond {
    background: linear-gradient(135deg, #03202e 0%, #07475c 50%, #03202e 100%);
    border: 1px solid rgba(34, 186, 215, 0.55);
    color: #60d8ec;
    border-radius: 10px 4px 10px 4px; /* Sharp premium crystal corners */
    box-shadow: 
        inset 0 1.5px 0.5px rgba(255, 255, 255, 0.3),
        inset 0 -1.5px 2px rgba(0, 0, 0, 0.3),
        0 0 10px rgba(6, 182, 212, 0.2);
}

/* Titan: Unbreakable Consistency — Dark Steel-Blue / Forged Gunmetal */
.league-badge-titan {
    background:
        linear-gradient(170deg,
            rgba(255,255,255,0.03) 0%,
            rgba(255,255,255,0) 45%,
            rgba(0,0,0,0.1) 100%
        ),
        linear-gradient(135deg,
            #0d1e2c 0%,
            #152a3c 20%,
            #0f2030 40%,
            #1a3248 60%,
            #0c1a28 80%,
            #142436 100%
        );
    border: 1px solid rgba(255, 120, 20, 0.28);
    border-top-color:  rgba(255, 150, 50, 0.48);
    border-bottom-color: rgba(180, 80, 0, 0.20);
    color: #c8dae6;
    border-radius: 5px;
    letter-spacing: 0.55px;
    box-shadow:
        inset 0 1.5px 0px rgba(255, 255, 255, 0.09),
        inset 0 -1.5px 2px rgba(0, 0, 0, 0.55),
        inset 0 0 0 0.5px rgba(255, 255, 255, 0.025),
        0 1.5px 3px rgba(0, 0, 0, 0.5),
        0 0 5px rgba(255, 120, 20, 0.1);
}
.league-badge-titan i {
    color: #e8803a;
    filter: brightness(0.85) drop-shadow(-0.5px -0.5px 0.5px rgba(0,0,0,0.6)) drop-shadow(0.5px 0.5px 0.5px rgba(255,150,60,0.08));
}

/* Immortal: The Highest Honor — Rich Amethyst / White-Gold Trim */
.league-badge-immortal {
    background:
        linear-gradient(170deg,
            rgba(255,255,255,0.03) 0%,
            rgba(255,255,255,0) 45%,
            rgba(0,0,0,0.15) 100%
        ),
        linear-gradient(135deg,
            #120430 0%,
            #250a58 22%,
            #3d0d80 44%,
            #280a60 66%,
            #160538 88%,
            #0e0228 100%
        );
    border: 1px solid rgba(220, 200, 150, 0.40);
    border-top-color:  rgba(245, 228, 178, 0.62);
    border-bottom-color: rgba(160, 140, 90, 0.22);
    color: #ede8f8;
    border-radius: 10px 5px 10px 5px;
    letter-spacing: 0.5px;
    box-shadow:
        inset 0 1.5px 0px rgba(255, 248, 210, 0.12),
        inset 0 -1.5px 2px rgba(0, 0, 0, 0.55),
        inset 0 0 0 0.5px rgba(255, 255, 255, 0.025),
        0 1.5px 3px rgba(0, 0, 0, 0.5),
        0 0 6px rgba(120, 40, 240, 0.12);
    animation: immortal-breathing 5s ease-in-out infinite alternate;
}
.league-badge-immortal i {
    color: #c8ab72;
    filter: brightness(0.8) drop-shadow(-0.5px -0.5px 0.5px rgba(0,0,0,0.65)) drop-shadow(0.5px 0.5px 0.5px rgba(240,215,155,0.07));
}

@keyframes immortal-breathing {
    0% {
        box-shadow:
            inset 0 1.5px 0px rgba(255,248,210,0.10),
            inset 0 -1.5px 2px rgba(0,0,0,0.55),
            inset 0 0 0 0.5px rgba(255,255,255,0.02),
            0 1.5px 3px rgba(0,0,0,0.45),
            0 0 5px rgba(120,40,240,0.09);
        border-top-color: rgba(242,224,170,0.54);
        border-bottom-color: rgba(152,130,80,0.18);
    }
    100% {
        box-shadow:
            inset 0 1.5px 0px rgba(255,248,210,0.16),
            inset 0 -1.5px 2px rgba(0,0,0,0.55),
            inset 0 0 0 0.5px rgba(255,255,255,0.03),
            0 1.5px 4px rgba(0,0,0,0.5),
            0 0 12px rgba(120,40,240,0.18);
        border-top-color: rgba(250,234,185,0.68);
        border-bottom-color: rgba(166,142,85,0.26);
    }
}

/* Unranked */
.league-badge-unranked {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border: 1px solid #475569;
    color: #94a3b8;
    border-radius: 4px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    text-shadow: none;
}
.league-badge-unranked::after {
    animation: none;
}

/* Medallion Rank Chips */
.rank-chip {
    display: inline-flex;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.6);
    border: 1.5px solid rgba(255, 255, 255, 0.07);
    color: var(--text-secondary);
    justify-content: center;
    align-items: center;
    font-size: 0.82rem;
    font-weight: 800;
    font-family: var(--font-mono);
    box-shadow: inset 0 1.5px 3px rgba(0, 0, 0, 0.5), 0 1px 2px rgba(255, 255, 255, 0.02);
    transition: all 0.3s ease;
}

.rank-chip-1 {
    background: rgba(245, 158, 11, 0.1);
    border: 1.5px solid #d69e2e;
    color: #ecc94b;
    box-shadow: inset 0 1px 3px rgba(214, 158, 46, 0.3), 0 0 8px rgba(214, 158, 46, 0.2);
}

.rank-chip-2 {
    background: rgba(148, 163, 184, 0.1);
    border: 1.5px solid #94a3b8;
    color: #e2e8f0;
    box-shadow: inset 0 1px 3px rgba(148, 163, 184, 0.3), 0 0 8px rgba(148, 163, 184, 0.15);
}

.rank-chip-3 {
    background: rgba(180, 83, 9, 0.15);
    border: 1.5px solid #b45309;
    color: #dd6b20;
    box-shadow: inset 0 1px 3px rgba(180, 83, 9, 0.3), 0 0 8px rgba(180, 83, 9, 0.15);
}

/* Pro cosmic glowing rows for list */
.leaderboard-row-pro {
    background: linear-gradient(90deg, rgba(6, 182, 212, 0.08) 0%, rgba(124, 58, 237, 0.08) 100%) !important;
    border: 1px solid rgba(6, 182, 212, 0.35) !important;
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.12), inset 0 0 8px rgba(6, 182, 212, 0.05);
    position: relative;
    overflow: hidden;
}

.leaderboard-row-pro::before {
    content: '';
    position: absolute;
    top: 0; left: 0; bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #06b6d4, #7c3aed);
}

/* Elite Pro Shoutouts Carousel */
.shoutouts-broadcast-banner {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.15), rgba(124, 58, 237, 0.15));
    border: 1px solid rgba(6, 182, 212, 0.25);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    margin-bottom: 1.25rem;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 12px;
}

.broadcast-badge {
    background: linear-gradient(90deg, #06b6d4, #7c3aed);
    color: white;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 8px rgba(6,182,212,0.3);
}

.shoutout-ticker-wrapper {
    flex: 1;
    overflow: hidden;
    position: relative;
    height: 20px;
}

.shoutout-ticker-content {
    display: flex;
    white-space: nowrap;
    position: absolute;
    animation: ticker-slide 20s linear infinite;
    gap: 50px;
    align-items: center;
}

.shoutout-ticker-item {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

@keyframes ticker-slide {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* 4. Luxury custom Pro modal */
.go-pro-premium-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(4, 4, 12, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 10000;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
    overflow-y: auto;
}

.go-pro-premium-card {
    background: linear-gradient(135deg, rgba(20, 20, 38, 0.98), rgba(10, 10, 22, 0.98));
    border: 1px solid rgba(6, 182, 212, 0.3);
    box-shadow: 0 24px 60px rgba(0,0,0,0.8), 0 0 40px rgba(6, 182, 212, 0.15);
    border-radius: var(--radius-xl);
    max-width: 500px;
    width: 100%;
    padding: 32px;
    text-align: center;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin: auto;
}

.go-pro-premium-overlay.show {
    opacity: 1;
}
.go-pro-premium-overlay.show .go-pro-premium-card {
    transform: scale(1);
}

.go-pro-crown-wrap {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(6,182,212,0.15), rgba(124,58,237,0.15));
    border: 2px solid rgba(6,182,212,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
    font-size: 2.2rem;
    box-shadow: 0 8px 24px rgba(6, 182, 212, 0.15);
}

.go-pro-features-list {
    text-align: left;
    margin: 24px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.go-pro-feature-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.go-pro-feature-check {
    color: var(--accent-light);
    font-weight: 800;
    font-size: 1rem;
    line-height: 1;
}

/* Locked status placeholder overlay */
.shoutout-lock-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(6, 182, 212, 0.15);
    color: var(--accent-light);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
    text-transform: uppercase;
}

/* Premium upsell button styling and animation */
.go-pro-premium-btn {
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
    animation: premium-pulse 2.5s infinite ease-in-out;
}
.go-pro-premium-btn:hover {
    transform: scale(1.03) !important;
    box-shadow: 0 8px 28px rgba(124, 58, 237, 0.6) !important;
}
.go-pro-premium-btn:active {
    transform: scale(0.98) !important;
}

@keyframes premium-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.018);
    }
}

.preset-btn {
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease !important;
}
.preset-btn:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: var(--accent-light) !important;
    transform: translateY(-1px);
}
.preset-btn:active {
    transform: translateY(0);
}

/* Responsive Grid for Go Pro Modal */
.go-pro-grid-layout {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.go-pro-left-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.go-pro-right-col {
    width: 100%;
}

.go-pro-features-header {
    display: none;
    font-size: 0.9rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.go-pro-cta-wrap {
    width: 100%;
    margin-top: 15px;
}

.go-pro-support-tagline {
    font-size: 0.75rem;
    color: #a78bfa;
    margin: 12px 0 0;
    letter-spacing: 0.01em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

@media (min-width: 768px) {
    .go-pro-premium-card {
        max-width: 860px !important;
        padding: 40px !important;
        text-align: left !important;
    }
    
    .go-pro-grid-layout {
        display: grid;
        grid-template-columns: 1fr 1.1fr;
        gap: 40px;
        align-items: center;
    }
    
    .go-pro-left-col {
        align-items: center;
        text-align: center;
    }
    
    .go-pro-left-col .go-pro-crown-wrap {
        margin: 0 auto 20px auto;
    }
    
    .go-pro-left-col h2 {
        text-align: center !important;
        font-size: 1.85rem !important;
        margin-bottom: 12px !important;
    }
    
    .go-pro-left-col p {
        text-align: center !important;
        margin: 0 auto 20px auto !important;
        max-width: 100% !important;
    }
    
    .go-pro-right-col {
        border-left: 1px solid rgba(255, 255, 255, 0.08);
        padding-left: 36px;
    }
    
    .go-pro-features-header {
        display: block;
    }
    
    .go-pro-features-list {
        margin: 0 !important;
    }
}

/* ============================================================
   PRO CLOUD SYNC UI & GLASSMORPHIC PRO SHIELD MODAL
   ============================================================ */
.sync-icon-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.25s ease;
    flex-shrink: 0;
    font-size: 0.85rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.sync-icon-btn:hover {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.15) 0%, rgba(56, 189, 248, 0.15) 100%);
    border-color: rgba(168, 85, 247, 0.4);
    color: #c084fc;
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.3);
    transform: translateY(-1px);
}
.sync-icon-btn.syncing .sync-main-icon {
    animation: sync-spin 1s linear infinite;
    color: #38bdf8;
}
.sync-icon-btn.cooldown {
    opacity: 0.5;
    cursor: not-allowed;
}

@keyframes sync-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(3600deg); }
}

.sync-pro-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #ffffff;
    font-size: 0.52rem;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 6px rgba(245, 158, 11, 0.6);
    border: 1px solid rgba(15, 11, 28, 0.9);
}

/* Glassmorphic Free User Pro Shield Modal */
.sync-pro-card {
    max-width: 440px !important;
    background: linear-gradient(135deg, rgba(17, 13, 33, 0.95) 0%, rgba(10, 11, 16, 0.98) 100%) !important;
    border: 1px solid rgba(168, 85, 247, 0.25) !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(168, 85, 247, 0.15) !important;
    border-radius: 20px !important;
    padding: 28px 24px !important;
}

.sync-pro-hero {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.sync-crown-glow {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(56, 189, 248, 0.2));
    border: 1px solid rgba(168, 85, 247, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #c084fc;
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.3);
}

.sync-pill-tag {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.3);
    padding: 3px 10px;
    border-radius: 100px;
}

.sync-pro-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #ffffff;
    margin: 4px 0 0;
    letter-spacing: -0.02em;
}

.sync-pro-subtitle {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
    max-width: 360px;
}

.sync-pro-features-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 20px;
}

.sync-feat-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.sync-pro-action-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.sync-price-tag {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.sync-price-tag .price-amount {
    font-size: 1.7rem;
    font-weight: 900;
    color: #ffffff;
    font-family: var(--font-mono);
}

.sync-price-tag .price-period {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.sync-upgrade-btn {
    width: 100%;
    padding: 12px;
    font-weight: 800;
    font-size: 0.92rem;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.45);
}

.sync-guarantee-text {
    font-size: 0.73rem;
    color: var(--text-muted);
}

/* Leaderboard Refresh Icon Animation */
.lb-refresh-icon {
    color: var(--primary-color);
    cursor: pointer;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.3s ease, filter 0.3s ease;
    transform-origin: center;
}
.lb-refresh-icon:hover {
    color: #a78bfa;
    transform: rotate(60deg) scale(1.18);
    filter: drop-shadow(0 0 10px rgba(167, 139, 250, 0.7));
}
.lb-refresh-icon.lb-refreshing {
    animation: lbSpinPulse 0.75s cubic-bezier(0.4, 0, 0.2, 1) infinite !important;
    color: #c084fc !important;
    filter: drop-shadow(0 0 14px rgba(192, 132, 252, 0.85)) !important;
}

@keyframes lbSpinPulse {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.22); }
    100% { transform: rotate(360deg) scale(1); }
}
