/* =============================================
   ÖPIK Song Hub — Design System
   Follows opik.es visual identity
   ============================================= */

:root {
    /* — Colors (mirroring opik.es) — */
    --bg:             #0A0A0A;
    --bg-elevated:    #111111;
    --bg-card:        #161616;
    --bg-hover:       #1A1A1A;
    --surface:        #1E1E1E;
    --border:         #2A2A2A;
    --border-subtle:  #1F1F1F;

    --text-primary:   #F5F5F5;
    --text-secondary: #999999;
    --text-tertiary:  #666666;
    --text-muted:     #444444;

    --accent:         #E23636;
    --accent-hover:   #FF4444;
    --accent-subtle:  rgba(226, 54, 54, 0.1);
    --accent-glow:    rgba(226, 54, 54, 0.15);

    /* — Typography — */
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body:    'Inter', sans-serif;
    --font-mono:    'IBM Plex Mono', monospace;

    /* — Transitions — */
    --t-fast:   150ms cubic-bezier(0.4, 0, 0.2, 1);
    --t-base:   250ms cubic-bezier(0.4, 0, 0.2, 1);
    --t-slow:   400ms cubic-bezier(0.4, 0, 0.2, 1);
    --t-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

    /* — Layout — */
    --topbar-h:  72px;
    --player-h:  90px;
    --arrow-w:   70px;
    --page-pad:  clamp(1.5rem, 4vw, 4rem);
}

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

html {
    color-scheme: dark;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow: hidden; /* SPA — inner scroll */
    height: 100dvh;
    /* Prevent text selection on UI chrome */
    user-select: none;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img, video { display: block; max-width: 100%; }

.icon-svg {
    width: 1em;
    height: 1em;
    display: inline-block;
    flex-shrink: 0;
    vertical-align: middle;
}

/* ============================================
   FULL-PAGE LOADER
   ============================================ */
.spa-loader {
    position: fixed; inset: 0;
    background: var(--bg);
    z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none;
    transition: opacity var(--t-base);
}
.spa-loader.active { opacity: 1; pointer-events: auto; }

.loader-spinner {
    width: 44px; height: 44px;
    border: 2px solid rgba(255,255,255,0.08);
    border-radius: 50%;
    border-top-color: var(--accent);
    animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================
   GLOBAL TOPBAR
   ============================================ */
.global-topbar {
    position: fixed; top: 0; left: 0; right: 0;
    height: var(--topbar-h);
    padding: 0 var(--page-pad);
    display: flex; align-items: center; justify-content: space-between;
    z-index: 300;
    background: linear-gradient(to bottom, rgba(10,10,10,0.92) 0%, rgba(10,10,10,0) 100%);
    backdrop-filter: blur(0px); /* Only shows on scroll */
}

.topbar-left,
.topbar-logo {
    display: flex; align-items: center; gap: 0.75rem;
}

.topbar-catalog-link {
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-secondary);
    transition: color var(--t-fast), opacity var(--t-fast);
}

.topbar-catalog-link:hover {
    color: var(--text-primary);
}

.topbar-logo img {
    height: 25px; width: auto;
    opacity: 0.9;
    transition: opacity var(--t-fast);
}
.topbar-logo img:hover { opacity: 1; }

.topbar-right {
    display: flex; align-items: center; gap: 1rem;
}

.btn-icon-topbar {
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.1);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-secondary);
    font-size: 1.25rem;
    transition: all var(--t-fast);
    background: rgba(255,255,255,0.04);
}
.btn-icon-topbar:hover {
    border-color: rgba(255,255,255,0.25);
    color: var(--text-primary);
    background: rgba(255,255,255,0.08);
}

/* ============================================
   DYNAMIC BACKGROUND (Blurred Cover Art)
   ============================================ */
