/*
 * Dholix — Premium Music App v4.0
 *
 * Glassmorphism + Fluid gradients + Light/Dark theme toggle
 * Design language: Apple Music meets Spotify 2026
 */

/* ═══════════════════════════════════════════
   CSS Variables — Dark Theme (default)
   ═══════════════════════════════════════════ */

:root {
    /* Brand */
    --dh-primary: #7C5CFC;
    --dh-primary-rgb: 124, 92, 252;
    --dh-secondary: #00D4AA;
    --dh-secondary-rgb: 0, 212, 170;
    --dh-accent: #FF6B9D;
    --dh-accent-rgb: 255, 107, 157;
    --dh-red: #FF4B6E;
    --dh-orange: #FF8A50;
    --dh-gold: #FFD166;

    --dh-gradient: linear-gradient(135deg, #7C5CFC 0%, #00D4AA 100%);
    --dh-gradient-gold: linear-gradient(135deg, #FFD166 0%, #FF8A50 100%);
    --dh-gradient-accent: linear-gradient(135deg, #FF6B9D 0%, #7C5CFC 100%);
    --dh-glow: 0 4px 24px rgba(var(--dh-primary-rgb), 0.35);
    --dh-glow-red: 0 4px 20px rgba(255, 75, 110, 0.3);

    /* Surfaces */
    --bg: #0A0A12;
    --bg2: #12121E;
    --bg3: #1A1A2E;
    --bg-glass: rgba(18, 18, 30, 0.72);
    --bg-glass-heavy: rgba(10, 10, 18, 0.88);

    /* Text */
    --text: #F2F0FF;
    --text2: #9896B0;
    --text3: #5E5C74;

    /* Accent mapping */
    --accent: var(--dh-primary);

    /* Borders & effects */
    --border: rgba(255, 255, 255, 0.07);
    --border-glass: rgba(255, 255, 255, 0.1);
    --glass-blur: blur(24px);
    --glass-blur-heavy: blur(40px);

    /* Layout */
    --nav-h: 60px;
    --mini-h: 62px;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --radius: 16px;
    --radius-sm: 10px;
    --radius-xs: 6px;
    --radius-pill: 999px;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 24px 64px rgba(0, 0, 0, 0.6);

    /* Transitions */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ═══════════════════════════════════════════
   Light Theme
   ═══════════════════════════════════════════ */

[data-theme="light"] {
    --bg: #F5F3FF;
    --bg2: #EDEAFC;
    --bg3: #E0DCFA;
    --bg-glass: rgba(245, 243, 255, 0.78);
    --bg-glass-heavy: rgba(245, 243, 255, 0.92);

    --text: #1A1830;
    --text2: #6B678A;
    --text3: #9994B5;

    --border: rgba(0, 0, 0, 0.06);
    --border-glass: rgba(0, 0, 0, 0.08);

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 24px 64px rgba(0, 0, 0, 0.12);
}

/* ═══════════════════════════════════════════
   Reset & Base
   ═══════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    overscroll-behavior-x: none;
    -webkit-text-size-adjust: 100%;
}

body {
    width: 100%;
    max-width: 100vw;
    min-height: 100dvh;
    overflow-x: hidden;
    overscroll-behavior-x: none;
    position: relative;
    touch-action: pan-y;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    -webkit-tap-highlight-color: transparent;
    -webkit-font-smoothing: antialiased;
    user-select: none;
    transition: background 0.4s var(--ease-smooth), color 0.4s var(--ease-smooth);
}

::-webkit-scrollbar { display: none; }
input, button { font-family: inherit; }
img { display: block; }

/* ═══════════════════════════════════════════
   Theme Toggle Button
   ═══════════════════════════════════════════ */

.theme-toggle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg2);
    border: 1px solid var(--border-glass);
    color: var(--text2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s var(--ease-smooth);
    -webkit-tap-highlight-color: transparent;
}
.theme-toggle:active {
    transform: scale(0.88) rotate(180deg);
}
.theme-toggle .icon-sun { display: block; }
.theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: block; }

/* ═══════════════════════════════════════════
   Screens (SPA routing)
   ═══════════════════════════════════════════ */

.screen {
    display: none !important;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    box-sizing: border-box;
    padding: 0 16px calc(var(--nav-h) + var(--mini-h) + var(--safe-bottom) + 12px) 16px;
    min-height: 100dvh;
}
.screen.active {
    display: block !important;
    animation: fadeSlideIn 0.3s var(--ease-out);
}

#screen-home {
    padding-left: 0;
    padding-right: 0;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    box-sizing: border-box;
    background:
        radial-gradient(ellipse 70% 50% at 20% 0%, rgba(var(--dh-primary-rgb), 0.15) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 80% 10%, rgba(var(--dh-secondary-rgb), 0.1) 0%, transparent 50%),
        var(--bg);
}
#screen-home .header {
    padding-left: 16px;
    padding-right: 16px;
    background: transparent;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    background: linear-gradient(180deg, var(--bg-glass-heavy) 0%, transparent 100%);
}
#screen-home .feed {
    padding-left: 16px;
    padding-right: 16px;
}

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

/* ═══════════════════════════════════════════
   Header
   ═══════════════════════════════════════════ */

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0 10px;
    position: sticky;
    top: 0;
    background: var(--bg);
    z-index: 10;
    transition: background 0.3s var(--ease-smooth);
}
.header__brand-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}
.header__logo {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    object-fit: cover;
}
.header__brand {
    font-size: 22px;
    font-weight: 800;
    background: var(--dh-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.header__right {
    display: flex;
    align-items: center;
    gap: 8px;
}
.header__icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg2);
    border: 1px solid var(--border-glass);
    color: var(--text2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s var(--ease-spring), color 0.15s, background 0.3s;
}
.header__icon-btn:active {
    transform: scale(0.88);
    color: var(--text);
}

/* ═══════════════════════════════════════════
   My Wave Hero (Reimagined)
   ═══════════════════════════════════════════ */

.my-wave-hero {
    position: relative;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    margin: 0;
    padding: clamp(32px, 6vh, 48px) 0 24px;
    text-align: center;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    overflow: visible;
}

.my-wave-hero::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 70px;
    background: linear-gradient(180deg, transparent 0%, var(--bg) 100%);
    pointer-events: none;
    z-index: 1;
}

.my-wave__aura {
    position: absolute;
    top: clamp(145px, 20vh, 180px);
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(90vw, 400px);
    height: min(90vw, 400px);
    pointer-events: none;
    z-index: 0;
    overflow: visible;
    -webkit-mask-image: radial-gradient(ellipse 68% 62% at 50% 50%, black 18%, rgba(0,0,0,0.5) 48%, transparent 72%);
    mask-image: radial-gradient(ellipse 68% 62% at 50% 50%, black 18%, rgba(0,0,0,0.5) 48%, transparent 72%);
}

.aura-blob {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    filter: blur(60px);
    mix-blend-mode: screen;
    will-change: transform, opacity;
}
[data-theme="light"] .aura-blob {
    mix-blend-mode: multiply;
    opacity: 0.4;
}

.aura-blob--1 {
    background: radial-gradient(circle, rgba(124, 92, 252, 0.85) 0%, rgba(124, 92, 252, 0.4) 55%, transparent 75%);
    animation: auraPulse1 8s ease-in-out infinite alternate;
}
.aura-blob--2 {
    background: radial-gradient(circle, rgba(0, 212, 170, 0.75) 0%, rgba(0, 180, 160, 0.4) 55%, transparent 75%);
    animation: auraPulse2 10s ease-in-out infinite alternate;
}
.aura-blob--3 {
    background: radial-gradient(circle, rgba(255, 107, 157, 0.8) 0%, rgba(255, 107, 157, 0.35) 50%, transparent 70%);
    animation: auraPulse3 7s ease-in-out infinite alternate;
}

