/* ═══════════════════════════════════════════════════════════════
   NOLLATC PLAYER // ROBUST GRID LAYOUT
   ═══════════════════════════════════════════════════════════════ */

/* ══════════ FONTS ══════════ */
/* Robust linking with fallbacks - OTF Preferred */
@font-face {
    font-family: 'ChettaVissto';
    src: url('../assets/fonts/ChettaVissto.otf') format('opentype');
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: 'Manrope-Medium';
    src: url('../assets/fonts/Manrope-Medium.woff2') format('woff2'),
        url('../assets/fonts/Manrope-VariableFont_wght.ttf') format('truetype');
    font-weight: 500;
    font-display: swap;
}

@font-face {
    font-family: 'Rolide-Regular';
    src: url('../assets/fonts/Rolide-Regular.otf') format('opentype');
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: 'Campeno-Regular';
    src: url('../assets/fonts/Campeno-Regular.otf') format('opentype');
    font-weight: 400;
    font-display: swap;
}

:root {
    /* ══════════ VOID COLORS ══════════ */
    --void-deep: #0a0a0a;
    --bg-dark: #0a0a0a;
    --graphite: #111111;
    --graphite-light: #1a1a1a;
    --graphite-mid: #2a2a2a;

    /* ══════════ GLASS SURFACES ══════════ */
    --glass-bg: rgba(18, 18, 18, 0.4);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-highlight: rgba(255, 255, 255, 0.03);
    --glass-well-bg: rgba(0, 0, 0, 0.25);

    /* ══════════ TEXT COLORS ══════════ */
    --bone: #e3e1da;
    --bone-dim: #8b8b8b;
    --bone-ghost: rgba(227, 225, 218, 0.4);

    /* ══════════ ACCENT COLORS ══════════ */
    --sage: #8b9d7d;
    --sage-glow: rgba(139, 157, 125, 0.4);
    --sage-bright: rgba(139, 157, 125, 0.9);
    --sage-neon: rgba(166, 184, 152, 1);

    /* ══════════ TYPOGRAPHY ══════════ */
    --font-display: 'ChettaVissto', system-ui, sans-serif;
    --font-ui: 'Manrope-Medium', system-ui, sans-serif;
    --font-mono: 'Rolide-Regular', ui-monospace, monospace;
    --font-accent: 'Campeno-Regular', Georgia, serif;
    --font-body: var(--font-ui);
    /* Alias for body text */

    /* ══════════ ANIMATION PHYSICS (LUXURY OVERHAUL) ══════════ */
    --ease-luxury: cubic-bezier(0.2, 0.0, 0, 1.0);
    /* Expensive, heavy feel */
    --ease-elastic: cubic-bezier(0.34, 1.56, 0.64, 1);
    /* Controlled spring */
    --ease-drift: cubic-bezier(0.4, 0, 0.2, 1);
    /* Smooth float */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    /* Fluid Apple-like deceleration */

    /* ══════════ SHADOW DEPTH SYSTEM ══════════ */
    --shadow-contact: 0 2px 6px rgba(0, 0, 0, 0.5);
    --shadow-lift: 0 4px 12px rgba(0, 0, 0, 0.35);
    --shadow-diffuse: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-deep: 0 16px 48px rgba(0, 0, 0, 0.25);

    /* Glass Well (Inset) */
    --shadow-well:
        inset 0 2px 8px rgba(0, 0, 0, 0.4),
        inset 0 0 0 1px rgba(255, 255, 255, 0.03),
        0 1px 0 rgba(255, 255, 255, 0.05);
}