.dynamic-background {
    position: fixed; inset: 0; z-index: 0;
    background: #000;
    overflow: hidden;
}
.dynamic-background video,
.dynamic-background .bg-cover-img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    filter: blur(60px) saturate(0.6) brightness(0.3);
    transform: scale(1.1); /* prevent blur fringing */
    opacity: 0.9;
    transition: opacity 1.2s ease;
}
.bg-gradient-overlay {
    position: absolute; inset: 0;
    background:
        linear-gradient(180deg,
            rgba(10,10,10,0.7) 0%,
            rgba(10,10,10,0.4) 40%,
            rgba(10,10,10,0.85) 100%),
        linear-gradient(135deg, rgba(10,10,10,0.5) 0%, transparent 50%);
}

/* ============================================
   CAROUSEL ARROWS
   ============================================ */
.carousel-nav {
    position: fixed; top: 50%; left: 0; right: 0;
    transform: translateY(-50%);
    display: flex; justify-content: space-between;
    padding: 0 1rem;
    z-index: 200; pointer-events: none;
}
.nav-arrow {
    width: 52px; height: 52px;
    border-radius: 50%;
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.08);
    backdrop-filter: blur(12px);
    color: white;
    font-size: 1.25rem;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; pointer-events: auto;
    transition: all var(--t-base);
    opacity: 0.7;
}
.nav-arrow:hover {
    background: var(--accent);
    border-color: var(--accent);
    opacity: 1;
    transform: scale(1.08);
}
.nav-arrow[disabled] {
    opacity: 0.15; pointer-events: none;
}

/* ============================================
   CATALOG DRAWER
   ============================================ */
.catalog-drawer {
    position: fixed; top: 0; right: -480px;
    width: 420px; height: 100dvh;
    background: rgba(14,14,14,0.97);
    backdrop-filter: blur(30px);
    border-left: 1px solid var(--border-subtle);
    z-index: 400;
    transition: right var(--t-slow) cubic-bezier(0.16, 1, 0.3, 1);
    display: flex; flex-direction: column;
}
.catalog-drawer.open { right: 0; }

.drawer-header {
    padding: 1.5rem 2rem;
    display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid var(--border);
}
.drawer-header h2 {
    font-family: var(--font-heading);
    font-size: 0.75rem; font-weight: 600;
    letter-spacing: 0.18em; text-transform: uppercase;
    color: var(--text-secondary);
}
.drawer-content { flex: 1; overflow-y: auto; padding: 1.5rem 2rem; }

.catalog-section { margin-bottom: 2.5rem; }
.catalog-section h3 {
    font-family: var(--font-heading); font-size: 0.65rem;
    text-transform: uppercase; letter-spacing: 0.2em;
    color: var(--text-tertiary);
    margin-bottom: 1rem;
    display: flex; align-items: center; gap: 0.75rem;
}
.catalog-section .badge {
    background: rgba(255,255,255,0.06);
    color: var(--text-tertiary);
    font-size: 0.6rem; padding: 0.2rem 0.5rem;
    border-radius: 3px; letter-spacing: 0.1em;
}
.track-list { list-style: none; display: flex; flex-direction: column; gap: 2px; }

.track-btn {
    width: 100%; text-align: left;
    background: transparent; border: none;
    color: var(--text-secondary);
    padding: 0.875rem 1rem; border-radius: 6px;
    cursor: pointer;
    transition: all var(--t-fast);
    display: flex; align-items: center; gap: 1rem;
    font-family: var(--font-body); font-size: 0.9rem;
    font-weight: 400;
}
.track-btn:hover { background: rgba(255,255,255,0.05); color: var(--text-primary); }
.track-btn.active { color: var(--accent); font-weight: 500; background: var(--accent-subtle); }
.track-num {
    font-family: var(--font-mono); font-size: 0.75rem;
    opacity: 0.4; min-width: 1.5rem;
}

/* ============================================
   SPA VIEWPORT (Scrollable Song Page)
   ============================================ */
.spa-viewport {
    position: fixed;
    top: var(--topbar-h);
    bottom: var(--player-h);
    left: var(--arrow-w);
    right: var(--arrow-w);
    overflow-y: auto; scroll-behavior: smooth;
    z-index: 50;
    scrollbar-width: none;
}
.spa-viewport::-webkit-scrollbar { display: none; }
/* Allow text selection only within reading areas */
.spa-viewport .selectable-text { user-select: text; }

