/* ═══════════════════════════════════════════════════════════════
   NOLLATC DOCK (THE CONSTELLATION + LEVITATION)
   Modular Glass Islands // Stabilized Center // Infinite Dynamic
   ═══════════════════════════════════════════════════════════════ */

:root {
    --glass-bg: rgba(15, 15, 17, 0.65);
    --glass-border: rgba(255, 255, 255, 0.08);
    /* Slightly brighter for modules */
    --glass-blur: 24px;
    --module-shadow: 0 24px 48px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 0, 0, 0.2);

    --ease-aerospace: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

    --h-dock: 72px;
}

/* ═══════════════════════════════════════════════════════════════
   0. LEVITATING SCRUBBER V2: "THE LUMEN"
   ═══════════════════════════════════════════════════════════════ */
.levitating-scrubber {
    position: fixed;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    max-width: 90vw;
    height: 48px;
    display: flex;
    align-items: center;
    z-index: 1050;
    /* Animation handled by .reveal-3 in nollatc-player.css */
}

.scrubber-track {
    width: 100%;
    height: 12px;
    /* Thinner */
    position: relative;
    cursor: pointer;
    /* Inset Groove */
    background: rgba(0, 0, 0, 0.4);
    border-radius: 99px;
    /* Fully rounded ends for the bar */
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

/* Base Canvas */
#waveform-canvas {
    width: 100%;
    height: 100%;
    display: block;
    mix-blend-mode: normal;
    opacity: 0.8;
    transition: opacity 0.3s;
}

/* THE TRAIL: Unique Plasma Wake */
.track-progress {
    position: absolute;
    top: 50%;
    /* Center vertically in container */
    left: 0;
    transform: translateY(-50%);
    /* Center match */
    height: 12px;
    /* Match track height */
    width: 0%;
    /* JS updates this */

    background: linear-gradient(90deg,
            rgba(174, 203, 158, 0) 0%,
            rgba(174, 203, 158, 0.4) 50%,
            rgba(174, 203, 158, 0.9) 100%);
    box-shadow: 0 0 16px rgba(174, 203, 158, 0.6);
    /* Stronger, unclipped glow */
    pointer-events: none;
    border-radius: 99px 0 0 99px;
    /* Round start, sharp connect */
    z-index: 1055;
    /* Between track (1050ish) and knob (1060) */

    /* NO TRANSITION on width - Instant lock */
    transition: opacity 0.3s;
}

/* THE KNOB: Micro Pill */
.scrubber-knob {
    position: absolute;
    top: 50%;
    left: 0%;
    transform: translate(-50%, -50%);

    /* Shape Definition: Micro Pill */
    width: 28px;
    height: 14px;
    border-radius: 7px;

    background: #e3e1da;
    /* Bone White */
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);

    pointer-events: none;
    z-index: 1060;

    display: flex;
    align-items: center;
    justify-content: center;

    /* NO TRANSITION on left - Instant lock */
    transition: width 0.3s var(--ease-aerospace);
}

/* TIME CAPSULE */
.knob-time {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.6);

    color: #000;
    font-family: var(--font-mono);
    font-size: 0.5rem;
    /* Micro Font */
    font-weight: 700;

    opacity: 0;
    transition: all 0.2s;
    white-space: nowrap;
}

.levitating-scrubber:hover .scrubber-knob {
    width: 48px;
    /* Expand just enough */
}

.levitating-scrubber:hover .knob-time {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* ═══════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════
   1. MAIN DOCK CONTAINER (The Grid)
   ═══════════════════════════════════════════════════════════════ */
footer.nollatc-dock {
    position: fixed;
    bottom: 32px;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 1800px;
    margin: 0 auto;
    padding: 0 48px;

    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;

    pointer-events: none;
    z-index: 1000;
}

/* ═══════════════════════════════════════════════════════════════
   2. MODULES
   ═══════════════════════════════════════════════════════════════ */
.dock-section {
    pointer-events: auto;
    height: var(--h-dock);
    display: flex;
    align-items: center;
    padding: 0 24px;

    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: 999px;

    box-shadow: var(--module-shadow);
    /* Animation handled by parent .reveal-4 in nollatc-player.css */
}

/* ═══════════════════════════════════════════════════════════════
   9. TOP LEFT HUD
   ═══════════════════════════════════════════════════════════════ */
#top-left-hud {
    position: fixed;
    top: 48px;
    left: 48px;
    z-index: 950;

    display: flex;
    flex-direction: column;
    align-items: flex-start;
    /* Left align */
    gap: 12px;
}

