/* ═══════════════════════════════════════════════════════════════
   VailynBeats — full player
   Same language as the rest of the site: sharp edges, nothing round.
   ═══════════════════════════════════════════════════════════════ */

:root {
  --ink:        #050505;
  --ink-1:      #0b0b0b;
  --ink-2:      #121212;
  --ink-3:      #191919;
  --line:       #242424;
  --line-hi:    #3a3a3a;
  --text:       #f2f2f2;
  --text-dim:   #8e8e8e;
  --text-faint: #5c5c5c;
  --accent:     #ff1e1e;

  --ease:  cubic-bezier(.16,1,.3,1);
  --snap:  cubic-bezier(.2,.8,.2,1);

  --font-display: 'Big Shoulders Display', 'Arial Narrow', sans-serif;
  --font-body: 'Archivo', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; border-radius: 0 !important; }
[hidden] { display: none !important; }

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

body {
  margin: 0;
  min-height: 100svh;
  display: flex; flex-direction: column;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ── Top bar ───────────────────────────────────────────────── */

.bar {
  display: flex; align-items: center; gap: 1rem;
  height: 60px; flex-shrink: 0;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
  border-bottom: 1px solid var(--line);
  background: var(--ink);
}
.bar__mark { font-family: var(--font-display); font-weight: 900; font-size: 1.25rem; line-height: 1; }
.bar__mark-a { color: var(--accent); }
.bar__mark-b { color: var(--text); }
.bar__tag {
  font-size: .62rem; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent); border: 1px solid var(--accent);
  padding: .2rem .5rem;
}
.bar__back {
  margin-left: auto;
  font-size: .72rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-dim);
  border-bottom: 1px solid transparent;
  transition: color .25s, border-color .25s;
}
.bar__back:hover { color: var(--text); border-bottom-color: var(--accent); }

/* ── Stage ─────────────────────────────────────────────────── */

.stage {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  width: min(1180px, 100% - 3rem);
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3rem) 0;
  align-items: start;
}

/* ── Now playing ───────────────────────────────────────────── */

.now { display: grid; gap: 1rem; position: sticky; top: calc(60px + 1.5rem); }

.now__art {
  position: relative;
  aspect-ratio: 1; width: 100%;
  border: 1px solid var(--line);
  background: var(--ink-2);
  display: grid; place-items: center;
  overflow: hidden;
}
.now__art img {
  width: 100%; height: 100%; object-fit: cover;
  animation: artIn .55s var(--ease) both;
}
@keyframes artIn { from { opacity: 0; transform: scale(1.04); } }
.now__art-empty { color: var(--text-faint); }

/* The bars sit over the artwork, low enough not to fight it. */
.now__viz {
  position: absolute; left: 0; right: 0; bottom: 0;
  width: 100%; height: 28%;
  opacity: .5; pointer-events: none;
}

.now__meta { min-width: 0; }
.now__title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800; line-height: 1.05;
  text-transform: uppercase; letter-spacing: -.005em;
  margin: 0 0 .3rem;
  overflow-wrap: anywhere;
}
.now__sub {
  margin: 0; color: var(--text-dim);
  font-size: .82rem; letter-spacing: .04em;
  overflow-wrap: anywhere;
}

/* ── Scrubber ──────────────────────────────────────────────── */

.scrub {
  position: relative; height: 24px;
  display: flex; align-items: center;
  cursor: pointer; touch-action: none;
}
.scrub::before {
  content: ''; position: absolute; left: 0; right: 0; height: 3px;
  background: var(--line-hi);
}
.scrub i { position: absolute; left: 0; height: 3px; width: 0%; background: var(--accent); }
.scrub u {
  position: absolute; left: 0;
  width: 11px; height: 11px; background: #fff;
  transform: translateX(-50%) scale(0);
  transition: transform .2s var(--snap);
}
.scrub:hover u, .scrub:focus-visible u, .scrub.is-held u { transform: translateX(-50%) scale(1); }

