/* Canal St. — page chrome. The city itself is all canvas. */

:root {
    --ink: #f3ede2;
    --ink-dim: rgba(243, 237, 226, 0.62);
    --line: rgba(243, 237, 226, 0.22);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    height: 100%;
    overflow: hidden;
    background: #05060c;
    color: var(--ink);
    font-family: Geist, system-ui, sans-serif;
}

#scene {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    image-rendering: pixelated;        /* keep the pixels square and crisp */
}


/* ---------------------------------------------------------------- drop veil */

#dropveil {
    position: fixed;
    inset: 12px;
    border: 1.5px dashed rgba(242, 183, 5, 0.8);
    border-radius: 18px;
    background: rgba(5, 6, 14, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.02em;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}
body.dragging #dropveil { opacity: 1; }


/* ---------------------------------------------------------------- player pill */
/* Ink pill at the top center, cream play disc, Holler's blue as the one accent.
   Up there it keeps the street clear. Every change animates both ways: the
   compact pill springs open into the full bar, the scrubber fades in, play/pause
   morph, and the whole pill lifts away when the mouse rests and back when it moves. */

#bar {
    --blue: #2f5fe0;
    --blue-ink: #ffffff;
    --spring: cubic-bezier(0.34, 1.3, 0.64, 1);

    position: fixed;
    left: 50%;
    top: 9px;
    width: 232px;                      /* compact: play, title, new song, fullscreen */
    max-width: calc(100% - 32px);
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 6px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(12, 13, 20, 0.72);
    backdrop-filter: blur(16px);
    overflow: hidden;
    transform: translate(-50%, 0);
    transition:
        width 620ms var(--spring),
        opacity 360ms ease,
        transform 480ms var(--spring);
}
body.has-song #bar { width: min(640px, calc(100% - 32px)); }

/* during the intro the pill waits above the screen, then springs in */
body.intro #bar { opacity: 0; transform: translate(-50%, -14px) scale(0.97); pointer-events: none; }

/* resting mouse: lift and fade; move it and the pill springs back */
body.has-song.idle #bar { opacity: 0; transform: translate(-50%, -14px) scale(0.97); }
body.idle { cursor: none; }

/* play / pause: a cream disc, same size as the other buttons; icons morph into each other */
#play {
    flex: none;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: var(--ink);
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: transform 200ms var(--spring), background 150ms ease;
}
#play:hover { transform: scale(1.07); background: #fff; }
#play:active { transform: scale(0.92); }
#play svg {
    grid-area: 1 / 1;
    width: 16px;
    height: 16px;
    fill: #0e0f16;
    transition: opacity 180ms ease, transform 260ms var(--spring);
}
#icon-play { opacity: 0; transform: scale(0.4) rotate(-90deg); }
body.paused #icon-play { opacity: 1; transform: none; }
body.paused #icon-pause { opacity: 0; transform: scale(0.4) rotate(90deg); }

/* song title big, artist small */
.title {
    flex: 0 1 auto;
    min-width: 0;
    max-width: 150px;
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}
.title b, .title span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.title b { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }
.title span { font-size: 12px; color: var(--ink-dim); }

/* the scrubber, in blue: squeezed to nothing in the compact pill, fades in as it opens */
.scrub {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 200ms ease, visibility 0s linear 200ms;
}
body.has-song .scrub {
    opacity: 1;
    visibility: visible;
    transition: opacity 360ms ease 260ms, visibility 0s;
}
.scrub input {
    flex: 1;
    min-width: 0;
    height: 4px;
    margin: 0;
    border-radius: 2px;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    /* played part blue, the rest cream; --played is set from main.js */
    background: linear-gradient(to right, var(--blue) var(--played, 0%), rgba(243, 237, 226, 0.85) var(--played, 0%));
}
/* where you are in the song: one solid blue dot */
.scrub input::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 50%;
    background: var(--blue);
}
.scrub input::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 50%;
    background: var(--blue);
}

/* new song: a vinyl record in a blue circle, sitting close to the full screen button */
.new-song {
    flex: none;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    margin-right: -6px;                /* 8px from full screen instead of the bar's 14px */
    border-radius: 50%;
    background: var(--blue);
    cursor: pointer;
    transition: transform 200ms var(--spring), background 150ms ease;
}
.new-song svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: var(--blue-ink);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.new-song:hover { background: #4272f0; transform: scale(1.06); }
.new-song:active { transform: scale(0.95); }

/* full screen, far right */
#fullscreen {
    flex: none;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: background 150ms ease, transform 200ms var(--spring);
}
#fullscreen:hover { background: rgba(255, 255, 255, 0.16); transform: scale(1.06); }
#fullscreen:active { transform: scale(0.92); }
#fullscreen svg {
    grid-area: 1 / 1;
    width: 16px;
    height: 16px;
    fill: none;
    stroke: var(--ink);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: opacity 180ms ease, transform 260ms var(--spring);
}
#icon-shrink { opacity: 0; transform: scale(0.5); }
body.full #icon-shrink { opacity: 1; transform: none; }
body.full #icon-grow { opacity: 0; transform: scale(1.5); }

@media (max-width: 600px) {
    .title { max-width: 90px; }
    .new-song { display: none; }
}

/* screenshots */
body.clean #bar { display: none; }