@keyframes auraPulse1 {
    0% { transform: scale(0.88) translate(-18px, -18px) rotate(0deg); opacity: 0.72; }
    50% { transform: scale(1.22) translate(22px, 16px) rotate(110deg); opacity: 0.95; }
    100% { transform: scale(0.96) translate(-12px, 20px) rotate(220deg); opacity: 0.78; }
}
@keyframes auraPulse2 {
    0% { transform: scale(1.15) translate(20px, -20px) rotate(0deg); opacity: 0.65; }
    50% { transform: scale(0.85) translate(-18px, 14px) rotate(-120deg); opacity: 0.95; }
    100% { transform: scale(1.2) translate(16px, -12px) rotate(-240deg); opacity: 0.72; }
}
@keyframes auraPulse3 {
    0% { transform: scale(0.92) rotate(0deg); opacity: 0.8; }
    50% { transform: scale(1.26) rotate(160deg); opacity: 1; }
    100% { transform: scale(1.04) rotate(320deg); opacity: 0.85; }
}

.my-wave__aura.aura--playing .aura-blob--1 { animation-duration: 4s; filter: blur(48px); }
.my-wave__aura.aura--playing .aura-blob--2 { animation-duration: 5s; filter: blur(48px); }
.my-wave__aura.aura--playing .aura-blob--3 { animation-duration: 3.5s; filter: blur(48px); }

.my-wave__content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 0 16px;
}

.my-wave__title {
    font-size: clamp(32px, 8vw, 42px);
    font-weight: 900;
    letter-spacing: -0.04em;
    color: var(--text);
    text-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    margin: 0;
    line-height: 1.1;
}

.my-wave__play-btn {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--dh-gradient);
    color: #FFFFFF;
    border: none;
    box-shadow: var(--dh-glow), 0 2px 10px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: transform 0.2s var(--ease-spring), box-shadow 0.3s;
    -webkit-tap-highlight-color: transparent;
    margin: 4px 0;
}
.my-wave__play-btn::before {
    content: "";
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--dh-primary-rgb), 0.4) 0%, transparent 70%);
    animation: playPulseIdle 3s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}
.my-wave__play-btn.is-playing::before {
    animation: playPulseActive 1.5s ease-out infinite;
}
@keyframes playPulseIdle {
    0%, 100% { transform: scale(1); opacity: 0.4; }
    50% { transform: scale(1.25); opacity: 0.8; filter: blur(3px); }
}
@keyframes playPulseActive {
    0% { transform: scale(0.95); opacity: 0.9; }
    50% { transform: scale(1.4); opacity: 0.3; filter: blur(5px); }
    100% { transform: scale(1.6); opacity: 0; filter: blur(9px); }
}
.my-wave__play-btn:active {
    transform: scale(0.9);
    box-shadow: 0 4px 16px rgba(var(--dh-primary-rgb), 0.4);
}

/* Wave Capsule */
.my-wave__capsule {
    background: var(--bg-glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-pill);
    padding: 8px 16px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    max-width: 90%;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: background 0.2s, transform 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.my-wave__capsule::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
    transform: skewX(-22deg);
    animation: capsuleShimmer 6s ease-in-out infinite;
    pointer-events: none;
}
@keyframes capsuleShimmer {
    0%, 75% { left: -100%; }
    100% { left: 200%; }
}
.my-wave__capsule:active {
    transform: scale(0.97);
    background: rgba(255,255,255,0.1);
}

.my-wave__track-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
    display: inline-block;
}

/* Marquee */
.marquee-container {
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    max-width: 100%;
    min-width: 0;
}
.marquee-content {
    display: inline-block;
    white-space: nowrap;
    will-change: transform;
}
.marquee-container.is-overflowing .marquee-content {
    animation: marqueeScroll var(--marquee-duration, 8s) cubic-bezier(0.35,0.05,0.65,0.95) infinite alternate;
}
@keyframes marqueeScroll {
    0%, 25% { transform: translateX(0); }
    75%, 100% { transform: translateX(calc(-1 * var(--marquee-overflow, 0px))); }
}

/* Wave Actions */
.my-wave__actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    z-index: 2;
    flex-shrink: 0;
}
.my-wave__action-btn,
.my-wave__like-btn {
    background: none;
    border: none;
    color: var(--text2);
    cursor: pointer;
    padding: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s, transform 0.2s var(--ease-spring);
    -webkit-tap-highlight-color: transparent;
    border-radius: 50%;
}
.my-wave__action-btn:active,
.my-wave__like-btn:active {
    transform: scale(0.82);
}
.my-wave__like-btn.active { color: var(--dh-red); }
.my-wave__dislike-btn:active { color: #F85149; }

@keyframes heartPop {
    0% { transform: scale(1); }
    35% { transform: scale(1.4); }
    65% { transform: scale(0.9); }
    100% { transform: scale(1); }
}
.icon-btn--liked svg,
.my-wave__like-btn.active svg,
#btn-fp-like.active svg {
    animation: heartPop 0.4s var(--ease-spring);
}

.my-wave__vibe {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--text2);
    font-size: 12px;
    font-weight: 500;
}
.my-wave__vibe svg {
    color: var(--dh-primary);
    flex-shrink: 0;
    filter: drop-shadow(0 0 6px rgba(var(--dh-primary-rgb), 0.6));
}

/* ═══════════════════════════════════════════
   Artist Posters (Apple Music / Spotify Style)
   ═══════════════════════════════════════════ */

.artist-plugs-wrap {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 100vw;
    margin-top: 18px;
    margin-bottom: 8px;
    padding: 0;
    overflow: hidden;
    box-sizing: border-box;
}

.artist-plugs__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px 6px;
}

.artist-plugs__title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.01em;
}

.artist-plugs {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    padding: 8px 16px 18px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}
.artist-plugs::-webkit-scrollbar { display: none; }

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

.artist-plug {
    flex: 0 0 142px;
    width: 142px;
    height: 196px;
    scroll-snap-align: start;
    border-radius: 18px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    background: var(--bg2);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.22s var(--ease-spring), box-shadow 0.25s;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    animation: posterSlideUp 0.4s var(--ease-out) backwards;
}
.artist-plug:nth-child(1) { animation-delay: 0.04s; }
.artist-plug:nth-child(2) { animation-delay: 0.08s; }
.artist-plug:nth-child(3) { animation-delay: 0.12s; }
.artist-plug:nth-child(4) { animation-delay: 0.16s; }
.artist-plug:nth-child(5) { animation-delay: 0.2s; }

[data-theme="light"] .artist-plug {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1), 0 2px 6px rgba(0, 0, 0, 0.05);
}

.artist-plug:active {
    transform: scale(0.95);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.artist-plug__poster {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 12px;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
[data-theme="light"] .artist-plug__poster {
    border-color: rgba(0, 0, 0, 0.08);
}

.artist-plug__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
    display: block;
    transition: transform 0.35s var(--ease-smooth);
    background: var(--bg3);
}
.artist-plug:active .artist-plug__image {
    transform: scale(1.06);
}

.artist-plug__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.05) 0%,
        rgba(0, 0, 0, 0.15) 35%,
        rgba(10, 10, 18, 0.75) 68%,
        rgba(10, 10, 18, 0.96) 100%
    );
    pointer-events: none;
}
[data-theme="light"] .artist-plug__overlay {
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.04) 0%,
        rgba(0, 0, 0, 0.2) 40%,
        rgba(18, 14, 32, 0.8) 72%,
        rgba(18, 14, 32, 0.95) 100%
    );
}

.artist-plug__play-badge {
    position: relative;
    z-index: 2;
    align-self: flex-end;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s var(--ease-spring), background 0.2s;
}
.artist-plug:active .artist-plug__play-badge {
    transform: scale(0.9);
    background: var(--dh-gradient);
    border-color: transparent;
}

.artist-plug__content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.artist-plug__badge {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.7);
    display: inline-block;
}

