﻿/* ============================================================================
   NEURO-SAMA & EVIL NEURO THEME VARIABLES
   ============================================================================ */

:root {
    /* Neuro-sama Theme */
    --neuro-primary: #00D9FF;
    --neuro-primary-light: #5CE1FF;
    --neuro-primary-dark: #00B8D4;
    --neuro-accent: #FF6B9D;
    --neuro-accent-light: #FFB3D1;
    --neuro-bg-primary: #0A0E1A;
    --neuro-bg-secondary: #141B2D;
    --neuro-bg-elevated: #1E2A42;
    --neuro-bg-hover: #2A3A58;
    --neuro-text-primary: #FFFFFF;
    --neuro-text-secondary: #A8B9D9;
    --neuro-text-muted: #6B7A98;
    /* Evil Neuro Theme */
    --evil-primary: #FF0066;
    --evil-primary-light: #FF3385;
    --evil-primary-dark: #CC0052;
    --evil-accent: #9D00FF;
    --evil-accent-light: #B84DFF;
    --evil-bg-primary: #0D0208;
    --evil-bg-secondary: #1A0B14;
    --evil-bg-elevated: #2A1220;
    --evil-bg-hover: #3D1A2E;
    --evil-text-primary: #FFFFFF;
    --evil-text-secondary: #E0A3C7;
    --evil-text-muted: #8A5A73;
    /* Twins Theme */
    --twins-primary: #9D5CFF;
    --twins-primary-light: #B98AFF;
    --twins-primary-dark: #7A3FD9;
    --twins-accent: #FF6B9D;
    --twins-accent-secondary: #5CE1FF;
    --twins-bg-primary: #0A0814;
    --twins-bg-secondary: #150F23;
    --twins-bg-elevated: #221A35;
    --twins-bg-hover: #2F2345;
    --twins-text-primary: #FFFFFF;
    --twins-text-secondary: #C5B3E0;
    --twins-text-muted: #7A6B98;
    /* GlobalPlayer height. Shared so the sidebar footer can line its utility
       row up with the player's top edge: the footer's bottom block is
       theme strip (50) + gap (8) + utility row (32) + bottom padding (10),
       which is exactly this value. Change one and the other follows.
       (--global-player-height is a separate, JS-measured runtime value used
       for content offsets; this is the design constant it measures.) */
    --player-height: 100px;
    /* Responsive sizing */
    --hero-min-height: clamp(200px, 30vh, 400px);
    --control-height: clamp(70px, 10vh, 90px);
    --cover-size: clamp(140px, 22vw, 280px);
    --spacing-lg: clamp(1.5rem, 3vw, 4rem);
    --spacing-md: clamp(1rem, 2vw, 2rem);
    --spacing-sm: clamp(0.5rem, 1vw, 1rem);
    /* Typography scale */
    --text-xs: clamp(0.75rem, 1.5vw, 0.875rem);
    --text-sm: clamp(0.8125rem, 1.75vw, 0.9375rem);
    --text-base: clamp(0.875rem, 2vw, 1rem);
    --text-lg: clamp(1rem, 2.5vw, 1.25rem);
    --text-xl: clamp(1.25rem, 3vw, 1.5rem);
    --text-2xl: clamp(1.5rem, 4vw, 2rem);
    --text-3xl: clamp(2rem, 5vw, 3rem);
    /* ------------------------------------------------------------------------
       RGB indirection triples.
       Hardcoded rgba() literals throughout the app are rewritten to
       rgba(var(--x-rgb), A) so the alpha is preserved exactly while the base
       colour follows the active mode. The values below are the darkness
       defaults and are byte-identical to the literals they replaced, so
       darkness mode renders exactly as before.
       ------------------------------------------------------------------------ */
    --neuro-primary-rgb: 0, 217, 255;
    --neuro-accent-rgb: 255, 107, 157;
    --evil-primary-rgb: 255, 0, 102;
    --evil-accent-rgb: 157, 0, 255;
    --twins-primary-rgb: 157, 92, 255;
    --twins-accent-rgb: 255, 107, 157;
    /* Surface triples, for the many hero scrims and overlays that fade a
       background colour out to transparent. */
    --neuro-bg-primary-rgb: 10, 14, 26;
    --neuro-bg-secondary-rgb: 20, 27, 45;
    --neuro-bg-elevated-rgb: 30, 42, 66;
    --evil-bg-primary-rgb: 13, 2, 8;
    --evil-bg-secondary-rgb: 26, 11, 20;
    --evil-bg-elevated-rgb: 42, 18, 32;
    --twins-bg-primary-rgb: 10, 8, 20;
    --twins-bg-secondary-rgb: 21, 15, 35;
    --twins-bg-elevated-rgb: 34, 26, 53;
    /* Overlay/border ink: white scrims on dark surfaces. Flips to dark ink in light mode. */
    --ink-rgb: 255, 255, 255;
    /* Text that sits on a saturated primary gradient — stays white in both modes. */
    --on-accent-rgb: 255, 255, 255;
}

/* ============================================================================
   LIGHT MODE PALETTES

   Each theme keeps its own identity in light mode. Redefining the
   --neuro-* / --evil-* / --twins-* variables (rather than introducing a
   parallel set) means every existing var() consumer across the app picks up
   light mode for free.

   All three palettes shift together rather than only the active one: plenty of
   rules reference a specific character's colour regardless of the current
   theme (the pending-art badge uses --evil-primary as a generic "alert red",
   for example), and those must not stay at full darkness saturation on a white
   surface.

   Selectors are attribute-only so they match both <html> and <body>, which
   both carry data-theme and data-mode.
   ============================================================================ */

/* --*-primary-light deliberately becomes *darker* than --*-primary here.
   Its job across the app is "the variant that stays legible against the
   current surface" — ~100 rules use it as a text colour on a raised surface,
   and another ~500 as the far stop of a gradient that carries white text. On a
   dark surface that means lifting the hue; on a light one it means deepening
   it. Keeping the name's function rather than its literal brightness is what
   lets every existing consumer work in both modes untouched. */
[data-mode="light"] {
    /* Neuro */
    --neuro-primary: #0091B3;
    --neuro-primary-light: #007A96;
    --neuro-primary-dark: #005A70;
    --neuro-accent: #E0507F;
    --neuro-accent-light: #F08BAC;
    --neuro-bg-primary: #EAF4FA;
    --neuro-bg-secondary: #FFFFFF;
    --neuro-bg-elevated: #E2EFF7;
    --neuro-bg-hover: #CFE4F0;
    --neuro-text-primary: #0A1622;
    --neuro-text-secondary: #3E5566;
    /* Deeper than the design doc's #7C90A0, which only reached 2.8:1 on the
       elevated surface. This clears 4.5:1 on both bg-primary and bg-elevated. */
    --neuro-text-muted: #5A6B7A;
    --neuro-primary-rgb: 0, 145, 179;
    --neuro-accent-rgb: 224, 80, 127;
    --neuro-bg-primary-rgb: 234, 244, 250;
    --neuro-bg-secondary-rgb: 255, 255, 255;
    --neuro-bg-elevated-rgb: 226, 239, 247;
    /* Twins */
    --twins-primary: #6E37D6;
    --twins-primary-light: #5A2BB4;
    --twins-primary-dark: #3F1E77;
    --twins-accent: #E0507F;
    --twins-accent-secondary: #39C7E8;
    --twins-bg-primary: #F2EDFD;
    --twins-bg-secondary: #FFFFFF;
    --twins-bg-elevated: #EAE2FB;
    --twins-bg-hover: #DBCEF7;
    --twins-text-primary: #150F23;
    --twins-text-secondary: #4E4265;
    --twins-text-muted: #635777;
    --twins-primary-rgb: 110, 55, 214;
    --twins-accent-rgb: 224, 80, 127;
    --twins-bg-primary-rgb: 242, 237, 253;
    --twins-bg-secondary-rgb: 255, 255, 255;
    --twins-bg-elevated-rgb: 234, 226, 251;
    /* Evil */
    --evil-primary: #D4004F;
    --evil-primary-light: #B00041;
    --evil-primary-dark: #7A002E;
    --evil-accent: #7A00C7;
    --evil-accent-light: #A63FE0;
    --evil-bg-primary: #FBEDF3;
    --evil-bg-secondary: #FFFFFF;
    --evil-bg-elevated: #F7E0EA;
    --evil-bg-hover: #F0CEDE;
    --evil-text-primary: #1C0710;
    --evil-text-secondary: #6B3E52;
    --evil-text-muted: #7A5A68;
    --evil-primary-rgb: 212, 0, 79;
    --evil-accent-rgb: 122, 0, 199;
    --evil-bg-primary-rgb: 251, 237, 243;
    --evil-bg-secondary-rgb: 255, 255, 255;
    --evil-bg-elevated-rgb: 247, 224, 234;
    /* Neutral fallback; each theme tints this below. */
    --ink-rgb: 16, 18, 24;
}

/* The overlay ink picks up a hint of the active theme so scrims and hairlines
   do not read as flat grey on a tinted light background. */
[data-theme="neuro"][data-mode="light"] {
    --ink-rgb: 10, 22, 34;
}

[data-theme="twins"][data-mode="light"] {
    --ink-rgb: 21, 15, 35;
}

[data-theme="evil"][data-mode="light"] {
    --ink-rgb: 28, 7, 16;
}

/* ============================================================================
   SEMANTIC ALIAS LAYER

   One vocabulary that resolves to whichever theme and mode is active, so new
   code does not have to branch on data-theme. Prefer these in new components.
   ============================================================================ */