/* ══════════ GLOBAL SOFT ENTRY ANIMATION ══════════ */
@keyframes softFadeUp {
    0% {
        opacity: 0;
        transform: translateY(15px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ══════════ LUXURIOUS SITE ENTRANCE ══════════ */
@keyframes siteEntrance {
    0% {
        opacity: 0;
        transform: translateY(25px) scale(0.97);
        filter: blur(12px);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

/* Initial hidden state with fallback animation */
.reveal-1,
.reveal-2,
.reveal-3,
.reveal-4,
.reveal-5 {
    opacity: 0;
    animation: fallbackReveal 1s ease 1.5s forwards;
}

/* Fallback to ensure visibility even if JS fails */
@keyframes fallbackReveal {
    to {
        opacity: 1;
    }
}

/* Animated reveal on .loaded */
.app.loaded .reveal-1 {
    animation: siteEntrance 1.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0s;
}

.app.loaded .reveal-2 {
    animation: siteEntrance 1.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.12s;
}

/* Custom animation for scrubber to preserve translateX(-50%) centering */
@keyframes scrubberEntrance {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(25px) scale(0.97);
        filter: blur(12px);
    }

    100% {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
        filter: blur(0);
    }
}

.app.loaded .reveal-3 {
    animation: scrubberEntrance 1.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.24s;
}

.app.loaded .reveal-4 {
    animation: siteEntrance 1.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.36s;
}

/* Fade-only animation for satellite wrapper (no transform to avoid positioning conflicts) */
@keyframes fadeEntrance {
    0% {
        opacity: 0;
        filter: blur(8px);
    }

    100% {
        opacity: 1;
        filter: blur(0);
    }
}

.app.loaded .reveal-5 {
    animation: fadeEntrance 1.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.48s;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
}

body {
    background: var(--bg-dark);
    color: var(--bone);
    font-family: var(--font-ui);
    overflow: hidden;
    /* No scroll on body */
    height: 100vh;
}

/* === AMBIENT BACKGROUND === */
.ambient-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.ambient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.4;
    animation: floatOrb 20s infinite ease-in-out;
}

.ambient-orb--1 {
    width: 60vw;
    height: 60vw;
    background: #2a3a2a;
    top: -20%;
    left: -10%;
}

.ambient-orb--2 {
    width: 50vw;
    height: 50vw;
    background: #3a2a2a;
    bottom: -10%;
    right: -10%;
    animation-delay: -5s;
}

.noise-overlay {
    position: absolute;
    inset: 0;
    background: url('https://grainy-gradients.vercel.app/noise.svg');
    /* Fallback or local */
    opacity: 0.03;
}

@keyframes floatOrb {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(50px, 30px);
    }
}

/* === SYSTEM INITIALIZATION SEQUENCE === */

/* Shimmer skeleton effect during load */
.skeleton-shimmer {
    position: relative;
    overflow: hidden;
    background: var(--graphite-light);
    border-radius: 4px;
}

.skeleton-shimmer::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
            transparent 0%,
            var(--glass-highlight) 50%,
            transparent 100%);
    background-size: 200% 100%;
    animation: shimmer 1.8s var(--ease-smooth) infinite;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Init text pulse */
.init-text {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    color: var(--bone-ghost);
    text-transform: uppercase;
    animation: initPulse 1.5s var(--ease-smooth) infinite;
}

@keyframes initPulse {

    0%,
    100% {
        opacity: 0.4;
    }

    50% {
        opacity: 1;
    }
}

/* App fade-in on ready */
.app.is-loading {
    opacity: 0.5;
    filter: blur(2px);
}

.app.is-ready {
    opacity: 1;
    filter: blur(0);
    transition:
        opacity 0.6s var(--ease-soft-close),
        filter 0.6s var(--ease-soft-close);
}

/* === GRID LAYOUT ENGINE === */
.app {
    position: relative;
    z-index: 10;
    width: 100vw;
    height: 100vh;
    display: grid;
    grid-template-rows: 1fr 100px;
    /* Content | Player Bar */
    gap: 0;
}

/* --- MAIN VIEW (Clean Mode) --- */
.main-view {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    /* overflow: hidden; Removed to allow artwork shadow to breathe */
    padding: 24px;
    width: 100%;
}


/* HERO: Centered Container */
.hero-col {
    position: relative;
    /* Changed from absolute to flow naturally */
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

/* Glass Panel Style (Preserved for other elements if needed) */
.glass-panel {
    background: rgba(18, 18, 18, 0.4);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}



/* === COMPONENT: MIXER RACK (Right) === */
.mixer-col {
    padding: 24px;
    gap: 24px;
}

.rack-header {
    text-align: center;
    font-family: var(--font-display);
    font-size: 0.8rem;
    color: var(--bone-dim);
    letter-spacing: 0.15em;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.rack-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.master-unit {
    gap: 12px;
}

.knob-wrapper {
    width: 100px;
    height: 100px;
    position: relative;
}

.knob-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.knob-track {
    fill: none;
    stroke: rgba(255, 255, 255, 0.05);
    stroke-width: 6;
}

.knob-value {
    fill: none;
    stroke: var(--sage);
    stroke-width: 6;
}

.knob-dial {
    position: absolute;
    inset: 12px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #333, #111);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: grab;
    /* Perfect center origin for rotation */
    transform-origin: center center;
}

.knob-dial:active {
    cursor: grabbing;
}

.knob-tick {
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 8px;
    background: var(--sage);
}

.knob-label {
    font-size: 0.7rem;
    color: var(--bone-dim);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

#master-value {
    color: var(--bone);
}

.vis-stack {
    width: 100%;
    gap: 8px;
    flex: 1;
    min-height: 0;
}

.vis-module {
    flex: 1;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 12px;
    position: relative;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.vis-module canvas {
    width: 100%;
    height: 100%;
    display: block;
    opacity: 0.8;
}

.vis-tag {
    position: absolute;
    bottom: 4px;
    right: 6px;
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.2);
}

.eq-stack {
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
    padding: 0 16px;
}

.eq-fader-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.eq-mini-track {
    width: 6px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    position: relative;
}

.eq-mini-thumb {
    width: 12px;
    height: 4px;
    background: var(--bone-dim);
    border-radius: 2px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.eq-label {
    font-size: 0.6rem;
    color: var(--bone-dim);
}

/* === COMPONENT: HERO ARTWORK (Center) === */
.hero-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    /* Stack Art + Pills vertically */
    align-items: center;
    justify-content: center;
    perspective: 1000px;
    /* Deep 3D depth */
    transform-style: preserve-3d;
}

.artwork-frame {
    width: 55vh;
    height: 55vh;
    max-width: 100%;
    position: relative;
    /* Default transition for the smooth reset (JS will remove this on hover) */
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    transform-style: preserve-3d;
    border-radius: 24px;

    /* Intro Animation */
    opacity: 0;
    animation: softFadeUp 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    animation-delay: 0.4s;
}

.artwork-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 24px;
    /* Dynamic shadow baseline */
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    pointer-events: none;
    /* Let events pass to frame */
}

/* ═══════════════════════════════════════════════════════════════
   ARCHIVE DRAWER 2.0 — GLASS CRATE SYSTEM
   ═══════════════════════════════════════════════════════════════ */

/* === THE GLASS DRAWER === */
.archive-drawer {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 340px;
    max-width: 380px;
    border-radius: 24px;
    overflow: hidden;
    z-index: 30;

    /* Heavy Glassmorphism */
    background: rgba(12, 12, 12, 0.85);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);

    /* Slide-in Animation */
    animation: drawerSlideIn 0.5s var(--ease-soft-close) forwards;
}

@keyframes drawerSlideIn {
    0% {
        opacity: 0;
        transform: translateX(-30px);
    }

    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* === ARCHIVE HEADER === */
.archive-header {
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.archive-title {
    font-family: var(--font-display);
    font-size: 1.4rem;
    letter-spacing: 0.15em;
    color: var(--bone);
    margin: 0;
    font-weight: 400;
}

.archive-close {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--bone-dim);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s var(--ease-soft-close);
    position: relative;
    z-index: 100;
}

.archive-close svg {
    width: 16px;
    height: 16px;
    transition: transform 0.4s var(--ease-smooth);
}

.archive-close:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--sage);
    color: var(--bone);
}

.archive-close:hover svg {
    transform: rotate(90deg);
}

/* === SPOTLIGHT SEARCH === */
.archive-search {
    padding: 16px 20px;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 14px;
    width: 18px;
    height: 18px;
    color: var(--bone-dim);
    pointer-events: none;
    transition: color 0.3s var(--ease-soft-close);
}

.archive-search input {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 12px 16px 12px 44px;
    border-radius: 12px;
    color: var(--bone);
    font-family: var(--font-ui);
    font-size: 0.9rem;
    transition: all 0.3s var(--ease-soft-close);
}

.archive-search input::placeholder {
    color: var(--bone-ghost);
}

.archive-search input:focus {
    outline: none;
    border-color: var(--sage);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 3px rgba(139, 157, 125, 0.15);
}

.archive-search input:focus+.search-icon,
.search-input-wrapper:focus-within .search-icon {
    color: var(--sage);
}

/* === SMART TAGS FILTER ROW === */
.archive-tags {
    display: flex;
    gap: 8px;
    padding: 0 20px 16px;
    flex-wrap: wrap;
}

.tag-pill {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.03);
    color: var(--bone-dim);
    cursor: pointer;
    transition: all 0.25s var(--ease-soft-close);
}

.tag-pill:hover {
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.06);
    color: var(--bone);
}

.tag-pill.active {
    border-color: var(--sage);
    background: rgba(139, 157, 125, 0.15);
    color: var(--sage);
    box-shadow: 0 0 8px rgba(139, 157, 125, 0.2);
}