.artist-plug__name {
    font-size: 14px;
    font-weight: 800;
    color: #FFFFFF;
    line-height: 1.25;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ═══════════════════════════════════════════
   Onboarding
   ═══════════════════════════════════════════ */

.onboarding {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 16px calc(var(--safe-bottom) + 90px);
    text-align: center;
    gap: 16px;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}
.onboarding__header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.onboarding__logo {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    box-shadow: var(--dh-glow);
}
.onboarding__title {
    font-size: 24px;
    font-weight: 900;
    color: var(--text);
    letter-spacing: -0.02em;
    line-height: 1.2;
}
.onboarding__subtitle {
    color: var(--text2);
    font-size: 13.5px;
    line-height: 1.45;
    max-width: 320px;
}

.artist-counter-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    border-radius: var(--radius-pill);
    background: rgba(var(--dh-primary-rgb), 0.08);
    border: 1px solid rgba(var(--dh-primary-rgb), 0.15);
    color: var(--text2);
    font-size: 13px;
    font-weight: 700;
    transition: all 0.3s var(--ease-smooth);
}
.artist-counter-badge.ready {
    background: rgba(var(--dh-secondary-rgb), 0.15);
    border-color: rgba(var(--dh-secondary-rgb), 0.5);
    color: var(--dh-secondary);
    box-shadow: 0 0 16px rgba(var(--dh-secondary-rgb), 0.3);
}

.artist-search-bar {
    display: flex;
    align-items: center;
    width: 100%;
    background: var(--bg2);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 14px;
    gap: 10px;
    color: var(--text2);
    transition: border-color 0.2s, box-shadow 0.2s, background 0.3s;
}
.artist-search-bar:focus-within {
    border-color: var(--dh-primary);
    box-shadow: 0 0 0 3px rgba(var(--dh-primary-rgb), 0.12);
}
.artist-search-bar input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--text);
    font-size: 14.5px;
}
.artist-search-bar input::placeholder { color: var(--text3); }

.artists-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px 10px;
    width: 100%;
    margin-top: 6px;
}

.artist-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.15s var(--ease-spring);
    position: relative;
}
.artist-card:active { transform: scale(0.93); }

.artist-card__avatar-wrap {
    position: relative;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    padding: 3px;
    background: transparent;
    transition: background 0.25s, box-shadow 0.25s;
}
.artist-card__avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background: var(--bg3);
    border: 2px solid transparent;
    transition: border-color 0.2s, transform 0.2s;
}
.artist-card__check {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--dh-gradient);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.5);
    transition: transform 0.2s var(--ease-spring), opacity 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.artist-card.selected .artist-card__avatar-wrap {
    background: var(--dh-gradient);
    box-shadow: 0 0 18px rgba(var(--dh-primary-rgb), 0.45);
}
.artist-card.selected .artist-card__avatar {
    border-color: var(--bg);
    transform: scale(0.96);
}
.artist-card.selected .artist-card__check {
    opacity: 1;
    transform: scale(1);
}

.artist-card__info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    width: 100%;
}
.artist-card__name {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.25;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 95px;
}
.artist-card.selected .artist-card__name { color: var(--dh-primary); }

.artist-card__genre {
    font-size: 10.5px;
    color: var(--text2);
    font-weight: 500;
}

.onboarding__footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 14px 16px calc(var(--safe-bottom) + 14px);
    background: linear-gradient(180deg, transparent 0%, var(--bg-glass-heavy) 30%, var(--bg) 100%);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    z-index: 50;
    display: flex;
    justify-content: center;
}
.onboarding__footer .btn { max-width: 440px; }

/* ═══════════════════════════════════════════
   Tuning Screen Loader
   ═══════════════════════════════════════════ */

.screen-tuning {
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.screen-tuning.fade-out {
    opacity: 0;
    transform: scale(1.04);
    transition: opacity 0.4s ease, transform 0.4s ease;
}
.tuning-canvas {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 320px;
    width: 100%;
}
.tuning-orb-wrap {
    position: relative;
    width: 110px;
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}
.tuning-orb-halo {
    position: absolute;
    inset: -14px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--dh-primary-rgb), 0.35) 0%, rgba(var(--dh-secondary-rgb), 0.2) 50%, transparent 75%);
    animation: orbGlow 2.4s ease-in-out infinite alternate;
}
@keyframes orbGlow {
    0% { transform: scale(0.9); opacity: 0.5; }
    100% { transform: scale(1.25); opacity: 0.95; filter: blur(6px); }
}
.tuning-orb {
    position: relative;
    width: 86px;
    height: 86px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--bg3) 0%, var(--bg2) 100%);
    border: 2px solid rgba(var(--dh-primary-rgb), 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 28px rgba(0,0,0,0.5), 0 0 20px rgba(var(--dh-primary-rgb), 0.3);
    animation: orbSpin 6s linear infinite;
}
@keyframes orbSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.tuning-orb-vinyl {
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    border: 1px dashed rgba(255,255,255,0.1);
}
.tuning-orb-center {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--dh-gradient);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}
.tuning-bars {
    position: absolute;
    bottom: -18px;
    display: flex;
    gap: 4px;
    align-items: flex-end;
    height: 22px;
}
.tuning-bars span {
    width: 3.5px;
    border-radius: 3px;
    background: var(--dh-primary);
    animation: barDance 0.8s ease-in-out infinite alternate;
}
.tuning-bars span:nth-child(1) { height: 8px; animation-delay: 0.05s; }
.tuning-bars span:nth-child(2) { height: 18px; animation-delay: 0.2s; }
.tuning-bars span:nth-child(3) { height: 22px; animation-delay: 0.1s; }
.tuning-bars span:nth-child(4) { height: 14px; animation-delay: 0.3s; }
.tuning-bars span:nth-child(5) { height: 10px; animation-delay: 0.15s; }
@keyframes barDance { 0% { height: 6px; } 100% { height: 22px; } }

.tuning-title {
    font-size: 21px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}
.tuning-desc { font-size: 13.5px; color: var(--text2); min-height: 20px; transition: opacity 0.2s; }
.tuning-progress-track {
    width: 100%;
    height: 6px;
    border-radius: var(--radius-pill);
    background: var(--border);
    overflow: hidden;
    margin-top: 24px;
    position: relative;
}
.tuning-progress-fill {
    height: 100%;
    width: 0%;
    border-radius: var(--radius-pill);
    background: var(--dh-gradient);
    box-shadow: 0 0 14px rgba(var(--dh-primary-rgb), 0.6);
    transition: width 0.15s linear;
}
.tuning-pct {
    font-size: 12px;
    font-weight: 700;
    color: var(--dh-primary);
    margin-top: 8px;
}

/* ═══════════════════════════════════════════
   Feed (Home)
   ═══════════════════════════════════════════ */

.feed { padding-bottom: 16px; }
.feed-section { margin-bottom: 28px; }
.feed-section__title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 14px;
    color: var(--text);
}

/* Carousel */
.carousel {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}
.carousel::-webkit-scrollbar { display: none; }

.carousel-card {
    flex: 0 0 140px;
    width: 140px;
    min-width: 140px;
    max-width: 140px;
    box-sizing: border-box;
    scroll-snap-align: start;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s var(--ease-spring);
}
.carousel-card:active { transform: scale(0.95); }

.carousel-card__cover-wrap {
    position: relative;
    width: 140px;
    height: 140px;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg2);
    box-shadow: var(--shadow-md);
    transition: box-shadow 0.3s, transform 0.3s var(--ease-spring);
}
.carousel-card__cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s var(--ease-spring);
}
.carousel-card:active .carousel-card__cover { transform: scale(0.96); }

.carousel-card__eq-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.carousel-card--playing .carousel-card__cover-wrap {
    box-shadow: 0 0 0 2.5px var(--dh-primary), var(--shadow-lg);
    animation: activeCardGlow 2.5s ease-in-out infinite alternate;
}
@keyframes activeCardGlow {
    0% { box-shadow: 0 0 0 2px var(--dh-primary), 0 6px 18px rgba(var(--dh-primary-rgb), 0.3); }
    100% { box-shadow: 0 0 0 3px var(--dh-primary), 0 10px 28px rgba(var(--dh-primary-rgb), 0.5); }
}
.carousel-card--playing .carousel-card__title .marquee-content { color: var(--dh-primary); }

