/* ============================================================
   FischMusic — Spotify-style shell, FischRadio design language.
   Light theme only. Hand-written CSS (no build step, no framework).
   ============================================================ */

/* ---------- fonts (self-hosted) ---------- */
@font-face {
  font-family: "Turntablz BB";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/turntablz-regular.woff") format("woff");
}
@font-face {
  font-family: "Turntablz BB";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/turntablz-bold.woff") format("woff");
}
@font-face {
  font-family: "Unbounded";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/unbounded-700.woff2") format("woff2");
}
@font-face {
  font-family: "Golos Text";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/golos-text-400.woff2") format("woff2");
}
@font-face {
  font-family: "Golos Text";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/golos-text-500.woff2") format("woff2");
}

/* ---------- tokens ---------- */
:root {
  --bg: rgb(243, 248, 252);
  --bg-soft: rgb(233, 242, 249);
  --slate-900: #0f172a;
  --slate-700: #334155;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --cyan-600: #0891b2;
  --cyan-500: #06b6d4;
  --cyan-400: #22d3ee;
  --cyan-300: #67e8f9;
  --sky-400: #38bdf8;
  --ring: rgba(15, 23, 42, 0.1);
  --glass: rgba(255, 255, 255, 0.6);
  --shadow-soft: 0 10px 30px -12px rgba(8, 145, 178, 0.28),
    0 4px 12px -8px rgba(8, 145, 178, 0.2);
  --shadow-card: 0 18px 40px -20px rgba(8, 145, 178, 0.45);
  --radius: 24px;
  --sidebar-w: 265px;
  --player-h: 88px;
  --font-body: "Golos Text", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: "Unbounded", "Golos Text", sans-serif;
  --font-logo: "Turntablz BB", "Unbounded", sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--slate-900);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button { font-family: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 700; margin: 0; letter-spacing: -0.01em; }

.ui-label {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--slate-500);
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--ring);
  color: var(--slate-700);
  white-space: nowrap;
}
.pill.accent {
  background: linear-gradient(120deg, var(--sky-400), var(--cyan-300));
  color: #083344;
  border-color: transparent;
}
.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid var(--ring);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

/* ---------- app layout ---------- */
.app {
  position: fixed;
  inset: 0 0 var(--player-h) 0;
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
}
.main {
  position: relative;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 0 40px;
}
.container {
  width: 100%;
  max-width: 80rem; /* max-w-7xl */
  margin: 0 auto;
  padding: 0 16px;
}
@media (min-width: 640px) { .container { padding: 0 24px; } }
@media (min-width: 1024px) { .container { padding: 0 32px; } }

/* ---------- sidebar ---------- */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 12px;
  overflow: hidden;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 14px;
}
.logo-mark {
  position: relative;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--sky-400), var(--cyan-300));
  color: #062b36;
  flex: 0 0 auto;
}
.logo-mark::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 20px;
  background: rgba(34, 211, 238, 0.3);
  filter: blur(14px);
  z-index: -1;
}
.logo-mark svg { width: 24px; height: 24px; }
.logo-text {
  font-family: var(--font-logo);
  font-size: 25px;
  line-height: 1;
  letter-spacing: 0.01em;
}
.logo-fisch { color: var(--slate-900); }
.logo-music { color: var(--cyan-600); }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 14px;
  border-radius: 14px;
  font-weight: 500;
  color: var(--slate-700);
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.nav-item svg { width: 20px; height: 20px; }
.nav-item:hover { background: rgba(6, 182, 212, 0.1); color: var(--slate-900); }
.nav-item.active { background: rgba(6, 182, 212, 0.12); color: var(--cyan-600); font-weight: 500; }