/* === FEATURED HERO SECTION === */
.archive-featured {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.featured-header {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 12px;
}

.featured-label {
    font-family: var(--font-display);
    font-size: 0.9rem;
    letter-spacing: 0.12em;
    color: var(--bone);
    margin: 0;
    font-weight: 400;
}

.featured-sub {
    font-family: var(--font-ui);
    font-size: 0.7rem;
    color: var(--bone-ghost);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.featured-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
    margin: 0 -8px;
    padding-left: 8px;
    padding-right: 8px;
}

/* Hide scrollbar but keep functionality */
.featured-scroll::-webkit-scrollbar {
    height: 4px;
}

.featured-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.featured-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

/* Featured Card */
.featured-card {
    flex: 0 0 auto;
    width: 140px;
    scroll-snap-align: start;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    position: relative;

    /* Glass Effect */
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    transition: all 0.3s var(--ease-soft-close);
}

.featured-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--sage);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.featured-card-art {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
}

.featured-card-info {
    padding: 10px 12px;
}

.featured-card-title {
    font-family: var(--font-display);
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: var(--bone);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.featured-card-artist {
    font-family: var(--font-ui);
    font-size: 0.65rem;
    color: var(--bone-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.featured-card-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 3px 6px;
    font-family: var(--font-mono);
    font-size: 0.55rem;
    letter-spacing: 0.05em;
    background: var(--sage);
    color: var(--bg-dark);
    border-radius: 4px;
    text-transform: uppercase;
}

/* Play overlay on hover */
.featured-card-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity 0.3s var(--ease-soft-close);
}

.featured-card:hover .featured-card-overlay {
    opacity: 1;
}

.featured-card-overlay svg {
    width: 36px;
    height: 36px;
    color: var(--bone);
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
}

/* === ARCHIVE LIST (THE CRATE) === */
.archive-list {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 12px 80px 12px;
    /* Extra bottom for Next Up capsule */
}

/* Custom Scrollbar */
.archive-list::-webkit-scrollbar {
    width: 6px;
}

.archive-list::-webkit-scrollbar-track {
    background: transparent;
}

.archive-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

.archive-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* === TRACK ROW === */
.archive-track {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    cursor: pointer;
    position: relative;
    transition: all 0.25s var(--ease-soft-close);

    /* Staggered entry animation */
    opacity: 0;
    transform: translateY(10px);
    animation: trackSlideIn 0.4s var(--ease-soft-close) forwards;
}

.archive-track:nth-child(1) {
    animation-delay: 0.05s;
}

.archive-track:nth-child(2) {
    animation-delay: 0.1s;
}

.archive-track:nth-child(3) {
    animation-delay: 0.15s;
}

.archive-track:nth-child(4) {
    animation-delay: 0.2s;
}

.archive-track:nth-child(5) {
    animation-delay: 0.25s;
}

.archive-track:nth-child(6) {
    animation-delay: 0.3s;
}

.archive-track:nth-child(7) {
    animation-delay: 0.35s;
}

@keyframes trackSlideIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.archive-track:hover {
    background: rgba(255, 255, 255, 0.05);
}

.archive-track.is-playing {
    background: rgba(139, 157, 125, 0.1);
    border: 1px solid rgba(139, 157, 125, 0.2);
}

/* Haptic Search: Blur non-matching tracks */
.archive-track.is-dimmed {
    opacity: 0.3;
    filter: blur(1px);
    transform: scale(0.98);
    pointer-events: none;
}

/* Track Album Art */
.track-art-wrap {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
}

.track-art-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s var(--ease-soft-close);
}

.track-art-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity 0.3s var(--ease-soft-close);
    display: flex;
    align-items: center;
    justify-content: center;
}

.archive-track:hover .track-art-wrap::after {
    opacity: 1;
}

.track-play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s var(--ease-soft-close);
    z-index: 2;
}

.track-play-overlay svg {
    width: 20px;
    height: 20px;
    color: var(--bone);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.archive-track:hover .track-play-overlay {
    opacity: 1;
}

/* Track Info */
.track-info-col {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.track-name {
    font-family: var(--font-ui);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--bone);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-artist-row {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    color: var(--bone-dim);
    opacity: 0.7;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: transform 0.3s var(--ease-soft-close);
}

.archive-track:hover .track-artist-row {
    transform: translateX(4px);
}

/* Track Meta (Duration / BPM) */
.track-meta-col {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    flex-shrink: 0;
}

.track-duration {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--bone-dim);
}

.track-bpm {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--bone-ghost);
}

/* Track Info Button */
.track-info-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--bone-dim);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.25s var(--ease-soft-close);
    flex-shrink: 0;
}

.track-info-btn svg {
    width: 14px;
    height: 14px;
}

.archive-track:hover .track-info-btn {
    opacity: 1;
    transform: scale(1);
}

.track-info-btn:hover {
    background: var(--sage);
    border-color: var(--sage);
    color: var(--bg-dark);
}

/* === NEXT UP FLOATING CAPSULE === */
.next-up-capsule {
    position: absolute;
    bottom: 16px;
    left: 16px;
    right: 16px;
    padding: 10px 16px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 10px;

    /* Glass Capsule */
    background: rgba(18, 18, 18, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.next-up-label {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.1em;
    color: var(--sage);
    padding: 2px 6px;
    background: rgba(139, 157, 125, 0.15);
    border-radius: 4px;
}

.next-up-track {
    flex: 1;
    font-family: var(--font-ui);
    font-size: 0.8rem;
    color: var(--bone);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Mini Equalizer Animation */
.mini-eq {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 14px;
}

.mini-eq span {
    width: 3px;
    background: var(--sage);
    border-radius: 1px;
    animation: eqPulse 0.8s ease-in-out infinite;
}

.mini-eq span:nth-child(1) {
    height: 8px;
    animation-delay: 0s;
}

.mini-eq span:nth-child(2) {
    height: 12px;
    animation-delay: 0.15s;
}

.mini-eq span:nth-child(3) {
    height: 6px;
    animation-delay: 0.3s;
}

@keyframes eqPulse {

    0%,
    100% {
        transform: scaleY(0.5);
    }

    50% {
        transform: scaleY(1);
    }
}

/* ═══════════════════════════════════════════════════════════════
   0. FONTS & RESET
   ═══════════════════════════════════════════════════════════════ */
@font-face {
    font-family: 'ChettaVissto';
    src: url('../assets/fonts/ChettaVissto.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Manrope';
    src: url('../assets/fonts/Manrope-VariableFont_wght.ttf') format('truetype');
    font-weight: 100 900;
}

:root {
    /* --- FONTS --- */
    --font-display: 'ChettaVissto', sans-serif;
    --font-ui: 'Manrope', sans-serif;
    --font-mono: 'Space Mono', monospace;
}

/* ═══════════════════════════════════════════════════════════════
   INSPECTOR CARD — METADATA OVERLAY
   ═══════════════════════════════════════════════════════════════ */

.inspector-card {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 380px;
    max-width: 90vw;
    max-height: 80vh;
    border-radius: 24px;
    z-index: 200;
    overflow: hidden;

    /* Heavy Glass */
    background: rgba(18, 18, 18, 0.95);
    backdrop-filter: blur(50px);
    -webkit-backdrop-filter: blur(50px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        0 24px 80px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.05);

    /* Hidden by default */
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s var(--ease-soft-close);
}

.inspector-card.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
}

/* Inspector Header */
.inspector-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.inspector-art-wrap {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.inspector-art-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.inspector-title-wrap {
    flex: 1;
    min-width: 0;
}

.inspector-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    letter-spacing: 0.05em;
    color: var(--bone);
    margin: 0 0 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.inspector-artist {
    font-family: var(--font-ui);
    font-size: 0.8rem;
    color: var(--bone-dim);
}

.inspector-close {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--bone-dim);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s var(--ease-soft-close);
}

.inspector-close svg {
    width: 16px;
    height: 16px;
}

.inspector-close:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--sage);
    color: var(--bone);
}

/* Inspector Body */
.inspector-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Waveform Preview */
.inspector-waveform {
    height: 60px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    overflow: hidden;
}

.inspector-waveform canvas {
    width: 100%;
    height: 100%;
}

/* Tech Specs Grid */
.inspector-specs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.spec-item {
    text-align: center;
    padding: 12px 8px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.spec-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.55rem;
    letter-spacing: 0.1em;
    color: var(--bone-ghost);
    margin-bottom: 4px;
}

.spec-value {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--sage);
    font-weight: 500;
}