.carousel-card__title {
    width: 140px;
    max-width: 140px;
    min-width: 0;
    box-sizing: border-box;
    font-size: 13.5px;
    font-weight: 600;
    margin-top: 8px;
    overflow: hidden;
    position: relative;
    line-height: 1.3;
    color: var(--text);
}
.carousel-card__artist {
    width: 140px;
    max-width: 140px;
    min-width: 0;
    box-sizing: border-box;
    font-size: 11.5px;
    color: var(--text2);
    margin-top: 2px;
    overflow: hidden;
    position: relative;
    line-height: 1.3;
}

/* ═══════════════════════════════════════════
   Search
   ═══════════════════════════════════════════ */

.search-bar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 0;
    background: var(--bg);
    transition: background 0.3s;
}
.search-bar__icon {
    width: 20px;
    height: 20px;
    color: var(--text2);
    flex-shrink: 0;
    position: absolute;
    left: 14px;
    z-index: 1;
}
.search-bar__input {
    width: 100%;
    height: 46px;
    background: var(--bg2);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 15px;
    padding: 0 40px 0 42px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.3s;
}
.search-bar__input:focus {
    border-color: var(--dh-primary);
    box-shadow: 0 0 0 3px rgba(var(--dh-primary-rgb), 0.12);
}
.search-bar__input::placeholder { color: var(--text3); }
.search-bar__clear {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: var(--text2);
    font-size: 16px;
    cursor: pointer;
    padding: 4px;
}

.search-hints { padding: 8px 0; }
.search-hints__label { font-size: 13px; color: var(--text3); margin-bottom: 10px; }
.search-hints__tags { display: flex; gap: 8px; flex-wrap: wrap; }

.tag {
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    background: var(--bg2);
    color: var(--text2);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid var(--border);
}
.tag:active {
    background: var(--dh-primary);
    color: #fff;
    border-color: var(--dh-primary);
}

/* ═══════════════════════════════════════════
   Track List
   ═══════════════════════════════════════════ */

.track-list { display: flex; flex-direction: column; }

.track-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    cursor: pointer;
    border-radius: var(--radius);
    transition: background 0.2s var(--ease-smooth), transform 0.12s;
    position: relative;
    -webkit-tap-highlight-color: transparent;
}
.track-item:active { transform: scale(0.985); background: var(--bg2); }

.track-item--playing {
    background: rgba(var(--dh-primary-rgb), 0.08);
}
.track-item--playing::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 10px;
    bottom: 10px;
    width: 3px;
    border-radius: 4px;
    background: var(--dh-gradient);
}
.track-item--playing .track-item__title { color: var(--dh-primary); }

.track-item__cover-wrap {
    position: relative;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.track-item__cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: var(--bg2);
    display: block;
}
.track-item__eq-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

/* EQ bars */
.eq-bars {
    display: inline-flex;
    align-items: flex-end;
    gap: 2.5px;
    height: 16px;
}
.eq-bar {
    width: 3px;
    background: var(--dh-primary);
    border-radius: 1.5px;
    animation: eqPulse 0.9s ease-in-out infinite alternate;
}
.eq-bar:nth-child(1) { height: 40%; animation-delay: 0.1s; }
.eq-bar:nth-child(2) { height: 100%; animation-delay: 0.35s; }
.eq-bar:nth-child(3) { height: 65%; animation-delay: 0.2s; }
@keyframes eqPulse { 0% { height: 25%; } 100% { height: 100%; } }

.track-item__info { flex: 1; min-width: 0; }
.track-item__title {
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.15s;
    color: var(--text);
}
.track-item__artist {
    font-size: 13px;
    color: var(--text2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}
.track-item__dur {
    font-size: 12px;
    color: var(--text3);
    flex-shrink: 0;
    margin-right: 4px;
}
.track-item__actions { display: flex; gap: 4px; flex-shrink: 0; }

.icon-btn {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--text2);
    cursor: pointer;
    border-radius: 50%;
    transition: transform 0.15s var(--ease-spring), background 0.15s, color 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.icon-btn:active {
    transform: scale(0.84);
    background: rgba(var(--dh-primary-rgb), 0.1);
}
.icon-btn--liked { color: var(--dh-red); }
.icon-btn--liked svg, #btn-fp-like.active svg {
    animation: heartPop 0.35s var(--ease-spring);
}

/* ═══════════════════════════════════════════
   Library
   ═══════════════════════════════════════════ */

.library-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 4px 8px;
}
.library-header__title {
    font-size: 28px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.03em;
}

.lib-tabs {
    display: flex;
    gap: 0;
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--bg);
    transition: background 0.3s;
}
.lib-tab {
    flex: 1;
    padding: 10px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text3);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.lib-tab.active {
    color: var(--text);
    border-bottom-color: var(--dh-primary);
}

.lib-actions { display: flex; gap: 10px; padding: 8px 0 12px; }

/* ═══════════════════════════════════════════
   Mini Player
   ═══════════════════════════════════════════ */

.mini-player {
    position: fixed;
    bottom: calc(var(--nav-h) + var(--safe-bottom));
    left: 6px;
    right: 6px;
    z-index: 100;
    background: var(--bg-glass-heavy);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius);
    backdrop-filter: var(--glass-blur-heavy);
    -webkit-backdrop-filter: var(--glass-blur-heavy);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    transition: background 0.3s, border-color 0.3s;
}
.mini-player__progress {
    height: 2px;
    background: rgba(255,255,255,0.05);
}
.mini-player__progress-fill {
    height: 100%;
    width: 0%;
    background: var(--dh-gradient);
    transition: width 0.3s linear;
}
.mini-player__content {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    cursor: pointer;
}
.mini-player__cover {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: var(--bg2);
    box-shadow: var(--shadow-sm);
}
.mini-player__info { flex: 1; min-width: 0; }
.mini-player__title {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    max-width: 100%;
    color: var(--text);
}
.mini-player__artist {
    font-size: 12px;
    color: var(--text2);
    display: block;
}
.mini-player__btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--text);
    font-size: 18px;
    cursor: pointer;
    border-radius: 50%;
    transition: transform 0.15s var(--ease-spring);
}
.mini-player__btn:active { transform: scale(0.85); }

/* ═══════════════════════════════════════════
   Full-screen Player (Yandex Music Style)
   ═══════════════════════════════════════════ */

.full-player {
    position: fixed;
    inset: 0;
    z-index: 200;
    overflow: hidden;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    animation: slideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    background: #000;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.full-player--closing {
    animation: slideDown 0.28s cubic-bezier(0.4, 0, 1, 1) forwards !important;
}
@keyframes slideDown { from { transform: translateY(0); } to { transform: translateY(100%); } }

/* Динамический размытый фон из обложки текущего трека */
.full-player__bg {
    position: absolute;
    inset: -50px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(48px) saturate(1.45) brightness(0.68);
    transform: scale(1.18) translateZ(0);
    will-change: transform, opacity;
    transition: opacity 0.4s ease;
}
[data-theme="light"] .full-player__bg {
    filter: blur(48px) saturate(1.25) brightness(0.95);
}

.full-player__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(10, 8, 8, 0.42) 0%,
        rgba(10, 8, 8, 0.22) 25%,
        rgba(10, 8, 8, 0.55) 70%,
        rgba(8, 6, 6, 0.88) 100%
    );
    pointer-events: none;
}
[data-theme="light"] .full-player__overlay {
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.45) 0%,
        rgba(255, 255, 255, 0.25) 25%,
        rgba(240, 240, 245, 0.65) 70%,
        rgba(235, 235, 240, 0.92) 100%
    );
    pointer-events: none;
}

.full-player__content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    max-width: 440px;
    margin: 0 auto;
    padding: calc(var(--safe-top, 10px) + 10px) 22px calc(var(--safe-bottom, 10px) + 14px);
    box-sizing: border-box;
}