.library {
  margin-top: 10px;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--ring);
  border-radius: 20px;
  overflow: hidden;
}
.library-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 16px 10px;
}
.library-head svg { width: 18px; height: 18px; color: var(--slate-500); }
.library-list {
  list-style: none;
  margin: 0;
  padding: 0 8px 10px;
  overflow-y: auto;
}
.library-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.library-item:hover { background: rgba(6, 182, 212, 0.1); }
.library-item .li-art {
  width: 38px; height: 38px; border-radius: 9px; flex: 0 0 auto;
  object-fit: cover; background: var(--bg-soft);
}
.library-item .li-title { font-size: 14px; font-weight: 500; }
.library-item .li-sub { font-size: 12px; color: var(--slate-500); }

/* ---------- topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: 0;
  border-left: 0;
  border-right: 0;
  border-top: 0;
}
.topbar-nav { display: flex; gap: 8px; }
.icon-btn {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: 999px;
  border: 1px solid var(--ring);
  background: rgba(255, 255, 255, 0.65);
  color: var(--slate-700);
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn:hover { background: rgba(6, 182, 212, 0.1); color: var(--slate-900); transform: scale(1.05); }
.icon-btn:disabled { opacity: 0.35; cursor: not-allowed; transform: none; }
.icon-btn.on { color: var(--cyan-600); border-color: rgba(6, 182, 212, 0.5); }

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  max-width: 420px;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--ring);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.search-box:focus-within {
  border-color: rgba(6, 182, 212, 0.6);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.12);
}
.search-box svg { width: 18px; height: 18px; color: var(--slate-500); }
.search-box input {
  border: 0; outline: 0; background: transparent; flex: 1;
  font-family: inherit; font-size: 14px; color: var(--slate-900);
}
.search-box input::placeholder { color: var(--slate-400); }

/* ---------- view + sections ---------- */
.view { padding-top: 8px; }
.section { margin-top: 34px; }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 16px;
}
.section-head h2 { font-size: 22px; }
.section-head .more {
  font-size: 12px; font-weight: 500; color: var(--cyan-600);
}
.page-title { font-size: 30px; margin-bottom: 6px; }
.page-sub { color: var(--slate-500); font-size: 14px; margin-bottom: 8px; }

/* grids of square cover cards */
.grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 900px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