/* Credits */
.inspector-credits {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
}

.credit-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.credit-label {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    color: var(--bone-dim);
}

.credit-value {
    font-family: var(--font-ui);
    font-size: 0.8rem;
    color: var(--bone);
}

/* Description */
.inspector-description {
    font-family: var(--font-ui);
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--bone-dim);
    margin: 0;
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border-left: 3px solid var(--sage);
}

/* Inspector Backdrop */
.inspector-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 199;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s var(--ease-soft-close);
}

.inspector-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
}

/* === COMPONENT: PLAYER BAR — HYBRID DOCK === */
/* Combines: V1 Floating Glass + V2 Recessed Well + V3 Ultra-Minimal */

.player-bar {
    margin: 24px 32px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 32px;
    gap: 32px;

    /* V1: Floating Glassmorphism */
    background: linear-gradient(135deg,
            rgba(18, 18, 18, 0.75) 0%,
            rgba(12, 12, 12, 0.65) 100%);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);

    /* V3: Hairline highlight on top edge */
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 1px solid rgba(255, 255, 255, 0.04);
    border-right: 1px solid rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(0, 0, 0, 0.3);

    /* V2: Deep shadow system */
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.4),
        0 16px 48px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

/* ══════════ LEFT: TRACK META ══════════ */
.pb-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 280px;
    min-width: 0;
    flex-shrink: 0;
}

/* Track Info Container */
.track-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    flex: 1;
}

/* === SILENT LUXURY MARQUEE SYSTEM === */
/* Default: Clean ellipsis truncation
   On Hover: Seamless infinite loop scroll */

/* Text Row Container */
.text-row {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 1.6em;
}

.text-row--sub {
    height: 1.2em;
}

/* ══════════ STATIC LAYER (Default) ══════════ */
/* Visible by default, truncated with ellipsis */

.text-static {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    /* The Triple Dot */
    max-width: 100%;

    /* Force ellipsis to inherit parent font */
    font-family: inherit;
    font-size: inherit;
    color: inherit;

    /* Transition for smooth fade-out on hover */
    opacity: 1;
    transition: opacity 0.3s var(--ease-soft-close);
}

/* ══════════ SCROLL LAYER (Hover) ══════════ */
/* Hidden by default, revealed on hover */

.text-scroll-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    white-space: nowrap;
    will-change: transform;

    /* Hidden by default */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s var(--ease-soft-close);

    /* Gradient mask for smooth edge fade */
    -webkit-mask-image: linear-gradient(to right,
            transparent 0%,
            black 15%,
            black 85%,
            transparent 100%);
    mask-image: linear-gradient(to right,
            transparent 0%,
            black 15%,
            black 85%,
            transparent 100%);
}

.text-scroll-content {
    display: inline-block;
    white-space: nowrap;
    will-change: transform;
}

/* TITLE SCROLL - Force ChettaVissto Font (Prevents jitter) */
#title-scroll-1,
#title-scroll-2 {
    font-family: 'ChettaVissto', 'Campeno-Regular', var(--font-display), sans-serif !important;
    font-size: 1.3rem !important;
    letter-spacing: 0.05em !important;
    line-height: 1.3 !important;
    color: var(--bone) !important;
    font-weight: bold !important;
    /* Match h1 default bold weight */
}

/* ARTIST SCROLL - Allow children formatting (artist vs variant) */
#artist-scroll-1,
#artist-scroll-2 {
    /* Remove forced overrides so inner spans (artist/variant) work */
    display: inline-flex;
    align-items: center;
}

.text-scroll-spacer {
    display: inline-block;
    width: 60px;
    /* Gap between duplicates */
}

/* ══════════ HOVER INTERACTION ══════════ */
/* Only activate on .has-overflow rows */

.text-row.has-overflow:hover .text-static {
    opacity: 0;
    transition-delay: 0.15s;
    /* Faster response (150ms) */
}

.text-row.has-overflow:hover .text-scroll-wrapper {
    opacity: 1;
    pointer-events: auto;
    transition-delay: 0.15s;
    /* Match 150ms delay */
    animation: seamlessScroll var(--scroll-speed, 8s) linear infinite;
}

/* Snappier smooth transition */
.text-static,
.text-scroll-wrapper {
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ══════════ SEAMLESS INFINITE LOOP ══════════ */
/* Animate from 0% to -50% (first duplicate scrolls out, second takes over) */

@keyframes seamlessScroll {
    0% {
        transform: translate3d(0, 0, 0);
    }

    100% {
        transform: translate3d(-50%, 0, 0);
    }
}

/* ══════════ TYPOGRAPHY ══════════ */

.track-title {
    font-family: 'ChettaVissto', 'Campeno-Regular', var(--font-display), sans-serif !important;
    font-size: 1.3rem !important;
    font-weight: bold !important;
    color: var(--bone) !important;
    letter-spacing: 0.05em !important;
    line-height: 1.3 !important;
    margin: 0;
    white-space: nowrap;
}

.track-artist {
    font-family: 'Manrope', var(--font-ui), sans-serif !important;
    font-size: 0.75rem;
    color: var(--bone-dim);
    letter-spacing: 0.03em;
}

.meta-sep {
    /* Same color as adjacent elements - no opacity reduction */
    color: var(--bone-dim);
    margin: 0 4px;
    font-size: 0.75rem;
    font-family: var(--font-ui);
}

.track-variant {
    font-family: 'Manrope', var(--font-ui), sans-serif !important;
    font-size: 0.75rem;
    font-weight: 300;
    color: var(--bone-dim);
    letter-spacing: 0.03em;
    opacity: 0.7;
}

/* Artist line container - uses Manrope for consistent ellipsis */
.artist-line {
    font-family: 'Manrope', var(--font-ui), sans-serif !important;
    font-size: 0.75rem;
    letter-spacing: 0.03em;
    color: var(--bone-dim);
}

/* Shorter variant for small overflows - simpler ping-pong */
.text-mask.is-scrolling.short-scroll .scrolling-text {
    animation: gentlePingPong var(--scroll-duration) infinite ease-in-out;
}

@keyframes gentlePingPong {

    0%,
    15% {
        transform: translate3d(0, 0, 0);
    }

    42%,
    58% {
        transform: translate3d(var(--scroll-dist), 0, 0);
    }

    85%,
    100% {
        transform: translate3d(0, 0, 0);
    }
}

.meta-tags {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.tag {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.05em;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--bone-dim);
    opacity: 0.6;
    cursor: help;
    transition: all 0.25s var(--ease-soft-close);
}

.tag:hover {
    opacity: 1;
    border-color: #fff;
    color: #fff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.15);
}

/* Center Controls - Ultra Minimal (V3) */
.pb-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    max-width: 540px;
}