/* ============================================
   SONG PAGE LAYOUT
   ============================================ */
.song-page { padding: 3rem 0 5rem; }

/* --- Hero Zone --- */
.song-hero {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 3.5rem; align-items: flex-end;
    padding: 2rem var(--page-pad) 4rem;
    max-width: 1180px; margin: 0 auto;
}

.song-cover-wrap {
    position: relative; flex-shrink: 0;
}
.song-cover {
    width: clamp(280px, 28vw, 400px);
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 6px;
    box-shadow:
        0 30px 80px rgba(0,0,0,0.8),
        0 10px 30px rgba(0,0,0,0.5);
    display: block;
}

.song-hero-info {
    display: flex; flex-direction: column;
    gap: 1.25rem; padding-bottom: 0.5rem;
}

.song-type-badge {
    display: inline-flex; align-items: center; gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.7rem; font-weight: 500;
    letter-spacing: 0.18em; text-transform: uppercase;
    color: var(--accent);
    border: 1px solid var(--accent);
    padding: 0.3rem 0.75rem; border-radius: 3px;
    width: fit-content;
}

.song-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 6vw, 5.5rem);
    font-weight: 700; line-height: 1;
    letter-spacing: -0.03em; color: var(--text-primary);
}

.song-artist-line {
    font-family: var(--font-heading);
    font-size: 1.1rem; font-weight: 500;
    color: var(--text-secondary); letter-spacing: 0.05em;
}

.song-meta-row {
    display: flex; align-items: center; gap: 1.5rem;
    flex-wrap: wrap;
}
.song-meta-item {
    font-family: var(--font-mono); font-size: 0.75rem;
    color: var(--text-tertiary); letter-spacing: 0.05em;
}
.song-meta-item strong {
    color: var(--text-secondary); font-weight: 500;
}
.meta-dot { color: var(--border); }

/* Inline Play Button in Hero */
.hero-play-btn {
    display: inline-flex; align-items: center; gap: 0.875rem;
    background: var(--accent);
    color: white;
    border: none; border-radius: 4px;
    padding: 0.9rem 1.75rem;
    font-family: var(--font-heading);
    font-size: 0.85rem; font-weight: 600;
    letter-spacing: 0.1em; text-transform: uppercase;
    cursor: pointer;
    transition: all var(--t-fast);
    margin-top: 0.5rem;
    width: fit-content;
}
.hero-play-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(226,54,54,0.35);
}
.hero-play-btn .icon-svg { font-size: 1.25rem; }

/* ============================================
   MAIN CONTENT GRID
   ============================================ */
.song-content {
    max-width: 1100px; margin: 0 auto;
    padding: 0 var(--page-pad);
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 4rem;
}

.song-content-main { display: flex; flex-direction: column; gap: 3.5rem; }
.song-content-side { display: flex; flex-direction: column; gap: 2rem; }

/* ============================================
   SECTION HEADERS
   ============================================ */
.section-eyebrow {
    font-family: var(--font-heading);
    font-size: 0.65rem; font-weight: 600;
    letter-spacing: 0.2em; text-transform: uppercase;
    color: var(--text-tertiary);
    margin-bottom: 1.5rem;
    display: flex; align-items: center; gap: 1rem;
}
.section-eyebrow::after {
    content: '';
    flex: 1; height: 1px;
    background: var(--border);
}

.lyrics-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.lyrics-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}
.btn-fullscreen-lyrics {
    display: inline-flex; align-items: center; gap: 0.4rem;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.65rem; font-weight: 600;
    letter-spacing: 0.14em; text-transform: uppercase;
    padding: 0.35rem 0.75rem;
    border-radius: 4px; cursor: pointer;
    transition: all var(--t-fast);
    white-space: nowrap;
}
.btn-fullscreen-lyrics:hover {
    border-color: rgba(255,255,255,0.3);
    color: var(--text-primary);
    background: rgba(255,255,255,0.05);
}