/* Hub Return Button */
.hub-return-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px 8px 10px;

    background: rgba(15, 15, 17, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 99px;

    text-decoration: none;
    cursor: pointer;

    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.hub-return-btn:hover {
    background: rgba(174, 203, 158, 0.12);
    border-color: rgba(174, 203, 158, 0.3);
    transform: translateX(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(174, 203, 158, 0.15);
}

.hub-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(255, 255, 255, 0.06);
    border-radius: 50%;

    transition: all 0.3s ease;
}

.hub-icon svg {
    width: 14px;
    height: 14px;
    fill: rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

.hub-return-btn:hover .hub-icon {
    background: #aecb9e;
    transform: scale(1.1);
}

.hub-return-btn:hover .hub-icon svg {
    fill: #0a0a0a;
}

.hub-label {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.15em;
    color: rgba(255, 255, 255, 0.4);
    transition: color 0.3s ease;
}

.hub-return-btn:hover .hub-label {
    color: #aecb9e;
}

.hud-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    color: rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
    margin-left: 4px;
}

/* LEFT: INFO MODULE (Stacked) */
.meta-section {
    justify-self: end;
    gap: 16px;
    min-width: 220px;
    justify-content: flex-end;
    /* Push content to right edge near controls */
    position: relative;
    /* Anchor for Satellite Pill */
    overflow: visible;
    /* LOC: Allow pill to float out */
}

/* CENTER: COMMAND MODULE */
.controls-section {
    justify-self: center;
    padding: 0 24px;
    gap: 12px;
    z-index: 1010;
}

/* RIGHT: DATA MODULE (Tech Stats) */
.tools-section {
    justify-self: start;
    gap: 16px;
    min-width: 140px;
}


/* ═══════════════════════════════════════════════════════════════
   3. META CONTENT (Title Pill - SATELLITE VARIATION)
   ═══════════════════════════════════════════════════════════════ */
/* Re-style Meta Content for HUD context */
.meta-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    /* Left align now */
    gap: 8px;
}

/* SATELLITE PILL: Floats on Top Edge */
/* Adjusted SATELLITE PILL for HUD */
.title-pill {
    position: relative;
    /* Not absolute anymore, in flow */
    top: auto;
    right: auto;
    left: 0;

    background: rgba(40, 40, 45, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 99px;
    padding: 3px 12px;

    display: inline-flex;
    /* Fit content */
    align-items: center;
    justify-content: center;

    max-width: 360px;
    /* Wider for HUD */
    overflow: hidden;

    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1020;

    transition: all 0.3s var(--ease-aerospace);
}

.title-pill:hover {
    transform: translateY(-2px);
    background: rgba(60, 60, 65, 0.95);
    border-color: #fff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);

    /* Optional: Expand on hover to show full title if needed? */
    /* max-width: 300px; */
}

.meta-title {
    font-family: var(--font-display);
    color: #fff;
    font-size: 0.7rem;
    /* Smaller font */
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;

    white-space: nowrap;
    text-overflow: ellipsis;
    /* Fallback if JS fails */
    overflow: hidden;
    width: 100%;
    text-align: center;
}

/* Top Row is now empty physically since Pill is absolute, but wraps it logically */
/* Top Row is now empty physically since Pill is absolute */


/* Bottom Row (Artist + Badges) needs to be horizontally aligned with the pill's anchor? */
/* Actually, simply vertically centering the Artist in the remaining space looks good. */
.meta-row.bottom {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 0;
    padding-left: 4px;
    /* Align with pill curve */
}

.meta-artist {
    font-family: var(--font-body);
    font-weight: 400;
    color: rgba(255, 255, 255, 0.6);
    /* Brighter artist since it's primary focus in the box */
    font-size: 0.85rem;

    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    max-width: 360px;
    /* Match title width */
    text-align: left;
    /* Left align */
    display: block;
    /* Ensure width is respected */
}

.glass-badge {
    font-family: var(--font-mono);
    font-size: 0.55rem;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.3);
    cursor: help;
    transition: all 0.3s var(--ease-aerospace);
}