/* === GLASS WELL EFFECT (V2) === */
/* Transport controls sit in a recessed tray for depth */
.transport-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 24px;
    border-radius: 50px;

    /* Recessed glass well */
    background: var(--glass-well-bg);
    box-shadow: var(--shadow-well);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Control Buttons - Outlined Circles (V3 Style) */
.ctrl-btn {
    background: transparent;
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    color: var(--bone-dim);
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    position: relative;

    /* Luxury Physics - Anti-Gravity */
    transition:
        transform 0.4s var(--ease-luxury),
        background 0.4s var(--ease-luxury),
        border-color 0.4s var(--ease-luxury),
        filter 0.4s var(--ease-drift),
        color 0.4s var(--ease-drift);
    overflow: visible;
    /* Ensure blooms/tooltips breathe */
}

/* Hover: Anti-Gravity Float */
.ctrl-btn:hover {
    color: var(--bone);
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-4px);
    /* Lift */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    /* Shadow Lift */
}

/* Active State: Inner Light (Filled with photons) */
.transport-controls .ctrl-btn.is-active {
    opacity: 1;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.8) !important;
    background: rgba(255, 255, 255, 0.2) !important;

    /* The Inner Light Glow */
    box-shadow:
        inset 0 0 20px rgba(255, 255, 255, 0.6),
        0 0 15px rgba(255, 255, 255, 0.4);

    transform: translateY(-2px);
    /* Slightly planted but still glowing */
}

/* Press Interaction: Tactile click */
.ctrl-btn:active {
    transform: translateY(1px) scale(0.96);
    filter: brightness(0.8);
    transition: all 0.1s var(--ease-out-expo);
}

/* REPEAT BADGE (Morphing "1") */
.repeat-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 14px;
    height: 14px;
    background: var(--sage);
    color: #000;
    font-family: var(--font-mono);
    font-size: 9px;
    font-weight: 800;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: transform 0.6s var(--ease-elastic);
    /* Elastic Spring */
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Repeat One State: Fade icon, pop badge */
.ctrl-btn.is-one .repeat-icon {
    opacity: 0.3;
    transform: scale(0.8);
}

.ctrl-btn.is-one .repeat-badge {
    transform: translate(-50%, -50%) scale(1) !important;
}

/* GLASS TOOLTIPS */
[data-tooltip] {
    position: relative;
    overflow: visible !important;
    /* Allow tooltip to spill out */
}

[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    margin-bottom: 8px;

    /* Glass Style */
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--bone);

    /* Typography */
    font-family: var(--font-ui);
    font-size: 0.7rem;
    font-weight: 500;
    white-space: nowrap;
    padding: 6px 12px;
    border-radius: 50px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);

    /* Animation State */
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    z-index: 1000;
}

[data-tooltip]:hover::before {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.ctrl-btn svg {
    width: 22px;
    height: 22px;
    display: block;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
    transition:
        transform 0.35s var(--ease-soft-close),
        filter 0.35s var(--ease-soft-close);
}

@keyframes living-breath {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
    }
}

.play-btn-circle {
    width: 52px;
    height: 52px;
    border-radius: 50%;

    /* Ceramic/Bone Gradient */
    background: linear-gradient(145deg, var(--bone) 0%, #d8d8d0 100%);
    color: var(--graphite);

    /* V2: Sage accent ring */
    border: 2px solid transparent;
    box-sizing: border-box;

    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;

    /* Deep shadow with sage hint */
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.35),
        0 8px 24px rgba(0, 0, 0, 0.35),
        0 0 0 1px rgba(139, 157, 125, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);

    /* Luxury Physics - Magnetic */
    transition: all 0.6s var(--ease-out-expo);
    animation: living-breath 4s infinite ease-in-out;
    position: relative;
    z-index: 50;
}

.play-btn-circle:hover {
    transform: scale(1.1) translateY(-2px);
    border-color: var(--sage);
    /* Shadow Bloom */
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(139, 157, 125, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 1);
    animation-play-state: paused;
    /* Stop breathing on hover */
}

.play-btn-circle:active {
    transform: scale(0.9) translateY(1px);
    /* Compression */
    transition-duration: 0.1s;
    /* Instant reaction */
    filter: brightness(0.95);
}



.play-btn-circle svg {
    width: 26px;
    height: 26px;
}

.play-btn-circle .icon-pause {
    display: none;
}

/* Playing State */
.app.playing .play-btn-circle .icon-play {
    display: none;
}

.app.playing .play-btn-circle .icon-pause {
    display: block;
}

/* Note: JS adds .playing to .app usually? or we can target via body class if JS sets it on body? 
   Previous JS attached to 'app' ID variable. */

/* Progress */
.progress-container {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
}

.time-label {
    font-size: 0.7rem;
    color: var(--bone-dim);
    font-variant-numeric: tabular-nums;
    width: 35px;
    text-align: center;
    transition: color 0.3s var(--ease-soft-close);
}

.progress-container:hover .time-label {
    color: var(--bone);
}

/* Progress Bar - Expandable on Hover */
.progress-bar {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    position: relative;
    cursor: pointer;
    transition:
        height 0.4s var(--ease-soft-close),
        background 0.4s var(--ease-soft-close);
}

.progress-bar:hover {
    height: 6px;
    background: rgba(255, 255, 255, 0.12);
}

.progress-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--sage), var(--sage-bright));
    border-radius: 4px;
    position: absolute;
    top: 0;
    left: 0;
    box-shadow: 0 0 8px var(--sage-glow);
    transition: box-shadow 0.3s var(--ease-soft-close);
}

.progress-bar:hover .progress-fill {
    box-shadow: 0 0 12px var(--sage-glow), 0 0 20px var(--sage-glow);
}

