:root {
  color-scheme: dark;
  --bg: #07090d;
  --panel: #10151c;
  --panel-strong: #151c25;
  --line: #2a3543;
  --text: #f2f5f8;
  --muted: #9aa6b5;
  --green: #1db954;
  --red: #d95767;
  --amber: #d2a648;
  --shadow: rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  letter-spacing: 0;
  background: linear-gradient(135deg, #07090d 0%, #10151c 52%, #080a0f 100%);
  color: var(--text);
}

button {
  border: 0;
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  min-height: 44px;
  padding: 0 18px;
  transition:
    opacity 150ms ease,
    transform 150ms ease,
    background 150ms ease;
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.shell {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: 100vh;
  padding: 28px;
}

.radio-panel {
  background: color-mix(in srgb, var(--panel) 94%, black);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 80px var(--shadow);
  max-width: 960px;
  overflow: hidden;
  padding: 28px;
  position: relative;
  width: min(100%, 960px);
}

.topline,
.footer-line {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 0.88rem;
  gap: 10px;
  justify-content: space-between;
  min-height: 32px;
}

.signal-dot {
  background: var(--green);
  border-radius: 999px;
  box-shadow: 0 0 22px rgba(29, 185, 84, 0.8);
  display: inline-block;
  height: 10px;
  width: 10px;
}

.hero {
  align-items: end;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 20px;
  justify-content: space-between;
  margin: 16px 0 24px;
  padding-bottom: 24px;
}

.eyebrow {
  color: var(--red);
  font-size: 0.8rem;
  font-weight: 700;
  margin: 0 0 8px;
  text-transform: uppercase;
}

h1 {
  font-size: 3rem;
  line-height: 1;
  margin: 0;
}

.subtitle {
  color: var(--muted);
  font-size: 1.05rem;
  margin: 10px 0 0;
}

.status-pill {
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.86rem;
  min-width: 92px;
  padding: 8px 12px;
  text-align: center;
}

.state-panel {
  align-items: start;
  display: grid;
  gap: 18px;
  min-height: 220px;
  place-content: center start;
}

.state-copy {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
  margin: 0;
  max-width: 560px;
}

.player-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: 220px minmax(0, 1fr);
}

.cover-wrap {
  aspect-ratio: 1;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  width: 220px;
}

.album-cover,
.cover-fallback {
  height: 100%;
  width: 100%;
}

.album-cover {
  display: block;
  object-fit: cover;
}

.cover-fallback {
  align-items: center;
  color: var(--amber);
  display: flex;
  font-size: 3rem;
  font-weight: 800;
  justify-content: center;
}

.track-area {
  min-width: 0;
}

.label {
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 800;
  margin: 0 0 8px;
  text-transform: uppercase;
}

h2 {
  font-size: 2rem;
  line-height: 1.12;
  margin: 0;
  overflow-wrap: anywhere;
}

.muted,
.album-line {
  color: var(--muted);
  margin: 8px 0 0;
  overflow-wrap: anywhere;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.primary-button {
  background: var(--green);
  color: #031208;
  font-weight: 800;
}

.secondary-button {
  background: var(--panel-strong);
  border: 1px solid var(--line);
}

.accent-button {
  background: var(--red);
  font-weight: 800;
}

.rachel-box {
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 8px;
  grid-column: 1 / -1;
  line-height: 1.55;
  min-height: 110px;
  padding: 18px;
}

.rachel-box p:last-child {
  margin-bottom: 0;
}

.error-box {
  background: rgba(217, 87, 103, 0.16);
  border: 1px solid rgba(217, 87, 103, 0.42);
  border-radius: 8px;
  color: #ffd6dc;
  line-height: 1.45;
  margin-bottom: 18px;
  padding: 12px 14px;
}

.link-button {
  background: transparent;
  color: var(--muted);
  min-height: 34px;
  padding: 0 4px;
  text-decoration: underline;
}

.loader {
  animation: pulse 1.1s ease-in-out infinite;
  background: var(--green);
  border-radius: 999px;
  height: 12px;
  width: 12px;
}

.hidden {
  display: none !important;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.9);
  }
  50% {
    opacity: 1;
    transform: scale(1.15);
  }
}

@media (max-width: 720px) {
  .shell {
    align-items: stretch;
    padding: 14px;
  }

  .radio-panel {
    padding: 20px;
  }

  .hero {
    align-items: start;
    flex-direction: column;
  }

  h1 {
    font-size: 2.45rem;
  }

  .player-grid {
    grid-template-columns: 1fr;
  }

  .cover-wrap {
    max-width: 260px;
    width: 100%;
  }

  .controls {
    display: grid;
    grid-template-columns: 1fr;
  }
}