.lyrics-scroller {
    position: relative;
    max-height: 520px;
    overflow-y: auto;
    padding: 0.5rem 0 3rem;
    /* Fade bottom */
    -webkit-mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
}
.lyrics-scroller::-webkit-scrollbar { width: 3px; }
.lyrics-scroller::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.lyric-line {
    font-family: var(--font-body);
    font-size: 1.25rem; line-height: 1.8;
    color: var(--text-muted);
    transition: all var(--t-base);
    padding: 0.25rem 0;
    letter-spacing: 0.01em;
    user-select: text;
}
.lyric-line.active {
    color: var(--text-primary);
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}
.lyric-line.past { color: var(--text-muted); opacity: 0.5; }

/* Empty state */
.lyrics-empty {
    color: var(--text-tertiary);
    font-style: italic; padding: 2rem 0;
}

/* ============================================
   PRESS QUOTES
   ============================================ */
.press-section { display: flex; flex-direction: column; gap: 1rem; }
.press-grid { display: flex; flex-direction: column; gap: 1.5rem; }

.press-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    padding: 1.5rem;
    transition: border-color var(--t-fast);
    user-select: text;
}
.press-card:hover { border-color: var(--border); }
a.press-card:hover .press-source { color: var(--accent); }

.press-quote {
    font-style: italic;
    font-size: 1rem; line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 0.875rem;
}
.press-quote::before { content: '"'; }
.press-quote::after  { content: '"'; }

.press-source {
    font-family: var(--font-mono); font-size: 0.75rem;
    font-weight: 600; letter-spacing: 0.08em;
    text-transform: uppercase; color: var(--text-tertiary);
    transition: color var(--t-fast);
    display: flex; align-items: center; gap: 0.5rem;
}
.press-source .icon-svg { font-size: 0.9rem; }

/* ============================================
   CREDITS (Side)
   ============================================ */
.credits-block {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    padding: 1.5rem;
}
.credits-row {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 0.25rem 1rem;
    padding: 0.625rem 0;
    border-bottom: 1px solid var(--border-subtle);
}
.credits-row:last-child { border-bottom: none; }
.credits-role {
    font-family: var(--font-mono); font-size: 0.7rem;
    letter-spacing: 0.05em; text-transform: uppercase;
    color: var(--text-tertiary);
    font-weight: 500;
}
.credits-name {
    font-size: 0.875rem; color: var(--text-primary);
    font-weight: 500;
}

/* Tech data */
.tech-block {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    padding: 1.5rem;
}
.tech-row {
    display: flex; justify-content: space-between; align-items: baseline;
    gap: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-subtle);
}
.tech-row:last-child { border-bottom: none; }
.tech-key {
    font-family: var(--font-mono); font-size: 0.7rem;
    color: var(--text-tertiary); text-transform: uppercase;
    letter-spacing: 0.06em; white-space: nowrap;
}
.tech-val {
    font-family: var(--font-mono); font-size: 0.8rem;
    color: var(--text-secondary); text-align: right;
}

/* ============================================
   LISTEN ON (Links)
   ============================================ */
.listen-block {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    padding: 1.5rem;
}
.listen-links { display: flex; flex-direction: column; gap: 0.5rem; }

.listen-link {
    display: flex; align-items: center; gap: 0.875rem;
    padding: 0.75rem 1rem; border-radius: 5px;
    background: rgba(255,255,255,0.03);
    border: 1px solid transparent;
    transition: all var(--t-fast);
    color: var(--text-secondary); font-size: 0.875rem;
    font-weight: 500;
}
.listen-link:hover {
    border-color: rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.07);
    color: var(--text-primary);
}
.listen-link .platform-icon {
    width: 22px; height: 22px;
    border-radius: 4px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.9rem;
}
.listen-link .listen-link-arrow { font-size: 0.9rem; opacity: 0.5; margin-left: auto; }