.card {
  position: relative;
  padding: 14px;
  border-radius: var(--radius);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
  background: rgba(255, 255, 255, 0.75);
}
.card-art {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 18px;
  overflow: hidden;
  background: var(--bg-soft);
  box-shadow: 0 10px 25px -18px rgba(8, 145, 178, 0.6);
}
.card-art img { width: 100%; height: 100%; object-fit: cover; }
.card-title {
  margin-top: 12px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-sub {
  margin-top: 4px;
  font-size: 13px;
  color: var(--slate-500);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-play {
  position: absolute;
  right: 14px;
  bottom: 78px;
  width: 46px; height: 46px;
  border-radius: 999px;
  border: 0;
  display: grid; place-items: center;
  background: linear-gradient(120deg, var(--sky-400), var(--cyan-300));
  color: #062b36;
  box-shadow: 0 12px 24px -8px rgba(8, 145, 178, 0.7);
  opacity: 0;
  transform: translateY(8px) scale(0.9);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.card:hover .card-play { opacity: 1; transform: translateY(0) scale(1); }
.card-play:hover { transform: translateY(-2px) scale(1.05); }
.card-play svg { width: 22px; height: 22px; }

/* horizontal shelf */
.shelf {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 180px;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
}
.shelf::-webkit-scrollbar { height: 8px; }
.shelf::-webkit-scrollbar-thumb { background: rgba(15, 23, 42, 0.15); border-radius: 999px; }

/* ---------- track rows ---------- */
.tracklist { display: flex; flex-direction: column; }
.track-row {
  display: grid;
  grid-template-columns: 30px 56px minmax(0, 1fr) minmax(0, 1fr) 70px;
  align-items: center;
  gap: 14px;
  padding: 8px 12px;
  border-radius: 14px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.track-row:hover { background: rgba(6, 182, 212, 0.1); }
.track-row.playing { background: rgba(6, 182, 212, 0.14); }
.track-row .idx { color: var(--slate-400); font-size: 14px; text-align: center; }
.track-row .tr-art { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; background: var(--bg-soft); }
.tr-main { min-width: 0; }
.tr-title { font-size: 15px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr-artist { font-size: 13px; color: var(--slate-500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr-album { font-size: 13px; color: var(--slate-500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr-time { font-size: 13px; color: var(--slate-500); text-align: right; }
.track-row .bars { display: none; }
.track-row.playing .idx { display: none; }
.track-row.playing .bars { display: flex; justify-content: center; }

/* animated equalizer bars */
.bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 16px; }
.bars i {
  width: 3px;
  background: linear-gradient(180deg, var(--cyan-400), var(--sky-400));
  border-radius: 2px;
  animation: eq 0.9s ease-in-out infinite;
}
.bars i:nth-child(1) { height: 40%; animation-delay: -0.5s; }
.bars i:nth-child(2) { height: 90%; animation-delay: -0.2s; }
.bars i:nth-child(3) { height: 60%; animation-delay: -0.7s; }
.bars i:nth-child(4) { height: 100%; animation-delay: -0.35s; }
@keyframes eq {
  0%, 100% { transform: scaleY(0.4); }
  50% { transform: scaleY(1); }
}

/* ---------- album / artist header ---------- */
.detail-head {
  display: flex;
  gap: 26px;
  align-items: flex-end;
  padding: 22px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.18), rgba(103, 232, 249, 0.12));
  border: 1px solid var(--ring);
  box-shadow: var(--shadow-soft);
}
.detail-art {
  width: 190px; height: 190px; border-radius: 22px; object-fit: cover; flex: 0 0 auto;
  box-shadow: 0 24px 50px -20px rgba(8, 145, 178, 0.7);
  background: var(--bg-soft);
}
.detail-kind { font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--cyan-600); font-weight: 500; }
.detail-title { font-size: 44px; line-height: 1.05; margin: 8px 0; }
.detail-meta { color: var(--slate-500); font-size: 14px; }
.detail-actions { display: flex; gap: 14px; align-items: center; margin-top: 18px; }
.big-play {
  display: inline-flex; align-items: center; gap: 10px;
  border: 0; border-radius: 999px;
  padding: 12px 26px;
  font-family: var(--font-head);
  font-size: 14px;
  background: linear-gradient(120deg, var(--sky-400), var(--cyan-300));
  color: #062b36;
  box-shadow: 0 16px 30px -12px rgba(8, 145, 178, 0.8);
  transition: transform 0.15s ease;
}
.big-play:hover { transform: translateY(-2px) scale(1.03); }
.big-play svg { width: 20px; height: 20px; }

/* ---------- player bar ---------- */
.playerbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: var(--player-h);
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 0 18px;
  border-radius: 0;
  border-left: 0; border-right: 0; border-bottom: 0;
}
.pb-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.pb-art {
  position: relative;
  width: 56px; height: 56px;
  border-radius: 12px;
  overflow: hidden;
  flex: 0 0 auto;
  background: var(--bg-soft);
  box-shadow: 0 10px 22px -14px rgba(8, 145, 178, 0.8);
}
.pb-art img { width: 100%; height: 100%; object-fit: cover; }

/* spinning vinyl disc with repeating-radial-gradient grooves */
.vinyl {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #111827 0 14%, transparent 14%),
    repeating-radial-gradient(circle at center, #0b1220 0 2px, #1e293b 2px 3px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 6px 18px -8px rgba(0, 0, 0, 0.6);
  animation: spin 3.2s linear infinite;
  animation-play-state: paused;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.vinyl.show { opacity: 1; }
.vinyl.spin { animation-play-state: running; }
.vinyl::after {
  content: "";
  position: absolute;
  inset: 42%;
  border-radius: 50%;
  background: linear-gradient(120deg, var(--sky-400), var(--cyan-300));
}
@keyframes spin { to { transform: rotate(360deg); } }

.pb-meta { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pb-title { font-size: 14px; font-weight: 500; max-width: 220px; }
.pb-artist { font-size: 12px; color: var(--slate-500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.pb-center { display: flex; flex-direction: column; align-items: center; gap: 6px; width: min(46vw, 560px); }
.pb-controls { display: flex; align-items: center; gap: 12px; }
.pb-controls .icon-btn { width: 34px; height: 34px; border: 0; background: transparent; }
.pb-controls .icon-btn:hover { background: rgba(6, 182, 212, 0.1); }
.play-btn {
  width: 46px; height: 46px; border-radius: 999px; border: 0;
  display: grid; place-items: center;
  background: linear-gradient(120deg, var(--sky-400), var(--cyan-300));
  color: #062b36;
  box-shadow: 0 12px 26px -10px rgba(8, 145, 178, 0.9);
  transition: transform 0.15s ease;
}
.play-btn:hover { transform: translateY(-1px) scale(1.05); }
.play-btn svg { width: 22px; height: 22px; }

.pb-seek { display: flex; align-items: center; gap: 10px; width: 100%; }
.time { font-size: 11px; color: var(--slate-500); font-variant-numeric: tabular-nums; min-width: 34px; text-align: center; }

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.15);
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--cyan-600);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.18);
  cursor: pointer;
}
input[type="range"]::-moz-range-thumb {
  width: 13px; height: 13px; border: 0; border-radius: 50%;
  background: var(--cyan-600);
  cursor: pointer;
}
.pb-seek input { flex: 1; }
.pb-right { display: flex; align-items: center; gap: 12px; justify-content: flex-end; }
.pb-right .vol-icon { width: 18px; height: 18px; color: var(--slate-500); }
.pb-right input[type="range"] { width: 110px; }

/* ---------- marquee ---------- */
.marquee { overflow: hidden; white-space: nowrap; }
.marquee > span { display: inline-block; }
.marquee.overflowing > span { animation: marquee 10s linear infinite; }
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ---------- states / misc ---------- */
.empty {
  display: grid;
  place-items: center;
  text-align: center;
  padding: 70px 20px;
  color: var(--slate-500);
}
.empty svg { width: 44px; height: 44px; color: var(--slate-400); margin-bottom: 14px; }
.skeleton {
  border-radius: var(--radius);
  background: linear-gradient(100deg, rgba(255,255,255,0.5) 30%, rgba(6,182,212,0.12) 50%, rgba(255,255,255,0.5) 70%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }
.hero {
  padding: 30px 24px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.22), rgba(103, 232, 249, 0.14));
  border: 1px solid var(--ring);
  box-shadow: var(--shadow-soft);
  margin-top: 10px;
}
.hero h1 { font-size: 34px; line-height: 1.1; margin-bottom: 10px; }
.hero p { color: var(--slate-700); margin: 0 0 16px; }
.hero .grad { background: linear-gradient(120deg, var(--sky-400), var(--cyan-300)); -webkit-background-clip: text; background-clip: text; color: transparent; }

.toast {
  position: fixed;
  left: 50%; bottom: calc(var(--player-h) + 20px);
  transform: translate(-50%, 20px);
  background: var(--slate-900);
  color: #fff;
  padding: 11px 18px;
  border-radius: 999px;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 80;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- scrollbars ---------- */
.main::-webkit-scrollbar, .library-list::-webkit-scrollbar { width: 10px; }
.main::-webkit-scrollbar-thumb, .library-list::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.15);
  border-radius: 999px;
  border: 3px solid transparent;
  background-clip: content-box;
}

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  :root { --sidebar-w: 76px; }
  .logo-text, .nav-item span, .library .ui-label, .library-item .li-text { display: none; }
  .nav-item { justify-content: center; }
  .library-item { justify-content: center; }
  .search-box { max-width: none; }
}
@media (max-width: 640px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .detail-head { flex-direction: column; align-items: flex-start; }
  .detail-art { width: 150px; height: 150px; }
  .detail-title { font-size: 32px; }
  .playerbar { grid-template-columns: 1fr auto; }
  .pb-right { display: none; }
  .pb-center { display: none; }
  .track-row { grid-template-columns: 26px 48px minmax(0,1fr) 60px; }
  .tr-album { display: none; }
}