.glass-badge:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* ═══════════════════════════════════════════════════════════════
   4. CONTROL BUTTONS
   ═══════════════════════════════════════════════════════════════ */
/* ═══════════════════════════════════════════════════════════════
   4. CONTROL BUTTONS (Luxury Interactions)
   ═══════════════════════════════════════════════════════════════ */
/* Global Transition Easing for Buttons */
:root {
    --ease-luxury: cubic-bezier(0.2, 0.8, 0.2, 1);
}

.control-btn {
    appearance: none;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    position: relative;

    /* Smooth Transition for all animatable props */
    transition:
        transform 0.5s var(--ease-luxury),
        background 0.4s ease,
        opacity 0.4s ease,
        box-shadow 0.5s var(--ease-luxury),
        color 0.3s ease;

    /* Prevent Flex Squashing */
    flex-shrink: 0;
}

.control-btn svg {
    fill: currentColor;
    pointer-events: none;
    transition: transform 0.5s var(--ease-luxury);
    /* Inner icon motion */
}

/* MINI BUTTONS (Shuffle, Repeat, etc) */
.control-btn.mini {
    width: 36px;
    height: 36px;
    opacity: 0.5;
}

.control-btn.mini svg {
    width: 18px;
    height: 18px;
}

.control-btn.mini:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.08);
    /* Subtle glass highlight */
    transform: scale(1.1);
}

.control-btn.mini:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.12);
}

/* SECONDARY BUTTONS (Prev, Next) */
.control-btn.secondary {
    width: 48px;
    height: 48px;
    opacity: 0.8;
}

.control-btn.secondary svg {
    width: 24px;
    height: 24px;
}

.control-btn.secondary:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.15);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.05);
    /* Faint glow */
}

.control-btn.secondary:hover svg {
    transform: scale(1.05);
    /* Slight icon pop */
}

.control-btn.secondary:active {
    transform: scale(0.92);
}

/* PRIMARY BUTTON (Play/Pause) */
.control-btn.primary {
    width: 64px;
    height: 64px;
    background: #e3e1da;
    /* Bone White */
    color: #0a0a0a;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 10;
    /* Lift above others */
}

.control-btn.primary svg {
    width: 28px;
    height: 28px;
    fill: #0a0a0a;
}

.control-btn.primary:hover {
    transform: scale(1.12);
    box-shadow: 0 12px 32px rgba(227, 225, 218, 0.4);
    /* Colored glow matches btn */
}

.control-btn.primary:active {
    transform: scale(0.95);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Play/Pause Toggle Logic */
.icon-pause {
    display: none;
}

.app.playing .icon-play {
    display: none;
}

.app.playing .icon-pause {
    display: block;
}

/* ═══════════════════════════════════════════════════════════════
   TRANSPORT ACTIVE STATES (Shuffle / Repeat)
   ═══════════════════════════════════════════════════════════════ */
.control-btn.is-active {
    opacity: 1;
    color: #aecb9e;
    /* Digital Green */
    background: rgba(174, 203, 158, 0.1);
    box-shadow: 0 0 16px rgba(174, 203, 158, 0.2);
    transform: scale(1.05);
}

.control-btn.is-active svg {
    filter: drop-shadow(0 0 8px rgba(174, 203, 158, 0.6));
}

/* REPEAT SPECIFIC */
.repeat-badge {
    position: absolute;
    /* Anchor to top-right corner explicitly */
    top: 2px;
    right: 2px;
    /* Remove translate logic to prevent jitter */
    left: auto;

    /* Ensure Perfect Circle */
    width: 14px;
    height: 14px;
    border-radius: 50%;

    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 700;
    color: #000;
    background: #aecb9e;

    /* Centering */
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    /* Fix Vertical Align */

    opacity: 0;
    pointer-events: none;
    z-index: 5;

    /* Smooth Pop - Synced with Button */
    transform: scale(0) translateZ(0);
    /* Hardware Accel Base */
    backface-visibility: hidden;
    transform-origin: center center;

    transition:
        transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1),
        opacity 0.4s ease;
}