.progress-handle {
    width: 12px;
    height: 12px;
    background: var(--bone);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 0%;
    box-shadow: var(--shadow-contact);
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    transition:
        transform 0.35s var(--ease-soft-close),
        opacity 0.35s var(--ease-soft-close);
}

/* Liquid Progress Handle */
.progress-handle {
    /* Base styles assumed existing */
    transform: translate(-50%, -50%) scale(0.6);
    /* Small idle state */
    opacity: 0;
    transition:
        transform 0.5s var(--ease-elastic),
        opacity 0.3s var(--ease-drift),
        box-shadow 0.3s var(--ease-luxury);
}

.progress-bar:hover .progress-handle {
    transform: translate(-50%, -50%) scale(1.2);
    /* Magnetic Growth */
    opacity: 1;
    box-shadow: 0 0 15px var(--bone);
    /* Glow */
}

/* Grabbing the liquid */
.progress-handle:active {
    transform: translate(-50%, -50%) scale(0.9);
    /* Compression */
    cursor: grabbing;
}

/* Tools / Branding */
.pb-tools {
    width: 280px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    padding-right: 16px;
    /* Balanced margins - optical spacing from edge */
}

/* === BRANDING (Right Side) === */
.branding-container {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    /* Align to right edge */
    justify-content: center;
    gap: 4px;
    /* Tighter vertical stack */
    padding-left: 0;
    height: auto;
}

.brand-pill {
    font-family: var(--font-display);
    font-size: 0.75rem;
    /* Smaller for better clearance */
    letter-spacing: 0.15em;
    color: var(--bone);
    opacity: 0.9;
    line-height: 1;

    /* Haptic Container */
    padding: 3px 8px;
    /* Tighter padding */
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    backdrop-filter: blur(4px);

    /* Interactive */
    cursor: pointer;
    transition: all 0.3s var(--ease-soft-close);
}

.brand-pill:hover {
    background: rgba(139, 157, 125, 0.15);
    border-color: var(--sage);
    color: var(--sage);
    box-shadow: 0 0 12px var(--sage-glow);
    text-shadow: 0 0 4px var(--sage-glow);
    transform: translateY(-1px);
}

.credit-pill {
    font-family: var(--font-ui);
    font-size: 0.4rem;
    /* Micro size */
    color: var(--bone-dim);
    opacity: 0.7;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1;

    /* Haptic Container */
    padding: 2px 6px;
    /* Very tight padding */
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 3px;
}

.mini-waveform {
    width: 60px;
    height: 30px;
    opacity: 0.5;
}

/* === STATES & ANIMATIONS === */
/* Button Active States */
.ctrl-btn.active {
    color: var(--sage);
    text-shadow: 0 0 8px var(--sage-glow);
}

.ctrl-btn svg {
    transition: transform 0.4s var(--ease-smooth);
}

/* Tumbling Animation (Shuffle) */
.ctrl-btn.tumbling svg {
    animation: tumble 0.4s var(--ease-smooth);
}

@keyframes tumble {
    0% {
        transform: rotateZ(0deg) scale(1);
    }

    50% {
        transform: rotateZ(90deg) scale(0.9);
    }

    100% {
        transform: rotateZ(180deg) scale(1);
    }
}

/* Spinning Animation (Repeat) */
.ctrl-btn.spinning svg {
    animation: spin 0.5s var(--ease-smooth);
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* === REPEAT BUTTON 3-STATE SYSTEM === */

/* Repeat Button Wrapper - Positioned for badge overlay */
.repeat-btn-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Base Icon State - Dim when OFF */
.repeat-btn-wrapper .repeat-icon {
    width: 22px;
    height: 22px;
    opacity: 0.4;
    transition:
        opacity 0.25s var(--ease-smooth),
        transform 0.25s var(--ease-smooth),
        filter 0.25s var(--ease-smooth);
    pointer-events: none;
}

/* State 1: Repeat All - Active with Glow */
.repeat-btn-wrapper.is-active .repeat-icon {
    opacity: 1;
    filter: drop-shadow(0 0 6px var(--sage-glow));
}

/* State 2: Repeat One - Same as active (badge handles differentiation) */
.repeat-btn-wrapper.is-repeat-one .repeat-icon {
    opacity: 1;
    filter: drop-shadow(0 0 8px var(--sage-glow));
}

/* Badge "1" Element - Centered Over Icon, Scales from Center */
.repeat-badge {
    position: absolute;
    /* Centered positioning */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    transform-origin: center center;

    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    font-size: 10px;
    font-weight: 800;
    font-family: var(--font-ui);
    line-height: 16px;
    text-align: center;
    color: var(--bg-dark);
    background: var(--sage);
    border-radius: 8px;
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.5),
        0 0 0 2px rgba(0, 0, 0, 0.3);

    /* Hidden state */
    opacity: 0;
    pointer-events: none;

    /* Soft-close physics for smooth transitions */
    transition:
        opacity 0.35s var(--ease-soft-close),
        transform 0.35s var(--ease-soft-close);
}

/* State 2: Show Badge with Center Pop-in */
.repeat-btn-wrapper.is-repeat-one .repeat-badge {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* Haptic Pulse Feedback Animation - Triggers on state change */
.repeat-btn-wrapper.haptic-pulse .repeat-icon {
    animation: hapticPulse 0.35s var(--ease-soft-close);
}

@keyframes hapticPulse {
    0% {
        transform: scale(1);
    }

    35% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

/* Badge Pop-in Keyframes - Scales from center with overshoot */
@keyframes badgeCenterPop {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0);
    }

    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.25);
    }

    75% {
        transform: translate(-50%, -50%) scale(0.9);
    }

    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Apply pop-in animation when transitioning TO repeat-one */
.repeat-btn-wrapper.is-repeat-one.animate-badge .repeat-badge {
    animation: badgeCenterPop 0.4s var(--ease-soft-close) forwards;
}

/* Override generic ctrl-btn active color for repeat states */
.repeat-btn-wrapper.is-active,
.repeat-btn-wrapper.is-repeat-one {
    color: var(--sage);
}

/* Modal */
.info-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.info-modal.open {
    opacity: 1;
    pointer-events: auto;
}

.info-modal__content {
    width: 400px;
    padding: 40px;
    border-radius: 24px;
    text-align: center;
}

/* Responsive */
@media (max-width: 1000px) {
    .main-view {
        grid-template-columns: 0px 1fr 0px;
    }

    /* Hide mixer on tablet? Or move it. */
    /* For now, just hide sidebars on small screens */
    .mixer-col {
        display: none;
    }
}

/* ═══════════════════════════════════════════════════════════════ */
/* STRICT DEBUG FIXES (Override) */
/* ═══════════════════════════════════════════════════════════════ */

/* Modal Z-Index Fix */
.archive-drawer {
    z-index: 2000 !important;
}

.archive-close {
    z-index: 2005 !important;
}