.times {
  display: flex; justify-content: space-between;
  margin-top: -.6rem;
  font-size: .72rem; color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

/* ── Transport ─────────────────────────────────────────────── */

.transport {
  display: flex; align-items: center; justify-content: center;
  gap: clamp(.6rem, 2vw, 1.1rem);
  margin-top: .3rem;
}

.ctl {
  position: relative;
  width: 44px; height: 44px; flex-shrink: 0;
  display: grid; place-items: center;
  border: 1px solid transparent;
  color: var(--text-dim);
  transition: color .25s, border-color .25s, background .25s, transform .2s var(--snap);
}
.ctl:hover { color: var(--text); border-color: var(--line-hi); background: var(--ink-2); }
.ctl:active { transform: scale(.93); }
.ctl.is-on { color: var(--accent); border-color: var(--accent); }

.ctl--main {
  width: 58px; height: 58px;
  background: var(--accent); color: #fff; border-color: var(--accent);
}
.ctl--main:hover { background: #fff; color: var(--ink); border-color: #fff; }

/* Both icons share a cell and the class picks one. Never swap these
   with the hidden property: it does nothing on an <svg>. */
.ctl--main .ico-play, .ctl--main .ico-pause {
  grid-area: 1 / 1;
  transition: opacity .18s var(--ease), transform .22s var(--snap);
}
.ctl--main .ico-pause { opacity: 0; transform: scale(.6); }
.ctl--main.is-playing .ico-play { opacity: 0; transform: scale(.6); }
.ctl--main.is-playing .ico-pause { opacity: 1; transform: scale(1); }

.ctl__one {
  position: absolute; right: 5px; bottom: 4px;
  font-size: .56rem; font-weight: 700;
  line-height: 1; color: var(--accent);
}

.ctl--sm { width: 32px; height: 32px; }

/* ── Volume ────────────────────────────────────────────────── */

.volume { display: flex; align-items: center; gap: .6rem; justify-content: center; }
.volume input {
  -webkit-appearance: none; appearance: none;
  width: 140px; height: 3px; background: var(--line-hi); cursor: pointer;
}
.volume input::-webkit-slider-thumb {
  -webkit-appearance: none; width: 11px; height: 11px; background: var(--text);
}
.volume input::-moz-range-thumb { width: 11px; height: 11px; background: var(--text); border: 0; }

/* ── Queue ─────────────────────────────────────────────────── */

.queue { min-width: 0; }

.queue__head {
  display: flex; align-items: baseline; gap: .9rem;
  padding-bottom: .8rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: .2rem;
}
.queue__title {
  font-family: var(--font-display);
  font-size: 1.6rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .01em;
  margin: 0;
}
.queue__count {
  font-size: .68rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--text-faint);
}

.queue__list { display: grid; }

.row {
  position: relative;
  display: grid;
  grid-template-columns: 2rem 44px 1fr auto;
  align-items: center; gap: 1rem;
  padding: .8rem .6rem;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: background .3s var(--ease), padding-left .3s var(--ease);
}
.row::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 2px; background: var(--accent);
  transform: scaleY(0); transform-origin: top;
  transition: transform .35s var(--ease);
}
.row:hover { background: var(--ink-1); padding-left: 1.1rem; }
.row:hover::before { transform: scaleY(1); }
.row.is-current { background: var(--ink-2); padding-left: 1.1rem; }
.row.is-current::before { transform: scaleY(1); }

.row__index {
  font-family: var(--font-display);
  font-size: 1rem; font-weight: 700;
  color: var(--text-faint);
  text-align: center;
}
.row.is-current .row__index { color: var(--accent); }

/* Equalizer replaces the number on the playing row. */
.row__eq { display: none; gap: 2px; align-items: flex-end; height: 13px; justify-content: center; }
.row.is-current.is-playing .row__eq { display: flex; }
.row.is-current.is-playing .row__index { display: none; }
.row__eq i { width: 2px; background: var(--accent); animation: eq .9s ease-in-out infinite; }
.row__eq i:nth-child(1) { height: 60%; animation-delay: 0s; }
.row__eq i:nth-child(2) { height: 100%; animation-delay: .15s; }
.row__eq i:nth-child(3) { height: 45%; animation-delay: .3s; }
@keyframes eq { 0%,100% { transform: scaleY(.35); } 50% { transform: scaleY(1); } }

.row__art {
  width: 44px; height: 44px;
  border: 1px solid var(--line);
  background: var(--ink-2);
  overflow: hidden;
}
.row__art img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(.4);
  transition: filter .35s var(--ease), transform .45s var(--ease);
}
.row:hover .row__art img, .row.is-current .row__art img { filter: none; transform: scale(1.06); }

.row__main { min-width: 0; }
.row__title {
  font-size: .95rem; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.row__sub {
  font-size: .72rem; color: var(--text-faint);
  margin-top: .1rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.row__time {
  font-size: .76rem; color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

.queue__empty {
  padding: 3rem 0; text-align: center;
  color: var(--text-faint); font-size: .82rem;
  letter-spacing: .1em; text-transform: uppercase;
}

/* ── Toasts ────────────────────────────────────────────────── */

.toasts {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 60;
  display: grid; gap: .5rem; justify-items: end; pointer-events: none;
}
.toast {
  background: var(--ink-1); border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  padding: .75rem 1rem; font-size: .8rem; max-width: 320px;
  animation: toastIn .35s var(--ease) both;
}
.toast.is-out { animation: toastOut .3s var(--ease) both; }
@keyframes toastIn  { from { opacity: 0; transform: translateX(16px); } }
@keyframes toastOut { to   { opacity: 0; transform: translateX(16px); } }

/* ── Responsive ────────────────────────────────────────────── */

@media (max-width: 900px) {
  .stage {
    grid-template-columns: 1fr;
    width: min(1180px, 100% - 2rem);
    gap: 2rem;
  }
  /* Nothing to stick to once the columns stack. */
  .now { position: static; }
  .now__art { max-width: 320px; margin: 0 auto; }
  .now__meta { text-align: center; }
  .row { grid-template-columns: 1.6rem 40px 1fr auto; gap: .8rem; }
  .row__art { width: 40px; height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