/* Верхняя шапка: Шеврон (свернуть) + Источник + Опции */
.fp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 44px;
    flex-shrink: 0;
}
.fp-header__btn {
    background: none;
    border: none;
    color: #ffffff;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.85;
    transition: opacity 0.2s, transform 0.15s;
    border-radius: 50%;
}
.fp-header__btn:active {
    opacity: 1;
    transform: scale(0.9);
}
[data-theme="light"] .fp-header__btn {
    color: #111111;
}
.fp-header__info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
    min-width: 0;
    padding: 0 10px;
}
.fp-header__label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.62);
    line-height: 1.2;
}
[data-theme="light"] .fp-header__label {
    color: rgba(0, 0, 0, 0.55);
}
.fp-header__source {
    font-size: 14.5px;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
    margin-top: 2px;
    line-height: 1.25;
}
[data-theme="light"] .fp-header__source {
    color: #111111;
}

/* Область обложки / караоке текста */
.full-player__visual-area {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    flex: 1 1 auto;
    min-height: 180px;
    max-height: 340px;
    margin: 8px 0;
}
.full-player__cover-wrap {
    width: min(320px, 78vw);
    height: min(320px, 78vw);
    max-height: 100%;
    aspect-ratio: 1 / 1;
    position: relative;
    border-radius: 26px;
    box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.6), 0 0 25px rgba(0, 0, 0, 0.2);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
    overflow: hidden;
}
.full-player__cover-wrap.swipe-next { transform: translateX(-52px) scale(0.9); opacity: 0.35; }
.full-player__cover-wrap.swipe-prev { transform: translateX(52px) scale(0.9); opacity: 0.35; }

.full-player__cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 26px;
}

/* Строка названия трека + Heart & Plus справа в одну линию */
.fp-track-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-top: 6px;
    gap: 14px;
    flex-shrink: 0;
}
.fp-track-info {
    flex: 1;
    min-width: 0;
    text-align: left;
}
.fp-title {
    font-size: 24px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.2;
    letter-spacing: -0.015em;
    max-width: 100%;
}
[data-theme="light"] .fp-title {
    color: #111111;
}
.fp-artist {
    font-size: 15px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.72);
    margin-top: 3px;
    line-height: 1.25;
    max-width: 100%;
}
[data-theme="light"] .fp-artist {
    color: rgba(0, 0, 0, 0.65);
}
.fp-track-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}
.fp-action-icon-btn {
    background: none;
    border: none;
    color: #ffffff;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    opacity: 0.9;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.15s, opacity 0.15s;
}
.fp-action-icon-btn:active {
    transform: scale(0.85);
    opacity: 1;
}
[data-theme="light"] .fp-action-icon-btn {
    color: #111111;
}
#btn-fp-like.active {
    opacity: 1;
}
#btn-fp-like.active svg {
    color: #ff3b30;
    fill: #ff3b30;
}

/* Seekbar & Timestamps */
.full-player__seekbar {
    width: 100%;
    margin-top: 10px;
    flex-shrink: 0;
}
.seekbar {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: linear-gradient(
        to right,
        #ffffff 0%, #ffffff var(--seek-pct, 0%),
        rgba(255, 255, 255, 0.25) var(--seek-pct, 0%), rgba(255, 255, 255, 0.25) 100%
    );
    outline: none;
    cursor: pointer;
    transition: height 0.15s;
}
[data-theme="light"] .seekbar {
    background: linear-gradient(
        to right,
        #111111 0%, #111111 var(--seek-pct, 0%),
        rgba(0, 0, 0, 0.18) var(--seek-pct, 0%), rgba(0, 0, 0, 0.18) 100%
    );
}
.seekbar::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    border: none;
    transition: transform 0.15s;
}
[data-theme="light"] .seekbar::-webkit-slider-thumb {
    background: #111111;
}
.seekbar:active::-webkit-slider-thumb {
    transform: scale(1.4);
}
.seekbar::-moz-range-thumb {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
    border: none;
    cursor: pointer;
}
[data-theme="light"] .seekbar::-moz-range-thumb {
    background: #111111;
}

.full-player__times {
    display: flex;
    justify-content: space-between;
    margin-top: 7px;
    font-size: 12.5px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    font-variant-numeric: tabular-nums;
}
[data-theme="light"] .full-player__times {
    color: rgba(0, 0, 0, 0.55);
}

/* Playback Controls (Shuffle, Prev, Play, Next, Repeat) */
.full-player__controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0 4px;
    margin-top: 8px;
    flex-shrink: 0;
}
.ctrl-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.72);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: color 0.15s, transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}
[data-theme="light"] .ctrl-btn {
    color: rgba(0, 0, 0, 0.6);
}
.ctrl-btn:active {
    color: #ffffff;
    transform: scale(0.9);
}
[data-theme="light"] .ctrl-btn:active {
    color: #000000;
}
.ctrl-btn.active {
    color: #ffffff;
    opacity: 1;
}
[data-theme="light"] .ctrl-btn.active {
    color: #111111;
}
.ctrl-btn--md {
    color: #ffffff;
}
[data-theme="light"] .ctrl-btn--md {
    color: #111111;
}

.ctrl-btn--like { color: rgba(255,255,255,0.6); }
[data-theme="light"] .ctrl-btn--like { color: var(--text2); }
.ctrl-btn--like:active { transform: scale(1.2); }
.ctrl-btn--like.active { color: var(--dh-red); }

.ctrl-btn--dislike { color: rgba(255,255,255,0.6); }
[data-theme="light"] .ctrl-btn--dislike { color: var(--text2); }
.ctrl-btn--dislike:active { color: #F85149; transform: scale(0.9); }

@keyframes dislikeShake {
    0% { transform: scale(1) rotate(0deg); }
    20% { transform: scale(1.15) rotate(-12deg); }
    40% { transform: scale(1.15) rotate(12deg); }
    60% { transform: scale(1.1) rotate(-6deg); }
    80% { transform: scale(1.05) rotate(6deg); }
    100% { transform: scale(1) rotate(0deg); }
}
.dislike-anim { animation: dislikeShake 0.4s ease-in-out; color: #F85149 !important; }

/* Центральная круглая кнопка Play/Pause в стиле Яндекс Музыки (теплая карамель/янтарь с темной иконкой) */
.ctrl-btn--play {
    width: 68px;
    height: 68px;
    background: #D98845;
    background: linear-gradient(135deg, #E6964E 0%, #C97737 100%);
    color: #1A110A;
    border-radius: 50%;
    box-shadow: 0 10px 28px rgba(217, 136, 69, 0.42), 0 0 0 1px rgba(255, 255, 255, 0.15);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s;
}
.ctrl-btn--play svg {
    fill: #1A110A !important;
}
.ctrl-btn--play:active {
    transform: scale(0.92);
    box-shadow: 0 6px 18px rgba(217, 136, 69, 0.5);
}

/* 4 Карточки действий (Текст, Поделиться, Скачать, В историю) */
.fp-feature-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    width: 100%;
    margin-top: 10px;
    flex-shrink: 0;
}
.fp-feature-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 10px 4px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    color: #ffffff;
    cursor: pointer;
    text-align: center;
    transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.15s, border-color 0.15s;
}
[data-theme="light"] .fp-feature-card {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.07);
    color: #111111;
}
.fp-feature-card:active {
    transform: scale(0.94);
    background: rgba(255, 255, 255, 0.14);
}
[data-theme="light"] .fp-feature-card:active {
    background: rgba(0, 0, 0, 0.09);
}
.fp-feature-card.active {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.28);
}
.fp-feature-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    color: rgba(255, 255, 255, 0.92);
}
[data-theme="light"] .fp-feature-card__icon {
    color: #111111;
}
.fp-feature-card__label {
    font-size: 11.5px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.88);
    white-space: nowrap;
    line-height: 1.2;
}
[data-theme="light"] .fp-feature-card__label {
    color: #222222;
}