/* Scroll Font Consistency Fix */
.text-scroll-content {
    display: inline-block;
    padding-right: 48px;
    font-family: inherit !important;
    font-size: inherit !important;
    font-weight: inherit !important;
    color: inherit !important;
    letter-spacing: inherit !important;
    text-transform: inherit !important;

    /* ═══════════════════════════════════════════════════════════════ */
    /* DATA GRID ENGINE v3.0 (Strict Overrides) */
    /* ═══════════════════════════════════════════════════════════════ */

    /* Grid Container - Override previous styles */
    .data-grid-container {
        flex: 1;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        position: relative;
        margin-top: 12px;
    }

    /* Grid Layout Definition */
    .grid-header-row,
    .grid-row {
        display: grid !important;
        /* Art | Title | Artist | Key | BPM | Time | Actions */
        grid-template-columns: 48px 2fr 1.2fr 0.6fr 0.6fr 0.6fr 40px !important;
        gap: 12px !important;
        align-items: center !important;
        padding: 0 24px !important;
    }

    /* Header Styling */
    .grid-header-row {
        height: 44px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        font-family: var(--font-mono);
        font-size: 0.65rem;
        color: var(--bone-ghost);
        letter-spacing: 0.08em;
        position: sticky;
        top: 0;
        z-index: 10;
        backdrop-filter: blur(12px);
        background: rgba(10, 10, 10, 0.4);
    }

    .grid-body {
        flex: 1;
        overflow-y: auto;
        padding-bottom: 80px;
        scrollbar-width: none;
    }

    .grid-body::-webkit-scrollbar {
        display: none;
    }

    /* Grid Row Styling */
    .grid-row {
        height: 64px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.03);
        cursor: pointer;
        transition: background 0.2s ease, transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
        position: relative;
        color: var(--bone);
    }

    .grid-row:hover {
        background: rgba(255, 255, 255, 0.03);
    }

    .grid-row.active {
        background: rgba(139, 157, 125, 0.1);
    }

    /* Cell Styling */
    .grid-art {
        width: 40px;
        height: 40px;
        border-radius: 4px;
        object-fit: cover;
        background: #111;
    }

    .cell-title {
        font-family: var(--font-display);
        font-size: 0.9rem;
        color: var(--bone);
        font-weight: 400;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .active .cell-title {
        color: var(--sage);
    }

    .cell-artist {
        font-family: var(--font-ui);
        font-size: 0.8rem;
        color: var(--bone-dim);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .cell-meta {
        font-family: var(--font-mono);
        font-size: 0.75rem;
        color: var(--bone-ghost);
    }

    .cell-actions {
        display: flex;
        justify-content: flex-end;
    }

    .info-btn {
        width: 28px;
        height: 28px;
        border-radius: 50%;
        border: 1px solid rgba(255, 255, 255, 0.1);
        background: transparent;
        color: var(--bone-dim);
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        opacity: 0;
        transition: all 0.2s;
    }

    .grid-row:hover .info-btn {
        opacity: 1;
    }

    .info-btn:hover {
        background: var(--bone);
        color: #000;
        border-color: var(--bone);
    }

    /* INSPECTOR PANEL */
    .inspector-panel {
        position: absolute;
        top: 0;
        right: 0;
        width: 320px;
        height: 100%;
        background: rgba(15, 15, 15, 0.95);
        backdrop-filter: blur(40px);
        border-left: 1px solid rgba(255, 255, 255, 0.08);
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 50;
        padding: 24px;
        display: flex;
        flex-direction: column;
    }

    .inspector-panel.active {
        transform: translateX(0);
    }

    .inspector-close {
        align-self: flex-end;
        background: transparent;
        border: none;
        color: var(--bone-dim);
        cursor: pointer;
        margin-bottom: 20px;
    }

    .insp-art {
        width: 100%;
        aspect-ratio: 1;
        border-radius: 8px;
        margin-bottom: 20px;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    }

    .insp-title {
        font-family: var(--font-display);
        font-size: 1.5rem;
        color: var(--bone);
        margin-bottom: 4px;
    }

    .insp-artist {
        font-family: var(--font-ui);
        font-size: 1rem;
        color: var(--sage);
        margin-bottom: 24px;
    }

    .insp-specs {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
        margin-bottom: 24px;
        padding-bottom: 24px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .spec-item {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .spec-item .label {
        font-family: var(--font-mono);
        font-size: 0.6rem;
        color: var(--bone-ghost);
    }

    .spec-item .val {
        font-family: var(--font-ui);
        color: var(--bone);
        font-size: 0.9rem;
    }
}

/* ═══════════════════════════════════════════════════════════════ */
/* EMERGENCY LAYOUT FIX (BRUTE FORCE) */
/* ═══════════════════════════════════════════════════════════════ */

/* 1. The Grid Layout */
.track-list-header,
.track-row {
    display: grid !important;
    grid-template-columns: 60px 2fr 1fr 80px 80px 80px !important;
    gap: 16px !important;
    align-items: center !important;
    padding: 0 16px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.track-list-header {
    height: 48px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
    background: rgba(10, 10, 10, 0.9);
    position: sticky;
    top: 0;
    z-index: 10;
}

.track-row {
    height: 72px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition: background 0.2s;
    color: var(--bone);
}

.track-row:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Typography & Cells */
.track-art {
    width: 48px;
    height: 48px;
    border-radius: 4px;
    background: #222;
    object-fit: cover;
}

.track-title {
    font-family: 'Chettavissto', sans-serif !important;
    font-size: 1rem;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-artist {
    font-family: var(--font-ui);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.track-meta {
    font-family: 'Rolide', monospace !important;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
}

/* 2. The Inspector Panel */
#inspector-panel {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    height: 100% !important;
    width: 400px !important;

    background: rgba(10, 10, 10, 0.9) !important;
    backdrop-filter: blur(40px) !important;
    border-left: 1px solid rgba(255, 255, 255, 0.1) !important;
    z-index: 50 !important;

    transform: translateX(100%) !important;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;

    display: flex;
    flex-direction: column;
    padding: 32px;
    box-sizing: border-box;
}

#inspector-panel.active {
    transform: translateX(0%) !important;
}

/* Utility to ensure container relative positioning */
.data-grid-container {
    position: relative !important;
    overflow: hidden !important;
    width: 100%;
    height: 100%;

    /* ═══════════════════════════════════════════════════════════════ */
    /* ANIMATION LOGIC (SLIDE UP) */
    /* ═══════════════════════════════════════════════════════════════ */

    /* Default State (Closed) */
    #archive-drawer {
        display: none;
        /* JS handles this */
        transform: translateY(100%);
        opacity: 0;
        transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1),
            opacity 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);

        /* Ensure it overlays everything */
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        z-index: 2000;
    }

    /* Active State (Open) */
    #archive-drawer.active {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ══════════ AMBIENT LAYERS ══════════ */
.ambient-bg {
    z-index: -2;
}

/* ═══════════════════════════════════════════════════════════════
   10. VERTICAL IDENTITY BLADE ("About")
   ═══════════════════════════════════════════════════════════════ */
.identity-blade {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 60px;
    /* Closed Width */
    z-index: 2000;
    /* Above everything */

    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-right: 1px solid rgba(255, 255, 255, 0.1);

    transition: width 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: width;
    overflow: hidden;
    box-shadow: 10px 0 50px rgba(0, 0, 0, 0.5);
}

.identity-blade.active {
    width: 380px;
    /* Open Width */
    background: rgba(12, 12, 12, 0.9);
    border-right: 1px solid rgba(255, 255, 255, 0.15);
}

/* === SPINE (Closed State) === */
.blade-spine {
    width: 60px;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    /* Hover Glow Effect */
    transition: background 0.3s;
}

.blade-spine:hover {
    background: rgba(255, 255, 255, 0.05);
}

.spine-text {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    /* Read from bottom-up */

    font-family: var(--font-display);
    font-size: 0.7rem;
    letter-spacing: 0.3em;
    color: rgba(255, 255, 255, 0.4);
    white-space: nowrap;

    transition: color 0.3s;
}

.blade-spine:hover .spine-text {
    color: #fff;
}

/* === PANEL (Content) === */
.blade-panel {
    position: absolute;
    top: 0;
    left: 60px;
    /* Offset by spine */
    width: 320px;
    height: 100%;

    display: flex;
    flex-direction: column;
    justify-content: center;

    padding: 0 40px;

    opacity: 0;
    transform: translateX(-20px);
    transition:
        opacity 0.4s ease-out,
        transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    pointer-events: none;
    /* Ignore clicks when closed */
}

.identity-blade.active .blade-panel {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.2s;
    /* Wait for blade to expand a bit */
    pointer-events: auto;
}

/* Typography */
.blade-header {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 400;
    color: #fff;
    margin-bottom: 32px;
    letter-spacing: 0.05em;
    line-height: 1.2;
}

.blade-body p {
    font-family: var(--font-ui);
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 24px;
}

.blade-text-focus {
    color: rgba(255, 255, 255, 0.9);
}

.blade-text-dim {
    color: rgba(255, 255, 255, 0.5);
}

/* List */
.blade-list {
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.list-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--sage);
    margin-bottom: 16px;
    letter-spacing: 0.1em;
}

.works-list {
    list-style: none;
    padding: 0;
}

.works-list li {
    font-family: var(--font-display);
    font-size: 1rem;
    color: #fff;
    margin-bottom: 12px;
    letter-spacing: 0.05em;
}

.works-list .feat {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    margin-left: 6px;
}

.blade-footer {
    position: absolute;
    bottom: 40px;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.2);
    letter-spacing: 0.15em;
}