/* Platform colours */
.icon-spotify   { background: #1DB954; color: #fff; }
.icon-youtube   { background: #FF0000; color: #fff; }
.icon-apple     { background: #FC3C44; color: #fff; }
.icon-amazon    { background: #FF9900; color: #000; }
.icon-deezer    { background: #A238FF; color: #fff; }
.icon-tidal     { background: #00FFFF; color: #000; }
.icon-soundcloud{ background: #FF5500; color: #fff; }
.icon-bandcamp  { background: #1DA0C3; color: #fff; }
.icon-link      { background: var(--surface); color: var(--text-secondary); }

/* ============================================
   SAFE PLAYER BAR (Bottom)
   ============================================ */
.safe-player-bar {
    position: fixed; bottom: 0; left: 0; right: 0;
    height: var(--player-h);
    background: rgba(8,8,8,0.98);
    border-top: 1px solid var(--border-subtle);
    backdrop-filter: blur(20px);
    z-index: 350;
    display: grid;
    grid-template-columns: 280px 1fr 220px;
    align-items: center;
    padding: 0 2rem;
    gap: 1.5rem;
}

/* Song info */
.player-info {
    display: flex; align-items: center; gap: 0.875rem;
    min-width: 0; /* allow truncation */
}
.player-thumb {
    width: 52px; height: 52px; flex-shrink: 0;
    border-radius: 4px; object-fit: cover;
    box-shadow: var(--shadow-md);
}
.player-titles { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.p-title {
    font-weight: 600; font-size: 0.875rem;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.p-artist {
    font-size: 0.75rem; color: var(--text-secondary);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Center controls */
.player-center {
    display: flex; flex-direction: column;
    align-items: center; gap: 0.5rem;
}
.player-controls {
    display: flex; align-items: center; gap: 1.25rem;
}
.ctrl-btn {
    background: none; border: none;
    color: var(--text-secondary); font-size: 1.25rem;
    cursor: pointer; transition: all var(--t-fast);
    display: flex; align-items: center;
    padding: 0.25rem;
}
.ctrl-btn:hover { color: var(--text-primary); }
.ctrl-play {
    width: 44px; height: 44px; border-radius: 50%;
    background: var(--accent); color: white;
    font-size: 1.5rem;
    display: flex; align-items: center; justify-content: center;
    transition: all var(--t-fast);
}
.ctrl-play:hover { background: var(--accent-hover); transform: scale(1.06); }

/* Timeline */
.player-timeline {
    display: flex; align-items: center; gap: 0.75rem;
    font-family: var(--font-mono); font-size: 0.7rem;
    color: var(--text-tertiary); width: 100%;
}
.progress-track {
    flex: 1; height: 3px; background: rgba(255,255,255,0.1);
    border-radius: 2px; cursor: pointer; position: relative;
    transition: height var(--t-fast);
}
.progress-track:hover { height: 5px; }
.progress-fill {
    position: absolute; top: 0; left: 0; height: 100%;
    width: 0; background: var(--accent); border-radius: 2px;
    transition: width 0.1s linear;
    pointer-events: none;
}
.progress-track::after { /* Hover thumb */
    content: '';
    position: absolute; top: 50%; right: calc(100% - var(--p, 0%) );
    transform: translate(50%, -50%) scale(0);
    width: 12px; height: 12px;
    background: white; border-radius: 50%;
    transition: transform var(--t-fast);
}
.progress-track:hover::after { transform: translate(50%, -50%) scale(1); }

/* Volume */
.player-right {
    display: flex; align-items: center; gap: 0.75rem;
    justify-content: flex-end;
}
.vol-icon { font-size: 1rem; color: var(--text-tertiary); }
.vol-slider {
    -webkit-appearance: none; appearance: none;
    width: 90px; height: 3px;
    background: rgba(255,255,255,0.12);
    border-radius: 2px; cursor: pointer; outline: none;
}
.vol-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px; height: 12px;
    background: white; border-radius: 50%;
    cursor: pointer;
}
.vol-slider::-moz-range-thumb {
    width: 12px; height: 12px;
    background: white; border-radius: 50%; border: none;
    cursor: pointer;
}

/* ============================================
   CATALOG DRAWER - Scrollbar
   ============================================ */
.drawer-content::-webkit-scrollbar { width: 3px; }
.drawer-content::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* ============================================
   DIVIDER
   ============================================ */
.content-divider {
    border: none; border-top: 1px solid var(--border-subtle);
    margin: 0;
}

/* ============================================
   FOOTER ACTIONS
   ============================================ */
.song-footer {
    max-width: 1100px; margin: 4rem auto 0;
    padding: 2rem var(--page-pad);
    border-top: 1px solid var(--border-subtle);
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 1rem;
}
.btn-home {
    display: inline-flex; align-items: center; gap: 0.6rem;
    font-family: var(--font-heading); font-size: 0.8rem;
    font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--text-tertiary);
    transition: color var(--t-fast);
}
.btn-home:hover { color: var(--text-primary); }
.btn-home .icon-svg { font-size: 1rem; }

.song-nav-btns {
    display: flex; gap: 0.75rem;
}
.btn-song-nav {
    display: inline-flex; align-items: center; gap: 0.6rem;
    padding: 0.6rem 1.25rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-family: var(--font-heading); font-size: 0.75rem;
    font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--text-secondary);
    transition: all var(--t-fast);
}
.btn-song-nav:hover {
    border-color: var(--text-secondary);
    color: var(--text-primary);
    background: var(--bg-hover);
}
.btn-song-nav[disabled] { opacity: 0.25; pointer-events: none; }

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
.fade-in-up {
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.delay-1 { animation-delay: 0.08s; }
.delay-2 { animation-delay: 0.15s; }
.delay-3 { animation-delay: 0.22s; }
.delay-4 { animation-delay: 0.3s; }
.delay-5 { animation-delay: 0.38s; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 960px) {
    .song-hero {
        grid-template-columns: 1fr;
        align-items: flex-start;
        gap: 1.5rem; padding-top: 1rem;
    }
    .song-cover {
        width: clamp(220px, 48vw, 300px);
        margin: 0 auto;
    }
    .song-hero-info { align-items: center; text-align: center; }
    .song-meta-row { justify-content: center; }

    .song-content {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    .song-content-side { order: -1; } /* Side first on mobile */
    .listen-links { flex-direction: row; flex-wrap: wrap; gap: 0.5rem; }
    .listen-link { min-width: 140px; }

    .safe-player-bar {
        grid-template-columns: 1fr auto;
        grid-template-rows: 1fr auto;
        height: auto; min-height: var(--player-h);
        padding: 0.75rem 1rem;
        gap: 0.25rem;
    }
    .player-info { grid-column: 1; }
    .player-center { grid-column: 1 / -1; order: -1; gap: 0.25rem; }
    .player-right { display: none; }
    .player-timeline { width: 100%; }

    .spa-viewport { left: 0; right: 0; }
    .carousel-nav { display: none; }
}

@media (max-width: 600px) {
    :root { --topbar-h: 64px; }
    .song-title { font-size: 2.4rem; }
    .catalog-drawer { width: 100vw; right: -100vw; }
    .catalog-drawer.open { right: 0; }
    .topbar-left { gap: 0.9rem; }
    .topbar-catalog-link { font-size: 0.72rem; letter-spacing: 0.14em; }
}

/* ============================================
   CATALOG BUTTON WITH LABEL
   ============================================ */
.btn-catalog {
    width: auto;
    border-radius: 4px;
    padding: 0 0.875rem;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.btn-catalog-label {
    color: var(--text-secondary);
    transition: color var(--t-fast);
}
.btn-catalog:hover .btn-catalog-label { color: var(--text-primary); }

@media (max-width: 480px) {
    .btn-catalog-label { display: none; }
    .btn-catalog { width: 40px; padding: 0; border-radius: 50%; }
}

/* ============================================
   LYRICS FULLSCREEN OVERLAY
   ============================================ */
.lyrics-overlay {
    position: fixed; inset: 0; z-index: 500;
    display: flex; align-items: stretch;
}
.lyrics-overlay[hidden] { display: none; }

/* Background: blurred cover art (same as main bg) */
.lyrics-overlay-bg {
    position: absolute; inset: 0;
    background:
        radial-gradient(circle at center, rgba(12, 12, 12, 0.36) 0%, rgba(5, 5, 5, 0.9) 58%, rgba(2, 2, 2, 0.96) 100%),
        rgba(4, 4, 4, 0.92);
    backdrop-filter: blur(38px) saturate(0.72);
    -webkit-backdrop-filter: blur(38px) saturate(0.72);
}

/* Panel */
.lyrics-overlay-panel {
    position: relative; z-index: 1;
    width: 100%;
    margin: 0;
    display: flex; flex-direction: column;
    padding: 0 clamp(1.5rem, 4vw, 4rem) 2rem;
    overflow: hidden;
}

/* Header */
.lyrics-overlay-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1.75rem 0 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    margin: 0 auto;
    margin-bottom: 1.25rem;
    max-width: 1200px;
    width: 100%;
    flex-shrink: 0;
}
.lyrics-overlay-meta {
    display: flex; flex-direction: column; gap: 0.35rem;
}
.lyrics-overlay-badge {
    font-family: var(--font-mono); font-size: 0.65rem;
    font-weight: 600; letter-spacing: 0.2em;
    text-transform: uppercase; color: var(--accent);
}
.lyrics-overlay-title {
    font-family: var(--font-heading);
    font-size: 1.4rem; font-weight: 700;
    letter-spacing: -0.02em; color: var(--text-primary);
}
.lyrics-overlay-close {
    width: 42px; height: 42px; border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.05);
    color: var(--text-secondary); font-size: 1.25rem;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all var(--t-fast);
    flex-shrink: 0;
}
.lyrics-overlay-close:hover {
    border-color: rgba(255,255,255,0.3);
    color: var(--text-primary);
    background: rgba(255,255,255,0.1);
}

/* Scroller */
.lyrics-overlay-scroller {
    flex: 1; overflow-y: auto;
    padding: 38vh 0;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 16%, black 84%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, black 16%, black 84%, transparent 100%);
    scroll-behavior: smooth;
    scrollbar-width: none;
    overscroll-behavior: contain;
    scroll-padding-block: 44vh;
}
.lyrics-overlay-scroller::-webkit-scrollbar { display: none; }

/* Lyric lines inside overlay — bigger, centered, immersive */
.lyrics-overlay-scroller .lyric-line {
    font-size: clamp(1.4rem, 2vw, 1.85rem);
    text-align: center;
    line-height: 1.95;
    padding: 0.28rem 0;
    color: rgba(255,255,255,0.22);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    margin: 0 auto;
    max-width: min(760px, 88vw);
    width: 100%;
}
.lyrics-overlay-scroller .lyric-line.active {
    color: var(--text-primary);
    font-size: clamp(1.75rem, 2.6vw, 2.4rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    text-shadow: 0 0 48px rgba(226,54,54,0.22);
}
.lyrics-overlay-scroller .lyric-line.past {
    color: rgba(255,255,255,0.14);
}

/* Overlay open animation */
@keyframes overlayIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.lyrics-overlay:not([hidden]) {
    animation: overlayIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@media (max-width: 600px) {
    .lyrics-overlay-panel { padding: 0 1.25rem 1.5rem; }
    .lyrics-overlay-header {
        align-items: flex-start;
        gap: 1rem;
    }
    .lyrics-overlay-scroller {
        padding: 32vh 0;
        scroll-padding-block: 38vh;
    }
    .lyrics-overlay-scroller .lyric-line { font-size: 1.18rem; }
    .lyrics-overlay-scroller .lyric-line.active { font-size: 1.5rem; }
}