/* Нижняя плашка «ВОЛНА ПО ТРЕКУ» */
.fp-wave-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 7px 12px 7px 8px;
    margin-top: 8px;
    flex-shrink: 0;
}
[data-theme="light"] .fp-wave-badge {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.07);
}
.fp-wave-badge__thumb {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.35);
}
.fp-wave-badge__info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    justify-content: center;
}
.fp-wave-badge__label {
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.62);
    line-height: 1.2;
}
[data-theme="light"] .fp-wave-badge__label {
    color: rgba(0, 0, 0, 0.55);
}
.fp-wave-badge__title {
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.25;
    margin-top: 1px;
}
[data-theme="light"] .fp-wave-badge__title {
    color: #111111;
}
.fp-wave-badge__dislike {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.68);
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.15s;
    flex-shrink: 0;
}
[data-theme="light"] .fp-wave-badge__dislike {
    color: rgba(0, 0, 0, 0.6);
}
.fp-wave-badge__dislike:active {
    transform: scale(0.85);
    color: #ff3b30;
}

/* ═══════════════════════════════════════════
   Bottom Navigation
   ═══════════════════════════════════════════ */

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(var(--nav-h) + var(--safe-bottom));
    padding-bottom: var(--safe-bottom);
    display: flex;
    background: var(--bg-glass-heavy);
    border-top: 1px solid var(--border-glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    z-index: 150;
    transition: background 0.3s, border-color 0.3s;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: none;
    border: none;
    color: var(--text3);
    cursor: pointer;
    font-size: 10px;
    font-weight: 600;
    transition: color 0.2s;
    position: relative;
}
.nav-item svg { transition: color 0.2s; }
.nav-item.active { color: var(--dh-primary); }
.nav-item.active svg { color: var(--dh-primary); }

.nav-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--dh-primary);
    opacity: 0;
    transition: opacity 0.2s;
    position: absolute;
    bottom: 6px;
}
.nav-item.active .nav-dot { opacity: 1; }

/* ═══════════════════════════════════════════
   Buttons
   ═══════════════════════════════════════════ */

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s, opacity 0.15s;
}
.btn:active { transform: scale(0.96); }
.btn:disabled { opacity: 0.4; cursor: default; }
.btn--primary { background: var(--dh-gradient); color: #fff; box-shadow: var(--dh-glow); }
.btn--secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--bg2);
    color: var(--text);
    border: 1px solid var(--border);
    transition: all 0.2s var(--ease-smooth);
}
.btn--secondary:active { transform: scale(0.95); background: var(--bg3); }
.btn--sm { padding: 8px 16px; font-size: 13px; }
.btn--wide { width: 100%; }

/* ═══════════════════════════════════════════
   Skeleton & Loading
   ═══════════════════════════════════════════ */

.skeleton-track {
    display: flex;
    gap: 12px;
    padding: 8px 0;
    align-items: center;
}
.skeleton-track::before {
    content: '';
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    background: linear-gradient(90deg, var(--border) 25%, rgba(255,255,255,0.06) 50%, var(--border) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.6s infinite;
    flex-shrink: 0;
}
.skeleton-track::after {
    content: '';
    flex: 1;
    height: 34px;
    border-radius: 8px;
    background: linear-gradient(90deg, var(--border) 25%, rgba(255,255,255,0.06) 50%, var(--border) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.6s infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ═══════════════════════════════════════════
   Empty States
   ═══════════════════════════════════════════ */

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}
.empty-state__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text3);
    margin-bottom: 14px;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--bg2);
    border: 1px solid var(--border);
}
.empty-state p { font-size: 16px; font-weight: 600; color: var(--text); }
.empty-state__hint { color: var(--text3); font-size: 13px !important; font-weight: 400 !important; margin-top: 4px; }

/* ═══════════════════════════════════════════
   Toast
   ═══════════════════════════════════════════ */

.toast {
    position: fixed;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-glass-heavy);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    color: var(--text);
    padding: 10px 20px;
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 500;
    z-index: 300;
    transition: top 0.3s var(--ease-out), opacity 0.2s;
    box-shadow: var(--shadow-lg);
    white-space: nowrap;
    border: 1px solid var(--border-glass);
    pointer-events: none;
}
.toast.show { top: 20px; }

/* ═══════════════════════════════════════════
   Like Animation
   ═══════════════════════════════════════════ */

@keyframes likeHeart {
    0%   { transform: scale(1); }
    25%  { transform: scale(1.3); }
    50%  { transform: scale(0.95); }
    100% { transform: scale(1); }
}
.like-anim { animation: likeHeart 0.4s ease; }

/* ═══════════════════════════════════════════
   Loading (spinner)
   ═══════════════════════════════════════════ */

.loading { padding: 16px 0; }

/* ═══════════════════════════════════════════
   Responsive
   ═══════════════════════════════════════════ */

@media (max-height: 700px) {
    .full-player__cover-wrap { width: 200px; height: 200px; }
    .full-player__title { font-size: 18px; }
    .full-player__content { gap: 14px; padding-top: 30px; }
}
@media (max-height: 600px) {
    .full-player__cover-wrap { width: 160px; height: 160px; }
    .full-player__controls { gap: 14px; }
    .ctrl-btn--play { width: 52px; height: 52px; }
}

/* ═══════════════════════════════════════════
   Action Bar (Download / Story)
   ═══════════════════════════════════════════ */

.full-player__action-bar {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    max-width: 360px;
    margin-top: 2px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px 6px 6px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.full-player__action-bar::-webkit-scrollbar { display: none; }

.player-action-btn, .story-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-pill);
    padding: 8px 13px;
    color: rgba(255,255,255,0.9);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    transition: all 0.2s var(--ease-smooth);
    white-space: nowrap;
}
[data-theme="light"] .player-action-btn,
[data-theme="light"] .story-btn { color: var(--text); }
.player-action-btn:active, .story-btn:active {
    transform: scale(0.95);
    background: rgba(var(--dh-primary-rgb), 0.15);
}
.player-action-btn svg, .story-btn svg {
    color: var(--dh-primary);
    flex-shrink: 0;
}
.player-action-btn.loading, .story-btn.loading {
    opacity: 0.6;
    pointer-events: none;
}

.btn-dl { color: var(--text2); }
.btn-dl:active { color: var(--text); transform: scale(0.9); }
.btn-dl.loading { opacity: 0.5; pointer-events: none; }

/* ═══════════════════════════════════════════
   Story Modal
   ═══════════════════════════════════════════ */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: modalFadeIn 0.25s ease-out;
}
@keyframes modalFadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-card {
    position: relative;
    width: 100%;
    max-width: 340px;
    background: var(--bg2);
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    padding: 26px 22px 22px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: var(--shadow-xl);
    animation: modalSlideUp 0.25s var(--ease-out);
}
@keyframes modalSlideUp {
    from { transform: translateY(20px) scale(0.96); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: none;
    border: none;
    color: var(--text3);
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s;
}
.modal-close:active { color: var(--text); }

.story-modal__icon-wrap {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(var(--dh-primary-rgb), 0.1);
    border: 1px solid rgba(var(--dh-primary-rgb), 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}
.story-modal__title { font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.story-modal__track {
    font-size: 13px;
    color: var(--text2);
    margin-bottom: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
.story-modal__badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(var(--dh-secondary-rgb), 0.1);
    border: 1px solid rgba(var(--dh-secondary-rgb), 0.2);
    border-radius: var(--radius-pill);
    padding: 4px 12px;
    color: var(--dh-secondary);
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 18px;
}
.story-modal__guide {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    background: rgba(var(--dh-primary-rgb), 0.04);
    border: 1px solid rgba(var(--dh-primary-rgb), 0.08);
    border-radius: 14px;
    padding: 14px 12px;
    margin-bottom: 20px;
    text-align: left;
}
.story-guide-step {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 12px;
    line-height: 1.4;
    color: var(--text2);
}
.story-guide-step b { color: var(--text); }
.story-guide-step .step-num {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--dh-gradient);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}
.story-modal__actions { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.btn-primary-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px;
    background: var(--dh-gradient);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--dh-glow);
    transition: transform 0.15s, opacity 0.15s;
}
.btn-primary-action:active { transform: scale(0.97); }
.btn-secondary-action {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 11px;
    background: transparent;
    color: var(--text3);
    border: none;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.15s;
}
.btn-secondary-action:active { color: var(--text); }

/* ═══════════════════════════════════════════
   Artist & Album Pages
   ═══════════════════════════════════════════ */

.artist-page, .album-page {
    position: relative;
    padding-top: 8px;
}

.artist-page__top-nav {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: calc(var(--safe-top, 8px) + 8px) 0 12px;
    position: sticky;
    top: 0;
    z-index: 20;
    background: linear-gradient(180deg, var(--bg-glass-heavy) 70%, transparent);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
}
.nav-back-btn {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    color: var(--text);
    cursor: pointer;
    transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.15s;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    flex-shrink: 0;
}
.nav-back-btn:active { transform: scale(0.9); background: rgba(255, 255, 255, 0.18); }
[data-theme="light"] .nav-back-btn {
    background: rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: #111;
}
.artist-page__top-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.01em;
}