[data-theme="neuro"] {
    --theme-primary: var(--neuro-primary);
    --theme-primary-light: var(--neuro-primary-light);
    --theme-primary-dark: var(--neuro-primary-dark);
    --theme-primary-rgb: var(--neuro-primary-rgb);
    --theme-accent: var(--neuro-accent);
    --theme-accent-rgb: var(--neuro-accent-rgb);
    --theme-bg-base: var(--neuro-bg-primary);
    --theme-bg-surface: var(--neuro-bg-secondary);
    --theme-bg-raised: var(--neuro-bg-elevated);
    --theme-bg-hovered: var(--neuro-bg-hover);
    --theme-fg-primary: var(--neuro-text-primary);
    --theme-fg-secondary: var(--neuro-text-secondary);
    --theme-fg-muted: var(--neuro-text-muted);
    --theme-gradient-brand: linear-gradient(135deg, #00D9FF, #5CE1FF);
}

[data-theme="twins"] {
    --theme-primary: var(--twins-primary);
    --theme-primary-light: var(--twins-primary-light);
    --theme-primary-dark: var(--twins-primary-dark);
    --theme-primary-rgb: var(--twins-primary-rgb);
    --theme-accent: var(--twins-accent);
    --theme-accent-rgb: var(--twins-accent-rgb);
    --theme-bg-base: var(--twins-bg-primary);
    --theme-bg-surface: var(--twins-bg-secondary);
    --theme-bg-raised: var(--twins-bg-elevated);
    --theme-bg-hovered: var(--twins-bg-hover);
    --theme-fg-primary: var(--twins-text-primary);
    --theme-fg-secondary: var(--twins-text-secondary);
    --theme-fg-muted: var(--twins-text-muted);
    --theme-gradient-brand: linear-gradient(135deg, #9D5CFF, #FF6B9D);
}

[data-theme="evil"] {
    --theme-primary: var(--evil-primary);
    --theme-primary-light: var(--evil-primary-light);
    --theme-primary-dark: var(--evil-primary-dark);
    --theme-primary-rgb: var(--evil-primary-rgb);
    --theme-accent: var(--evil-accent);
    --theme-accent-rgb: var(--evil-accent-rgb);
    --theme-bg-base: var(--evil-bg-primary);
    --theme-bg-surface: var(--evil-bg-secondary);
    --theme-bg-raised: var(--evil-bg-elevated);
    --theme-bg-hovered: var(--evil-bg-hover);
    --theme-fg-primary: var(--evil-text-primary);
    --theme-fg-secondary: var(--evil-text-secondary);
    --theme-fg-muted: var(--evil-text-muted);
    --theme-gradient-brand: linear-gradient(135deg, #FF0066, #9D00FF);
}

/* Light mode swaps the brand gradients for versions that hold up on white.
   Both stops stay dark enough to carry the white label the active theme tile
   renders on top of them. */
[data-theme="neuro"][data-mode="light"] {
    --theme-gradient-brand: linear-gradient(135deg, #0091B3, #2FB6D6);
}

[data-theme="twins"][data-mode="light"] {
    --theme-gradient-brand: linear-gradient(135deg, #6E37D6, #B06BD8);
}

[data-theme="evil"][data-mode="light"] {
    --theme-gradient-brand: linear-gradient(135deg, #D4004F, #9B2FC4);
}

/* Mode-derived surfaces shared by every theme. */
[data-mode] {
    --theme-border: rgba(var(--ink-rgb), 0.08);
    --theme-border-strong: rgba(var(--ink-rgb), 0.14);
    --theme-tint: rgba(var(--theme-primary-rgb), 0.14);
    --theme-tint-soft: rgba(var(--theme-primary-rgb), 0.08);
}

[data-mode="light"] {
    --theme-border: rgba(var(--ink-rgb), 0.10);
    --theme-border-strong: rgba(var(--ink-rgb), 0.18);
    --theme-tint: rgba(var(--theme-primary-rgb), 0.12);
    --theme-tint-soft: rgba(var(--theme-primary-rgb), 0.07);
}

/* ============================================================================
   GLOBAL STYLES
   ============================================================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  background: var(--evil-bg-primary);
}

html[data-theme="neuro"] {
  background: var(--neuro-bg-primary);
}

html[data-theme="evil"] {
  background: var(--evil-bg-primary);
}

html[data-theme="twins"] {
  background: var(--twins-bg-primary);
}

body {
  font-family: 'Roboto', sans-serif;
  overflow: hidden;
}

/* ============================================================================
   NEURO THEME
   ============================================================================ */

    body[data-theme="neuro"] {
        background: var(--neuro-bg-primary);
        color: var(--neuro-text-primary);
        --mud-palette-primary: var(--neuro-primary);
        --mud-palette-primary-darken: var(--neuro-primary-dark);
    }

body[data-theme="neuro"] .theme-bg-primary {
  background: var(--neuro-bg-primary);
}

body[data-theme="neuro"] .theme-bg-secondary {
  background: var(--neuro-bg-secondary);
}

body[data-theme="neuro"] .theme-bg-elevated {
  background: var(--neuro-bg-elevated);
}

body[data-theme="neuro"] .theme-bg-hover:hover {
  background: var(--neuro-bg-hover);
}

body[data-theme="neuro"] .theme-text-primary {
  color: var(--neuro-text-primary);
}

body[data-theme="neuro"] .theme-text-secondary {
  color: var(--neuro-text-secondary);
}

body[data-theme="neuro"] .theme-text-muted {
  color: var(--neuro-text-muted);
}

body[data-theme="neuro"] .theme-primary {
  color: var(--neuro-primary) !important;
}

body[data-theme="neuro"] .theme-accent {
  color: var(--neuro-accent);
}

body[data-theme="neuro"] .theme-border {
  border-color: var(--neuro-primary);
}

body[data-theme="neuro"] .theme-glow {
  box-shadow: 0 0 20px rgba(var(--neuro-primary-rgb), 0.3);
}

body[data-theme="neuro"] .theme-glow-strong {
  box-shadow: 0 0 40px rgba(var(--neuro-primary-rgb), 0.5);
}

body[data-theme="neuro"] .theme-gradient {
  background: linear-gradient(135deg, #00D9FF 0%, #5CE1FF 50%, #FF6B9D 100%);
}

body[data-theme="neuro"] .theme-gradient-text {
    background: linear-gradient(135deg, var(--neuro-primary) 0%, var(--neuro-primary-light) 50%, var(--neuro-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
body[data-theme="neuro"] .queue-sidebar {
    background: var(--neuro-bg-primary);
}

body[data-theme="neuro"] .mud-chip {
    background: var(--neuro-bg-secondary);
    color: var(--neuro-text-primary);
}

body[data-theme="neuro"] .mud-icon-button {
    color: inherit;
}
body[data-theme="neuro"] .mud-input-label {
    color: var(--neuro-text-primary) !important;
}
body[data-theme="neuro"] .mud-input {
    color: var(--neuro-text-primary) !important;
}
body[data-theme="neuro"] .mud-input-helper-text {
    color: var(--neuro-text-muted);
}
body[data-theme="neuro"] .mud-button-filled:disabled {
    color: var(--neuro-text-muted) !important;
}
body[data-theme="neuro"] .mud-icon-default {
    color: var(--neuro-text-primary);
}
body[data-theme="neuro"] .bar {
    background: var(--neuro-primary);
}

body[data-theme="neuro"] .new-badge {
    background: var(--neuro-primary);
}
body[data-theme="neuro"] .cover-list-item.playing,
body[data-theme="neuro"] .cover-list-item:hover {
    background: rgba(var(--neuro-primary-rgb), 0.1);
}
    /* ============================================================================
EVIL THEME
============================================================================ */
    body[data-theme="evil"] {
        background: var(--evil-bg-primary);
        color: var(--evil-text-primary);
        --mud-palette-primary: var(--evil-primary);
        --mud-palette-primary-darken: var(--evil-primary-dark);
    }

body[data-theme="evil"] .theme-bg-primary {
  background: var(--evil-bg-primary);
}

body[data-theme="evil"] .theme-bg-secondary {
  background: var(--evil-bg-secondary);
}

body[data-theme="evil"] .theme-bg-elevated {
  background: var(--evil-bg-elevated);
}

body[data-theme="evil"] .theme-bg-hover:hover {
  background: var(--evil-bg-hover);
}

body[data-theme="evil"] .theme-text-primary {
  color: var(--evil-text-primary);
}

body[data-theme="evil"] .theme-text-secondary {
  color: var(--evil-text-secondary);
}

body[data-theme="evil"] .theme-text-muted {
  color: var(--evil-text-muted);
}

body[data-theme="evil"] .theme-primary {
    color: var(--evil-primary) !important;
}

body[data-theme="evil"] .theme-accent {
  color: var(--evil-accent);
}

body[data-theme="evil"] .theme-border {
  border-color: var(--evil-primary);
}

body[data-theme="evil"] .theme-glow {
  box-shadow: 0 0 20px rgba(var(--evil-primary-rgb), 0.3);
}

body[data-theme="evil"] .theme-glow-strong {
  box-shadow: 0 0 40px rgba(var(--evil-primary-rgb), 0.5);
}

body[data-theme="evil"] .theme-gradient {
  background: linear-gradient(135deg, #FF0066 0%, #9D00FF 50%, #6600CC 100%);
}

body[data-theme="evil"] .theme-gradient-text {
    background: linear-gradient( 135deg, var(--evil-primary) 0%, var(--evil-primary-light) 50%, var(--evil-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body[data-theme="evil"] .queue-sidebar {
    background: var(--evil-bg-primary);
}

body[data-theme="neuro"] ::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

body[data-theme="neuro"] ::-webkit-scrollbar-track {
  background: var(--neuro-bg-secondary);
}

body[data-theme="neuro"] ::-webkit-scrollbar-thumb {
  background: var(--neuro-primary);
  border-radius: 4px;
}

body[data-theme="neuro"] ::-webkit-scrollbar-thumb:hover {
  background: var(--neuro-primary-light);
}

body[data-theme="evil"] ::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

body[data-theme="evil"] ::-webkit-scrollbar-track {
  background: var(--evil-bg-secondary);
}

body[data-theme="evil"] ::-webkit-scrollbar-thumb {
  background: var(--evil-primary);
  border-radius: 4px;
}

body[data-theme="evil"] ::-webkit-scrollbar-thumb:hover {
  background: var(--evil-primary-light);
}
body[data-theme="evil"] .mud-chip {
    background: var(--evil-bg-secondary);
    color: var(--evil-text-primary);
}
body[data-theme="evil"] .mud-input-label {
    color: var(--evil-text-primary) !important;
}
body[data-theme="evil"] .mud-input {
    color: var(--evil-text-primary) !important;
}
body[data-theme="evil"] .mud-icon-button {
    color: inherit;
}
body[data-theme="evil"] .mud-input-helper-text {
    color: var(--evil-text-muted);
}
body[data-theme="evil"] .mud-button-filled:disabled {
    color: var(--evil-text-muted) !important;
}
body[data-theme="evil"] .mud-icon-default {
    color: var(--evil-text-primary);
}
body[data-theme="evil"] .bar {
    background: var(--evil-primary);
}

body[data-theme="evil"] .new-badge {
    background: var(--evil-primary);
}
body[data-theme="evil"] .cover-list-item.playing,
body[data-theme="evil"] .cover-list-item:hover {
    background: rgba(var(--evil-primary-rgb), 0.1);
}
    /* ============================================================================
   TWINS THEME
   ============================================================================ */

    body[data-theme="twins"] {
        background: var(--twins-bg-primary);
        color: var(--twins-text-primary);
        --mud-palette-primary: var(--twins-primary);
        --mud-palette-primary-darken: var(--twins-primary-dark);
    }

        body[data-theme="twins"] .theme-bg-primary {
            background: var(--twins-bg-primary);
        }

        body[data-theme="twins"] .theme-bg-secondary {
            background: var(--twins-bg-secondary);
        }

        body[data-theme="twins"] .theme-bg-elevated {
            background: var(--twins-bg-elevated);
        }

        body[data-theme="twins"] .theme-bg-hover:hover {
            background: var(--twins-bg-hover);
        }

        body[data-theme="twins"] .theme-text-primary {
            color: var(--twins-text-primary);
        }

        body[data-theme="twins"] .theme-text-secondary {
            color: var(--twins-text-secondary);
        }

        body[data-theme="twins"] .theme-text-muted {
            color: var(--twins-text-muted);
        }

        body[data-theme="twins"] .theme-primary {
            color: var(--twins-primary) !important;
        }

        body[data-theme="twins"] .theme-accent {
            color: var(--twins-accent);
        }

        body[data-theme="twins"] .theme-border {
            border-color: var(--twins-primary);
        }

        body[data-theme="twins"] .theme-glow {
            box-shadow: 0 0 20px rgba(var(--twins-primary-rgb), 0.3);
        }

        body[data-theme="twins"] .theme-glow-strong {
            box-shadow: 0 0 40px rgba(var(--twins-primary-rgb), 0.5);
        }

        body[data-theme="twins"] .theme-gradient {
            background: linear-gradient(135deg, #9D5CFF 0%, #FF6B9D 50%, #5CE1FF 100%);
        }

        body[data-theme="twins"] .theme-gradient-text {
            background: linear-gradient(135deg, var(--twins-primary) 0%, var(--twins-primary-light) 50%, var(--twins-accent) 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        body[data-theme="twins"] .queue-sidebar {
            background: var(--twins-bg-primary);
        }

        body[data-theme="twins"] ::-webkit-scrollbar {
            width: 8px;
            height: 8px;
        }

        body[data-theme="twins"] ::-webkit-scrollbar-track {
            background: var(--twins-bg-secondary);
        }

        body[data-theme="twins"] ::-webkit-scrollbar-thumb {
            background: var(--twins-primary);
            border-radius: 4px;
        }

            body[data-theme="twins"] ::-webkit-scrollbar-thumb:hover {
                background: var(--twins-primary-light);
            }

        body[data-theme="twins"] .mud-chip {
            background: var(--twins-bg-secondary);
            color: var(--twins-text-primary);
        }

        body[data-theme="twins"] .mud-input-label {
            color: var(--twins-text-primary) !important;
        }

        body[data-theme="twins"] .mud-input {
            color: var(--twins-text-primary) !important;
        }

        body[data-theme="twins"] .mud-icon-button {
            color: inherit;
        }

        body[data-theme="twins"] .mud-input-helper-text {
            color: var(--twins-text-muted);
        }

        body[data-theme="twins"] .mud-button-filled:disabled {
            color: var(--twins-text-muted) !important;
        }

        body[data-theme="twins"] .mud-icon-default {
            color: var(--twins-text-primary);
        }

        body[data-theme="twins"] .bar {
            background: var(--twins-primary);
        }

        body[data-theme="twins"] .new-badge {
            background: var(--twins-primary);
        }

        body[data-theme="twins"] .cover-list-item.playing,
        body[data-theme="twins"] .cover-list-item:hover {
            background: rgba(var(--twins-primary-rgb), 0.1);
        }

        body[data-theme="twins"] .scrollbar-behavior {
            scrollbar-width: thin;
            scrollbar-color: var(--twins-primary) var(--twins-bg-secondary);
        }

            body[data-theme="twins"] .scrollbar-behavior::-webkit-scrollbar {
                width: 10px;
                height: 10px;
            }

            body[data-theme="twins"] .scrollbar-behavior::-webkit-scrollbar-track {
                background: var(--twins-bg-secondary);
            }

            body[data-theme="twins"] .scrollbar-behavior::-webkit-scrollbar-thumb {
                background-color: var(--twins-primary);
                border-radius: 8px;
                border: 2px solid var(--twins-bg-secondary);
            }

                body[data-theme="twins"] .scrollbar-behavior::-webkit-scrollbar-thumb:hover {
                    background-color: var(--twins-primary-light);
                }

        body[data-theme="twins"] .mud-tabs-tabbar {
            background-color: var(--twins-bg-elevated) !important;
        }

@keyframes pulse-neuro {
    0%, 100% {
box-shadow: 0 0 20px rgba(var(--neuro-primary-rgb), 0.3);
}
  50% {
    box-shadow: 0 0 40px rgba(var(--neuro-primary-rgb), 0.6);
  }
}

@keyframes pulse-evil {
  0%, 100% {
    box-shadow: 0 0 20px rgba(var(--evil-primary-rgb), 0.3);
  }
  50% {
    box-shadow: 0 0 40px rgba(var(--evil-primary-rgb), 0.6);
  }
}

body[data-theme="neuro"] .pulse-animate {
  animation: pulse-neuro 2s ease-in-out infinite;
}

body[data-theme="evil"] .pulse-animate {
  animation: pulse-evil 2s ease-in-out infinite;
}


.theme-toggle-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
  font-size: 14px;
  border: 2px solid;
  user-select: none;
}

body[data-theme="neuro"] .theme-toggle-btn {
  background: var(--neuro-bg-elevated);
  border-color: var(--neuro-primary);
  color: var(--neuro-text-primary);
}

body[data-theme="neuro"] .theme-toggle-btn:hover {
  background: var(--neuro-bg-hover);
  box-shadow: 0 0 20px rgba(var(--neuro-primary-rgb), 0.3);
  transform: translateY(-2px);
}

body[data-theme="evil"] .theme-toggle-btn {
  background: var(--evil-bg-elevated);
  border-color: var(--evil-primary);
  color: var(--evil-text-primary);
}

body[data-theme="evil"] .theme-toggle-btn:hover {
  background: var(--evil-bg-hover);
  box-shadow: 0 0 20px rgba(var(--evil-primary-rgb), 0.3);
  transform: translateY(-2px);
}

.theme-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.song-card {
  border-radius: 12px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

body[data-theme="neuro"] .song-card {
  background: var(--neuro-bg-elevated);
}

body[data-theme="neuro"] .song-card:hover {
  background: var(--neuro-bg-hover);
  border-color: var(--neuro-primary);
  box-shadow: 0 0 20px rgba(var(--neuro-primary-rgb), 0.2);
  transform: translateY(-4px);
}

body[data-theme="neuro"] .song-card.active {
  background: var(--neuro-bg-hover);
  border-color: var(--neuro-primary);
  box-shadow: 0 0 20px rgba(var(--neuro-primary-rgb), 0.3);
}

body[data-theme="evil"] .song-card {
  background: var(--evil-bg-elevated);
}

body[data-theme="evil"] .song-card:hover {
  background: var(--evil-bg-hover);
  border-color: var(--evil-primary);
  box-shadow: 0 0 20px rgba(var(--evil-primary-rgb), 0.2);
  transform: translateY(-4px);
}

body[data-theme="evil"] .song-card.active {
  background: var(--evil-bg-hover);
  border-color: var(--evil-primary);
  box-shadow: 0 0 20px rgba(var(--evil-primary-rgb), 0.3);
}

.global-player .progress-container,
.desktop-player .progress-container {
    width: 100%;
    height: 6px !important;
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: height 0.2s ease;
}

    .global-player .progress-container:hover,
    .desktop-player .progress-container:hover {
        height: 8px !important;
    }

body[data-theme="neuro"] .global-player .progress-container,
body[data-theme="neuro"] .desktop-player .progress-container {
    background: rgba(var(--neuro-bg-secondary-rgb), 0.8) !important;
}

body[data-theme="evil"] .global-player .progress-container,
body[data-theme="evil"] .desktop-player .progress-container {
    background: rgba(var(--evil-bg-secondary-rgb), 0.8) !important;
}

.global-player .progress-fill,
.desktop-player .progress-fill {
    height: 6px !important;
    max-height: 100% !important;
    border-radius: 3px !important;
    transition: width 0.1s ease !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
}

body[data-theme="neuro"] .global-player .progress-fill,
body[data-theme="neuro"] .desktop-player .progress-fill {
    background: var(--neuro-primary) !important;
    box-shadow: 0 0 10px rgba(var(--neuro-primary-rgb), 0.5) !important;
}

body[data-theme="evil"] .global-player .progress-fill,
body[data-theme="evil"] .desktop-player .progress-fill {
    background: var(--evil-primary) !important;
    box-shadow: 0 0 10px rgba(var(--evil-primary-rgb), 0.5) !important;
}

.global-player .progress-container:hover .progress-fill,
.desktop-player .progress-container:hover .progress-fill {
    height: 8px !important;
}

    .global-player .progress-container:hover .progress-fill::after,
    .desktop-player .progress-container:hover .progress-fill::after {
        content: '';
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 12px;
        height: 12px;
        border-radius: 50%;
        background: white !important;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    }

.progress-container:hover .progress-fill::before {
  content: '';
  position: absolute;
  right: -2px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  transition: all 0.2s ease;
}

body[data-theme="neuro"] .progress-container:hover .progress-fill::before {
  box-shadow: 0 2px 8px rgba(var(--neuro-primary-rgb), 0.8), 0 0 16px rgba(var(--neuro-primary-rgb), 0.4);
}

body[data-theme="evil"] .progress-container:hover .progress-fill::before {
  box-shadow: 0 2px 8px rgba(var(--evil-primary-rgb), 0.8), 0 0 16px rgba(var(--evil-primary-rgb), 0.4);
}

@media (max-width: 768px) {
  .theme-toggle-btn {
    padding: 8px 16px;
    font-size: 12px;
  }
  
  .theme-icon {
    width: 20px;
    height: 20px;
    font-size: 16px;
  }

  .progress-container {
    height: 5px;
  }

  .progress-container:hover {
    height: 6px;
  }
}

.playing-bars {
    display: flex;
    gap: 2px;
    align-items: flex-end;
    height: 14px;
    justify-content: center;
}

.bar {
    width: 3px;
    border-radius: 2px;
    animation: playing 0.8s ease-in-out infinite;
}

body:not([data-theme]) .bar {
    background: #1DB954;
}

.bar:nth-child(1) {
    animation-delay: 0s;
}

.bar:nth-child(2) {
    animation-delay: 0.2s;
}

.bar:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes playing {
    0%, 100% {
        height: 4px;
    }

    50% {
        height: 14px;
    }
}
body:not([data-theme]) .new-badge {
    background: #1DB954;
}

.initial-load {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0 !important;
    align-items: center;
    justify-content: center;
    border-radius: inherit;
    display: flex;
    position: fixed;
    transition: .3s cubic-bezier(0.25, 0.8, 0.5, 1), z-index 1ms;
    z-index: 5;
}
#first-visit-message {
    margin: 2rem;
    font-size: 1.25rem;
    text-align: center;
    display: none;
}

body[data-theme="neuro"] .mud-dialog.mud-dialog-width-lg,
body[data-theme="evil"] .mud-dialog.mud-dialog-width-lg {
    max-width: 90vw;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(var(--ink-rgb), 0.1);
    box-shadow: none;
}
body[data-theme="neuro"] .mud-dialog.mud-dialog-width-lg {
    background: var(--neuro-bg-primary);
}
body[data-theme="evil"] .mud-dialog.mud-dialog-width-lg {
    background: var(--evil-bg-primary);
}

body[data-theme="neuro"] .mud-dialog,
body[data-theme="evil"] .mud-dialog {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(var(--ink-rgb), 0.1);
}
body[data-theme="neuro"] .mud-dialog {
    background: var(--neuro-bg-primary);
}
body[data-theme="evil"] .mud-dialog {
    background: var(--evil-bg-primary);
}

body[data-theme="neuro"] .mud-dialog-title,
body[data-theme="evil"] .mud-dialog-title {
    border-bottom: none;
}
body[data-theme="neuro"] .mud-dialog-title {
    background: var(--neuro-bg-primary);
}
body[data-theme="evil"] .mud-dialog-title {
    background: var(--evil-bg-primary);
}
body[data-theme="neuro"] .mud-dialog-title, body[data-theme="neuro"] .mud-dialog-content {
    color: var(--neuro-text-primary) !important;
}

body[data-theme="evil"] .mud-dialog-title, body[data-theme="evil"] .mud-dialog-content {
    color: var(--evil-text-primary) !important;
}

body[data-theme="neuro"] .mud-dialog-content {
    background: var(--neuro-bg-primary);
}
body[data-theme="evil"] .mud-dialog-content {
    background: var(--evil-bg-primary);
}
body[data-theme="neuro"] .mud-dialog-actions {
    background: var(--neuro-bg-primary);
}
body[data-theme="evil"] .mud-dialog-actions {
    background: var(--evil-bg-primary);
}
body[data-theme="neuro"] .mud-dialog-actions,
body[data-theme="evil"] .mud-dialog-actions {
    border-top: none;
}

/*body[data-theme="neuro"] .mud-overlay,
body[data-theme="evil"] .mud-overlay {
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
}
*/
body[data-theme="neuro"] .image-info,
body[data-theme="evil"] .image-info {
    border-top: 1px solid rgba(var(--ink-rgb), 0.15);
    align-self: center;
}

body[data-theme="neuro"] .close-button,
body[data-theme="evil"] .close-button {
    color: #fff !important;
}

    body[data-theme="neuro"] .close-button:hover,
    body[data-theme="evil"] .close-button:hover {
        background: rgba(var(--ink-rgb), 0.2) !important;
        box-shadow: none;
    }

body[data-theme="neuro"] .image-view-dialog,
body[data-theme="evil"] .image-view-dialog {
    background: #000;
}

    body[data-theme="neuro"] .image-view-dialog img,
    body[data-theme="evil"] .image-view-dialog img {
        border: none;
        box-shadow: none;
    }

body[data-theme="neuro"] .image-info {
    color: var(--neuro-text-primary);
}
body[data-theme="evil"] .image-info {
    color: var(--evil-text-primary);
}
/* These buttons are painted with the saturated primary, so their label belongs
   on the accent side in both modes — --*-text-primary would flip to near-black
   in light mode and disappear into the fill. */
body[data-theme="neuro"] .mud-button-filled, body[data-theme="neuro"] .mud-button-outlined {
    color: rgb(var(--on-accent-rgb));
    background-color: var(--neuro-primary);
}
body[data-theme="evil"] .mud-button-filled, body[data-theme="evil"] .mud-button-outlined {
    color: rgb(var(--on-accent-rgb));
    background-color: var(--evil-primary);
}
.mud-popover.mud-paper {
    min-width: 280px;
    max-width: 320px;
    border-radius: 12px !important;
    padding: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5) !important;
    max-height: -webkit-fill-available;
    max-height: fill-available;
    overflow-y: auto;
}

body[data-theme="neuro"] .mud-popover.mud-paper {
    background: var(--neuro-bg-elevated) !important;
    border: 1px solid rgba(var(--neuro-primary-rgb), 0.2);
}

body[data-theme="evil"] .mud-popover.mud-paper {
    background: var(--evil-bg-elevated) !important;
    border: 1px solid rgba(var(--evil-primary-rgb), 0.2);
}

/* Menu list */
.mud-menu-list {
    padding: 0 !important;
}

/* Menu items */
.mud-menu-item {
    padding: 6px 8px !important;
    border-radius: 6px !important;
    margin-bottom: 2px;
    min-height: auto !important;
    transition: all 0.2s ease;
}

body[data-theme="neuro"] .mud-menu-item {
    color: var(--neuro-text-primary) !important;
}

body[data-theme="evil"] .mud-menu-item {
    color: var(--evil-text-primary) !important;
}

body[data-theme="neuro"] .mud-menu-item:hover {
    background: var(--neuro-bg-hover) !important;
}

body[data-theme="evil"] .mud-menu-item:hover {
    background: var(--evil-bg-hover) !important;
}

/* Menu item text */
.mud-menu-item-text {
    font-size: 0.9rem !important;
    font-weight: 500 !important;
}

/* Menu item icons */
.mud-menu-item .mud-icon-root {
    font-size: 20px !important;
    margin-right: 12px !important;
}

body[data-theme="neuro"] .mud-menu-item .mud-icon-root {
    color: var(--neuro-text-elevated);
}

body[data-theme="evil"] .mud-menu-item .mud-icon-root {
    color: var(--evil-text-elevated);
}
body[data-theme="twins"] .mud-menu-item .mud-icon-root {
    color: var(--twins-text-primary);
}

body[data-theme="evil"] .mud-menu-item.mud-disabled .mud-menu-item-icon {
    color: var(--evil-text-muted) !important;
}
body[data-theme="neuro"] .mud-menu-item.mud-disabled .mud-menu-item-icon {
    color: var(--neuro-text-muted) !important;
}

.mud-menu-item:hover .mud-icon-root {
    color: inherit !important;
}

/* Delete item danger styling */
.mud-menu-item .mud-icon-root.mud-error-text {
    color: #ff4444 !important;
}

.mud-menu-item:has(.mud-error-text) {
    color: #ff4444 !important;
}

    .mud-menu-item:has(.mud-error-text):hover {
        background: rgba(255, 68, 68, 0.1) !important;
    }

/* Remove ripple effect */
.mud-menu-item .mud-ripple {
    display: none !important;
}

/* Remove default elevation shadow */
.mud-popover.mud-elevation-8 {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5) !important;
}
body[data-theme="neuro"] .mud-menu-item-icon {
    color: var(--neuro-text-secondary) !important;
}

body[data-theme="evil"] .mud-menu-item-icon {
    color: var(--evil-text-secondary) !important;
}
body[data-theme="neuro"] .mud-list-item-icon {
    color: var(--neuro-text-primary) !important;
}
body[data-theme="evil"] .mud-list-item-icon {
    color: var(--evil-text-primary) !important;
}

.cover-mosaic {
    display: grid;
    width: 100%;
    height: 100%;
    gap: 4px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

    /* 1 image → full cover */
    .cover-mosaic:has(.mosaic-item:only-child) {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr;
    }

    /* 2 images → side by side */
    .cover-mosaic:has(.mosaic-item:nth-child(2):last-child) {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: 1fr;
    }

    /* 3 images → 2 on top, 1 spanning bottom */
    .cover-mosaic:has(.mosaic-item:nth-child(3):last-child) {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(2, 1fr);
    }

        .cover-mosaic:has(.mosaic-item:nth-child(3):last-child) .mosaic-item:nth-child(3) {
            grid-column: 1 / -1;
        }

    /* 4 images → perfect 2x2 grid */
    .cover-mosaic:has(.mosaic-item:nth-child(4)) {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(2, 1fr);
    }

    /* Image fit */
    .cover-mosaic .mosaic-item {
        position: relative;
        overflow: hidden;
    }

        .cover-mosaic .mosaic-item img,
        .cover-mosaic .mosaic-item picture,
        .cover-mosaic .mosaic-item video {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

body[data-theme="neuro"] .cover-mosaic {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 40px rgba(var(--neuro-primary-rgb), 0.2);
}

body[data-theme="evil"] .cover-mosaic {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 40px rgba(var(--evil-primary-rgb), 0.2);
}

.mud-popover.mud-paper.overflow-y-auto {
    border-radius: 12px !important;
    padding: 8px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5) !important;
}

body[data-theme="neuro"] .mud-popover.mud-paper.overflow-y-auto {
    background: var(--neuro-bg-elevated) !important;
    border: 1px solid rgba(var(--neuro-primary-rgb), 0.2);
}

body[data-theme="evil"] .mud-popover.mud-paper.overflow-y-auto {
    background: var(--evil-bg-elevated) !important;
    border: 1px solid rgba(var(--evil-primary-rgb), 0.2);
}

/* Autocomplete List Container */
.mud-popover .mud-list {
    padding: 0 !important;
}

/* Autocomplete List Items */
.mud-popover .mud-list-item {
    padding: 10px 12px !important;
    border-radius: 8px !important;
    margin-bottom: 4px !important;
    min-height: auto !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
}

    /* Remove last item margin */
    .mud-popover .mud-list-item:last-child {
        margin-bottom: 0 !important;
    }

/* Neuro Theme - List Items */
body[data-theme="neuro"] .mud-popover .mud-list-item {
    color: var(--neuro-text-primary) !important;
    background: transparent !important;
}

    body[data-theme="neuro"] .mud-popover .mud-list-item:hover {
        background: var(--neuro-bg-hover) !important;
    }

    body[data-theme="neuro"] .mud-popover .mud-list-item.mud-selected-item {
        background: rgba(var(--neuro-primary-rgb), 0.15) !important;
        border-left: 3px solid var(--neuro-primary);
        padding-left: 9px !important;
    }

        body[data-theme="neuro"] .mud-popover .mud-list-item.mud-selected-item:hover {
            background: rgba(var(--neuro-primary-rgb), 0.25) !important;
        }

/* Evil Theme - List Items */
body[data-theme="evil"] .mud-popover .mud-list-item {
    color: var(--evil-text-primary) !important;
    background: transparent !important;
}

    body[data-theme="evil"] .mud-popover .mud-list-item:hover {
        background: var(--evil-bg-hover) !important;
    }

    body[data-theme="evil"] .mud-popover .mud-list-item.mud-selected-item {
        background: rgba(var(--evil-primary-rgb), 0.15) !important;
        border-left: 3px solid var(--evil-primary);
        padding-left: 9px !important;
    }

        body[data-theme="evil"] .mud-popover .mud-list-item.mud-selected-item:hover {
            background: rgba(var(--evil-primary-rgb), 0.25) !important;
        }

/* List Item Text */
.mud-popover .mud-list-item-text p {
    font-size: 0.9rem !important;
    font-weight: 400 !important;
    margin: 0 !important;
    line-height: 1.5 !important;
}

body[data-theme="neuro"] .mud-popover .mud-list-item-text p {
    color: var(--neuro-text-primary) !important;
}

body[data-theme="evil"] .mud-popover .mud-list-item-text p {
    color: var(--evil-text-primary) !important;
}

/* Selected item text emphasis */
body[data-theme="neuro"] .mud-popover .mud-list-item.mud-selected-item .mud-typography {
    color: var(--neuro-primary) !important;
    font-weight: 500 !important;
}

body[data-theme="evil"] .mud-popover .mud-list-item.mud-selected-item .mud-typography {
    color: var(--evil-primary) !important;
    font-weight: 500 !important;
}

/* Remove ripple effect for cleaner look */
.mud-popover .mud-list-item .mud-ripple:not(.mud-ripple-checkbox) {
    display: none !important;
}

/* Focus state */
body[data-theme="neuro"] .mud-popover .mud-list-item:focus {
    outline: 2px solid var(--neuro-primary);
    outline-offset: -2px;
    background: rgba(var(--neuro-primary-rgb), 0.1) !important;
}

body[data-theme="evil"] .mud-popover .mud-list-item:focus {
    outline: 2px solid var(--evil-primary);
    outline-offset: -2px;
    background: rgba(var(--evil-primary-rgb), 0.1) !important;
}

/* Custom scrollbar for autocomplete dropdown */
body[data-theme="neuro"] .mud-popover.overflow-y-auto::-webkit-scrollbar {
    width: 8px;
}

body[data-theme="neuro"] .mud-popover.overflow-y-auto::-webkit-scrollbar-track {
    background: var(--neuro-bg-secondary);
    border-radius: 4px;
}

body[data-theme="neuro"] .mud-popover.overflow-y-auto::-webkit-scrollbar-thumb {
    background: var(--neuro-primary);
    border-radius: 4px;
}

    body[data-theme="neuro"] .mud-popover.overflow-y-auto::-webkit-scrollbar-thumb:hover {
        background: var(--neuro-primary-light);
    }

body[data-theme="evil"] .mud-popover.overflow-y-auto::-webkit-scrollbar {
    width: 8px;
}

body[data-theme="evil"] .mud-popover.overflow-y-auto::-webkit-scrollbar-track {
    background: var(--evil-bg-secondary);
    border-radius: 4px;
}

body[data-theme="evil"] .mud-popover.overflow-y-auto::-webkit-scrollbar-thumb {
    background: var(--evil-primary);
    border-radius: 4px;
}

    body[data-theme="evil"] .mud-popover.overflow-y-auto::-webkit-scrollbar-thumb:hover {
        background: var(--evil-primary-light);
    }

/* Empty state / No results */
.mud-popover .mud-list-item.mud-list-item-disabled {
    opacity: 0.5;
    cursor: default !important;
}

body[data-theme="neuro"] .mud-popover .mud-list-item.mud-list-item-disabled {
    color: var(--neuro-text-muted) !important;
}

body[data-theme="evil"] .mud-popover .mud-list-item.mud-list-item-disabled {
    color: var(--evil-text-muted) !important;
}

/* Loading state */
.mud-popover .mud-progress-circular {
    margin: 12px auto;
    display: block;
}

body[data-theme="neuro"] .mud-popover .mud-progress-circular circle {
    stroke: var(--neuro-primary) !important;
}

body[data-theme="evil"] .mud-popover .mud-progress-circular circle {
    stroke: var(--evil-primary) !important;
}
body[data-theme="neuro"] .play-btn {
    color: var(--neuro-primary) !important;
}

body[data-theme="evil"] .play-btn {
    color: var(--evil-primary) !important;
}

/* Base Chip Styling */
.add-filter-chip {
    padding: 8px 16px !important;
    border-radius: 16px !important;
    font-weight: 500 !important;
    font-size: 0.875rem !important;
    text-transform: none !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
}

    .add-filter-chip .mud-chip-content {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .add-filter-chip .mud-chip-icon {
        margin-right: 0 !important;
        font-size: 1.125rem !important;
    }


body[data-theme="neuro"] .add-filter-chip {
    background: transparent !important;
    border: 2px solid var(--neuro-primary) !important;
    color: var(--neuro-primary) !important;
}

    body[data-theme="neuro"] .add-filter-chip:hover {
        background: rgba(var(--neuro-primary-rgb), 0.1) !important;
        border-color: var(--neuro-primary-light) !important;
        box-shadow: 0 0 12px rgba(var(--neuro-primary-rgb), 0.3);
        transform: translateY(-2px);
    }

    body[data-theme="neuro"] .add-filter-chip:active {
        background: rgba(var(--neuro-primary-rgb), 0.2) !important;
        transform: translateY(0);
    }

    body[data-theme="neuro"] .add-filter-chip .mud-chip-icon {
        color: var(--neuro-primary) !important;
    }

    body[data-theme="neuro"] .add-filter-chip:hover .mud-chip-icon {
        color: var(--neuro-primary-light) !important;
    }

    /* Ripple effect color */
    body[data-theme="neuro"] .add-filter-chip .mud-ripple {
        color: var(--neuro-primary) !important;
    }

body[data-theme="evil"] .add-filter-chip {
    background: transparent !important;
    border: 2px solid var(--evil-primary) !important;
    color: var(--evil-primary) !important;
}

    body[data-theme="evil"] .add-filter-chip:hover {
        background: rgba(var(--evil-primary-rgb), 0.1) !important;
        border-color: var(--evil-primary-light) !important;
        box-shadow: 0 0 12px rgba(var(--evil-primary-rgb), 0.3);
        transform: translateY(-2px);
    }

    body[data-theme="evil"] .add-filter-chip:active {
        background: rgba(var(--evil-primary-rgb), 0.2) !important;
        transform: translateY(0);
    }

    body[data-theme="evil"] .add-filter-chip .mud-chip-icon {
        color: var(--evil-primary) !important;
    }

    body[data-theme="evil"] .add-filter-chip:hover .mud-chip-icon {
        color: var(--evil-primary-light) !important;
    }

    /* Ripple effect color */
    body[data-theme="evil"] .add-filter-chip .mud-ripple {
        color: var(--evil-primary) !important;
    }

body[data-theme="neuro"] .add-filter-chip.mud-chip-filled {
    background: var(--neuro-primary) !important;
    border: 2px solid var(--neuro-primary) !important;
    color: var(--neuro-bg-primary) !important;
}

    body[data-theme="neuro"] .add-filter-chip.mud-chip-filled:hover {
        background: var(--neuro-primary-light) !important;
        border-color: var(--neuro-primary-light) !important;
        box-shadow: 0 0 16px rgba(var(--neuro-primary-rgb), 0.5);
    }

    body[data-theme="neuro"] .add-filter-chip.mud-chip-filled .mud-chip-icon {
        color: var(--neuro-bg-primary) !important;
    }

/* Evil Filled */
body[data-theme="evil"] .add-filter-chip.mud-chip-filled {
    background: var(--evil-primary) !important;
    border: 2px solid var(--evil-primary) !important;
    color: var(--evil-bg-primary) !important;
}

    body[data-theme="evil"] .add-filter-chip.mud-chip-filled:hover {
        background: var(--evil-primary-light) !important;
        border-color: var(--evil-primary-light) !important;
        box-shadow: 0 0 16px rgba(var(--evil-primary-rgb), 0.5);
    }

    body[data-theme="evil"] .add-filter-chip.mud-chip-filled .mud-chip-icon {
        color: var(--evil-bg-primary) !important;
    }

body[data-theme="neuro"] .add-filter-chip:disabled,
body[data-theme="neuro"] .add-filter-chip.mud-disabled {
    border-color: var(--neuro-text-muted) !important;
    color: var(--neuro-text-muted) !important;
    opacity: 0.5;
    cursor: not-allowed !important;
}

    body[data-theme="neuro"] .add-filter-chip:disabled:hover,
    body[data-theme="neuro"] .add-filter-chip.mud-disabled:hover {
        background: transparent !important;
        transform: none;
        box-shadow: none;
    }

body[data-theme="evil"] .add-filter-chip:disabled,
body[data-theme="evil"] .add-filter-chip.mud-disabled {
    border-color: var(--evil-text-muted) !important;
    color: var(--evil-text-muted) !important;
    opacity: 0.5;
    cursor: not-allowed !important;
}

    body[data-theme="evil"] .add-filter-chip:disabled:hover,
    body[data-theme="evil"] .add-filter-chip.mud-disabled:hover {
        background: transparent !important;
        transform: none;
        box-shadow: none;
    }

body[data-theme="neuro"] .add-filter-chip:focus-visible {
    outline: 2px solid var(--neuro-primary);
    outline-offset: 2px;
}

body[data-theme="evil"] .add-filter-chip:focus-visible {
    outline: 2px solid var(--evil-primary);
    outline-offset: 2px;
}

@media (max-width: 768px) {
    .add-filter-chip {
        padding: 6px 12px !important;
        font-size: 0.8125rem !important;
    }

        .add-filter-chip .mud-chip-icon {
            font-size: 1rem !important;
        }
}

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 4rem 2rem;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}

.search-input {
    width: 100%;
    margin-bottom: 1rem;
}

    /* Main Input Container */
    .search-input .mud-input-control-input-container {
        width: 100%;
    }

    /* The Input Itself */
    .search-input .mud-input.mud-input-outlined {
        background: rgba(var(--ink-rgb), 0.05) !important;
        border-radius: 24px !important;
        min-height: 64px !important;
        backdrop-filter: blur(10px);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        border: none !important;
    }

    /* Remove the default border/fieldset */
    .search-input .mud-input-outlined .mud-input-outlined-border {
        border: none !important;
        display: none !important;
    }

    /* Input Slot (where text goes) */
    .search-input .mud-input-slot.mud-input-root {
        padding: 18px 24px !important;
        font-size: 1.125rem !important;
        font-weight: 400 !important;
    }

    /* Start Adornment (Search Icon Container) */
    .search-input .mud-input-adornment.mud-input-adornment-start {
        margin-right: 12px !important;
        padding-left: 4px !important;
    }

    /* Search Icon */
    .search-input .mud-input-adornment-icon {
        width: 28px !important;
        height: 28px !important;
        font-size: 1.75rem !important;
        opacity: 0.5 !important;
        transition: all 0.3s ease;
    }

    /* Placeholder Text */
    .search-input input::placeholder {
        color: currentColor !important;
        opacity: 0.4 !important;
        font-size: 1.125rem !important;
        font-weight: 400 !important;
    }

    /* Focus State - Base */
    .search-input .mud-input.mud-input-outlined:focus-within {
        background: rgba(var(--ink-rgb), 0.08) !important;
    }

    .search-input .mud-input:focus-within .mud-input-adornment-icon {
        opacity: 0.8 !important;
    }

    /* Hover State - Base */
    .search-input .mud-input.mud-input-outlined:hover:not(:focus-within) {
        background: rgba(var(--ink-rgb), 0.06) !important;
    }

body[data-theme="neuro"] .search-input .mud-input.mud-input-outlined {
    background: rgba(var(--neuro-primary-rgb), 0.04) !important;
    box-shadow: 0 4px 20px rgba(var(--neuro-primary-rgb), 0.03), inset 0 1px 2px rgba(var(--ink-rgb), 0.02);
}

body[data-theme="neuro"] .search-input .mud-input-adornment-icon {
    color: var(--neuro-text-muted) !important;
}

body[data-theme="neuro"] .search-input input::placeholder {
    color: var(--neuro-text-muted) !important;
}

/* Neuro Focus */
body[data-theme="neuro"] .search-input .mud-input.mud-input-outlined:focus-within {
    background: rgba(var(--neuro-primary-rgb), 0.08) !important;
    box-shadow: 0 4px 30px rgba(var(--neuro-primary-rgb), 0.12), inset 0 1px 3px rgba(var(--neuro-primary-rgb), 0.1);
}

body[data-theme="neuro"] .search-input .mud-input:focus-within .mud-input-adornment-icon {
    color: var(--neuro-primary) !important;
}

/* Neuro Hover */
body[data-theme="neuro"] .search-input .mud-input.mud-input-outlined:hover:not(:focus-within) {
    background: rgba(var(--neuro-primary-rgb), 0.06) !important;
    box-shadow: 0 4px 24px rgba(var(--neuro-primary-rgb), 0.06);
}


body[data-theme="evil"] .search-input .mud-input.mud-input-outlined {
    background: rgba(var(--evil-primary-rgb), 0.04) !important;
    box-shadow: 0 4px 20px rgba(var(--evil-primary-rgb), 0.03), inset 0 1px 2px rgba(var(--ink-rgb), 0.02);
}

body[data-theme="evil"] .search-input .mud-input-adornment-icon {
    color: var(--evil-text-muted) !important;
}

body[data-theme="evil"] .search-input input::placeholder {
    color: var(--evil-text-muted) !important;
}

/* Evil Focus */
body[data-theme="evil"] .search-input .mud-input.mud-input-outlined:focus-within {
    background: rgba(var(--evil-primary-rgb), 0.08) !important;
    box-shadow: 0 4px 30px rgba(var(--evil-primary-rgb), 0.12), inset 0 1px 3px rgba(var(--evil-primary-rgb), 0.1);
}

body[data-theme="evil"] .search-input .mud-input:focus-within .mud-input-adornment-icon {
    color: var(--evil-primary) !important;
}

/* Evil Hover */
body[data-theme="evil"] .search-input .mud-input.mud-input-outlined:hover:not(:focus-within) {
    background: rgba(var(--evil-primary-rgb), 0.06) !important;
    box-shadow: 0 4px 24px rgba(var(--evil-primary-rgb), 0.06);
}

@media (max-width: 960px) {
    .search-input .mud-input.mud-input-outlined {
        min-height: 58px !important;
        border-radius: 20px !important;
    }

    .search-input .mud-input-slot.mud-input-root {
        padding: 16px 20px !important;
        font-size: 1.0625rem !important;
    }

    .search-input input::placeholder {
        font-size: 1.0625rem !important;
    }
}

@media (max-width: 600px) {
    .search-input .mud-input.mud-input-outlined {
        min-height: 52px !important;
        border-radius: 18px !important;
    }

    .search-input .mud-input-slot.mud-input-root {
        padding: 14px 18px !important;
        font-size: 1rem !important;
    }

    .search-input .mud-input-adornment-icon {
        width: 24px !important;
        height: 24px !important;
        font-size: 1.5rem !important;
    }

    .search-input input::placeholder {
        font-size: 1rem !important;
    }

    .search-input .mud-input-adornment.mud-input-adornment-start {
        margin-right: 10px !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    body[data-theme="neuro"] .search-input .mud-input.mud-input-outlined {
        background: rgba(var(--neuro-primary-rgb), 0.1) !important;
        outline: 1px solid var(--neuro-primary);
    }

    body[data-theme="evil"] .search-input .mud-input.mud-input-outlined {
        background: rgba(var(--evil-primary-rgb), 0.1) !important;
        outline: 1px solid var(--evil-primary);
    }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .search-input .mud-input.mud-input-outlined,
    .search-input .mud-input-adornment-icon {
        transition: none !important;
    }
}

/* Keyboard focus indicator */
.search-input .mud-input.mud-input-outlined:focus-within {
    outline: 2px solid transparent;
    outline-offset: 2px;
}

body[data-theme="neuro"] .search-input .mud-input.mud-input-outlined:focus-within {
    outline-color: var(--neuro-primary);
}

body[data-theme="evil"] .search-input .mud-input.mud-input-outlined:focus-within {
    outline-color: var(--evil-primary);
}

.search-input.loading .mud-input-adornment-icon {
    animation: searchIconPulse 1.5s ease-in-out infinite;
}

@keyframes searchIconPulse {
    0%, 100% {
        opacity: 0.3;
    }

    50% {
        opacity: 0.6;
    }
}

.search-input .mud-icon-button.mud-input-adornment {
    padding: 8px !important;
}

body[data-theme="neuro"] .search-input .mud-icon-button.mud-input-adornment {
    color: var(--neuro-text-muted) !important;
}

    body[data-theme="neuro"] .search-input .mud-icon-button.mud-input-adornment:hover {
        color: var(--neuro-primary) !important;
        background: rgba(var(--neuro-primary-rgb), 0.1) !important;
    }

body[data-theme="evil"] .search-input .mud-icon-button.mud-input-adornment {
    color: var(--evil-text-muted) !important;
}

    body[data-theme="evil"] .search-input .mud-icon-button.mud-input-adornment:hover {
        color: var(--evil-primary) !important;
        background: rgba(var(--evil-primary-rgb), 0.1) !important;
    }

body[data-theme="neuro"] .expansion-panel-item .mud-expand-panel-header {
    background: var(--neuro-bg-secondary);
}

body[data-theme="evil"] .expansion-panel-item .mud-expand-panel-header {
    background: var(--evil-bg-secondary);
}
body[data-theme="neuro"] .expansion-panel-item .mud-expand-panel-content {
    background: var(--neuro-bg-secondary);
}

body[data-theme="evil"] .expansion-panel-item .mud-expand-panel-content {
    background: var(--evil-bg-secondary);
}
body[data-theme="neuro"] .themed-input .mud-input-outlined-border {
    border-color: rgba(var(--ink-rgb), 0.15) !important;
}

body[data-theme="evil"] .themed-input .mud-input-outlined-border {
    border-color: rgba(var(--ink-rgb), 0.15) !important;
}

body[data-theme="neuro"] .themed-input .mud-input-outlined:hover .mud-input-outlined-border {
    border-color: rgba(var(--neuro-primary-rgb), 0.3) !important;
}

body[data-theme="evil"] .themed-input .mud-input-outlined:hover .mud-input-outlined-border {
    border-color: rgba(var(--evil-primary-rgb), 0.3) !important;
}

body[data-theme="neuro"] .themed-input .mud-input-outlined.mud-input-focused .mud-input-outlined-border {
    border-color: var(--neuro-primary) !important;
    border-width: 2px !important;
}

body[data-theme="evil"] .themed-input .mud-input-outlined.mud-input-focused .mud-input-outlined-border {
    border-color: var(--evil-primary) !important;
    border-width: 2px !important;
}
body[data-theme="neuro"] .expansion-panel-item {
    background: var(--neuro-bg-secondary) !important;
}

body[data-theme="evil"] .expansion-panel-item {
    background: var(--evil-bg-secondary) !important;
}

.related-section {
    padding: var(--spacing-lg);
    border-top: 1px solid rgba(var(--ink-rgb), 0.05);
}

.section-title {
    margin-bottom: var(--spacing-md);
    font-weight: 700;
}

.related-tags-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--spacing-sm);
}

.related-tag-card {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

body[data-theme="neuro"] .related-tag-card {
    background: rgba(var(--neuro-primary-rgb), 0.03);
    border: 1px solid rgba(var(--neuro-primary-rgb), 0.1);
}

body[data-theme="evil"] .related-tag-card {
    background: rgba(var(--evil-primary-rgb), 0.03);
    border: 1px solid rgba(var(--evil-primary-rgb), 0.1);
}

body[data-theme="neuro"] .related-tag-card:hover {
    background: rgba(var(--neuro-primary-rgb), 0.08);
    transform: translateY(-2px);
}

body[data-theme="evil"] .related-tag-card:hover {
    background: rgba(var(--evil-primary-rgb), 0.08);
    transform: translateY(-2px);
}

.related-tag-icon {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

body[data-theme="neuro"] .related-tag-icon {
    background: rgba(var(--neuro-primary-rgb), 0.1);
}

body[data-theme="evil"] .related-tag-icon {
    background: rgba(var(--evil-primary-rgb), 0.1);
}

.related-tag-info {
    flex: 1;
    min-width: 0;
}

    .related-tag-info .mud-typography {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }


.disclaimer {
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

body[data-theme="neuro"] .disclaimer {
    background: rgba(var(--neuro-primary-rgb), 0.08);
    border: 1px solid rgba(var(--neuro-primary-rgb), 0.2);
}

body[data-theme="evil"] .disclaimer {
    background: rgba(var(--evil-primary-rgb), 0.08);
    border: 1px solid rgba(var(--evil-primary-rgb), 0.2);
}

.disclaimer-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.disclaimer-icon {
    font-size: 1.25rem !important;
}

body[data-theme="neuro"] .disclaimer-icon {
    color: var(--neuro-primary);
}

body[data-theme="evil"] .disclaimer-icon {
    color: var(--evil-primary);
}

.disclaimer-text {
    line-height: 1.5;
    margin-bottom: 1rem;
    font-size: 0.8125rem;
}

.report-button {
    width: 100%;
    text-transform: none;
    font-weight: 500;
    justify-content: flex-start;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

body[data-theme="neuro"] .report-button {
    color: var(--neuro-primary);
}

body[data-theme="evil"] .report-button {
    color: var(--evil-primary);
}

body[data-theme="neuro"] .report-button:hover {
    background: rgba(var(--neuro-primary-rgb), 0.1);
}

body[data-theme="evil"] .report-button:hover {
    background: rgba(var(--evil-primary-rgb), 0.1);
}

.report-button .mud-button-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Responsive adjustments */
@media (max-width: 960px) {
    .disclaimer {
        margin-top: 1rem;
    }
}

.menu-song-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(var(--ink-rgb), 0.08);
    margin-bottom: 8px;
}

.menu-song-thumbnail {
    width: 48px;
    height: 48px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

body[data-theme="neuro"] .menu-song-thumbnail {
    background: linear-gradient(135deg, rgba(var(--neuro-primary-rgb), 0.2), rgba(var(--neuro-primary-rgb), 0.1));
}

body[data-theme="evil"] .menu-song-thumbnail {
    background: linear-gradient(135deg, rgba(var(--evil-primary-rgb), 0.2), rgba(var(--evil-primary-rgb), 0.1));
}

.menu-song-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.menu-song-info {
    flex: 1;
    min-width: 0;
    max-width: 200px;
}

.menu-song-title {
    font-weight: 600;
    font-size: 0.9375rem;
    margin-bottom: 2px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.3;
}

body[data-theme="neuro"] .menu-song-title {
    color: var(--neuro-text-primary);
}

body[data-theme="evil"] .menu-song-title {
    color: var(--evil-text-primary);
}

.menu-song-artist {
    font-size: 0.8125rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body[data-theme="neuro"] .menu-song-artist {
    color: var(--neuro-text-secondary);
}

body[data-theme="evil"] .menu-song-artist {
    color: var(--evil-text-secondary);
}
.album-art-large {
    width: auto;
    height: auto;
    max-width: min(600px, 80vw); /* Max 600px or 80% viewport width */
    max-height: calc(100vh - 520px); /* Match album-section height */
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 100px rgba(var(--theme-primary-rgb, 0, 217, 255), 0.3);
    animation: albumPulse 0.8s ease;
    transition: transform 0.3s ease;
}

    .album-art-large:hover {
        transform: scale(1.02);
    }

.album-art-glow-large {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70%;
    height: 70%;
    max-width: 500px;
    max-height: 500px;
    background: radial-gradient( circle, rgba(var(--theme-primary-rgb, 0, 217, 255), 0.4) 0%, transparent 70% );
    filter: blur(60px);
    animation: glowPulse 3s ease-in-out infinite;
    pointer-events: none;
    z-index: -1; /* Behind the image */
}

@media (max-width: 768px) {
    .album-art-large {
        max-height: calc(100vh - 460px);
        max-width: min(500px, 85vw);
        border-radius: 8px;
    }
}

@media (max-width: 480px) {
    .album-art-large {
        max-height: calc(100vh - 420px);
        max-width: min(400px, 80vw);
    }
}

body[data-theme="neuro"] .mud-picker-content, body[data-theme="neuro"] .mud-picker-content .mud-icon-button {
    background: var(--neuro-bg-secondary);
    color: var(--neuro-text-primary);
}

body[data-theme="neuro"] .mud-day-label {
    color: var(--neuro-text-primary);
}

body[data-theme="evil"] .mud-picker-content, body[data-theme="evil"] .mud-picker-content .mud-icon-button {
    background: var(--evil-bg-secondary);
    color: var(--evil-text-primary);
}

body[data-theme="evil"] .mud-day-label {
    color: var(--evil-text-primary);
}

.mud-button-root {
    cursor: pointer !important;
}

.drag-handle {
    position: relative;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

body[data-theme="neuro"] .drag-handle:hover {
    background: rgba(var(--neuro-primary-rgb), 0.1);
}

body[data-theme="evil"] .drag-handle:hover {
    background: rgba(var(--evil-primary-rgb), 0.1);
}

.drag-handle:active {
    transform: scale(0.95);
}

/* Sortable Ghost - Enhanced for Neuro Theme */
.sortable-ghost {
    position: relative;
    border-radius: 6px;
}

body[data-theme="neuro"] .sortable-ghost::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, rgba(var(--neuro-primary-rgb), 0.3) 0%, rgba(92, 225, 255, 0.2) 50%, rgba(255, 107, 157, 0.3) 100%);
    border-radius: 8px;
    z-index: -1;
    animation: ghostPulse 1s ease-in-out infinite;
}

body[data-theme="evil"] .sortable-ghost::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, rgba(var(--evil-primary-rgb), 0.3) 0%, rgba(157, 0, 255, 0.2) 50%, rgba(102, 0, 204, 0.3) 100%);
    border-radius: 8px;
    z-index: -1;
    animation: ghostPulse 1s ease-in-out infinite;
}

@keyframes ghostPulse {
    0%, 100% {
        opacity: 0.5;
    }

    50% {
        opacity: 0.8;
    }
}

/* Drag Item - Enhanced Shadow */
body[data-theme="neuro"] .sortable-drag {
    box-shadow: 0 0 0 1px rgba(var(--neuro-primary-rgb), 0.4), 0 10px 40px rgba(var(--neuro-primary-rgb), 0.4), 0 20px 60px rgba(0, 0, 0, 0.6);
}

body[data-theme="evil"] .sortable-drag {
    box-shadow: 0 0 0 1px rgba(var(--evil-primary-rgb), 0.4), 0 10px 40px rgba(var(--evil-primary-rgb), 0.4), 0 20px 60px rgba(0, 0, 0, 0.6);
}

/* Chosen Item - Subtle Glow */
body[data-theme="neuro"] .sortable-chosen {
    box-shadow: 0 0 20px rgba(var(--neuro-primary-rgb), 0.3);
}

body[data-theme="evil"] .sortable-chosen {
    box-shadow: 0 0 20px rgba(var(--evil-primary-rgb), 0.3);
}

/* Save Order Bar - Enhanced */
.save-order-bar {
    animation: slideUpBounce 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes slideUpBounce {
    0% {
        transform: translateX(-50%) translateY(100%);
        opacity: 0;
    }

    70% {
        transform: translateX(-50%) translateY(-10px);
    }

    100% {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

body[data-theme="neuro"] .save-order-content {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 40px rgba(var(--neuro-primary-rgb), 0.2);
}

body[data-theme="evil"] .save-order-content {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 40px rgba(var(--evil-primary-rgb), 0.2);
}

/* Progress Indicator for Saving */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Mobile Touch Feedback */
@media (hover: none) and (pointer: coarse) {
    /* Enhanced touch targets for mobile */
    .drag-handle {
        width: 40px;
        height: 40px;
        margin: -4px;
        padding: 4px;
    }

        /* Visual feedback on touch */
        .drag-handle:active {
            transform: scale(0.9);
        }

    body[data-theme="neuro"] .drag-handle:active {
        background: rgba(var(--neuro-primary-rgb), 0.15);
    }

    body[data-theme="evil"] .drag-handle:active {
        background: rgba(var(--evil-primary-rgb), 0.15);
    }

    /* Drag indicator animation */
    .sortable-chosen .drag-handle {
        animation: dragPulse 0.6s ease-in-out;
    }

    @keyframes dragPulse {
        0%, 100% {
            transform: scale(1);
        }

        50% {
            transform: scale(1.1);
        }
    }
}

/* Accessibility - Keyboard Navigation */
.cover-list-item:focus-visible {
    outline: none;
    position: relative;
}

body[data-theme="neuro"] .cover-list-item:focus-visible::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 2px solid var(--neuro-primary);
    border-radius: 6px;
    pointer-events: none;
}

body[data-theme="evil"] .cover-list-item:focus-visible::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 2px solid var(--evil-primary);
    border-radius: 6px;
    pointer-events: none;
}

body[data-theme="twins"] .cover-list-item:focus-visible::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 2px solid var(--twins-primary);
    border-radius: 6px;
    pointer-events: none;
}

/* Smooth transitions for reordering */
.covers-list .cover-list-item {
    transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Loading state for save button */
.save-order-actions .mud-button-root[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Dragging state cursor override */
.sortable .cover-list-item.sortable-chosen * {
    cursor: grabbing !important;
}

/* Prevent text selection during drag */
.is-dragging {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Drop zone indicator */
.sortable-fallback {
    opacity: 0;
}

/* Tablet optimizations */
@media (min-width: 769px) and (max-width: 1024px) {
    .drag-handle {
        width: 36px;
        height: 36px;
    }

    .save-order-bar {
        bottom: 90px;
    }
}

/* Small mobile optimizations */
@media (max-width: 480px) {
    .save-order-content {
        flex-wrap: wrap;
        justify-content: center;
    }

    .save-order-actions {
        width: 100%;
        justify-content: center;
        margin-top: 8px;
        margin-left: 0;
    }
}

/* Dark mode adjustments for better contrast */
@media (prefers-color-scheme: dark) {
    .sortable-ghost {
        opacity: 0.6;
    }

    .sortable-drag {
        opacity: 0.95;
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .sortable-ghost,
    .sortable-drag,
    .sortable-chosen,
    .save-order-bar,
    .drag-handle {
        animation: none !important;
        transition: none !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    body[data-theme="neuro"] .sortable-ghost {
        border: 3px solid var(--neuro-primary);
    }

    body[data-theme="evil"] .sortable-ghost {
        border: 3px solid var(--evil-primary);
    }
    body[data-theme="twins"] .sortable-ghost {
        border: 3px solid var(--twins-primary);
    }
}

body[data-theme="neuro"] .scrollbar-behavior {
    scrollbar-width: thin;
    scrollbar-color: var(--neuro-primary) var(--neuro-bg-secondary);
}

    body[data-theme="neuro"] .scrollbar-behavior::-webkit-scrollbar {
        width: 10px;
        height: 10px;
    }

    body[data-theme="neuro"] .scrollbar-behavior::-webkit-scrollbar-track {
        background: var(--neuro-bg-secondary);
    }

    body[data-theme="neuro"] .scrollbar-behavior::-webkit-scrollbar-thumb {
        background-color: var(--neuro-primary);
        border-radius: 8px;
        border: 2px solid var(--neuro-bg-secondary);
    }

        body[data-theme="neuro"] .scrollbar-behavior::-webkit-scrollbar-thumb:hover {
            background-color: var(--neuro-primary-light);
        }

body[data-theme="evil"] .scrollbar-behavior, body[data-theme="evil"] .sidebar-nav {
    scrollbar-width: thin;
    scrollbar-color: var(--evil-primary) var(--evil-bg-secondary);
}

    body[data-theme="evil"] .scrollbar-behavior::-webkit-scrollbar {
        width: 10px;
        height: 10px;
    }

    body[data-theme="evil"] .scrollbar-behavior::-webkit-scrollbar-track {
        background: var(--evil-bg-secondary);
    }

    body[data-theme="evil"] .scrollbar-behavior::-webkit-scrollbar-thumb {
        background-color: var(--evil-primary);
        border-radius: 8px;
        border: 2px solid var(--evil-bg-secondary);
    }

        body[data-theme="evil"] .scrollbar-behavior::-webkit-scrollbar-thumb:hover {
            background-color: var(--evil-primary-light);
        }

body[data-theme="twins"] .scrollbar-behavior {
    scrollbar-width: thin;
    scrollbar-color: var(--twins-primary) var(--twins-bg-secondary);
}

    body[data-theme="twins"] .scrollbar-behavior::-webkit-scrollbar {
        width: 10px;
        height: 10px;
    }

    body[data-theme="twins"] .scrollbar-behavior::-webkit-scrollbar-track {
        background: var(--twins-bg-secondary);
    }

    body[data-theme="twins"] .scrollbar-behavior::-webkit-scrollbar-thumb {
        background-color: var(--twins-primary);
        border-radius: 8px;
        border: 2px solid var(--twins-bg-secondary);
    }

        body[data-theme="twins"] .scrollbar-behavior::-webkit-scrollbar-thumb:hover {
            background-color: var(--twins-primary-light);
        }
/* Column Header Styles */
.song-list-header {
    display: grid;
    grid-template-columns: 40px minmax(120px, 1fr) 100px 120px 120px 60px;
    gap: 16px;
    align-items: center;
    padding: 12px 12px 8px 12px;
    border-bottom: 1px solid rgba(var(--ink-rgb), 0.1);
    margin-bottom: 4px;
}

.header-cell {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 4px;
    user-select: none;
    color: rgba(var(--ink-rgb), 0.9);
    transition: color 0.2s ease;
}

    .header-cell:not(.header-track-number):not(.header-actions) {
        cursor: pointer;
    }

        .header-cell:not(.header-track-number):not(.header-actions):hover {
            color: rgba(var(--ink-rgb), 1);
        }

/* Active sort highlighting */
body[data-theme="neuro"] .header-cell.active-sort {
    color: var(--neuro-primary);
}

body[data-theme="evil"] .header-cell.active-sort {
    color: var(--evil-primary);
}
body[data-theme="twins"] .header-cell.active-sort {
    color: var(--twins-primary);
}
body[data-theme="twins"] .sort-indicator {
    color: var(--twins-primary) !important;
}
.header-track-number {
    justify-content: center;
    text-align: center;
}

.header-title {
    min-width: 0;
}

.header-play-count {
    justify-content: center;
    text-align: center;
}

.header-stream-date {
    justify-content: center;
    text-align: center;
}

.header-duration {
    justify-content: flex-end;
    text-align: right;
}

/*.header-actions {
    pointer-events: none;
}
*/
.sort-indicator {
    font-size: 12px !important;
    width: 12px !important;
    height: 12px !important;
}

body[data-theme="neuro"] .sort-indicator {
    color: var(--neuro-primary) !important;
}

body[data-theme="evil"] .sort-indicator {
    color: var(--evil-primary) !important;
}

/* Responsive Grid */
@media (max-width: 1200px) {
    .song-list-header {
        grid-template-columns: 40px minmax(120px, 1fr) 100px 120px 120px;
    }

    .header-duration {
        display: none;
    }
}

@media (max-width: 1024px) {
    .song-list-header {
        grid-template-columns: 40px 1fr 100px 120px;
    }

    .header-stream-date {
        display: none;
    }
}

@media (max-width: 900px) {
    .song-list-header {
        grid-template-columns: 40px 1fr 120px;
    }

    .header-play-count {
        display: none;
    }
}

@media (max-width: 768px) {
    .song-list-header {
        grid-template-columns: 32px 1fr 80px;
        padding: 10px 8px 6px 8px;
    }

    .header-cell {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .song-list-header {
        grid-template-columns: 28px 1fr 60px;
        padding: 8px 8px 6px 8px;
    }

    .header-cell {
        font-size: 10px;
    }
}

body[data-theme="neuro"] .mud-tabs-tabbar {
    background-color: var(--neuro-bg-elevated) !important;
}

body[data-theme="evil"] .mud-tabs-tabbar {
    background-color: var(--evil-bg-elevated) !important;
}


/* ============================================================================
   TWINS THEME - Missing Rules
   ============================================================================ */

@keyframes pulse-twins {
    0%, 100% {
        box-shadow: 0 0 20px rgba(var(--twins-primary-rgb), 0.3);
    }

    50% {
        box-shadow: 0 0 40px rgba(var(--twins-primary-rgb), 0.6);
    }
}

body[data-theme="twins"] .pulse-animate {
    animation: pulse-twins 2s ease-in-out infinite;
}

body[data-theme="twins"] .theme-toggle-btn {
    background: var(--twins-bg-elevated);
    border-color: var(--twins-primary);
    color: var(--twins-text-primary);
}

    body[data-theme="twins"] .theme-toggle-btn:hover {
        background: var(--twins-bg-hover);
        box-shadow: 0 0 20px rgba(var(--twins-primary-rgb), 0.3);
        transform: translateY(-2px);
    }

body[data-theme="twins"] .song-card {
    background: var(--twins-bg-elevated);
}

    body[data-theme="twins"] .song-card:hover {
        background: var(--twins-bg-hover);
        border-color: var(--twins-primary);
        box-shadow: 0 0 20px rgba(var(--twins-primary-rgb), 0.2);
        transform: translateY(-4px);
    }

    body[data-theme="twins"] .song-card.active {
        background: var(--twins-bg-hover);
        border-color: var(--twins-primary);
        box-shadow: 0 0 20px rgba(var(--twins-primary-rgb), 0.3);
    }

body[data-theme="twins"] .global-player .progress-container,
body[data-theme="twins"] .desktop-player .progress-container {
    background: rgba(var(--twins-bg-secondary-rgb), 0.8) !important;
}

body[data-theme="twins"] .global-player .progress-fill,
body[data-theme="twins"] .desktop-player .progress-fill {
    background: var(--twins-primary) !important;
    box-shadow: 0 0 10px rgba(var(--twins-primary-rgb), 0.5) !important;
}

body[data-theme="twins"] .progress-container:hover .progress-fill::before {
    box-shadow: 0 2px 8px rgba(var(--twins-primary-rgb), 0.8), 0 0 16px rgba(var(--twins-primary-rgb), 0.4);
}

body[data-theme="twins"] .mud-dialog.mud-dialog-width-lg,
body[data-theme="twins"] .mud-dialog {
    background: var(--twins-bg-primary);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(var(--ink-rgb), 0.1);
}

body[data-theme="twins"] .mud-dialog-title,
body[data-theme="twins"] .mud-dialog-content,
body[data-theme="twins"] .mud-dialog-actions {
    background: var(--twins-bg-primary);
    color: var(--twins-text-primary) !important;
    border: none;
}

body[data-theme="twins"] .mud-popover.mud-paper,
body[data-theme="twins"] .mud-popover.mud-paper.overflow-y-auto {
    background: var(--twins-bg-elevated) !important;
    border: 1px solid rgba(var(--twins-primary-rgb), 0.2);
}

body[data-theme="twins"] .mud-menu-item {
    color: var(--twins-text-primary) !important;
}

    body[data-theme="twins"] .mud-menu-item:hover {
        background: var(--twins-bg-hover) !important;
    }

body[data-theme="twins"] .mud-menu-item-icon {
    color: var(--twins-text-secondary) !important;
}

body[data-theme="twins"] .mud-menu-item.mud-disabled .mud-menu-item-icon {
    color: var(--twins-text-muted) !important;
}

body[data-theme="twins"] .mud-list-item-icon {
    color: var(--twins-text-primary) !important;
}

body[data-theme="twins"] .mud-popover .mud-list-item {
    color: var(--twins-text-primary) !important;
}

    body[data-theme="twins"] .mud-popover .mud-list-item:hover {
        background: var(--twins-bg-hover) !important;
    }

    body[data-theme="twins"] .mud-popover .mud-list-item.mud-selected-item {
        background: rgba(var(--twins-primary-rgb), 0.15) !important;
        border-left: 3px solid var(--twins-primary);
        padding-left: 9px !important;
    }

        body[data-theme="twins"] .mud-popover .mud-list-item.mud-selected-item:hover {
            background: rgba(var(--twins-primary-rgb), 0.25) !important;
        }

body[data-theme="twins"] .mud-popover .mud-list-item-text p {
    color: var(--twins-text-primary) !important;
}

body[data-theme="twins"] .mud-popover .mud-list-item.mud-selected-item .mud-typography {
    color: var(--twins-primary) !important;
    font-weight: 500 !important;
}

body[data-theme="twins"] .mud-popover .mud-list-item:focus {
    outline: 2px solid var(--twins-primary);
    outline-offset: -2px;
    background: rgba(var(--twins-primary-rgb), 0.1) !important;
}

body[data-theme="twins"] .mud-popover.overflow-y-auto::-webkit-scrollbar {
    width: 8px;
}

body[data-theme="twins"] .mud-popover.overflow-y-auto::-webkit-scrollbar-track {
    background: var(--twins-bg-secondary);
    border-radius: 4px;
}

body[data-theme="twins"] .mud-popover.overflow-y-auto::-webkit-scrollbar-thumb {
    background: var(--twins-primary);
    border-radius: 4px;
}

    body[data-theme="twins"] .mud-popover.overflow-y-auto::-webkit-scrollbar-thumb:hover {
        background: var(--twins-primary-light);
    }

body[data-theme="twins"] .mud-popover .mud-list-item.mud-list-item-disabled {
    color: var(--twins-text-muted) !important;
}

body[data-theme="twins"] .mud-popover .mud-progress-circular circle {
    stroke: var(--twins-primary) !important;
}

body[data-theme="twins"] .play-btn {
    color: var(--twins-primary) !important;
}

body[data-theme="twins"] .add-filter-chip {
    background: transparent !important;
    border: 2px solid var(--twins-primary) !important;
    color: var(--twins-primary) !important;
}

    body[data-theme="twins"] .add-filter-chip:hover {
        background: rgba(var(--twins-primary-rgb), 0.1) !important;
        border-color: var(--twins-primary-light) !important;
        box-shadow: 0 0 12px rgba(var(--twins-primary-rgb), 0.3);
        transform: translateY(-2px);
    }

    body[data-theme="twins"] .add-filter-chip:active {
        background: rgba(var(--twins-primary-rgb), 0.2) !important;
        transform: translateY(0);
    }

    body[data-theme="twins"] .add-filter-chip .mud-chip-icon {
        color: var(--twins-primary) !important;
    }

    body[data-theme="twins"] .add-filter-chip:hover .mud-chip-icon {
        color: var(--twins-primary-light) !important;
    }

    body[data-theme="twins"] .add-filter-chip .mud-ripple {
        color: var(--twins-primary) !important;
    }

    body[data-theme="twins"] .add-filter-chip.mud-chip-filled {
        background: var(--twins-primary) !important;
        border: 2px solid var(--twins-primary) !important;
        color: var(--twins-bg-primary) !important;
    }

        body[data-theme="twins"] .add-filter-chip.mud-chip-filled:hover {
            background: var(--twins-primary-light) !important;
            border-color: var(--twins-primary-light) !important;
            box-shadow: 0 0 16px rgba(var(--twins-primary-rgb), 0.5);
        }

        body[data-theme="twins"] .add-filter-chip.mud-chip-filled .mud-chip-icon {
            color: var(--twins-bg-primary) !important;
        }

    body[data-theme="twins"] .add-filter-chip:disabled,
    body[data-theme="twins"] .add-filter-chip.mud-disabled {
        border-color: var(--twins-text-muted) !important;
        color: var(--twins-text-muted) !important;
        opacity: 0.5;
        cursor: not-allowed !important;
    }

        body[data-theme="twins"] .add-filter-chip:disabled:hover,
        body[data-theme="twins"] .add-filter-chip.mud-disabled:hover {
            background: transparent !important;
            transform: none;
            box-shadow: none;
        }

    body[data-theme="twins"] .add-filter-chip:focus-visible {
        outline: 2px solid var(--twins-primary);
        outline-offset: 2px;
    }

body[data-theme="twins"] .search-input .mud-input.mud-input-outlined {
    background: rgba(var(--twins-primary-rgb), 0.04) !important;
    box-shadow: 0 4px 20px rgba(var(--twins-primary-rgb), 0.03), inset 0 1px 2px rgba(var(--ink-rgb), 0.02);
}

body[data-theme="twins"] .search-input .mud-input-adornment-icon {
    color: var(--twins-text-muted) !important;
}

body[data-theme="twins"] .search-input input::placeholder {
    color: var(--twins-text-muted) !important;
}

body[data-theme="twins"] .search-input .mud-input.mud-input-outlined:focus-within {
    background: rgba(var(--twins-primary-rgb), 0.08) !important;
    box-shadow: 0 4px 30px rgba(var(--twins-primary-rgb), 0.12), inset 0 1px 3px rgba(var(--twins-primary-rgb), 0.1);
}

body[data-theme="twins"] .search-input .mud-input:focus-within .mud-input-adornment-icon {
    color: var(--twins-primary) !important;
}

body[data-theme="twins"] .search-input .mud-input.mud-input-outlined:hover:not(:focus-within) {
    background: rgba(var(--twins-primary-rgb), 0.06) !important;
    box-shadow: 0 4px 24px rgba(var(--twins-primary-rgb), 0.06);
}

body[data-theme="twins"] .search-input .mud-input.mud-input-outlined:focus-within {
    outline-color: var(--twins-primary);
}

body[data-theme="twins"] .search-input .mud-icon-button.mud-input-adornment {
    color: var(--twins-text-muted) !important;
}

    body[data-theme="twins"] .search-input .mud-icon-button.mud-input-adornment:hover {
        color: var(--twins-primary) !important;
        background: rgba(var(--twins-primary-rgb), 0.1) !important;
    }

body[data-theme="twins"] .expansion-panel-item,
body[data-theme="twins"] .expansion-panel-item .mud-expand-panel-header,
body[data-theme="twins"] .expansion-panel-item .mud-expand-panel-content {
    background: var(--twins-bg-secondary) !important;
}

body[data-theme="twins"] .themed-input .mud-input-outlined-border {
    border-color: rgba(var(--ink-rgb), 0.15) !important;
}

body[data-theme="twins"] .themed-input .mud-input-outlined:hover .mud-input-outlined-border {
    border-color: rgba(var(--twins-primary-rgb), 0.3) !important;
}

body[data-theme="twins"] .themed-input .mud-input-outlined.mud-input-focused .mud-input-outlined-border {
    border-color: var(--twins-primary) !important;
    border-width: 2px !important;
}

body[data-theme="twins"] .related-tag-card {
    background: rgba(var(--twins-primary-rgb), 0.03);
    border: 1px solid rgba(var(--twins-primary-rgb), 0.1);
}

    body[data-theme="twins"] .related-tag-card:hover {
        background: rgba(var(--twins-primary-rgb), 0.08);
        transform: translateY(-2px);
    }

body[data-theme="twins"] .related-tag-icon {
    background: rgba(var(--twins-primary-rgb), 0.1);
}

body[data-theme="twins"] .disclaimer {
    background: rgba(var(--twins-primary-rgb), 0.08);
    border: 1px solid rgba(var(--twins-primary-rgb), 0.2);
}

body[data-theme="twins"] .disclaimer-icon {
    color: var(--twins-primary);
}

body[data-theme="twins"] .report-button {
    color: var(--twins-primary);
}

    body[data-theme="twins"] .report-button:hover {
        background: rgba(var(--twins-primary-rgb), 0.1);
    }

body[data-theme="twins"] .menu-song-thumbnail {
    background: linear-gradient(135deg, rgba(var(--twins-primary-rgb), 0.2), rgba(var(--twins-primary-rgb), 0.1));
}

body[data-theme="twins"] .menu-song-title {
    color: var(--twins-text-primary);
}

body[data-theme="twins"] .menu-song-artist {
    color: var(--twins-text-secondary);
}

body[data-theme="twins"] .cover-mosaic {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 40px rgba(var(--twins-primary-rgb), 0.2);
}

body[data-theme="twins"] .mud-picker-content,
body[data-theme="twins"] .mud-picker-content .mud-icon-button {
    background: var(--twins-bg-secondary);
    color: var(--twins-text-primary);
}

body[data-theme="twins"] .mud-day-label {
    color: var(--twins-text-primary);
}

body[data-theme="twins"] .drag-handle:hover {
    background: rgba(var(--twins-primary-rgb), 0.1);
}

body[data-theme="twins"] .sortable-ghost::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, rgba(var(--twins-primary-rgb), 0.3) 0%, rgba(255, 107, 157, 0.2) 50%, rgba(92, 225, 255, 0.3) 100%);
    border-radius: 8px;
    z-index: -1;
    animation: ghostPulse 1s ease-in-out infinite;
}

body[data-theme="twins"] .sortable-drag {
    box-shadow: 0 0 0 1px rgba(var(--twins-primary-rgb), 0.4), 0 10px 40px rgba(var(--twins-primary-rgb), 0.4), 0 20px 60px rgba(0, 0, 0, 0.6);
}

body[data-theme="twins"] .sortable-chosen {
    box-shadow: 0 0 20px rgba(var(--twins-primary-rgb), 0.3);
}

body[data-theme="twins"] .save-order-content {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 40px rgba(var(--twins-primary-rgb), 0.2);
}

@media (prefers-contrast: high) {
    body[data-theme="twins"] .search-input .mud-input.mud-input-outlined {
        background: rgba(var(--twins-primary-rgb), 0.1) !important;
        outline: 1px solid var(--twins-primary);
    }
}

body[data-theme="twins"] .image-info {
    border-top: 1px solid rgba(var(--ink-rgb), 0.15);
    align-self: center;
    color: var(--twins-text-primary);
}

body[data-theme="twins"] .close-button {
    color: #fff !important;
}

    body[data-theme="twins"] .close-button:hover {
        background: rgba(var(--ink-rgb), 0.2) !important;
        box-shadow: none;
    }

body[data-theme="twins"] .image-view-dialog {
    background: #000;
}

    body[data-theme="twins"] .image-view-dialog img {
        border: none;
        box-shadow: none;
    }

body[data-theme="twins"] .mud-button-filled,
body[data-theme="twins"] .mud-button-outlined {
    color: rgb(var(--on-accent-rgb));
    background-color: var(--twins-primary);
}

/* Light mode used to swap in a black label on the lighter primaries. It
   measured better in isolation but read as a bug next to every other
   primary-filled control in the app (CTAs, gradient buttons, chips), which all
   carry a white label in both modes. Consistency wins: the per-theme rules
   above already set rgb(var(--on-accent-rgb)), so light mode just inherits it.
   Neuro light (#0091B3) lands at 3.7:1 with white — AA for the bold 14px
   button label, short of the 4.5:1 body-text bar. Deepening --neuro-primary
   would buy that back, but it feeds ~600 other rules, so it is left alone. */

.mud-chip-filled.mud-chip-color-primary {
    color: var(--mud-palette-primary-text) !important;
    background-color: var(--mud-palette-primary) !important;
    --mud-ripple-color: var(--mud-palette-primary-text) !important;
}

body[data-theme="neuro"] .bg-primary {
    background: var(--neuro-primary) !important;
}
body[data-theme="evil"] .bg-primary {
    background: var(--evil-primary) !important;
}
body[data-theme="twins"] .bg-primary {
    background: var(--twins-primary) !important;
}

body[data-theme="neuro"] .bg-secondary {
    background: var(--neuro-secondary) !important;
}
body[data-theme="evil"] .bg-secondary {
    background: var(--evil-secondary) !important;
}
body[data-theme="twins"] .bg-secondary {
    background: var(--twins-secondary) !important;
}

body[data-theme="neuro"] .text-primary {
    color: var(--neuro-bg-primary) !important;
}
body[data-theme="evil"] .text-primary {
    color: var(--evil-bg-primary) !important;
}
body[data-theme="twins"] .text-primary {
    color: var(--twins-bg-primary) !important;
}

/* ============================================================================
   RANTS PAGE THEME STYLES
   ============================================================================ */

/* Neuro Theme — Rant Cards */
body[data-theme="neuro"] .rant-card:hover {
    border-color: rgba(var(--neuro-primary-rgb), 0.2);
    box-shadow: 0 4px 20px rgba(var(--neuro-primary-rgb), 0.1);
}

body[data-theme="neuro"] .rant-compact-card:hover {
    box-shadow: 0 2px 12px rgba(var(--neuro-primary-rgb), 0.08);
}

body[data-theme="neuro"] .rants-fab {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4), 0 0 20px rgba(var(--neuro-primary-rgb), 0.3);
}

body[data-theme="neuro"] .rants-fab:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 30px rgba(var(--neuro-primary-rgb), 0.4);
}

/* Evil Theme — Rant Cards */
body[data-theme="evil"] .rant-card:hover {
    border-color: rgba(var(--evil-primary-rgb), 0.2);
    box-shadow: 0 4px 20px rgba(var(--evil-primary-rgb), 0.1);
}

body[data-theme="evil"] .rant-compact-card:hover {
    box-shadow: 0 2px 12px rgba(var(--evil-primary-rgb), 0.08);
}

body[data-theme="evil"] .rants-fab {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4), 0 0 20px rgba(var(--evil-primary-rgb), 0.3);
}

body[data-theme="evil"] .rants-fab:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 30px rgba(var(--evil-primary-rgb), 0.4);
}

/* Twins Theme — Rant Cards */
body[data-theme="twins"] .rant-card:hover {
    border-color: rgba(var(--twins-primary-rgb), 0.2);
    box-shadow: 0 4px 20px rgba(var(--twins-primary-rgb), 0.1);
}

body[data-theme="twins"] .rant-compact-card:hover {
    box-shadow: 0 2px 12px rgba(var(--twins-primary-rgb), 0.08);
}

body[data-theme="twins"] .rants-fab {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4), 0 0 20px rgba(var(--twins-primary-rgb), 0.3);
}

body[data-theme="twins"] .rants-fab:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 30px rgba(var(--twins-primary-rgb), 0.4);
}

/* Video Player Wrapper in Rants */
body[data-theme="twins"] .video-player-wrapper {
    border: 1px solid rgba(var(--twins-primary-rgb), 0.2);
}

body[data-theme="twins"] .video-player-wrapper:hover {
    border-color: rgba(var(--twins-primary-rgb), 0.4);
    box-shadow: 0 0 20px rgba(var(--twins-primary-rgb), 0.15);
}

body[data-theme="twins"] .video-metadata {
    border: 1px solid rgba(var(--twins-primary-rgb), 0.15);
}

body[data-theme="twins"] .metadata-row:hover {
    background: rgba(var(--twins-primary-rgb), 0.05);
}

body[data-theme="twins"] .metadata-header {
    border-bottom-color: rgba(var(--twins-primary-rgb), 0.2);
}

body[data-theme="twins"] .song-link::after {
    background: var(--twins-primary);
}

body[data-theme="twins"] .metadata-row:hover .song-link {
    color: var(--twins-primary-light) !important;
}

@media (min-width: 1025px) {
    .mud-dialog-container {
        padding-left: 320px;
    }

    .sidebar-collapsed .mud-dialog-container {
        padding-left: 80px;
    }
}

.neuro-primary {
    color: var(--neuro-primary) !important;
}

.evil-primary {
    color: var(--evil-primary) !important;
}

.twins-primary {
    color: var(--twins-primary) !important;
}
/* ============================================================================
   NEUROLINGS DIALOG SURFACE

   The generic dialog rules above paint every modal with --*-bg-primary, the
   darkest surface in each palette. This one carries a lot of small text and
   toggles, so it sits on the secondary surface instead — a clear step brighter
   in darkness mode, and still white-ish in light mode.
   ============================================================================ */

body[data-theme] .mud-dialog.neurolings-dialog,
body[data-theme] .mud-dialog.neurolings-dialog.mud-dialog-width-lg,
body .neurolings-dialog .mud-dialog-title,
body .neurolings-dialog .mud-dialog-content,
body .neurolings-dialog .mud-dialog-actions {
    background: var(--theme-bg-surface);
}

body .mud-dialog.neurolings-dialog {
    border: 1px solid rgba(var(--ink-rgb), 0.12);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
}