/* ═══════════════════════════════════════════════════════════════
   TOP-LEFT HUD — "NOW PLAYING" OVERLAY
   ═══════════════════════════════════════════════════════════════ */
#top-left-hud {
    position: fixed;
    top: 30px;
    left: 30px;
    /* 
       EDIT HERE: The '600px' value controls the distance from the right edge.
       Increase this number to make the text stop earlier (more margin).
       Decrease it to let the text go further right.
    */
    max-width: calc(100vw - 600px);
    z-index: 100;

    display: flex;
    flex-direction: column;
    gap: 8px;

    /* Intro Animation */
    opacity: 0;
    animation: softFadeUp 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    animation-delay: 0.6s;
}

.hud-label {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.15em;
    color: var(--bone-ghost);
    text-transform: uppercase;
}

.meta-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 100%;
}

.meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.meta-row.top {
    max-width: 100%;
}

.title-pill {
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 8px 16px;
    max-width: 100%;
    /* Support text-row behavior */
    position: relative;
    overflow: hidden;
}

/* When title-pill IS the text-row */
.title-pill.text-row {
    height: auto;
    min-height: 1.8em;
}

.meta-title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    letter-spacing: 0.05em;
    color: var(--bone);
    font-weight: bold;
    white-space: nowrap;
    display: block;
}

.meta-artist {
    font-family: var(--font-ui);
    font-size: 0.85rem;
    color: var(--bone-dim);
    white-space: nowrap;
}

/* Artist Row Container */
.artist-row {
    margin-left: 2px;
    /* Subtle offset to align below title */
}

.artist-row .text-row {
    height: 1.4em;
}

/* Pills Row */
.pills-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.glass-badge {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.1em;
    color: var(--bone-dim);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

/* ══════════ KINETIC TILT (Physics) ══════════ */
.hero-wrapper {
    perspective: 1200px;
    /* Deep perspective for 3D effect */
}

.artwork-frame {
    transform-style: preserve-3d;
    will-change: transform;
    /* No CSS transition for transform - we use JS physics (Lerp) */
}

/* Ensure the glow follows or enhances the 3D effect */
.artwork-glow {
    transform: translateZ(-20px) scale(0.9);
    /* Push glow behind */
    transition: opacity 0.5s var(--ease-soft-close);
    filter: blur(20px);
}

.artwork-frame:hover .artwork-glow {
    opacity: 0.8;
}

/* ══════════ LEVITATING SCRUBBER (Reworked) ══════════ */
.levitating-scrubber {
    position: relative;
    width: 100%;
    max-width: 600px;
    height: 24px;
    margin: 0 auto 12px;
    cursor: pointer;
    user-select: none;
}

.scrubber-track {
    position: absolute;
    inset: 0;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
}

.scrubber-track canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* Progress Fill */
.track-progress {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--sage) 0%, rgba(174, 203, 158, 0.6) 100%);
    border-radius: 8px 0 0 8px;
    pointer-events: none;
    transition: width 0.05s linear;
}

/* Playhead Knob */
.scrubber-knob {
    position: absolute;
    top: 50%;
    left: 0%;
    transform: translate(-50%, -50%);
    width: 4px;
    height: 16px;
    background: var(--bone);
    border-radius: 2px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
    pointer-events: none;
    transition: left 0.05s linear;
    z-index: 10;
}

/* Hover Tooltip */
.scrubber-tooltip {
    position: absolute;
    top: -32px;
    left: 0%;
    transform: translateX(-50%);
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(8px);
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--bone);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: 20;
}

/* Show tooltip on scrubber hover */
.levitating-scrubber:hover .scrubber-tooltip {
    opacity: 1;
}

/* Hover line indicator */
.levitating-scrubber::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--hover-x, -100%);
    width: 1px;
    background: rgba(255, 255, 255, 0.5);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.levitating-scrubber:hover::after {
    opacity: 1;
}

/* ══════════ TRACK CHANGE ANIMATION ══════════ */
@keyframes trackIntro {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.track-intro {
    animation: trackIntro 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Apply to album art */
.artwork-frame.track-intro {
    animation: trackIntro 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Apply to HUD elements */
#top-left-hud.track-intro .meta-content {
    animation: trackIntro 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.05s;
}