:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #0d0e12;
  color: #f3f0e8;
}

* { box-sizing: border-box; }

body {
  min-height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 15%, rgba(217, 100, 68, .17), transparent 34rem),
    radial-gradient(circle at 85% 85%, rgba(77, 106, 147, .16), transparent 30rem),
    #0d0e12;
}

.player {
  width: min(100%, 460px);
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 28px;
  background: rgba(24, 25, 31, .83);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .45);
  backdrop-filter: blur(18px);
}

.art {
  position: relative;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  margin-bottom: 30px;
  overflow: hidden;
  border-radius: 20px;
  background: linear-gradient(145deg, #cd6147, #763b40 50%, #282c3a);
}

.album-art {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.art.has-art .album-art { display: block; }
.art.has-art .record { display: none; }

.record {
  width: 68%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: repeating-radial-gradient(circle, #17171b 0 3px, #25252b 4px 5px, #111115 6px 9px);
  box-shadow: 0 18px 30px rgba(0, 0, 0, .36);
}

.playing .record { animation: spin 5s linear infinite; }

.label {
  width: 32%;
  aspect-ratio: 1;
  border: 7px solid #d2a955;
  border-radius: 50%;
  background: #e7c66c;
}

.genre-wrap {
  margin: -6px 0 25px;
  padding: 0;
  border: 0;
}

.genre-wrap legend {
  margin-bottom: 8px;
  padding: 0;
  color: #aaaab3;
  font-size: .72rem;
  font-weight: 750;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.genre-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-height: 145px;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 12px;
  background: #25262d;
}

.genre-option {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  color: #dedbe0;
  font-size: .82rem;
  cursor: pointer;
}

.genre-option span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.genre-option input { flex: 0 0 auto; accent-color: #df8063; }
.select-all { padding: 0 2px 9px; color: #f3f0e8; font-weight: 700; }
.genre-loading { grid-column: 1 / -1; padding: 12px; color: #94949e; font-size: .82rem; }

.eyebrow {
  margin: 0 0 9px;
  color: #df8063;
  font-size: .72rem;
  font-weight: 750;
  letter-spacing: .18em;
}

h1 {
  margin: 0;
  overflow: hidden;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 7vw, 2.55rem);
  font-weight: 500;
  line-height: 1.06;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.artist {
  min-height: 1.35em;
  margin: 8px 0 0;
  overflow: hidden;
  color: #d4a08f;
  font-size: 1rem;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status { min-height: 1.4em; margin: 5px 0 25px; color: #94949e; font-size: .82rem; }

.progress-wrap { display: grid; grid-template-columns: 38px 1fr 38px; gap: 10px; align-items: center; color: #96969f; font-size: .75rem; }

input[type="range"] { width: 100%; accent-color: #df8063; cursor: pointer; }

.volume-wrap {
  display: grid;
  grid-template-columns: 78px 1fr 38px;
  gap: 10px;
  align-items: center;
  margin-top: 17px;
  color: #aaaab3;
  font-size: .78rem;
}

.volume-wrap label { white-space: nowrap; }
.volume-wrap output { text-align: right; font-variant-numeric: tabular-nums; }
#volumeIcon { display: inline-block; width: 24px; color: #df8063; font-weight: 800; }

.controls { display: grid; grid-template-columns: 1.25fr 1fr; gap: 12px; margin-top: 23px; }

button {
  min-height: 52px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 14px;
  background: #25262d;
  color: #f5f2eb;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease;
}

button:hover { transform: translateY(-1px); background: #303139; }
button:active { transform: translateY(1px); }
button:disabled { cursor: wait; opacity: .55; }
button.primary { border-color: transparent; background: #e17254; color: #171318; }
button.primary:hover { background: #ef8263; }
#playIcon { display: inline-block; width: 1.5em; }

@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 440px) {
  body { padding: 12px; }
  .player { padding: 22px; border-radius: 22px; }
  .art { margin-bottom: 24px; }
  .genre-options { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .playing .record { animation: none; }
  button { transition: none; }
}