/* Repeat State 2: One */
.control-btn.is-one .repeat-badge {
    /* Just scale, no movement */
    transform: scale(1) translateZ(0);
    opacity: 1;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

/* SHUFFLE SPECIFIC */
/* Active state handled by generic .control-btn.is-active */


/* ═══════════════════════════════════════════════════════════════
   5. TOOLS /* TECH STATS (Right Tools) */
.tools-section {
    justify-content: flex-end;
    /* Align right */
    gap: 12px;
    position: relative;
    z-index: 100;
    /* Ensure button is clickaable above overlays */
    pointer-events: auto;
}

.tech-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 0.55rem;
    color: rgba(255, 255, 255, 0.4);
    pointer-events: none;
    /* Just display */
}

.expira-badge {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.6rem;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.2);
    margin-left: 4px;
    /* Separation from btn */
}

.tech-val {
    color: rgba(255, 255, 255, 0.6);
}

.tech-delim {
    color: rgba(255, 255, 255, 0.1);
    font-size: 0.8rem;
}

.credit-pill {
    font-family: var(--font-display);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    color: rgba(255, 255, 255, 0.2);
    cursor: default;
    transition: color 0.3s;
}

.credit-pill:hover {
    color: rgba(255, 255, 255, 0.8);
}

/* ═══════════════════════════════════════════════════════════════
   6. GLASS TOOLTIPS
   ═══════════════════════════════════════════════════════════════ */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(8px) scale(0.95);
    margin-bottom: 12px;
    background: rgba(10, 10, 12, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 6px 10px;
    border-radius: 8px;
    font-family: var(--font-ui);
    font-size: 0.7rem;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
    transition: all 0.3s var(--ease-aerospace);
    z-index: 1100;
}

[data-tooltip]:hover::before {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
}

/* ═══════════════════════════════════════════════════════════════
   7. LUXURY OVERLAY (Apple-Style Pristine Reveal)
   ═══════════════════════════════════════════════════════════════ */
#luxury-overlay {
    position: fixed;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    z-index: 900;

    pointer-events: none;
    opacity: 0;
    filter: blur(8px);

    transition:
        opacity 0.4s ease-out,
        transform 0.4s var(--ease-aerospace),
        filter 0.4s ease-out;
}

#luxury-overlay.active {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    filter: blur(0px);
}

/* Dim artwork when overlay shows for better text readability */
.artwork-frame.dimmed img,
.artwork-frame.dimmed {
    filter: brightness(0.35) blur(3px);
}

.artwork-frame,
.artwork-frame img {
    transition: filter 0.4s ease-out;
}

#overlay-title {
    font-family: var(--font-display);
    font-size: 4rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.1;
    text-align: center;
    letter-spacing: -0.02em;
    margin: 0;
    text-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

#overlay-artist {
    font-family: var(--font-body);
    font-size: 1.5rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    letter-spacing: 0.02em;
    margin: 0;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

/* ═══════════════════════════════════════════════════════════════
   8. CONTEXT PILLS (Bottom Row)
   ═══════════════════════════════════════════════════════════════ */
.context-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    padding: 2px 6px;
    margin-left: 8px;
    /* Spacing from artist or previous pill */

    font-family: var(--font-mono);
    font-size: 0.5rem;
    /* Smaller sub-text */
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: help;

    transition: all 0.2s;
}

.context-pill:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
    transform: translateY(-1px);
}

/* Ensure Bottom Row is One Line */
.meta-row.bottom {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    /* Force single line */
    gap: 0;
    /* We handle spacing via margins on pills to control grouping */
}

/* Artist needs margin if pills follow? Or pills have margin-left. */
.meta-artist {
    margin-right: 4px;
}