/* Artist Hero: Full-Bleed Atmospheric Header */
.artist-hero {
    position: relative;
    border-radius: 28px;
    overflow: hidden;
    padding: 32px 16px 26px;
    margin-bottom: 24px;
    text-align: center;
    border: none;
    background: var(--bg2);
    box-shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.45);
}
.artist-hero__bg {
    position: absolute;
    inset: -50px;
    background-size: cover;
    background-position: center;
    filter: blur(52px) brightness(0.48) saturate(1.45);
    transform: scale(1.22) translateZ(0);
    z-index: 0;
    transition: opacity 0.4s ease;
}
[data-theme="light"] .artist-hero__bg {
    filter: blur(52px) brightness(1.05) saturate(1.1);
}
.artist-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(10, 8, 14, 0.25) 0%,
        rgba(10, 8, 14, 0.68) 55%,
        var(--bg2, #12101a) 100%
    );
    z-index: 1;
}
[data-theme="light"] .artist-hero__overlay {
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.3) 0%,
        rgba(245, 243, 255, 0.75) 55%,
        var(--bg2, #f3f0fc) 100%
    );
}
.artist-hero__content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Circular Avatar with soft ambient aura */
.artist-hero__avatar-wrap {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    padding: 3px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55), 0 0 28px rgba(var(--dh-primary-rgb), 0.2);
    margin-bottom: 14px;
    flex-shrink: 0;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
[data-theme="light"] .artist-hero__avatar-wrap {
    background: rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}
.artist-hero__avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    background: var(--bg3);
}

.artist-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.78);
    text-transform: capitalize;
    margin-bottom: 6px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
[data-theme="light"] .artist-hero__badge {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.07);
    color: var(--text2);
}
.artist-hero__name {
    font-size: 26px;
    font-weight: 900;
    letter-spacing: -0.02em;
    color: #ffffff;
    margin: 0 0 18px;
    line-height: 1.2;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 90vw;
}
[data-theme="light"] .artist-hero__name {
    color: var(--text);
    text-shadow: none;
}

/* Actions Row: Harmonious heights and shapes */
.artist-hero__actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    max-width: 330px;
}
.btn--artist-main {
    flex: 1.3;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 22px;
    border-radius: 999px;
    font-size: 14.5px;
    font-weight: 700;
    background: var(--dh-gradient);
    color: #ffffff;
    box-shadow: 0 8px 24px rgba(var(--dh-primary-rgb), 0.38);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s;
}
.btn--artist-main:active {
    transform: scale(0.94);
}
.btn--artist-icon {
    width: 48px;
    height: 48px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #ffffff;
    cursor: pointer;
    flex-shrink: 0;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.15s, border-color 0.15s, color 0.15s;
}
.btn--artist-icon:active {
    transform: scale(0.9);
    background: rgba(255, 255, 255, 0.18);
}
[data-theme="light"] .btn--artist-icon {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: #111111;
}
.btn--artist-fav.active {
    background: rgba(255, 59, 48, 0.2) !important;
    border-color: rgba(255, 59, 48, 0.45) !important;
    color: #ff3b30 !important;
}
.btn--artist-fav.active svg {
    fill: #ff3b30;
    stroke: #ff3b30;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Artist sections */
.artist-section { margin-bottom: 28px; }
.artist-section__title {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.2px;
    margin: 0 0 14px;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Albums scroll */
.artist-albums-scroll {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
}
.artist-albums-scroll::-webkit-scrollbar { display: none; }

.album-card {
    flex: 0 0 130px;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: transform 0.15s ease;
}
.album-card:active { transform: scale(0.96); }
.album-card__cover-wrap {
    width: 130px;
    height: 130px;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    background: var(--bg2);
    box-shadow: var(--shadow-md);
    margin-bottom: 8px;
}
.album-card__cover { width: 100%; height: 100%; object-fit: cover; display: block; }
.album-card__type-badge {
    position: absolute;
    bottom: 6px;
    left: 6px;
    padding: 2px 6px;
    border-radius: var(--radius-xs);
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(6px);
    font-size: 10px;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.album-card__title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}
.album-card__year { font-size: 12px; color: var(--text2); margin-top: 2px; }

/* Album hero */
.album-hero {
    position: relative;
    border-radius: 28px;
    overflow: hidden;
    padding: 28px 16px;
    margin-bottom: 24px;
    text-align: center;
    border: none;
    background: var(--bg2);
    box-shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.45);
}
.album-hero__bg {
    position: absolute;
    inset: -50px;
    background-size: cover;
    background-position: center;
    filter: blur(52px) brightness(0.45) saturate(1.45);
    transform: scale(1.22);
    z-index: 0;
}
[data-theme="light"] .album-hero__bg { filter: blur(40px) brightness(1.1) saturate(0.9); }
.album-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10,10,18,0.45) 0%, rgba(10,10,18,0.9) 100%);
    z-index: 1;
}
[data-theme="light"] .album-hero__overlay {
    background: linear-gradient(180deg, rgba(245,243,255,0.4) 0%, rgba(245,243,255,0.9) 100%);
}
.album-hero__content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.album-hero__cover {
    width: 140px;
    height: 140px;
    border-radius: var(--radius);
    object-fit: cover;
    box-shadow: var(--shadow-lg);
    margin-bottom: 12px;
}
.album-hero__title {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 4px;
}
[data-theme="light"] .album-hero__title { color: var(--text); }
.album-hero__meta {
    font-size: 13px;
    color: rgba(255,255,255,0.6);
    margin: 0;
}
[data-theme="light"] .album-hero__meta { color: var(--text2); }

/* Clickable artist */
.clickable-artist {
    cursor: pointer;
    transition: color 0.15s, opacity 0.15s;
}
.clickable-artist:active { opacity: 0.65; }

/* ═══════════════════════════════════════════
   Spin Loader (used in buttons)
   ═══════════════════════════════════════════ */

@keyframes spin {
    to { transform: rotate(360deg); }
}
.spin-loader {
    animation: spin 0.8s linear infinite;
}

/* ═══════════════════════════════════════════
   Library Tabs (Liked / Playlists)
   ═══════════════════════════════════════════ */

.library-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-pill);
    padding: 4px;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
}
.library-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    border: none;
    border-radius: var(--radius-pill);
    background: transparent;
    color: var(--text2);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s var(--ease-smooth);
}
.library-tab.active {
    background: var(--dh-gradient);
    color: #fff;
    box-shadow: var(--dh-glow);
}
.tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    font-size: 11px;
    font-weight: 700;
    background: rgba(255,255,255,0.2);
    color: inherit;
}
.library-tab:not(.active) .tab-count {
    background: var(--bg3);
    color: var(--text3);
}

/* ═══════════════════════════════════════════
   Playlist Create Banner & Grid
   ═══════════════════════════════════════════ */

.playlist-create-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: var(--radius);
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    margin-bottom: 16px;
    cursor: pointer;
    transition: all 0.2s var(--ease-spring);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
}
.playlist-create-banner:active {
    transform: scale(0.98);
    border-color: var(--dh-primary);
}
.playlist-create-banner__icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: var(--dh-gradient);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: var(--dh-glow);
}
.playlist-create-banner__info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.playlist-create-banner__title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}
.playlist-create-banner__sub {
    font-size: 12px;
    color: var(--text2);
    line-height: 1.3;
}

