@font-face { font-family: "Space Mono"; src: url(/fonts/SpaceMono-Bold.ttf) format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Space Mono"; src: url(/fonts/SpaceMono-Regular.ttf) format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url(/fonts/EBGaramond.ttf) format("truetype"); font-weight: 400 800; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url(/fonts/SpaceGrotesk.ttf) format("truetype"); font-weight: 300 700; font-display: swap; }

:root {
  --bg: #0b0b12;
  --fg: #ececf3;
  --accent: #9ab;
  --accent2: #fff;
  --font: "Space Grotesk";
  --muted: color-mix(in srgb, var(--fg) 62%, var(--bg));
  --line: color-mix(in srgb, var(--fg) 14%, transparent);
  --panel: color-mix(in srgb, var(--bg) 70%, transparent);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font), "Space Grotesk", system-ui, sans-serif;
  transition: background-color .8s ease, color .8s ease;
  overflow-x: hidden;
}
a { color: inherit; }

#fx { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
#backdrop {
  position: fixed; inset: -10%; z-index: -1;
  background-size: cover; background-position: center;
  filter: blur(60px) saturate(1.3);
  opacity: .35;
  transition: opacity .8s;
}
header.site, main, footer.site { position: relative; z-index: 1; }

header.site { max-width: 1040px; margin: 0 auto; padding: 24px 16px 0; }
header.site { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.tagline { font-family: "Space Mono", monospace; font-size: 11px; letter-spacing: .08em; color: var(--muted); opacity: .7; }
.wordmark {
  font-family: "Space Mono", monospace; font-weight: 700; font-size: 20px;
  letter-spacing: .3em; text-decoration: none; color: var(--accent);
}

main { max-width: 1040px; margin: 0 auto; padding: 24px 16px 48px; }

/* ------------------------------------------------------------ player */
.player {
  display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 40px;
  align-items: center;
  padding: 28px; border: 1px solid var(--line); border-radius: 18px;
  background: var(--panel);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.art-wrap { position: relative; aspect-ratio: 1; }
#art {
  width: 100%; height: 100%; display: block; object-fit: cover; border-radius: 10px;
  box-shadow: 0 0 0 1px var(--line), 0 20px 60px -10px color-mix(in srgb, var(--accent) 45%, transparent);
  transition: box-shadow .8s;
}
#viz { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 30%; border-radius: 0 0 10px 10px; pointer-events: none; }

.kicker { margin: 0 0 6px; font-family: "Space Mono", monospace; font-size: 13px; letter-spacing: .25em; text-transform: uppercase; color: var(--accent); }
h1 {
  margin: 0; font-size: clamp(30px, 5vw, 54px); line-height: 1.02; font-weight: 700;
  letter-spacing: -.01em; text-wrap: balance;
}
.meta { margin: 10px 0 22px; color: var(--muted); font-family: "Space Mono", monospace; font-size: 13px; }

.transport { display: flex; align-items: center; gap: 10px; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
button svg { width: 22px; height: 22px; fill: currentColor; display: block; }
.icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; color: var(--fg); opacity: .85; }
.icon:hover { opacity: 1; background: var(--line); }
.play {
  width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: var(--bg);
  box-shadow: 0 0 30px -4px var(--accent);
  transition: transform .15s, background-color .8s, box-shadow .8s;
}
.play:hover { transform: scale(1.06); }
.play svg { width: 28px; height: 28px; }
.play .i-pause, .playing .play .i-play { display: none; }
.playing .play .i-pause { display: block; }
.vol { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.muted .wave { display: none; }

input[type=range] {
  -webkit-appearance: none; appearance: none; background: transparent; height: 22px; cursor: pointer;
  --pct: 0%;
}
input[type=range]::-webkit-slider-runnable-track {
  height: 4px; border-radius: 2px;
  background: linear-gradient(to right, var(--accent) var(--pct), var(--line) var(--pct));
}
input[type=range]::-moz-range-track { height: 4px; border-radius: 2px; background: var(--line); }
input[type=range]::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--accent); }
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; margin-top: -5px;
  background: var(--accent2); border: 0;
}
input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--accent2); border: 0; }
#volume { width: 90px; }

.seek { display: flex; align-items: center; gap: 12px; margin-top: 18px; font-family: "Space Mono", monospace; font-size: 12px; color: var(--muted); }
.seek input { flex: 1; min-width: 0; }

.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.btn {
  font-family: "Space Mono", monospace; font-size: 13px; text-decoration: none;
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line);
  color: var(--fg); background: color-mix(in srgb, var(--fg) 5%, transparent);
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn[hidden] { display: none; }

/* ------------------------------------------------------------ lyrics */
.lyrics {
  margin-top: 20px; padding: 24px 28px; border: 1px solid var(--line); border-radius: 18px;
  background: var(--panel); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  columns: 2 280px; column-gap: 40px;
  font-size: 15px; line-height: 1.55;
}
.lyrics p { margin: 0 0 1em; break-inside: avoid; }
.lyrics .tag { display: block; font-family: "Space Mono", monospace; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.lyrics .dir { color: var(--muted); font-style: italic; }

/* ------------------------------------------------------------ list */
.list { margin-top: 36px; }
.list h2 {
  font-family: "Space Mono", monospace; font-size: 13px; letter-spacing: .25em; text-transform: uppercase;
  color: var(--muted); font-weight: 400; margin: 0 0 12px 4px;
}
#tracks { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.row { display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); padding-right: 6px; }
.row:hover { background: color-mix(in srgb, var(--fg) 5%, transparent); }
.row-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; padding: 10px 6px; text-decoration: none; }
.row img { width: 48px; height: 48px; border-radius: 6px; object-fit: cover; flex: none; }
.num { font-family: "Space Mono", monospace; font-size: 12px; color: var(--muted); width: 22px; text-align: right; flex: none; }
.row-title { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dur { font-family: "Space Mono", monospace; font-size: 12px; color: var(--muted); }
.row-dl { display: flex; gap: 6px; }
.row-dl .dl {
  font-family: "Space Mono", monospace; font-size: 11px; text-decoration: none; color: var(--muted);
  padding: 4px 8px; border: 1px solid var(--line); border-radius: 999px;
}
.row-dl .dl:hover { color: var(--accent); border-color: var(--accent); }
.row.current .row-title { color: var(--accent); }

.eq { display: none; gap: 2px; align-items: flex-end; height: 14px; }
.eq i { width: 3px; background: var(--accent); animation: eq 0.9s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -.3s; } .eq i:nth-child(3) { animation-delay: -.6s; }
.playing .row.current .eq { display: flex; }
@keyframes eq { 0%, 100% { height: 3px; } 50% { height: 14px; } }

footer.site {
  max-width: 1040px; margin: 0 auto; padding: 0 16px 40px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  font-family: "Space Mono", monospace; font-size: 12px; color: var(--muted);
}

@media (max-width: 720px) {
  .player { grid-template-columns: 1fr; gap: 22px; padding: 16px; }
  .art-wrap { max-width: 420px; width: 100%; margin: 0 auto; }
  #volume { display: none; }
  .row-main { gap: 10px; }
  .num { display: none; }
  .lyrics { padding: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  #fx { display: none; }
  .eq i { animation: none; height: 10px; }
}
