 * { font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; }
    
    :root {
      --glass-bg: rgba(255, 255, 255, 0.72);
      --glass-border: rgba(255, 255, 255, 0.5);
      --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
      --surface-primary: #f5f5f7;
      --surface-secondary: #ffffff;
      --text-primary: #1d1d1f;
      --text-secondary: #86868b;
      --accent: #0071e3;
      --accent-secondary: rgba(0, 113, 227, 0.1);
      --glow-primary: rgba(0, 113, 227, 0.4);
      --glow-secondary: rgba(0, 113, 227, 0.2);
      --footer-bg: rgba(245, 245, 247, 0.92);
      --footer-border: rgba(0, 0, 0, 0.08);
      --card-bg: rgba(255, 255, 255, 0.08);
      --card-border: rgba(255, 255, 255, 0.12);
      --card-gradient: linear-gradient(135deg, rgba(0, 113, 227, 0.08), rgba(0, 0, 0, 0.02));
      --card-shadow: 0 12px 24px rgba(0, 113, 227, 0.12);
      --text-on-footer: #1d1d1f;
      --pulse-primary: #FF4444;
      --pulse-secondary: #FF8844;
      --safe-bottom: env(safe-area-inset-bottom, 0px);
      --floating-footer-h: 76px;
    }
    /* JS helpers moved to runtime <script> to avoid embedding JS inside <style> */

    .playlist-detail-suggestions {
      width: 100%;
      padding: 0 16px;
      box-sizing: border-box;
      display: flex;
      justify-content: center;
    }

    .playlist-discovery-grid {
      display: inline-grid;
      width: auto;
      max-width: calc(100% - 32px);
      grid-template-columns: repeat(2, minmax(160px, 1fr));
      gap: 16px;
      justify-content: center;
    }

    @media (min-width: 900px) {
      .playlist-discovery-grid {
        grid-template-columns: repeat(3, minmax(200px, 1fr));
      }
    }
    
    html.dark {
      --glass-bg: rgba(30, 30, 35, 0.75);
      --glass-border: rgba(255, 255, 255, 0.08);
      --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
      --surface-primary: #0b0b0f;
      --surface-secondary: #1c1c1e;
      --text-primary: #f5f5f7;
      --text-secondary: #86868b;
      --accent: #0a84ff;
      --accent-secondary: rgba(10, 132, 255, 0.15);
      --glow-primary: rgba(10, 132, 255, 0.5);
      --glow-secondary: rgba(10, 132, 255, 0.25);
      --footer-bg: rgba(12, 12, 14, 0.96);
      --footer-border: rgba(255, 255, 255, 0.08);
      --card-bg: rgba(30, 30, 35, 0.12);
      --card-border: rgba(255, 255, 255, 0.08);
      --card-gradient: linear-gradient(135deg, rgba(10, 132, 255, 0.10), rgba(0, 0, 0, 0.05));
      --card-shadow: 0 12px 24px rgba(10, 132, 255, 0.15);
      --text-on-footer: #f5f5f7;
    }
    
    /* LUMINA THEME SYSTEM: 10 PREMIUM THEMES - VIBRANT & FUTURISTIC */
    html[data-theme="nebula-neon"] { --accent: #9d4edd; --accent-secondary: rgba(157, 78, 221, 0.25); --glow-primary: rgba(157, 78, 221, 0.8); --glow-secondary: rgba(0, 255, 200, 0.5); --card-gradient: linear-gradient(135deg, rgba(157, 78, 221, 0.25), rgba(0, 255, 200, 0.1)); }
    html[data-theme="nebula-neon"].dark { --surface-primary: #0a0015; --surface-secondary: #1a0033; }
    html[data-theme="infinite-midnight"] { --accent: #00ff88; --accent-secondary: rgba(0, 255, 136, 0.2); --glow-primary: rgba(0, 255, 136, 0.6); --glow-secondary: rgba(0, 255, 136, 0.25); }
    html[data-theme="infinite-midnight"].dark { --surface-primary: #001a0f; --surface-secondary: #003322; }
    html[data-theme="crystal-clear"] {
      --accent: #087ea4;
      --accent-secondary: rgba(8, 126, 164, 0.14);
      --glow-primary: rgba(56, 210, 255, 0.58);
      --glow-secondary: rgba(134, 241, 255, 0.38);
      --surface-primary: #eaf8ff;
      --surface-secondary: #f8fdff;
      --text-primary: #102b3d;
      --text-secondary: #527084;
      --glass-bg: rgba(255, 255, 255, 0.58);
      --glass-border: rgba(255, 255, 255, 0.78);
      --glass-shadow: 0 18px 50px rgba(41, 137, 169, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.9);
      --card-bg: rgba(255, 255, 255, 0.46);
      --card-border: rgba(255, 255, 255, 0.72);
      --card-gradient: linear-gradient(135deg, rgba(255,255,255,0.78), rgba(157,235,255,0.28));
      --card-shadow: 0 16px 38px rgba(54, 145, 177, 0.16);
      --footer-bg: rgba(240, 251, 255, 0.78);
      --footer-border: rgba(255, 255, 255, 0.82);
      --text-on-footer: #15364a;
    }
    html[data-theme="crystal-clear"].dark {
      --accent: #62e5ff;
      --accent-secondary: rgba(98, 229, 255, 0.16);
      --glow-primary: rgba(59, 215, 255, 0.7);
      --glow-secondary: rgba(160, 134, 255, 0.38);
      --surface-primary: #07141f;
      --surface-secondary: #102838;
      --text-primary: #effcff;
      --text-secondary: #a7c8d5;
      --glass-bg: rgba(18, 52, 68, 0.48);
      --glass-border: rgba(184, 240, 255, 0.24);
      --glass-shadow: 0 20px 55px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.14);
      --card-bg: rgba(18, 56, 73, 0.42);
      --card-border: rgba(181, 239, 255, 0.2);
      --card-gradient: linear-gradient(135deg, rgba(89,218,255,0.18), rgba(126,105,255,0.12));
      --card-shadow: 0 18px 42px rgba(0, 0, 0, 0.28), 0 0 28px rgba(57, 213, 255, 0.08);
      --footer-bg: rgba(7, 24, 34, 0.78);
      --footer-border: rgba(184, 240, 255, 0.18);
      --text-on-footer: #effcff;
    }
    html[data-theme="solar-pulse"] { --accent: #ff6b35; --accent-secondary: rgba(255, 107, 53, 0.25); --glow-primary: rgba(255, 107, 53, 0.8); --glow-secondary: rgba(255, 0, 0, 0.4); }
    html[data-theme="solar-pulse"].dark { --surface-primary: #2a0f00; }
    html[data-theme="velvet-gold"] { --accent: #ffd700; --accent-secondary: rgba(255, 215, 0, 0.25); --glow-primary: rgba(255, 215, 0, 0.7); --surface-primary: #0a0803; --text-primary: #fffef0; }
    html[data-theme="velvet-gold"].dark { --surface-primary: #050401; }
    html[data-theme="aurora-reactor"] { --accent: #a25bff; --accent-secondary: rgba(162, 91, 255, 0.22); --glow-primary: rgba(96, 255, 255, 0.8); --glow-secondary: rgba(164, 88, 255, 0.25); --card-gradient: linear-gradient(135deg, rgba(126, 74, 255, 0.18), rgba(0, 255, 255, 0.08)); --surface-primary: #050012; --surface-secondary: #12002e; }
    html[data-theme="aurora-reactor"].dark { --surface-primary: #04000d; --surface-secondary: #0a0021; }
    html[data-theme="cyber-aurora"] { --accent: #00f8ff; --accent-secondary: rgba(0, 248, 255, 0.25); --glow-primary: rgba(255, 0, 217, 0.9); --glow-secondary: rgba(84, 255, 255, 0.4); --card-gradient: linear-gradient(135deg, rgba(0, 248, 255, 0.16), rgba(255, 0, 217, 0.12)); --surface-primary: #020011; --surface-secondary: #0b0026; --frame-color-start: #00f8ff; --frame-color-mid: #ff00d9; --frame-color-end: #8b3dff; --frame-glow: rgba(0, 248, 255, 0.35); }
    html[data-theme="cyber-aurora"].dark { --surface-primary: #04000f; --surface-secondary: #09001f; }
    html[data-theme="holo-prism"] { --accent: #a9f0ff; --accent-secondary: rgba(169, 240, 255, 0.2); --glow-primary: rgba(196, 104, 255, 0.9); --glow-secondary: rgba(112, 236, 255, 0.35); --card-gradient: linear-gradient(135deg, rgba(169, 240, 255, 0.18), rgba(182, 108, 255, 0.12)); --surface-primary: #09021f; --surface-secondary: #120228; --frame-color-start: #a9f0ff; --frame-color-mid: #e89aff; --frame-color-end: #7ae3ff; --frame-glow: rgba(169, 240, 255, 0.3); }
    html[data-theme="holo-prism"].dark { --surface-primary: #05001c; --surface-secondary: #0c0a29; }
    html[data-theme="ion-storm"] { --accent: #d3fcff; --accent-secondary: rgba(0, 255, 236, 0.24); --glow-primary: rgba(255, 0, 255, 0.95); --glow-secondary: rgba(25, 197, 255, 0.35); --card-gradient: linear-gradient(135deg, rgba(0, 255, 236, 0.18), rgba(255, 0, 255, 0.12)); --surface-primary: #070013; --surface-secondary: #0c0025; --frame-color-start: #d3fcff; --frame-color-mid: #ff00ff; --frame-color-end: #00d3ff; --frame-glow: rgba(255, 0, 255, 0.35); }
    html[data-theme="ion-storm"].dark { --surface-primary: #04000f; --surface-secondary: #0a0020; }
    html[data-theme="chrome-nexus"] { --accent: #8be9ff; --accent-secondary: rgba(138, 233, 255, 0.2); --glow-primary: rgba(0, 146, 255, 0.9); --glow-secondary: rgba(62, 255, 162, 0.3); --card-gradient: linear-gradient(135deg, rgba(138, 233, 255, 0.16), rgba(0, 146, 255, 0.12)); --surface-primary: #050619; --surface-secondary: #0a1126; --frame-color-start: #8be9ff; --frame-color-mid: #00b8ff; --frame-color-end: #4dffb8; --frame-glow: rgba(138, 233, 255, 0.3); }
    html[data-theme="chrome-nexus"].dark { --surface-primary: #050117; --surface-secondary: #091a24; }
    html[data-theme="photon-veil"] { --accent: #ff6eff; --accent-secondary: rgba(255, 110, 255, 0.2); --glow-primary: rgba(0, 222, 255, 0.9); --glow-secondary: rgba(255, 220, 122, 0.35); --card-gradient: linear-gradient(135deg, rgba(255, 110, 255, 0.16), rgba(0, 222, 255, 0.12)); --surface-primary: #0b0219; --surface-secondary: #18002d; --frame-color-start: #ff6eff; --frame-color-mid: #00deff; --frame-color-end: #ffd22a; --frame-glow: rgba(255, 110, 255, 0.3); }
    html[data-theme="photon-veil"].dark { --surface-primary: #050012; --surface-secondary: #0b0a1d; }
    html[data-theme="chromatic-pulse"] { --accent: #ff57d8; --accent-secondary: rgba(255, 87, 216, 0.2); --glow-primary: rgba(255, 87, 216, 0.9); --glow-secondary: rgba(89, 97, 255, 0.35); --card-gradient: linear-gradient(135deg, rgba(255, 87, 216, 0.16), rgba(89, 97, 255, 0.12)); --surface-primary: #12001b; --surface-secondary: #1d052f; --frame-color-start: #ff57d8; --frame-color-mid: #b46dff; --frame-color-end: #5f89ff; --frame-glow: rgba(255, 87, 216, 0.35); }
    html[data-theme="chromatic-pulse"].dark { --surface-primary: #120016; --surface-secondary: #210032; }
    html[data-theme="nova-frame"] { --accent: #7be2ff; --accent-secondary: rgba(123, 226, 255, 0.2); --glow-primary: rgba(255, 238, 109, 0.9); --glow-secondary: rgba(123, 226, 255, 0.35); --card-gradient: linear-gradient(135deg, rgba(123, 226, 255, 0.16), rgba(255, 238, 109, 0.12)); --surface-primary: #061021; --surface-secondary: #101c2d; --frame-color-start: #7be2ff; --frame-color-mid: #ffea6d; --frame-color-end: #5b72ff; --frame-glow: rgba(123, 226, 255, 0.35); }
    html[data-theme="nova-frame"].dark { --surface-primary: #050b1c; --surface-secondary: #091628; }
    html[data-theme="electric-halo"] { --accent: #8fffd2; --accent-secondary: rgba(143, 255, 210, 0.2); --glow-primary: rgba(120, 255, 255, 0.9); --glow-secondary: rgba(255, 121, 255, 0.35); --card-gradient: linear-gradient(135deg, rgba(143, 255, 210, 0.16), rgba(255, 121, 255, 0.12)); --surface-primary: #07111e; --surface-secondary: #121b31; --frame-color-start: #8fffd2; --frame-color-mid: #68d6ff; --frame-color-end: #ff79ff; --frame-glow: rgba(143, 255, 210, 0.35); }
    html[data-theme="electric-halo"].dark { --surface-primary: #050b16; --surface-secondary: #0a1523; }
    html[data-theme="quantum-border"] { --accent: #ffb86b; --accent-secondary: rgba(255, 184, 107, 0.2); --glow-primary: rgba(255, 184, 107, 0.72); --glow-secondary: rgba(255, 92, 170, 0.32); --card-gradient: linear-gradient(135deg, rgba(255, 184, 107, 0.18), rgba(255, 92, 170, 0.1)); --surface-primary: #150b12; --surface-secondary: #281323; --frame-color-start: #ffb86b; --frame-color-mid: #ff6b9d; --frame-color-end: #a875ff; --frame-glow: rgba(255, 184, 107, 0.32); }
    html[data-theme="quantum-border"].dark { --surface-primary: #100610; --surface-secondary: #210d1c; }
    html[data-theme="neon-frame"] { --accent: #b8ff5a; --accent-secondary: rgba(184, 255, 90, 0.2); --glow-primary: rgba(184, 255, 90, 0.78); --glow-secondary: rgba(0, 229, 255, 0.32); --card-gradient: linear-gradient(135deg, rgba(184, 255, 90, 0.16), rgba(0, 229, 255, 0.12)); --surface-primary: #07150d; --surface-secondary: #102a20; --frame-color-start: #b8ff5a; --frame-color-mid: #00e5ff; --frame-color-end: #6d7bff; --frame-glow: rgba(184, 255, 90, 0.3); }
    html[data-theme="neon-frame"].dark { --surface-primary: #031009; --surface-secondary: #082016; }
    html[data-theme="spectral-circuit"] { --accent: #d69cff; --accent-secondary: rgba(214, 156, 255, 0.2); --glow-primary: rgba(214, 156, 255, 0.8); --glow-secondary: rgba(91, 227, 255, 0.34); --card-gradient: linear-gradient(135deg, rgba(214, 156, 255, 0.17), rgba(91, 227, 255, 0.11)); --surface-primary: #0e0920; --surface-secondary: #1b1235; --frame-color-start: #d69cff; --frame-color-mid: #5be3ff; --frame-color-end: #ff79c6; --frame-glow: rgba(214, 156, 255, 0.32); }
    html[data-theme="spectral-circuit"].dark { --surface-primary: #09051a; --surface-secondary: #160d2d; }
    html[data-theme="vaporwave-loop"] { --accent: #ff6ed6; --accent-secondary: rgba(255, 110, 214, 0.25); --glow-primary: rgba(81, 200, 255, 0.75); --glow-secondary: rgba(255, 111, 211, 0.28); --card-gradient: linear-gradient(135deg, rgba(255, 110, 214, 0.18), rgba(81, 200, 255, 0.1)); --surface-primary: #1a0529; --surface-secondary: #2d113f; }
    html[data-theme="vaporwave-loop"].dark { --surface-primary: #140423; --surface-secondary: #281845; }
    html[data-theme="starlight-rhythm"] { --accent: #33d1ff; --accent-secondary: rgba(51, 209, 255, 0.22); --glow-primary: rgba(255, 255, 255, 0.9); --glow-secondary: rgba(85, 200, 255, 0.25); --card-gradient: linear-gradient(135deg, rgba(51, 209, 255, 0.15), rgba(10, 10, 40, 0.06)); --surface-primary: #081429; --surface-secondary: #0f1c44; }
    html[data-theme="starlight-rhythm"].dark { --surface-primary: #050b1f; --surface-secondary: #09142d; }

    /* MODAL COVER NEON FRAMING: carry the active theme frame into the cover box in the reader modals */
    html[data-theme] #player-modal-cover,
    html[data-theme] #track-detail-cover,
    html[data-theme] #artist-profile-cover {
      border: 1px solid var(--glow-primary);
      box-shadow: 0 0 0 1px var(--accent-secondary), 0 0 16px var(--glow-primary), inset 0 0 14px var(--glow-secondary), 0 22px 60px rgba(0, 0, 0, 0.45);
      animation: modalCoverNeonPulse 1.8s ease-in-out infinite;
    }

    @keyframes modalCoverNeonPulse {
      50% { box-shadow: 0 0 0 1px var(--accent-secondary), 0 0 24px var(--glow-primary), inset 0 0 16px var(--glow-secondary), 0 22px 60px rgba(0, 0, 0, 0.45); }
    }

    /* UNIQUE PREMIUM EFFECTS: keep color themes visually distinct and expressive */
    html[data-theme="nebula-neon"] .music-card,
    html[data-theme="nebula-neon"] .artist-card,
    html[data-theme="nebula-neon"] .playlist-card,
    html[data-theme="nebula-neon"] .album-card {
      border-color: var(--accent);
      box-shadow: 0 0 14px var(--glow-primary), inset 0 0 0 1px var(--accent-secondary);
      animation: nebulaNebulaPulse 1.8s ease-in-out infinite;
    }

    html[data-theme="infinite-midnight"] .music-card,
    html[data-theme="infinite-midnight"] .artist-card,
    html[data-theme="infinite-midnight"] .playlist-card,
    html[data-theme="infinite-midnight"] .album-card {
      border-color: var(--accent);
      box-shadow: inset 0 0 16px var(--glow-primary), 0 0 0 1px var(--glow-secondary);
      animation: midnightDrift 2.7s linear infinite;
    }

    html[data-theme="crystal-clear"] .music-card,
    html[data-theme="crystal-clear"] .artist-card,
    html[data-theme="crystal-clear"] .playlist-card,
    html[data-theme="crystal-clear"] .album-card {
      border-color: var(--accent);
      box-shadow: 0 0 0 1px var(--glass-border), inset 0 0 18px var(--glow-primary);
      animation: crystalShimmer 2.2s ease-in-out infinite;
    }

    html[data-theme="solar-pulse"] .music-card,
    html[data-theme="solar-pulse"] .artist-card,
    html[data-theme="solar-pulse"] .playlist-card,
    html[data-theme="solar-pulse"] .album-card {
      border-color: var(--accent);
      box-shadow: 0 0 8px var(--glow-primary), 0 0 22px var(--glow-secondary), inset 0 0 8px var(--glow-primary);
      animation: solarHeat 1.5s ease-in-out infinite;
    }

    html[data-theme="velvet-gold"] .music-card,
    html[data-theme="velvet-gold"] .artist-card,
    html[data-theme="velvet-gold"] .playlist-card,
    html[data-theme="velvet-gold"] .album-card {
      border-color: var(--accent);
      box-shadow: 0 0 0 1px var(--accent-secondary), 0 0 18px var(--glow-primary), inset 0 0 12px var(--glow-primary);
      animation: goldDrift 2s ease-in-out infinite;
    }

    html[data-theme="aurora-reactor"] .music-card,
    html[data-theme="aurora-reactor"] .artist-card,
    html[data-theme="aurora-reactor"] .playlist-card,
    html[data-theme="aurora-reactor"] .album-card {
      border-color: var(--accent);
      background-image: var(--card-gradient);
      box-shadow: 0 0 14px var(--glow-primary), inset 0 0 0 1px var(--accent);
      animation: auroraPhase 2.5s linear infinite;
    }

    html[data-theme="cyber-aurora"] .music-card,
    html[data-theme="cyber-aurora"] .artist-card,
    html[data-theme="cyber-aurora"] .playlist-card,
    html[data-theme="cyber-aurora"] .album-card {
      border-color: var(--frame-color-start);
      box-shadow: 0 0 0 1px var(--frame-color-start), 0 0 16px var(--frame-glow), inset 0 0 12px var(--frame-color-mid);
      animation: cyberAurora 1.9s ease-in-out infinite;
    }

    html[data-theme="holo-prism"] .music-card,
    html[data-theme="holo-prism"] .artist-card,
    html[data-theme="holo-prism"] .playlist-card,
    html[data-theme="holo-prism"] .album-card {
      border-color: var(--accent);
      background-image: var(--card-gradient);
      box-shadow: inset 0 0 16px var(--glow-primary), 0 0 0 1px var(--frame-color-end);
      animation: prismLoop 2.4s linear infinite;
    }

    html[data-theme="ion-storm"] .music-card,
    html[data-theme="ion-storm"] .artist-card,
    html[data-theme="ion-storm"] .playlist-card,
    html[data-theme="ion-storm"] .album-card {
      border-color: var(--frame-color-start);
      box-shadow: 0 0 0 1px var(--frame-color-start), 0 0 14px var(--glow-primary), inset 0 0 16px var(--glow-secondary);
      animation: ionStorm 900ms steps(2) infinite;
    }

    html[data-theme="chrome-nexus"] .music-card,
    html[data-theme="chrome-nexus"] .artist-card,
    html[data-theme="chrome-nexus"] .playlist-card,
    html[data-theme="chrome-nexus"] .album-card {
      border-color: var(--frame-color-start);
      box-shadow: 0 0 14px var(--glow-primary), inset 0 0 10px var(--glow-secondary);
      animation: chromeSync 2s linear infinite;
    }

    html[data-theme="photon-veil"] .music-card,
    html[data-theme="photon-veil"] .artist-card,
    html[data-theme="photon-veil"] .playlist-card,
    html[data-theme="photon-veil"] .album-card {
      border-color: var(--frame-color-start);
      box-shadow: 0 0 0 1px var(--frame-color-start), 0 0 12px var(--glow-primary), inset 0 0 0 1px var(--glow-secondary);
      animation: photonVeil 2.1s ease-in-out infinite;
    }

    html[data-theme="chromatic-pulse"] .music-card,
    html[data-theme="chromatic-pulse"] .artist-card,
    html[data-theme="chromatic-pulse"] .playlist-card,
    html[data-theme="chromatic-pulse"] .album-card {
      border-color: var(--frame-color-mid);
      box-shadow: 0 0 0 1px var(--accent), 0 0 16px var(--glow-primary), inset 0 0 12px var(--glow-secondary);
      animation: chromaPulse 1.4s ease-in-out infinite;
    }

    html[data-theme="nova-frame"] .music-card,
    html[data-theme="nova-frame"] .artist-card,
    html[data-theme="nova-frame"] .playlist-card,
    html[data-theme="nova-frame"] .album-card {
      border-color: var(--frame-color-start);
      box-shadow: 0 0 0 1px var(--frame-color-start), 0 0 14px var(--frame-glow), inset 0 0 10px var(--frame-color-end);
      animation: novaFrame 2s linear infinite;
    }

    html[data-theme="electric-halo"] .music-card,
    html[data-theme="electric-halo"] .artist-card,
    html[data-theme="electric-halo"] .playlist-card,
    html[data-theme="electric-halo"] .album-card {
      border-color: var(--frame-color-start);
      box-shadow: 0 0 0 1px var(--frame-color-start), 0 0 0 4px var(--glow-secondary), 0 0 18px var(--glow-primary);
      animation: electricHalo 1.8s ease-in-out infinite;
    }

    html[data-theme="quantum-border"] .music-card,
    html[data-theme="quantum-border"] .artist-card,
    html[data-theme="quantum-border"] .playlist-card,
    html[data-theme="quantum-border"] .album-card {
      border-color: var(--frame-color-start);
      box-shadow: 0 0 0 1px var(--frame-color-start), 0 0 14px var(--glow-primary), inset 0 0 12px var(--glow-secondary);
      animation: quantumBorderSpin 1500ms linear infinite;
    }

    html[data-theme="neon-frame"] .music-card,
    html[data-theme="neon-frame"] .artist-card,
    html[data-theme="neon-frame"] .playlist-card,
    html[data-theme="neon-frame"] .album-card {
      border-color: var(--frame-color-start);
      box-shadow: 0 0 0 1px var(--frame-color-end), 0 0 17px var(--glow-primary), inset 0 0 7px var(--glow-secondary);
      animation: neonFramePulse 1.3s ease-in-out infinite;
    }

    html[data-theme="spectral-circuit"] .music-card,
    html[data-theme="spectral-circuit"] .artist-card,
    html[data-theme="spectral-circuit"] .playlist-card,
    html[data-theme="spectral-circuit"] .album-card {
      border-color: var(--frame-color-mid);
      box-shadow: 0 0 0 1px var(--frame-color-start), 0 0 16px var(--glow-primary), inset 0 0 10px var(--glow-secondary);
      animation: spectralCircuit 2.8s linear infinite;
    }

    html[data-theme="vaporwave-loop"] .music-card,
    html[data-theme="vaporwave-loop"] .artist-card,
    html[data-theme="vaporwave-loop"] .playlist-card,
    html[data-theme="vaporwave-loop"] .album-card {
      border-color: var(--accent);
      box-shadow: 0 0 0 1px var(--accent-secondary), 0 0 15px var(--glow-primary), inset 0 0 10px var(--glow-secondary);
      animation: vaporWaveLoop 1.4s linear infinite;
    }

    html[data-theme="starlight-rhythm"] .music-card,
    html[data-theme="starlight-rhythm"] .artist-card,
    html[data-theme="starlight-rhythm"] .playlist-card,
    html[data-theme="starlight-rhythm"] .album-card {
      border-color: var(--accent);
      box-shadow: 0 0 0 1px var(--glow-secondary), 0 0 15px var(--glow-primary), inset 0 0 12px var(--accent-secondary);
      animation: starlightDrift 2.6s ease-in-out infinite;
    }

    @keyframes quantumBorderSpin {
      0% { border-radius: 14px; filter: hue-rotate(0deg); transform: scale(1); }
      50% { filter: hue-rotate(90deg); transform: scale(1.005); }
      100% { border-radius: 18px; filter: hue-rotate(180deg); transform: scale(1); }
    }

    @keyframes nebulaNebulaPulse {
      50% { box-shadow: 0 0 22px var(--glow-primary), inset 0 0 16px var(--glow-secondary); }
    }

    @keyframes midnightDrift {
      50% { border-top-color: var(--glow-secondary); box-shadow: inset 0 0 20px var(--glow-primary); }
    }

    @keyframes crystalShimmer {
      50% { box-shadow: 0 0 0 1px var(--glass-border), inset 0 0 20px var(--glow-primary), 0 0 14px var(--glow-secondary); }
    }

    @keyframes solarHeat {
      50% { box-shadow: 0 0 8px var(--glow-primary), 0 0 30px var(--glow-secondary), inset 0 0 12px var(--glow-primary); }
    }

    @keyframes goldDrift {
      50% { filter: saturate(1.4) brightness(1.1); }
    }

    @keyframes auroraPhase {
      50% { filter: hue-rotate(60deg) saturate(1.3); }
    }

    @keyframes cyberAurora {
      50% { box-shadow: 0 0 0 1px var(--frame-color-end), 0 0 20px var(--frame-glow), inset 0 0 8px var(--frame-color-mid); }
    }

    @keyframes prismLoop {
      50% { filter: drop-shadow(0 0 10px var(--frame-color-mid)); }
    }

    @keyframes ionStorm {
      50% { border-style: dashed; }
    }

    @keyframes chromeSync {
      50% { box-shadow: 0 0 22px var(--glow-primary), inset 0 0 8px var(--glow-secondary); }
    }

    @keyframes photonVeil {
      50% { filter: blur(0.4px) brightness(1.2); }
    }

    @keyframes chromaPulse {
      50% { border-color: var(--frame-color-start); box-shadow: 0 0 0 2px var(--glow-primary), 0 0 20px var(--glow-primary); }
    }

    @keyframes novaFrame {
      50% { border-radius: 24px; }
    }

    @keyframes electricHalo {
      50% { box-shadow: 0 0 4px var(--frame-color-start), 0 0 16px var(--glow-primary), inset 0 0 9px var(--glow-secondary); }
    }

    @keyframes neonFramePulse {
      50% { box-shadow: 0 0 0 1px var(--frame-color-start), 0 0 19px var(--glow-primary), inset 0 0 0 1px var(--frame-color-end); }
    }

    @keyframes spectralCircuit {
      50% { filter: hue-rotate(140deg) saturate(1.2); }
    }

    @keyframes vaporWaveLoop {
      50% { border-radius: 12px 22px; filter: drop-shadow(0 0 7px var(--glow-primary)); }
    }

    @keyframes starlightDrift {
      50% { box-shadow: 0 0 0 1px var(--glow-secondary), 0 0 20px var(--glow-primary), inset 0 0 16px var(--accent-secondary); }
    }
    
    html, body {
      height: 100% !important;
      width: 100% !important;
      overflow: hidden;
      background: var(--surface-primary) !important;
      color: var(--text-primary) !important;
      transition: background 0.5s cubic-bezier(0.4, 0, 0.2, 1), color 0.5s cubic-bezier(0.4, 0, 0.2, 1);
      box-sizing: border-box;
    }

    /* Mobile devices: allow overlay scrolling even when body is locked */
    @media (pointer: coarse) {
      html, body {
        overflow: auto !important;
        height: auto !important;
        -webkit-overflow-scrolling: touch;
      }
      /* Only allow visible overflow when a modal explicitly requests it */
      body.modal-open.playlist-allow-scroll { overflow: visible !important; }
    }
    
    *, *::before, *::after {
      box-sizing: inherit;
    }
    
    body.modal-open {
      overflow: hidden;
    }
    
    /* Prevent zoom on keyboard pop */
    input, textarea, select {
      font-size: 16px !important;
    }
    
    /* Prevent viewport scrolling when keyboard is open */
    @supports (padding: max(0px)) {
      body {
        padding-left: max(0px, env(safe-area-inset-left));
        padding-right: max(0px, env(safe-area-inset-right));
        padding-top: max(0px, env(safe-area-inset-top));
        padding-bottom: 0;
      }
    }

    #header {
      padding-top: calc(1rem + env(safe-area-inset-top, 0px));
    }

    #pwa-install-float-btn {
      position: fixed;
      right: 20px;
      bottom: calc(var(--floating-footer-h) + 12px);
      display: none;
      align-items: center;
      gap: 10px;
      padding: 12px 16px;
      border-radius: 999px;
      border: 1px solid rgba(255,255,255,0.12);
      background: rgba(8, 12, 25, 0.92);
      color: white;
      box-shadow: 0 22px 42px rgba(0, 0, 0, 0.32);
      backdrop-filter: blur(16px);
      -webkit-backdrop-filter: blur(16px);
      cursor: pointer;
      z-index: 10005;
      transition: transform 0.18s ease, opacity 0.18s ease;
    }

    #pwa-install-float-btn:hover {
      transform: translateY(-2px);
    }

    /* Page loader removed: splash not needed in native integration */

    .app-wrapper {
      height: 100% !important;
      width: 100% !important;
      overflow-x: hidden;
      overflow-y: auto;
      scroll-behavior: smooth;
      -webkit-overflow-scrolling: touch;
      display: block;
      padding-bottom: 0;
      scrollbar-width: thin;
      scrollbar-color: rgba(255,255,255,0.16) transparent;
    }
    
    .app-wrapper::-webkit-scrollbar {
      width: 12px;
      background: transparent;
    }
    
    .app-wrapper::-webkit-scrollbar-track {
      background: transparent;
    }
    
    .app-wrapper::-webkit-scrollbar-thumb {
      background: rgba(255,255,255,0.14);
      border-radius: 999px;
      border: 3px solid transparent;
      background-clip: padding-box;
      box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08), 0 0 0 1px rgba(255,255,255,0.08);
    }
    
    .app-wrapper::-webkit-scrollbar-thumb:hover {
      background: rgba(255,255,255,0.24);
    }
    
    .app-wrapper::-webkit-scrollbar-thumb:active {
      background: rgba(255,255,255,0.32);
    }
    
    .app-wrapper::-webkit-scrollbar-corner {
      background: transparent;
    }
    
    /* Noise overlay for premium feel (now generated at runtime via canvas -> lightweight PNG) */
    .noise-overlay::before {
      content: '';
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      opacity: 0.02;
      pointer-events: none;
      background-image: var(--noise-image, none);
      background-repeat: repeat;
      background-size: 256px 256px;
      z-index: 9999;
    }
    
    /* Glass morphism base */
    .glass {
      background: var(--glass-bg);
      backdrop-filter: blur(40px) saturate(180%);
      -webkit-backdrop-filter: blur(40px) saturate(180%);
      border: 1px solid var(--glass-border);
      box-shadow: var(--glass-shadow);
    }

    .artist-social-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 16px;
    }

    @media (min-width: 992px) {
      .artist-social-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
      }
    }

    .artist-social-card {
      display: flex;
      align-items: center;
      gap: 14px;
      padding: 18px 16px;
      border-radius: 22px;
      background: rgba(255, 255, 255, 0.08);
      border: 1px solid rgba(255, 255, 255, 0.12);
      box-shadow: 0 18px 32px rgba(0, 0, 0, 0.12);
      transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
      color: #fff;
      text-decoration: none;
      min-height: 90px;
    }

    .artist-social-card:hover {
      transform: translateY(-2px);
      border-color: rgba(255, 255, 255, 0.18);
      box-shadow: 0 22px 36px rgba(0, 0, 0, 0.16);
    }

    .artist-social-card-disabled {
      opacity: 0.72;
      cursor: default;
    }

    .artist-social-logo {
      width: 46px;
      height: 46px;
      border-radius: 18px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 20px;
      font-weight: 700;
      box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
    }

    .artist-social-meta {
      min-width: 0;
    }

    .artist-social-meta p {
      margin: 0;
      font-weight: 700;
      line-height: 1.15;
    }

    .artist-social-meta span {
      display: block;
      margin-top: 6px;
      color: rgba(255, 255, 255, 0.72);
      font-size: 13px;
    }

    /* Header-specific glass panel style */
    #header.glass,
    #header {
      background: transparent !important;
      border: none !important;
      box-shadow: none !important;
      backdrop-filter: none !important;
      -webkit-backdrop-filter: none !important;
    }

    /* Increase logo/avatar size in header for desktop — match mobile account icon feel */
    @media (min-width: 768px) {
      #header .w-10.h-10 {
        width: 56px !important;
        height: 56px !important;
      }
      #header .w-10.h-10 img.w-6.h-6 {
        width: 40px !important;
        height: 40px !important;
      }
    }
    /* Desktop: slightly larger but safe size so header stays intact */
    @media (min-width: 1024px) {
      #header .w-10.h-10 {
        width: 64px !important;
        height: 64px !important;
      }
      #header .w-10.h-10 img.w-6.h-6 {
        width: 48px !important;
        height: 48px !important;
      }
      /* Slightly increase left gap so larger logo doesn't feel cramped */
      .topbar-crit > div.flex.items-center.gap-3 { gap: 1rem; }
    }

    #header .glass {
      background: transparent !important;
      border: none !important;
      box-shadow: none !important;
    }

    #header .nav-links,
    #header .search-input,
    #header .theme-toggle,
    #header .theme-toggle-mobile,
    #header .header-btn,
    #header .mobile-menu-btn {
      background: transparent !important;
      border: none !important;
      box-shadow: none !important;
    }

    #header .header-actions {
      display: flex;
      flex-wrap: nowrap;
      align-items: center;
      justify-content: flex-end;
      gap: 0.75rem;
      min-width: 0;
    }

    /* Ensure actions stick right and sit above other header elements */
    .topbar-crit > .header-actions { margin-left: auto; }
    #header .header-actions { position: relative; z-index: 60; }

    /* Critical header layout to avoid FOUC when Tailwind is deferred */
    .topbar-crit { display:flex; align-items:center; justify-content:space-between; gap:0.75rem; }
    /* Ensure Tailwind 'hidden' utility works before CDN loads */
    .hidden { display: none !important; }
    .topbar-crit .header-actions { display:flex; align-items:center; gap:0.75rem; }
    .player-inline-icon {
      display: block;
      width: 1em;
      height: 1em;
      flex: 0 0 1em;
      overflow: visible;
      color: currentColor;
    }
    #header .header-btn-icon .player-inline-icon { width: 1.15em; height: 1.15em; }
    #header .mobile-header-shortcut .player-inline-icon { width: 17px; height: 17px; flex-basis: 17px; }
    #header .mobile-header-shortcut-artists .player-inline-icon { width: 18px; height: 18px; flex-basis: 18px; }
    .floating-footer-btn .player-inline-icon { width: 24px; height: 24px; flex: 0 0 24px; }
    .theme-toggle-knob .player-inline-icon { width: 14px; height: 14px; flex: 0 0 14px; }
    /* While in preload state, show a stable skeleton for header to prevent jumps */
    .preload #header { visibility: visible; }
    .preload .topbar-crit .btn-glass, .preload .topbar-crit .header-actions > button { width:44px; height:44px; display:inline-flex; align-items:center; justify-content:center; background: rgba(255,255,255,0.04); color: transparent; border-color: rgba(255,255,255,0.06); }
    .preload .topbar-crit .header-actions > button svg { visibility: hidden; }
    .preload .topbar-crit .header-actions > button::after { content: ''; display:block; width: 60%; height: 10px; background: rgba(255,255,255,0.06); border-radius:6px; margin-top:4px; }
    /* Force stable header action sizes only while in preload to avoid paint reflows */
    .topbar-crit .header-actions > button { display:inline-flex; align-items:center; justify-content:center; }
    .preload .topbar-crit .btn-glass.header-btn { min-width:120px; }
    .preload .topbar-crit * { transition: none !important; transform: none !important; }
    .preload #header, .preload .fixed { will-change: auto; }

    /* Responsive sizing for header CTA buttons and logo
       - Use a CSS variable --header-btn-h to keep buttons and logo in sync
       - Buttons become icon-only on very small screens and scale up on larger viewports */
    #header { --header-btn-h: 40px; }
    @media (max-width: 420px) { #header { --header-btn-h: 36px; } }
    @media (min-width: 768px) { #header { --header-btn-h: 48px; } }
    @media (min-width: 1024px) { #header { --header-btn-h: 56px; } }

    #header #connect-btn,
    #header #account-btn {
      border-radius: 999px !important;
      height: var(--header-btn-h) !important;
      min-height: var(--header-btn-h) !important;
      padding: 0 16px !important;
      font-size: 0.92rem !important;
      line-height: 1 !important;
      min-width: auto !important;
      letter-spacing: 0.01em !important;
      box-shadow: none !important;
      transition: all 0.24s ease !important;
      align-items: center !important;
      justify-content: center !important;
      gap: 0.5rem !important;
      background: rgba(255,255,255,0.11) !important;
      border: 1px solid rgba(255,255,255,0.14) !important;
      color: #f8fafc !important;
    }

    #header .header-btn-icon {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: calc(var(--header-btn-h) * 0.42);
      line-height: 1;
    }

    #header .header-btn-label {
      display: inline;
      white-space: nowrap;
      font-size: calc(var(--header-btn-h) * 0.28);
    }

    #header #connect-btn {
      background: linear-gradient(135deg, rgba(37, 99, 235, 1), rgba(59, 130, 246, 1)) !important;
      border-color: rgba(59, 130, 246, 0.5) !important;
      color: #ffffff !important;
      box-shadow: 0 8px 24px rgba(37, 99, 235, 0.24) !important;
    }

    #header #account-btn {
      background: rgba(255,255,255,0.14) !important;
      border-color: rgba(255,255,255,0.22) !important;
      color: #ffffff !important;
    }

    #header #connect-btn:hover,
    #header #account-btn:hover {
      background: rgba(255,255,255,0.22) !important;
      transform: translateY(-1px) scale(1.01) !important;
    }

    @media (max-width: 420px) {
      #header #connect-btn,
      #header #account-btn {
        padding: 0 8px !important;
        min-width: 40px !important;
        width: auto !important;
      }

      /* On very small screens show only connect label, hide account label to save space */
      #header #connect-btn .header-btn-label {
        display: inline !important;
        max-width: 6.5rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        margin-left: 6px;
      }
      #header #account-btn .header-btn-label {
        display: none !important;
      }

      #header .header-btn-icon {
        font-size: calc(var(--header-btn-h) * 0.55);
        margin: 0 !important;
      }
    }

    /* Make logo follow the header button size variable so everything scales together */
    #header .w-10.h-10 {
      width: var(--header-btn-h) !important;
      height: var(--header-btn-h) !important;
    }
    #header .w-10.h-10 img.w-6.h-6 {
      width: calc(var(--header-btn-h) * 0.75) !important;
      height: calc(var(--header-btn-h) * 0.75) !important;
    }

    @media (min-width: 1024px) {
      /* Slightly increase left gap so larger logo doesn't feel cramped */
      .topbar-crit > div.flex.items-center.gap-3 { gap: 1rem; }
    }

    @media (max-width: 768px) {
      #header {
        position: relative !important;
        top: auto !important;
        padding-top: 12px !important;
        padding-bottom: 0 !important;
      }

      #player-nav-buttons .player-nav-button-group {
        margin-top: 0 !important;
      }
    }

    /* Keep header icons and nav links floating clean */
    #header .nav-links a,
    #header .btn-glass,
    #header .theme-toggle,
    #header .mobile-menu-btn {
      box-shadow: none !important;
    }

    /* Header actions layout: ensure labels show on large screens and search doesn't push actions off-screen */
    .header-actions { display: flex; align-items: center; gap: 0.75rem; }

    /* Constrain search width on wide screens so header actions remain visible */
    .relative.hidden-sm-block, .relative.hidden-sm-block .search-input { max-width: 520px; }

    @media (min-width: 1024px) {
      #header #connect-btn .header-btn-label,
      #header #account-btn .header-btn-label {
        display: inline-block !important;
        margin-left: 8px;
        max-width: 8rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      /* Make search input fixed-size on large screens to avoid pushing actions */
      #header .relative { flex: 1 1 520px; max-width: 520px; }
      /* Keep header actions grouped and prevent them from being pushed off-screen */
      #header .header-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 0.75rem; }
      /* Ensure connect/account have room for labels on desktop */
      #header #connect-btn, #header #account-btn { min-width: 110px; padding: 10px 14px; }
      #header #connect-btn { padding-left: 14px; padding-right: 14px; }
      #header #account-btn { padding-left: 12px; padding-right: 12px; }
      #header #connect-btn, #header #account-btn { white-space: nowrap; }
      #header .header-left, #header .nav-links { flex: 0 0 auto; }

      /* Ensure labels are visible on desktop */
      #header .header-btn-label { display: inline-block !important; }
      #header .nav-links { margin-right: 1rem; }
    }

    /* Fix: ensure Account button is not clipped and shows full label on desktop */
    #header .header-actions > button { transform: none !important; }
    #header #account-btn {
      max-width: none !important;
      width: auto !important;
      min-width: 120px !important;
      padding: 10px 16px !important;
      overflow: visible !important;
    }
    #header #account-btn .header-btn-label { display: inline-block !important; margin-left: 8px; }

    /* Minor: ensure connect also has stable width */
    #header #connect-btn { min-width: 120px !important; }

    /* Compact mobile header: keep CTA buttons clear of the logo on narrow screens. */
    @media (max-width: 768px) {
      #header {
        padding-left: max(8px, env(safe-area-inset-left, 0px)) !important;
        padding-right: max(8px, env(safe-area-inset-right, 0px)) !important;
      }

      #header .topbar-crit {
        gap: 6px !important;
        min-width: 0;
      }

      #header .topbar-crit > div:first-child {
        flex: 1 1 auto;
        min-width: 0;
        gap: 6px !important;
      }

      #header .topbar-crit > div:first-child .w-10.h-10 {
        flex: 0 0 36px;
        width: 36px !important;
        height: 36px !important;
      }

      #header .topbar-crit > div:first-child .w-10.h-10 img.w-6.h-6 {
        width: 27px !important;
        height: 27px !important;
      }

      #header .header-actions {
        flex: 0 0 auto;
        gap: 4px !important;
        max-width: none;
      }

      #header #connect-btn,
      #header #account-btn {
        flex: 0 0 34px;
        width: 34px !important;
        min-width: 34px !important;
        max-width: 34px !important;
        height: 34px !important;
        min-height: 34px !important;
        padding: 0 !important;
        gap: 0 !important;
        border-radius: 50% !important;
      }

      /* Keep the main authentication CTA explicit on mobile. */
      #header #connect-btn.auth-guest {
        flex: 0 0 92px;
        width: 92px !important;
        min-width: 92px !important;
        max-width: 92px !important;
        border-radius: 999px !important;
        gap: 6px !important;
      }

      #header #connect-btn.auth-guest .header-btn-label {
        display: inline !important;
        max-width: none;
        overflow: visible;
        text-overflow: clip;
        margin-left: 0;
        font-size: 11px !important;
      }

      #header #connect-btn.auth-guest .header-btn-icon {
        font-size: 18px !important;
      }

      @media (max-width: 360px) {
        #header #connect-btn.auth-guest {
          flex-basis: 84px;
          width: 84px !important;
          min-width: 84px !important;
          max-width: 84px !important;
        }

        #header .mobile-header-shortcut {
          flex-basis: 26px;
          width: 26px;
          height: 26px;
          min-width: 26px;
          min-height: 26px;
        }
      }

      #header #connect-btn .header-btn-label,
      #header #account-btn .header-btn-label {
        display: none !important;
      }

      #header #connect-btn.auth-guest .header-btn-label {
        display: inline !important;
      }

      #header .header-btn-icon {
        font-size: 19px !important;
        margin: 0 !important;
      }

      #header #mobile-menu-btn {
        flex: 0 0 34px;
        width: 34px;
        height: 34px;
        padding: 0;
      }

      #header #mobile-menu-btn .material-symbols-rounded {
        font-size: 24px;
      }

      #header #profile-btn {
        height: 40px !important;
        min-height: 40px !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
      }

      #header .theme-toggle {
        display: none !important;
      }
    }

    /* Desktop-only header shortcuts; mobile keeps the compact current layout. */
    @media (min-width: 769px) {
      #header .nav-links {
        display: flex !important;
        align-items: center;
      }

      #header .desktop-header-shortcut {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 40px;
        padding: 8px 12px;
        border-radius: 12px;
        color: var(--text-secondary);
        background: transparent;
        border: 1px solid transparent;
        cursor: pointer;
        white-space: nowrap;
        transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
      }

      #header .desktop-header-shortcut:hover {
        color: var(--text-primary);
        background: rgba(255, 255, 255, 0.08);
        border-color: var(--glass-border);
      }
    }

    @media (max-width: 768px) {
      #header .desktop-header-shortcut {
        display: none !important;
      }

      #header .mobile-header-shortcut {
        display: inline-flex;
        flex: 0 0 30px;
        width: 30px;
        height: 30px;
        min-width: 30px;
        min-height: 30px;
        align-items: center;
        justify-content: center;
        padding: 0;
        border: 1px solid rgba(255, 255, 255, 0.16);
        border-radius: 50%;
        background: linear-gradient(135deg, rgba(255, 109, 86, 0.28), rgba(255, 255, 255, 0.08));
        border-color: rgba(255, 109, 86, 0.48);
        color: #ff9a86;
        text-decoration: none;
        cursor: pointer;
        box-shadow: none;
        position: relative;
        overflow: hidden;
        transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
      }

      #header .mobile-header-shortcut-pourtoi {
        background: linear-gradient(135deg, rgba(88, 165, 255, 0.3), rgba(255, 255, 255, 0.08));
        border-color: rgba(88, 165, 255, 0.5);
        color: #8fc4ff;
      }

      #header .mobile-header-shortcut-explorer {
        background: linear-gradient(135deg, rgba(175, 103, 255, 0.3), rgba(255, 255, 255, 0.08));
        border-color: rgba(175, 103, 255, 0.5);
        color: #d0a7ff;
      }

      #header .mobile-header-shortcut-artists {
        flex-basis: 58px;
        width: 58px;
        min-width: 58px;
        border-radius: 16px;
        gap: 3px;
        justify-content: space-between;
        padding: 0 6px 0 7px;
        background: linear-gradient(135deg, rgba(175, 103, 255, 0.3), rgba(255, 255, 255, 0.08));
        border-color: rgba(175, 103, 255, 0.5);
        color: #d0a7ff;
      }

      #header .mobile-header-shortcut-label {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        font-size: 7px;
        font-weight: 700;
        line-height: 0.95;
        letter-spacing: -0.02em;
        text-align: left;
      }

      #header .mobile-header-shortcut-label span {
        display: block;
      }

      #header .mobile-header-shortcut-artists .material-symbols-rounded {
        font-size: 18px;
        flex: 0 0 auto;
      }

      #header .mobile-header-shortcut:hover,
      #header .mobile-header-shortcut:focus-visible {
        filter: brightness(1.2);
        box-shadow: 0 0 16px currentColor;
        transform: translateY(-2px) scale(1.06);
        outline: none;
      }

      #header .mobile-header-shortcut:active {
        animation: mobileHeaderElasticBounce 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
      }

      #header .mobile-header-shortcut.is-loading {
        color: transparent !important;
        pointer-events: none;
        cursor: wait;
        transform: none;
      }

      #header .mobile-header-shortcut.is-loading::after {
        content: '';
        position: absolute;
        width: 15px;
        height: 15px;
        border: 2px solid rgba(255, 255, 255, 0.28);
        border-top-color: #ffffff;
        border-radius: 50%;
        animation: mobileHeaderShortcutSpin 0.7s linear infinite;
      }

      @keyframes mobileHeaderElasticBounce {
        0% { transform: scale(1); }
        35% { transform: scale(0.86); }
        65% { transform: scale(1.12); }
        85% { transform: scale(0.96); }
        100% { transform: scale(1); }
      }

      @keyframes mobileHeaderShortcutSpin {
        to { transform: rotate(360deg); }
      }

      #header .mobile-header-shortcut .material-symbols-rounded {
        font-size: 17px;
        line-height: 1;
      }

      #header .mobile-header-shortcut-artists.is-loading {
        width: 58px;
        min-width: 58px;
      }
    }

    @media (min-width: 769px) {
      #header .mobile-header-shortcut {
        display: none !important;
      }
    }

    #header .btn-glass:hover,
    #header .header-btn:hover,
    #header .mobile-menu-btn:hover {
      background: rgba(255,255,255,0.06) !important;
    }

    #header .nav-links a {
      position: relative;
      transition: color 0.3s ease, transform 0.25s ease, box-shadow 0.25s ease;
    }

    #header .nav-links a::before {
      content: '';
      position: absolute;
      inset: -2px;
      border-radius: 18px;
      background: radial-gradient(circle at center, rgba(255,255,255,0.18), transparent 65%);
      opacity: 0;
      transition: opacity 0.3s ease, transform 0.3s ease;
      pointer-events: none;
      transform: scale(0.88);
      filter: blur(8px);
    }

    #header .nav-links a:hover::before,
    #header .nav-links a:focus-visible::before {
      opacity: 1;
      transform: scale(1);
    }

    #header .nav-links a:hover,
    #header .nav-links a:focus-visible {
      color: #fff;
      transform: translateY(-1px);
    }

    .glass-card {
      background: var(--glass-bg);
      backdrop-filter: blur(20px) saturate(150%);
      -webkit-backdrop-filter: blur(20px) saturate(150%);
      border: 1px solid var(--glass-border);
      border-radius: 20px;
      box-shadow: var(--glass-shadow);
      transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    
    .glass-card:hover {
      transform: scale(1.03) translateY(-4px);
      box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    }
    
    .dark .glass-card:hover {
      box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(255, 255, 255, 0.03);
    }
    
    /* Premium button styles */
    .btn-glass {
      background: var(--glass-bg);
      backdrop-filter: blur(20px);
      -webkit-backdrop-filter: blur(20px);
      border: 1px solid var(--glass-border);
      border-radius: 100px;
      padding: 10px 20px;
      font-weight: 500;
      font-size: 14px;
      color: var(--text-primary);
      transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
      cursor: pointer;
      user-select: none;
      -webkit-user-select: none;
      -webkit-touch-callout: none;
      touch-action: manipulation;
    }
    
    .btn-glass:hover {
      transform: scale(1.02);
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1), 0 0 15px var(--glow-primary);
      border-color: var(--glow-primary);
    }
    
    .btn-glass:active {
      transform: scale(0.98);
      transition: transform 0.1s ease;
    }

    #player-nav-buttons .player-nav-button-group {
      display: flex;
      flex-wrap: nowrap;
      align-items: center;
      justify-content: center;
      gap: 0.75rem;
      margin-top: -4px;
      padding: 0 0.5rem;
    }

    #player-nav-buttons .player-nav-button-group .btn-glass {
      position: relative;
      overflow: hidden;
      flex: 1 1 0;
      min-width: 0;
      max-width: 240px;
      padding: 0.85rem 1.1rem;
      font-size: 0.95rem;
      line-height: 1.1;
      border-radius: 999px;
      white-space: nowrap;
      background: rgba(255, 255, 255, 0.08);
      border: 1px solid rgba(255, 255, 255, 0.14);
      color: #ffffff;
      transition: transform 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
      z-index: 0;
    }

    #player-nav-buttons .player-nav-button-group .btn-glass::before {
      content: '';
      position: absolute;
      inset: -6px;
      background: conic-gradient(from 0deg, var(--frame-color-start, rgba(0, 113, 227, 0.95)), var(--frame-color-mid, rgba(0, 255, 200, 0.85)), var(--frame-color-end, rgba(255, 87, 216, 0.9)), var(--frame-color-start, rgba(0, 113, 227, 0.95)));
      filter: blur(18px);
      opacity: 0.75;
      animation: neon-serpent 4.2s linear infinite;
      z-index: -2;
      pointer-events: none;
    }

    /* Make modal header controls (close/back) scale with header height */
    .player-modal-header .btn-close-modal,
    .player-modal-header .btn-back-modal {
      width: calc(var(--player-modal-header-height) * 0.6) !important;
      height: calc(var(--player-modal-header-height) * 0.6) !important;
      min-width: 40px !important;
      min-height: 40px !important;
      padding: 0 !important;
      display: inline-flex !important;
      align-items: center !important;
      justify-content: center !important;
      border-radius: 10px !important;
    }

    @media (max-width: 420px) {
      .player-modal-header .btn-close-modal,
      .player-modal-header .btn-back-modal {
        width: 40px !important;
        height: 40px !important;
      }
    }

    #player-nav-buttons .player-nav-button-group .btn-glass::after {
      content: '';
      position: absolute;
      inset: 0;
      border-radius: 999px;
      background: rgba(255, 255, 255, 0.08);
      z-index: -1;
      pointer-events: none;
    }

    #player-nav-buttons .player-nav-button-group .btn-glass:hover {
      transform: scale(1.03);
      box-shadow: 0 0 40px rgba(255, 255, 255, 0.08), 0 0 20px var(--frame-glow, rgba(0, 113, 227, 0.3));
    }

    #player-nav-buttons .player-nav-button-group .btn-glass:hover::before {
      opacity: 0.95;
      filter: blur(20px);
    }

    #player-nav-buttons .player-nav-button-group .btn-glass.btn-filled {
      background: rgba(255, 255, 255, 0.18);
      border-color: rgba(255, 255, 255, 0.24);
      color: #ffffff;
    }

    #player-nav-buttons .player-nav-button-group .btn-glass:not(.btn-filled) {
      background: rgba(255, 255, 255, 0.08);
      border-color: rgba(255, 255, 255, 0.14);
      color: #ffffff;
    }

    #player-nav-buttons .player-nav-button-group .page-nav-btn.btn-feed {
      --button-highlight: rgba(255, 109, 86, 0.24);
      --button-border-accent: rgba(255, 109, 86, 0.45);
      background: linear-gradient(135deg, rgba(255, 109, 86, 0.24), rgba(255, 255, 255, 0.08));
      border-color: var(--button-border-accent);
    }

    #player-nav-buttons .player-nav-button-group .page-nav-btn.btn-pourtoi {
      --button-highlight: rgba(88, 165, 255, 0.24);
      --button-border-accent: rgba(88, 165, 255, 0.45);
      background: linear-gradient(135deg, rgba(88, 165, 255, 0.24), rgba(255, 255, 255, 0.08));
      border-color: var(--button-border-accent);
    }

    #player-nav-buttons .player-nav-button-group .page-nav-btn.btn-artists {
      --button-highlight: rgba(175, 103, 255, 0.24);
      --button-border-accent: rgba(175, 103, 255, 0.45);
      background: linear-gradient(135deg, rgba(175, 103, 255, 0.24), rgba(255, 255, 255, 0.08));
      border-color: var(--button-border-accent);
    }

    #player-nav-buttons .player-nav-button-group .page-nav-btn.is-loading {
      color: transparent !important;
      cursor: wait;
      pointer-events: none;
      transform: none;
    }

    #player-nav-buttons .player-nav-button-group .page-nav-btn.is-loading::after {
      content: '';
      position: absolute;
      top: 50%;
      left: 50%;
      width: 18px;
      height: 18px;
      margin: -10px 0 0 -10px;
      border: 2px solid rgba(255, 255, 255, 0.28);
      border-top-color: #fff;
      border-radius: 50%;
      animation: pageNavButtonSpin 0.7s linear infinite;
      z-index: 2;
      pointer-events: none;
    }

    @keyframes pageNavButtonSpin {
      to { transform: rotate(360deg); }
    }

    #player-nav-buttons .player-nav-button-group .page-nav-btn.btn-feed:hover,
    #player-nav-buttons .player-nav-button-group .page-nav-btn.btn-pourtoi:hover,
    #player-nav-buttons .player-nav-button-group .page-nav-btn.btn-artists:hover {
      transform: translateY(-4px);
      box-shadow: 0 8px 26px rgba(0,0,0,0.45), 0 0 20px rgba(255,255,255,0.06), 0 0 28px var(--frame-glow, rgba(0,113,227,0.28));
      border-color: rgba(255,255,255,0.22);
      background-position: center;
      background-color: rgba(255,255,255,0.06);
      /* subtle highlight using each button's accent var */
      box-shadow: 0 10px 30px rgba(0,0,0,0.45), 0 0 18px var(--button-border-accent, rgba(0,0,0,0.12));
    }

    @keyframes neon-serpent {
      0% { transform: rotate(0deg); }
      100% { transform: rotate(360deg); }
    }

    @media (max-width: 640px) {
      #player-nav-buttons .player-nav-button-group {
        gap: 0.5rem;
      }
      #player-nav-buttons .player-nav-button-group .btn-glass {
        max-width: 190px;
        padding: 0.75rem 0.95rem;
      }
    }

    #notification-btn {
      min-width: auto;
      transition: transform 0.2s ease;
    }
    #notification-btn:hover {
      transform: translateY(-1px);
    }
    #notification-badge {
      pointer-events: none;
    }
    /* Lootbox header small styles */
    #loot-box-header-btn {
      min-width: auto;
      transition: transform 0.18s ease;
    }
    #loot-box-header-icon.loot-emoji {
      font-size: 20px;
      line-height: 1;
      font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif;
      display: inline-block;
      transform-origin: center;
    }
    #loot-box-header-badge {
      display: none;
      position: absolute;
      top: 6px;
      right: 6px;
      width: 10px;
      height: 10px;
      border-radius: 999px;
      box-shadow: 0 0 0 4px rgba(0,0,0,0.06);
    }
    @keyframes lootboxPulse {
      0% { box-shadow: 0 0 0 0 rgba(255,59,48,0.45); transform: scale(1); }
      50% { box-shadow: 0 0 16px 8px rgba(255,59,48,0); transform: scale(1.06); }
      100% { box-shadow: 0 0 0 0 rgba(255,59,48,0); transform: scale(1); }
    }
    #loot-box-header-btn.unclaimed #loot-box-header-badge {
      display: block;
      background: #ff3b30;
      box-shadow: 0 0 0 6px rgba(255,59,48,0.14);
      animation: lootboxPulse 1.6s infinite;
    }
    #loot-box-header-btn.unclaimed {
      animation: lootboxPulse 1.6s infinite;
    }

    /* Mobile header adjustments to avoid crowding */
    @media(max-width:640px) {
      #loot-box-header-btn, #notification-btn { width: 36px !important; height: 36px !important; }
      #loot-box-header-icon.loot-emoji { font-size: 18px !important; }
      #profile-avatar { width: 36px !important; height: 36px !important; }
      #profile-btn { padding: 6px 8px !important; }
      /* Hide header daily tasks on mobile; use floating FAB instead */
      #daily-tasks-btn { display: none !important; }

      /* Floating daily tasks FAB - Top right, emoji with label */
      #daily-tasks-fab {
        display: none;
        position: fixed;
        top: 70px;
        right: 18px;
        left: auto;
        width: 58px;
        height: auto;
        min-height: 0;
        padding: 0;
        z-index: 9999;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        background: transparent !important;
        border: none !important;
        outline: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        cursor: pointer;
        touch-action: none;
        user-select: none;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        transition: transform 0.2s, box-shadow 0.2s;
      }
      #daily-tasks-fab:hover { transform: scale(1.03); }
      #daily-tasks-fab:active { transform: scale(0.95); }
      #daily-tasks-fab.show { display:flex; }
      #daily-tasks-fab.has-tasks {
        animation: fab-pulse 2.2s ease-out infinite;
      }
      #daily-tasks-fab.is-dragging,
      #daily-tasks-fab.is-dragging:hover,
      #daily-tasks-fab.is-dragging:active {
        animation: none !important;
        transform: none !important;
        transition: none !important;
        cursor: grabbing;
      }

      .daily-fab-stack { display: flex; flex-direction: column; align-items: center; gap: 5px; width: 58px; }
      .daily-fab-action { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 0; border: 0; background: transparent; color: var(--text-primary, #fff); cursor: pointer; touch-action: none; }
      .daily-fab-task { width: 58px; min-height: 58px; }
      .daily-fab-live { width: 42px; height: 48px; min-height: 48px; flex: 0 0 48px; gap: 1px; border: 1px solid rgba(239, 68, 68, 0.25); border-radius: 14px; background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(255, 255, 255, 0.055)); color: rgba(255, 255, 255, 0.68); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 8px 22px rgba(0, 0, 0, 0.2); backdrop-filter: blur(18px) saturate(125%); -webkit-backdrop-filter: blur(18px) saturate(125%); transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease; }
      .daily-fab-live:hover, .daily-fab-live[aria-expanded="true"] { border-color: rgba(239, 68, 68, 0.45); background: linear-gradient(135deg, rgba(239, 68, 68, 0.27), rgba(255, 255, 255, 0.09)); color: rgba(255, 255, 255, 0.9); }
      .daily-fab-live .live-room-equalizer { width: 16px; height: 16px; display: inline-flex; align-items: center; justify-content: center; gap: 2px; }
      .daily-fab-live .daily-fab-live-label { font-size: 7px; font-weight: 800; line-height: 1; letter-spacing: 0.03em; }
      .daily-fab-live .live-room-equalizer i { width: 2px; display: block; border-radius: 999px; background: #f87171; transform: scaleY(0.55); transform-origin: center; animation: liveRoomSpectrum 760ms ease-in-out infinite alternate; }
      .daily-fab-live .live-room-equalizer i:nth-child(1) { height: 8px; animation-delay: -0.18s; }
      .daily-fab-live .live-room-equalizer i:nth-child(2) { height: 14px; animation-delay: -0.52s; }
      .daily-fab-live .live-room-equalizer i:nth-child(3) { height: 10px; animation-delay: -0.34s; }
      .daily-fab-live .live-room-equalizer i:nth-child(4) { height: 6px; animation-delay: -0.08s; }
      @keyframes liveRoomSpectrum { from { opacity: 0.65; transform: scaleY(0.35); } to { opacity: 1; transform: scaleY(1); } }

      .live-room-notice { position: absolute; top: 63px; right: calc(100% + 9px); z-index: 10002; width: min(300px, calc(100vw - 2rem)); padding: 1rem; border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 20px; background: linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.045)), rgba(12, 14, 22, 0.54); color: var(--text-primary); box-shadow: 0 24px 64px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.1); backdrop-filter: blur(42px) saturate(155%); -webkit-backdrop-filter: blur(42px) saturate(155%); opacity: 0; visibility: hidden; transform: translateY(-7px) scale(0.98); transform-origin: top right; transition: opacity 0.2s ease, transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0.2s ease; pointer-events: none; }
      @media (max-width: 640px) {
        .live-room-notice { position: fixed; top: 50%; right: auto; left: 50%; width: min(300px, calc(100vw - 24px)); max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); overflow-y: auto; box-sizing: border-box; transform: translate(-50%, -50%) scale(0.98); transform-origin: center; }
      }
      .live-room-notice.open { opacity: 1; visibility: visible; transform: translateY(0) scale(1); pointer-events: auto; }
      @media (max-width: 640px) {
        .live-room-notice.open { transform: translate(-50%, -50%) scale(1); }
      }
      .live-room-notice-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; }
      .live-room-notice-kicker { margin: 0 0 0.35rem; color: #ff9898; font-size: 0.57rem; font-weight: 900; letter-spacing: 0.17em; }
      .live-room-notice-title { margin: 0; color: var(--text-primary); font-size: 1rem; font-weight: 900; line-height: 1.2; }
      .live-room-notice-copy { margin: 0.6rem 0 0.9rem; color: var(--text-secondary); font-size: 0.78rem; line-height: 1.5; }
      .live-room-notice-close { width: 28px; height: 28px; flex: 0 0 28px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 50%; background: rgba(255, 255, 255, 0.06); color: rgba(255, 255, 255, 0.75); cursor: pointer; }
      .live-room-notice-close .material-symbols-rounded { font-size: 1rem; }
      .live-room-notice-cta { min-height: 40px; display: flex; align-items: center; justify-content: center; gap: 0.4rem; padding: 0.55rem 0.8rem; border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 13px; background: linear-gradient(135deg, #f05252, #dc3545); color: #fff; box-shadow: 0 8px 20px rgba(239, 68, 68, 0.25); font-size: 0.78rem; font-weight: 900; text-decoration: none; transition: transform 0.2s ease, filter 0.2s ease; }
      .live-room-notice-cta:hover { filter: brightness(1.08); transform: translateY(-1px); }
      .live-room-notice-cta .material-symbols-rounded { font-size: 1rem; }
      html:not(.dark) .live-room-notice { border-color: rgba(255, 255, 255, 0.74); background: linear-gradient(145deg, rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0.48)), rgba(245, 247, 250, 0.58); color: var(--text-primary); box-shadow: 0 24px 64px rgba(15, 23, 42, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.86); }
      html:not(.dark) .live-room-notice-kicker { color: #c2414f; }
      html:not(.dark) .live-room-notice-close { border-color: rgba(15, 23, 42, 0.12); background: rgba(15, 23, 42, 0.055); color: rgba(15, 23, 42, 0.72); }
      @supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
        .live-room-notice { background: rgba(12, 14, 22, 0.94); }
        html:not(.dark) .live-room-notice { background: rgba(248, 249, 252, 0.97); }
      }
      @media (prefers-reduced-motion: reduce) {
        .daily-fab-live .live-room-equalizer i { animation: none; transform: scaleY(0.72); }
      }

    }

    .daily-tasks-modal { position: fixed; inset: 0; z-index: 11000; display: flex; align-items: center; justify-content: center; padding: max(1rem, env(safe-area-inset-top)) 1rem max(1rem, env(safe-area-inset-bottom)); overflow-y: auto; background: rgba(5, 8, 15, 0.62); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
      .daily-tasks-dialog { width: min(100%, 540px); max-height: 100%; overflow-y: auto; padding: 1.15rem; border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 20px; background: linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.045)), rgba(12, 14, 22, 0.88); color: var(--text-primary); box-shadow: 0 24px 64px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.1); backdrop-filter: blur(42px) saturate(155%); -webkit-backdrop-filter: blur(42px) saturate(155%); }
      .daily-tasks-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; margin-bottom: 1rem; }
      .daily-tasks-kicker { margin: 0 0 0.35rem; color: #ff9898; font-size: 0.57rem; font-weight: 900; letter-spacing: 0.17em; }
      .daily-tasks-title { margin: 0; color: var(--text-primary); font-size: 1.15rem; font-weight: 900; line-height: 1.2; }
      .daily-tasks-close { width: 32px; height: 32px; flex: 0 0 32px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 50%; background: rgba(255, 255, 255, 0.06); color: rgba(255, 255, 255, 0.75); cursor: pointer; }
      .daily-tasks-close .material-symbols-rounded { font-size: 1.1rem; }
      .daily-tasks-list { display: grid; gap: 0.6rem; }
      .daily-task-item { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.75rem; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 14px; background: linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025)), rgba(12, 14, 22, 0.25); }
      .daily-task-name { display: block; color: var(--text-primary); font-size: 0.84rem; font-weight: 800; line-height: 1.25; }
      .daily-task-description { margin-top: 0.25rem; color: var(--text-secondary); font-size: 0.72rem; line-height: 1.4; }
      .daily-task-description span { padding: 0 0.12rem; color: #ff9898; }
      .daily-task-action { min-height: 36px; flex: 0 0 auto; padding: 0.45rem 0.75rem; border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 11px; background: linear-gradient(135deg, #f05252, #dc3545); color: #fff; box-shadow: 0 6px 16px rgba(239, 68, 68, 0.2); font: inherit; font-size: 0.72rem; font-weight: 850; white-space: nowrap; cursor: pointer; transition: transform 0.2s ease, filter 0.2s ease, opacity 0.2s ease; }
      .daily-task-action:hover:not(:disabled) { filter: brightness(1.08); transform: translateY(-1px); }
      .daily-task-action:disabled { opacity: 0.52 !important; cursor: not-allowed !important; }
      .daily-task-controls { min-width: 0; display: flex; flex: 0 1 270px; align-items: center; justify-content: flex-end; gap: 0.45rem; }
      .daily-task-theme-select { min-width: 0; width: 100%; padding: 0.5rem 0.55rem; border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 10px; outline: none; background: rgba(0, 0, 0, 0.22); color: var(--text-primary); font: inherit; font-size: 0.7rem; }
      .daily-task-theme-select option { background: #171923; color: #fff; }
      html:not(.dark) .daily-tasks-dialog { border-color: rgba(255, 255, 255, 0.74); background: linear-gradient(145deg, rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0.48)), rgba(245, 247, 250, 0.92); color: var(--text-primary); box-shadow: 0 24px 64px rgba(15, 23, 42, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.86); }
      html:not(.dark) .daily-tasks-kicker { color: #c2414f; }
      html:not(.dark) .daily-tasks-close { border-color: rgba(15, 23, 42, 0.12); background: rgba(15, 23, 42, 0.055); color: rgba(15, 23, 42, 0.72); }
      html:not(.dark) .daily-task-item { border-color: rgba(15, 23, 42, 0.1); background: linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.42)), rgba(255, 255, 255, 0.35); }
      html:not(.dark) .daily-task-theme-select { border-color: rgba(15, 23, 42, 0.16); background: rgba(255, 255, 255, 0.6); }
      html:not(.dark) .daily-task-theme-select option { background: #fff; color: #171923; }
    @media (max-width: 420px) {
      .daily-tasks-dialog { padding: 1rem; }
      .daily-task-item { padding: 0.65rem; }
      .daily-task-item--theme { align-items: flex-start; flex-direction: column; }
      .daily-task-controls { width: 100%; flex: 1 1 auto; }
      .daily-task-action { min-height: 34px; padding-inline: 0.65rem; }
    }

    @media(max-width:640px) {

      .fab-emoji {
        font-size: 38px;
        line-height: 1;
        margin-bottom: 2px;
        filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.3));
      }

      .daily-fab-task .fab-label {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 2px 8px;
        min-width: 40px;
        border-radius: 999px;
        font-size: 8px;
        color: var(--text-primary, #ffffff);
        background: rgba(0, 0, 0, 0.42);
        border: 1px solid rgba(255, 255, 255, 0.12);
        text-align: center;
        white-space: nowrap;
        font-weight: 700;
        letter-spacing: 0.04em;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
        backdrop-filter: blur(8px);
      }

      #daily-tasks-fab.has-tasks .daily-fab-task .fab-label {
        background: rgba(255, 186, 59, 0.18);
        color: var(--text-on-accent, #ffffff);
        border-color: rgba(255, 186, 59, 0.32);
      }

      @keyframes fab-pulse {
        0%, 100% { transform: none; }
        50% { transform: translateY(-2px); }
      }
    }
    
    /* Ripple effect for interactive elements */
    .ripple {
      position: relative;
      overflow: hidden;
    }
    
    .ripple::before {
      content: '';
      position: absolute;
      top: 50%;
      left: 50%;
      width: 0;
      height: 0;
      border-radius: 50%;
      background: rgba(255, 255, 255, 0.3);
      transform: translate(-50%, -50%);
      transition: width 0.6s, height 0.6s;
      pointer-events: none;
    }
    
    .ripple:active::before {
      width: 300px;
      height: 300px;
    }
    
    /* Enhanced micro-interactions */
    .interactive-element {
      position: relative;
      transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    
    .interactive-element:hover {
      transform: translateY(-2px);
      box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    }
    
    .interactive-element:active {
      transform: translateY(0) scale(0.98);
      transition: transform 0.1s ease;
    }
    
    /* ===== SPRING ANIMATIONS + LIGHT ENGINE ===== */
    .interactive,[data-spring],.btn-glass,.btn-filled,.floating-player-btn,.floating-footer-btn,.music-card,.artist-card,.play-btn-overlay { 
      transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); 
      user-select: none;
      -webkit-user-select: none;
      -webkit-touch-callout: none;
      touch-action: manipulation;
    }
    [data-spring]:active,.btn-glass:active,.floating-player-btn:active { transform: scale(0.94) !important; }
    .glow-element { position: relative; }
    .glow-element::before { 
      content: ''; 
      position: absolute; 
      inset: -2px; 
      border-radius: inherit; 
      background: radial-gradient(circle at 30% 30%, var(--glow-primary), transparent 70%); 
      opacity: 0; 
      transition: opacity 0.4s ease; 
      pointer-events: none; 
      will-change: opacity; /* 🎯 PHASE 3: GPU acceleration for glow effects */
    }
    .glow-element:hover::before { opacity: 0.8; }
    .music-card { 
      position: relative; 
      transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94); 
      border-radius: 20px;
      background: rgba(255, 255, 255, 0.03);
      border: 1px solid rgba(255, 255, 255, 0.08);
      overflow: hidden;
    }
    .music-card:hover { 
      box-shadow: 0 0 30px var(--glow-primary), 0 12px 40px rgba(0, 0, 0, 0.2); 
      transform: translate3d(0, -8px, 0) scale(1.02); /* 🎯 PHASE 3: GPU-accelerated 3D transform */
    }
    .artist-card { 
      transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94); 
    }
    .artist-card:hover { 
      box-shadow: 0 0 25px var(--glow-primary); 
      transform: translate3d(0, -6px, 0) scale(1.02); /* 🎯 PHASE 3: GPU-accelerated 3D transform */
    }
    @keyframes elasticCardBounce {
      0% { transform: translateY(0) scale(1); }
      100% { transform: translateY(-6px) scale(1.02); }
    }
    .play-btn-overlay { 
      position: relative; 
      box-shadow: 0 0 0 0 var(--glow-primary); 
      animation: pulse-glow 2s ease-in-out infinite; 
    }
    .play-btn-overlay:hover { animation: pulse-glow-hover 0.4s cubic-bezier(0.4, 0, 0.2, 1); }
    @keyframes pulse-glow { 0%{box-shadow:0 0 0 0 var(--glow-primary)}50%{box-shadow:0 0 0 10px rgba(0,0,0,0)}100%{box-shadow:0 0 0 0 rgba(0,0,0,0)} }
    @keyframes pulse-glow-hover { 0%,100%{transform:scale(1);filter:drop-shadow(0 0 8px var(--glow-primary))}50%{transform:scale(1.08);filter:drop-shadow(0 0 16px var(--glow-primary))} }
    @keyframes pulse-beat { 0%{background-color:rgba(0,0,0,0);box-shadow:0 0 0 0 var(--pulse-primary)}50%{background-color:rgba(255,255,255,0.02);box-shadow:0 0 20px 5px rgba(255,255,255,0.1)}100%{background-color:rgba(0,0,0,0);box-shadow:0 0 0 0 var(--pulse-primary)} }
    @keyframes pulse-breath { 0%{opacity:1}50%{opacity:0.7}100%{opacity:1} }

    /* Download button styles */
    .download-btn {
      transition: all 0.2s ease;
      opacity: 0.7;
    }
    .download-btn:hover {
      opacity: 1;
      background: rgba(255,255,255,0.15) !important;
      transform: scale(1.05);
    }
    
    /* 🎯 PHASE 3: Lazy animation loading - only animate when visible */
    .lazy-animate {
      animation: none !important;
      transition: none !important;
    }
    .lazy-animate.animate {
      animation: inherit !important;
      transition: inherit !important;
    }
    
    /* Pulse Engine - Active state */
    body.pulse-engine-active {
      --pulse-primary: #FF4444;
      --pulse-secondary: #FF8844;
      transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    
    body.pulse-beat {
      animation: pulse-beat 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    }
    
    /* Pulse glow on buttons during playback */
    body.pulse-engine-active .play-btn-overlay {
      box-shadow: 0 0 30px var(--pulse-primary);
      transition: box-shadow 0.3s ease;
    }
    
    /* Breathing effect for ambient/calm tracks */
    body.pulse-engine-active.pulse-breath #player-modal-cover {
      animation: pulse-breath 3s ease-in-out infinite;
    }
    
    .audio-reactive { transition: box-shadow 0.1s ease, filter 0.1s ease; }
    .music-card-cover img.is-loaded { opacity: 1 !important; }
    .audio-reactive.bass-hit { box-shadow: 0 0 40px var(--glow-primary) !important; filter: brightness(1.2); }
    .floating-footer-btn::after { 
      content: ''; 
      position: absolute; 
      top: 50%; 
      left: 50%; 
      width: 100%; 
      height: 100%; 
      border-radius: 12px; 
      background: radial-gradient(circle, var(--glow-secondary) 0%, transparent 70%); 
      opacity: 0; 
      transform: translate(-50%, -50%) scale(0.8); 
      transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94); 
      pointer-events: none; 
    }
    
    .floating-footer-btn:active::after {
      animation: ripple 0.6s ease-out;
    }
    
    @keyframes ripple {
      0% { 
        opacity: 1; 
        transform: translate(-50%, -50%) scale(0.8);
        background: radial-gradient(circle, rgba(0, 113, 227, 0.6) 0%, transparent 70%);
      }
      100% { 
        opacity: 0; 
        transform: translate(-50%, -50%) scale(2);
        background: radial-gradient(circle, rgba(0, 113, 227, 0) 0%, transparent 70%);
      }
    }
    
    /* 🎯 KEEP: Essential animations for UI feedback */
    @keyframes radar-pulse {
      0% { transform: scale(1); opacity: 1; box-shadow: 0 0 8px rgba(0, 255, 136, 0.6); }
      50% { transform: scale(1.2); opacity: 0.6; box-shadow: 0 0 16px rgba(0, 255, 136, 0.3); }
      100% { transform: scale(1); opacity: 1; box-shadow: 0 0 8px rgba(0, 255, 136, 0.6); }
    }
    
    @keyframes spin {
      0% { transform: rotate(0deg); }
      100% { transform: rotate(360deg); }
    }
    
    @keyframes float {
      0%, 100% { transform: translateY(0px); }
      50% { transform: translateY(-8px); }
    }
    
    @keyframes slideIn {
      from { transform: translateX(400px); opacity: 0; }
      to { transform: translateX(0); opacity: 1; }
    }
    
    @keyframes slideUp {
      from { transform: translateX(-50%) translateY(100px); opacity: 0; }
      to { transform: translateX(-50%) translateY(0); opacity: 1; }
    }

    @keyframes pulse {
      0%, 100% { opacity: 0.6; }
      50% { opacity: 1; }
    }
    
    /* .radar-pulse {
      animation: radar-pulse 2s ease-in-out infinite !important;
    } COMMENTED OUT: Reduce idle CPU, enable on-scroll later */
    .floating-footer-btn:active::after { opacity: 1; transform: translate(-50%, -50%) scale(1.5); }
    .material-symbols-rounded { transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94); }
    [data-spring]:hover .material-symbols-rounded,.floating-footer-btn:hover .material-symbols-rounded { transform: scale(1.2) rotate(5deg); }
    [data-spring]:active .material-symbols-rounded,.floating-footer-btn:active .material-symbols-rounded { transform: scale(0.9); }
    
    .btn-premium {
      background: linear-gradient(135deg, #ffffff 0%, #e8e8ed 50%, #d2d2d7 100%);
      border: none;
      box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.8);
    }
    
    /* 🎵 SEARCH HUB STYLES */
    .search-hub-overlay {
      animation: fadeIn 0.3s ease-out;
    }
    
    .nearby-share-card {
      transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    }
    
    .nearby-share-card:hover {
      transform: translateY(-4px) !important;
      border-color: rgba(0, 255, 136, 0.4) !important;
      background: linear-gradient(135deg, rgba(0, 255, 136, 0.12), rgba(0, 113, 227, 0.06)) !important;
      box-shadow: 0 12px 28px rgba(0, 255, 136, 0.15) !important;
    }
    
    .nearby-share-card:active {
      transform: scale(0.98) !important;
    }
    
    .trending-card {
      transition: all 0.2s ease !important;
    }
    
    .trending-card:hover {
      transform: translateX(4px) !important;
      border-color: rgba(255, 107, 53, 0.4) !important;
      background: linear-gradient(135deg, rgba(255, 69, 0, 0.12), rgba(255, 193, 7, 0.08)) !important;
      box-shadow: 0 8px 20px rgba(255, 69, 0, 0.2) !important;
    }
    
    .artist-hub-card {
      transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    }
    
    .artist-hub-card:hover {
      transform: translateY(-6px) scale(1.05) !important;
      border-color: rgba(102, 126, 234, 0.4) !important;
      background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(118, 75, 162, 0.08)) !important;
      box-shadow: 0 12px 28px rgba(102, 126, 234, 0.2) !important;
    }
    
    .hub-action-btn {
      animation: idle-glow 3s ease-in-out infinite;
    }
    
    /* 🎯 COMMENTED OUT: Too expensive (5-10% CPU) - Keep for lazy-load later
    @keyframes idle-glow {
      0%, 100% { box-shadow: 0 0 8px rgba(0, 212, 255, 0.2); }
      50% { box-shadow: 0 0 16px rgba(0, 212, 255, 0.4); }
    }
    */
    
    .dark .btn-premium {
      background: linear-gradient(135deg, #3a3a3c 0%, #2c2c2e 50%, #1c1c1e 100%);
      box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    }
    
    .btn-filled {
      background: var(--accent);
      border: none;
      color: white;
      box-shadow: 0 4px 15px rgba(0, 113, 227, 0.3);
      user-select: none;
      -webkit-user-select: none;
      -webkit-touch-callout: none;
      touch-action: manipulation;
    }
    
    .btn-filled:hover {
      box-shadow: 0 8px 25px rgba(0, 113, 227, 0.4);
    }
    
    /* Horizontal scroll carousel */
    .carousel-container {
      position: relative;
      display: flex;
      align-items: stretch;
      padding: 0 4px;
      contain: layout style paint; /* 🎯 PHASE 3: CSS containment for performance */
    }
    
    .carousel-wrapper {
      flex: 1;
      position: relative;
      overflow-x: hidden;
      overflow-y: visible;
      padding: 0 20px;
    }
    
    .carousel {
      display: flex;
      gap: 16px;
      overflow-x: auto;
      scroll-snap-type: x mandatory;
      scroll-behavior: smooth;
      padding: 16px 0 24px;
      padding-right: 20px;
      -webkit-overflow-scrolling: touch;
      scrollbar-width: none;
      -ms-overflow-style: none;
      scroll-padding: 0;
      margin: 0;
      user-select: none;
      cursor: grab;
    }

    #home-radio-recommended-carousel,
    #home-radio-listen-carousel,
    #country-streams-ranking-carousel,
    #country-artists-ranking-carousel,
    #recently-played-carousel,
    #recents-carousel,
    #random-carousel {
      margin: 0 !important;
      padding-left: 0 !important;
      padding-right: 20px !important;
      scroll-padding: 0 !important;
    }

    @media (max-width: 768px) {
      #recently-played-carousel,
      #recents-carousel,
      #random-carousel {
        margin: 0 !important;
        padding-left: 0 !important;
        padding-right: 20px !important;
        scroll-padding: 0 !important;
      }
    }

    .recents-carousel-wrapper {
      padding: 0;
    }

    #recents-carousel {
      margin: 0;
      padding: 16px 0 24px;
      padding-right: 20px;
      scroll-padding: 0;
      width: 100%;
      box-sizing: border-box;
    }

    @media (max-width: 768px) {
      .recents-carousel-wrapper {
        padding: 0;
      }

      #recents-carousel {
        margin: 0;
        padding: 16px 0 24px;
        padding-right: 20px;
        scroll-padding: 0;
        width: 100%;
        box-sizing: border-box;
      }
    }
    
    /* AI recommendations cards - square format */
    #ai-recommendations-carousel .carousel-item {
      width: 140px !important;
      flex-shrink: 0;
    }
    
    #ai-recommendations-carousel .music-card {
      width: 220px !important;
      height: 280px !important;
    }

    /* Random carousel - horizontal scrollable carousel */
    #random-carousel {
      display: flex;
      gap: 16px;
      overflow-x: auto;
      scroll-snap-type: x mandatory;
      scroll-behavior: smooth;
      padding: 16px 0 24px;
      padding-right: 20px;
      -webkit-overflow-scrolling: touch;
      scrollbar-width: none;
      -ms-overflow-style: none;
      scroll-padding: 0;
      margin: 0;
      user-select: none;
      cursor: grab;
    }

    /* Curated carousel - horizontal scrollable carousel */
    #curated-carousel {
      display: flex;
      gap: 16px;
      overflow-x: auto;
      scroll-snap-type: x mandatory;
      scroll-behavior: smooth;
      padding: 16px 0 24px;
      padding-right: 20px;
      -webkit-overflow-scrolling: touch;
      scrollbar-width: none;
      -ms-overflow-style: none;
      scroll-padding: 0;
      margin: 0;
      user-select: none;
      cursor: grab;
    }

    /* Ads carousel - add left padding for proper alignment */
    #ads-carousel {
      padding-left: 35px;
    }

    /* Random carousel - add left padding for proper alignment */
    #random-carousel {
      padding-left: 44px;
    }

    /* Product Cards - Shop Style */
    .product-card {
      width: 220px;
      cursor: pointer;
      position: relative;
      transition: all 0.3s ease;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: flex-start;
      background: rgba(255,255,255,0.02);
      border-radius: 16px;
      padding: 16px;
      border: 1px solid rgba(255,255,255,0.1);
    }

    .product-card:hover {
      transform: translateY(-4px);
      box-shadow: 0 12px 40px rgba(0,0,0,0.3), 0 0 60px rgba(255, 116, 0, 0.1);
      border-color: rgba(255, 116, 0, 0.3);
    }

    .product-card-cover {
      width: 100%;
      aspect-ratio: 1;
      border-radius: 12px;
      overflow: hidden;
      position: relative;
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      background-size: cover;
      background-position: center;
      transition: transform 0.4s ease, box-shadow 0.3s ease;
      box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    }

    .product-card:hover .product-card-cover {
      transform: scale(1.02);
    }

    .product-card-overlay {
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: linear-gradient(135deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.1) 100%);
      opacity: 0;
      transition: opacity 0.3s ease;
    }

    .product-card:hover .product-card-overlay {
      opacity: 1;
    }

    .product-card .mt-3 {
      width: 100%;
      padding: 12px 0 0;
      box-sizing: border-box;
      text-align: center;
    }









/* FORCE TOP LAYER FOR CHECKOUT PRODUCT FORM MODALE*/
#checkout-modal {
  position: fixed;
  inset: 0;
  z-index: 999999 !important;
  pointer-events: none;
}

/* OVERLAY */
.checkout-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(20px);
  opacity: 0;
  transition: opacity 0.4s ease;
}

/* SHEET */
.checkout-sheet {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;

  border-radius: 28px 28px 0 0;
  padding: 20px;

  transform: translateY(110%) scale(0.98);
  opacity: 0;

  transition: all 0.5s cubic-bezier(0.22,1,0.36,1);

  box-shadow:
    0 -10px 40px rgba(0,0,0,0.25),
    0 0 60px var(--glow-primary);
}

/* ACTIVE */
#checkout-modal.active {
  pointer-events: all;
}

#checkout-modal.active .checkout-overlay {
  opacity: 1;
}

#checkout-modal.active .checkout-sheet {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* HEADER */
.checkout-header {
  margin-bottom: 10px;
}

.checkout-handle {
  width: 42px;
  height: 5px;
  background: var(--text-secondary);
  border-radius: 10px;
  margin: 0 auto 10px;
  opacity: 0.6;
}

/* PROGRESS */
.checkout-progress {
  width: 100%;
  height: 4px;
  background: var(--card-bg);
  border-radius: 10px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 50%;
  background: linear-gradient(90deg, var(--accent), var(--glow-primary));
  transition: width 0.4s ease;
}

/* STEPS */
.checkout-step {
  display: none;
}

.checkout-step.active {
  display: block;
  animation: smoothIn 0.4s ease;
}

@keyframes smoothIn {
  from {opacity:0; transform:translateY(20px);}
  to {opacity:1; transform:translateY(0);}
}

/* TEXT */
.checkout-step h2 {
  font-size: 20px;
  margin-bottom: 16px;
}

.checkout-step label {
  font-size: 13px;
  color: var(--text-secondary);
}

/* INPUT */
.checkout-step input {
  width: 100%;
  padding: 14px;
  margin-top: 6px;

  border-radius: 14px;
  border: 1px solid var(--glass-border);

  background: var(--surface-secondary);
  color: var(--text-primary);

  transition: 0.3s;
}

.checkout-step input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-secondary);
}

/* HELPER */
.helper {
  font-size: 13px;
  margin: 10px 0 20px;
  color: var(--text-secondary);
}

/* BUTTON */
.checkout-next {
  width: 100%;
  padding: 14px;
  font-size: 15px;
}

/* PAYMENT */
.payment-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* CARD */
.payment-card {
  padding: 16px;
  border-radius: 18px;

  display: flex;
  align-items: center;
  gap: 12px;

  cursor: pointer;

  background: var(--card-bg);
  border: 1px solid var(--card-border);

  transition: all 0.25s ease;
}

/* HOVER */
.payment-card:hover {
  transform: scale(1.03);
  box-shadow:
    0 10px 30px rgba(0,0,0,0.15),
    0 0 20px var(--glow-secondary);
}

/* ACTIVE */
.payment-card:active {
  transform: scale(0.97);
}

/* SELECTED */
.payment-card.selected {
  border-color: var(--accent);
  box-shadow:
    0 0 0 2px var(--accent-secondary),
    0 0 25px var(--glow-primary);
}

/* ICON */
.payment-card .icon {
  font-size: 20px;
}











    /* CURATED Badge - Ultra Premium (Green accent) */
    .curated-badge {
      position: absolute;
      bottom: 12px;
      left: 12px;
      z-index: 15;
      display: flex;
      align-items: center;
      gap: 6px;
      padding: 8px 12px;
      background: rgba(0, 255, 136, 0.25);
      backdrop-filter: blur(20px) saturate(200%);
      -webkit-backdrop-filter: blur(20px) saturate(200%);
      border: 1.2px solid rgba(0, 255, 136, 0.6);
      border-radius: 50px;
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 1.2px;
      color: #ffffff;
      text-transform: uppercase;
      box-shadow: 
        0 8px 24px rgba(0, 255, 136, 0.3),
        inset 0 1px 2px rgba(255, 255, 255, 0.4),
        0 0 20px rgba(0, 255, 136, 0.2);
      animation: curatedPulse 3s ease-in-out infinite;
      white-space: nowrap;
      pointer-events: none;
    }

    .curated-badge span.material-symbols-rounded {
      font-size: 16px;
      font-weight: 700;
      text-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
    }

    .curated-badge span:not(.material-symbols-rounded) {
      display: none;
    }

    @media (min-width: 640px) {
      .curated-badge span:not(.material-symbols-rounded) {
        display: inline;
      }
    }

    @keyframes curatedPulse {
      0%, 100% {
        box-shadow: 
          0 8px 24px rgba(0, 255, 136, 0.3),
          inset 0 1px 2px rgba(255, 255, 255, 0.4),
          0 0 20px rgba(0, 255, 136, 0.2);
        transform: scale(1);
      }
      50% {
        box-shadow: 
          0 12px 32px rgba(0, 255, 136, 0.45),
          inset 0 1px 2px rgba(255, 255, 255, 0.5),
          0 0 30px rgba(0, 255, 136, 0.35);
        transform: scale(1.05);
      }
    }

    .music-card:hover .curated-badge {
      background: rgba(0, 255, 136, 0.35);
      border-color: rgba(0, 255, 136, 0.8);
      box-shadow: 
        0 12px 32px rgba(0, 255, 136, 0.45),
        inset 0 1px 2px rgba(255, 255, 255, 0.5),
        0 0 30px rgba(0, 255, 136, 0.35);
    }

    .dark .curated-badge {
      background: rgba(0, 255, 136, 0.3);
      border-color: rgba(0, 255, 136, 0.7);
      box-shadow: 
        0 8px 24px rgba(0, 255, 136, 0.4),
        inset 0 1px 2px rgba(255, 255, 255, 0.5),
        0 0 25px rgba(0, 255, 136, 0.3);
    }

    .premium-mini-badge:hover {
      transform: translateY(-2px);
      border-color: rgba(255,255,255,0.45);
      background: rgba(255,255,255,0.12);
    }

    #badge-theme-timer {
      position: relative;
      overflow: hidden;
    }

    #badge-theme-timer .material-symbols-rounded {
      font-size: 20px;
      color: #f5f9ff;
      animation: clock-tick 1s steps(1) infinite;
      filter: drop-shadow(0 0 10px rgba(255,255,255,0.18));
    }

    #badge-theme-timer-value {
      font-variant-numeric: tabular-nums;
      letter-spacing: 0.03em;
      color: #fff;
    }

    @keyframes clock-tick {
      0%, 100% { transform: rotate(0deg); }
      50% { transform: rotate(4deg); }
    }

    #ep-track-list {
      display: flex;
      gap: 12px;
      overflow-x: auto;
      scroll-snap-type: x mandatory;
      -webkit-overflow-scrolling: touch;
      padding-bottom: 8px;
      margin-bottom: 8px;
      overscroll-behavior-x: contain;
    }

    #ep-track-list .carousel-item {
      scroll-snap-align: start;
      flex: 0 0 auto;
    }
    
    .carousel.dragging {
      scroll-behavior: auto;
      cursor: grabbing;
    }
    
    .carousel::-webkit-scrollbar {
      display: none;
    }
    
    .carousel-item {
      scroll-snap-align: start;
      flex-shrink: 0;
    }
    
    /* ===== PREMIUM ARTIST VERIFICATION BADGE ===== */
    .verified-badge {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 18px;
      height: 18px;
      border-radius: 50%;
      background: linear-gradient(135deg, #0a84ff 0%, #0066dd 50%, #0052cc 100%);
      box-shadow: 
        0 0 12px rgba(10, 132, 255, 0.8),
        0 0 24px rgba(10, 132, 255, 0.4),
        inset 0 1px 2px rgba(255, 255, 255, 0.3),
        0 4px 12px rgba(0, 52, 204, 0.3);
      color: #ffffff;
      font-size: 11px;
      font-weight: 800;
      margin-left: 6px;
      vertical-align: middle;
      animation: pulse-verify 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
      flex-shrink: 0;
      position: relative;
      border: 0.5px solid rgba(255, 255, 255, 0.4);
    }
    
    .verified-badge::before {
      content: '✓';
      display: flex;
      align-items: center;
      justify-content: center;
      width: 100%;
      height: 100%;
      text-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
      font-size: 12px;
      letter-spacing: -0.4px;
    }
    
    @keyframes pulse-verify {
      0%, 100% {
        box-shadow: 
          0 0 12px rgba(10, 132, 255, 0.8),
          0 0 24px rgba(10, 132, 255, 0.4),
          inset 0 1px 2px rgba(255, 255, 255, 0.3),
          0 4px 12px rgba(0, 52, 204, 0.3);
      }
      50% {
        box-shadow: 
          0 0 20px rgba(10, 132, 255, 1),
          0 0 40px rgba(10, 132, 255, 0.6),
          inset 0 1px 2px rgba(255, 255, 255, 0.4),
          0 6px 16px rgba(0, 52, 204, 0.5);
      }
    }
    
    html.dark .verified-badge {
      background: linear-gradient(135deg, #0a84ff 0%, #0066dd 50%, #0052cc 100%);
      box-shadow: 
        0 0 16px rgba(10, 132, 255, 0.9),
        0 0 32px rgba(10, 132, 255, 0.5),
        inset 0 1px 2px rgba(255, 255, 255, 0.35),
        0 4px 16px rgba(0, 52, 204, 0.4);
    }
    
    /* Premium Liquid Glass Scroll Badges */
    .carousel-nav-badge {
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      width: 56px;
      height: 56px;
      border-radius: 16px;
      background: rgba(30, 30, 35, 0.35);
      backdrop-filter: blur(12px) saturate(150%); /* 🎯 PHASE 3: Reduced from blur(80px) for performance */
      -webkit-backdrop-filter: blur(12px) saturate(150%);
      border: 1.5px solid rgba(255, 255, 255, 0.3);
      box-shadow: 
        inset 0 0 40px rgba(255, 255, 255, 0.25),
        0 16px 50px rgba(0, 0, 0, 0.4),
        0 0 80px rgba(0, 113, 227, 0.2),
        0 0 100px rgba(255, 255, 255, 0.08);
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      color: #ffffff;
      transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
      z-index: 100;
      font-size: 0;
      overflow: hidden;
      backdrop-filter: blur(80px) saturate(250%) brightness(1.15);
      opacity: 1;
      pointer-events: auto;
    }
    
    .carousel-nav-badge:hover:not(:disabled) {
      background: rgba(30, 30, 35, 0.5);
      box-shadow: 
        inset 0 0 50px rgba(255, 255, 255, 0.35),
        0 20px 60px rgba(0, 113, 227, 0.4),
        0 0 100px rgba(0, 113, 227, 0.3),
        0 0 120px rgba(255, 255, 255, 0.12);
      border-color: rgba(10, 132, 255, 0.7);
      transform: translateY(-50%) scale(1.1);
    }
    
    .carousel-nav-badge:active:not(:disabled) {
      transform: translateY(-50%) scale(0.93);
    }
    
    .carousel-nav-badge:disabled {
      opacity: 0.5 !important;
      pointer-events: none;
    }
    
    .carousel-container:hover .carousel-nav-badge:not(:disabled),
    .carousel-wrapper:hover .carousel-nav-badge:not(:disabled),
    .carousel:hover ~ .carousel-nav-badge:not(:disabled) {
      opacity: 1;
      pointer-events: auto;
    }
    
    .carousel-nav-badge span {
      font-size: 26px;
      text-shadow: 
        0 0 12px rgba(10, 132, 255, 0.6),
        0 0 24px rgba(10, 132, 255, 0.3);
      filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.25));
    }
    
    .carousel-nav-left {
      left: 8px;
    }
    
    .carousel-nav-right {
      right: 8px;
    }
    
    @media (max-width: 768px) {
      .carousel-container {
        padding: 0 2px;
      }
      
      .carousel-wrapper {
        padding: 0;
      }
      
      .carousel {
        scroll-padding: 0 20px;
        margin: 0;
      }
      
      .carousel-nav-badge {
        width: 48px;
        height: 48px;
        border-radius: 12px;
      }
      
      .carousel-nav-badge span {
        font-size: 22px;
      }
      
      .carousel-nav-left {
        left: 4px;
      }
      
      .carousel-nav-right {
        right: 4px;
      }
      
      /* Hide volume controls on mobile */
      .volume-btn-mobile {
        display: none !important;
      }
      
      /* Hide shuffle and volume controls on mobile/tablet */
      .shuffle-btn-desktop,
      .volume-controls-desktop {
        display: none !important;
      }
    }
    
    /* Floating Player */
    /* Footer Player with Waveforms - ALWAYS VISIBLE */
    
    .floating-player-btn {
      width: 40px;
      height: 40px;
      border-radius: 50%;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      background: var(--glass-bg);
      border: 1px solid var(--glass-border);
      color: var(--text-primary);
      box-shadow: 0 16px 36px rgba(0, 0, 0, 0.16);
      transition: all 0.2s ease;
    }

    .dark .floating-player-btn {
      background: rgba(255, 255, 255, 0.08);
      border-color: rgba(255, 255, 255, 0.18);
      color: #f5f5f7;
      box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
    }

    .floating-player-btn:hover {
      background: linear-gradient(135deg, rgba(0, 113, 227, 0.25), rgba(0, 113, 227, 0.15));
      border-color: rgba(0, 113, 227, 0.6);
      transform: translateY(-3px) scale(1.1);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 12px 24px rgba(0, 113, 227, 0.25);
    }
    
    .floating-player-btn:active {
      transform: translateY(-1px) scale(0.97);
    }
    
    .floating-player-btn.liked {
      color: #ff2d55;
      background: linear-gradient(135deg, rgba(255, 45, 85, 0.15), rgba(255, 45, 85, 0.08));
      border-color: rgba(255, 45, 85, 0.3);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 4px 12px rgba(255, 45, 85, 0.15);
    }
    
    .floating-player-btn.liked:hover {
      background: linear-gradient(135deg, rgba(255, 45, 85, 0.25), rgba(255, 45, 85, 0.15));
      border-color: rgba(255, 45, 85, 0.6);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 12px 24px rgba(255, 45, 85, 0.25);
    }
    
    .dark .floating-player-btn {
      background: linear-gradient(135deg, rgba(10, 132, 255, 0.18), rgba(10, 132, 255, 0.08));
      border-color: rgba(10, 132, 255, 0.35);
      color: #0a84ff;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 4px 12px rgba(10, 132, 255, 0.12);
    }

    .player-bubble {
      position: fixed;
      bottom: calc(var(--floating-footer-h) + var(--safe-bottom) + 18px);
      right: 20px;
      width: 54px;
      height: 54px;
      border-radius: 50%;
      background: rgba(255, 255, 255, 0.08);
      border: 1px solid rgba(255, 255, 255, 0.16);
      backdrop-filter: blur(18px);
      -webkit-backdrop-filter: blur(18px);
      box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      z-index: 1000;
      transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
      overflow: visible;
    }

    .player-bubble::before {
      content: '';
      position: absolute;
      inset: -4px;
      border-radius: 50%;
      background: linear-gradient(135deg, rgba(99, 102, 241, 0.9), rgba(14, 165, 233, 0.75), rgba(168, 85, 247, 0.9));
      filter: blur(16px);
      opacity: 0.65;
      transition: opacity 0.3s ease;
      z-index: -1;
    }

    .player-bubble:hover {
      transform: translateY(-2px) scale(1.04);
    }

    .player-bubble.playing {
      border-color: rgba(59, 130, 246, 0.45);
      box-shadow: 0 0 22px rgba(59, 130, 246, 0.18), 0 0 40px rgba(168, 85, 247, 0.14);
    }

    .player-bubble.playing::before {
      animation: pulseNeon 3s ease-in-out infinite;
      opacity: 0.95;
    }

    .player-bubble-icon {
      font-size: 28px;
      color: var(--text-primary);
    }

    @keyframes pulseNeon {
      0%, 100% {
        transform: scale(0.96);
        opacity: 0.75;
      }
      50% {
        transform: scale(1);
        opacity: 1;
      }
    }

    /* Floating Footer Nav Container - ALWAYS VISIBLE for authenticated users */
    .floating-footer-nav-container {
      position: fixed;
      bottom: 0;
      left: 0;
      right: 0;
      z-index: 900;
      background: transparent;
      backdrop-filter: none;
      -webkit-backdrop-filter: none;
      border-top: none;
      box-shadow: none;
      display: flex;
      align-items: center;
      justify-content: center;
      width: 100%;
      height: auto;
      min-height: 0;
      padding: 0 10px max(12px, calc(12px + var(--safe-bottom)));
      pointer-events: none;
    }

    @media (max-width: 768px) {
      .floating-footer-nav-container {
        padding: 0 10px calc(12px + var(--safe-bottom));
      }
    }

    @media (max-width: 480px) {
      .floating-footer-nav-container {
        padding: 0 10px calc(12px + var(--safe-bottom));
      }
    }

    .floating-footer-nav-container.hidden {
      display: none !important;
    }

    body.track-detail-modal-open #floating-footer-nav-container {
      display: none !important;
    }

    .floating-footer-nav {
      position: relative;
      width: min(calc(100vw - 20px), 520px);
      height: auto;
      background: transparent;
      display: flex;
      align-items: flex-end;
      justify-content: space-between;
      padding: 0;
      gap: 8px;
      pointer-events: all;
      margin: 0 auto;
      flex-wrap: nowrap;
    }

    .floating-footer-btn {
      flex: none;
      display: inline-flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 0;
      background: rgba(255, 255, 255, 0.08);
      border: 1px solid rgba(255, 255, 255, 0.14);
      border-radius: 50%;
      color: var(--text-secondary);
      cursor: pointer;
      transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
      font-size: 10px;
      font-weight: 600;
      padding: 12px;
      width: 52px;
      min-height: 52px;
      max-width: 52px;
      position: relative;
      overflow: hidden;
      box-shadow: 0 20px 50px rgba(0, 0, 0, 0.16);
      backdrop-filter: blur(16px);
      -webkit-backdrop-filter: blur(16px);
    }

    .floating-footer-btn::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(255, 255, 255, 0.05);
      opacity: 0;
      transition: opacity 0.2s ease;
      border-radius: 50%;
    }

    .floating-footer-btn:hover {
      background: rgba(255, 255, 255, 0.14);
      color: var(--text-primary);
      transform: translateY(-2px);
      border-color: rgba(255, 255, 255, 0.22);
    }

    .floating-footer-btn:active {
      transform: scale(0.96);
    }

    .floating-footer-btn.active {
      background: linear-gradient(135deg, rgba(0, 113, 227, 0.2), rgba(0, 113, 227, 0.12));
      color: var(--accent);
      border-color: rgba(0, 113, 227, 0.38);
      box-shadow: 0 22px 64px rgba(0, 113, 227, 0.18);
      transform: translateY(-3px);
    }

    .floating-footer-btn span.material-symbols-rounded {
      font-size: 24px;
      line-height: 1;
      transition: transform 0.2s ease;
    }

    .floating-footer-btn.is-loading {
      cursor: wait;
      pointer-events: none;
    }

    .floating-footer-btn.is-loading span.material-symbols-rounded {
      opacity: 0;
      transform: scale(0.7);
    }

    .floating-footer-btn.is-loading::after {
      content: '';
      position: absolute;
      width: 20px;
      height: 20px;
      border: 2px solid rgba(255, 255, 255, 0.28);
      border-top-color: currentColor;
      border-radius: 50%;
      animation: floatingFooterSpin 0.7s linear infinite;
    }

    @keyframes floatingFooterSpin {
      to { transform: rotate(360deg); }
    }

    .floating-footer-btn:hover span.material-symbols-rounded {
      transform: scale(1.1);
    }

    .floating-footer-btn span:not(.material-symbols-rounded) {
      display: none;
    }
    
    .floating-footer-nav-container.hidden {
      display: none !important;
    }
    
    .dark .floating-footer-nav-container {
      background: transparent;
      border-top: none;
      box-shadow: none;
    }
    
    /* Native-like Footer Nav - Part of unified block */
    .floating-footer-nav {
      position: relative;
      width: 100%;
      height: 100%;
      background: transparent;
      display: flex;
      align-items: center;
      justify-content: space-around;
      padding: 0;
      gap: 4px;
    }
    
    .floating-footer-btn {
      flex: 1;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 4px;
      background: rgba(255, 255, 255, 0.05);
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: 14px;
      color: var(--text-secondary);
      cursor: pointer;
      transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
      font-size: 10px;
      font-weight: 600;
      padding: 10px 4px;
      min-height: 60px;
      white-space: nowrap;
      position: relative;
      overflow: hidden;
    }
    
    .floating-footer-btn::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(0, 113, 227, 0.1);
      opacity: 0;
      transition: opacity 0.2s ease;
    }
    
    .floating-footer-btn:hover {
      background: rgba(255, 255, 255, 0.08);
      color: var(--text-primary);
      transform: translateY(-1px);
      border-color: rgba(255, 255, 255, 0.12);
    }
    
    .floating-footer-btn:active {
      transform: scale(0.96);
    }
    
    .floating-footer-btn.active {
      background: linear-gradient(135deg, rgba(0, 113, 227, 0.2), rgba(0, 113, 227, 0.1));
      color: var(--accent);
      border-color: var(--accent);
      box-shadow: 0 4px 16px rgba(0, 113, 227, 0.2), inset 0 1px 2px rgba(255, 255, 255, 0.1);
    }
    
    .floating-footer-btn span.material-symbols-rounded {
      font-size: 24px;
      line-height: 1;
      transition: transform 0.2s ease;
    }
    
    .floating-footer-btn:hover span.material-symbols-rounded {
      transform: scale(1.15);
    }
    
    .floating-footer-btn span:not(.material-symbols-rounded) {
      font-size: 10px;
      line-height: 1;
      letter-spacing: 0.2px;
    }
    
    @media (max-width: 768px) {
      .floating-footer-btn {
        gap: 3px;
        font-size: 9px;
        min-height: 60px;
        padding: 9px 3px;
      }
      
      .floating-footer-btn span.material-symbols-rounded {
        font-size: 22px;
      }
      
      .floating-footer-btn span:not(.material-symbols-rounded) {
        font-size: 9px;
      }
    }
    
    @media (max-width: 480px) {
      .floating-footer-btn {
        gap: 3px;
        font-size: 9px;
        min-height: 60px;
        padding: 9px 3px;
      }
      
      .floating-footer-btn span.material-symbols-rounded {
        font-size: 22px;
      }
      
      .floating-footer-btn span:not(.material-symbols-rounded) {
        font-size: 8px;
      }
    }
    
    
    .dark #floating极-nav-container {
      background: transparent;
      border-top: none;
      box-shadow: none;
    }

    .dark .floating-footer-nav {
      background: transparent;
      border-top: none;
      box-shadow: none;
    }
    
    /* Modal Overlay Styles */
    .modal-overlay {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: var(--modal-overlay-bg, rgba(0, 0, 0, 0.93));
      backdrop-filter: blur(8px);
      contain: layout style paint; /* 🎯 PHASE 3: CSS containment for modal performance */
      -webkit-backdrop-filter: blur(8px);
      z-index: 1100;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      padding: 20px;
      box-sizing: border-box;
      animation: fadeIn 0.3s ease-out;
    }

    @media (max-width: 900px) {
      .modal-overlay {
        align-items: stretch;
        justify-content: flex-start;
        padding: env(safe-area-inset-top, 20px) 20px calc(20px + var(--floating-footer-h));
      }
    }
    
    @keyframes fadeIn {
      from {
        opacity: 0;
        backdrop-filter: blur(0px);
      }
      to {
        opacity: 1;
        backdrop-filter: blur(10px);
      }
    }
    
    @keyframes fadeOut {
      from {
        opacity: 1;
        backdrop-filter: blur(10px);
      }
      to {
        opacity: 0;
        backdrop-filter: blur(0px);
      }
    }
    
    .modal-overlay-content {
      flex: 1;
      overflow-y: auto;
      padding: 20px;
      margin: 0 auto 30px;
      background: var(--surface, rgba(10, 10, 15, 0.92));
      width: 100%;
      max-width: 100%;
      box-sizing: border-box;
      word-break: break-word;
      overflow-wrap: anywhere;
    }
    
    .modal-overlay-content::-webkit-scrollbar {
      width: 6px;
    }
    
    .modal-overlay-content::-webkit-scrollbar-track {
      background: transparent;
    }
    
    .modal-overlay-content::-webkit-scrollbar-thumb {
      background: rgba(0, 113, 227, 0.5);
      border-radius: 3px;
    }
    
    .modal-overlay-content::-webkit-scrollbar-thumb:hover {
      background: rgba(0, 113, 227, 0.8);
    }

    /* Country Modal Styles */
    .country-modal-item {
      display: flex;
      align-items: center;
      gap: 16px;
      padding: 12px;
      border-radius: 12px;
      background: var(--glass-bg);
      border: 1px solid var(--glass-border);
      margin-bottom: 8px;
      cursor: pointer;
      transition: all 0.2s ease;
    }

    .country-modal-item:hover {
      background: rgba(255, 255, 255, 0.05);
      transform: translateY(-1px);
    }

    .country-modal-rank {
      font-size: 14px;
      font-weight: bold;
      color: var(--accent);
      min-width: 30px;
      text-align: center;
    }

    .country-modal-info {
      flex: 1;
      min-width: 0;
    }

    .country-modal-name {
      font-size: 16px;
      font-weight: 600;
      color: var(--text-primary);
      margin-bottom: 2px;
      white-space: normal;
      overflow: hidden;
      text-overflow: ellipsis;
      word-break: break-word;
      overflow-wrap: anywhere;
    }

    .country-modal-stats {
      font-size: 12px;
      color: var(--text-secondary);
      white-space: normal;
      overflow: hidden;
      text-overflow: ellipsis;
      word-break: break-word;
      overflow-wrap: anywhere;
    }

    .floating-footer-btn {
      flex: none;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      background: rgba(255, 255, 255, 0.08);
      border: 1px solid rgba(255, 255, 255, 0.16);
      cursor: pointer;
      color: var(--text-secondary);
      padding: 14px;
      border-radius: 50%;
      transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
      position: relative;
      text-decoration: none;
      width: 52px;
      min-height: 52px;
      max-width: 52px;
      box-shadow: 0 18px 52px rgba(0, 0, 0, 0.16);
      backdrop-filter: blur(16px);
      -webkit-backdrop-filter: blur(16px);
    }

    .floating-footer-btn:hover {
      color: var(--text-primary);
      background: rgba(255, 255, 255, 0.14);
      transform: translateY(-2px);
      border-color: rgba(255, 255, 255, 0.22);
    }

    .floating-footer-btn:active {
      transform: scale(0.96);
    }

    .floating-footer-btn.active {
      background: linear-gradient(135deg, rgba(0, 113, 227, 0.18), rgba(0, 113, 227, 0.10));
      color: var(--accent);
      border-color: rgba(0, 113, 227, 0.36);
      box-shadow: 0 22px 60px rgba(0, 113, 227, 0.18);
      transform: translateY(-3px);
    }

    .floating-footer-btn.active::before {
      display: none;
    }

    .floating-footer-btn span.material-symbols-rounded {
      font-size: 22px;
      line-height: 1;
      display: block;
    }

    .floating-footer-item {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 8px;
      width: 52px;
      flex-shrink: 0;
    }

    .floating-footer-label {
      display: block;
      width: 52px;
      text-align: center;
      font-size: 10px;
      font-weight: 700;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: var(--text-secondary);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      line-height: 1.2;
    }

    /* Product modal responsive layout for mobile */
    .product-header-responsive {
      flex-direction: column !important;
    }

    @media (min-width: 768px) {
      .product-header-responsive {
        flex-direction: row !important;
      }

      .product-header-responsive .product-cover {
        width: 280px !important;
        margin: 0 !important;
      }
    }

    @media (max-width: 640px) {
      .modal-overlay {
        padding: 10px !important;
      }

      .product-features {
        grid-template-columns: 1fr !important;
      }
    }

    /* Premium close button styling */
    .premium-close-btn:hover {
      background: rgba(255,255,255,0.15) !important;
      border-color: rgba(255,255,255,0.3) !important;
      transform: scale(1.1);
    }
    
    .floating-footer-btn:hover {
      color: var(--text-primary);
      background: rgba(255, 255, 255, 0.14);
      border-color: rgba(255, 255, 255, 0.22);
      transform: translateY(-2px);
    }
    
    .floating-footer-btn:active {
      transform: scale(0.96);
    }

    .floating-footer-btn.active {
      background: linear-gradient(135deg, rgba(0, 113, 227, 0.18), rgba(0, 113, 227, 0.10));
      color: var(--accent);
      border-color: rgba(0, 113, 227, 0.36);
      box-shadow: 0 22px 60px rgba(0, 113, 227, 0.18);
      transform: translateY(-3px);
    }

    .floating-footer-btn.active::before {
      display: none;
    }

    .floating-footer-btn span.material-symbols-rounded {
      font-size: 22px;
      line-height: 1;
      display: block;
    }
    
    .dark .floating-footer-btn:hover {
      background: rgba(255, 255, 255, 0.14);
      border-color: rgba(255, 255, 255, 0.22);
    }
    
    .dark .floating-footer-btn.active {
      background: linear-gradient(135deg, rgba(0, 113, 227, 0.18), rgba(0, 113, 227, 0.10));
      border-color: rgba(0, 113, 227, 0.36);
      box-shadow: 0 22px 60px rgba(0, 113, 227, 0.18);
    }
    
    /* Playlist Modal - align behavior with other overlays (player, track detail) */
    .playlist-modal-overlay {
      position: fixed;
      inset: 0;
      z-index: 100010;
      background: rgba(0, 0, 0, 0.5);
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
      contain: layout style paint;
    }

    .playlist-modal-overlay.active {
      opacity: 1;
      pointer-events: auto;
    }

    /* Child modals opened from the track player must own the top stacking layer. */
    .playlist-modal-overlay.active {
      z-index: 300010 !important;
    }

    .playlist-detail-modal-overlay.active {
      z-index: 300020 !important;
    }

    .create-playlist-modal-overlay.active {
      z-index: 300030 !important;
    }

    .playlist-modal-scroll {
      position: absolute;
      inset: 0;
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
      touch-action: pan-y;
      padding: 0;
      box-sizing: border-box;
    }
    
    .playlist-modal {
      position: fixed;
      left: 0;
      top: 0;
      bottom: 0;
      width: min(90vw, 500px);
      background: linear-gradient(180deg, var(--surface-primary), var(--surface-secondary));
      border-right: 1px solid rgba(255, 255, 255, 0.08);
      box-shadow: 24px 0 60px rgba(0, 0, 0, 0.4);
      display: flex;
      flex-direction: column;
      overflow: hidden;
      margin: 0;
      border-radius: 0;
      box-sizing: border-box;
      transform: translateX(-102%);
      transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

    .playlist-modal-overlay.active .playlist-modal {
      transform: translateX(0);
    }

    .playlist-modal-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: calc(18px + env(safe-area-inset-top, 0px)) 16px 18px;
      border-bottom: 1px solid rgba(255, 255, 255, 0.08);
      background: linear-gradient(135deg, rgba(10, 132, 255, 0.1), rgba(255, 215, 0, 0.05));
      flex-shrink: 0;
      position: sticky;
      top: 0;
      z-index: 12;
    }

    .playlist-modal-title {
      margin: 0;
      font-size: 18px;
      font-weight: 700;
      color: var(--text-primary);
      letter-spacing: -0.5px;
    }

    .playlist-modal-close {
      flex-shrink: 0;
      width: 44px;
      height: 44px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border-radius: 12px;
      border: 1px solid rgba(255, 255, 255, 0.15);
      background: rgba(255, 255, 255, 0.08);
      color: var(--text-primary);
      cursor: pointer;
      transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
      margin-top: max(0px, env(safe-area-inset-top, 0px));
    }

    .playlist-modal-close:hover {
      transform: translateY(-1px);
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
      background: rgba(255, 255, 255, 0.12);
    }

    .playlist-modal-body {
      width: 100%;
      margin: 0;
      padding: 16px;
      box-sizing: border-box;
      overflow-y: auto;
      flex: 1;
    }

    .playlist-create-cta {
      width: 100%;
      border: none;
      border-radius: 18px;
      padding: 18px 20px;
      margin-bottom: 20px;
      background: linear-gradient(135deg, #0a84ff, #34c759);
      color: #fff;
      font-weight: 700;
      letter-spacing: -0.2px;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 12px;
      cursor: pointer;
      box-shadow: 0 12px 30px rgba(18, 138, 255, 0.28);
      transition: transform 0.25s ease, box-shadow 0.25s ease;
    }

    .playlist-create-cta:hover {
      transform: translateY(-1px);
      box-shadow: 0 18px 36px rgba(18, 138, 255, 0.32);
    }

    .playlist-create-cta .material-symbols-rounded {
      font-size: 28px;
      line-height: 1;
    }

    .premium-playlist-bottomsheet-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.6);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      z-index: 121;
      display: none;
      align-items: flex-end;
      justify-content: center;
      overflow: hidden;
      transition: opacity 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

    .premium-playlist-bottomsheet {
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
      touch-action: pan-y;
      position: fixed;
      bottom: 0;
      left: 0;
      right: 0;
      max-height: 95vh;
      height: auto;
      width: 100%;
      background: var(--glass-bg);
      backdrop-filter: blur(50px) saturate(200%);
      -webkit-backdrop-filter: blur(50px) saturate(200%);
      border: 1px solid var(--glass-border);
      border-bottom: none;
      border-radius: 32px 32px 0 0;
      display: flex;
      flex-direction: column;
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
      animation: slideUpPlayer 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
      z-index: 116;
    }

    .premium-playlist-bottomsheet-header {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 24px;
      padding: 32px 24px 20px;
      border-bottom: 1px solid rgba(255, 255, 255, 0.12);
      flex-shrink: 0;
    }

    .premium-playlist-bottomsheet-title {
      font-size: 24px;
      font-weight: 700;
      color: #ffffff;
      margin: 0;
      line-height: 1.2;
    }

    .premium-playlist-bottomsheet-subtitle {
      color: var(--text-secondary);
      font-size: 14px;
      margin: 8px 0 0;
      line-height: 1.5;
    }

    .premium-bottomsheet-body {
      padding: 24px;
      overflow-y: auto;
      flex: 1;
    }

    .premium-bottomsheet-section {
      margin-bottom: 24px;
    }

    .premium-bottomsheet-section h3 {
      margin: 0 0 14px;
      color: #f8fafc;
      font-size: 16px;
      font-weight: 700;
    }

    .radio-frequency-band {
      padding: 22px;
      border-radius: 28px;
      background: rgba(255, 255, 255, 0.04);
      border: 1px solid rgba(255, 255, 255, 0.08);
      margin-top: 16px;
    }

    .radio-frequency-band p {
      margin: 0;
    }

    .radio-frequency-band .radio-frequency-label {
      color: #8cb3ff;
      font-size: 12px;
      letter-spacing: 0.16em;
      text-transform: uppercase;
    }

    .radio-frequency-band .radio-frequency-value {
      color: #ffffff;
      font-size: 28px;
      font-weight: 700;
      margin: 8px 0 0;
    }

    .radio-frequency-track {
      position: relative;
      height: 14px;
      border-radius: 999px;
      background: rgba(255, 255, 255, 0.08);
      overflow: hidden;
      margin: 18px 0 10px;
    }

    .radio-frequency-track::before {
      content: '';
      position: absolute;
      inset: 0;
      background: linear-gradient(90deg, rgba(79, 140, 255, 0.9), rgba(72, 224, 255, 0.4));
      opacity: 0.7;
    }

    .radio-frequency-thumb {
      position: absolute;
      left: 44%;
      top: 50%;
      transform: translate(-50%, -50%);
      width: 18px;
      height: 18px;
      border-radius: 50%;
      background: #ffffff;
      box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.08);
      border: 2px solid rgba(255, 255, 255, 0.55);
    }

    .radio-band-values {
      display: grid;
      grid-template-columns: repeat(5, minmax(0, 1fr));
      gap: 10px;
      color: rgba(255, 255, 255, 0.65);
      font-size: 12px;
    }

    .radio-waveform {
      padding: 22px;
      border-radius: 28px;
      background: rgba(255, 255, 255, 0.04);
      border: 1px solid rgba(255, 255, 255, 0.08);
      margin-top: 18px;
    }

    .radio-waveform-bars {
      display: flex;
      align-items: flex-end;
      gap: 8px;
      height: 76px;
    }

    .radio-waveform-bar {
      width: 8px;
      border-radius: 999px;
      background: linear-gradient(180deg, rgba(79, 140, 255, 0.95), rgba(255, 255, 255, 0.25));
      opacity: 0.9;
    }

    .radio-waveform-stats {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      color: rgba(255, 255, 255, 0.7);
      font-size: 12px;
      margin-top: 16px;
    }

    .radio-stations-list {
      max-height: 38vh;
      overflow-y: auto;
      display: grid;
      gap: 14px;
      scroll-snap-type: y proximity;
      padding-right: 6px;
    }

    .radio-stations-list::-webkit-scrollbar {
      width: 6px;
    }

    .radio-stations-list::-webkit-scrollbar-thumb {
      background: rgba(255, 255, 255, 0.16);
      border-radius: 999px;
    }

    .radio-station-card {
      scroll-snap-align: start;
      display: grid;
      grid-template-columns: auto 1fr auto;
      gap: 14px;
      align-items: center;
      padding: 18px;
      border-radius: 24px;
      background: rgba(255, 255, 255, 0.04);
      border: 1px solid rgba(255, 255, 255, 0.08);
      transition: transform 0.25s ease, background 0.25s ease;
      cursor: pointer;
    }

    .radio-station-card:hover {
      transform: translateY(-2px);
      background: rgba(255, 255, 255, 0.08);
    }

    .radio-card-premium {
      position: relative;
      transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
      will-change: transform, box-shadow;
      border-radius: 16px;
      padding: 20px 16px;
      background: rgba(255, 255, 255, 0.03);
      border: 1px solid rgba(255, 255, 255, 0.10);
      cursor: pointer;
    }

    .radio-card-premium:hover {
      box-shadow: 0 0 30px var(--glow-primary), 0 12px 40px rgba(0, 0, 0, 0.2);
      transform: translate3d(0, -8px, 0) scale(1.02);
    }

    .radio-station-badge {
      width: 48px;
      height: 48px;
      border-radius: 16px;
      display: grid;
      place-items: center;
      background: rgba(255, 255, 255, 0.08);
      color: #ffffff;
      font-weight: 700;
      font-size: 14px;
    }

    .radio-station-info {
      display: flex;
      flex-direction: column;
      gap: 4px;
    }

    .radio-station-name {
      color: #ffffff;
      font-size: 15px;
      font-weight: 700;
      margin: 0;
    }

    .radio-station-meta {
      color: rgba(255, 255, 255, 0.65);
      font-size: 12px;
      margin: 0;
    }

    .radio-station-action {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 40px;
      height: 40px;
      border-radius: 14px;
      background: rgba(79, 140, 255, 0.16);
      color: #61d4ff;
      font-size: 20px;
    }

    .premium-bottomsheet-playlist-meta {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      margin-bottom: 16px;
    }

    .premium-bottomsheet-chip {
      padding: 8px 12px;
      border-radius: 999px;
      background: rgba(255, 255, 255, 0.06);
      border: 1px solid rgba(255, 255, 255, 0.08);
      color: #d0d7e5;
      font-size: 12px;
      display: inline-flex;
      align-items: center;
      gap: 6px;
    }

    .premium-bottomsheet-track-card,
    .premium-bottomsheet-artist-card {
      display: grid;
      grid-template-columns: auto 1fr auto;
      gap: 14px;
      align-items: center;
      padding: 14px;
      border-radius: 18px;
      background: rgba(255, 255, 255, 0.04);
      border: 1px solid rgba(255, 255, 255, 0.05);
      transition: transform 0.25s ease, background 0.25s ease;
      cursor: pointer;
    }

    .premium-bottomsheet-track-card:hover,
    .premium-bottomsheet-artist-card:hover {
      transform: translateY(-2px);
      background: rgba(255, 255, 255, 0.08);
    }

    .premium-bottomsheet-track-card .track-cover,
    .premium-bottomsheet-artist-card .artist-avatar {
      width: 54px;
      height: 54px;
      border-radius: 16px;
      background: rgba(255, 255, 255, 0.08);
      display: grid;
      place-items: center;
      color: rgba(255, 255, 255, 0.8);
      font-size: 22px;
    }

    .premium-bottomsheet-artist-card .artist-info {
      display: flex;
      flex-direction: column;
      gap: 4px;
    }

    .premium-bottomsheet-artist-card .artist-name {
      color: #ffffff;
      font-weight: 600;
      font-size: 14px;
      margin: 0;
    }

    .premium-bottomsheet-artist-card .artist-genres {
      color: #92a0b5;
      font-size: 12px;
      margin: 0;
    }

    .premium-bottomsheet-action-option {
      display: flex;
      align-items: center;
      gap: 16px;
      padding: 16px 18px;
      border-radius: 18px;
      background: rgba(255, 255, 255, 0.06);
      border: 1px solid rgba(255, 255, 255, 0.08);
      color: #ffffff;
      cursor: pointer;
      transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
      margin-bottom: 12px;
    }

    .premium-bottomsheet-action-option:hover {
      background: rgba(255, 255, 255, 0.12);
      border-color: rgba(255, 255, 255, 0.14);
      transform: translateY(-2px);
    }

    .premium-bottomsheet-action-icon {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 44px;
      height: 44px;
      border-radius: 16px;
      background: rgba(10, 132, 255, 0.15);
      color: #0a84ff;
      flex-shrink: 0;
    }

    .premium-bottomsheet-action-option:hover .premium-bottomsheet-action-icon {
      background: rgba(10, 132, 255, 0.25);
    }

    .premium-bottomsheet-close-btn {

      position: fixed;
      top: 12px;
      left: 12px;
      width: 44px;
      height: 44px;
      border-radius: 50%;
      background: rgba(0, 0, 0, 0.08);
      border: 1px solid rgba(255, 255, 255, 0.12);
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--text-secondary);
      z-index: 2001;
      transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
      flex-shrink: 0;
    }

    .premium-bottomsheet-close-btn:hover {
      background: rgba(0, 113, 227, 0.15);
      border-color: var(--accent);
      color: var(--accent);
      transform: scale(1.1) rotate(-90deg);
    }
    
    .premium-bottomsheet-close-btn .material-symbols-rounded {
      font-size: 24px;
    }
    
    .playlist-modal-header {
      padding: 20px;
      border-bottom: 1px solid var(--glass-border);
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
    }
    
    .playlist-modal-title {
      font-size: 16px;
      font-weight: 600;
      color: var(--text-primary);
      margin: 0;
    }
    
    .playlist-modal-close {
      width: 36px;
      height: 36px;
      border-radius: 50%;
      background: transparent;
      border: none;
      cursor: pointer;
      color: var(--text-primary);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 24px;
      transition: all 0.3s;
    }
    
    .playlist-modal-close:hover {
      background: rgba(0, 113, 227, 0.1);
      color: var(--accent);
    }
    
    .playlist-modal-content {
      padding: 16px;
    }
    
    .playlist-item {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 12px;
      border-radius: 8px;
      background: rgba(255, 255, 255, 0.04);
      border: 1px solid var(--glass-border);
      margin-bottom: 8px;
      cursor: pointer;
      transition: all 0.3s;
    }
    
    .playlist-item:hover {
      background: rgba(0, 113, 227, 0.1);
      border-color: var(--accent);
    }
    
    .playlist-item-info {
      flex: 1;
    }
    
    .playlist-item-name {
      font-size: 14px;
      font-weight: 500;
      color: var(--text-primary);
      margin: 0;
    }
    
    .playlist-item-count {
      font-size: 12px;
      color: var(--text-secondary);
      margin: 4px 0 0 0;
    }
    
    .playlist-add-btn {
      padding: 8px 12px;
      border-radius: 6px;
      background: rgba(0, 113, 227, 0.2);
      border: 1px solid var(--accent);
      color: var(--accent);
      cursor: pointer;
      font-size: 12px;
      font-weight: 500;
      transition: all 0.3s;
    }
    
    .playlist-add-btn:hover {
      background: var(--accent);
      color: white;
    }
    
    .playlist-create-btn {
      width: 100%;
      padding: 12px;
      border-radius: 8px;
      background: rgba(0, 113, 227, 0.15);
      border: 1px dashed var(--accent);
      color: var(--accent);
      cursor: pointer;
      font-size: 14px;
      font-weight: 500;
      transition: all 0.3s;
      margin-bottom: 12px;
    }

    .playlist-detail-controls {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      flex-wrap: nowrap;
      margin-bottom: 40px;
    }

    .playlist-detail-control-btn {
      width: 46px;
      height: 46px;
      min-width: 46px;
      min-height: 46px;
      padding: 0;
      border-radius: 50%;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      flex: 0 0 46px;
      color: #fff;
      cursor: pointer;
      box-sizing: border-box;
    }

    .playlist-detail-control-btn.is-primary {
      width: 54px;
      height: 54px;
      min-width: 54px;
      min-height: 54px;
      flex-basis: 54px;
      background: linear-gradient(135deg, #0a84ff, #34c759);
      border: none;
    }

    .playlist-detail-control-btn:not(.is-primary) {
      background: rgba(255,255,255,0.1);
      border: 1px solid rgba(255,255,255,0.2);
    }

    .playlist-detail-control-btn .material-symbols-rounded {
      font-size: 22px;
    }

    .playlist-detail-control-btn.is-primary .material-symbols-rounded {
      font-size: 26px;
    }

    .playlist-track-item.playlist-track-playing {
      background: linear-gradient(135deg, rgba(10,132,255,0.22), rgba(52,199,89,0.12)) !important;
      border-color: rgba(10,132,255,0.45) !important;
      box-shadow: 0 0 20px rgba(10,132,255,0.12);
    }

    .playlist-track-item.is-current {
      box-shadow: inset 3px 0 0 #0a84ff, 0 0 0 1px rgba(10,132,255,0.18);
    }

    .playlist-detail-track-card {
      background: rgba(255,255,255,0.045) !important;
      border: 1px solid rgba(255,255,255,0.1) !important;
      border-radius: 14px !important;
      box-shadow: 0 8px 22px rgba(0,0,0,0.14), inset 0 1px 0 rgba(255,255,255,0.05);
    }

    .playlist-detail-track-card:hover {
      background: rgba(255,255,255,0.085) !important;
      border-color: rgba(138,214,255,0.34) !important;
      transform: translateY(-1px);
    }

    .playlist-detail-track-play {
      background: rgba(10,132,255,0.16) !important;
      border: 1px solid rgba(104,181,255,0.48) !important;
      color: #8ad6ff !important;
    }

    .playlist-detail-track-playing .playlist-detail-track-play {
      background: linear-gradient(135deg, #0a84ff, #34c759) !important;
      border-color: transparent !important;
      color: #fff !important;
      box-shadow: 0 6px 16px rgba(10,132,255,0.3);
    }

    @media (max-width: 420px) {
      .playlist-detail-controls { gap: 7px; }
      .playlist-detail-control-btn {
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
        flex-basis: 40px;
      }
      .playlist-detail-control-btn.is-primary {
        width: 48px;
        height: 48px;
        min-width: 48px;
        min-height: 48px;
        flex-basis: 48px;
      }
      .playlist-detail-control-btn .material-symbols-rounded { font-size: 19px; }
      .playlist-detail-control-btn.is-primary .material-symbols-rounded { font-size: 23px; }
    }
    
    .playlist-card:hover .playlist-actions {
      opacity: 1;
    }
    
    .playlist-card:hover {
      transform: translateY(-4px);
      box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    }
    
    /* Enhanced Skeletons for loading states */
    .skeleton {
      background: linear-gradient(90deg, rgba(255,255,255,0.08) 25%, rgba(255,255,255,0.03) 50%, rgba(255,255,255,0.08) 75%);
      background-size: 200% 100%;
      animation: shimmer 1.5s infinite ease-in-out;
      border-radius: 8px;
      position: relative;
      overflow: hidden;
    }
    
    .skeleton::before {
      content: '';
      position: absolute;
      top: 0;
      left: -100%;
      width: 100%;
      height: 100%;
      background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
      animation: shimmer-overlay 1.5s infinite ease-in-out;
    }
    
    @keyframes shimmer {
      0% { background-position: -200% 0; }
      100% { background-position: 200% 0; }
    }
    
    @keyframes shimmer-overlay {
      0% { left: -100%; }
      100% { left: 100%; }
    }
    
    /* Specific skeleton types */
    .skeleton-card {
      width: 160px;
      height: 200px;
      border-radius: 12px;
      display: flex;
      flex-direction: column;
      padding: 12px;
      gap: 8px;
    }
    
    .skeleton-card .skeleton-cover {
      width: 100%;
      height: 120px;
      border-radius: 8px;
    }

    /* Playlists : même silhouette carrée que les box finales */
    .playlist-skeleton-card {
      position: relative;
      width: 140px;
      min-width: 140px;
      height: 140px;
      overflow: hidden;
      border-radius: 20px;
      border: 1px solid rgba(10, 132, 255, 0.28);
      background: rgba(255, 255, 255, 0.045);
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
    }

    .playlist-skeleton-grid {
      position: absolute;
      inset: 8px;
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      grid-template-rows: repeat(2, 1fr);
      gap: 3px;
    }

    .playlist-skeleton-grid > div {
      min-width: 0;
      min-height: 0;
      border-radius: 8px;
    }

    .playlist-skeleton-overlay {
      position: absolute;
      inset: 0;
      display: flex;
      flex-direction: column;
      justify-content: flex-end;
      gap: 7px;
      padding: 12px;
      background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.18) 62%, transparent);
    }

    .playlist-skeleton-title {
      width: 78%;
      height: 13px;
      border-radius: 999px;
    }

    .playlist-skeleton-subtitle {
      width: 52%;
      height: 9px;
      border-radius: 999px;
    }

    .ad-card-cta {
      font-weight: 600;
      letter-spacing: 0.01em;
      transition: transform 0.2s ease, background 0.2s ease;
    }

    .ad-card-cta:hover {
      transform: translateY(-1px);
      background: rgba(0, 113, 227, 0.16);
    }

    .skeleton-artist {
      width: 140px;
      height: 200px;
      border-radius: 12px;
      display: flex;
      flex-direction: column;
      align-items: center;
      padding: 12px;
      gap: 8px;
    }
    
    .skeleton-artist .skeleton-avatar {
      width: 100px;
      height: 100px;
      border-radius: 50%;
    }
    
    .skeleton-artist .skeleton-name {
      height: 14px;
      width: 70%;
      border-radius: 4px;
    }
    
    .skeleton-artist .skeleton-genre {
      height: 12px;
      width: 50%;
      border-radius: 4px;
    }
    
    .skeleton-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
      gap: 16px;
      padding: 16px;
      contain: layout style; /* 🎯 PHASE 3: CSS containment for skeleton grid */
    }
    
    /* Mini player when scrolling */
    .player {
      position: fixed;
      left: 0;
      right: 0;
      background: transparent;
      backdrop-filter: blur(0px);
      -webkit-backdrop-filter: blur(0px);
      border-top: none;
      box-shadow: none;
      padding: 8px 16px 12px;
      z-index: 1001;
      display: none;
      height: auto;
      animation: slideUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
      bottom: var(--floating-footer-h);
    }

    @keyframes slideUp {
      from { transform: translateY(100%); }
      to { transform: translateY(0); }
    }
    
    .player.active {
      display: block;
    }
    
    .player.mini {
      height: 64px;
      padding: 10px 16px;
      transform: translateY(0);
      transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .player.mini .player-controls {
      gap: 10px;
    }
    
    .player.mini .track-info {
      font-size: 13px;
    }
    
    .player.mini .progress-bar {
      margin-bottom: 0;
      display: none;
    }
    
    /* TABLETS (769px to 1000px) */
    @media (min-width: 769px) and (max-width: 1000px) {
    }
    
    /* MOBILE (≤768px) */
    @media (max-width: 768px) {
    }
    



    
    /* Mobile Menu Landscape Scroll Fix */
    @media (max-width: 768px) and (orientation: landscape) {
      .mobile-menu {
        max-height: 100vh;
        height: 100vh;
        overflow-y: auto;
      }
      
      .mobile-menu-content {
        max-height: none;
        overflow-y: visible;
      }
    }
    
    /* Footer Navigation SPA-like Styles */
    .footer-nav {
      position: fixed;
      bottom: 0;
      left: 0;
      right: 0;
      height: 80px;
      background: var(--glass-bg);
      backdrop-filter: blur(40px) saturate(180%);
      -webkit-backdrop-filter: blur(40px) saturate(180%);
      border-top: none !important;
      box-shadow: none !important;
      display: flex;
      justify-content: space-around;
      align-items: stretch;
      z-index: 1002;
      padding: 0;
      width: 100%;
      max-width: 100%;
    }
    
    .dark .footer-nav {
      box-shadow: 0 -12px 60px rgba(0, 0, 0, 0.3);
    }
    
    .footer-nav.auth-guest {
      display: none !important;
    }
    
    .footer-btn {
      flex: 1;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 6px;
      background: transparent;
      border: none;
      color: var(--text-secondary);
      cursor: pointer;
      transition: all 0.3s ease;
      text-decoration: none;
      font-size: 12px;
      font-weight: 500;
    }
    
    .footer-btn:hover {
      color: var(--accent);
      background: rgba(0, 113, 227, 0.08);
    }
    
    .footer-btn.active {
      color: var(--accent);
      background: rgba(0, 113, 227, 0.12);
      border-top: 3px solid var(--accent);
      margin-top: -3px;
    }
    
    .footer-btn span:first-child {
      font-size: 26px;
    }
    
    .footer-btn span:last-child {
      font-size: 11px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }
    
    /* Section Modal */
    .section-modal {
      display: none;
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      z-index: 1003;
      align-items: flex-end;
      justify-content: center;
    }
    
    .section-modal.active {
      display: flex;
    }
    
    .section-modal-overlay {
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(0, 0, 0, 0.6);
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
      animation: fadeIn 0.3s ease;
    }
    
    .section-modal-content {
      position: relative;
      background: var(--glass-bg);
      backdrop-filter: blur(50px) saturate(200%);
      -webkit-backdrop-filter: blur(50px) saturate(200%);
      border: 1px solid var(--glass-border);
      border-bottom: none;
      border-radius: 32px 32px 0 0;
      border-bottom-left-radius: 0;
      border-bottom-right-radius: 0;
      width: 100%;
      max-width: 100%;
      height: auto;
      max-height: 90vh;
      display: flex;
      flex-direction: column;
      animation: slideUp 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
      z-index: 1;
      box-shadow: -8px -8px 40px rgba(0, 0, 0, 0.2);
      overflow-y: auto;
      touch-action: pan-y;
      -webkit-overflow-scrolling: touch;
      padding-bottom: 20px;
    }
    
    html.dark .section-modal-content {
      background: var(--glass-bg);
      backdrop-filter: blur(50px) saturate(200%);
      -webkit-backdrop-filter: blur(50px) saturate(200%);
      border-color: var(--glass-border);
      box-shadow: -8px -8px 40px rgba(0, 0, 0, 0.5);
    }
    
    .section-modal-header {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      padding: 28px 24px;
      border-bottom: 1px solid rgba(255, 255, 255, 0.08);
      flex-shrink: 0;
      background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
    }
    
    .section-modal-header h2 {
      margin: 0;
      font-size: 24px;
      font-weight: 700;
      color: var(--text-primary);
      letter-spacing: -0.5px;
      display: flex;
      align-items: center;
      gap: 10px;
    }
    
    .section-modal-header h2 .material-symbols-rounded {
      font-size: 28px;
      color: var(--accent);
    }
    
    .section-modal-subtitle {
      margin: 0;
      font-size: 13px;
      font-weight: 500;
      color: var(--text-secondary);
      line-height: 1.4;
    }
    
    .section-close-btn {
      width: 40px;
      height: 40px;
      border-radius: 50%;
      background: rgba(0, 0, 0, 0.04);
      border: 1px solid rgba(255, 255, 255, 0.08);
      cursor: pointer;
      color: var(--text-secondary);
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
      flex-shrink: 0;
      margin-left: 12px;
    }
    
    .section-close-btn:hover {
      background: rgba(0, 113, 227, 0.15);
      color: var(--accent);
      border-color: var(--accent);
      transform: rotate(90deg);
    }
    
    .section-modal-body {
      flex: 1;
      overflow-y: auto;
      padding: 24px;
      -webkit-overflow-scrolling: touch;
      min-height: 300px;
    }
    
    .section-item {
      display: flex;
      gap: 12px;
      padding: 14px 16px;
      margin-bottom: 10px;
      border-radius: 12px;
      background: rgba(255, 255, 255, 0.06);
      border: 1.5px solid rgba(255, 255, 255, 0.12);
      align-items: center;
      transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
      cursor: pointer;
      position: relative;
      overflow: hidden;
    }
    
    .section-item::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, transparent 100%);
      pointer-events: none;
      border-radius: 12px;
    }
    
    .section-item:hover {
      background: rgba(0, 113, 227, 0.1);
      border-color: rgba(0, 113, 227, 0.3);
      box-shadow: 0 8px 24px rgba(0, 113, 227, 0.15), inset 0 1px 1px rgba(255, 255, 255, 0.15);
      transform: translateY(-2px);
    }
    
    .section-title-small {
      font-size: 16px;
      font-weight: 700;
      color: var(--text-primary);
      margin: 28px 0 16px 0;
      display: flex;
      align-items: center;
      gap: 10px;
      letter-spacing: -0.3px;
    }
    
    .section-title-small .material-symbols-rounded {
      font-size: 22px;
      color: var(--accent);
    }
    
    .section-subtitle-small {
      font-size: 12px;
      color: var(--text-secondary);
      font-weight: 500;
      margin: 0 0 16px 0;
      line-height: 1.4;
    }
    
    .section-carousel {
      display: flex;
      gap: 12px;
      overflow-x: auto;
      scroll-snap-type: x mandatory;
      scroll-behavior: smooth;
      padding: 12px 0;
      scrollbar-width: none;
      -ms-overflow-style: none;
      margin: 16px 0;
    }

    .section-carousel-grid {
      display: grid;
      gap: 16px;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      width: 100%;
      margin-top: 16px;
    }

    .section-carousel-grid .section-carousel-item {
      min-width: 0;
    }

    .section-carousel-grid .section-card {
      width: 100%;
    }

    @media (min-width: 1024px) {
      .section-carousel-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
      }
    }
    
    .section-carousel::-webkit-scrollbar {
      display: none;
    }
    
    .section-carousel-item {
      scroll-snap-align: start;
      flex-shrink: 0;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 8px;
      cursor: pointer;
      transition: all 0.3s ease;
      min-width: 90px;
    }
    
    .section-card {
      border-radius: 16px;
      background: rgba(255, 255, 255, 0.06);
      backdrop-filter: blur(24px) saturate(150%);
      -webkit-backdrop-filter: blur(24px) saturate(150%);
      border: 1.5px solid rgba(255, 255, 255, 0.12);
      padding: 20px 16px;
      transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 10px;
      text-align: center;
      position: relative;
      overflow: hidden;
    }
    
    .section-card::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, transparent 100%);
      pointer-events: none;
      border-radius: 16px;
    }
    
    .section-card:hover {
      transform: translateY(-8px);
      border-color: rgba(0, 113, 227, 0.4);
      box-shadow: 0 20px 40px rgba(0, 113, 227, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.2);
      background: rgba(0, 113, 227, 0.08);
    }
    
    .card-icon-round {
      width: 64px;
      height: 64px;
      border-radius: 50%;
      background: linear-gradient(135deg, rgba(0, 113, 227, 0.25), rgba(10, 132, 255, 0.15));
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 28px;
      color: var(--accent);
      position: relative;
      z-index: 1;
    }
    
    .card-icon-square {
      width: 72px;
      height: 72px;
      border-radius: 14px;
      background: linear-gradient(135deg, rgba(0, 113, 227, 0.25), rgba(10, 132, 255, 0.15));
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 32px;
      color: var(--accent);
      position: relative;
      z-index: 1;
    }
    
    .card-icon-rect {
      width: 84px;
      height: 52px;
      border-radius: 12px;
      background: linear-gradient(135deg, rgba(0, 113, 227, 0.20), rgba(10, 132, 255, 0.12));
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 28px;
      color: var(--accent);
      position: relative;
      z-index: 1;
    }

    .card-title {
      font-size: 12px;
      font-weight: 700;
      color: var(--text-primary);
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      width: 100%;
      letter-spacing: -0.2px;
      position: relative;
      z-index: 1;
    }

    .card-subtitle {
      font-size: 10px;
      color: var(--text-secondary);
      font-weight: 500;
      max-width: 100%;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      position: relative;
      z-index: 1;
    }
    
    @keyframes fadeIn {
      from { opacity: 0; }
      to { opacity: 1; }
    }
    
    /* Mobile adjustments for footer */
    @media (max-width: 768px) {
      .footer-nav {
        height: 66px;
        padding: 0 4px;
        bottom: 0 !important;
        z-index: 900 !important;
      }
      
      .player {
        bottom: var(--floating-footer-h) !important;
        z-index: 1001 !important;
      }
      
      .section-modal {
        bottom: var(--floating-footer-h) !important;
        z-index: 1000 !important;
      }
      
      .footer-btn span:first-child {
        font-size: 20px;
      }
      
      .footer-btn span:last-child {
        font-size: 10px;
      }
      
      .section-modal-content {
        border-radius: 16px 16px 0 0;
        height: auto;
        max-height: 80vh;
      }
      
      .section-modal-header {
        padding: 16px;
      }
      
      .section-modal-header h2 {
        font-size: 18px;
      }
      
      .section-modal-body {
        padding: 12px 16px 20px;
      }
      
      .section-carousel-item {
        min-width: 80px;
      }
    }
    
    @media (max-width: 480px) {
      .footer-nav {
        height: 60px !important;
        bottom: 0 !important;
        z-index: 900 !important;
      }
      
      .player {
          bottom: var(--floating-footer-h) !important;
        z-index: 1001 !important;
      }
      
      .section-modal {
        bottom: var(--floating-footer-h) !important;
        z-index: 1000 !important;
      }
      
      .footer-btn span:first-child {
        font-size: 18px;
      }
      
      .footer-btn span:last-child {
        font-size: 8px;
      }
    }
    
    /* Music card */
    .music-card {
      width: 180px;
      cursor: pointer;
      position: relative;
      transition: all 0.3s ease;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: flex-start;
      border-radius: 20px;
      background: rgba(255, 255, 255, 0.03);
      border: 1px solid rgba(255, 255, 255, 0.08);
      overflow: hidden;
    }

    .music-card:hover {
      transform: translateY(-4px);
    }
    
    .music-card-cover {
      width: 100%;
      aspect-ratio: 1;
      border-radius: 16px;
      overflow: hidden;
      position: relative;
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      background-size: cover;
      background-position: center;
      transition: transform 0.4s ease, box-shadow 0.3s ease;
      box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    }

    .music-card .mt-3 {
      width: 100%;
      padding: 10px 8px 0;
      box-sizing: border-box;
      text-align: center;
    }

    .music-card .font-medium,
    .music-card .text-xs {
      width: 100%;
      display: block;
      margin: 0 auto;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .music-card .font-medium {
      margin-bottom: 4px;
      padding: 0 4px;
    }

    .music-card .text-xs {
      padding: 0 4px;
    }
    
    .music-card:hover .music-card-cover {
      transform: scale(1.03);
      box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    }

    .music-card-cover .music-card-overlay-circles {
      pointer-events: none;
      position: absolute;
      inset: 0;
      background-repeat: no-repeat;
      background-image:
        radial-gradient(circle at 20% 20%, rgba(255,255,255,0.18), transparent 25%),
        radial-gradient(circle at 75% 40%, rgba(255,255,255,0.1), transparent 30%),
        radial-gradient(circle at 40% 80%, rgba(10,132,255,0.2), transparent 20%);
      opacity: 0.95;
    }

    .playlist-cover-grid {
      width: 100%;
      height: 100%;
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      grid-template-rows: repeat(2, 1fr);
      contain: layout style; /* 🎯 PHASE 3: CSS containment for playlist cover grid */
      gap: 2px;
      padding: 8px;
      box-sizing: border-box;
      position: absolute;
      inset: 0;
      z-index: 2;
    }

    .playlist-cover-grid div {
      border-radius: 8px;
      background-size: cover;
      background-position: center;
      box-shadow: inset 0 0 0 1px rgba(255,255,255,0.2);
    }

    .music-card-cover::after {
      content: '';
      position: absolute;
      bottom: 0;
      left: 0;
      right: 0;
      height: 50%;
      background: linear-gradient(to top, rgba(0,0,0,0.4) 0%, transparent 100%);
      opacity: 0;
      transition: opacity 0.3s ease;
    }
    
    .music-card:hover .music-card-cover::after {
      opacity: 1;
    }
    
    .play-btn-overlay {
      position: absolute;
      bottom: 12px;
      right: 12px;
      width: 44px;
      height: 44px;
      border-radius: 50%;
      background: rgba(255, 255, 255, 0.9);
      backdrop-filter: blur(10px);
      display: flex;
      align-items: center;
      justify-content: center;
      opacity: 0;
      transform: scale(0.8) translateY(10px);
      transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
      z-index: 10;
    }
    
    .music-card:hover .play-btn-overlay {
      opacity: 1;
      transform: scale(1) translateY(0);
    }

    .artist-track-item .play-btn-overlay {
      position: absolute;
      left: 50%;
      top: 50%;
      transform: translate(-50%, -50%);
      width: 28px;
      height: 28px;
      border-radius: 50%;
      background: rgba(255, 255, 255, 0.95);
      box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
      opacity: 1;
      animation: none;
      transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease;
      pointer-events: auto;
      cursor: pointer;
    }

    .artist-track-item .play-btn-overlay:hover {
      transform: translate(-50%, -50%) scale(1.05);
      background: rgba(255, 255, 255, 1);
      box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
    }

    .artist-track-item.playing .play-btn-overlay {
      background: #1DA1F2;
      color: #fff;
      box-shadow: 0 8px 20px rgba(29, 161, 242, 0.35);
    }

    .artist-track-item .play-btn-overlay .material-symbols-rounded {
      font-size: 18px;
      color: inherit;
    }
    
    .play-btn-overlay .material-symbols-rounded {
      color: #1d1d1f;
      font-size: 24px;
    }
    
    /* Artist card */
    .artist-card {
      width: 100%;
      max-width: 200px;
      margin: 0 auto;
      text-align: center;
      cursor: pointer;
      position: relative;
      border-radius: 24px;
      overflow: hidden;
      background: rgba(255,255,255,0.04);
      border: 1px solid rgba(255, 255, 255, 0.12);
      transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

    .artist-card .artist-premium-badge {
      position: absolute;
      top: -8px;
      right: -8px;
      background: rgba(255, 215, 0, 0.95);
      color: #111;
      font-size: 10px;
      font-weight: 700;
      border-radius: 999px;
      padding: 3px 8px;
      box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    }
    
    .artist-avatar {
      width: 120px;
      height: 120px;
      border-radius: 50%;
      margin: 0 auto 12px;
      position: relative;
      overflow: hidden;
      background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
      box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
      transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    
    .artist-card:hover .artist-avatar {
      transform: scale(1.05);
      box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2), 0 0 60px rgba(255, 255, 255, 0.1);
    }
    
    .dark .artist-card:hover .artist-avatar {
      box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), 0 0 60px rgba(255, 255, 255, 0.05);
    }
    
    /* Badge */
    .badge {
      display: inline-flex;
      align-items: center;
      padding: 4px 10px;
      border-radius: 100px;
      font-size: 11px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }
    
    .badge-new {
      background: linear-gradient(135deg, rgba(0, 113, 227, 0.15) 0%, rgba(90, 200, 250, 0.15) 100%);
      color: var(--accent);
      border: 1px solid rgba(0, 113, 227, 0.2);
    }

    /* Premium Card Badges - Bottom Center */
    .badge-project-type {
      font-size: 11px;
      font-weight: 700;
      padding: 5px 12px;
      border-radius: 20px;
      background: linear-gradient(135deg, rgba(147, 112, 219, 0.15) 0%, rgba(186, 85, 211, 0.15) 100%);
      color: #BA55D3;
      border: 1px solid rgba(186, 85, 211, 0.3);
      letter-spacing: 0.5px;
      text-transform: uppercase;
      display: inline-block;
      backdrop-filter: blur(10px);
      -webkit-backdrop-filter: blur(10px);
      box-shadow: 0 4px 12px rgba(186, 85, 211, 0.1);
      transition: all 0.3s ease;
    }

    .badge-project-type:hover {
      background: linear-gradient(135deg, rgba(147, 112, 219, 0.25) 0%, rgba(186, 85, 211, 0.25) 100%);
      border-color: rgba(186, 85, 211, 0.5);
      box-shadow: 0 6px 20px rgba(186, 85, 211, 0.25);
    }

    .badge-verified {
      font-size: 10px;
      font-weight: 800;
      padding: 4px 10px;
      border-radius: 20px;
      background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
      color: #000;
      border: 1px solid rgba(255, 215, 0, 0.5);
      letter-spacing: 0.5px;
      text-transform: uppercase;
      display: inline-block;
      margin-left: 6px;
      backdrop-filter: blur(10px);
      -webkit-backdrop-filter: blur(10px);
      box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.6);
      transition: all 0.3s ease;
      position: relative;
    }

    .badge-verified::before {
      content: '✓';
      margin-right: 3px;
      font-weight: 900;
    }

    .badge-verified:hover {
      background: linear-gradient(135deg, #FFE55C 0%, #FFB700 100%);
      box-shadow: 0 6px 25px rgba(255, 215, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.8);
      transform: scale(1.05);
    }

    /* Badges container in card footer */
    .badge-container {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 4px;
      margin: 8px 0;
      flex-wrap: wrap;
    }
    
    /* Album Card - For Albums/EP/Mixtapes section */
    .album-card {
      width: 200px;
      height: 280px;
      border-radius: 20px;
      background: var(--glass-bg);
      backdrop-filter: blur(40px) saturate(180%);
      -webkit-backdrop-filter: blur(40px) saturate(180%);
      border: 1px solid var(--glass-border);
      box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
      cursor: pointer;
      position: relative;
      overflow: hidden;
      transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
      display: flex;
      flex-direction: column;
    }

    .album-card:hover {
      transform: translateY(-8px) scale(1.02);
      box-shadow: 0 20px 60px rgba(0, 113, 227, 0.25);
      border-color: rgba(0, 113, 227, 0.4);
    }

    .project-card-selected {
      outline: 2px solid rgba(10, 132, 255, 0.9);
      box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.12);
      transform: translateY(-4px) !important;
    }

    .album-card-cover {
      width: 100%;
      height: 180px;
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      position: relative;
      overflow: hidden;
    }

    .album-card-cover::after {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
      pointer-events: none;
    }

    .album-card-info {
      padding: 16px;
      flex: 1;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
    }

    .album-card-title {
      font-size: 16px;
      font-weight: 700;
      color: var(--text-primary);
      margin: 0 0 4px 0;
      line-height: 1.3;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .album-card-artist {
      font-size: 14px;
      color: var(--text-secondary);
      margin: 0 0 8px 0;
      font-weight: 500;
    }

    .album-card-type {
      font-size: 12px;
      color: var(--accent);
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .album-sale-badge {
      position: absolute;
      top: 12px;
      right: 12px;
      background: linear-gradient(135deg, #ff6b6b, #ee5a24);
      color: white;
      padding: 4px 8px;
      border-radius: 12px;
      font-size: 10px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
      z-index: 10;
    }

    /* Album Sale Card - For sale section */
    .album-sale-card {
      position: relative;
      width: 220px;
      padding: 20px;
      border-radius: 16px;
      background: var(--card-bg);
      border: 1px solid var(--card-border);
      cursor: pointer;
      transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
      box-shadow: var(--card-shadow);
      backdrop-filter: blur(20px) saturate(180%);
      -webkit-backdrop-filter: blur(20px) saturate(180%);
    }

    .album-sale-card:hover {
      transform: translateY(-8px);
      box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
      border-color: rgba(10, 132, 255, 0.3);
    }

    .album-sale-cover {
      width: 100%;
      height: 160px;
      border-radius: 12px;
      margin-bottom: 16px;
      position: relative;
      overflow: hidden;
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    }

    .album-sale-cover::after {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: linear-gradient(135deg, rgba(10, 132, 255, 0.2), rgba(0, 212, 255, 0.15));
      border: 1px solid rgba(10, 132, 255, 0.3);
      border-radius: 12px;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
    }

    .album-sale-info {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 12px;
    }

    .album-sale-title {
      font-size: 16px;
      font-weight: 600;
      color: var(--text-primary);
      margin: 0 0 4px 0;
      line-height: 1.3;
    }

    .album-sale-artist {
      font-size: 14px;
      color: var(--text-secondary);
      margin: 0 0 8px 0;
      font-weight: 500;
    }

    .album-sale-price {
      background: linear-gradient(135deg, var(--accent), #0a84ff);
      color: white;
      padding: 6px 12px;
      border-radius: 20px;
      font-size: 14px;
      font-weight: 700;
      box-shadow: 0 4px 12px rgba(10, 132, 255, 0.3);
      flex-shrink: 0;
    }

    /* AI Recommendation Card - Premium */
    .ai-recommendation-card {
      width: 220px;
      height: 320px;
      border-radius: 24px;
      background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.85));
      backdrop-filter: blur(50px) saturate(200%);
      -webkit-backdrop-filter: blur(50px) saturate(200%);
      border: 2px solid rgba(0, 113, 227, 0.2);
      box-shadow: 0 12px 40px rgba(0, 113, 227, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.8);
      cursor: pointer;
      position: relative;
      overflow: hidden;
      transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      text-align: center;
      padding: 24px;
    }

    .dark .ai-recommendation-card {
      background: linear-gradient(135deg, rgba(30, 30, 32, 0.95), rgba(20, 20, 22, 0.85));
      border-color: rgba(0, 113, 227, 0.3);
      box-shadow: 0 12px 40px rgba(0, 113, 227, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    }

    .ai-recommendation-card:hover {
      transform: translateY(-12px) scale(1.05);
      box-shadow: 0 24px 80px rgba(0, 113, 227, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.9);
      border-color: rgba(0, 113, 227, 0.5);
    }

    .dark .ai-recommendation-card:hover {
      box-shadow: 0 24px 80px rgba(0, 113, 227, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    }

    .ai-recommendation-icon {
      width: 80px;
      height: 80px;
      border-radius: 50%;
      background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
      backdrop-filter: blur(20px) saturate(180%);
      -webkit-backdrop-filter: blur(20px) saturate(180%);
      border: 1px solid rgba(255, 255, 255, 0.2);
      display: flex;
      align-items: center;
      justify-content: center;
      margin-bottom: 16px;
      box-shadow: 0 8px 24px rgba(0, 113, 227, 0.15);
    }

    .ai-recommendation-icon svg {
      width: 32px;
      height: 32px;
    }

    .ai-recommendation-title {
      font-size: 18px;
      font-weight: 700;
      color: var(--text-primary);
      margin: 0 0 8px 0;
      line-height: 1.3;
    }

    .ai-recommendation-subtitle {
      font-size: 14px;
      color: var(--text-secondary);
      margin: 0 0 16px 0;
      line-height: 1.4;
    }

    .ai-recommendation-badge {
      background: linear-gradient(135deg, #ff9500, #ff3b30);
      color: white;
      padding: 6px 12px;
      border-radius: 16px;
      font-size: 11px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      box-shadow: 0 4px 12px rgba(255, 149, 0, 0.3);
    }
    @keyframes shimmer {
      0% { background-position: -200% 0; }
      100% { background-position: 200% 0; }
    }
    
    .shimmer {
      background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.4) 50%, transparent 100%);
      background-size: 200% 100%;
      animation: shimmer 2s infinite;
    }
    
    /* Progress bar */
    .progress-bar {
      height: 4px;
      background: rgba(255, 255, 255, 0.2);
      border-radius: 2px;
      overflow: hidden;
    }
    
    .progress-fill {
      height: 100%;
      background: var(--text-primary);
      border-radius: 2px;
      transition: width 0.1s linear;
    }
    
    /* Filter chips */
    .filter-chip {
      padding: 10px 20px;
      border-radius: 100px;
      font-size: 14px;
      font-weight: 500;
      cursor: pointer;
      transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
      background: var(--glass-bg);
      backdrop-filter: blur(20px);
      border: 1px solid var(--glass-border);
      color: var(--text-secondary);
      white-space: nowrap;
    }
    
    .filter-chip:hover {
      background: var(--accent-secondary);
      color: var(--accent);
      border-color: var(--accent);
    }
    
    .filter-chip.active {
      background: var(--accent);
      color: white;
      border-color: var(--accent);
    }
    
    /* Theme toggle */
    .theme-toggle {
      width: 56px;
      height: 30px;
      border-radius: 100px;
      background: transparent !important;
      backdrop-filter: none !important;
      -webkit-backdrop-filter: none !important;
      border: none !important;
      position: relative;
      cursor: pointer;
      transition: all 0.3s ease;
    }
    
    .theme-toggle-knob {
      width: 24px;
      height: 24px;
      border-radius: 50%;
      background: var(--text-primary);
      position: absolute;
      top: 2px;
      left: 3px;
      transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
      display: flex;
      align-items: center;
      justify-content: center;
    }
    
    .dark .theme-toggle-knob {
      left: 28px;
      background: #f5f5f7;
    }
    
    .theme-toggle-knob .material-symbols-rounded {
      font-size: 14px;
      color: var(--surface-primary);
    }
    
    /* Section styles */
    .section-title {
      font-size: 24px;
      font-weight: 700;
      color: var(--text-primary);
      margin-bottom: 4px;
      letter-spacing: -0.5px;
    }
    
    .section-subtitle {
      font-size: 15px;
      color: var(--text-secondary);
      margin-bottom: 16px;
    }
    
    /* Player */
    .player {
      position: fixed;
      bottom: 70px;
      left: 0;
      right: 0;
      z-index: 1001;
      padding: 8px 16px 12px;
      background: transparent;
      backdrop-filter: blur(0px);
      -webkit-backdrop-filter: blur(0px);
      border-top: none;
      box-shadow: none;
    }
    
    .dark .player {
      background: transparent;
      box-shadow: none;
      border-top: none;
    }
    
    .player-btn {
      width: 40px;
      height: 40px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: all 0.2s ease;
      background: var(--glass-bg);
      border: 1px solid var(--glass-border);
      color: var(--text-primary);
      box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
      backdrop-filter: blur(16px);
      -webkit-backdrop-filter: blur(16px);
    }
    
    .dark .player-btn {
      background: rgba(255, 255, 255, 0.08);
      border-color: rgba(255, 255, 255, 0.18);
      color: #f5f5f7;
      box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
    }
    
    .player-btn:hover {
      background: rgba(255, 255, 255, 0.22);
      color: var(--accent);
      transform: translateY(-2px);
      border-color: rgba(255, 255, 255, 0.26);
    }
    
    .player-btn-main {
      width: 40px;
      height: 40px;
      background: var(--glass-bg);
      color: var(--accent);
      border: 1px solid var(--glass-border);
      box-shadow: 0 16px 36px rgba(0, 0, 0, 0.18);
      backdrop-filter: blur(16px);
      -webkit-backdrop-filter: blur(16px);
    }
    
    .dark .player-btn-main {
      background: rgba(255, 255, 255, 0.08);
      color: var(--accent);
      border-color: rgba(255, 255, 255, 0.18);
    }
    
    .player-btn-main:hover {
      transform: translateY(-1px) scale(1.03);
      background: rgba(255, 255, 255, 0.18);
      color: var(--accent);
      border-color: rgba(255, 255, 255, 0.28);
    }
    
    /* Gradient covers */
    .gradient-1 { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
    .gradient-2 { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
    .gradient-3 { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
    .gradient-4 { background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); }
    .gradient-5 { background: linear-gradient(135deg, #fa709a 0%, #fee140 100%); }
    .gradient-6 { background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%); }
    .gradient-7 { background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%); }
    .gradient-8 { background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%); }
    .gradient-9 { background: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%); }
    .gradient-10 { background: linear-gradient(135deg, #96fbc4 0%, #f9f586 100%); }
    
    /* Responsive */
    @media (max-width: 768px) {
      .music-card { width: 150px; }
      .artist-card { width: 120px; }
      .artist-avatar { width: 100px; height: 100px; }
      .section-title { font-size: 20px; }
      .player { padding: 12px 16px; }
    }
    
    @media (max-width: 480px) {
      .music-card { width: 140px; }
      .nav-links { display: none; }
    }
    
    /* Mobile Menu - Premium Glassmorphism */
    .mobile-menu-btn {
      display: flex;
      cursor: pointer;
      background: transparent;
      border: none;
      padding: 8px;
      color: var(--text-primary);
      z-index: 500;
    }
    
    .mobile-menu-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.3);
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.28s cubic-bezier(0.2, 0.75, 0.25, 1);
      z-index: 999;
    }
    
    .mobile-menu-overlay.active {
      opacity: 1;
      pointer-events: auto;
    }

    /* Search Modal Styles - Slide from left */
    .search-modal-overlay {
      position: fixed;
      inset: 0;
      z-index: 9990;
      background: rgba(0, 0, 0, 0.5);
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

    .search-modal-overlay.active {
      opacity: 1;
      pointer-events: auto;
    }

    .search-modal-container {
      position: fixed;
      left: 0;
      top: 0;
      bottom: 0;
      width: min(90vw, 500px);
      z-index: 9991;
      background: linear-gradient(180deg, var(--surface-primary), var(--surface-secondary));
      border-right: 1px solid rgba(255, 255, 255, 0.1);
      display: flex;
      flex-direction: column;
      transform: translateX(-100%);
      transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
      padding-bottom: 80px;
    }

    .search-modal-container.active {
      transform: translateX(0);
    }

    .search-modal-header {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 16px;
      border-bottom: 1px solid rgba(255, 255, 255, 0.08);
      background: linear-gradient(135deg, rgba(10, 132, 255, 0.1), rgba(255, 215, 0, 0.05));
    }

    .search-modal-close {
      flex-shrink: 0;
      background: rgba(255, 255, 255, 0.1);
      border: 1px solid rgba(255, 255, 255, 0.15);
      color: var(--text-primary);
      cursor: pointer;
      padding: 8px;
      border-radius: 8px;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

    .search-modal-close:hover {
      background: rgba(255, 255, 255, 0.15);
      transform: scale(1.05);
    }

    .search-modal-title {
      font-size: 18px;
      font-weight: 700;
      color: var(--text-primary);
      letter-spacing: -0.5px;
    }

    .search-input-wrapper {
      padding: 16px;
      border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .search-input-box {
      position: relative;
      display: flex;
      align-items: center;
      gap: 10px;
      background: rgba(255, 255, 255, 0.08);
      border: 1px solid rgba(255, 255, 255, 0.12);
      border-radius: 12px;
      padding: 12px 16px;
      transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    }

    .search-input-box:focus-within {
      background: rgba(255, 255, 255, 0.12);
      border-color: var(--accent);
      box-shadow: 0 0 24px rgba(10, 132, 255, 0.4), inset 0 0 12px rgba(10, 132, 255, 0.1);
      transform: translateY(-2px);
    }

    /* Search Results Styles */
    .spinner {
      width: 24px;
      height: 24px;
      border: 2px solid rgba(255, 255, 255, 0.2);
      border-top-color: var(--accent);
      border-radius: 50%;
      animation: spin 0.8s linear infinite;
      margin: 0 auto;
    }

    @keyframes spin {
      to { transform: rotate(360deg); }
    }

    .track-play-overlay {
      opacity: 0;
      transition: opacity 0.2s;
    }

    .track-play-overlay:hover {
      opacity: 1;
    }

    .search-input-box span {
      color: var(--text-secondary);
      flex-shrink: 0;
      transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

    .search-input-box:focus-within span {
      color: var(--accent);
      transform: scale(1.1);
    }

    .search-input-box input {
      flex: 1;
      background: transparent;
      border: none;
      color: var(--text-primary);
      font-size: 16px;
      outline: none;
      font-weight: 500;
      letter-spacing: -0.2px;
    }

    .search-input-box input::placeholder {
      color: var(--text-secondary);
      opacity: 0.6;
    }

    .search-modal-home,
    .search-modal-close {
      font-size: 14px;
      border: 1px solid var(--accent);
      border-radius: 12px;
      padding: 8px 12px;
      background: rgba(255, 255, 255, 0.08);
      color: var(--text-primary);
      min-width: 80px;
      cursor: pointer;
      transition: all 0.2s ease;
    }

    .search-modal-home:hover,
    .search-modal-close:hover {
      transform: translateY(-1px);
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }

    .search-filters {
      display: flex;
      gap: 8px;
      padding: 16px;
      border-bottom: 1px solid rgba(255, 255, 255, 0.08);
      overflow-x: auto;
      scrollbar-width: none;
    }

    .search-filters::-webkit-scrollbar {
      display: none;
    }

    .search-filter-btn {
      flex-shrink: 0;
      padding: 8px 12px;
      border-radius: 20px;
      border: 1px solid rgba(255, 255, 255, 0.15);
      background: rgba(255, 255, 255, 0.06);
      color: var(--text-secondary);
      font-size: 12px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
      text-transform: capitalize;
      letter-spacing: 0.3px;
    }

    .search-filter-btn:hover {
      background: rgba(255, 255, 255, 0.1);
      border-color: var(--accent);
      color: var(--accent);
      transform: translateY(-2px);
    }

    .search-filter-btn.active {
      background: var(--accent);
      color: #fff;
      border-color: var(--accent);
      box-shadow: 0 4px 12px rgba(10, 132, 255, 0.3);
    }

    .search-results-container {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 16px;
      flex: 1;
      overflow-y: auto;
      padding: 12px 0;
      scrollbar-width: thin;
      scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
      box-sizing: border-box;
    }

    .search-results-container .search-result-card,
    .search-results-container .search-result-item,
    .overlay-music-card,
    .trending-card,
    .search-idle-card {
      box-sizing: border-box;
      max-width: none;
      width: 100%;
      margin: 0;
    }

    @media (max-width: 900px) {
      .search-results-container {
        grid-template-columns: 1fr;
      }
    }

    .search-results-container::-webkit-scrollbar {
      width: 4px;
    }

    .search-results-container::-webkit-scrollbar-track {
      background: transparent;
    }

    .search-results-container::-webkit-scrollbar-thumb {
      background: rgba(255, 255, 255, 0.2);
      border-radius: 2px;
    }

    .search-result-item {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 12px 16px;
      cursor: pointer;
      transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
      border-left: 3px solid transparent;
      animation: slideInZoom 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) backwards;
    }

    .search-result-item:nth-child(1) { animation-delay: 0.05s; }
    .search-result-item:nth-child(2) { animation-delay: 0.1s; }
    .search-result-item:nth-child(3) { animation-delay: 0.15s; }
    .search-result-item:nth-child(4) { animation-delay: 0.2s; }
    .search-result-item:nth-child(5) { animation-delay: 0.25s; }
    .search-result-item:nth-child(n+6) { animation-delay: 0.3s; }

    @keyframes slideInZoom {
      from {
        opacity: 0;
        transform: translateX(-20px) scale(0.95);
      }
      to {
        opacity: 1;
        transform: translateX(0) scale(1);
      }
    }

    .search-result-item:hover {
      background: rgba(255, 255, 255, 0.08);
      border-left-color: var(--accent);
      transform: translateX(6px);
      box-shadow: 0 4px 16px rgba(10, 132, 255, 0.15);
    }

    .search-result-item:active {
      transform: translateX(6px) scale(0.98);
    }

    .search-result-cover {
      width: 48px;
      height: 48px;
      border-radius: 8px;
      background-size: cover;
      background-position: center;
      flex-shrink: 0;
      border: 1px solid rgba(255, 255, 255, 0.1);
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }

    .search-result-info {
      flex: 1;
      min-width: 0;
    }

    .search-result-title {
      color: var(--text-primary);
      font-weight: 600;
      font-size: 14px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      letter-spacing: -0.2px;
    }

    .search-result-subtitle {
      color: var(--text-secondary);
      font-size: 12px;
      margin-top: 2px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .search-result-type {
      background: rgba(255, 255, 255, 0.1);
      color: var(--text-secondary);
      font-size: 10px;
      font-weight: 700;
      padding: 4px 8px;
      border-radius: 4px;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      flex-shrink: 0;
    }

    .search-empty-state {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      padding: 60px 20px;
      text-align: center;
      color: var(--text-secondary);
    }

    .search-empty-state span {
      font-size: 48px;
      margin-bottom: 16px;
    }

    .nearby-skeleton {
      display: grid;
      gap: 10px;
      padding: 12px 0;
    }

    .nearby-skeleton-item {
      height: 72px;
      border-radius: 12px;
      background: rgba(255, 255, 255, 0.08);
      border: 1px solid rgba(255, 255, 255, 0.14);
      overflow: hidden;
      position: relative;
      animation: shimmer 1.5s infinite;
      background-image: linear-gradient(90deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.05) 100%);
      background-size: 240% 100%;
    }

    .nearby-skeleton-item::before {
      content: '';
      position: absolute;
      inset: 0;
      background: linear-gradient(90deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.25) 50%, rgba(255,255,255,0.1) 100%);
      animation: shimmer 1.4s infinite;
    }

    .nearby-share-item {
      display: grid;
      grid-template-columns: auto 1fr auto;
      gap: 12px;
      align-items: center;
      padding: 10px;
      border-radius: 12px;
      background: rgba(0, 118, 255, 0.08);
      border: 1px solid rgba(0, 118, 255, 0.22);
      box-shadow: 0 6px 16px rgba(0, 113, 227, 0.15);
      margin-bottom: 10px;
      position: relative;
      overflow: hidden;
    }

    .nearby-share-item .radar-icon {
      width: 46px;
      height: 46px;
      border-radius: 50%;
      display: grid;
      place-items: center;
      background: rgba(255,255,255,0.12);
      border: 1px solid rgba(255,255,255,0.2);
      position: relative;
    }

    .nearby-share-item .radar-icon::after {
      content: '';
      position: absolute;
      inset: -6px;
      border-radius: 50%;
      border: 2px solid rgba(0,255,128,0.75);
      opacity: 0.6;
      animation: radarPulse 2.2s ease-in-out infinite;
    }

    .nearby-share-item .share-meta {
      display: flex;
      flex-direction: column;
      gap: 4px;
      min-width: 0;
    }

    .nearby-share-item .share-meta-identity {
      font-size: 12px;
      color: var(--text-secondary);
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .nearby-share-item .share-meta-identity .aura {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: linear-gradient(135deg, #72ff6f, #41b0ff);
      box-shadow: 0 0 12px rgba(65,176,255,0.8);
    }

    .nearby-share-item .share-actions {
      display: flex;
      gap: 6px;
      flex-direction: column;
    }

    .nearby-share-item .btn-share-join {
      padding: 6px 10px;
      border-radius: 999px;
      border: 1px solid rgba(255,255,255,0.24);
      background: rgba(0, 255, 205, 0.2);
      color: #fff;
      font-weight: 700;
      font-size: 12px;
      cursor: pointer;
      transition: transform 0.2s ease, box-shadow 0.2s ease;
    }

    .nearby-share-item .btn-share-join:hover {
      transform: scale(1.02);
      box-shadow: 0 0 12px rgba(0,255,205,0.6);
    }

    @keyframes radarPulse {
      0% { transform: scale(0.8); opacity: 0.7; }
      50% { transform: scale(1.25); opacity: 0.15; }
      100% { transform: scale(1.8); opacity: 0; }
    }

    .search-no-results {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      padding: 40px 20px;
      text-align: center;
      color: var(--text-secondary); 
    }

    .search-no-results span {
      font-size: 36px;
      margin-bottom: 12px;
      opacity: 0.5;
    }
    
    .mobile-menu {
      position: fixed;
      top: 0;
      bottom: 0;
      left: 0;
      right: 0;
      background: var(--glass-bg);
      backdrop-filter: blur(50px) saturate(200%);
      -webkit-backdrop-filter: blur(50px) saturate(200%);
      border: 1px solid var(--glass-border);
      border-top-left-radius: 32px;
      border-top-right-radius: 32px;
      border-bottom-left-radius: 0;
      border-bottom-right-radius: 0;
      box-shadow: -8px -8px 40px rgba(0, 0, 0, 0.2);
      z-index: 1003;
      height: 100vh;
      max-height: 100vh;
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
      transform: translateY(100%);
      transition: transform 0.28s cubic-bezier(0.2, 0.75, 0.25, 1);
      touch-action: pan-y;
      padding-bottom: var(--floating-footer-h);
      overscroll-behavior: contain;
    }
    
    .dark .mobile-menu {
      box-shadow: -8px -8px 40px rgba(0, 0, 0, 0.5);
    }
    
    .mobile-menu.active {
      transform: translateY(0);
    }

    .mobile-menu.dragging {
      transition: none !important;
      will-change: transform;
    }

    /* iOS installed PWA: keep top controls below the physical status-bar area. */
    @media (max-width: 768px) {
      html.is-pwa-standalone .mobile-menu {
        top: env(safe-area-inset-top, 0px);
        height: calc(100vh - env(safe-area-inset-top, 0px));
        max-height: calc(100vh - env(safe-area-inset-top, 0px));
        padding-bottom: calc(var(--floating-footer-h) + env(safe-area-inset-bottom, 0px));
      }
    }
    
    .mobile-menu-drag-handle {
      display: flex;
      justify-content: center;
      align-items: center;
      padding: 16px 0 8px;
      cursor: grab;
      touch-action: none;
      user-select: none;
      -webkit-user-select: none;
    }
    
    .mobile-menu-drag-handle:active {
      cursor: grabbing;
    }

    .mobile-menu-close-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 44px;
      min-height: 44px;
      padding: 0 12px;
      border: 0;
      border-radius: 999px;
      background: transparent;
      color: var(--text-secondary);
      cursor: pointer;
      touch-action: manipulation;
    }

    .mobile-menu-close-btn:hover,
    .mobile-menu-close-btn:focus-visible {
      background: rgba(255, 255, 255, 0.08);
      color: var(--text-primary);
    }
    
    .mobile-menu-drag-indicator {
      width: 48px;
      height: 4px;
      border-radius: 2px;
      background: var(--text-secondary);
      opacity: 0.5;
      position: relative;
      transition: all 0.3s ease;
    }
    
    .mobile-menu.dragging .mobile-menu-drag-indicator {
      background: var(--accent);
      opacity: 1;
      box-shadow: 0 0 20px rgba(0, 113, 227, 0.5);
    }
    
    .dark .mobile-menu.dragging .mobile-menu-drag-indicator {
      box-shadow: 0 0 20px rgba(10, 132, 255, 0.5);
    }
    
    .mobile-menu-header {
      display: flex;
      justify-content: center;
      align-items: center;
      padding: 8px 0 20px;
      border-bottom: 1px solid var(--glass-border);
    }
    
    .mobile-menu-title {
      display: block;
      margin: 0;
      text-align: center;
      font-size: 14px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 1px;
      color: var(--text-secondary);
    }
    
    .mobile-menu-content {
      padding: 20px 16px;
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
    }
    
    .mobile-menu-item {
      display: flex;
      align-items: center;
      justify-content: center;
      flex-direction: column;
      padding: 16px;
      border-radius: 16px;
      background: rgba(255, 255, 255, 0.08);
      border: 1px solid var(--glass-border);
      cursor: pointer;
      transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
      gap: 8px;
      text-decoration: none;
      color: var(--text-primary);
    }

    .super-premium-section {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
      gap: 18px;
      margin-top: 14px;
    }

    .premium-card-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
      gap: 16px;
    }

    .premium-card {
      position: relative;
      background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
      border: 1px solid rgba(255, 255, 255, 0.15);
      border-radius: 20px;
      box-shadow: 0 10px 22px rgba(10, 132, 255, 0.16);
      backdrop-filter: blur(40px) saturate(180%);
      -webkit-backdrop-filter: blur(40px) saturate(180%);
      padding: 18px;
      display: flex;
      flex-direction: column;
      gap: 12px;
      overflow: hidden;
      min-height: 190px;
      transition: transform 0.35s ease, box-shadow 0.35s ease;
      cursor: pointer;
    }

    .premium-card:hover {
      transform: translateY(-8px) scale(1.01);
      box-shadow: 0 18px 30px rgba(0, 113, 227, 0.28);
    }

    .premium-card-label {
      text-transform: uppercase;
      font-weight: 700;
      font-size: 10px;
      letter-spacing: 1px;
      color: var(--accent);
    }

    .premium-card h3 {
      font-size: 18px;
      color: var(--text-primary);
      margin: 0;
      text-transform: capitalize;
    }

    .premium-card p {
      color: var(--text-secondary);
      font-size: 13px;
      margin: 0;
      line-height: 1.4;
    }

    .premium-badge {
      align-self: flex-start;
      background: linear-gradient(135deg, #ff9a9e, #ff6b6b);
      color: #fff;
      font-size: 11px;
      font-weight: 700;
      padding: 6px 10px;
      border-radius: 999px;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .premium-card.card-hexagon::before {
      content: '';
      position: absolute;
      top: -15px;
      right: -10px;
      width: 60px;
      height: 60px;
      background: rgba(10, 132, 255, 0.25);
      border-radius: 16px;
      transform: rotate(45deg);
    }

    .premium-card.card-diamond::before {
      content: '';
      position: absolute;
      bottom: -12px;
      left: -12px;
      width: 58px;
      height: 58px;
      background: rgba(255, 204, 0, 0.25);
      border-radius: 50%;
      transform: scale(1.1);
    }

    .premium-card.card-wave::after {
      content: '';
      position: absolute;
      bottom: -18px;
      right: -20px;
      width: 92px;
      height: 92px;
      background: radial-gradient(circle at 30% 30%, rgba(10, 132, 255, 0.3), transparent 50%);
      border-radius: 50%;
    }

    .mobile-menu-item:active {
      transform: scale(0.95);
      background: var(--accent-secondary);
      border-color: var(--accent);
    }
    
    .mobile-menu-item .material-symbols-rounded {
      font-size: 28px;
      color: var(--accent);
      transition: all 0.3s ease;
    }
    
    .mobile-menu-item span {
      font-size: 12px;
      font-weight: 600;
      text-align: center;
      color: var(--text-primary);
    }
    
    .mobile-menu-theme {
      grid-column: 1 / -1;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 16px;
      margin-bottom: 8px;
    }
    
    .mobile-menu-theme-label {
      font-size: 12px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 1px;
      color: var(--text-secondary);
    }
    
    .theme-toggle-mobile {
      width: 56px;
      height: 30px;
      border-radius: 100px;
      background: var(--glass-bg);
      backdrop-filter: blur(20px);
      border: 1px solid var(--glass-border);
      position: relative;
      cursor: pointer;
      transition: all 0.3s ease;
      display: flex;
      align-items: center;
    }
    
    .theme-toggle-mobile-knob {
      width: 24px;
      height: 24px;
      border-radius: 50%;
      background: var(--text-primary);
      position: absolute;
      top: 2px;
      left: 3px;
      transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
      display: flex;
      align-items: center;
      justify-content: center;
    }
    
    .dark .theme-toggle-mobile-knob {
      left: 28px;
      background: #f5f5f7;
    }
    
    .theme-toggle-mobile-knob .material-symbols-rounded {
      font-size: 14px;
      color: var(--surface-primary);
    }
    
    @media (max-width: 480px) {
      .mobile-menu {
        height: 100vh;
        max-height: 100vh;
      }
      .mobile-menu-content {
        grid-template-columns: 1fr 1fr;
      }
    }
    .transition-all-smooth {
      transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    
    /* Like button animation */
    .like-btn {
      transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    
    .like-btn.liked {
      color: #ff2d55;
    }
    
    .like-btn.liked .material-symbols-rounded {
      animation: likePopIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    
    @keyframes likePopIn {
      0% { transform: scale(0.5); }
      50% { transform: scale(1.3); }
      100% { transform: scale(1); }
    }
    
    /* Volume slider */
    .volume-slider {
      width: 80px;
      height: 4px;
      background: rgba(255, 255, 255, 0.2);
      border-radius: 2px;
      appearance: none;
      cursor: pointer;
    }
    
    .volume-slider::-webkit-slider-thumb {
      appearance: none;
      width: 12px;
      height: 12px;
      border-radius: 50%;
      background: var(--text-primary);
      cursor: pointer;
      transition: transform 0.2s ease;
    }
    
    .volume-slider::-webkit-slider-thumb:hover {
      transform: scale(1.2);
    }
    
    /* Search input */
    .search-input {
      background: var(--glass-bg);
      backdrop-filter: blur(20px);
      border: 1px solid var(--glass-border);
      border-radius: 12px;
      padding: 10px 16px 10px 44px;
      font-size: 14px;
      color: var(--text-primary);
      outline: none;
      transition: all 0.3s ease;
      width: 200px;
    }
    
    .search-input::placeholder {
      color: var(--text-secondary);
    }
    
    .search-input:focus {
      border-color: var(--accent);
      box-shadow: 0 0 0 3px var(--accent-secondary);
      width: 260px;
    }
    
    /* PREMIUM COMPONENT CLASSES */
    
    .section-header-premium {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-bottom: 16px;
      padding: 0 16px;
    }
    
    .section-header-premium .material-symbols-rounded {
      font-size: 24px;
      color: var(--accent);
    }
    
    .section-header-premium h2 {
      margin: 0;
      font-size: 18px;
      font-weight: 600;
      color: var(--text-primary);
    }
    
    .premium-interactive {
      cursor: pointer;
      transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    
    .premium-interactive:hover {
      transform: translateY(-4px);
      box-shadow: 0 12px 24px rgba(0, 212, 255, 0.15);
    }
    
    .card-content {
      flex: 1;
      min-width: 0;
      display: flex;
      flex-direction: column;
      justify-content: center;
    }
    
    .card-badge {
      position: absolute;
      top: 8px;
      right: 8px;
      width: 32px;
      height: 32px;
      background: var(--accent);
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      opacity: 0;
      transform: scale(0.8);
      transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    
    .premium-interactive:hover .card-badge {
      opacity: 1;
      transform: scale(1);
    }
    
    .card-badge .material-symbols-rounded {
      color: white;
      font-size: 18px;
    }
    
    .premium-list-item {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 12px 16px;
      border-radius: 8px;
      transition: all 0.2s ease;
      cursor: pointer;
      position: relative;
      overflow: hidden;
    }
    
    .premium-list-item:hover {
      background: rgba(0, 212, 255, 0.05);
    }
    
    .premium-item-number {
      min-width: 28px;
      font-weight: 600;
      color: var(--accent);
      font-size: 12px;
      text-align: center;
    }
    
    .premium-play-btn {
      width: 36px;
      height: 36px;
      border-radius: 50%;
      background: linear-gradient(135deg, var(--accent-secondary), rgba(0, 212, 255, 0.2));
      border: 1px solid var(--accent-secondary);
      color: var(--accent);
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.2s ease;
      flex-shrink: 0;
    }
    
    .premium-play-btn:hover {
      background: var(--accent);
      color: white;
      transform: scale(1.1);
    }
    
    .premium-play-btn .material-symbols-rounded {
      font-size: 18px;
    }
    
    .premium-follow-btn {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      padding: 8px 12px;
      border-radius: 20px;
      border: 1px solid rgba(0, 113, 227, 0.3);
      color: var(--accent);
      cursor: pointer;
      font-weight: 600;
      font-size: 12px;
      transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
      flex-shrink: 0;
      width: 100%;
    }
    
    .premium-follow-btn:hover {
      transform: scale(1.05);
      box-shadow: 0 4px 12px rgba(0, 212, 255, 0.3);
    }
    
    .premium-follow-btn .material-symbols-rounded {
      font-size: 16px;
    }
    
    .premium-delete-btn {
      width: 36px;
      height: 36px;
      border-radius: 8px;
      background: rgba(255, 59, 59, 0.15);
      border: 1px solid rgba(255, 59, 59, 0.3);
      color: #ff3b3b;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.2s ease;
      flex-shrink: 0;
    }
    
    .premium-delete-btn:hover {
      background: rgba(255, 59, 59, 0.3);
      transform: scale(1.1);
    }
    
    .premium-delete-btn .material-symbols-rounded {
      font-size: 18px;
    }
    
    .premium-create-btn {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      width: 100%;
      padding: 14px 16px;
      margin-bottom: 20px;
      border: 2px dashed var(--accent);
      border-radius: 8px;
      background: var(--accent-secondary);
      color: var(--accent);
      cursor: pointer;
      font-weight: 600;
      font-size: 14px;
      transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    
    .premium-create-btn:hover {
      background: rgba(0, 212, 255, 0.2);
      transform: translateY(-2px);
      box-shadow: 0 4px 12px rgba(0, 212, 255, 0.2);
    }
    
    .premium-create-btn .material-symbols-rounded {
      font-size: 20px;
    }
    
    @media (max-width: 768px) {
      .search-input { width: 150px; }
      .search-input:focus { width: 180px; }
      .section-header-premium { margin: 20px 0 12px; }
      .premium-item-number { min-width: 24px; font-size: 11px; }
      .premium-play-btn { width: 32px; height: 32px; }
    }
    
    @media (max-width: 480px) {
      .search-input { width: 130px; }
      .search-input:focus { width: 160px; }
      .section-header-premium { margin: 16px 0 10px; padding: 0 12px; }
      .premium-list-item { padding: 10px 12px; gap: 10px; }
      .premium-item-number { min-width: 22px; font-size: 10px; }
      .premium-play-btn { width: 30px; height: 30px; }
      .premium-follow-btn { padding: 6px 10px; font-size: 11px; }
      .premium-delete-btn { width: 32px; height: 32px; }
    }
    
    /* Login Modal Styles */
    .login-modal-overlay {
      display: none;
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(0, 0, 0, 0.5);
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
      z-index: 300000;
      align-items: center;
      justify-content: center;
      animation: fadeIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    
    .login-modal-overlay.active {
      display: flex;
    }
    
    .login-modal-container {
      position: relative;
      width: 95%;
      max-width: 480px;
      height: 90vh;
      max-height: 700px;
      animation: slideUp 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
      padding-top: 80px;
      display: flex;
      flex-direction: column;
    }

    .install-hint-overlay {
      display: none;
      position: fixed;
      inset: 0;
      z-index: 2300;
      background: rgba(0, 0, 0, 0.72);
      backdrop-filter: blur(18px);
      -webkit-backdrop-filter: blur(18px);
      align-items: center;
      justify-content: center;
      padding: calc(env(safe-area-inset-top, 20px) + 16px) 16px calc(var(--floating-footer-h) + 16px);
      box-sizing: border-box;
      overflow-y: auto;
    }

    .install-hint-overlay.active {
      display: flex;
    }

    .install-hint-modal {
      width: min(96vw, 520px);
      background: rgba(12, 14, 24, 0.98);
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: 24px;
      box-shadow: 0 32px 90px rgba(0, 0, 0, 0.35);
      padding: 24px;
      display: flex;
      flex-direction: column;
      gap: 18px;
    }

    .install-hint-header {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 16px;
    }

    .install-hint-header h2 {
      margin: 0;
      font-size: 1.4rem;
      letter-spacing: -0.02em;
    }

    .install-hint-header p {
      margin: 8px 0 0;
      color: rgba(255, 255, 255, 0.78);
      line-height: 1.5;
      font-size: 0.95rem;
    }

    .install-hint-step {
      display: grid;
      grid-template-columns: auto 1fr;
      gap: 14px;
      align-items: start;
    }

    .install-hint-step-badge {
      width: 36px;
      height: 36px;
      border-radius: 50%;
      background: linear-gradient(135deg, rgba(96, 165, 250, 0.95), rgba(96, 239, 255, 0.9));
      color: #051021;
      font-weight: 700;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: 0.95rem;
    }

    .install-hint-step-title {
      margin: 0 0 4px;
      font-weight: 700;
      font-size: 1rem;
      color: #fff;
    }

    .install-hint-step-text {
      margin: 0;
      color: rgba(255, 255, 255, 0.78);
      font-size: 0.95rem;
      line-height: 1.6;
    }

    .install-hint-actions {
      display: flex;
      justify-content: flex-end;
      gap: 12px;
      flex-wrap: wrap;
    }

    .install-hint-actions .btn-glass {
      min-width: 120px;
    }

    @media (max-width: 520px) {
      .install-hint-modal {
        width: 100%;
        padding: 20px;
      }
    }

    /* Onboarding Modal Styles */
    .onboarding-modal-overlay {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0, 0, 0, 0.5);
      backdrop-filter: blur(10px);
      z-index: 1050;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 20px;
      overflow-y: auto;
    }
    
    .onboarding-modal-container {
      position: relative;
      width: 100%;
      max-width: 600px;
      animation: slideUp 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    }
    
    .onboarding-step {
      animation: fadeIn 0.3s ease;
    }
    
    /* Profile Modal Styles */
    .profile-modal-overlay {
      z-index: 1010;
    }
    
    /* Confirmation Modal Styles */
    .confirm-modal-overlay {
      display: none;
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(0, 0, 0, 0.6);
      backdrop-filter: blur(12px);
      z-index: 2000;
      align-items: center;
      justify-content: center;
      animation: fadeIn 0.3s ease;
    }

    .confirm-modal-overlay.active {
      display: flex;
    }

    .confirm-modal-content {
      position: relative;
      background: var(--glass-bg);
      backdrop-filter: blur(40px);
      border: 1px solid var(--glass-border);
      border-radius: 20px;
      padding: 32px 24px;
      max-width: 380px;
      width: 92%;
      box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
      animation: slideUp 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
      text-align: center;
    }

    .confirm-modal-icon {
      font-size: 56px;
      margin-bottom: 16px;
      display: block;
    }

    .confirm-modal-title {
      font-size: 22px;
      font-weight: 700;
      color: var(--text-primary);
      margin-bottom: 12px;
    }

    .confirm-modal-message {
      font-size: 14px;
      color: var(--text-secondary);
      margin-bottom: 28px;
      line-height: 1.5;
    }

    .confirm-modal-buttons {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
    }

    .confirm-modal-btn {
      padding: 12px 16px;
      border-radius: 12px;
      border: none;
      font-size: 14px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.3s ease;
    }

    .confirm-modal-btn-cancel {
      background: rgba(255, 255, 255, 0.08);
      color: var(--text-primary);
      border: 1px solid rgba(255, 255, 255, 0.12);
    }

    .confirm-modal-btn-cancel:hover {
      background: rgba(255, 255, 255, 0.12);
      transform: translateY(-1px);
    }

    .confirm-modal-btn-confirm {
      background: linear-gradient(135deg, rgba(255, 59, 48, 0.9), rgba(255, 59, 48, 0.7));
      color: white;
      border: 1px solid rgba(255, 59, 48, 0.3);
    }

    .confirm-modal-btn-confirm:hover {
      background: linear-gradient(135deg, rgba(255, 59, 48, 1), rgba(255, 59, 48, 0.85));
      transform: translateY(-1px);
      box-shadow: 0 8px 24px rgba(255, 59, 48, 0.3);
    }

    .confirm-modal-btn-confirm:active {
      transform: translateY(0);
    }

    /* Create Playlist Modal Styles - Premium */
    .create-playlist-modal-overlay {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.6);
      backdrop-filter: blur(12px);
      z-index: 100020 !important; /* must sit above playlist overlay (100010) */
      align-items: center;
      justify-content: center;
      padding: 20px;
      animation: fadeIn 0.3s ease;
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
      touch-action: pan-y;
      pointer-events: auto;
    }

    .create-playlist-modal-overlay.active {
      display: flex;
    }

    .create-playlist-modal-content {
      position: relative;
      background: var(--glass-bg);
      backdrop-filter: blur(40px);
      border: 1px solid var(--glass-border);
      border-radius: 20px;
      padding: 28px 24px 24px;
      max-width: 440px;
      width: 100%;
      max-height: 90vh;
      overflow-y: auto;
      box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
      animation: slideUp 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
      z-index: 100021; /* ensure content sits above overlay and other modals */
    }

    .create-playlist-modal-content::-webkit-scrollbar {
      width: 6px;
    }

    .create-playlist-modal-content::-webkit-scrollbar-track {
      background: transparent;
    }

    .create-playlist-modal-content::-webkit-scrollbar-thumb {
      background: rgba(138, 214, 255, 0.3);
      border-radius: 3px;
    }

    .create-playlist-modal-close {
      position: absolute;
      top: 20px;
      right: 20px;
      width: 40px;
      height: 40px;
      background: rgba(255, 255, 255, 0.08);
      border: 1px solid rgba(255, 255, 255, 0.12);
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      color: var(--text-primary);
      transition: all 0.3s ease;
    }

    .create-playlist-modal-close:hover {
      background: rgba(255, 255, 255, 0.12);
      transform: scale(1.05);
    }

    .create-playlist-modal-close:active {
      transform: scale(0.95);
    }

    .create-playlist-modal-header {
      margin-bottom: 24px;
    }

    .create-playlist-modal-title {
      color: var(--text-primary);
      font-size: 24px;
      font-weight: 700;
      margin: 0 0 8px 0;
      background: linear-gradient(135deg, var(--accent), #34c759);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }

    .create-playlist-modal-subtitle {
      color: var(--text-secondary);
      font-size: 14px;
      margin: 0;
    }

    .create-playlist-form {
      display: flex;
      flex-direction: column;
      gap: 18px;
    }

    .create-playlist-input-group {
      position: relative;
    }

    .create-playlist-label {
      display: block;
      color: var(--text-primary);
      font-weight: 600;
      margin-bottom: 8px;
      font-size: 14px;
    }

    .create-playlist-input,
    .create-playlist-textarea {
      width: 100%;
      padding: 14px 16px;
      background: rgba(255, 255, 255, 0.05);
      border: 1px solid rgba(138, 214, 255, 0.2);
      border-radius: 12px;
      color: var(--text-primary);
      font-size: 14px;
      transition: all 0.3s ease;
      outline: none;
      font-family: inherit;
    }

    .create-playlist-input:focus,
    .create-playlist-textarea:focus {
      background: rgba(255, 255, 255, 0.08);
      border-color: rgba(138, 214, 255, 0.4);
      box-shadow: 0 0 20px rgba(138, 214, 255, 0.1);
    }

    .create-playlist-textarea {
      resize: vertical;
      min-height: 80px;
    }

    .create-playlist-input::placeholder,
    .create-playlist-textarea::placeholder {
      color: rgba(255, 255, 255, 0.4);
    }

    .create-playlist-helper {
      margin-top: 6px;
      color: var(--text-secondary);
      font-size: 12px;
      display: flex;
      align-items: center;
      gap: 4px;
    }

    .create-playlist-color-label {
      display: block;
      color: var(--text-primary);
      font-weight: 600;
      margin-bottom: 12px;
      font-size: 14px;
    }

    .create-playlist-color-grid {
      display: grid;
      grid-template-columns: repeat(5, 1fr);
      gap: 10px;
      margin-bottom: 4px;
    }

    .create-playlist-color-option {
      position: relative;
      cursor: pointer;
    }

    .create-playlist-color-swatch {
      width: 100%;
      height: 60px;
      border: 3px solid transparent;
      border-radius: 12px;
      cursor: pointer;
      transition: all 0.3s ease;
    }

    .create-playlist-color-swatch:hover {
      transform: scale(1.05);
      box-shadow: 0 0 15px rgba(138, 214, 255, 0.3);
    }

    input[type="radio"][name="playlist-theme"]:checked + .create-playlist-color-swatch {
      border-color: rgba(255, 255, 255, 0.8);
      box-shadow: 0 0 20px rgba(138, 214, 255, 0.5);
      transform: scale(1.08);
    }

    .create-playlist-preview {
      margin-top: 24px;
      padding-top: 20px;
      border-top: 1px solid rgba(255, 255, 255, 0.08);
    }

    .create-playlist-preview-label {
      color: var(--text-secondary);
      font-size: 12px;
      margin: 0 0 12px 0;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .create-playlist-preview-card {
      background: rgba(255, 255, 255, 0.04);
      border: 1px solid rgba(138, 214, 255, 0.1);
      border-radius: 12px;
      padding: 12px;
      display: grid;
      grid-template-columns: 60px 1fr;
      gap: 12px;
      align-items: center;
    }

    .create-playlist-preview-cover {
      width: 60px;
      height: 60px;
      border-radius: 8px;
      flex-shrink: 0;
    }

    .create-playlist-preview-info p {
      margin: 0;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .create-playlist-preview-name {
      color: var(--text-primary);
      font-weight: 600;
      font-size: 14px;
    }

    .create-playlist-preview-desc {
      color: var(--text-secondary);
      font-size: 12px;
      margin-top: 4px;
      display: -webkit-box;
      line-clamp: 2;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }

    .create-playlist-buttons {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
      margin-top: 28px;
    }

    .create-playlist-btn {
      padding: 14px 16px;
      border-radius: 12px;
      border: none;
      font-size: 14px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.3s ease;
    }

    .create-playlist-btn-cancel {
      background: rgba(255, 255, 255, 0.08);
      color: var(--text-primary);
      border: 1px solid rgba(255, 255, 255, 0.12);
    }

    .create-playlist-btn-cancel:hover {
      background: rgba(255, 255, 255, 0.12);
      transform: translateY(-2px);
    }

    .create-playlist-btn-cancel:active {
      transform: translateY(0);
    }

    .create-playlist-btn-submit {
      background: linear-gradient(135deg, var(--accent), #34c759);
      color: white;
      border: 1px solid rgba(138, 214, 255, 0.3);
      box-shadow: 0 8px 24px rgba(138, 214, 255, 0.15);
    }

    .create-playlist-btn-submit:hover {
      transform: translateY(-2px);
      box-shadow: 0 12px 32px rgba(138, 214, 255, 0.25);
    }

    .create-playlist-btn-submit:active {
      transform: translateY(0);
    }

    @media (max-width: 768px) {
      .create-playlist-modal-content {
        max-width: 100%;
        padding: 24px 18px 18px;
      }

      .create-playlist-color-grid {
        grid-template-columns: repeat(4, 1fr);
      }
    }
    
    .profile-modal-container {
      z-index: 1011;
      scrollbar-color: rgba(0, 113, 227, 0.5) transparent;
      scrollbar-width: thin;
    }
    
    .profile-modal-container::-webkit-scrollbar {
      width: 6px;
    }
    
    .profile-modal-container::-webkit-scrollbar-track {
      background: transparent;
    }
    
    .profile-modal-container::-webkit-scrollbar-thumb {
      background: rgba(0, 113, 227, 0.5);
      border-radius: 3px;
    }
    
    .profile-modal-container::-webkit-scrollbar-thumb:hover {
      background: rgba(0, 113, 227, 0.8);
    }
    
    /* Profile Modal Body with Scrollable Content */
    .profile-body {
      scrollbar-color: rgba(0, 113, 227, 0.5) transparent;
      scrollbar-width: thin;
    }
    
    .profile-body::-webkit-scrollbar {
      width: 6px;
    }
    
    .profile-body::-webkit-scrollbar-track {
      background: transparent;
    }
    
    .profile-body::-webkit-scrollbar-thumb {
      background: rgba(0, 113, 227, 0.5);
      border-radius: 3px;
    }
    
    .profile-body::-webkit-scrollbar-thumb:hover {
      background: rgba(0, 113, 227, 0.8);
    }
    
    /* Floating Toggle Controls */
    .flip-toggle-controls-floating {
      position: absolute;
      top: 16px;
      left: 50%;
      transform: translateX(-50%);
      z-index: 2002;
      width: calc(100% - 32px);
      max-width: 388px;
      margin-bottom: 12px;
    }
    
    /* 3D Flip Container */
    .flip-container {
      perspective: 1200px;
      width: 100%;
      height: auto;
      transform-style: preserve-3d;
      position: relative;
    }
    
    .flip-card {
      width: 100%;
      height: 100%;
      max-height: calc(90vh - 140px);
      overflow-y: auto;
      overflow-x: hidden;
      transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
      transform-style: preserve-3d;
      transform-origin: center;
      padding: 32px;
      border-radius: 24px;
      background: var(--glass-bg);
      backdrop-filter: blur(40px) saturate(180%);
      -webkit-backdrop-filter: blur(40px) saturate(180%);
      border: 1px solid var(--glass-border);
      box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 0 1px rgba(255, 255, 255, 0.1) inset;
      display: flex;
      flex-direction: column;
    }
    
    .dark .flip-card {
      box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 1px rgba(255, 255, 255, 0.1) inset;
    }
    
    .flip-card-inner {
      backface-visibility: hidden;
      -webkit-backface-visibility: hidden;
      width: 100%;
    }
    
    /* Login Face */
    .login-face {
      transform: rotateY(0deg);
    }
    
    .flip-container.flipped .login-face {
      transform: rotateY(180deg);
      display: none;
      pointer-events: none;
    }
    
    /* Signup Face */
    .signup-face {
      transform: rotateY(-180deg);
      display: none;
      pointer-events: none;
    }
    
    .flip-container.flipped .signup-face {
      transform: rotateY(0deg);
      display: block;
      pointer-events: auto;
    }
    
    /* Inputs */
    .login-input {
      width: 100%;
      padding: 12px 16px;
      border-radius: 12px;
      border: 1px solid var(--glass-border);
      background: var(--glass-bg);
      backdrop-filter: blur(20px);
      color: var(--text-primary) !important;
      -webkit-text-fill-color: var(--text-primary) !important;
      font-size: 16px;
      transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    
    .login-input::placeholder {
      color: var(--text-secondary);
      opacity: 1;
    }
    
    .login-input:focus {
      outline: none;
      border-color: var(--accent);
      box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.1);
      background: rgba(255, 255, 255, 0.8);
      color: var(--text-primary) !important;
      -webkit-text-fill-color: var(--text-primary) !important;
    }
    
    .dark .login-input:focus {
      background: rgba(30, 30, 35, 0.9);
      color: var(--text-primary) !important;
      -webkit-text-fill-color: var(--text-primary) !important;
    }
    
    /* Checkbox */
    .remember-checkbox {
      width: 18px;
      height: 18px;
      border-radius: 6px;
      border: 1px solid var(--glass-border);
      background: var(--glass-bg);
      cursor: pointer;
      accent-color: var(--accent);
      transition: all 0.3s ease;
    }
    
    /* Submit Button */
    .btn-login-submit {
      width: 100%;
      padding: 14px;
      border-radius: 12px;
      border: none;
      background: linear-gradient(135deg, var(--accent) 0%, var(--accent) 100%);
      color: white;
      font-weight: 600;
      font-size: 15px;
      cursor: pointer;
      transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
      box-shadow: 0 4px 15px rgba(0, 113, 227, 0.3);
    }
    
    .btn-login-submit:hover {
      transform: translateY(-2px);
      box-shadow: 0 8px 25px rgba(0, 113, 227, 0.4);
    }
    
    .btn-login-submit:active {
      transform: translateY(0);
    }
    
    /* Primary Button */
    .btn-primary {
      background: var(--accent);
      color: white;
      border: none;
      border-radius: 12px;
      padding: 12px 24px;
      font-weight: 600;
      font-size: 14px;
      cursor: pointer;
      transition: all 0.3s ease;
      box-shadow: 0 4px 15px rgba(0, 113, 227, 0.3);
    }
    
    .btn-primary:hover {
      transform: translateY(-2px);
      box-shadow: 0 8px 25px rgba(0, 113, 227, 0.4);
    }
    
    @keyframes shake {
      0%, 100% { transform: translateX(0); }
      10%, 30%, 50%, 70%, 90% { transform: translateX(-8px); }
      20%, 40%, 60%, 80% { transform: translateX(8px); }
    }
    
    /* Social Buttons */
    .btn-social {
      width: 100%;
      padding: 12px;
      border-radius: 12px;
      border: 1px solid var(--glass-border);
      background: var(--glass-bg);
      cursor: pointer;
      transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--text-primary);
      font-size: 18px;
      position: relative;
      overflow: hidden;
    }
    
    .btn-social::before {
      content: '';
      position: absolute;
      top: 50%;
      left: 50%;
      width: 0;
      height: 0;
      border-radius: 50%;
      background: var(--accent);
      transform: translate(-50%, -50%);
      transition: width 0.4s, height 0.4s;
      opacity: 0.1;
    }
    
    .btn-social:hover::before {
      width: 200px;
      height: 200px;
    }
    
    .btn-social:hover {
      border-color: var(--accent);
      color: var(--accent);
      transform: translateY(-2px) scale(1.05);
      box-shadow: 0 4px 12px rgba(0, 113, 227, 0.2);
    }
    
    .btn-social i {
      position: relative;
      z-index: 1;
      transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    
    .btn-social:hover i {
      transform: scale(1.1);
    }
    
    /* Toggle Controls */
    .flip-toggle-controls {
      margin-top: 32px;
      padding-top: 24px;
      border-top: 1px solid var(--glass-border);
    }
    
    .toggle-group {
      display: flex;
      gap: 8px;
      background: var(--glass-bg);
      backdrop-filter: blur(20px);
      padding: 6px;
      border-radius: 12px;
      border: 1px solid var(--glass-border);
    }
    
    .toggle-btn {
      flex: 1;
      padding: 10px 12px;
      border: none;
      border-radius: 8px;
      background: transparent;
      color: var(--text-secondary);
      cursor: pointer;
      font-size: 13px;
      font-weight: 600;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 4px;
      transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
      white-space: nowrap;
      position: relative;
    }
    
    .toggle-btn .material-symbols-rounded {
      font-size: 18px;
    }
    
    .toggle-btn:hover {
      color: var(--text-primary);
    }
    
    .toggle-btn.active {
      background: var(--accent);
      color: white;
      box-shadow: 0 4px 12px rgba(0, 113, 227, 0.3);
      position: relative;
    }
    
    .toggle-btn.active::after {
      content: '';
      position: absolute;
      bottom: -4px;
      left: 50%;
      transform: translateX(-50%);
      width: 4px;
      height: 4px;
      border-radius: 50%;
      background: var(--accent);
      opacity: 0.5;
    }
    
    .toggle-label {
      display: inline;
      font-size: 11px;
      line-height: 1.2;
      margin-top: 2px;
    }
    
    /* Close Button */
    .btn-close-modal {
      position: absolute;
      top: 16px;
      right: 16px;
      width: 40px;
      height: 40px;
      border-radius: 50%;
      border: 1px solid var(--glass-border);
      background: var(--glass-bg);
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
      color: var(--text-primary);
      z-index: 2003;
    }
    
    .btn-close-modal:hover {
      background: var(--accent-secondary);
      border-color: var(--accent);
      color: var(--accent);
      transform: rotate(90deg) scale(1.1);
    }
    
    /* Animations */
    @keyframes fadeIn {
      from { opacity: 0; }
      to { opacity: 1; }
    }
    
    @keyframes slideUp {
      from {
        opacity: 0;
        transform: translateY(30px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }
    
    /* Responsive for Modal */
    @media (max-width: 480px) {
      .flip-card {
        padding: 24px;
      }
      
      .toggle-btn {
        padding: 8px 10px;
        font-size: 12px;
      }
      
      .login-modal-container {
        width: 98%;
        max-width: 100%;
        height: 95vh;
        max-height: none;
        padding-top: 70px;
      }
      
      .flip-toggle-controls-floating {
        width: calc(100% - 20px);
        max-width: none;
      }
      
      .flip-container {
        margin-top: 60px !important;
      }
      
      .btn-social {
        padding: 10px;
        font-size: 16px;
      }
    }
    
    @media (max-width: 768px) {
      .login-modal-container {
        width: 98%;
        max-width: 100%;
        height: 95vh;
        max-height: none;
        padding-top: 70px;
      }
      
      .flip-card {
        padding: 28px;
        max-height: calc(95vh - 140px);
        overflow-y: auto;
      }
      
      .toggle-btn {
        padding: 9px 11px;
        font-size: 12px;
        gap: 3px;
      }
      
      .toggle-label {
        font-size: 10px;
      }
      
      .btn-social {
        padding: 11px;
      }
    }

    /* iOS installed PWA: avoid fixed 90/95vh centering under the status bar. */
    @media (max-width: 768px) {
      html.is-pwa-standalone .login-modal-overlay {
        align-items: flex-start;
        justify-content: flex-start;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: calc(env(safe-area-inset-top, 0px) + 8px) 8px calc(env(safe-area-inset-bottom, 0px) + 16px);
        box-sizing: border-box;
      }

      html.is-pwa-standalone .login-modal-container {
        width: 100%;
        height: calc(100vh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 16px);
        max-height: none;
        min-height: 0;
        padding-top: 76px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
      }

      html.is-pwa-standalone .flip-toggle-controls-floating {
        top: 8px;
        width: calc(100% - 16px);
      }

      html.is-pwa-standalone .flip-container {
        margin-top: 8px !important;
      }

      html.is-pwa-standalone .flip-card {
        max-height: none;
      }

      html.is-pwa-standalone .btn-close-modal {
        top: 8px;
        right: 8px;
      }
    }

    @supports (height: 100dvh) {
      @media (max-width: 768px) {
        html.is-pwa-standalone .mobile-menu {
          height: calc(100dvh - env(safe-area-inset-top, 0px));
          max-height: calc(100dvh - env(safe-area-inset-top, 0px));
        }

        html.is-pwa-standalone .login-modal-container {
          height: calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 16px);
        }
      }
    }

    /* iOS installed PWA: keep every modal content below the top safe area. */
    @media (max-width: 768px) {
      html.is-pwa-standalone .modal-overlay,
      html.is-pwa-standalone .recents-modal-overlay,
      html.is-pwa-standalone .premium-modal-overlay,
      html.is-pwa-standalone .search-hub-overlay,
      html.is-pwa-standalone .artists-modal-overlay,
      html.is-pwa-standalone .playlist-modal-overlay,
      html.is-pwa-standalone .playlist-detail-modal-overlay,
      html.is-pwa-standalone .artist-profile-modal-overlay,
      html.is-pwa-standalone .section-modal-overlay,
      html.is-pwa-standalone .search-modal-overlay,
      html.is-pwa-standalone .create-playlist-modal-overlay,
      html.is-pwa-standalone .onboarding-modal-overlay,
      html.is-pwa-standalone .profile-modal-overlay,
      html.is-pwa-standalone .settings-modal-overlay,
      html.is-pwa-standalone .confirm-modal-overlay,
      html.is-pwa-standalone #loot-box-cooldown-modal,
      html.is-pwa-standalone #premium-theme-shop-modal {
        box-sizing: border-box;
        padding-top: max(8px, env(safe-area-inset-top, 0px));
      }

      /* The player modal already reserves its own header safe area internally. */
      html.is-pwa-standalone .player-modal-overlay {
        padding-top: 0;
      }
    }
    
    @media (min-width: 769px) and (max-width: 1024px) {
      .login-modal-container {
        width: 90%;
        max-width: 480px;
        height: 85vh;
        max-height: 650px;
      }
    }
    
    /* ===== PREMIUM NEW CARD SHAPES ===== */

    /* Top Creators Grid - Artist cards layout */
    .top-creators-grid {
      display: grid;
      justify-content: center;
      grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
      gap: 16px;
      margin-bottom: 16px;
      width: 100%;
      max-width: 1160px;
      margin-left: auto;
      margin-right: auto;
    }

    .top-creators-arrow-indicator {
      display: flex;
      justify-content: center;
      align-items: center;
      margin-bottom: 18px;
      cursor: pointer;
      color: var(--accent);
      transition: transform 0.2s ease, opacity 0.2s ease;
      font-size: 28px;
    }

    .top-creators-arrow-indicator:hover {
      transform: translateY(2px);
      opacity: 0.9;
    }

    .top-creators-arrow-indicator.hidden {
      display: none;
    }

    @media (max-width: 1200px) {
      .top-creators-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
      }
    }

    @media (max-width: 768px) {
      .top-creators-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
      }
    }

    @media (max-width: 480px) {
      .top-creators-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
      }
    }

    /* Rectangular Horizontal Cards - Trending Now */
    .card-rectangular {
      width: 240px;
      height: 100px;
      border-radius: 16px;
      background: rgba(255, 255, 255, 0.08);
      backdrop-filter: blur(40px) saturate(180%);
      border: 1px solid rgba(255, 255, 255, 0.15);
      cursor: pointer;
      position: relative;
      overflow: hidden;
      transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 16px;
      box-shadow: 0 8px 24px rgba(10, 132, 255, 0.08);
    }

    .card-rectangular::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: linear-gradient(135deg, rgba(10, 132, 255, 0.15) 0%, rgba(0, 212, 255, 0.08) 100%);
      opacity: 0;
      transition: opacity 0.4s ease;
    }

    .card-rectangular:hover {
      background: rgba(255, 255, 255, 0.12);
      border-color: rgba(10, 132, 255, 0.3);
      transform: translateY(-4px);
      box-shadow: 0 12px 32px rgba(10, 132, 255, 0.15);
    }

    .card-rectangular:hover::before {
      opacity: 1;
    }

    .card-rectangular-content {
      position: relative;
      z-index: 1;
      flex: 1;
    }

    .card-rectangular-rank {
      font-size: 24px;
      font-weight: 800;
      background: linear-gradient(135deg, var(--accent) 0%, #00d4ff 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
      margin-right: 12px;
    }

    .card-rectangular-title {
      font-size: 13px;
      font-weight: 600;
      color: var(--text-primary);
      margin-bottom: 4px;
    }

    .card-rectangular-subtitle {
      font-size: 11px;
      color: var(--text-secondary);
    }

    .card-rectangular-icon {
      font-size: 36px;
      color: var(--accent);
      opacity: 0.7;
    }
    
    /* ===== PREMIUM CLICKABLE INDICATOR ===== */
    .player-clickable-indicator {
      position: absolute;
      bottom: 8px;
      right: 8px;
      width: 32px;
      height: 32px;
      border-radius: 50%;
      background: linear-gradient(135deg, rgba(0, 113, 227, 0.35), rgba(0, 113, 227, 0.2));
      border: 1.5px solid rgba(0, 113, 227, 0.5);
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--accent);
      font-size: 16px;
      animation: pulse-indicator 2s ease-in-out infinite;
      z-index: 5;
      backdrop-filter: blur(20px);
      box-shadow: 0 4px 12px rgba(0, 113, 227, 0.2);
    }
    
    @keyframes pulse-indicator {
      0%, 100% {
        transform: scale(1);
        opacity: 1;
      }
      50% {
        transform: scale(1.2);
        opacity: 0.7;
      }
    }
    
    /* ===== PLAYER MODAL PREMIUM REDESIGN ===== */
    .player-modal-section-content {
      padding: 0 4px;
    }
    
    .player-modal-carousel-card {
      width: 100%;
      padding: 14px;
      border-radius: 14px;
      background: rgba(0, 113, 227, 0.08);
      border: 1.5px solid rgba(0, 113, 227, 0.15);
      cursor: pointer;
      transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
      display: flex;
      flex-direction: column;
      gap: 10px;
      align-items: center;
      text-align: center;
      position: relative;
      overflow: hidden;
    }
    
    .player-modal-carousel-card::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, transparent 100%);
      pointer-events: none;
      border-radius: 14px;
    }
    
    .player-modal-carousel-card:hover {
      background: rgba(0, 113, 227, 0.15);
      border-color: rgba(0, 113, 227, 0.35);
      transform: translateY(-6px);
      box-shadow: 0 12px 32px rgba(0, 113, 227, 0.18);
    }

    .player-modal-carousel-card:hover .play-badge,
    .player-modal-carousel-card:hover .follow-badge,
    .player-modal-carousel-card:hover .add-playlist-badge {
      opacity: 1 !important;
    }
    
    .player-modal-discover-card {
      padding: 18px;
      border-radius: 16px;
      background: rgba(0, 113, 227, 0.08);
      border: 1.5px solid rgba(0, 113, 227, 0.15);
      text-align: center;
      cursor: pointer;
      transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
      position: relative;
      overflow: hidden;
    }
    
    .player-modal-discover-card::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, transparent 100%);
      pointer-events: none;
      border-radius: 16px;
    }
    
    .player-modal-discover-card:hover {
      background: rgba(0, 113, 227, 0.15);
      border-color: rgba(0, 113, 227, 0.35);
      transform: translateY(-6px);
      box-shadow: 0 12px 32px rgba(0, 113, 227, 0.18);
    }
    
    .player-modal-artist-card {
      display: flex;
      gap: 14px;
      align-items: center;
      padding: 16px;
      background: rgba(0, 113, 227, 0.08);
      border-radius: 16px;
      border: 1px solid rgba(0, 113, 227, 0.15);
      margin-bottom: 12px;
      transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
      position: relative;
      overflow: hidden;
    }
    
    .player-modal-artist-card::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, transparent 100%);
      pointer-events: none;
      border-radius: 16px;
    }
    
    .player-modal-artist-card:hover {
      background: rgba(0, 113, 227, 0.15);
      border-color: rgba(0, 113, 227, 0.35);
      transform: translateY(-3px);
      box-shadow: 0 8px 24px rgba(0, 113, 227, 0.15);
    }
    
    /* ===== PREMIUM CLICKABLE INDICATOR ===== */
    .player-clickable-indicator {
      position: absolute;
      bottom: 8px;
      right: 8px;
      width: 32px;
      height: 32px;
      border-radius: 50%;
      background: linear-gradient(135deg, rgba(0, 113, 227, 0.35), rgba(0, 113, 227, 0.2));
      border: 1.5px solid rgba(0, 113, 227, 0.5);
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--accent);
      font-size: 16px;
      animation: pulse-indicator 2s ease-in-out infinite;
      z-index: 5;
      backdrop-filter: blur(20px);
      box-shadow: 0 4px 12px rgba(0, 113, 227, 0.2);
    }
    
    @keyframes pulse-indicator {
      0%, 100% {
        transform: scale(1);
        opacity: 1;
      }
      50% {
        transform: scale(1.2);
        opacity: 0.7;
      }
    }
    
    /* ===== PLAYER MODAL PREMIUM ===== */
    
    .player-modal-overlay {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(0, 0, 0, 0.6);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      z-index: 200002;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
      display: flex;
      align-items: flex-end;
    }

    /* The artist profile is a child modal opened from a track modal. Keep it
       above every player layer and give its own header an isolated stacking
       context so the underlying track header cannot cover the back button. */
    #artist-profile-modal-overlay {
      z-index: 300000 !important;
      isolation: isolate;
    }

    #artist-profile-modal-overlay > div {
      position: relative;
      z-index: 1;
      padding-top: 0 !important;
    }

    #artist-profile-modal-overlay > div > div:first-child {
      position: sticky !important;
      top: 0 !important;
      z-index: 20 !important;
      min-height: calc(var(--player-modal-header-height) + env(safe-area-inset-top, 0px));
      margin: -20px 0 30px !important;
      padding: calc(16px + env(safe-area-inset-top, 0px)) 16px 16px !important;
      background: rgba(0, 0, 0, 0.96) !important;
      border-radius: 0 !important;
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    }
    
    .player-modal-overlay.active {
      opacity: 1;
      pointer-events: auto;
    }

    /* Desktop: keep overlay full-screen but center the content column instead of stretching it to the left edge */
    @media (min-width: 900px) {
      .player-modal-overlay,
      .track-detail-overlay {
        align-items: flex-start;
        padding: 0;
      }

      /* Outer wrapper - fill viewport */
      .player-modal-overlay > div,
      .track-detail-overlay > div {
        min-height: 100vh !important;
        max-height: 100vh;
        width: 100%;
        max-width: none;
        margin: 0;
        overflow: auto;
        box-sizing: border-box;
        display: block;
        padding: 0 !important;
      }

      /* Keep the actual content centered and readable on large screens */
      .player-modal-overlay > div > div,
      .track-detail-overlay > div > div:not(.player-modal-header),
      .player-modal-inner {
        width: min(100%, 820px) !important;
        max-width: 820px !important;
        margin: 0 auto !important;
        border-radius: 0 !important;
      }
    }

    /* Default small-screen inner container */
    .player-modal-inner {
      max-width: 600px;
      margin: 0 auto;
      width: 100%;
      padding: 0 20px;
    }

    /* Desktop: add internal padding to centered content area */
    @media (min-width: 900px) {
      .player-modal-inner { padding: 24px; }
    }

    /* Remove extra top gap before sticky header */
    .player-modal-overlay > div,
    .track-detail-overlay > div {
      padding-top: 0 !important;
    }

    /* Add small internal offset so header isn't glued to the edge */
    .player-modal-overlay > div .player-modal-inner {
      padding-top: 12px !important;
    }

    /* Reliable fixed header: stick to viewport top and reserve space for scrollable content
       Increase default header height slightly for better visual balance */
    :root { --player-modal-header-height: 72px; }
    @media (max-width: 420px) { :root { --player-modal-header-height: 68px; } }
    @media (min-width: 768px) and (max-width: 1023px) { :root { --player-modal-header-height: 64px; } }

    .player-modal-header { position: relative; }

    .player-modal-overlay.active .player-modal-header,
    .track-detail-overlay.active .player-modal-header,
    .playlist-modal-overlay.active .player-modal-header,
    .playlist-detail-modal-overlay.active .player-modal-header {
      position: fixed !important;
      top: 0 !important;
      left: 0 !important;
      right: 0 !important;
      margin: 0 !important;
      margin-bottom: 0 !important;
      border-radius: 0 !important;
      z-index: 120 !important;
      background: rgba(0,0,0,0.45) !important;
      -webkit-backdrop-filter: blur(8px) !important;
      backdrop-filter: blur(8px) !important;
      padding: 8px 16px !important;
      height: var(--player-modal-header-height) !important;
      display: flex !important;
      align-items: center !important;
      gap: 12px !important;
    }

    .playlist-modal-overlay.active .playlist-modal-scroll {
      position: absolute !important;
      inset: 0 !important;
      padding: 0 !important;
      overflow-y: auto !important;
      box-sizing: border-box;
    }

    .playlist-modal-overlay.active .playlist-modal-body {
      position: relative;
      z-index: 1;
      padding-top: 8px !important;
    }

    .playlist-modal-overlay.active .playlist-modal-header {
      position: sticky !important;
      top: 0 !important;
      z-index: 120 !important;
      padding-top: calc(18px + env(safe-area-inset-top, 0px)) !important;
      padding-bottom: 18px !important;
      border-radius: 0 !important;
      min-height: calc(var(--player-modal-header-height) + env(safe-area-inset-top, 0px)) !important;
    }

    .playlist-modal-overlay.active .playlist-modal-close {
      margin-top: max(0px, env(safe-area-inset-top, 0px)) !important;
      position: relative;
      z-index: 1;
    }

    .playlist-discover-suggestions-grid {
      display: grid !important;
      grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
      gap: 14px !important;
      width: 100%;
      align-items: stretch;
    }

    .playlist-discover-suggestions-grid > .music-card,
    .playlist-discover-suggestions-grid > .carousel-item {
      width: 100% !important;
      min-width: 0 !important;
      max-width: none !important;
    }

    /* Playlist header stays pinned while only the modal body scrolls. */
    .playlist-modal-overlay.active > .playlist-modal-scroll > .playlist-modal > .player-modal-header {
      position: sticky !important;
      top: 0 !important;
      width: 100% !important;
      height: var(--player-modal-header-height) !important;
      margin: 0 !important;
      z-index: 120 !important;
      transform: none !important;
      will-change: auto !important;
    }

    /* The overlay already owns the viewport; keep the panel in the scroll flow. */
    .playlist-modal-overlay.active .playlist-modal {
      position: fixed !important;
      left: 0 !important;
      top: 0 !important;
      bottom: 0 !important;
      width: min(90vw, 500px) !important;
      min-height: 100vh !important;
      border-radius: 0 !important;
      border-right: 1px solid rgba(255, 255, 255, 0.1) !important;
      box-shadow: 24px 0 60px rgba(0, 0, 0, 0.38) !important;
      transform: translateX(0) !important;
    }

    .playlist-detail-modal-overlay.active > div {
      padding-top: calc(var(--player-modal-header-height) + 20px) !important;
      box-sizing: border-box;
    }

    .player-modal-header .btn-close-modal {
      flex: 0 0 auto;
      width: 40px !important;
      height: 40px !important;
      min-width: 40px !important;
      min-height: 40px !important;
      padding: 0 !important;
      border-radius: 10px !important;
      display: inline-flex !important;
      align-items: center !important;
      justify-content: center !important;
    }

    .player-modal-header > div {
      min-width: 0;
      overflow: hidden;
    }

    .player-modal-header > div p {
      margin-top: 0;
      margin-bottom: 2px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    @media (max-width: 480px) {
      .player-modal-header {
        gap: 12px !important;
        padding: 8px 12px !important;
      }

      .player-modal-header .btn-close-modal {
        width: 40px !important;
        height: 40px !important;
      }
    }

    @media (max-width: 768px) {
      .player-modal-overlay.active .player-modal-header,
      .track-detail-overlay.active .player-modal-header,
      .playlist-detail-modal-overlay.active .player-modal-header {
        top: 0 !important;
        box-sizing: border-box !important;
        height: calc(var(--player-modal-header-height) + env(safe-area-inset-top, 0px)) !important;
        padding-top: calc(8px + env(safe-area-inset-top, 0px)) !important;
        padding-bottom: 8px !important;
      }

      .player-modal-overlay.active > div,
      .track-detail-overlay.active > div,
      .playlist-detail-modal-overlay.active > div {
        padding-top: calc(var(--player-modal-header-height) + env(safe-area-inset-top, 0px)) !important;
      }

      html.is-pwa-standalone .player-modal-overlay.active .player-modal-header,
      html.is-pwa-standalone .track-detail-overlay.active .player-modal-header,
      html.is-pwa-standalone .playlist-modal-overlay.active .player-modal-header,
      html.is-pwa-standalone .playlist-detail-modal-overlay.active .player-modal-header {
        top: 0 !important;
        height: calc(var(--player-modal-header-height) + env(safe-area-inset-top, 0px)) !important;
        padding-top: calc(8px + env(safe-area-inset-top, 0px)) !important;
        padding-bottom: 8px !important;
      }

      html.is-pwa-standalone .playlist-modal-overlay.active .playlist-modal-scroll {
        padding: 0 !important;
      }

      html.is-pwa-standalone .playlist-modal-overlay.active .playlist-modal-body {
        padding-top: 8px !important;
      }

      html.is-pwa-standalone .playlist-modal-overlay.active .playlist-modal-header {
        padding-top: calc(14px + env(safe-area-inset-top, 0px)) !important;
        min-height: calc(var(--player-modal-header-height) + env(safe-area-inset-top, 0px)) !important;
      }

      html.is-pwa-standalone .playlist-detail-modal-overlay.active > div {
        padding-top: calc(var(--player-modal-header-height) + env(safe-area-inset-top, 0px) + 20px) !important;
      }
    }

    /* Floating header when moved to body */
    .player-modal-header--floating {
      position: fixed !important;
      top: 0 !important;
      left: 0 !important;
      right: 0 !important;
      margin: 0 !important;
      z-index: 120000 !important;
      border-radius: 0 !important;
      background: rgba(0,0,0,0.88) !important; /* make header mostly opaque to hide underlying artefacts */
      -webkit-backdrop-filter: blur(8px) !important;
      backdrop-filter: blur(8px) !important;
      padding: calc(12px + env(safe-area-inset-top, 0px)) 18px 12px !important;
      height: calc(var(--player-modal-header-height) + env(safe-area-inset-top, 0px)) !important;
      min-height: calc(var(--player-modal-header-height) + env(safe-area-inset-top, 0px)) !important;
      align-items: center !important;
      display: flex !important;
      gap: 16px !important;
    }

    /* iOS Safari/PWA: the floating back button must clear the status bar. */
    @media (max-width: 768px) {
      .player-modal-header--floating {
        top: 0 !important;
        padding-top: calc(8px + env(safe-area-inset-top, 0px)) !important;
        padding-bottom: 8px !important;
        height: calc(var(--player-modal-header-height) + env(safe-area-inset-top, 0px)) !important;
        min-height: calc(var(--player-modal-header-height) + env(safe-area-inset-top, 0px)) !important;
      }

      .player-modal-overlay.active > div,
      .track-detail-overlay.active > div,
      .playlist-detail-modal-overlay.active > div {
        padding-top: calc(var(--player-modal-header-height) + env(safe-area-inset-top, 0px)) !important;
      }
    }

    /* Mobile player modal: reserve the complete floating-header footprint. */
    @media (max-width: 768px) {
      .player-modal-overlay.active {
        display: block !important;
        overflow: hidden !important;
      }

      .player-modal-overlay.active > div {
        width: 100% !important;
        height: 100dvh !important;
        min-height: 100dvh !important;
        max-height: none !important;
        margin: 0 !important;
        box-sizing: border-box !important;
        overflow-y: auto !important;
        padding-top: calc(var(--player-modal-header-height) + env(safe-area-inset-top, 0px)) !important;
        padding-bottom: calc(20px + var(--floating-footer-h) + env(safe-area-inset-bottom, 0px)) !important;
        -webkit-overflow-scrolling: touch;
      }

      .player-modal-overlay.active .player-modal-inner {
        width: 100% !important;
        max-width: 600px !important;
        box-sizing: border-box;
        padding: 0 16px !important;
      }
    }

    @supports not (height: 100dvh) {
      @media (max-width: 768px) {
        .player-modal-overlay.active > div {
          height: 100vh !important;
          min-height: 100vh !important;
        }
      }
    }

    /* While a modal is open, reduce visual impact of the player nav buttons underneath */
    body.modal-open #player-nav-buttons,
    body.modal-open #player-nav-buttons .player-nav-button-group {
      background: transparent !important;
      box-shadow: none !important;
    }

    /* Hide any pseudo-element or accidental overlay from those nav buttons while modal is open */
    body.modal-open #player-nav-buttons::before,
    body.modal-open #player-nav-buttons::after,
    body.modal-open #player-nav-buttons .player-nav-button-group::before,
    body.modal-open #player-nav-buttons .player-nav-button-group::after {
      display: none !important;
      content: none !important;
    }

    /* Reserve space at top of scroll container so content isn't hidden under fixed header */
    .player-modal-overlay.active > div,
    .track-detail-overlay.active > div {
      padding-top: calc(var(--player-modal-header-height) + env(safe-area-inset-top, 0px)) !important;
    }

    @media (max-width: 768px) {
      .player-modal-overlay.active > div {
        padding-top: calc(var(--player-modal-header-height) + env(safe-area-inset-top, 0px)) !important;
      }
    }
    
    .player-modal {
      position: fixed;
      bottom: 0;
      left: 0;
      right: 0;
      max-height: 95vh;
      height: auto;
      background: var(--glass-bg);
      backdrop-filter: blur(50px) saturate(200%);
      -webkit-backdrop-filter: blur(50px) saturate(200%);
      border: 1px solid var(--glass-border);
      border-bottom: none;
      border-radius: 32px 32px 0 0;
      z-index: 200003;
      display: flex;
      flex-direction: column;
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
      animation: slideUpPlayer 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
      transform: translateY(100%);
      opacity: 0;
      pointer-events: none;
    }
    
    .player-modal.active {
      transform: translateY(0);
      opacity: 1;
      pointer-events: auto;
    }
    
    .player-modal {
      border-image: linear-gradient(90deg, var(--frame-color-start, transparent), var(--frame-color-mid, transparent), var(--frame-color-end, transparent)) 1;
      box-shadow: 0 0 0 transparent;
      transition: box-shadow 0.35s ease, border-image-source 0.35s ease;
    }

    body.pulse-engine-active #player-modal {
      box-shadow: 0 0 36px var(--frame-glow, rgba(255, 255, 255, 0.08)), inset 0 0 24px var(--frame-glow, rgba(255, 255, 255, 0.12));
      animation: playerModalPulse 1.8s ease-in-out infinite;
    }

    body.pulse-engine-active.pulse-beat #player-modal {
      transform: translateY(-1px);
    }

    @keyframes playerModalPulse {
      0%, 100% {
        box-shadow: 0 0 26px var(--frame-glow, rgba(255, 255, 255, 0.08)), inset 0 0 18px var(--frame-glow, rgba(255, 255, 255, 0.1));
      }
      50% {
        box-shadow: 0 0 48px var(--frame-glow, rgba(255, 255, 255, 0.28)), inset 0 0 28px var(--frame-glow, rgba(255, 255, 255, 0.18));
      }
    }

    @keyframes slideUpPlayer {
      from {
        transform: translateY(100%);
        opacity: 0;
      }
      to {
        transform: translateY(0);
        opacity: 1;
      }
    }

    .player-modal-close-btn {
      position: fixed;
      top: 12px;
      left: 12px;
      width: 44px;
      height: 44px;
      border-radius: 50%;
      background: rgba(0, 0, 0, 0.08);
      border: 1px solid rgba(255, 255, 255, 0.12);
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--text-secondary);
      z-index: 2001;
      transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
      flex-shrink: 0;
    }
    
    .player-modal-close-btn:hover {
      background: rgba(0, 113, 227, 0.15);
      border-color: var(--accent);
      color: var(--accent);
      transform: scale(1.1) rotate(-90deg);
    }
    
    .player-modal-close-btn .material-symbols-rounded {
      font-size: 24px;
    }
    
    .player-modal-content {
      flex: 1;
      overflow-y: auto;
      padding: 24px;
      padding-top: 80px;
      padding-bottom: 60px;
      max-width: 600px;
      margin: 0 auto;
      width: 100%;
    }
    
    /* Header Section - Cover & Controls */
    .player-modal-header-section {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 20px;
      margin-bottom: 32px;
      padding-bottom: 24px;
      border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }
    
    .player-modal-cover {
      width: 200px;
      height: 200px;
      border-radius: 24px;
      box-shadow: 0 20px 60px rgba(0, 113, 227, 0.25);
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      background-size: cover;
      background-position: center;
      background-repeat: no-repeat;
      transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    
    .player-modal-cover:hover {
      transform: scale(1.05) translateY(-4px);
      box-shadow: 0 30px 80px rgba(0, 113, 227, 0.35);
    }
    
    .player-modal-track-info {
      text-align: center;
      width: 100%;
    }
    
    .player-modal-title {
      font-size: 28px;
      font-weight: 700;
      margin: 0 0 6px 0;
      color: var(--text-primary);
      line-height: 1.2;
      letter-spacing: -0.5px;
    }
    
    .player-modal-artist {
      font-size: 16px;
      color: var(--text-secondary);
      margin: 0;
      font-weight: 500;
    }
    
    /* Premium Controls */
    .player-modal-controls-premium {
      display: flex;
      gap: 16px;
      justify-content: center;
      width: 100%;
      flex-wrap: wrap;
    }
    
    .player-modal-btn-control {
      min-width: 56px;
      min-height: 56px;
      border-radius: 50%;
      background: linear-gradient(135deg, rgba(0, 113, 227, 0.18), rgba(0, 113, 227, 0.08));
      border: 1.5px solid rgba(0, 113, 227, 0.3);
      cursor: pointer;
      color: var(--accent);
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
      flex-shrink: 0;
      font-size: 24px;
      backdrop-filter: blur(20px);
      box-shadow: 0 4px 12px rgba(0, 113, 227, 0.08);
    }
    
    .player-modal-btn-control:hover {
      background: linear-gradient(135deg, rgba(0, 113, 227, 0.28), rgba(0, 113, 227, 0.15));
      border-color: rgba(0, 113, 227, 0.6);
      transform: scale(1.15) translateY(-4px);
      box-shadow: 0 12px 32px rgba(0, 113, 227, 0.2);
    }
    
    .player-modal-btn-control:active {
      transform: scale(0.95);
    }
    
    .player-modal-btn-control.liked {
      color: #ff2d55;
      background: linear-gradient(135deg, rgba(255, 45, 85, 0.15), rgba(255, 45, 85, 0.08));
      border-color: rgba(255, 45, 85, 0.3);
    }
    
    .player-modal-btn-control.liked:hover {
      background: linear-gradient(135deg, rgba(255, 45, 85, 0.25), rgba(255, 45, 85, 0.15));
      border-color: rgba(255, 45, 85, 0.6);
      box-shadow: 0 12px 32px rgba(255, 45, 85, 0.2);
    }
    
    .player-modal-btn-play {
      min-width: 72px;
      min-height: 72px;
      background: linear-gradient(135deg, var(--accent) 0%, #0a84ff 100%);
      border: none;
      color: white;
      box-shadow: 0 8px 28px rgba(0, 113, 227, 0.3);
    }
    
    .player-modal-btn-play:hover {
      background: linear-gradient(135deg, #0084ff 0%, #0094ff 100%);
      transform: scale(1.1) translateY(-6px);
      box-shadow: 0 16px 40px rgba(0, 113, 227, 0.4);
    }
    
    /* Progress Section */
    .player-modal-progress-section {
      margin-bottom: 24px;
    }

    .player-modal-progress-actions {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .player-modal-progress-action {
      width: 38px;
      height: 38px;
      padding: 0;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border: 1px solid rgba(255, 255, 255, 0.16);
      border-radius: 14px;
      background: linear-gradient(145deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.045));
      color: rgba(255, 255, 255, 0.9);
      box-shadow: 0 8px 22px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.08);
      backdrop-filter: blur(16px);
      -webkit-backdrop-filter: blur(16px);
      cursor: pointer;
      transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
    }

    .player-modal-progress-action:hover {
      transform: translateY(-2px);
      border-color: rgba(10, 132, 255, 0.65);
      background: linear-gradient(145deg, rgba(10, 132, 255, 0.28), rgba(10, 132, 255, 0.1));
    }

    .player-modal-progress-action:active {
      transform: scale(0.94);
    }

    .player-modal-progress-action .material-symbols-rounded {
      font-size: 20px;
    }

    .player-modal-progress-action.liked {
      color: #ff2d55;
      border-color: rgba(255, 45, 85, 0.42);
      background: linear-gradient(145deg, rgba(255, 45, 85, 0.2), rgba(255, 45, 85, 0.07));
    }

    .player-modal-artist-row {
      width: 100%;
      display: grid;
      grid-template-columns: 1fr auto 1fr;
      align-items: center;
      gap: 10px;
    }

    .player-modal-artist-row > .player-modal-progress-action:first-child {
      justify-self: start;
    }

    .player-modal-artist-row > .player-modal-progress-action:last-child {
      justify-self: end;
    }

    .player-modal-artist-row > #player-modal-artist {
      margin-left: 0 !important;
      margin-right: 0 !important;
    }

    .player-modal-controls-cluster {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      width: 100%;
    }

    .player-modal-controls-cluster > div[style*="align-items: center"][style*="justify-content: center"] {
      gap: 10px !important;
      margin: 0 !important;
      flex: 0 0 auto;
    }

    .player-modal-controls-cluster > div[style*="grid-template-columns: repeat(4"] {
      display: flex !important;
      gap: 8px !important;
      margin: 0 !important;
      flex: 0 0 auto;
    }

    .player-modal-controls-cluster > div[style*="grid-template-columns: repeat(4"] button {
      width: 82px;
      min-height: 42px;
      padding: 5px 6px !important;
      gap: 2px !important;
      border-radius: 14px !important;
    }

    .player-modal-controls-cluster > div[style*="grid-template-columns: repeat(4"] {
      display: contents !important;
    }

    .player-modal-controls-cluster > div[style*="align-items: center"][style*="justify-content: center"] {
      order: 1;
    }

    .player-modal-controls-cluster .player-modal-download-action {
      order: 0;
    }

    .player-modal-controls-cluster .player-modal-share-action {
      order: 2;
    }

    .player-modal-playback-controls {
      gap: 10px !important;
    }

    .player-modal-controls-cluster .player-modal-download-action,
    .player-modal-controls-cluster .player-modal-share-action {
      width: 82px;
      min-height: 42px;
      padding: 5px 6px !important;
      gap: 2px !important;
      border-radius: 14px !important;
    }

    @media (max-width: 768px) {
      .player-modal-controls-cluster {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
      }

      .player-modal-controls-cluster > .player-modal-playback-controls {
        order: 1;
        width: 100%;
        margin-bottom: 0 !important;
      }

      .player-modal-controls-cluster > div[style*="grid-template-columns: repeat(4"] {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        order: 2;
        width: min(100%, 320px);
        gap: 10px !important;
        margin: 0 auto 24px !important;
      }

      .player-modal-controls-cluster .player-modal-download-action,
      .player-modal-controls-cluster .player-modal-share-action {
        width: 100%;
        min-width: 0;
        height: 46px;
        min-height: 46px;
        padding: 0 10px !important;
        border-radius: 12px !important;
      }
    }

    .player-modal-add-action,
    .player-modal-download-action,
    .player-modal-share-action {
      position: relative;
      display: inline-flex !important;
      flex-direction: row !important;
      align-items: center;
      justify-content: center;
      gap: 6px !important;
      width: 118px !important;
      height: 36px !important;
      min-height: 36px !important;
      padding: 0 12px !important;
      border: 1px solid rgba(255, 255, 255, 0.2) !important;
      background: linear-gradient(135deg, rgba(255,255,255,0.14), rgba(255,255,255,0.045)) !important;
      color: #fff;
      box-shadow: 0 8px 22px rgba(0,0,0,0.22), inset 0 1px 0 rgba(255,255,255,0.1);
      backdrop-filter: blur(16px);
      -webkit-backdrop-filter: blur(16px);
    }

    .player-modal-add-action {
      clip-path: polygon(0 9px, 10px 0, 100% 0, 100% 100%, 0 100%);
    }

    .player-modal-download-action {
      clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 9px, 100% 100%, 0 100%);
    }

    .player-modal-share-action {
      clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 9px, 100% 100%, 0 100%);
    }

    .player-modal-add-action .material-symbols-rounded,
    .player-modal-download-action > .material-symbols-rounded {
      font-size: 18px !important;
    }

    .player-modal-add-action-label,
    .player-modal-download-action-label,
    .player-modal-share-action-label {
      color: rgba(255,255,255,0.78);
      font-size: 10px;
      font-weight: 600;
      letter-spacing: .02em;
      white-space: nowrap;
    }

    .player-modal-add-action:hover,
    .player-modal-download-action:hover {
      border-color: var(--glow-primary, rgba(255,255,255,0.5)) !important;
      background: linear-gradient(135deg, rgba(10,132,255,0.28), rgba(255,255,255,0.08)) !important;
      transform: translateY(-2px);
    }
    
    .player-modal-progress-bar {
      width: 100%;
      height: 6px;
      background: rgba(255, 255, 255, 0.1);
      border-radius: 3px;
      overflow: hidden;
      cursor: pointer;
      margin-bottom: 12px;
    }
    
    .player-modal-progress-fill {
      height: 100%;
      background: linear-gradient(90deg, var(--accent), #0a84ff);
      border-radius: 3px;
      width: 35%;
      transition: width 0.1s linear;
      box-shadow: 0 0 12px rgba(0, 113, 227, 0.5);
    }
    
    .player-modal-time-display {
      display: flex;
      justify-content: space-between;
      font-size: 12px;
      color: var(--text-secondary);
      font-weight: 500;
    }
    
    /* Navigation Controls */
    .player-modal-navigation {
      display: flex;
      gap: 12px;
      justify-content: center;
      margin-bottom: 32px;
    }
    
    .player-modal-nav-btn {
      min-width: 48px;
      min-height: 48px;
      border-radius: 12px;
      background: rgba(0, 113, 227, 0.12);
      border: 1px solid rgba(0, 113, 227, 0.2);
      cursor: pointer;
      color: var(--accent);
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
      font-size: 20px;
    }
    
    .player-modal-nav-btn:hover {
      background: rgba(0, 113, 227, 0.25);
      border-color: rgba(0, 113, 227, 0.5);
      transform: translateY(-3px);
      box-shadow: 0 8px 20px rgba(0, 113, 227, 0.15);
    }
    
    /* Player Modal Tabs */
    .player-modal-tabs {
      display: flex;
      justify-content: center;
      gap: 8px;
      margin: 20px 0 16px 0;
      padding: 0 20px;
    }
    
    .player-modal-tab {
      background: rgba(255, 255, 255, 0.1);
      border: none;
      color: rgba(255, 255, 255, 0.7);
      padding: 8px 16px;
      border-radius: 20px;
      font-size: 14px;
      font-weight: 500;
      cursor: pointer;
      transition: all 0.3s ease;
      backdrop-filter: blur(10px);
    }
    
    .player-modal-tab.active {
      background: rgba(255, 255, 255, 0.2);
      color: #fff;
    }
    
    .player-modal-tab:hover {
      background: rgba(255, 255, 255, 0.15);
      color: #fff;
    }
    
    /* Tab Content */
    .player-modal-tab-content {
      flex: 1;
      overflow-y: auto;
      padding: 0 20px 20px 20px;
    }
    
    .player-modal-tab-pane {
      display: none;
      animation: fadeIn 0.3s ease;
    }
    
    .player-modal-tab-pane.active {
      display: block;
    }
    
    /* Lyrics */
    .player-modal-lyrics {
      color: #fff;
      line-height: 1.6;
      font-size: 16px;
      white-space: pre-line;
    }
    
    .player-modal-lyrics p {
      margin-bottom: 16px;
    }
    
    /* Credits */
    .player-modal-credits {
      color: #fff;
    }
    
    .credit-item {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 12px 0;
      border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .credit-item:last-child {
      border-bottom: none;
    }
    
    .credit-label {
      font-weight: 500;
      color: rgba(255, 255, 255, 0.8);
    }
    
    .credit-value {
      color: #fff;
      text-align: right;
    }
    
    /* Related Tracks */
    .player-modal-related {
      display: flex;
      flex-direction: column;
      gap: 12px;
    }
    
    .related-track {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 12px;
      background: rgba(255, 255, 255, 0.05);
      border-radius: 12px;
      cursor: pointer;
      transition: all 0.3s ease;
      backdrop-filter: blur(10px);
    }
    
    .related-track:hover {
      background: rgba(255, 255, 255, 0.1);
      transform: translateY(-2px);
    }
    
    .related-track-cover {
      width: 48px;
      height: 48px;
      border-radius: 8px;
      flex-shrink: 0;
    }
    
    .related-track-info {
      flex: 1;
      min-width: 0;
    }
    
    .related-track-title,
    .cosmic-track-title {
      color: #fff;
      font-weight: 600;
      font-size: 16px;
      margin-bottom: 4px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    
    .related-track-artist {
      color: rgba(255, 255, 255, 0.7);
      font-size: 14px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    
    .related-track-play {
      background: rgba(255, 255, 255, 0.2);
      border: none;
      width: 40px;
      height: 40px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: all 0.3s ease;
      backdrop-filter: blur(10px);
    }
    
    .related-track-play:hover {
      background: rgba(255, 255, 255, 0.3);
      transform: scale(1.05);
    }
    
    .related-track-play .material-symbols-rounded {
      color: #fff;
      font-size: 20px;
    }
    
    /* Sections Container */
    .player-modal-sections {
      display: flex;
      flex-direction: column;
      gap: 32px;
    }
    
    .player-modal-section {
      display: flex;
      flex-direction: column;
      gap: 16px;
    }
    
    .player-modal-section-header {
      display: flex;
      align-items: center;
      gap: 12px;
      padding-bottom: 12px;
      border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }
    
    .player-modal-section-header .material-symbols-rounded {
      font-size: 24px;
      color: var(--accent);
    }
    
    .player-modal-section-header h2 {
      margin: 0;
      font-size: 18px;
      font-weight: 600;
      color: var(--text-primary);
      letter-spacing: -0.3px;
    }
    
    .player-modal-section-content {
      padding: 0 4px;
    }
    
    /* Lyrics */
    .player-modal-lyrics-container {
      padding: 20px;
      background: rgba(0, 113, 227, 0.05);
      border-radius: 16px;
      border: 1px solid rgba(0, 113, 227, 0.1);
      backdrop-filter: blur(20px);
    }
    
    .player-modal-lyric-line {
      margin: 12px 0;
      font-size: 15px;
      line-height: 1.6;
      color: var(--text-primary);
      font-weight: 500;
    }
    
    /* Artist Card */
    .player-modal-artist-card {
      display: flex;
      gap: 16px;
      align-items: flex-start;
      padding: 16px;
      background: rgba(0, 113, 227, 0.08);
      border-radius: 16px;
      border: 1px solid rgba(0, 113, 227, 0.15);
      margin-bottom: 12px;
      transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
      position: relative;
      overflow: hidden;
    }
    
    .player-modal-artist-info {
      display: flex;
      gap: 12px;
      flex: 1;
    }
    
    .player-modal-artist-avatar {
      width: 80px;
      height: 80px;
      border-radius: 50%;
      background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
      flex-shrink: 0;
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    }
    
    .player-modal-artist-details {
      display: flex;
      flex-direction: column;
      justify-content: center;
    }
    
    .player-modal-artist-details h3 {
      margin: 0;
      font-size: 16px;
      font-weight: 600;
      color: var(--text-primary);
    }
    
    .player-modal-artist-details p {
      margin: 4px 0 0 0;
      font-size: 13px;
      color: var(--text-secondary);
    }
    
    .player-modal-subscribe-btn {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      padding: 12px 16px;
      border-radius: 20px;
      border: 1px solid rgba(0, 113, 227, 0.3);
      color: var(--accent);
      cursor: pointer;
      font-weight: 600;
      font-size: 13px;
      transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
      flex-shrink: 0;
    }
    
    .player-modal-subscribe-btn:hover {
      background: linear-gradient(135deg, var(--accent), var(--accent));
      color: white;
      border-color: var(--accent);
      box-shadow: 0 8px 20px rgba(0, 113, 227, 0.2);
      transform: translateY(-2px);
    }
    
    .player-modal-subscribe-btn.subscribed {
      background: linear-gradient(135deg, var(--accent), #0a84ff);
      color: white;
      border-color: var(--accent);
    }
    
    .player-modal-artist-bio {
      font-size: 13px;
      line-height: 1.6;
      color: var(--text-secondary);
      margin: 0;
      padding: 0 4px;
    }
    
    /* Carousel */
    .player-modal-carousel {
      display: flex;
      gap: 12px;
      overflow-x: auto;
      scroll-snap-type: x mandatory;
      scroll-behavior: smooth;
      padding: 8px 0 16px 0;
      -webkit-overflow-scrolling: touch;
      scrollbar-width: none;
    }
    
    .player-modal-carousel::-webkit-scrollbar {
      display: none;
    }
    
    .player-modal-carousel > div {
      display: flex;
      gap: 12px;
      flex-wrap: nowrap;
    }
    
    .player-modal-carousel-item {
      scroll-snap-align: start;
      flex-shrink: 0;
      width: 140px;
    }
    
    .player-modal-carousel-card {
      width: 100%;
      padding: 12px;
      border-radius: 12px;
      background: rgba(0, 113, 227, 0.08);
      border: 1px solid rgba(0, 113, 227, 0.15);
      cursor: pointer;
      transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
      display: flex;
      flex-direction: column;
      gap: 8px;
      align-items: center;
      text-align: center;
    }
    
    .player-modal-carousel-card:hover {
      background: rgba(0, 113, 227, 0.15);
      border-color: rgba(0, 113, 227, 0.3);
      transform: translateY(-4px);
      box-shadow: 0 8px 20px rgba(0, 113, 227, 0.15);
    }
    
    .player-modal-carousel-icon {
      width: 52px;
      height: 52px;
      border-radius: 10px;
      background: linear-gradient(135deg, rgba(0, 113, 227, 0.25), rgba(0, 113, 227, 0.15));
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 24px;
      color: var(--accent);
    }
    
    .player-modal-carousel-title {
      font-size: 12px;
      font-weight: 600;
      color: var(--text-primary);
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      width: 100%;
    }
    
    .player-modal-carousel-artist {
      font-size: 10px;
      color: var(--text-secondary);
      font-weight: 500;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      width: 100%;
    }
    
    /* Grid */
    .player-modal-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 12px;
    }
    
    .player-modal-discover-card {
      padding: 16px;
      border-radius: 14px;
      background: rgba(0, 113, 227, 0.08);
      border: 1px solid rgba(0, 113, 227, 0.15);
      text-align: center;
      cursor: pointer;
      transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    
    .player-modal-discover-card:hover {
      background: rgba(0, 113, 227, 0.15);
      border-color: rgba(0, 113, 227, 0.3);
      transform: translateY(-4px);
      box-shadow: 0 8px 20px rgba(0, 113, 227, 0.15);
    }
    
    .player-modal-discover-icon {
      font-size: 32px;
      margin-bottom: 8px;
    }
    
    .player-modal-discover-card h3 {
      margin: 0 0 4px 0;
      font-size: 14px;
      font-weight: 600;
      color: var(--text-primary);
    }
    
    .player-modal-discover-card p {
      margin: 0;
      font-size: 11px;
      color: var(--text-secondary);
    }
    
    /* Responsive */
    @media (max-width: 480px) {
      .player-modal {
        border-radius: 24px 24px 0 0;
      }
      
      .player-modal-content {
        padding: 20px 16px;
        padding-top: 70px;
      }
      
      .player-modal-cover {
        width: 160px;
        height: 160px;
      }
      
      .player-modal-title {
        font-size: 22px;
      }
      
      .player-modal-artist {
        font-size: 14px;
      }
      
      .player-modal-controls-premium {
        gap: 12px;
      }
      
      .player-modal-btn-control {
        min-width: 48px;
        min-height: 48px;
        font-size: 20px;
      }
      
      .player-modal-btn-play {
        min-width: 60px;
        min-height: 60px;
      }
      
      .player-modal-grid {
        grid-template-columns: 1fr;
      }
    }

    /* Track modal premium reader: theme-aware glass, neon frame and two-view navigation. */
    #player-modal-overlay {
      background: radial-gradient(circle at 50% 26%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 34%), rgba(2, 4, 10, 0.78) !important;
      backdrop-filter: blur(28px) saturate(150%) !important;
      -webkit-backdrop-filter: blur(28px) saturate(150%) !important;
      overscroll-behavior: contain;
    }

    #player-modal-overlay > div:not(.player-modal-header) {
      max-height: 100dvh !important;
      padding-top: calc(var(--player-modal-header-height) + env(safe-area-inset-top, 0px) + 12px) !important;
      padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px)) !important;
    }

    #player-modal-overlay .player-modal-inner {
      width: min(100%, 680px) !important;
      padding: 22px clamp(18px, 4vw, 34px) 56px !important;
      margin: 0 auto !important;
    }

    /* Compact lecture view: keep the complete player visible without a second scroll. */
    #player-modal-overlay .player-modal-inner:not(.is-info-view) {
      padding-top: 8px !important;
      padding-bottom: 24px !important;
    }

    #player-modal-overlay .player-modal-inner:not(.is-info-view) .player-modal-content-toggle {
      margin-bottom: 8px;
    }

    #player-modal-overlay .player-modal-inner:not(.is-info-view) .player-modal-cover {
      width: min(58vw, 270px) !important;
      height: min(58vw, 270px) !important;
      margin: 4px auto 14px !important;
      border-radius: 24px !important;
    }

    #player-modal-overlay .player-modal-inner:not(.is-info-view) > div[style*="text-align: center"][style*="margin-bottom: 40px"] {
      margin-bottom: 14px !important;
    }

    #player-modal-overlay .player-modal-inner:not(.is-info-view) #player-modal-title-display {
      font-size: clamp(23px, 4vw, 30px) !important;
    }

    #player-modal-overlay .player-modal-inner:not(.is-info-view) > div[style*="margin-bottom: 30px"] {
      margin-bottom: 14px !important;
    }

    #player-modal-overlay .player-modal-inner:not(.is-info-view) > div[style*="align-items: center"][style*="justify-content: center"] {
      gap: 12px !important;
      margin-bottom: 16px !important;
    }

    #player-modal-overlay .player-modal-inner:not(.is-info-view) > div[style*="grid-template-columns: repeat(4"] {
      margin-bottom: 18px !important;
    }

    #player-modal-overlay .player-modal-inner:not(.is-info-view) > div[style*="grid-template-columns: repeat(4"] button {
      min-height: 62px;
      padding: 8px 6px !important;
      gap: 4px !important;
    }

    /* Keep the complete reading view visible on short mobile screens. */
    #player-modal-overlay .player-modal-inner:not(.is-info-view) #player-modal-cover {
      width: min(58vw, 270px, 32dvh) !important;
      height: min(58vw, 270px, 32dvh) !important;
      margin: 4px auto 12px !important;
    }

    #player-modal-overlay .player-modal-header,
    .player-modal-header--floating {
      background: rgba(5, 7, 13, 0.58) !important;
      border-bottom: 1px solid rgba(255,255,255,0.08) !important;
      box-shadow: 0 12px 34px rgba(0,0,0,0.18) !important;
      backdrop-filter: blur(24px) saturate(150%) !important;
      -webkit-backdrop-filter: blur(24px) saturate(150%) !important;
    }

    #player-modal-overlay .player-modal-header .btn-close-modal,
    .player-modal-header--floating .btn-close-modal {
      width: 46px !important;
      height: 46px !important;
      border-radius: 16px !important;
      background: rgba(255,255,255,0.045) !important;
      border-color: rgba(255,255,255,0.22) !important;
      color: #fff !important;
      transition: transform .25s ease, background .25s ease, border-color .25s ease !important;
    }

    #player-modal-overlay .player-modal-header .btn-close-modal:hover,
    .player-modal-header--floating .btn-close-modal:hover {
      background: rgba(255,255,255,0.13) !important;
      border-color: var(--glow-primary, var(--accent)) !important;
      transform: translateX(-3px) !important;
    }

    #player-modal-overlay .player-modal-header > div p:first-child,
    .player-modal-header--floating > div p:first-child {
      color: rgba(255,255,255,0.58) !important;
      letter-spacing: .08em;
      text-transform: uppercase;
    }

    #player-modal-overlay .player-modal-header > div p:last-child,
    .player-modal-header--floating > div p:last-child {
      max-width: min(48vw, 360px);
      overflow: hidden;
      color: #fff !important;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .player-modal-view-toggle {
      display: inline-flex;
      gap: 3px;
      padding: 3px;
      border: 1px solid rgba(255,255,255,0.14);
      border-radius: 999px;
      background: rgba(255,255,255,0.045);
    }

    .player-modal-view-toggle button {
      min-height: 30px;
      padding: 0 11px;
      border: 0;
      border-radius: 999px;
      background: transparent;
      color: rgba(255,255,255,0.55);
      cursor: pointer;
      font: inherit;
      font-size: 11px;
      font-weight: 700;
      letter-spacing: .04em;
      text-transform: uppercase;
    }

    .player-modal-content-toggle {
      display: flex;
      justify-content: center;
      width: 100%;
      margin: -4px 0 18px;
    }

    .player-modal-view-toggle button.active,
    .player-modal-view-toggle button:hover {
      background: rgba(255,255,255,0.14);
      color: #fff;
    }

    #player-modal-overlay .player-modal-cover {
      width: min(76vw, 360px) !important;
      height: min(76vw, 360px) !important;
      margin: 12px auto 28px !important;
      border-radius: 28px !important;
      border: 1px solid var(--glow-primary, rgba(255,255,255,.32)) !important;
      box-shadow: 0 0 0 1px var(--accent-secondary, rgba(255,255,255,.12)), 0 0 28px var(--glow-primary, rgba(255,255,255,.2)), 0 28px 80px rgba(0,0,0,.48) !important;
      animation: modalCoverNeonPulse 1.8s ease-in-out infinite;
    }

    #player-modal-overlay #player-modal-title-display {
      margin-bottom: 6px !important;
      color: #fff !important;
      font-size: clamp(26px, 5vw, 38px) !important;
      letter-spacing: -.03em;
    }

    #player-modal-overlay #player-modal-artist {
      margin-bottom: 8px !important;
      padding: 0 !important;
      border: 0 !important;
      background: transparent !important;
      color: var(--accent, #fff) !important;
      font-size: 16px !important;
    }

    #player-modal-overlay .player-modal-inner > div[style*="margin-bottom: 30px"] > div:first-child {
      height: 5px !important;
      margin-bottom: 10px !important;
      background: rgba(255,255,255,0.12) !important;
      border-radius: 999px !important;
    }

    #player-modal-overlay #player-modal-progress {
      background: linear-gradient(90deg, var(--accent), var(--glow-primary, #fff)) !important;
      box-shadow: 0 0 16px var(--glow-primary, rgba(255,255,255,.4));
    }

    #player-modal-overlay .player-modal-inner > div[style*="align-items: center"][style*="justify-content: center"] button {
      width: 52px !important;
      height: 52px !important;
      min-width: 52px !important;
      min-height: 52px !important;
      background: rgba(255,255,255,0.07) !important;
      border: 1px solid rgba(255,255,255,0.2) !important;
      color: #fff !important;
      box-shadow: 0 8px 22px rgba(0,0,0,.2) !important;
      backdrop-filter: blur(18px);
    }

    #player-modal-overlay .player-modal-inner > div[style*="align-items: center"][style*="justify-content: center"] button:hover {
      background: rgba(255,255,255,0.16) !important;
      border-color: var(--glow-primary, #fff) !important;
      transform: translateY(-3px) scale(1.06);
    }

    #player-modal-overlay .player-modal-inner > div[style*="align-items: center"][style*="justify-content: center"] button:nth-child(3) {
      width: 76px !important;
      height: 76px !important;
      background: linear-gradient(135deg, var(--accent), var(--glow-primary, #55d6ff)) !important;
      box-shadow: 0 0 26px var(--glow-primary, rgba(255,255,255,.28)) !important;
    }

    .player-modal-playback-controls button:nth-child(3) {
      background: rgba(255,255,255,0.12) !important;
      border: 1px solid rgba(255,255,255,0.28) !important;
      box-shadow: 0 0 24px rgba(255,255,255,0.12), inset 0 1px 0 rgba(255,255,255,0.12) !important;
      color: #fff !important;
    }

    .player-modal-playback-controls button:nth-child(3):hover {
      background: rgba(255,255,255,0.2) !important;
      border-color: rgba(255,255,255,0.48) !important;
    }

    #player-modal-overlay .player-modal-inner > div[style*="grid-template-columns: repeat(4"] {
      gap: 10px !important;
    }

    #player-modal-overlay .player-modal-inner > div[style*="grid-template-columns: repeat(4"] button {
      min-height: 82px;
      border-radius: 18px !important;
      background: rgba(255,255,255,0.055) !important;
      border-color: rgba(255,255,255,0.14) !important;
      color: #fff !important;
      backdrop-filter: blur(18px);
      transition: transform .25s ease, background .25s ease, border-color .25s ease !important;
    }

    #player-modal-overlay .player-modal-inner > div[style*="grid-template-columns: repeat(4"] button:hover {
      background: rgba(255,255,255,0.13) !important;
      border-color: var(--glow-primary, rgba(255,255,255,.35)) !important;
      transform: translateY(-4px);
    }

    #player-modal-overlay .player-modal-inner > div[style*="grid-template-columns: repeat(4"] button > span:first-child {
      font-size: 23px !important;
    }

    #player-modal-overlay #player-modal-info-card {
      border-color: rgba(255,255,255,0.14) !important;
      border-radius: 22px !important;
      background: rgba(255,255,255,0.055) !important;
      backdrop-filter: blur(20px);
    }

    #player-modal-overlay #player-modal-info-card {
      display: none !important;
    }

    #player-modal-overlay #player-modal-info-card.is-visible {
      display: block !important;
      position: relative !important;
      width: 100% !important;
      max-height: none !important;
      margin: 0 !important;
      animation: modalInfoReveal .35s cubic-bezier(.22, 1, .36, 1) both;
    }

    /* Compact the lower controls on short mobile viewports. */
    @media (max-width: 600px) and (max-height: 700px) {
      #player-modal-overlay .player-modal-inner:not(.is-info-view) {
        padding-bottom: 8px !important;
      }

      #player-modal-overlay .player-modal-inner:not(.is-info-view) > div[style*="margin-bottom: 30px"] {
        margin-bottom: 8px !important;
      }

      #player-modal-overlay .player-modal-inner:not(.is-info-view) > div[style*="align-items: center"][style*="justify-content: center"] {
        gap: 8px !important;
        margin-bottom: 10px !important;
      }

      #player-modal-overlay .player-modal-inner:not(.is-info-view) > div[style*="align-items: center"][style*="justify-content: center"] button {
        width: 30px !important;
        height: 30px !important;
        min-width: 30px !important;
        min-height: 30px !important;
      }

      #player-modal-overlay .player-modal-inner:not(.is-info-view) > div[style*="align-items: center"][style*="justify-content: center"] button:nth-child(3) {
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        min-height: 44px !important;
      }

      #player-modal-overlay .player-modal-inner:not(.is-info-view) > div[style*="grid-template-columns: repeat(4"] {
        gap: 8px !important;
        margin-bottom: 4px !important;
      }

      #player-modal-overlay .player-modal-inner:not(.is-info-view) > div[style*="grid-template-columns: repeat(4"] button {
        min-height: 38px !important;
        padding: 3px 4px !important;
        gap: 2px !important;
        border-radius: 11px !important;
      }

      #player-modal-overlay .player-modal-inner:not(.is-info-view) > div[style*="grid-template-columns: repeat(4"] button > span:first-child {
        font-size: 16px !important;
      }

      #player-modal-overlay .player-modal-inner:not(.is-info-view) > div[style*="grid-template-columns: repeat(4"] button > span:not(:first-child) {
        font-size: 9px !important;
      }

      .player-modal-controls-cluster {
        gap: 6px;
        flex-wrap: wrap;
      }

      .player-modal-playback-controls {
        order: 1;
        flex: 1 0 100%;
        width: 100%;
        margin-bottom: 0 !important;
      }

      .player-modal-controls-cluster .player-modal-download-action,
      .player-modal-controls-cluster .player-modal-share-action {
        order: 2;
        flex: 0 0 118px;
      }

      .player-modal-controls-cluster > div[style*="align-items: center"][style*="justify-content: center"] {
        gap: 6px !important;
      }

      .player-modal-playback-controls button {
        width: 30px !important;
        height: 30px !important;
        min-width: 30px !important;
        min-height: 30px !important;
      }

      .player-modal-playback-controls button:nth-child(3) {
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        min-height: 44px !important;
      }

      .player-modal-controls-cluster > div[style*="grid-template-columns: repeat(4"] {
        gap: 5px !important;
      }

      .player-modal-controls-cluster > div[style*="grid-template-columns: repeat(4"] button {
        width: 66px;
        min-height: 36px !important;
        border-radius: 11px !important;
      }

      .player-modal-controls-cluster .player-modal-download-action,
      .player-modal-controls-cluster .player-modal-share-action {
        width: 118px !important;
        min-height: 36px !important;
        border-radius: 11px !important;
      }

      .player-modal-controls-cluster .player-modal-download-action {
        width: 118px !important;
        height: 36px !important;
        min-height: 36px !important;
      }
    }

    @media (max-width: 600px) {
      #player-modal-overlay .player-modal-inner:not(.is-info-view) .player-modal-cover {
        width: min(50vw, 220px) !important;
        height: min(50vw, 220px) !important;
        margin-bottom: 10px !important;
      }

      #player-modal-overlay .player-modal-inner:not(.is-info-view) > div[style*="text-align: center"][style*="margin-bottom: 40px"] {
        margin-bottom: 8px !important;
      }

      #player-modal-overlay .player-modal-inner:not(.is-info-view) > div[style*="margin-bottom: 30px"] {
        margin-bottom: 8px !important;
      }

      #player-modal-overlay .player-modal-inner:not(.is-info-view) > div[style*="align-items: center"][style*="justify-content: center"] {
        margin-bottom: 8px !important;
      }

      #player-modal-overlay .player-modal-inner:not(.is-info-view) > div[style*="grid-template-columns: repeat(4"] {
        margin-bottom: 8px !important;
      }
    }

    #player-modal-overlay .player-modal-inner.is-info-view > * {
      display: none !important;
    }

    #player-modal-overlay .player-modal-inner.is-info-view > .player-modal-content-toggle,
    #player-modal-overlay .player-modal-inner.is-info-view > #player-modal-info-card.is-visible {
      display: block !important;
    }

    #player-modal-overlay .player-modal-inner.is-info-view > .player-modal-content-toggle {
      display: flex !important;
    }

    #player-modal-overlay .player-modal-view-enter {
      animation: playerModalViewEnter .24s cubic-bezier(.22, 1, .36, 1) both;
    }

    @keyframes playerModalViewEnter {
      from { opacity: .35; transform: translate3d(0, 10px, 0); }
      to { opacity: 1; transform: translate3d(0, 0, 0); }
    }

    #player-modal-overlay .player-modal-inner.is-queue-view > * {
      display: none !important;
    }

    #player-modal-overlay .player-modal-inner.is-queue-view > .player-modal-content-toggle,
    #player-modal-overlay .player-modal-inner.is-queue-view > #player-modal-queue-view {
      display: block !important;
    }

    #player-modal-overlay .player-modal-inner.is-queue-view > .player-modal-content-toggle {
      display: flex !important;
    }

    .player-modal-queue-view {
      display: none;
      width: 100%;
      min-height: min(62vh, 520px);
      padding: 22px 0 12px;
    }

    .player-modal-queue-heading {
      display: flex;
      align-items: end;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 16px;
    }

    .player-modal-queue-heading h2 {
      margin: 0;
      color: #fff;
      font-size: 24px;
      letter-spacing: -.02em;
    }

    .player-modal-queue-heading span {
      color: rgba(255,255,255,.52);
      font-size: 12px;
    }

    .player-modal-queue-list {
      display: grid;
      gap: 9px;
      max-height: min(58vh, 470px);
      overflow-y: auto;
      padding-right: 4px;
      scrollbar-width: thin;
    }

    .player-modal-queue-item {
      display: flex;
      align-items: center;
      gap: 12px;
      width: 100%;
      min-height: 64px;
      padding: 9px 12px;
      border: 1px solid rgba(255,255,255,.11);
      border-radius: 17px;
      background: rgba(255,255,255,.045);
      color: #fff;
      cursor: pointer;
      text-align: left;
      transition: transform .22s ease, background .22s ease, border-color .22s ease;
    }

    .player-modal-queue-item:hover,
    .player-modal-queue-item:focus-visible {
      border-color: var(--glow-primary, rgba(255,255,255,.4));
      background: rgba(255,255,255,.11);
      transform: translateX(4px);
      outline: none;
    }

    .player-modal-queue-item.is-current {
      border-color: var(--glow-primary, rgba(255,255,255,.5));
      background: var(--accent-secondary, rgba(255,255,255,.12));
      box-shadow: 0 0 18px var(--glow-secondary, rgba(255,255,255,.08));
    }

    .player-modal-queue-index {
      width: 26px;
      flex: 0 0 26px;
      color: rgba(255,255,255,.48);
      font-size: 11px;
      font-weight: 700;
      text-align: center;
    }

    .player-modal-queue-item.is-current .player-modal-queue-index {
      color: var(--accent, #fff);
    }

    .track-detail-queue-toggle {
      margin: 0;
      min-width: 0;
    }

    .track-detail-queue-toggle:hover,
    .track-detail-queue-toggle:focus-visible,
    .track-detail-queue-toggle[aria-expanded="true"] {
      border-color: var(--glow-primary, rgba(255,255,255,.42));
      background: var(--accent-secondary, rgba(255,255,255,.12));
      outline: none;
    }

    .track-detail-queue-toggle:active {
      transform: scale(.97);
    }

    .track-detail-queue-count {
      display: inline-grid;
      min-width: 19px;
      height: 19px;
      place-items: center;
      padding: 0 5px;
      border-radius: 999px;
      background: var(--accent, rgba(255,255,255,.2));
      color: #10131b;
      font-size: 10px;
      line-height: 1;
    }

    .track-detail-queue-popover {
      position: fixed;
      z-index: 120001;
      top: max(76px, env(safe-area-inset-top) + 64px);
      right: max(8px, env(safe-area-inset-right));
      left: auto;
      box-sizing: border-box;
      width: min(390px, calc(100vw - 16px));
      min-width: 0;
      max-height: min(70vh, 560px);
      overflow: hidden;
      padding: 16px;
      border: 1px solid rgba(255,255,255,.14);
      border-radius: 20px;
      background: color-mix(in srgb, var(--surface, #111827) 88%, transparent);
      box-shadow: 0 20px 70px rgba(0,0,0,.48), 0 0 28px var(--glow-secondary, rgba(255,255,255,.08));
      color: #fff;
      -webkit-backdrop-filter: blur(22px);
      backdrop-filter: blur(22px);
    }

    .track-detail-queue-popover[hidden] {
      display: none;
    }

    .track-detail-queue-popover-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 12px;
    }

    .track-detail-queue-popover-header h2 {
      margin: 0;
      color: #fff;
      font-size: 18px;
    }

    .track-detail-queue-popover-header p {
      margin: 4px 0 0;
      color: rgba(255,255,255,.58);
      font-size: 12px;
    }

    .track-detail-queue-popover-header button {
      display: grid;
      width: 34px;
      height: 34px;
      place-items: center;
      border: 1px solid rgba(255,255,255,.12);
      border-radius: 50%;
      background: rgba(255,255,255,.06);
      color: #fff;
      cursor: pointer;
    }

    .track-detail-queue-popover .player-modal-queue-list {
      box-sizing: border-box;
      width: 100%;
      min-width: 0;
      max-height: min(54vh, 420px);
    }

    .track-detail-queue-popover .player-modal-queue-item {
      box-sizing: border-box;
      width: 100%;
      min-width: 0;
    }

    .track-detail-queue-popover .player-modal-queue-copy {
      overflow: hidden;
    }

    @media (max-width: 480px) {
      .track-detail-queue-popover {
        top: max(68px, env(safe-area-inset-top) + 56px);
        right: max(8px, env(safe-area-inset-right));
        width: calc(100vw - 16px);
        max-width: calc(100vw - 16px);
        padding: 12px;
      }

      .track-detail-queue-popover .player-modal-queue-item {
        gap: 8px;
        padding: 8px;
      }

      .track-detail-queue-popover .player-modal-queue-index {
        width: 20px;
        flex-basis: 20px;
      }

      .track-detail-queue-popover .player-modal-queue-cover {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
      }
    }

    .player-modal-queue-cover {
      width: 44px;
      height: 44px;
      flex: 0 0 44px;
      border-radius: 12px;
      background-position: center;
      background-size: cover;
      background-color: rgba(255,255,255,.09);
    }

    .player-modal-queue-copy {
      min-width: 0;
      flex: 1;
    }

    .player-modal-queue-title,
    .player-modal-queue-artist {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .player-modal-queue-title {
      display: block;
      color: #fff;
      font-size: 14px;
      font-weight: 700;
    }

    .player-modal-queue-artist {
      display: block;
      width: fit-content;
      padding: 0;
      border: 0;
      background: transparent;
      margin-top: 3px;
      color: rgba(255,255,255,.54);
      font-size: 12px;
      cursor: pointer;
      font-family: inherit;
      text-align: left;
    }

    .player-modal-queue-artist:hover,
    .player-modal-queue-artist:focus-visible {
      color: var(--accent, #fff);
      text-decoration: underline;
      outline: none;
    }

    .player-modal-queue-state {
      color: var(--accent, #fff);
      font-size: 20px;
    }

    @keyframes modalInfoReveal {
      from { opacity: 0; transform: translateX(34px); }
      to { opacity: 1; transform: translateX(0); }
    }

    @media (max-width: 560px) {
      #player-modal-overlay .player-modal-header { gap: 9px !important; padding-inline: 12px !important; }
      .player-modal-view-toggle button { padding-inline: 8px; font-size: 10px; }
      #player-modal-overlay .player-modal-inner > div[style*="grid-template-columns: repeat(4"] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
      #player-modal-overlay .player-modal-inner > div[style*="align-items: center"][style*="justify-content: center"] { gap: 12px !important; }
      #player-modal-overlay .player-modal-inner:not(.is-info-view) .player-modal-cover {
        width: min(54vw, 220px) !important;
        height: min(54vw, 220px) !important;
      }
      #player-modal-overlay .player-modal-inner:not(.is-info-view) > div[style*="align-items: center"][style*="justify-content: center"] {
        gap: 8px !important;
      }
      #player-modal-overlay .player-modal-inner:not(.is-info-view) > div[style*="align-items: center"][style*="justify-content: center"] button {
        width: 30px !important;
        height: 30px !important;
        min-width: 30px !important;
        min-height: 30px !important;
      }
      #player-modal-overlay .player-modal-inner:not(.is-info-view) > div[style*="align-items: center"][style*="justify-content: center"] button:nth-child(3) {
        width: 44px !important;
        height: 44px !important;
      }
    }
    
    /* MOBILE HEADER ADJUSTMENTS */
    @media (max-width: 768px) {
      #header {
        padding: 12px 16px;
      }
      
      #header > div {
        flex-wrap: nowrap;
        gap: 0.75rem;
        align-items: center;
      }
      
      #header .header-actions {
        width: auto;
        justify-content: flex-end;
      }
      
      #header .nav-links,
      #header .search-input {
        display: none;
      }
      
      #connect-btn, #account-btn {
        padding: 6px 10px;
        font-size: 12px;
        white-space: nowrap;
        min-width: 0;
      }
      
      #account-btn {
        max-width: 100px;
        overflow: hidden;
        text-overflow: ellipsis;
      }
      
      .theme-toggle {
        width: 50px;
        height: 28px;
      }
      
      .theme-toggle-knob {
        width: 20px;
        height: 20px;
        top: 4px;
        left: 4px;
      }
      
      .dark .theme-toggle-knob {
        left: 26px;
      }
      
      .theme-toggle-knob .material-symbols-rounded {
        font-size: 12px;
      }
    }
    
    /* Enhanced Mobile Responsive Design */
    @media (max-width: 414px) {
      .carousel-item {
        width: 140px !important;
        min-width: 140px;
      }
      
      .section-title {
        font-size: 1.25rem;
      }
      
      .glass-card {
        padding: 16px;
      }
      
      .btn-glass {
        padding: 8px 16px;
        font-size: 13px;
      }
      
      #account-btn {
        max-width: 80px;
      }
      
      .theme-toggle,
      .theme-toggle-mobile {
        width: 48px;
        height: 26px;
      }
      
      .theme-toggle-knob,
      .theme-toggle-mobile-knob {
        width: 18px;
        height: 18px;
        top: 4px;
        left: 4px;
      }
      
      .dark .theme-toggle-knob,
      .dark .theme-toggle-mobile-knob {
        left: 26px;
      }
      
      .theme-toggle-knob .material-symbols-rounded,
      .theme-toggle-mobile-knob .material-symbols-rounded {
        font-size: 12px;
      }
    }
    
    @media (max-width: 375px) {
      .carousel-item {
        width: 130px !important;
        min-width: 130px;
      }
      
      .section-title {
        font-size: 1.1rem;
      }
      
      .glass-card {
        padding: 12px;
      }
      
      .music-card .play-btn-overlay {
        width: 40px;
        height: 40px;
      }
    }
    
    /* On mobile and tablet, reclaim the brand space for the header controls. */
    @media (max-width: 1023px) {
      #header .header-brand {
        display: none !important;
      }

      #header .topbar-crit {
        justify-content: flex-end;
      }

      #header .nav-links,
      #header .relative {
        display: none !important;
      }

      #header .header-actions {
        width: 100%;
        margin-left: 0;
        justify-content: flex-end;
      }

      /* Keep the theme control in the header instead of hiding it on mobile. */
      #header .theme-toggle {
        display: flex !important;
        flex: 0 0 auto;
        width: 50px;
        height: 28px;
      }
    }

    @media (max-width: 420px) {
      #header .theme-toggle {
        width: 44px;
        height: 26px;
      }
    }

    @media (max-width: 320px) {
      .carousel-item {
        width: 120px !important;
        min-width: 120px;
      }
      
      .section-title {
        font-size: 1rem;
      }
      
      .glass-card {
        padding: 10px;
      }
      
      .btn-glass {
        padding: 6px 12px;
        font-size: 12px;
      }
    }
    
    /* Adaptive Grid Layouts */
    @media (max-width: 480px) {
      .grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
      }
      
      .grid-3 {
        grid-template-columns: repeat(2, 1fr) !important;
      }
    }
    
    @media (min-width: 481px) and (max-width: 768px) {
      .grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 16px !important;
      }
      
      .grid-3 {
        grid-template-columns: repeat(3, 1fr) !important;
      }
    }
    
    @media (min-width: 769px) and (max-width: 1024px) {
      .grid {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 18px !important;
      }
      
      .grid-3 {
        grid-template-columns: repeat(4, 1fr) !important;
      }
    }
    
    @media (min-width: 1025px) {
      .grid {
        grid-template-columns: repeat(5, 1fr) !important;
        gap: 20px !important;
      }
      
      .grid-3 {
        grid-template-columns: repeat(5, 1fr) !important;
      }
    }
    
    /* Sticky Mobile Navigation */
    @media (max-width: 768px) {
      #floating-footer-nav-container {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        background: transparent;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        border-top: none;
        padding: 0 10px calc(10px + var(--safe-bottom));
        box-shadow: none;
      }
      
      .dark #floating-footer-nav-container {
        background: transparent;
        border-top: none;
        box-shadow: none;
      }
      
      .floating-footer-nav {
        justify-content: space-between;
        width: min(calc(100vw - 20px), 100%);
        gap: 6px;
      }
      
      .floating-footer-item {
        width: 40px;
      }
      
      .floating-footer-btn {
        padding: 8px;
        width: 40px;
        min-height: 40px;
        max-width: 40px;
        box-shadow: 0 12px 28px rgba(0, 0, 0, 0.14);
      }
      
      .floating-footer-label {
        width: 40px;
        font-size: 9px;
      }
    }
      
      /* Floating Player Mobile Optimizations */
      .player {
        position: fixed;
          bottom: calc(var(--floating-footer-h) + 4px);
        left: 0;
        right: 0;
        background: transparent;
        backdrop-filter: blur(0px);
        -webkit-backdrop-filter: blur(0px);
        border-top: none;
        padding: 12px 16px;
        z-index: 1001;
        box-shadow: none;
        transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        cursor: pointer;
      }
      
      .player:hover {
        transform: translateY(-2px);
      }
      
      .player:active {
        transform: translateY(0);
        transition: transform 0.1s ease;
      }
      
      .player .flex.items-center.justify-between {
        gap: 12px;
        align-items: flex-start;
      }
      
      .player .flex.flex-col.items-center {
        max-width: 120px;
      }
      
      .player .text-center.min-w-0 {
        width: 100%;
      }
      
      .player .flex.items-center.gap-3 {
        gap: 4px;
      }
      
      .player .flex.items-center.gap-2 {
        gap: 4px;
      }
      
      .player .w-12.h-12 {
        width: 40px !important;
        height: 40px !important;
      }
      
      .player .player-btn {
        padding: 4px;
        min-width: 28px;
        min-height: 28px;
      }
      
      .player .player-btn-main {
        width: 36px !important;
        height: 36px !important;
      }
      
      .player .player-btn-main .material-symbols-rounded {
        font-size: 20px !important;
      }
      
      .player .player-btn .material-symbols-rounded {
        font-size: 16px;
      }
      
      /* Hide volume controls on very small screens */
      @media (max-width: 480px) {
        .player .flex.md\\:flex.items-center.gap-3 {
          display: none !important;
        }
        
        .player .flex.items-center.justify-between {
          justify-content: space-between;
        }
        
        .player .flex.items-center.gap-2 {
          flex: 1;
          justify-content: center;
        }
      }

    /* Premium Search Cards */
    .premium-track-card:hover {
      background: rgba(255,255,255,0.08);
      border-color: rgba(0, 212, 255, 0.3);
      transform: translateY(-2px);
      box-shadow: 0 8px 25px rgba(0, 212, 255, 0.15);
    }

    .premium-track-card .play-overlay {
      opacity: 0;
      transition: opacity 0.3s ease;
    }

    .premium-track-card:hover .play-overlay {
      opacity: 1;
    }

    .premium-artist-card:hover {
      background: rgba(255,255,255,0.08);
      border-color: rgba(102, 126, 234, 0.3);
      transform: translateY(-2px);
      box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
    }

    .track-play-btn:hover {
      background: #00b4cc !important;
      transform: scale(1.05);
      box-shadow: 0 6px 20px rgba(0, 212, 255, 0.4) !important;
    }

    .artist-follow-btn:hover {
      background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%) !important;
      transform: scale(1.05);
      box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4) !important;
    }

    /* Mobile padding for search section */
    @media (max-width: 768px) {
      .search-hub-overlay {
        padding-bottom: 140px !important;
      }
    }

    @media (max-width: 480px) {
      .search-hub-overlay {
        padding-bottom: 160px !important;
      }
    }

    /* Loading spinner animation */
    @keyframes spin {
      0% { transform: rotate(0deg); }
      100% { transform: rotate(360deg); }
    }

    .loading-spinner {
      animation: spin 1s linear infinite;
    }

    /* Preview button styles */
    .preview-btn {
      display: flex;
      align-items: center;
      gap: 8px;
      transition: all 0.3s ease;
      position: relative;
      overflow: hidden;
    }

    .preview-btn:hover {
      transform: translateY(-2px);
      box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
    }

    .preview-btn:active {
      transform: translateY(0);
      transition: transform 0.1s ease;
    }

    .preview-btn .material-symbols-rounded {
      font-size: 18px;
      transition: all 0.3s ease;
    }

    .preview-btn.playing {
      background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
      border-color: #10b981 !important;
      color: white !important;
      animation: pulse-glow 2s ease-in-out infinite;
    }

    .music-card.playing {
      border: 2px solid #0a84ff !important;
      box-shadow: 0 0 20px rgba(10, 132, 255, 0.3) !important;
      transform: scale(1.02);
    }

    .music-card.playing .play-btn-overlay {
      background: rgba(10, 132, 255, 0.9) !important;
      transform: scale(1.1);
    }

    @keyframes pulse-glow {
      0%, 100% {
        box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
      }
      50% {
        box-shadow: 0 0 30px rgba(16, 185, 129, 0.8);
      }
    }

    /* Crystal Clear: a restrained premium glass layer over every major surface. */
    html[data-theme="crystal-clear"] body {
      background:
        radial-gradient(circle at 8% 0%, rgba(255,255,255,0.9), transparent 34%),
        radial-gradient(circle at 92% 12%, rgba(117,226,255,0.24), transparent 30%),
        linear-gradient(135deg, var(--surface-primary), var(--surface-secondary)) !important;
    }

    html[data-theme="crystal-clear"].dark body {
      background:
        radial-gradient(circle at 12% -10%, rgba(72,218,255,0.2), transparent 32%),
        radial-gradient(circle at 90% 16%, rgba(133,105,255,0.16), transparent 30%),
        linear-gradient(135deg, var(--surface-primary), var(--surface-secondary)) !important;
    }

    html[data-theme="crystal-clear"] .glass,
    html[data-theme="crystal-clear"] .glass-card,
    html[data-theme="crystal-clear"] .artist-social-card,
    html[data-theme="crystal-clear"] .music-card {
      background: var(--glass-bg) !important;
      border: 1px solid var(--glass-border) !important;
      box-shadow: var(--glass-shadow) !important;
      backdrop-filter: blur(28px) saturate(150%) !important;
      -webkit-backdrop-filter: blur(28px) saturate(150%) !important;
    }

    html[data-theme="crystal-clear"] .glass::before,
    html[data-theme="crystal-clear"] .glass-card::before,
    html[data-theme="crystal-clear"] .music-card::before {
      content: '';
      position: absolute;
      inset: 0;
      pointer-events: none;
      border-radius: inherit;
      background: linear-gradient(120deg, rgba(255,255,255,0.28), transparent 34%, transparent 68%, rgba(255,255,255,0.1));
      opacity: 0.8;
    }

    html[data-theme="crystal-clear"] .glass-card:hover,
    html[data-theme="crystal-clear"] .music-card:hover,
    html[data-theme="crystal-clear"] .artist-social-card:hover {
      border-color: rgba(104, 224, 255, 0.62) !important;
      box-shadow: 0 22px 48px rgba(32, 145, 180, 0.2), 0 0 28px var(--glow-primary) !important;
      transform: translateY(-3px);
    }

    html[data-theme="crystal-clear"] #header {
      background: rgba(239, 251, 255, 0.38) !important;
      border-bottom: 1px solid var(--glass-border) !important;
      box-shadow: 0 12px 38px rgba(44, 145, 177, 0.1) !important;
      backdrop-filter: blur(24px) saturate(150%) !important;
      -webkit-backdrop-filter: blur(24px) saturate(150%) !important;
    }

    html[data-theme="crystal-clear"].dark #header {
      background: rgba(7, 28, 40, 0.42) !important;
      box-shadow: 0 14px 42px rgba(0, 0, 0, 0.24) !important;
    }

    html[data-theme="crystal-clear"] .btn-glass,
    html[data-theme="crystal-clear"] .mobile-header-shortcut,
    html[data-theme="crystal-clear"] .floating-footer-btn {
      color: var(--text-primary) !important;
      background: rgba(255,255,255,0.34) !important;
      border-color: var(--glass-border) !important;
      box-shadow: 0 8px 24px rgba(43, 137, 169, 0.12), inset 0 1px 0 rgba(255,255,255,0.58) !important;
    }

    html[data-theme="crystal-clear"] .btn-glass:hover,
    html[data-theme="crystal-clear"] .mobile-header-shortcut:hover,
    html[data-theme="crystal-clear"] .floating-footer-btn:hover,
    html[data-theme="crystal-clear"] .floating-footer-btn.active {
      background: rgba(255,255,255,0.62) !important;
      border-color: rgba(8, 126, 164, 0.38) !important;
      color: var(--accent) !important;
    }

    html[data-theme="crystal-clear"] .floating-footer-nav {
      background: var(--footer-bg) !important;
      border-color: var(--footer-border) !important;
      box-shadow: 0 18px 48px rgba(35, 125, 157, 0.18), inset 0 1px 0 rgba(255,255,255,0.7) !important;
      backdrop-filter: blur(28px) saturate(150%) !important;
      -webkit-backdrop-filter: blur(28px) saturate(150%) !important;
    }

    html[data-theme="crystal-clear"] .lumina-theme-dropdown {
      background: rgba(248, 253, 255, 0.78) !important;
      border-color: rgba(255,255,255,0.9) !important;
      box-shadow: 0 24px 70px rgba(25, 109, 140, 0.22), inset 0 1px 0 #fff !important;
      backdrop-filter: blur(30px) saturate(160%) !important;
      -webkit-backdrop-filter: blur(30px) saturate(160%) !important;
    }

    html[data-theme="crystal-clear"].dark .lumina-theme-dropdown {
      background: rgba(11, 35, 48, 0.82) !important;
      border-color: rgba(174, 239, 255, 0.25) !important;
    }

    /* Keep Crystal Clear controls floating: no full-width bands under the header/footer. */
    html[data-theme="crystal-clear"] #header,
    html[data-theme="crystal-clear"].dark #header {
      background: transparent !important;
      border: 0 !important;
      box-shadow: none !important;
      backdrop-filter: none !important;
      -webkit-backdrop-filter: none !important;
    }

    html[data-theme="crystal-clear"] #header::before,
    html[data-theme="crystal-clear"] #header::after,
    html[data-theme="crystal-clear"] .floating-footer-nav-container::before,
    html[data-theme="crystal-clear"] .floating-footer-nav-container::after {
      content: none !important;
      display: none !important;
    }

    html[data-theme="crystal-clear"] .floating-footer-nav-container,
    html[data-theme="crystal-clear"] .floating-footer-nav,
    html[data-theme="crystal-clear"].dark .floating-footer-nav-container,
    html[data-theme="crystal-clear"].dark .floating-footer-nav {
      background: transparent !important;
      border: 0 !important;
      box-shadow: none !important;
      backdrop-filter: none !important;
      -webkit-backdrop-filter: none !important;
    }

    @media (prefers-reduced-motion: reduce) {
      html[data-theme="crystal-clear"] * {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
      }
    }

    /* Keep the secondary actions centered after the compact mobile overrides. */
    @media (max-width: 768px) {
      #player-modal-overlay .player-modal-controls-cluster > div[style*="grid-template-columns: repeat(4"] {
        display: grid !important;
        grid-template-columns: repeat(2, 132px) !important;
        justify-content: center !important;
        align-items: center !important;
        width: 100% !important;
        max-width: none !important;
        margin-left: auto !important;
        margin-right: auto !important;
        gap: 10px !important;
      }

      #player-modal-overlay .player-modal-controls-cluster .player-modal-share-action,
      #player-modal-overlay .player-modal-controls-cluster .player-modal-download-action {
        width: 132px !important;
        min-width: 132px !important;
        max-width: 132px !important;
        flex: 0 0 132px !important;
        justify-self: center !important;
      }
    }

    /* ===== SUPER PREMIUM COVER GRID EFFECTS ===== */
    .playlist-cover-grid {
      position: relative;
      background: linear-gradient(135deg, rgba(10, 132, 255, 0.1), rgba(52, 199, 89, 0.1));
      border: 2px solid rgba(10, 132, 255, 0.2);
      border-radius: 12px;
      box-shadow: 
        0 0 20px rgba(10, 132, 255, 0.3),
        0 0 40px rgba(10, 132, 255, 0.15),
        inset 0 0 20px rgba(10, 132, 255, 0.1);
      transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
      animation: coverGridPulse 3s ease-in-out infinite;
    }

    .playlist-cover-grid:hover {
      transform: scale(1.05) translateZ(20px);
      box-shadow: 
        0 0 40px rgba(10, 132, 255, 0.6),
        0 0 80px rgba(10, 132, 255, 0.3),
        0 20px 60px rgba(10, 132, 255, 0.2),
        inset 0 0 30px rgba(10, 132, 255, 0.2);
      border-color: rgba(10, 132, 255, 0.5);
    }

    @keyframes coverGridPulse {
      0%, 100% { box-shadow: 0 0 20px rgba(10, 132, 255, 0.3), 0 0 40px rgba(10, 132, 255, 0.15), inset 0 0 20px rgba(10, 132, 255, 0.1); }
      50% { box-shadow: 0 0 30px rgba(10, 132, 255, 0.4), 0 0 60px rgba(10, 132, 255, 0.2), inset 0 0 25px rgba(10, 132, 255, 0.15); }
    }

    .playlist-cover-grid > div {
      position: relative;
      border-radius: 6px;
      overflow: hidden;
      background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
      border: 1px solid rgba(255,255,255,0.1);
      transition: all 0.3s ease;
      animation: coverCellShimmer 4s ease-in-out infinite;
    }

    .playlist-cover-grid > div::before {
      content: '';
      position: absolute;
      inset: 0;
      background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
      animation: coverShine 3s ease-in-out infinite;
      pointer-events: none;
    }

    @keyframes coverShine {
      0% { transform: translateX(-100%); }
      50% { transform: translateX(100%); }
      100% { transform: translateX(100%); }
    }

    @keyframes coverCellShimmer {
      0%, 100% { opacity: 1; transform: scale(1); }
      50% { opacity: 0.9; transform: scale(0.98); }
    }

    .playlist-cover-grid > div:hover {
      transform: scale(1.1);
      border-color: rgba(255,255,255,0.3);
      box-shadow: 0 0 15px rgba(10, 132, 255, 0.4);
    }

    /* ===== PREMIUM PLAYLIST CARDS ===== */
    .playlist-card {
      position: relative;
      overflow: hidden;
      border-radius: 16px;
      padding: 20px;
      cursor: pointer;
      transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
      background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
      border: 1.5px solid rgba(10, 132, 255, 0.2);
      backdrop-filter: blur(10px);
    }

    .playlist-card::before {
      content: '';
      position: absolute;
      inset: 0;
      background: linear-gradient(135deg, rgba(10, 132, 255, 0.2), rgba(52, 199, 89, 0.1));
      opacity: 0;
      transition: opacity 0.4s ease;
      border-radius: 16px;
      pointer-events: none;
    }

    .playlist-card::after {
      content: '';
      position: absolute;
      inset: 0;
      border-radius: 16px;
      padding: 2px;
      background: linear-gradient(135deg, rgba(10, 132, 255, 0.5), rgba(52, 199, 89, 0.3), rgba(255, 215, 0, 0.2));
      -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
      mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
      -webkit-mask-composite: xor;
      mask-composite: exclude;
      opacity: 0;
      transition: opacity 0.4s ease;
      pointer-events: none;
    }

    .playlist-card:hover {
      transform: translateY(-8px) scale(1.02);
      box-shadow: 
        0 0 30px rgba(10, 132, 255, 0.4),
        0 10px 40px rgba(0, 0, 0, 0.3),
        inset 0 0 20px rgba(10, 132, 255, 0.1);
      border-color: rgba(10, 132, 255, 0.5);
    }

    .playlist-card:hover::before {
      opacity: 1;
    }

    .playlist-card:hover::after {
      opacity: 1;
    }

    /* ===== PREMIUM MUSIC CARD ===== */
    .music-card {
      position: relative;
      border-radius: 16px;
      overflow: hidden;
      transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
      border: 2px solid rgba(10, 132, 255, 0.2);
      background: linear-gradient(135deg, rgba(10, 132, 255, 0.05), rgba(52, 199, 89, 0.02));
    }

    .music-card:hover {
      transform: translateY(-12px);
      border-color: rgba(10, 132, 255, 0.6);
      box-shadow: 
        0 0 30px rgba(10, 132, 255, 0.4),
        0 20px 60px rgba(0, 0, 0, 0.4),
        inset 0 0 25px rgba(10, 132, 255, 0.1);
    }

    /* ===== MUSIC CARD COVER GLOW ===== */
    .music-card-cover {
      position: relative;
      border-radius: 12px;
      overflow: hidden;
      background: linear-gradient(135deg, rgba(10, 132, 255, 0.1), rgba(52, 199, 89, 0.05));
      border: 1.5px solid rgba(10, 132, 255, 0.15);
      transition: all 0.4s ease;
    }

    .music-card-cover.cover-placeholder {
      background: linear-gradient(135deg, #26354a 0%, #172131 55%, #33465f 100%) !important;
    }

    .music-card-cover::before {
      content: '';
      position: absolute;
      inset: 0;
      background: radial-gradient(circle at 30% 30%, rgba(10, 132, 255, 0.3), transparent 70%);
      opacity: 0;
      transition: opacity 0.4s ease;
      pointer-events: none;
    }

    .music-card:hover .music-card-cover {
      box-shadow: 
        0 0 20px rgba(10, 132, 255, 0.4),
        inset 0 0 20px rgba(10, 132, 255, 0.15);
      border-color: rgba(10, 132, 255, 0.4);
    }

    .music-card:hover .music-card-cover::before {
      opacity: 1;
    }

    /* ===== 3D PERSPECTIVE ===== */
    #playlist-detail-cover {
      position: relative;
      perspective: 1000px;
      transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
      transform-style: preserve-3d;
      border: 2px solid rgba(10, 132, 255, 0.3) !important;
      box-shadow: 
        0 0 30px rgba(10, 132, 255, 0.3),
        0 20px 60px rgba(0, 0, 0, 0.4),
        inset 0 0 30px rgba(10, 132, 255, 0.1) !important;
    }

    #playlist-detail-cover:hover {
      transform: rotateX(8deg) rotateY(8deg) scale(1.08);
      box-shadow: 
        0 0 50px rgba(10, 132, 255, 0.5),
        0 30px 80px rgba(0, 0, 0, 0.5),
        inset 0 0 40px rgba(10, 132, 255, 0.15) !important;
      border-color: rgba(10, 132, 255, 0.6) !important;
    }

    /* ========== GAMIFICATION CSS ========== */
    
    /* Points Counter Display */
    .gamification-points-counter {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 12px 18px;
      border-radius: 14px;
      background: linear-gradient(135deg, rgba(0, 200, 255, 0.15), rgba(52, 199, 89, 0.12));
      border: 1.5px solid rgba(0, 200, 255, 0.4);
      font-weight: 700;
      font-size: 14px;
      color: #00c8ff;
      cursor: pointer;
      transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
      position: relative;
      overflow: hidden;
    }

    .gamification-points-counter::before {
      content: '';
      position: absolute;
      inset: 0;
      background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
      animation: shine 3s ease-in-out infinite;
      pointer-events: none;
    }

    @keyframes shine {
      0% { transform: translateX(-100%); }
      50% { transform: translateX(100%); }
      100% { transform: translateX(100%); }
    }

    .gamification-points-counter:hover {
      background: linear-gradient(135deg, rgba(0, 220, 255, 0.25), rgba(52, 199, 89, 0.18));
      border-color: rgba(0, 220, 255, 0.7);
      transform: translateY(-3px) scale(1.06);
      box-shadow: 0 8px 24px rgba(0, 200, 255, 0.35), inset 0 1px 0 rgba(255,255,255,0.2);
    }

    .gamification-points-counter .material-symbols-rounded {
      font-size: 22px;
      animation: star-glow 2.5s ease-in-out infinite;
      filter: drop-shadow(0 0 8px rgba(0, 200, 255, 0.6));
    }

    @keyframes star-glow {
      0%, 100% { transform: scale(1) rotate(0deg); filter: drop-shadow(0 0 8px rgba(0, 200, 255, 0.6)); }
      50% { transform: scale(1.15) rotate(5deg); filter: drop-shadow(0 0 16px rgba(0, 200, 255, 0.9)); }
    }

    .theme-trial-timer {
      position: fixed;
      top: 75px;
      right: 20px;
      z-index: 99999;
      min-width: 180px;
      padding: 8px 12px;
      border-radius: 10px;
      background: rgba(0, 0, 0, 0.75);
      color: #fff;
      font-size: 12px;
      font-weight: 700;
      display: none;
      align-items: center;
      justify-content: center;
      box-shadow: 0 8px 25px rgba(0,0,0,0.35);
    }

    .theme-trial-floating-container {
      position: fixed;
      top: 18px;
      right: 20px;
      z-index: 100000;
      display: flex;
      gap: 8px;
      pointer-events: none;
      flex-direction: column;
      align-items: flex-end;
    }

    .theme-trial-floating-badge {
      background: linear-gradient(135deg, rgba(255, 215, 0, 0.9), rgba(255, 127, 80, 0.9));
      color: #000;
      border-radius: 14px;
      padding: 6px 10px;
      font-weight: 700;
      font-size: 12px;
      box-shadow: 0 6px 18px rgba(0,0,0,0.25);
      animation: pop-in 0.4s ease;
    }

    @keyframes pop-in {
      from { transform: translateY(-8px) scale(0.9); opacity: 0; }
      to { transform: translateY(0) scale(1); opacity: 1; }
    }

    /* Streak Badge */
    .streak-badge {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 8px 14px;
      border-radius: 22px;
      background: linear-gradient(135deg, rgba(255, 120, 0, 0.25), rgba(255, 165, 0, 0.2));
      border: 1.5px solid rgba(255, 140, 0, 0.5);
      font-weight: 700;
      font-size: 13px;
      color: #ffb340;
      animation: flame-glow 1.8s ease-in-out infinite;
      box-shadow: 0 0 12px rgba(255, 120, 0, 0.3), inset 0 1px 0 rgba(255,255,255,0.1);
    }

    
    @keyframes flame-glow {
      0%, 100% { transform: scale(1); box-shadow: 0 0 12px rgba(255, 120, 0, 0.3), inset 0 1px 0 rgba(255,255,255,0.1); }
      50% { transform: scale(1.08); box-shadow: 0 0 20px rgba(255, 120, 0, 0.6), inset 0 1px 0 rgba(255,255,255,0.2); }
    }
    

    /* Loot Box Button */
    .loot-box-button {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 10px;
      padding: 20px;
      border-radius: 16px;
      border: 2.5px solid rgba(0, 200, 255, 0.4);
      background: linear-gradient(135deg, rgba(0, 200, 255, 0.12), rgba(52, 199, 89, 0.1));
      cursor: pointer;
      transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
      position: relative;
      overflow: hidden;
      box-shadow: 0 8px 20px rgba(0, 200, 255, 0.15), inset 0 1px 0 rgba(255,255,255,0.1);
      animation: loot-box-pulse 2s ease-in-out infinite;
    }

    @keyframes loot-box-pulse {
      0%, 100% { box-shadow: 0 8px 20px rgba(0, 200, 255, 0.15), inset 0 1px 0 rgba(255,255,255,0.1); }
      50% { box-shadow: 0 12px 30px rgba(0, 200, 255, 0.35), inset 0 1px 0 rgba(255,255,255,0.15); }
    }

    .loot-box-button::before {
      content: '';
      position: absolute;
      inset: 0;
      background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
      animation: premium-shine 3.5s ease-in-out infinite;
      pointer-events: none;
    }

    @keyframes premium-shine {
      0% { transform: translateX(-200%); }
      50% { transform: translateX(100%); }
      100% { transform: translateX(100%); }
    }

    .loot-box-button:hover {
      background: linear-gradient(135deg, rgba(0, 220, 255, 0.2), rgba(52, 210, 89, 0.15));
      border-color: rgba(0, 220, 255, 0.7);
      transform: translateY(-6px) scale(1.02);
      box-shadow: 0 16px 40px rgba(0, 200, 255, 0.35), inset 0 1px 0 rgba(255,255,255,0.15);
    }

    .loot-box-button:active {
      transform: translateY(-2px) scale(0.96);
    }

    .loot-box-button:disabled {
      opacity: 0.5;
      cursor: not-allowed;
      animation: none;
    }

    /* 🔥 OPTIMISTIC LOOT BOX ANIMATION */
    .loot-box-opening {
      animation: loot-box-open 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
      transform: scale(1.1);
      box-shadow: 0 0 30px rgba(255, 215, 0, 0.8) !important;
    }

    @keyframes loot-box-open {
      0% { transform: scale(1); box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3); }
      50% { transform: scale(1.2) rotate(5deg); box-shadow: 0 0 40px rgba(255, 215, 0, 0.9); }
      100% { transform: scale(1); box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3); }
    }

    .loot-box-icon {
      font-size: 40px;
      /* OPTIMIZED: animation: treasure-bounce removed to reduce CPU - 5% savings on idle */
      filter: drop-shadow(0 0 8px rgba(0, 200, 255, 0.3));
    }

   

    /* ===== MINI LOOT BOX CARDS (Compact design) ===== */
    .loot-box-card-mini {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      width: 120px;
      height: 140px;
      padding: 12px;
      border-radius: 14px;
      border: 2px solid rgba(0, 200, 255, 0.35);
      background: linear-gradient(135deg, rgba(0, 200, 255, 0.1), rgba(52, 199, 89, 0.08));
      cursor: pointer;
      transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
      position: relative;
      overflow: hidden;
      box-shadow: 0 4px 12px rgba(0, 200, 255, 0.12), inset 0 1px 0 rgba(255,255,255,0.08);
      font-weight: 600;
    }

    .loot-box-card-mini::before {
      content: '';
      position: absolute;
      inset: 0;
      background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
      animation: shine 3s ease-in-out infinite;
      pointer-events: none;
    }

    .loot-box-card-mini:hover {
      border-color: rgba(0, 220, 255, 0.6);
      background: linear-gradient(135deg, rgba(0, 220, 255, 0.15), rgba(52, 210, 89, 0.12));
      transform: translateY(-4px);
      box-shadow: 0 8px 20px rgba(0, 200, 255, 0.25), inset 0 1px 0 rgba(255,255,255,0.12);
    }

    .loot-box-card-mini:active {
      transform: translateY(-1px) scale(0.98);
    }

    .loot-box-icon-mini {
      font-size: 36px;
      animation: treasure-bounce 2.2s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
      filter: drop-shadow(0 0 8px rgba(0, 200, 255, 0.4));
      position: relative;
      z-index: 1;
    }

    /* Mini Stat Cards */
    .gamification-stat-card-mini {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      width: 120px;
      height: 140px;
      padding: 12px;
      border-radius: 14px;
      border: 2px solid rgba(255, 140, 0, 0.3);
      background: linear-gradient(135deg, rgba(255, 140, 0, 0.08), rgba(255, 165, 0, 0.06));
      box-shadow: 0 4px 12px rgba(255, 120, 0, 0.12), inset 0 1px 0 rgba(255,255,255,0.08);
      transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
      position: relative;
      gap: 6px;
    }

    .gamification-stat-card-mini::before {
      content: '';
      position: absolute;
      inset: 0;
      background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
      animation: shine 3s ease-in-out infinite;
      pointer-events: none;
    }

    .gamification-stat-card-mini:hover {
      border-color: rgba(255, 150, 0, 0.6);
      background: linear-gradient(135deg, rgba(255, 150, 0, 0.12), rgba(255, 175, 0, 0.08));
      transform: translateY(-4px);
      box-shadow: 0 8px 20px rgba(255, 120, 0, 0.2), inset 0 1px 0 rgba(255,255,255,0.12);
    }

    /* Premium Shop Link Button */
    .premium-shop-link {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 6px;
      width: 120px;
      height: 140px;
      padding: 12px;
      border-radius: 14px;
      border: 2px dashed rgba(230, 126, 34, 0.5);
      background: linear-gradient(135deg, rgba(230, 126, 34, 0.08), rgba(241, 196, 15, 0.06));
      cursor: pointer;
      transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
      position: relative;
      overflow: hidden;
      box-shadow: 0 4px 12px rgba(230, 126, 34, 0.1);
      font-weight: 600;
      color: var(--accent);
    }

    .premium-shop-link::before {
      content: '';
      position: absolute;
      inset: 0;
      background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
      animation: shine 3s ease-in-out infinite;
      pointer-events: none;
    }

    .premium-shop-link:hover {
      border-color: rgba(241, 196, 15, 0.8);
      background: linear-gradient(135deg, rgba(241, 196, 15, 0.12), rgba(230, 126, 34, 0.1));
      transform: translateY(-4px);
      box-shadow: 0 8px 20px rgba(230, 126, 34, 0.2);
    }

    .premium-shop-link .material-symbols-rounded {
      font-size: 32px;
      color: #f1c40f;
      animation: stat-pulse 2s ease-in-out infinite;
      filter: drop-shadow(0 0 6px rgba(241, 196, 15, 0.4));
    }

    .loot-box-button:disabled {
      opacity: 0.5;
      cursor: not-allowed;
      pointer-events: none;
      background: linear-gradient(135deg, rgba(100, 100, 100, 0.1), rgba(80, 80, 80, 0.08));
      border-color: rgba(100, 100, 100, 0.2);
      box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    }

    /* ===== MINI LOOT BOX CARDS ===== */
    .loot-box-card-mini {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      width: 120px;
      height: 140px;
      padding: 12px;
      border-radius: 14px;
      border: 2px solid rgba(0, 200, 255, 0.35);
      background: linear-gradient(135deg, rgba(0, 200, 255, 0.1), rgba(52, 199, 89, 0.08));
      cursor: pointer;
      transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
      position: relative;
      overflow: hidden;
      box-shadow: 0 4px 12px rgba(0, 200, 255, 0.12), inset 0 1px 0 rgba(255,255,255,0.08);
      font-weight: 600;
    }

    .loot-box-card-mini::before {
      content: '';
      position: absolute;
      inset: 0;
      background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
      animation: shine 3s ease-in-out infinite;
      pointer-events: none;
    }

    .loot-box-card-mini:hover {
      border-color: rgba(0, 220, 255, 0.6);
      background: linear-gradient(135deg, rgba(0, 220, 255, 0.15), rgba(52, 210, 89, 0.12));
      transform: translateY(-4px);
      box-shadow: 0 8px 20px rgba(0, 200, 255, 0.25), inset 0 1px 0 rgba(255,255,255,0.12);
    }

    .loot-box-card-mini:active {
      transform: translateY(-1px) scale(0.98);
    }

    .loot-box-icon-mini {
      font-size: 36px;
      animation: treasure-bounce 2.2s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
      filter: drop-shadow(0 0 8px rgba(0, 200, 255, 0.4));
      position: relative;
      z-index: 1;
    }

    /* Mini Stat Cards */
    .gamification-stat-card-mini {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      width: 120px;
      height: 140px;
      padding: 12px;
      border-radius: 14px;
      border: 2px solid rgba(255, 140, 0, 0.3);
      background: linear-gradient(135deg, rgba(255, 140, 0, 0.08), rgba(255, 165, 0, 0.06));
      box-shadow: 0 4px 12px rgba(255, 120, 0, 0.12), inset 0 1px 0 rgba(255,255,255,0.08);
      transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
      position: relative;
      gap: 6px;
    }

    .gamification-stat-card-mini::before {
      content: '';
      position: absolute;
      inset: 0;
      background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
      animation: shine 3s ease-in-out infinite;
      pointer-events: none;
    }

    .gamification-stat-card-mini:hover {
      border-color: rgba(255, 150, 0, 0.6);
      background: linear-gradient(135deg, rgba(255, 150, 0, 0.12), rgba(255, 175, 0, 0.08));
      transform: translateY(-4px);
      box-shadow: 0 8px 20px rgba(255, 120, 0, 0.2), inset 0 1px 0 rgba(255,255,255,0.12);
    }

    /* Premium Shop Link Button */
    .premium-shop-link {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 6px;
      width: 120px;
      height: 140px;
      padding: 12px;
      border-radius: 14px;
      border: 2px dashed rgba(230, 126, 34, 0.5);
      background: linear-gradient(135deg, rgba(230, 126, 34, 0.08), rgba(241, 196, 15, 0.06));
      cursor: pointer;
      transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
      position: relative;
      overflow: hidden;
      box-shadow: 0 4px 12px rgba(230, 126, 34, 0.1);
      font-weight: 600;
      color: var(--accent);
    }

    .premium-shop-link::before {
      content: '';
      position: absolute;
      inset: 0;
      background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
      animation: shine 3s ease-in-out infinite;
      pointer-events: none;
    }

    .premium-shop-link:hover {
      border-color: rgba(241, 196, 15, 0.8);
      background: linear-gradient(135deg, rgba(241, 196, 15, 0.12), rgba(230, 126, 34, 0.1));
      transform: translateY(-4px);
      box-shadow: 0 8px 20px rgba(230, 126, 34, 0.2);
    }

    .premium-shop-link .material-symbols-rounded {
      font-size: 32px;
      color: #f1c40f;
      animation: stat-pulse 2s ease-in-out infinite;
      filter: drop-shadow(0 0 6px rgba(241, 196, 15, 0.4));
    }

    .gamification-stat-item {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 8px;
      width: 100%;
    }

    .gamification-stat-icon {
      font-size: 28px;
      animation: stat-pulse 2s ease-in-out infinite;
      filter: drop-shadow(0 0 8px rgba(255, 120, 0, 0.5));
    }

    @keyframes stat-pulse {
      0%, 100% { transform: scale(1); }
      50% { transform: scale(1.1); }
    }

    .gamification-stat-label {
      font-size: 12px;
      color: var(--text-secondary);
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .gamification-stat-value {
      font-size: 18px;
      font-weight: 800;
      color: #ffb340;
      text-shadow: 0 2px 8px rgba(255, 120, 0, 0.4);
    }

    /* Loot Box Result Modal */
    .loot-box-result-modal {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.72);
      backdrop-filter: blur(14px);
      z-index: 2100;
      display: flex;
      align-items: center;
      justify-content: center;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.28s ease;
    }

    .loot-box-result-modal.active {
      opacity: 1;
      pointer-events: auto;
    }

    .loot-box-result-shell {
      position: relative;
      width: min(92vw, 430px);
      border-radius: 28px;
      padding: 1.5px;
      background: linear-gradient(180deg, rgba(52, 149, 255, 0.9), rgba(22, 86, 176, 0.65));
      box-shadow:
        0 24px 70px rgba(1, 7, 19, 0.8),
        0 0 0 1px rgba(74, 173, 255, 0.35),
        inset 0 0 22px rgba(96, 192, 255, 0.12);
    }

    .loot-box-result-shell::before {
      content: "";
      position: absolute;
      inset: 7px;
      border-radius: 22px;
      border: 1px solid rgba(255, 255, 255, 0.08);
      pointer-events: none;
      opacity: 0.7;
    }

    .loot-box-result-content {
      position: relative;
      background: linear-gradient(180deg, rgba(18, 24, 34, 0.95), rgba(12, 16, 24, 0.98));
      backdrop-filter: blur(26px);
      border-radius: 27px;
      padding: 34px 28px 24px;
      max-width: 430px;
      text-align: center;
      overflow: hidden;
      border: 1px solid rgba(255, 255, 255, 0.08);
      animation: pop-in-animation 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

    .loot-box-result-content::before {
      content: "";
      position: absolute;
      inset: -30% -20% auto -20%;
      height: 55%;
      background: radial-gradient(circle, rgba(58, 191, 255, 0.18), transparent 60%);
      pointer-events: none;
    }

    @keyframes pop-in-animation {
      0% { opacity: 0; transform: scale(0.8) rotate(-6deg); }
      60% { transform: scale(1.04) rotate(2deg); }
      100% { opacity: 1; transform: scale(1) rotate(0); }
    }

    .loot-box-loading-ring {
      position: relative;
      width: 102px;
      height: 102px;
      margin: 0 auto 18px;
      border-radius: 50%;
      background: conic-gradient(from 0deg, rgba(83, 204, 255, 0.2), rgba(95, 255, 196, 0.9), rgba(140, 120, 255, 0.7), rgba(83, 204, 255, 0.2));
      animation: ring-spin 1.6s linear infinite;
      box-shadow: 0 0 24px rgba(87, 196, 255, 0.35);
    }

    .loot-box-loading-ring::before {
      content: "";
      position: absolute;
      inset: 12px;
      border-radius: 50%;
      background: linear-gradient(180deg, rgba(15, 18, 31, 0.92), rgba(14, 17, 24, 0.96));
      border: 1px solid rgba(255, 255, 255, 0.08);
    }

    .loot-box-result-icon {
      position: absolute;
      inset: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 42px !important;
      color: rgba(255, 255, 255, 0.95);
      text-shadow: 0 0 18px rgba(116, 210, 255, 0.7);
      animation: celebration-pulse 0.75s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

    @keyframes celebration-pulse {
      0% { transform: scale(0.55) rotate(-180deg); opacity: 0; }
      50% { transform: scale(1.15) rotate(18deg); opacity: 1; }
      100% { transform: scale(1) rotate(0); opacity: 1; }
    }

    @keyframes ring-spin {
      from { transform: rotate(0deg); }
      to { transform: rotate(360deg); }
    }

    @keyframes spin {
      from { transform: rotate(0deg); }
      to { transform: rotate(360deg); }
    }

    .loot-box-result-title {
      font-size: clamp(2rem, 5vw, 2.5rem);
      font-weight: 800;
      letter-spacing: -0.05em;
      color: #f3f7ff;
      margin-bottom: 10px;
      line-height: 1.1;
      font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    }

    .loot-box-result-label {
      font-size: 15px;
      color: rgba(212, 219, 232, 0.9);
      margin-bottom: 18px;
      line-height: 1.5;
      min-height: 44px;
    }

    .loot-box-result-points {
      font-size: clamp(2.2rem, 6vw, 3.2rem);
      font-weight: 900;
      color: #3db4ff;
      letter-spacing: -0.06em;
      margin-bottom: 18px;
      line-height: 1;
      text-shadow: 0 0 26px rgba(61, 180, 255, 0.4);
      animation: count-up 1.1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

    @keyframes count-up {
      0% { opacity: 0; transform: translateY(18px); }
      100% { opacity: 1; transform: translateY(0); }
    }

    .loot-box-result-content .btn-glass.btn-filled {
      width: 100%;
      min-height: 54px;
      border-radius: 999px;
      background: linear-gradient(135deg, #1b8fff, #1ca7ff 45%, #5dc3ff 100%);
      border: none;
      color: white;
      font-size: 1.2rem;
      font-weight: 700;
      box-shadow: 0 16px 30px rgba(31, 147, 255, 0.45);
      transition: transform 0.2s ease, box-shadow 0.2s ease;
    }

    .loot-box-result-content .btn-glass.btn-filled:hover {
      transform: translateY(-1px) scale(1.01);
      box-shadow: 0 18px 34px rgba(31, 147, 255, 0.52);
    }







/* MULTI ROW CAROUSEL */
.multi-row-carousel {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(2, auto);
  gap: 12px;

  overflow-x: auto;
  padding-bottom: 10px;

  scroll-snap-type: x mandatory;
}

.multi-row-carousel::-webkit-scrollbar {
  display: none;
}

@media (min-width: 768px) {
  .multi-row-carousel {
    grid-template-rows: repeat(3, auto);
  }
}

/* CARD */
.single-card {
  min-width: 240px;
  height: 72px;

  display: flex;
  align-items: center;
  gap: 12px;

  padding: 10px;
  border-radius: 18px;

  background: var(--card-bg);
  border: 1px solid var(--card-border);

  cursor: pointer;
  transition: all 0.25s ease;

  scroll-snap-align: start;
  position: relative;
  overflow: hidden;
}

/* GLOW HOVER */
.single-card:hover {
  transform: scale(1.04);
  box-shadow:
    0 10px 30px rgba(0,0,0,0.2),
    0 0 20px var(--glow-primary);
}

/* ACTIVE TAP */
.single-card:active {
  transform: scale(0.97);
}

.instrumental-carousel {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 10px 2px 14px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.instrumental-carousel::-webkit-scrollbar { display: none; }

.instrumental-carousel-shell {
  position: relative;
  min-width: 0;
  padding: 0 8px;
}

.instrumental-beats-section {
  position: relative;
  padding: 22px 0 6px;
  border-top: 1px solid rgba(192, 132, 252, .14);
}

.instrumental-section-icon {
  color: #c4b5fd;
  font-size: 24px;
  filter: drop-shadow(0 0 12px rgba(168, 85, 247, .55));
}

.instrumental-refresh-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.instrumental-refresh-btn .material-symbols-rounded {
  font-size: 17px;
}

.instrumental-carousel-nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(216, 180, 254, .34);
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(76, 29, 149, .9), rgba(23, 18, 42, .94));
  color: #fff;
  box-shadow: 0 10px 26px rgba(18, 10, 40, .42), inset 0 1px 0 rgba(255,255,255,.16);
  cursor: pointer;
  opacity: .96;
  transform: translateY(-50%);
  transition: opacity .2s ease, transform .2s ease, background .2s ease;
}

.instrumental-carousel-nav:hover:not(:disabled) {
  background: linear-gradient(145deg, rgba(124, 58, 237, .98), rgba(76, 29, 149, .96));
  border-color: rgba(233, 213, 255, .72);
  box-shadow: 0 14px 30px rgba(76, 29, 149, .45), 0 0 18px rgba(168, 85, 247, .26);
  transform: translateY(-50%) scale(1.06);
}

.instrumental-carousel-nav:disabled {
  cursor: default;
  opacity: .3;
}

.instrumental-carousel-nav--prev { left: -16px; }
.instrumental-carousel-nav--next { right: -16px; }

.instrumental-carousel-nav .material-symbols-rounded {
  font-size: 22px;
}

.instrumental-card {
  position: relative;
  display: grid;
  grid-template-columns: 96px minmax(150px, 1fr);
  gap: 14px;
  align-items: center;
  /* Keep a deliberate peek of the next card on narrow screens. */
  flex: 0 0 min(330px, calc(100% - 52px));
  min-height: 116px;
  padding: 10px;
  overflow: hidden;
  border: 1px solid rgba(155, 125, 255, .28);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(44, 29, 74, .82), rgba(15, 17, 31, .96));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 12px 32px rgba(18, 10, 40, .22);
  cursor: pointer;
  scroll-snap-align: start;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.instrumental-card::after {
  content: '';
  position: absolute;
  width: 120px;
  height: 120px;
  right: -42px;
  bottom: -62px;
  border-radius: 50%;
  background: rgba(168, 85, 247, .18);
  filter: blur(10px);
  pointer-events: none;
}

.instrumental-card:hover { transform: translateY(-3px); border-color: rgba(192, 132, 252, .62); box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 18px 40px rgba(76, 29, 149, .3); }
.instrumental-card:active { transform: scale(.98); }
.instrumental-card:focus-visible { outline: 2px solid #c4b5fd; outline-offset: 3px; }
.popular-beats-section {
  position: relative;
  padding: 20px 0 6px;
  border-top: 1px solid rgba(96, 165, 250, .14);
}

.popular-beats-carousel-shell {
  position: relative;
  min-width: 0;
  padding: 0 8px;
}

.popular-beats-carousel {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 10px 2px 16px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.popular-beats-carousel::-webkit-scrollbar { display: none; }

.popular-beat-card {
  position: relative;
  display: grid;
  grid-template-columns: 72px minmax(130px, 1fr) auto;
  gap: 12px;
  align-items: center;
  flex: 0 0 min(300px, calc(100% - 44px));
  min-height: 92px;
  padding: 9px;
  overflow: hidden;
  border: 1px solid rgba(96, 165, 250, .25);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(21, 48, 86, .86), rgba(13, 19, 35, .98));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 12px 28px rgba(8, 20, 45, .24);
  cursor: pointer;
  scroll-snap-align: start;
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.popular-beat-card:hover {
  transform: translateY(-3px);
  border-color: rgba(125, 211, 252, .68);
  box-shadow: 0 18px 34px rgba(14, 116, 144, .26), 0 0 18px rgba(56, 189, 248, .12);
}

.popular-beat-card:focus-visible { outline: 2px solid #7dd3fc; outline-offset: 3px; }
.popular-beat-cover { width: 72px; height: 72px; overflow: hidden; border-radius: 14px; background: linear-gradient(145deg, #0ea5e9, #172554); box-shadow: 0 7px 18px rgba(0,0,0,.28); }
.popular-beat-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.popular-beat-rank { color: #7dd3fc; font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.popular-beat-title { margin: 4px 0 3px; overflow: hidden; color: var(--text-primary); font-size: 14px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.popular-beat-artist { margin: 0; overflow: hidden; color: var(--text-secondary); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.popular-beat-play {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(125, 211, 252, .38);
  border-radius: 50%;
  color: #e0f2fe;
  background: linear-gradient(145deg, rgba(14, 165, 233, .32), rgba(30, 64, 175, .34));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 5px 16px rgba(2, 8, 23, .3);
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.popular-beat-play:hover:not(:disabled),
.popular-beat-play:focus-visible {
  transform: scale(1.08);
  border-color: rgba(125, 211, 252, .78);
  color: #fff;
  background: linear-gradient(145deg, rgba(14, 165, 233, .72), rgba(37, 99, 235, .72));
  box-shadow: 0 0 18px rgba(56, 189, 248, .22), inset 0 1px 0 rgba(255, 255, 255, .2);
  outline: none;
}
.popular-beat-play:active:not(:disabled) { transform: scale(.96); }
.popular-beat-play:disabled { cursor: wait; opacity: .72; }
.popular-beat-play .material-symbols-rounded { font-size: 22px; }
.popular-beat-play.is-playing { color: #fff; background: linear-gradient(145deg, #0284c7, #1d4ed8); }
.popular-beats-nav { border-color: rgba(125, 211, 252, .34); background: linear-gradient(145deg, rgba(14, 116, 144, .92), rgba(15, 23, 42, .96)); }
.popular-beats-nav:hover:not(:disabled) { background: linear-gradient(145deg, rgba(2, 132, 199, .98), rgba(14, 116, 144, .96)); }
.instrumental-cover { position: relative; width: 96px; height: 96px; overflow: hidden; border-radius: 16px; background: linear-gradient(145deg, #6d28d9, #111827 72%); box-shadow: 0 8px 22px rgba(0,0,0,.28); }
.instrumental-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.instrumental-cover-icon { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255,255,255,.86); font-size: 32px; }
.instrumental-badge { position: absolute; top: 8px; left: 8px; z-index: 1; padding: 4px 7px; border: 1px solid rgba(233, 213, 255, .36); border-radius: 999px; background: rgba(76, 29, 149, .82); color: #f3e8ff; font-size: 9px; font-weight: 800; letter-spacing: .08em; }
.instrumental-info { min-width: 0; position: relative; z-index: 1; }
.instrumental-kicker { margin: 0 0 7px; color: #c4b5fd; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.instrumental-title { margin: 0 0 5px; overflow: hidden; color: var(--text-primary); font-size: 15px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.instrumental-artist { margin: 0; overflow: hidden; color: var(--text-secondary); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.instrumental-meta { margin: 10px 0 0; color: #a78bfa; font-size: 11px; font-weight: 600; }

.instrumental-skeleton-card {
  flex: 0 0 min(330px, calc(100% - 52px));
  min-height: 116px;
  padding: 10px;
  display: grid;
  grid-template-columns: 96px minmax(150px, 1fr);
  gap: 14px;
  align-items: center;
  border: 1px solid rgba(155, 125, 255, .18);
  border-radius: 22px;
  background: rgba(255, 255, 255, .05);
}

.instrumental-skeleton-cover {
  width: 96px;
  height: 96px;
  border-radius: 16px;
}

.instrumental-skeleton-info {
  display: grid;
  gap: 10px;
}

.instrumental-skeleton-line {
  height: 12px;
  border-radius: 999px;
}

.instrumental-skeleton-line--wide { width: 78%; }
.instrumental-skeleton-line--medium { width: 58%; }
.instrumental-skeleton-line--short { width: 36%; }

@media (max-width: 767px) {
  .instrumental-carousel {
    padding-right: 34px;
  }

  .instrumental-carousel-nav {
    width: 34px;
    height: 34px;
  }

  .instrumental-carousel-nav--prev { left: -10px; }
  .instrumental-carousel-nav--next { right: -10px; }
}

/* Flow instantané : skeleton identique au gabarit des cartes finales */
.flow-skeleton-card {
  width: 240px;
  min-width: 240px;
  height: 72px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 18px;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  overflow: hidden;
}

.flow-skeleton-card .flow-skeleton-cover {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border-radius: 12px;
}

.flow-skeleton-card .flow-skeleton-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.flow-skeleton-card .flow-skeleton-title {
  width: 82%;
  height: 13px;
  border-radius: 999px;
}

.flow-skeleton-card .flow-skeleton-artist {
  width: 58%;
  height: 10px;
  border-radius: 999px;
}

/* COVER */
.single-cover {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  object-fit: cover;
}

/* INFO */
.single-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.single-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.single-artist {
  font-size: 12px;
  color: var(--text-secondary);
}

/* 🔥 FLAME BADGE */
.flow-badge {
  position: absolute;
  top: 6px;
  right: 8px;

  font-size: 12px;
  opacity: 0.8;
  animation: flamePulse 1.5s infinite;
}

@keyframes flamePulse {
  0% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(1); opacity: 0.7; }
}


.cover-fallback {
  width: 52px;
  height: 52px;
  border-radius: 12px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: linear-gradient(
    135deg,
    var(--accent),
    var(--glow-primary),
    rgba(0,0,0,0.2)
  );

  box-shadow: 0 0 18px var(--glow-secondary);
  color: white;
  font-size: 18px;
}

/* icon musique */
.cover-fallback::after {
  content: "♪";
}






/* Empêche de voir l'image précédente qui "traîne" */
.carousel-item img {
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

/* On affiche l'image seulement quand elle est chargée */
.carousel-item img[src] {
  background-color: #1a1a1a;
}

/* Une fois chargée via le onload du JS */
.cover-container.loaded img {
  opacity: 1;
}


body { box-sizing: border-box; }
  
    /* Clickable artist name styles for modals */
    #player-modal-artist,
    #track-detail-artist {
      position: relative;
      user-select: none;
      -webkit-user-select: none;
      -webkit-tap-highlight-color: transparent;
    }
    
    /* Mobile/touch device feedback */
    @media (hover: none) and (pointer: coarse) {
      #player-modal-artist:active,
      #track-detail-artist:active {
        background: rgba(10, 132, 255, 0.25) !important;
        transform: scale(0.98) !important;
      }
    }
    
  /* --- FIX: Desktop Hover Premium Style --- */
@media (hover: hover) and (pointer: fine) {
    /* Cible les noms d'artistes dans le lecteur et les détails */
    #player-modal-artist,
    #track-detail-artist,
    .artist-link-premium {
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        cursor: pointer;
        position: relative;
        display: inline-block;
        color: #ffffff; /* Couleur de base */
    }

    /* Effet au survol : Changement de couleur et soulignement dynamique */
    #player-modal-artist:hover,
    #track-detail-artist:hover,
    .artist-link-premium:hover {
        color: var(--accent, #ef4444); /* Utilise ta couleur rouge Lumina */
    }

    /* Optionnel : Ajout d'une petite barre de soulignement qui s'étire */
    #player-modal-artist::after,
    #track-detail-artist::after {
        content: '';
        position: absolute;
        width: 0;
        height: 1px;
        bottom: -2px;
        left: 0;
        background-color: var(--accent, #ef4444);
        transition: width 0.3s ease;
    }

    #player-modal-artist:hover::after,
    #track-detail-artist:hover::after {
        width: 100%;
    }
}

/* --- FIX: Mobile Fallback (Désactive les effets de survol sur tactile) --- */
@media (hover: none) {
    #player-modal-artist:hover,
    #track-detail-artist:hover {
        color: inherit;
        text-decoration: none;
    }
}




























/* 🎵 PREMIUM ELASTIC BOUNCE ANIMATIONS */
    @keyframes elasticBounce {
      0% { transform: scale(1); }
      25% { transform: scale(1.05); }
      50% { transform: scale(0.98); }
      75% { transform: scale(1.02); }
      100% { transform: scale(1); }
    }
    
    @keyframes elasticPulse {
      0% { transform: scale(1); box-shadow: 0 4px 15px rgba(0,113,227,.3); }
      50% { transform: scale(1.08); box-shadow: 0 12px 35px rgba(0,113,227,.5); }
      100% { transform: scale(1); box-shadow: 0 4px 15px rgba(0,113,227,.3); }
    }
    
    @keyframes chewingGumElastic {
      0% { transform: translateY(0) scale(1); }
      15% { transform: translateY(-12px) scale(1.03); }
      30% { transform: translateY(-20px) scale(1.08); }
      45% { transform: translateY(-15px) scale(1.05); }
      60% { transform: translateY(-5px) scale(1.01); }
      75% { transform: translateY(-2px) scale(1); }
      100% { transform: translateY(0) scale(1); }
    }
    
    @keyframes followSuccess {
      0% { transform: scale(0.8) rotate(-10deg); opacity: 0; }
      50% { transform: scale(1.15) rotate(5deg); }
      100% { transform: scale(1) rotate(0); opacity: 1; }
    }

    /* BUTTON STYLES WITH ELASTIC EFFECTS */
    .btn-follow {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      padding: 10px 20px;
      border-radius: 12px;
      border: none;
      font-weight: 600;
      font-size: 14px;
      cursor: pointer;
      transition: all 0.4s cubic-bezier(0.36, 0, 0.66, -0.56);
      position: relative;
      overflow: hidden;
      white-space: nowrap;
    }

    .btn-follow::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: linear-gradient(135deg, rgba(255,255,255,.3) 0%, transparent 100%);
      opacity: 0;
      transition: opacity .3s ease;
      pointer-events: none;
    }

    .btn-follow:hover::before {
      opacity: 1;
    }

    /* FOLLOW STATE - Unfollowed */
    .btn-follow:not(.following) {
      background: linear-gradient(135deg, var(--accent) 0%, rgba(0,113,227,.8) 100%);
      color: #fff;
      box-shadow: 0 4px 15px rgba(0,113,227,.3);
    }

    .btn-follow:not(.following):hover {
      animation: elasticPulse 0.6s ease-out;
      transform: translateY(-3px);
      box-shadow: 0 12px 35px rgba(0,113,227,.5);
    }

    .btn-follow:not(.following):active {
      animation: elasticBounce 0.5s ease-out;
      transform: scale(.95);
    }

    /* FOLLOWING STATE - Followed */
    .btn-follow.following {
      background: rgba(0,113,227,.12);
      color: var(--accent);
      border: 1.5px solid var(--accent);
      box-shadow: 0 2px 8px rgba(0,113,227,.15);
    }

    .btn-follow.following:hover {
      background: rgba(0,113,227,.2);
      box-shadow: 0 4px 16px rgba(0,113,227,.25);
      animation: chewingGumElastic 0.8s ease-out;
    }

    .btn-follow.following:active {
      animation: elasticBounce 0.5s ease-out;
      transform: scale(.98);
    }

    /* DISABLED & LOADING STATES */
    .btn-follow:disabled {
      opacity: .6;
      cursor: not-allowed;
      pointer-events: none;
    }

    .btn-follow.loading {
      position: relative;
      color: transparent;
    }

    .btn-follow.loading::after {
      content: '';
      position: absolute;
      width: 16px;
      height: 16px;
      top: 50%;
      left: 50%;
      margin-left: -8px;
      margin-top: -8px;
      border: 2px solid rgba(255,255,255,.3);
      border-radius: 50%;
      border-top-color: #fff;
      animation: spinLoader .8s linear infinite;
    }

    .btn-follow.following.loading::after {
      border-top-color: var(--accent);
    }

    @keyframes spinLoader {
      to { transform: rotate(360deg); }
    }

    /* TOAST NOTIFICATIONS */
    .toast-notification {
      position: fixed;
      bottom: 100px;
      right: 20px;
      padding: 12px 20px;
      border-radius: 12px;
      background: rgba(0,0,0,.85);
      color: #fff;
      font-size: 14px;
      font-weight: 500;
      backdrop-filter: blur(20px);
      z-index: 2000;
      animation: slideNotificationUp .3s ease-out;
      box-shadow: 0 8px 24px rgba(0,0,0,.3);
    }

    .toast-notification.success {
      background: linear-gradient(135deg, rgba(34,197,94,.9) 0%, rgba(34,197,94,.7) 100%);
      animation: slideNotificationUp .3s ease-out, elasticBounce 0.5s ease-out both;
    }

    .toast-notification.error {
      background: linear-gradient(135deg, rgba(239,68,68,.9) 0%, rgba(239,68,68,.7) 100%);
    }

    @keyframes slideNotificationUp {
      from {
        opacity: 0;
        transform: translateY(20px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    /* RESPONSIVE */
    @media(max-width:640px) {
      .btn-follow {
        padding: 8px 16px;
        font-size: 12px;
      }
      .toast-notification {
        bottom: 90px;
        right: 10px;
      }

      /* Premium buttons for rewarded ad modal on mobile */
      #rewarded-ad-actions button {
        padding: 10px 14px !important;
        font-size: 13px !important;
        font-weight: 500 !important;
        min-width: 100px !important;
      }

      #rewarded-ad-actions {
        gap: 6px !important;
        flex-direction: row !important;
      }

      #rewarded-ad-next,
      #rewarded-ad-skip {
        background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.03) 100%) !important;
      }

      #rewarded-ad-claim[disabled] {
        background: linear-gradient(135deg, rgba(0,113,227,0.5) 0%, rgba(0,113,227,0.25) 100%) !important;
        box-shadow: 0 3px 12px rgba(0,113,227,0.25) !important;
      }

      #rewarded-ad-claim:not([disabled]) {
        background: linear-gradient(135deg, rgba(34,199,89,0.7) 0%, rgba(34,199,89,0.4) 100%) !important;
        box-shadow: 0 4px 16px rgba(34,199,89,0.35) !important;
      }

      #playlist-detail-suggestions {
        display: flex;
        justify-content: center;
        align-items: flex-start;
        gap: 16px;
        flex-wrap: wrap;
      }

      @media (min-width: 1024px) {
        #playlist-detail-suggestions {
          gap: 20px;
        }
      }
    }

    /* Mobile stability: avoid full-page repaints while audio and modals are active. */
    @media (max-width: 768px) {
      body.pulse-beat {
        animation: none !important;
      }

      #player-modal-overlay,
      #player-modal-overlay > div,
      #player-modal-overlay .player-modal-inner,
      #player-modal-overlay .player-modal-queue-view,
      #player-modal-overlay .player-modal-queue-list {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
      }

      #player-modal-overlay .player-modal-queue-list {
        overflow-y: auto !important;
      }

      #player-modal-overlay .player-modal-queue-item {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
      }

      #player-modal-overlay .player-modal-queue-copy,
      #player-modal-overlay .player-modal-queue-title,
      #player-modal-overlay .player-modal-queue-artist {
        min-width: 0 !important;
        max-width: 100% !important;
      }

      body.pulse-engine-active #player-modal {
        animation: none !important;
      }

      #player-modal-overlay.active,
      #player-modal-overlay.active .player-modal-header--floating,
      body > .player-modal-header--floating {
        -webkit-backdrop-filter: none !important;
        backdrop-filter: none !important;
      }

      #player-modal-overlay.active {
        background: rgba(0, 0, 0, 0.94) !important;
      }

      #player-modal-overlay.active .player-modal-header--floating,
      body > .player-modal-header--floating {
        background: rgba(0, 0, 0, 0.96) !important;
      }
    }












     .lumina-theme-dropdown {
      position: fixed;
      top: 80px;
      right: 20px;
      z-index: 12000;
      background: rgba(255, 255, 255, 0.08);
      backdrop-filter: blur(60px);
      border: 1.5px solid rgba(255, 255, 255, 0.15);
      border-radius: 28px;
      padding: 10px;
      min-width: 200px;
      box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
      opacity: 0;
      transform: translateY(-15px) scale(0.85);
      pointer-events: none;
      transition: all 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
      max-height: 50vh;
      overflow-y: auto;
    }
    
    .dark .lumina-theme-dropdown {
      background: rgba(30, 30, 35, 0.1);
      box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    }
    
    .lumina-theme-dropdown.active {
      opacity: 1;
      transform: translateY(0) scale(1);
      pointer-events: all;
    }
    
    .lumina-theme-item {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 10px 12px;
      margin-bottom: 4px;
      border-radius: 12px;
      background: rgba(255, 255, 255, 0.04);
      border: 1px solid rgba(255, 255, 255, 0.08);
      cursor: pointer;
      transition: all 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94);
      position: relative;
      overflow: hidden;
    }
    
    .lumina-theme-item::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: linear-gradient(135deg, rgba(0, 113, 227, 0.15), transparent);
      opacity: 0;
      transition: opacity 0.3s ease;
    }
    
    .lumina-theme-item:hover {
      background: rgba(255, 255, 255, 0.12);
      border-color: var(--glow-primary);
      transform: translateX(4px);
      box-shadow: 0 0 20px rgba(0, 113, 227, 0.2);
    }
    
    .lumina-theme-item:hover::before {
      opacity: 1;
    }
    
    .lumina-theme-item.active {
      background: rgba(var(--accent-rgb, 0, 113, 227), 0.25);
      border-color: var(--accent);
      box-shadow: 0 0 24px var(--glow-primary), inset 0 0 12px rgba(0, 113, 227, 0.1);
    }

    body::before {
      content: '';
      position: fixed;
      inset: 0;
      pointer-events: none;
      border: 3px solid transparent;
      border-image: linear-gradient(90deg, var(--frame-color-start, transparent), var(--frame-color-mid, transparent), var(--frame-color-end, transparent)) 1;
      box-sizing: border-box;
      z-index: 9999;
      opacity: 0;
      transition: opacity 0.35s ease;
      filter: drop-shadow(0 0 60px var(--frame-glow, transparent));
    }

    html[data-theme="quantum-border"] body::before,
    html[data-theme="neon-frame"] body::before,
    html[data-theme="spectral-circuit"] body::before,
    html[data-theme="aurora-reactor"] body::before,
    html[data-theme="vaporwave-loop"] body::before,
    html[data-theme="starlight-rhythm"] body::before {
      opacity: 1;
      animation: frameBorderShift 6s linear infinite;
    }

    @keyframes frameBorderShift {
      0% {
        transform: translate(0px, 0px);
      }
      25% {
        transform: translate(1px, -1px);
      }
      50% {
        transform: translate(-1px, 1px);
      }
      75% {
        transform: translate(1px, 1px);
      }
      100% {
        transform: translate(0px, 0px);
      }
    }

    /* Quantum Border: a luminous snake continuously chasing its own tail. */
    @property --quantum-border-angle {
      syntax: '<angle>';
      inherits: false;
      initial-value: 0deg;
    }

    html[data-theme="quantum-border"] body::before {
      inset: 0;
      border: 0;
      padding: 3px;
      box-sizing: border-box;
      border-image: none;
      background: conic-gradient(
        from var(--quantum-border-angle),
        transparent 0deg 238deg,
        rgba(255, 107, 157, 0.18) 252deg,
        var(--frame-color-end, #a875ff) 270deg,
        var(--frame-color-mid, #ff6b9d) 286deg,
        #fff4df 296deg,
        var(--frame-color-start, #ffb86b) 306deg,
        rgba(255, 184, 107, 0.22) 324deg,
        transparent 342deg 360deg
      );
      -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
      -webkit-mask-composite: xor;
      mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
      mask-composite: exclude;
      filter: drop-shadow(0 0 7px var(--frame-color-start, #ffb86b))
        drop-shadow(0 0 20px var(--frame-glow, rgba(255, 184, 107, 0.32)));
      animation: quantumBorderSnake 5.2s linear infinite;
      transform: none;
    }

    @keyframes quantumBorderSnake {
      from { --quantum-border-angle: 0deg; }
      to { --quantum-border-angle: 360deg; }
    }

    @media (prefers-reduced-motion: reduce) {
      html[data-theme="quantum-border"] body::before {
        animation: none;
      }
    }

    .lumina-theme-icon {
      font-size: 18px;
      min-width: 20px;
    }
    
    .lumina-theme-label {
      font-size: 12px;
      font-weight: 500;
      color: var(--text-primary);
      flex: 1;
    }
    
    .lumina-theme-badge {
      font-size: 10px;
      background: linear-gradient(135deg, var(--accent), rgba(0, 213, 255, 0.8));
      color: white;
      padding: 3px 8px;
      border-radius: 6px;
      font-weight: 600;
      letter-spacing: 0.5px;
      animation: shine 3s infinite linear;
      box-shadow: 0 0 12px var(--accent);
    }
    
    @keyframes shine {
      0% {
        background: linear-gradient(135deg, var(--accent), rgba(0, 213, 255, 0.8));
        box-shadow: 0 0 12px var(--accent);
      }
      50% {
        background: linear-gradient(135deg, rgba(0, 213, 255, 0.8), var(--accent));
        box-shadow: 0 0 24px var(--accent);
      }
      100% {
        background: linear-gradient(135deg, var(--accent), rgba(0, 213, 255, 0.8));
        box-shadow: 0 0 12px var(--accent);
      }
    }

    .notifications-floating-box {
      position: fixed;
      top: 80px;
      right: 20px;
      z-index: 999;
      background: rgba(255, 255, 255, 0.08);
      backdrop-filter: blur(60px);
      border: 1.5px solid rgba(255, 255, 255, 0.15);
      border-radius: 28px;
      padding: 10px;
      min-width: 280px;
      max-width: 340px;
      box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
      opacity: 0;
      transform: translateY(-15px) scale(0.85);
      pointer-events: none;
      transition: all 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
      max-height: 55vh;
      overflow-y: auto;
    }
    
    .dark .notifications-floating-box {
      background: rgba(30, 30, 35, 0.1);
      box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    }
    
    .notifications-floating-box.active {
      opacity: 1;
      transform: translateY(0) scale(1);
      pointer-events: all;
    }

    .notifications-floating-box-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      margin-bottom: 8px;
      padding-bottom: 8px;
      border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .notifications-floating-box-title {
      font-size: 12px;
      font-weight: 600;
      color: var(--text-primary);
      margin: 0;
    }

    .notification-item {
      display: flex;
      align-items: flex-start;
      gap: 8px;
      padding: 10px 12px;
      margin-bottom: 4px;
      border-radius: 10px;
      background: rgba(255, 255, 255, 0.04);
      border: 1px solid rgba(255, 255, 255, 0.08);
      cursor: pointer;
      transition: all 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94);
      position: relative;
      overflow: hidden;
    }

    .notification-item::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: linear-gradient(135deg, rgba(0, 113, 227, 0.15), transparent);
      opacity: 0;
      transition: opacity 0.3s ease;
    }

    .notification-item:hover {
      background: rgba(255, 255, 255, 0.12);
      border-color: var(--glow-primary);
      transform: translateX(4px);
      box-shadow: 0 0 20px rgba(0, 113, 227, 0.2);
    }

    .notification-item:hover::before {
      opacity: 1;
    }

    .notification-item-icon {
      font-size: 16px;
      min-width: 18px;
      flex-shrink: 0;
      margin-top: 1px;
    }

    .notification-item-content {
      flex: 1;
      min-width: 0;
    }

    .notification-item-title {
      font-size: 11px;
      font-weight: 600;
      color: var(--text-primary);
      margin: 0;
      line-height: 1.2;
    }

    .notification-item-message {
      font-size: 11px;
      color: var(--text-secondary);
      margin: 2px 0 0;
      line-height: 1.2;
    }

    .notification-item-time {
      font-size: 9px;
      color: var(--text-secondary);
      margin-top: 3px;
    }

    .notification-link-badge {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 20px;
      height: 20px;
      border-radius: 8px;
      background: linear-gradient(135deg, var(--accent), rgba(0, 213, 255, 0.8));
      color: white;
      cursor: pointer;
      transition: all 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
      box-shadow: 0 0 12px var(--glow-primary);
      position: absolute;
      top: 10px;
      right: 12px;
      font-size: 12px;
      flex-shrink: 0;
    }

    .notification-link-badge:hover {
      transform: scale(1.1);
      box-shadow: 0 0 20px var(--accent);
    }
    
    /* Small theme toggle in dropdown */
    .theme-toggle-small {
      position: relative;
      width: 40px;
      height: 20px;
      background: rgba(255, 255, 255, 0.2);
      border-radius: 10px;
      cursor: pointer;
      transition: all 0.3s ease;
      border: 1px solid rgba(255, 255, 255, 0.3);
    }
    
    .theme-toggle-knob-small {
      position: absolute;
      top: 1px;
      left: 1px;
      width: 16px;
      height: 16px;
      background: #fff;
      border-radius: 50%;
      transition: all 0.3s ease;
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    }
    
    .dark .theme-toggle-small {
      background: rgba(255, 255, 255, 0.1);
    }
    
    /* Quality indicators */
    .quality-indicator {
      font-size: 10px;
      font-weight: 600;
      padding: 2px 6px;
      border-radius: 4px;
      text-transform: uppercase;
    }
    
    .quality-standard {
      background: rgba(142, 142, 147, 0.2);
      color: #8e8e93;
    }
    
    .quality-high {
      background: rgba(52, 199, 89, 0.2);
      color: #34c759;
    }
    
    .quality-lossless {
      background: rgba(255, 215, 0, 0.2);
      color: #ffd700;
    }
    
    /* Equalizer sliders */
    input[type="range"][orient="vertical"] {
      writing-mode: bt-lr;
      appearance: none;
      background: transparent;
      cursor: pointer;
    }
    
    input[type="range"][orient="vertical"]::-webkit-slider-track {
      background: rgba(255, 255, 255, 0.1);
      border-radius: 4px;
      width: 8px;
      height: 120px;
    }
    
    input[type="range"][orient="vertical"]::-webkit-slider-thumb {
      appearance: none;
      background: var(--glow-primary);
      border-radius: 50%;
      width: 20px;
      height: 20px;
      box-shadow: 0 0 10px var(--glow-primary);
    }
    
    input[type="range"][orient="vertical"]::-moz-range-track {
      background: rgba(255, 255, 255, 0.1);
      border-radius: 4px;
      width: 8px;
      height: 120px;
    }
    
    input[type="range"][orient="vertical"]::-moz-range-thumb {
      background: var(--glow-primary);
      border-radius: 50%;
      width: 20px;
      height: 20px;
      border: none;
      box-shadow: 0 0 10px var(--glow-primary);
    }

    /* Keep the main content clear of the floating footer on smaller screens. */
    @media (max-width: 768px) {
      main { padding-bottom: 140px !important; }
    }
    @media (max-width: 480px) {
      main { padding-bottom: 142px !important; }
    }

    #lumina-update-modal {
      position: fixed;
      inset: 0;
      z-index: 99999;
      display: flex;
      align-items: center;
      justify-content: center;
      background: rgba(0, 0, 0, 0.8);
      backdrop-filter: blur(8px);
      opacity: 0;
      visibility: hidden;
      transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    }

    #lumina-update-modal.active { opacity: 1; visibility: visible; }

    .update-card {
      background: #111;
      border: 1px solid rgba(255, 255, 255, 0.1);
      width: 90%;
      max-width: 400px;
      padding: 40px;
      border-radius: 32px;
      text-align: center;
      transform: translateY(20px);
      transition: 0.4s;
      box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    }

    #lumina-update-modal.active .update-card { transform: translateY(0); }

    .update-icon {
      width: 80px;
      height: 80px;
      background: rgba(239, 68, 68, 0.1);
      color: #ef4444;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      margin: 0 auto 24px;
      font-size: 32px;
      animation: luminaUpdatePulse 2s infinite;
    }

    @keyframes luminaUpdatePulse {
      0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
      70% { box-shadow: 0 0 0 20px rgba(239, 68, 68, 0); }
      100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
    }

    .btn-update {
      width: 100%;
      background: #ef4444;
      color: white;
      padding: 16px;
      border-radius: 16px;
      font-weight: 900;
      text-transform: uppercase;
      margin-top: 30px;
      cursor: pointer;
      border: none;
      transition: 0.3s;
    }

    .btn-update:hover { transform: scale(1.02); filter: brightness(1.1); }

    .btn-later {
      margin-top: 15px;
      color: #555;
      font-size: 12px;
      font-weight: 700;
      text-transform: uppercase;
      cursor: pointer;
      background: none;
      border: none;
    }

    /* Desktop header theme control: pill switch matching the active theme. */
    @media (min-width: 769px) {
      #header #theme-toggle {
        box-sizing: border-box;
        display: inline-flex;
        align-items: center;
        justify-content: flex-start;
        flex: 0 0 56px;
        width: 56px;
        min-width: 56px;
        height: 28px;
        padding: 0;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.07) !important;
        box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.24) !important;
        backdrop-filter: blur(12px) !important;
        -webkit-backdrop-filter: blur(12px) !important;
        cursor: pointer;
      }

      #header #theme-toggle .theme-toggle-knob {
        top: 3px;
        left: 3px;
        width: 20px;
        height: 20px;
        background: #f8fafc;
        box-shadow: 0 2px 7px rgba(0, 0, 0, 0.3);
        transform: translateX(0);
        transition: transform 0.24s ease, background 0.24s ease, box-shadow 0.24s ease;
      }

      html:not(.dark) #header #theme-toggle {
        border-color: rgba(15, 23, 42, 0.2) !important;
        background: rgba(15, 23, 42, 0.1) !important;
      }

      #header #theme-toggle:focus-visible {
        outline: 2px solid #0a84ff;
        outline-offset: 3px;
      }
    }

    @media (max-width: 768px) {
      #header #theme-toggle {
        display: inline-flex !important;
        box-sizing: border-box;
        flex: 0 0 46px !important;
        width: 46px !important;
        min-width: 46px !important;
        height: 26px !important;
        padding: 0;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.07) !important;
        box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.24) !important;
        position: relative;
      }

      #header #theme-toggle .theme-toggle-knob {
        top: 3px;
        left: 3px;
        width: 18px;
        height: 18px;
        background: #f8fafc;
        transform: translateX(0);
      }

      html:not(.dark) #header #theme-toggle {
        border-color: rgba(15, 23, 42, 0.2) !important;
        background: rgba(15, 23, 42, 0.1) !important;
      }
    }

    html.dark #header #theme-toggle {
      border-color: rgba(96, 165, 250, 0.68) !important;
      background: linear-gradient(135deg, #0b1628, #16365d) !important;
      box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.72), 0 0 0 1px rgba(59, 130, 246, 0.16), 0 0 12px rgba(10, 132, 255, 0.18) !important;
    }

    html.dark #header #theme-toggle .theme-toggle-knob {
      background: #0a84ff;
      box-shadow: 0 0 10px rgba(10, 132, 255, 0.4);
    }

    @media (min-width: 769px) {
      html.dark       #header #theme-toggle .theme-toggle-knob { transform: translateX(28px); }
    }

    @media (max-width: 768px) {
      html.dark #header #theme-toggle .theme-toggle-knob { transform: translateX(20px) !important; }
    }

    #header #theme-toggle #theme-icon {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 14px;
      min-width: 14px;
      height: 14px;
      min-height: 14px;
      font-size: 0;
      line-height: 1;
      color: #475569;
    }

    html.dark #header #theme-toggle #theme-icon { color: #fff; }

    #header #theme-toggle #theme-icon .player-inline-icon {
      width: 14px;
      height: 14px;
    }

    /* Sapphire glass treatment for track and playlist experiences. */
    :root {
      --media-modal-blue: #63b8ff;
      --media-modal-cyan: #8be7ff;
      --media-modal-glass: rgba(10, 25, 48, 0.78);
      --media-modal-border: rgba(113, 190, 255, 0.2);
      --media-modal-glow: rgba(31, 137, 255, 0.2);
    }

    .player-modal-overlay,
    .track-detail-overlay,
    .playlist-detail-modal-overlay {
      background:
        radial-gradient(ellipse at 50% 0%, rgba(25, 112, 218, 0.2), transparent 48%),
        linear-gradient(155deg, rgba(3, 10, 23, 0.96), rgba(7, 18, 37, 0.97) 58%, rgba(8, 25, 48, 0.96)) !important;
    }

    #player-modal-overlay.active {
      background:
        radial-gradient(ellipse at 50% 0%, rgba(25, 112, 218, 0.2), transparent 48%),
        linear-gradient(155deg, rgba(3, 10, 23, 0.96), rgba(7, 18, 37, 0.97) 58%, rgba(8, 25, 48, 0.96)) !important;
    }

    body > .player-modal-header--floating {
      background: linear-gradient(100deg, rgba(7, 18, 37, 0.98), rgba(12, 35, 66, 0.94)) !important;
      border-bottom: 1px solid var(--media-modal-border) !important;
      box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3), 0 1px 0 rgba(126, 204, 255, 0.08) !important;
      -webkit-backdrop-filter: blur(22px) saturate(150%) !important;
      backdrop-filter: blur(22px) saturate(150%) !important;
    }

    .player-modal-overlay.active .player-modal-header,
    .track-detail-overlay.active .player-modal-header,
    .playlist-detail-modal-overlay.active .player-modal-header {
      background: linear-gradient(100deg, rgba(7, 18, 37, 0.96), rgba(12, 35, 66, 0.88)) !important;
      border-bottom: 1px solid var(--media-modal-border) !important;
      box-shadow: 0 12px 32px rgba(0, 0, 0, 0.26), 0 1px 0 rgba(126, 204, 255, 0.08) !important;
      -webkit-backdrop-filter: blur(22px) saturate(150%) !important;
      backdrop-filter: blur(22px) saturate(150%) !important;
    }

    .player-modal-overlay .player-modal-close-btn,
    .player-modal-overlay .btn-close-modal,
    .track-detail-overlay .btn-close-modal,
    .playlist-detail-modal-overlay .btn-close-modal,
    body > .player-modal-header--floating .btn-close-modal {
      background: linear-gradient(145deg, rgba(81, 166, 255, 0.17), rgba(255, 255, 255, 0.045)) !important;
      border: 1px solid rgba(126, 204, 255, 0.28) !important;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 6px 18px rgba(0, 0, 0, 0.18);
      color: #eaf7ff !important;
      transition: background .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease;
    }

    .player-modal-overlay .player-modal-close-btn:hover,
    .player-modal-overlay .btn-close-modal:hover,
    .track-detail-overlay .btn-close-modal:hover,
    .playlist-detail-modal-overlay .btn-close-modal:hover,
    body > .player-modal-header--floating .btn-close-modal:hover {
      background: rgba(65, 157, 255, 0.28) !important;
      border-color: rgba(139, 231, 255, 0.6) !important;
      box-shadow: 0 0 22px rgba(31, 137, 255, 0.22);
      transform: translateY(-1px);
    }

    .player-modal-overlay .player-modal-content-toggle,
    .player-modal-overlay .player-modal-header-section {
      border-color: rgba(126, 204, 255, 0.16);
    }

    .player-modal-overlay .player-modal-view-toggle {
      border-color: rgba(126, 204, 255, 0.2);
      background: rgba(9, 25, 48, 0.72);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    }

    .player-modal-overlay .player-modal-view-toggle button.active,
    .player-modal-overlay .player-modal-view-toggle button:hover {
      background: linear-gradient(135deg, #1678e8, #3da8ff);
      color: #fff;
      box-shadow: 0 4px 16px rgba(31, 137, 255, 0.28);
    }

    #player-modal-overlay #player-modal-title-display,
    .track-detail-overlay #track-detail-title,
    .playlist-detail-modal-overlay #playlist-detail-title {
      background: linear-gradient(100deg, #fff 12%, #c9eaff 58%, #83dfff);
      -webkit-background-clip: text;
      background-clip: text;
      color: transparent !important;
      -webkit-text-fill-color: transparent;
    }

    #player-modal-overlay #player-modal-artist,
    .track-detail-overlay #track-detail-artist,
    .playlist-detail-modal-overlay #playlist-detail-count {
      color: var(--media-modal-cyan) !important;
      text-shadow: 0 0 18px rgba(86, 190, 255, 0.2);
    }

    #player-modal-overlay #player-modal-info-card {
      background: linear-gradient(145deg, rgba(16, 41, 73, 0.8), rgba(7, 19, 38, 0.72)) !important;
      border-color: var(--media-modal-border) !important;
      border-radius: 22px !important;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 18px 44px rgba(0, 0, 0, 0.2);
    }

    #player-modal-overlay .player-modal-queue-item {
      background: linear-gradient(110deg, rgba(27, 64, 107, 0.46), rgba(13, 30, 54, 0.6));
      border-color: rgba(113, 190, 255, 0.17);
    }

    #player-modal-overlay .player-modal-queue-item:hover,
    #player-modal-overlay .player-modal-queue-item:focus-visible,
    #player-modal-overlay .player-modal-queue-item.is-current {
      background: linear-gradient(110deg, rgba(24, 104, 190, 0.42), rgba(17, 47, 82, 0.78));
      border-color: rgba(139, 215, 255, 0.48);
    }

    .track-detail-overlay .player-modal-inner,
    .playlist-detail-modal-overlay .player-modal-inner {
      position: relative;
      isolation: isolate;
    }

    .track-detail-overlay #track-detail-cover,
    .playlist-detail-modal-overlay #playlist-detail-cover-grid {
      border: 1px solid rgba(145, 218, 255, 0.34) !important;
      box-shadow: 0 0 0 1px rgba(51, 144, 255, 0.12), 0 20px 64px rgba(0, 0, 0, 0.42), 0 0 44px rgba(31, 137, 255, 0.18) !important;
    }

    .track-detail-overlay .btn-glass {
      background: linear-gradient(145deg, rgba(61, 144, 232, 0.18), rgba(255, 255, 255, 0.045)) !important;
      border-color: rgba(126, 204, 255, 0.2) !important;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
      transition: transform .2s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
    }

    .track-detail-overlay .btn-glass:hover {
      background: rgba(50, 137, 227, 0.28) !important;
      border-color: rgba(139, 231, 255, 0.48) !important;
      box-shadow: 0 8px 24px rgba(13, 92, 177, 0.2);
      transform: translateY(-2px);
    }

    .playlist-modal-overlay {
      background:
        radial-gradient(ellipse at 0% 20%, rgba(32, 123, 222, 0.22), transparent 48%),
        rgba(2, 8, 18, 0.72) !important;
      -webkit-backdrop-filter: blur(18px) saturate(140%);
      backdrop-filter: blur(18px) saturate(140%);
    }

    .playlist-modal-overlay.active .playlist-modal {
      background:
        radial-gradient(ellipse at 12% 0%, rgba(37, 123, 211, 0.19), transparent 38%),
        linear-gradient(165deg, #0b192d 0%, #081426 48%, #07101e 100%) !important;
      border-right-color: rgba(113, 190, 255, 0.2) !important;
      box-shadow: 24px 0 70px rgba(0, 0, 0, 0.52), inset -1px 0 0 rgba(139, 231, 255, 0.08) !important;
    }

    .playlist-modal-overlay.active .playlist-modal-header {
      background: linear-gradient(110deg, rgba(12, 33, 60, 0.98), rgba(12, 26, 48, 0.94)) !important;
      border-bottom: 1px solid var(--media-modal-border) !important;
      box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    }

    .playlist-modal-overlay .playlist-modal-title,
    .playlist-modal-overlay .playlist-modal-header p {
      color: #dceeff !important;
    }

    .playlist-modal-overlay .playlist-modal-close {
      color: #e7f5ff !important;
      background: linear-gradient(145deg, rgba(63, 143, 229, 0.2), rgba(255, 255, 255, 0.045)) !important;
      border-color: rgba(126, 204, 255, 0.24) !important;
    }

    .playlist-modal-overlay .playlist-modal-close:hover {
      background: rgba(54, 143, 233, 0.3) !important;
      border-color: rgba(139, 231, 255, 0.5) !important;
      box-shadow: 0 0 22px rgba(31, 137, 255, 0.2);
    }

    .playlist-modal-overlay .playlist-create-cta {
      background: linear-gradient(120deg, #146bd0, #258edb 55%, #35b8d4) !important;
      box-shadow: 0 14px 34px rgba(20, 107, 208, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }

    #user-playlists-list > .playlist-card[data-playlist-id] {
      position: relative;
      background: linear-gradient(155deg, rgba(29, 67, 108, 0.72), rgba(12, 29, 52, 0.9)) !important;
      border-color: rgba(126, 204, 255, 0.2) !important;
      box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.07);
      transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
    }

    #user-playlists-list > .playlist-card[data-playlist-id]:hover {
      border-color: rgba(139, 231, 255, 0.48) !important;
      box-shadow: 0 18px 42px rgba(10, 87, 163, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    }

    #user-playlists-list > .playlist-card h4 {
      color: #f2f8ff !important;
    }

    #user-playlists-list > .playlist-card p:last-child {
      color: var(--media-modal-cyan) !important;
    }

    .playlist-modal-overlay .playlist-item,
    .playlist-detail-modal-overlay .suggestion-track-card {
      background: linear-gradient(145deg, rgba(28, 63, 101, 0.54), rgba(12, 29, 52, 0.76));
      border-color: rgba(126, 204, 255, 0.17);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
    }

    .playlist-modal-overlay .playlist-item:hover,
    .playlist-detail-modal-overlay .suggestion-track-card:hover {
      background: linear-gradient(145deg, rgba(31, 91, 151, 0.68), rgba(15, 42, 72, 0.86));
      border-color: rgba(139, 231, 255, 0.4);
      transform: translateY(-2px);
    }

    .playlist-modal-overlay .playlist-create-btn,
    .playlist-modal-overlay .playlist-add-btn {
      background: linear-gradient(135deg, rgba(25, 113, 213, 0.3), rgba(34, 165, 205, 0.16));
      border-color: rgba(113, 190, 255, 0.42);
      color: #bdeaff;
    }

    .playlist-modal-overlay #playlist-tab-playlists,
    .playlist-modal-overlay #playlist-tab-discover {
      color: #a9c8e5 !important;
      transition: color .2s ease, text-shadow .2s ease;
    }

    .playlist-modal-overlay #playlist-tab-playlists[style*="0a84ff"],
    .playlist-modal-overlay #playlist-tab-discover[style*="0a84ff"] {
      color: var(--media-modal-cyan) !important;
      text-shadow: 0 0 18px rgba(86, 190, 255, 0.28);
    }

    .playlist-detail-modal-overlay #playlist-detail-title {
      text-shadow: 0 8px 30px rgba(44, 143, 240, 0.18);
    }

    .playlist-detail-modal-overlay .playlist-detail-controls {
      padding: 14px;
      border: 1px solid rgba(113, 190, 255, 0.14);
      border-radius: 24px;
      background: linear-gradient(120deg, rgba(18, 47, 80, 0.58), rgba(9, 25, 46, 0.62));
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055), 0 12px 30px rgba(0, 0, 0, 0.14);
    }

    .playlist-detail-modal-overlay .playlist-detail-control-btn:not(.is-primary) {
      background: linear-gradient(145deg, rgba(62, 134, 205, 0.19), rgba(255, 255, 255, 0.04));
      border-color: rgba(126, 204, 255, 0.22);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
      transition: transform .2s ease, background .2s ease, border-color .2s ease;
    }

    .playlist-detail-modal-overlay .playlist-detail-control-btn:not(.is-primary):hover {
      transform: translateY(-2px);
      background: rgba(43, 126, 211, 0.34);
      border-color: rgba(139, 231, 255, 0.44);
    }

    .playlist-detail-modal-overlay .playlist-detail-control-btn.is-primary {
      background: linear-gradient(135deg, #1478e7, #39b7ed);
      box-shadow: 0 10px 26px rgba(19, 121, 220, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.24);
    }

    .playlist-detail-modal-overlay .playlist-detail-track-card,
    .playlist-detail-modal-overlay .playlist-track-item {
      background: linear-gradient(115deg, rgba(24, 57, 93, 0.64), rgba(10, 26, 47, 0.8)) !important;
      border-color: rgba(126, 204, 255, 0.17) !important;
      box-shadow: 0 8px 22px rgba(0, 0, 0, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.055) !important;
    }

    .playlist-detail-modal-overlay .playlist-detail-track-card:hover,
    .playlist-detail-modal-overlay .playlist-track-item:hover {
      background: linear-gradient(115deg, rgba(29, 85, 140, 0.76), rgba(13, 38, 67, 0.9)) !important;
      border-color: rgba(139, 231, 255, 0.4) !important;
      transform: translateY(-1px);
    }

    .playlist-detail-modal-overlay .playlist-detail-track-play {
      background: linear-gradient(145deg, rgba(29, 123, 219, 0.34), rgba(34, 163, 205, 0.16)) !important;
      border-color: rgba(126, 204, 255, 0.45) !important;
      color: #a7e7ff !important;
    }

    .playlist-detail-modal-overlay .playlist-detail-track-playing .playlist-detail-track-play {
      background: linear-gradient(135deg, #1478e7, #39b7ed) !important;
      color: #fff !important;
    }

    #create-playlist-modal-overlay {
      background:
        radial-gradient(ellipse at 50% 0%, rgba(37, 131, 226, 0.22), transparent 55%),
        rgba(2, 8, 18, 0.78) !important;
    }

    #create-playlist-modal-overlay .create-playlist-modal-content {
      background:
        radial-gradient(ellipse at 100% 0%, rgba(37, 131, 226, 0.18), transparent 42%),
        linear-gradient(150deg, rgba(15, 37, 64, 0.98), rgba(7, 19, 36, 0.98)) !important;
      border-color: rgba(126, 204, 255, 0.24) !important;
      box-shadow: 0 28px 80px rgba(0, 0, 0, 0.48), 0 0 45px rgba(22, 115, 206, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    }

    #create-playlist-modal-overlay .create-playlist-modal-title {
      background-image: linear-gradient(100deg, #fff 10%, #c7eaff 60%, #71d8f4);
    }

    #create-playlist-modal-overlay .create-playlist-modal-close {
      background: rgba(70, 143, 215, 0.17);
      border-color: rgba(126, 204, 255, 0.24);
    }

    #create-playlist-modal-overlay .create-playlist-input,
    #create-playlist-modal-overlay .create-playlist-textarea {
      background: rgba(4, 17, 33, 0.62);
      border-color: rgba(126, 204, 255, 0.22);
    }

    #create-playlist-modal-overlay .create-playlist-input:focus,
    #create-playlist-modal-overlay .create-playlist-textarea:focus {
      border-color: rgba(107, 196, 255, 0.72);
      box-shadow: 0 0 0 3px rgba(35, 133, 221, 0.16), 0 0 24px rgba(35, 133, 221, 0.14);
    }

    #create-playlist-modal-overlay .create-playlist-preview-card {
      background: linear-gradient(120deg, rgba(32, 71, 112, 0.48), rgba(10, 27, 49, 0.7));
      border-color: rgba(126, 204, 255, 0.2);
    }

    #create-playlist-modal-overlay .create-playlist-btn-submit {
      background: linear-gradient(110deg, #146bd0, #258edb 58%, #35b8d4);
      border-color: rgba(139, 231, 255, 0.32);
      box-shadow: 0 10px 28px rgba(20, 107, 208, 0.26);
    }

    #premium-playlist-bottomsheet-overlay {
      background: rgba(2, 8, 18, 0.68) !important;
    }

    #premium-playlist-bottomsheet-overlay .premium-playlist-bottomsheet {
      background:
        radial-gradient(ellipse at 50% 0%, rgba(38, 127, 214, 0.2), transparent 48%),
        linear-gradient(160deg, #0d213a, #071426 74%) !important;
      border-color: rgba(126, 204, 255, 0.22) !important;
      box-shadow: 0 -24px 70px rgba(0, 0, 0, 0.46), inset 0 1px 0 rgba(255, 255, 255, 0.09);
    }

    #premium-playlist-bottomsheet-overlay .premium-playlist-bottomsheet-header {
      border-bottom-color: rgba(126, 204, 255, 0.16);
    }

    #premium-playlist-bottomsheet-overlay .premium-playlist-bottomsheet-title {
      color: #f4f9ff;
    }

    #premium-playlist-bottomsheet-overlay .premium-bottomsheet-section h3 {
      color: #e4f3ff;
    }

    #premium-playlist-bottomsheet-overlay .premium-bottomsheet-chip,
    #premium-playlist-bottomsheet-overlay .premium-bottomsheet-track-card,
    #premium-playlist-bottomsheet-overlay .premium-bottomsheet-artist-card,
    #premium-playlist-bottomsheet-overlay .premium-bottomsheet-action-option {
      background: linear-gradient(135deg, rgba(29, 65, 105, 0.56), rgba(11, 28, 50, 0.76));
      border-color: rgba(126, 204, 255, 0.17);
    }

    #premium-playlist-bottomsheet-overlay .premium-bottomsheet-track-card:hover,
    #premium-playlist-bottomsheet-overlay .premium-bottomsheet-artist-card:hover,
    #premium-playlist-bottomsheet-overlay .premium-bottomsheet-action-option:hover {
      background: linear-gradient(135deg, rgba(35, 91, 148, 0.68), rgba(14, 40, 68, 0.86));
      border-color: rgba(139, 231, 255, 0.38);
    }

    #premium-playlist-bottomsheet-overlay .premium-bottomsheet-action-icon {
      background: rgba(35, 132, 222, 0.24);
      color: #91ddff;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    }

    #premium-playlist-bottomsheet-overlay .premium-bottomsheet-close-btn {
      background: rgba(28, 68, 110, 0.78);
      border-color: rgba(126, 204, 255, 0.25);
      color: #e6f5ff;
    }

    @media (max-width: 600px) {
      .playlist-detail-modal-overlay .playlist-detail-controls {
        padding: 10px 6px;
        border-radius: 20px;
      }

      .playlist-detail-modal-overlay .playlist-detail-track-card,
      .playlist-detail-modal-overlay .playlist-track-item {
        border-radius: 15px !important;
      }

      #create-playlist-modal-overlay .create-playlist-modal-content {
        border-radius: 24px;
      }
    }

    /* Keep media modals aligned with whichever premium theme is active. */
    :root {
      --media-modal-highlight: color-mix(in srgb, var(--accent) 48%, white);
      --media-modal-cyan: var(--accent);
      --media-modal-border: color-mix(in srgb, var(--accent) 34%, transparent);
      --media-modal-glow: color-mix(in srgb, var(--accent) 24%, transparent);
      --media-modal-panel: color-mix(in srgb, var(--surface-primary) 88%, var(--accent) 12%);
      --media-modal-panel-raised: color-mix(in srgb, var(--surface-primary) 76%, var(--accent) 12%, white 12%);
    }

    .player-modal-overlay,
    .track-detail-overlay,
    .playlist-detail-modal-overlay {
      background:
        radial-gradient(ellipse at 50% 0%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 48%),
        color-mix(in srgb, var(--surface-primary) 94%, transparent) !important;
      color: var(--text-primary);
    }

    #player-modal-overlay.active {
      background:
        radial-gradient(ellipse at 50% 0%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 48%),
        color-mix(in srgb, var(--surface-primary) 94%, transparent) !important;
    }

    body > .player-modal-header--floating,
    .player-modal-overlay.active .player-modal-header,
    .track-detail-overlay.active .player-modal-header,
    .playlist-detail-modal-overlay.active .player-modal-header,
    .playlist-modal-overlay.active .playlist-modal-header {
      background: color-mix(in srgb, var(--surface-primary) 84%, var(--accent) 16%) !important;
      border-bottom-color: var(--media-modal-border) !important;
    }

    body > .player-modal-header--floating > div p:last-child,
    .player-modal-overlay.active .player-modal-header > div p:last-child,
    .track-detail-overlay.active .player-modal-header > div p:last-child,
    .playlist-detail-modal-overlay.active .player-modal-header > div p:last-child,
    .playlist-modal-overlay .playlist-modal-title,
    .playlist-modal-overlay .playlist-modal-header p {
      color: var(--text-primary) !important;
    }

    .player-modal-overlay .player-modal-close-btn,
    .player-modal-overlay .btn-close-modal,
    .track-detail-overlay .btn-close-modal,
    .playlist-detail-modal-overlay .btn-close-modal,
    .playlist-modal-overlay .playlist-modal-close,
    body > .player-modal-header--floating .btn-close-modal {
      background: color-mix(in srgb, var(--surface-primary) 72%, var(--accent) 28%) !important;
      border-color: var(--media-modal-border) !important;
      color: var(--text-primary) !important;
    }

    .player-modal-overlay .player-modal-view-toggle,
    .player-modal-overlay .player-modal-info-card,
    #player-modal-overlay #player-modal-info-card {
      background: var(--media-modal-panel) !important;
      border-color: var(--media-modal-border) !important;
    }

    .player-modal-overlay .player-modal-view-toggle button.active,
    .player-modal-overlay .player-modal-view-toggle button:hover,
    .playlist-modal-overlay .playlist-create-cta,
    #create-playlist-modal-overlay .create-playlist-btn-submit,
    .playlist-detail-modal-overlay .playlist-detail-control-btn.is-primary {
      background: linear-gradient(130deg, var(--accent), var(--media-modal-highlight)) !important;
      box-shadow: 0 8px 24px var(--media-modal-glow), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }

    #player-modal-overlay #player-modal-title-display,
    .track-detail-overlay #track-detail-title,
    .playlist-detail-modal-overlay #playlist-detail-title,
    #create-playlist-modal-overlay .create-playlist-modal-title {
      background-image: linear-gradient(100deg, var(--text-primary), var(--media-modal-highlight)) !important;
    }

    #player-modal-overlay #player-modal-artist,
    .track-detail-overlay #track-detail-artist,
    .playlist-detail-modal-overlay #playlist-detail-count {
      color: var(--accent) !important;
      text-shadow: 0 0 18px var(--media-modal-glow);
    }

    .track-detail-overlay .btn-glass,
    .playlist-modal-overlay .playlist-item,
    .playlist-detail-modal-overlay .suggestion-track-card,
    .playlist-detail-modal-overlay .playlist-detail-track-card,
    .playlist-detail-modal-overlay .playlist-track-item,
    #premium-playlist-bottomsheet-overlay .premium-bottomsheet-chip,
    #premium-playlist-bottomsheet-overlay .premium-bottomsheet-track-card,
    #premium-playlist-bottomsheet-overlay .premium-bottomsheet-artist-card,
    #premium-playlist-bottomsheet-overlay .premium-bottomsheet-action-option {
      background: var(--media-modal-panel) !important;
      border-color: var(--media-modal-border) !important;
      color: var(--text-primary);
    }

    .playlist-modal-overlay.active .playlist-modal {
      background:
        radial-gradient(ellipse at 12% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 38%),
        var(--surface-primary) !important;
      border-right-color: var(--media-modal-border) !important;
    }

    .playlist-modal-overlay .playlist-modal-close,
    .playlist-modal-overlay .playlist-add-btn,
    .playlist-modal-overlay .playlist-create-btn,
    .playlist-detail-modal-overlay .playlist-detail-control-btn:not(.is-primary) {
      color: var(--accent) !important;
      border-color: var(--media-modal-border) !important;
    }

    #user-playlists-list > .playlist-card[data-playlist-id] {
      background: linear-gradient(145deg, var(--media-modal-panel-raised), var(--media-modal-panel)) !important;
      border-color: var(--media-modal-border) !important;
    }

    #user-playlists-list > .playlist-card h4,
    #user-playlists-list > .playlist-card p:last-child {
      color: var(--text-primary) !important;
    }

    .player-modal-overlay .player-modal-playback-controls button,
    #track-detail-overlay .player-modal-inner > div[style*="grid-template-columns: repeat(4"] .btn-glass,
    .playlist-detail-modal-overlay .playlist-detail-controls,
    .playlist-modal-overlay .playlist-modal-close {
      border-color: var(--media-modal-border);
    }

    .player-modal-overlay .player-modal-playback-controls button:not(:nth-child(3)),
    #track-detail-overlay .player-modal-inner > div[style*="grid-template-columns: repeat(4"] .btn-glass,
    .playlist-detail-modal-overlay .playlist-detail-control-btn:not(.is-primary) {
      background: color-mix(in srgb, var(--surface-primary) 76%, var(--accent) 24%) !important;
      color: var(--text-primary) !important;
    }

    .player-modal-overlay .player-modal-playback-controls button:nth-child(3),
    .playlist-detail-modal-overlay .playlist-detail-control-btn.is-primary {
      background: linear-gradient(135deg, var(--accent), var(--media-modal-highlight)) !important;
      color: #fff !important;
      box-shadow: 0 8px 24px var(--media-modal-glow);
    }

    .track-detail-overlay #track-detail-cover,
    .playlist-detail-modal-overlay #playlist-detail-cover-grid {
      border-color: var(--media-modal-border) !important;
      box-shadow: 0 0 0 1px var(--media-modal-glow), 0 20px 64px rgba(0, 0, 0, 0.34) !important;
    }

    .playlist-detail-modal-overlay .playlist-detail-track-play,
    #premium-playlist-bottomsheet-overlay .premium-bottomsheet-action-icon {
      color: var(--accent) !important;
      border-color: var(--media-modal-border) !important;
    }

    .playlist-modal-overlay #playlist-tab-playlists,
    .playlist-modal-overlay #playlist-tab-discover {
      color: var(--text-secondary) !important;
      border-bottom: 2px solid transparent !important;
    }

    .playlist-modal-overlay #playlist-tab-playlists.is-active,
    .playlist-modal-overlay #playlist-tab-discover.is-active,
    #track-detail-overlay [onclick^="switchTrackDetailTab("].is-active {
      color: var(--accent) !important;
      border-bottom: 2px solid var(--accent) !important;
      text-shadow: 0 0 18px var(--media-modal-glow);
    }

    #track-detail-overlay [onclick^="switchTrackDetailTab("] {
      color: var(--text-secondary) !important;
      border-bottom: 2px solid transparent !important;
    }

    #track-detail-overlay .player-modal-inner > div[style*="grid-template-columns: repeat(4"] .btn-glass {
      padding: 10px 4px !important;
      gap: 7px !important;
      background: linear-gradient(145deg, var(--media-modal-panel-raised), var(--media-modal-panel)) !important;
      border: 1px solid var(--media-modal-border) !important;
      border-radius: 14px !important;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 8px 20px rgba(0, 0, 0, 0.12) !important;
      color: var(--text-primary) !important;
      transition: transform .2s ease;
    }

    #track-detail-overlay .player-modal-inner > div[style*="grid-template-columns: repeat(4"] .btn-glass > .material-symbols-rounded {
      width: 46px;
      height: 46px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border: 1px solid var(--media-modal-border);
      border-radius: 50%;
      background: color-mix(in srgb, var(--surface-primary) 76%, var(--accent) 24%);
      color: var(--accent);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
      transition: transform .2s ease, background .2s ease, border-color .2s ease;
    }

    #track-detail-overlay .player-modal-inner > div[style*="grid-template-columns: repeat(4"] .btn-glass > span:not(.material-symbols-rounded) {
      color: var(--text-secondary) !important;
      font-size: 11px !important;
      text-align: center;
    }

    #track-detail-overlay .player-modal-inner > div[style*="grid-template-columns: repeat(4"] .btn-glass:hover,
    #track-detail-overlay .player-modal-inner > div[style*="grid-template-columns: repeat(4"] .btn-glass:focus-visible {
      background: color-mix(in srgb, var(--media-modal-panel-raised) 76%, var(--accent) 24%) !important;
      border-color: var(--media-modal-highlight) !important;
      box-shadow: 0 8px 24px var(--media-modal-glow) !important;
      transform: translateY(-2px);
    }

    #track-detail-overlay .player-modal-inner > div[style*="grid-template-columns: repeat(4"] .btn-glass:hover > .material-symbols-rounded,
    #track-detail-overlay .player-modal-inner > div[style*="grid-template-columns: repeat(4"] .btn-glass:focus-visible > .material-symbols-rounded {
      background: color-mix(in srgb, var(--surface-primary) 66%, var(--accent) 34%);
      border-color: var(--media-modal-highlight);
      color: var(--accent);
    }

    @media (max-width: 480px) {
      #track-detail-overlay .player-modal-inner > div[style*="grid-template-columns: repeat(4"] .btn-glass {
        padding: 8px 2px !important;
      }

      #track-detail-overlay .player-modal-inner > div[style*="grid-template-columns: repeat(4"] .btn-glass > .material-symbols-rounded {
        width: 38px;
        height: 38px;
      }
    }

    #create-playlist-modal-overlay .create-playlist-modal-content,
    #premium-playlist-bottomsheet-overlay .premium-playlist-bottomsheet {
      background:
        radial-gradient(ellipse at 100% 0%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 42%),
        var(--surface-primary) !important;
      border-color: var(--media-modal-border) !important;
    }

    #create-playlist-modal-overlay .create-playlist-input,
    #create-playlist-modal-overlay .create-playlist-textarea,
    #create-playlist-modal-overlay .create-playlist-preview-card {
      background: color-mix(in srgb, var(--surface-primary) 84%, var(--accent) 16%);
      border-color: var(--media-modal-border);
      color: var(--text-primary);
    }

    #create-playlist-modal-overlay .create-playlist-buttons {
      position: sticky;
      bottom: -24px;
      z-index: 2;
      padding: 12px 0 4px;
      background: linear-gradient(180deg, transparent, var(--surface-primary) 30%);
    }

    /* Place track identity and all four actions together above secondary details. */
    #track-detail-overlay .player-modal-inner {
      display: grid;
      grid-template-columns: minmax(104px, 26vw) minmax(0, 1fr);
      align-items: center;
      column-gap: clamp(12px, 3vw, 24px);
      row-gap: 12px;
    }

    #track-detail-overlay #track-detail-cover {
      grid-column: 1;
      grid-row: 1;
      width: 100% !important;
      max-width: 156px;
      aspect-ratio: 1;
      height: auto !important;
      margin: 0 auto !important;
      border-radius: 20px !important;
      background-color: #090b12 !important;
      background-position: center !important;
      background-repeat: no-repeat !important;
      background-size: cover !important;
    }

    #track-detail-overlay .player-modal-inner > div[style*="text-align: center"] {
      grid-column: 2;
      grid-row: 1;
      min-width: 0;
      margin: 0 !important;
      text-align: left !important;
    }

    #track-detail-overlay #track-detail-title {
      font-size: clamp(20px, 4vw, 30px) !important;
      line-height: 1.12;
      overflow-wrap: anywhere;
    }

    #track-detail-overlay #track-detail-artist {
      margin: 4px 0 8px !important;
      padding: 0 !important;
      border: 0 !important;
      background: transparent !important;
      font-size: 14px !important;
    }

    #track-detail-overlay #track-detail-album {
      margin: 0 !important;
    }

    #track-detail-overlay .player-modal-inner > div[style*="grid-template-columns: repeat(4"] {
      grid-column: 1 / -1;
      grid-row: 2;
      grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
      gap: 8px !important;
      margin: 0 0 4px !important;
    }

    #track-detail-overlay .player-modal-inner > div[style*="grid-template-columns: repeat(4"] .btn-glass {
      min-height: 64px;
      padding: 9px 5px !important;
      gap: 5px !important;
      color: var(--accent) !important;
    }

    #track-detail-overlay .track-detail-playback-controls {
      grid-column: 1 / -1;
      grid-row: 3;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-wrap: wrap;
      gap: 14px 24px;
      margin: 0 0 4px;
      padding: 12px 16px;
      border: 1px solid var(--media-modal-border);
      border-radius: 18px;
      background: color-mix(in srgb, var(--surface-primary) 82%, var(--accent) 18%);
      box-shadow: 0 12px 32px color-mix(in srgb, var(--accent) 12%, transparent);
    }

    #track-detail-overlay .track-detail-transport-controls,
    #track-detail-overlay .track-detail-volume-controls {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
    }

    #track-detail-overlay .track-detail-playback-controls button {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 40px;
      height: 40px;
      padding: 0;
      border: 1px solid var(--media-modal-border);
      border-radius: 50%;
      background: color-mix(in srgb, var(--surface-primary) 88%, var(--accent) 12%);
      color: var(--text-primary);
      cursor: pointer;
      touch-action: manipulation;
      transition: transform 140ms ease, background-color 140ms ease;
    }

    #track-detail-overlay .track-detail-playback-controls button:active {
      transform: scale(.94);
    }

    #track-detail-overlay .track-detail-playback-controls button.is-primary {
      width: 48px;
      height: 48px;
      border-color: transparent;
      background: var(--accent);
      color: #fff;
    }

    #track-detail-overlay .track-detail-volume-controls input {
      width: clamp(90px, 20vw, 150px);
      accent-color: var(--accent);
      cursor: pointer;
    }

    #track-detail-overlay .player-modal-inner > div[style*="display: flex"][style*="border-bottom"] {
      grid-column: 1 / -1;
      grid-row: 4;
      position: static;
      top: auto;
      z-index: auto;
      gap: clamp(8px, 3vw, 20px) !important;
      margin: 0 0 18px !important;
      padding: 10px 0 !important;
      background: transparent;
      overflow-x: auto;
    }

    #track-detail-overlay #track-detail-tab-about,
    #track-detail-overlay #track-detail-tab-lyrics,
    #track-detail-overlay #track-detail-tab-related,
    #track-detail-overlay #track-detail-tab-discover {
      grid-column: 1 / -1;
      grid-row: 5;
      min-width: 0;
    }

    /* Keep playlist controls in the initial viewport; only its track list scrolls. */
    .playlist-detail-modal-overlay .player-modal-inner {
      display: grid;
      grid-template-columns: minmax(108px, 26vw) minmax(0, 1fr);
      align-items: center;
      column-gap: clamp(12px, 3vw, 24px);
      row-gap: 14px;
    }

    .playlist-detail-modal-overlay .player-modal-inner > div[style*="text-align: center"] {
      grid-column: 1 / -1;
      display: grid;
      grid-template-columns: minmax(108px, 26vw) minmax(0, 1fr);
      align-items: center;
      column-gap: clamp(12px, 3vw, 24px);
      margin: 0 !important;
      text-align: left !important;
    }

    .playlist-detail-modal-overlay #playlist-detail-cover {
      grid-column: 1;
      grid-row: 1 / span 5;
      width: 100% !important;
      height: auto !important;
      aspect-ratio: 1;
      margin: 0 !important;
    }

    .playlist-detail-modal-overlay #playlist-detail-cover-grid {
      border-radius: 18px !important;
    }

    .playlist-detail-modal-overlay #playlist-detail-title,
    .playlist-detail-modal-overlay #playlist-detail-description,
    .playlist-detail-modal-overlay #playlist-detail-count,
    .playlist-detail-modal-overlay .player-modal-inner > div[style*="text-align: center"] > div:last-child {
      grid-column: 2;
      min-width: 0;
      margin: 0 0 6px !important;
    }

    .playlist-detail-modal-overlay #playlist-detail-title {
      font-size: clamp(20px, 4vw, 30px) !important;
      line-height: 1.12;
      overflow-wrap: anywhere;
    }

    .playlist-detail-modal-overlay #playlist-detail-description {
      display: -webkit-box;
      -webkit-box-orient: vertical;
      -webkit-line-clamp: 2;
      overflow: hidden;
      font-size: 12px !important;
    }

    .playlist-detail-modal-overlay .player-modal-inner > div[style*="text-align: center"] > div:last-child {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin-top: 4px !important;
    }

    .playlist-detail-modal-overlay .playlist-detail-controls {
      grid-column: 1 / -1;
      grid-row: 2;
      width: fit-content;
      max-width: 100%;
      margin: 0 auto 2px !important;
      gap: clamp(6px, 2vw, 10px);
    }

    .playlist-detail-modal-overlay #playlist-detail-tracks,
    .playlist-detail-modal-overlay .player-modal-inner > div[style*="margin-bottom: 120px"] {
      grid-column: 1 / -1;
    }

    .playlist-detail-modal-overlay #playlist-detail-tracks {
      grid-row: 3;
    }

    .playlist-detail-modal-overlay .player-modal-inner > div[style*="margin-bottom: 120px"] {
      grid-row: 4;
    }

    /* Short viewports get a compact one-screen player; lists remain scrollable. */
    @media (max-height: 760px) {
      #player-modal-overlay > div:not(.player-modal-header) {
        padding-top: calc(var(--player-modal-header-height) + env(safe-area-inset-top, 0px) + 2px) !important;
        padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)) !important;
      }

      #player-modal-overlay .player-modal-inner:not(.is-info-view):not(.is-queue-view) #player-modal-cover {
        width: min(38vw, 140px) !important;
        height: min(38vw, 140px) !important;
        margin: 0 auto 8px !important;
      }

      #player-modal-overlay .player-modal-inner:not(.is-info-view):not(.is-queue-view) > div[style*="text-align: center"] {
        margin-bottom: 8px !important;
      }

      #player-modal-overlay .player-modal-inner:not(.is-info-view):not(.is-queue-view) .player-modal-playback-controls {
        margin-bottom: 10px !important;
      }

      #player-modal-overlay .player-modal-inner:not(.is-info-view):not(.is-queue-view) .player-modal-controls-cluster {
        padding-bottom: 8px;
      }
    }

    @media (max-width: 480px) {
      #track-detail-overlay .player-modal-inner,
      .playlist-detail-modal-overlay .player-modal-inner,
      .playlist-detail-modal-overlay .player-modal-inner > div[style*="text-align: center"] {
        grid-template-columns: minmax(92px, 27vw) minmax(0, 1fr);
        column-gap: 12px;
      }

      #track-detail-overlay .player-modal-inner > div[style*="grid-template-columns: repeat(4"] {
        gap: 6px !important;
      }

      #track-detail-overlay .player-modal-inner > div[style*="grid-template-columns: repeat(4"] .btn-glass {
        min-height: 56px;
      }

      #track-detail-overlay .track-detail-playback-controls {
        gap: 10px;
        padding: 10px;
      }

      #track-detail-overlay .track-detail-transport-controls,
      #track-detail-overlay .track-detail-volume-controls {
        gap: 7px;
      }

      #track-detail-overlay .track-detail-volume-controls input {
        width: min(32vw, 120px);
      }

      .playlist-detail-modal-overlay .playlist-detail-controls {
        padding: 8px 4px;
        gap: 5px;
      }

      .playlist-detail-modal-overlay .playlist-detail-control-btn {
        width: 38px;
        height: 38px;
        min-width: 38px;
        min-height: 38px;
        flex-basis: 38px;
      }

      .playlist-detail-modal-overlay .playlist-detail-control-btn.is-primary {
        width: 46px;
        height: 46px;
        min-width: 46px;
        min-height: 46px;
        flex-basis: 46px;
      }
    }

    @keyframes mediaModalActionSpin {
      to { transform: rotate(360deg); }
    }

    .media-modal-action-pending {
      position: relative !important;
      pointer-events: none;
    }

    .media-modal-action-loading > .material-symbols-rounded {
      visibility: hidden;
    }

    .media-modal-action-loading::after {
      position: absolute;
      top: 50%;
      left: 50%;
      width: 18px;
      height: 18px;
      border: 2px solid color-mix(in srgb, var(--accent) 28%, transparent);
      border-top-color: var(--accent);
      border-radius: 50%;
      content: "";
      animation: mediaModalActionSpin .7s linear infinite;
      transform: translate(-50%, -50%);
    }

    .playlist-detail-control-btn.is-primary.media-modal-action-loading::after {
      border-color: rgba(255, 255, 255, 0.36);
      border-top-color: #fff;
    }

    .create-playlist-btn-submit.media-modal-action-loading::after {
      left: auto;
      right: 16px;
      transform: translateY(-50%);
    }

    .player-modal-playback-controls button.is-audio-loading {
      position: relative;
      pointer-events: none;
    }

    .player-modal-playback-controls button.is-audio-loading > .material-symbols-rounded {
      visibility: hidden;
    }

    .player-modal-playback-controls button.is-audio-loading::after {
      position: absolute;
      top: 50%;
      left: 50%;
      width: 22px;
      height: 22px;
      border: 2px solid color-mix(in srgb, var(--accent) 28%, transparent);
      border-top-color: var(--accent);
      border-radius: 50%;
      content: "";
      animation: mediaModalActionSpin .7s linear infinite;
      transform: translate(-50%, -50%);
    }

    #track-detail-overlay .player-modal-inner > div[style*="grid-template-columns: repeat(4"] .btn-glass {
      min-height: 64px;
      padding: 10px 4px !important;
      gap: 7px !important;
      background: linear-gradient(145deg, var(--media-modal-panel-raised), var(--media-modal-panel)) !important;
      border: 1px solid var(--media-modal-border) !important;
      border-radius: 14px !important;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 8px 20px rgba(0, 0, 0, 0.12) !important;
      color: var(--text-primary) !important;
    }

    #track-detail-overlay .player-modal-inner > div[style*="grid-template-columns: repeat(4"] .btn-glass > .material-symbols-rounded {
      display: inline-flex;
      width: 46px;
      height: 46px;
      align-items: center;
      justify-content: center;
      border: 1px solid var(--media-modal-border);
      border-radius: 50%;
      background: color-mix(in srgb, var(--surface-primary) 76%, var(--accent) 24%);
      color: var(--accent);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
      transition: transform .2s ease, background .2s ease, border-color .2s ease;
    }

    #track-detail-overlay .player-modal-inner > div[style*="grid-template-columns: repeat(4"] .btn-glass > span:not(.material-symbols-rounded) {
      color: var(--text-secondary) !important;
      font-size: 11px !important;
      text-align: center;
    }

    #track-detail-overlay .player-modal-inner > div[style*="grid-template-columns: repeat(4"] .btn-glass:hover > .material-symbols-rounded,
    #track-detail-overlay .player-modal-inner > div[style*="grid-template-columns: repeat(4"] .btn-glass:focus-visible > .material-symbols-rounded {
      background: color-mix(in srgb, var(--surface-primary) 66%, var(--accent) 34%);
      border-color: var(--media-modal-highlight);
    }

    @media (max-width: 480px) {
      #track-detail-overlay .player-modal-inner > div[style*="grid-template-columns: repeat(4"] .btn-glass {
        min-height: 56px;
      }

      #track-detail-overlay .player-modal-inner > div[style*="grid-template-columns: repeat(4"] .btn-glass > .material-symbols-rounded {
        width: 38px;
        height: 38px;
      }
    }

    #track-detail-overlay.active > div {
      padding-top: calc(var(--player-modal-header-height) + env(safe-area-inset-top, 0px) + 16px) !important;
    }

    #track-detail-overlay.active > div:first-child {
      height: 100dvh;
      max-height: none !important;
      min-height: 100dvh;
      box-sizing: border-box;
      padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    }

    @supports not (height: 100dvh) {
      #track-detail-overlay.active > div:first-child {
        height: 100vh;
        min-height: 100vh;
      }
    }

    #track-detail-overlay .track-detail-metadata-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
      gap: 10px;
      margin-bottom: 20px;
    }

    #track-detail-overlay .track-detail-metadata-item {
      min-width: 0;
      padding: 12px 14px;
      border: 1px solid var(--media-modal-border);
      border-radius: 14px;
      background: linear-gradient(145deg, var(--media-modal-panel-raised), var(--media-modal-panel));
    }

    #track-detail-overlay .track-detail-metadata-item[hidden] {
      display: none !important;
    }

    #track-detail-overlay .track-detail-metadata-item > span {
      display: block;
      margin-bottom: 5px;
      color: var(--text-secondary);
      font-size: 11px;
    }

    #track-detail-overlay .track-detail-metadata-item > strong {
      display: block;
      color: var(--text-primary);
      font-size: 14px;
      font-weight: 600;
      overflow-wrap: anywhere;
    }

    #track-detail-overlay .track-detail-explicit-badge {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 20px;
      height: 20px;
      margin-right: 6px;
      border: 1px solid rgba(255, 255, 255, 0.28);
      border-radius: 5px;
      background: #e53935;
      color: #fff;
      font-size: 12px;
      font-weight: 800;
      line-height: 1;
      vertical-align: -1px;
    }

    #track-detail-overlay .track-detail-lyrics-content {
      margin: 0;
      padding: 18px;
      border: 1px solid var(--media-modal-border);
      border-radius: 16px;
      background: var(--media-modal-panel);
      color: var(--text-secondary);
      line-height: 1.8;
      white-space: pre-wrap;
    }

    #track-detail-overlay .track-detail-card-cover {
      position: relative;
      overflow: hidden;
    }

    #track-detail-overlay .track-detail-card-cover > img {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      border-radius: inherit;
      object-fit: cover;
    }

    #track-detail-overlay .track-detail-discover-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 12px;
    }

    #track-detail-overlay .track-detail-discover-grid > * {
      min-width: 0;
    }

    #track-detail-overlay .track-detail-discover-grid--tracks .premium-track-card {
      padding: 12px !important;
    }

    #track-detail-overlay .track-detail-discover-grid--artists .artist-card {
      padding: 12px !important;
    }

    #track-detail-overlay .track-detail-discover-grid--artists .artist-card h4 {
      overflow-wrap: anywhere;
      font-size: 14px !important;
    }

    #playlist-detail-modal-overlay.active {
      -webkit-backdrop-filter: none !important;
      backdrop-filter: none !important;
    }

    #playlist-detail-modal-overlay.active .player-modal-header {
      box-sizing: border-box;
      width: 100vw !important;
      height: 56px !important;
      margin: 0 !important;
      padding: 6px 12px !important;
      gap: 8px !important;
    }

    #playlist-detail-modal-overlay.active .player-modal-header > div {
      order: 1;
    }

    #playlist-detail-modal-overlay.active .player-modal-header > .btn-close-modal {
      order: 2;
      margin-left: auto !important;
    }

    #playlist-detail-modal-overlay.active .player-modal-header > .btn-close-modal {
      position: relative !important;
      inset: auto !important;
      flex: 0 0 36px !important;
      width: 36px !important;
      height: 36px !important;
      min-width: 36px !important;
      min-height: 36px !important;
    }

    @media (max-width: 768px) {
      #playlist-detail-modal-overlay.active .player-modal-header {
        top: 0 !important;
        height: calc(56px + env(safe-area-inset-top, 0px)) !important;
        padding: calc(6px + env(safe-area-inset-top, 0px)) 12px 6px !important;
      }
    }

    #playlist-detail-modal-overlay .player-modal-inner {
      padding-top: 16px !important;
    }

    @media (min-width: 768px) {
      #track-detail-overlay .track-detail-discover-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px;
      }
    }

    #track-detail-overlay .player-modal-inner > div[style*="grid-template-columns: repeat(4"] .btn-glass,
    #track-detail-overlay .player-modal-inner > div[style*="grid-template-columns: repeat(4"] .btn-glass:hover,
    #track-detail-overlay .player-modal-inner > div[style*="grid-template-columns: repeat(4"] .btn-glass:focus-visible {
      background: transparent !important;
      border: 0 !important;
      border-radius: 0 !important;
      box-shadow: none !important;
    }

    #track-detail-overlay .player-modal-inner > div[style*="grid-template-columns: repeat(4"] .btn-glass:hover,
    #track-detail-overlay .player-modal-inner > div[style*="grid-template-columns: repeat(4"] .btn-glass:focus-visible {
      transform: translateY(-2px);
    }

    .music-card,
    .artist-card {
      will-change: auto !important;
      transition-property: transform, box-shadow, border-color !important;
    }

    .play-btn-overlay {
      animation: none !important;
      will-change: auto !important;
      -webkit-backdrop-filter: none !important;
      backdrop-filter: none !important;
    }

    @media (hover: hover) {
      .play-btn-overlay:hover {
        animation: pulse-glow-hover 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
      }
    }

    .playlist-cover-grid,
    .playlist-cover-grid > div,
    .playlist-cover-grid > div::before {
      animation: none !important;
    }

    .badge-new.shimmer {
      animation: none !important;
    }

    @media (hover: none), (pointer: coarse) {
      #app-wrapper {
        scroll-behavior: auto !important;
      }

      .noise-overlay::before {
        display: none !important;
      }

      .music-card:hover,
      .artist-card:hover,
      .interactive-element:hover,
      .playlist-cover-grid:hover,
      .playlist-cover-grid > div:hover {
        transform: none !important;
        box-shadow: none !important;
      }

      #app-wrapper .music-card,
      #app-wrapper .artist-card,
      #app-wrapper .interactive-element,
      #app-wrapper .interactive-element:active {
        transition: none !important;
      }

      #app-wrapper .music-card,
      #app-wrapper .artist-card,
      #app-wrapper .playlist-card,
      #app-wrapper .album-card {
        animation: none !important;
        filter: none !important;
        -webkit-backdrop-filter: none !important;
        backdrop-filter: none !important;
      }

      .music-card:hover .music-card-cover {
        transform: none !important;
      }

      .artist-card:hover .artist-avatar {
        transform: none !important;
        box-shadow: none !important;
      }
    }