.playlists-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-top: 10px;
}
.playlist-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 18px;
    padding: 10px;
    cursor: pointer;
    transition: transform 0.2s var(--ease-spring), border-color 0.2s;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
}
.playlist-card:active {
    transform: scale(0.96);
    border-color: rgba(var(--dh-primary-rgb), 0.4);
}
.playlist-card__cover-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 14px;
    overflow: hidden;
    background: var(--bg3);
    margin-bottom: 10px;
    box-shadow: var(--shadow-sm);
}
.playlist-card__cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.playlist-card__cover-empty {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text3);
    background: linear-gradient(135deg, rgba(var(--dh-primary-rgb), 0.15), rgba(var(--dh-secondary-rgb), 0.08));
}
.playlist-card__play-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--dh-gradient);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    opacity: 0.92;
}
.playlist-card__title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.playlist-card__count {
    font-size: 12px;
    color: var(--text3);
    margin-top: 2px;
}

/* ═══════════════════════════════════════════
   Playlist Page & Hero
   ═══════════════════════════════════════════ */

.playlist-page {
    position: relative;
    padding-top: 8px;
}
.playlist-hero {
    position: relative;
    border-radius: 28px;
    overflow: hidden;
    padding: 28px 16px 24px;
    margin-bottom: 24px;
    text-align: center;
    border: none;
    background: var(--bg2);
    box-shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.45);
}
.playlist-hero__bg {
    position: absolute;
    inset: -50px;
    background-size: cover;
    background-position: center;
    filter: blur(52px) brightness(0.48) saturate(1.45);
    transform: scale(1.22);
    z-index: 0;
}
[data-theme="light"] .playlist-hero__bg {
    filter: blur(40px) brightness(1.1) saturate(0.9);
}
.playlist-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10,10,18,0.2) 0%, var(--bg) 100%);
    z-index: 1;
}
[data-theme="light"] .playlist-hero__overlay {
    background: linear-gradient(180deg, rgba(245,243,255,0.2) 0%, var(--bg) 100%);
}
.playlist-hero__content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.playlist-hero__cover-wrap {
    width: 140px;
    height: 140px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    margin-bottom: 14px;
    background: var(--bg3);
    display: flex;
    align-items: center;
    justify-content: center;
}
.playlist-hero__cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.playlist-hero__placeholder {
    color: var(--text3);
}
.playlist-hero__title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 4px;
    letter-spacing: -0.02em;
}
.playlist-hero__desc {
    font-size: 13px;
    color: var(--text2);
    max-width: 280px;
    margin-bottom: 4px;
}
.playlist-hero__meta {
    font-size: 12px;
    font-weight: 600;
    color: var(--text3);
    margin-bottom: 16px;
}
.playlist-hero__actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
.nav-action-btn {
    margin-left: auto;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text3);
    cursor: pointer;
    transition: all 0.2s;
}
.nav-action-btn:hover, .nav-action-btn:active {
    color: #F85149;
    background: rgba(248,81,73,0.15);
    border-color: rgba(248,81,73,0.3);
}

/* ═══════════════════════════════════════════
   Modals: Create & Add to Playlist
   ═══════════════════════════════════════════ */

.modal-card--playlist,
.modal-card--add-playlist {
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    padding: 24px 20px;
}
.modal-card__header-icon {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    background: rgba(var(--dh-primary-rgb), 0.12);
    color: var(--dh-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}
.modal-input-group {
    width: 100%;
    margin: 14px 0 18px;
}
.modal-input {
    width: 100%;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px 16px;
    font-size: 15px;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.modal-input:focus {
    border-color: var(--dh-primary);
    box-shadow: 0 0 0 3px rgba(var(--dh-primary-rgb), 0.2);
}
.quick-new-playlist-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(var(--dh-primary-rgb), 0.1);
    border: 1px dashed rgba(var(--dh-primary-rgb), 0.4);
    color: var(--dh-primary);
    padding: 12px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 14px;
    transition: all 0.2s;
}
.quick-new-playlist-btn:active {
    transform: scale(0.97);
    background: rgba(var(--dh-primary-rgb), 0.2);
}
.modal-playlists-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 40vh;
    overflow-y: auto;
    width: 100%;
    padding-right: 4px;
}
.modal-playlist-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 14px;
    background: var(--bg2);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s;
}
.modal-playlist-item:active {
    transform: scale(0.98);
}
.modal-playlist-item.in-playlist {
    border-color: var(--dh-primary);
    background: rgba(var(--dh-primary-rgb), 0.1);
}
.modal-playlist-item__cover {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: cover;
    background: var(--bg3);
    flex-shrink: 0;
}
.modal-playlist-item__info {
    flex: 1;
    min-width: 0;
    text-align: left;
}
.modal-playlist-item__title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.modal-playlist-item__count {
    font-size: 12px;
    color: var(--text3);
}
.modal-playlist-item__check {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}
.modal-playlist-item.in-playlist .modal-playlist-item__check {
    background: var(--dh-primary);
    border-color: var(--dh-primary);
    color: #fff;
}
.modal-loading-playlists {
    padding: 20px;
    text-align: center;
    color: var(--text3);
    font-size: 13px;
}

/* ═══════════════════════════════════════════
   Full Player Visual Area & Synced Lyrics
   ═══════════════════════════════════════════ */

.full-player__visual-area {
    position: relative;
    width: min(320px, 78vw);
    height: min(320px, 78vw);
    max-height: 40vh;
    aspect-ratio: 1 / 1;
    margin: 6px auto;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.full-player__visual-area .full-player__cover-wrap {
    width: 100%;
    height: 100%;
}
.full-player__lyrics {
    position: absolute;
    inset: 0;
    background: rgba(16, 12, 10, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 26px;
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.65);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: fadeIn 0.25s ease-out;
    z-index: 10;
}
[data-theme="light"] .full-player__lyrics {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(0, 0, 0, 0.08);
}
.lyrics-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px 8px;
    border-bottom: 1px solid var(--border-glass);
}
.lyrics-header__title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--dh-primary);
}
.lyrics-close-btn {
    background: none;
    border: none;
    color: var(--text3);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}
.lyrics-close-btn:active { color: var(--text); }
.lyrics-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    scroll-behavior: smooth;
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, black 15%, black 85%, transparent 100%);
    mask-image: linear-gradient(180deg, transparent 0%, black 15%, black 85%, transparent 100%);
}
.lyrics-content::-webkit-scrollbar { display: none; }
.lyrics-line {
    font-size: 17px;
    font-weight: 600;
    line-height: 1.45;
    color: rgba(255,255,255,0.38);
    cursor: pointer;
    transition: all 0.28s var(--ease-spring);
    border-radius: 8px;
    padding: 4px 6px;
    text-align: left;
}
[data-theme="light"] .lyrics-line {
    color: rgba(0,0,0,0.35);
}
.lyrics-line:hover {
    color: rgba(255,255,255,0.7);
}
[data-theme="light"] .lyrics-line:hover {
    color: rgba(0,0,0,0.7);
}
.lyrics-line--active {
    font-size: 21px;
    font-weight: 800;
    color: #ffffff !important;
    transform: scale(1.03) translateX(4px);
    text-shadow: 0 0 16px rgba(var(--dh-primary-rgb), 0.7);
}
[data-theme="light"] .lyrics-line--active {
    color: var(--dh-primary) !important;
    text-shadow: 0 0 12px rgba(var(--dh-primary-rgb), 0.35);
}
.lyrics-empty, .lyrics-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 14px;
    color: var(--text3);
    text-align: center;
    padding: 20px;
    line-height: 1.5;
}

/* Кнопка "В плейлист" в строке трека */
.btn-track-playlist {
    color: var(--text3);
}
.btn-track-playlist:active {
    color: var(--dh-primary);
    transform: scale(0.9);
}
