:root {
  --bg: #07090d;
  --bg-card: #11151d;
  --border: #252b36;
  --text: #f1f3f6;
  --muted: #9aa3b2;
  --accent: #ff8a2b;
  --accent-hover: #ff9d4d;
  --online: #3ddc84;
  --offline: #ff6b6b;
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-width: 0;
}

body {
  min-height: 100vh;
  background: radial-gradient(circle at 50% -10%, rgba(255, 138, 43, 0.08), transparent 45%), var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
}

.wrap {
  width: min(1060px, 100%);
  margin: 0 auto;
  padding: 48px 24px 36px;
}

.hero {
  max-width: 680px;
  margin-bottom: 26px;
}

.back-link {
  display: inline-block;
  margin-bottom: 30px;
  color: var(--muted);
  font-size: 0.9rem;
  text-decoration: none;
}

.back-link:hover,
.back-link:focus-visible {
  color: var(--accent);
}

.eyebrow {
  display: block;
  margin-bottom: 8px;
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 10px;
  font-size: clamp(2rem, 6vw, 3.3rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.hero p,
.summary,
.station-description,
.meta-label,
.site-footer,
.loading {
  color: var(--muted);
}

.hero p {
  margin: 0;
  font-size: 1.02rem;
}

.summary {
  margin-bottom: 18px;
  font-size: 0.9rem;
}

.station-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
}

.station-card {
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.station-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.station-name {
  margin: 0;
  font-size: 1.25rem;
}

.status-badge {
  flex: 0 0 auto;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.status-badge[data-online="true"] {
  color: var(--online);
  background: rgba(61, 220, 132, 0.12);
}

.status-badge[data-online="false"] {
  color: var(--offline);
  background: rgba(255, 107, 107, 0.12);
}

.station-description {
  min-height: 3em;
  margin: 10px 0 20px;
  font-size: 0.9rem;
}

.now-playing {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
  padding: 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.artwork {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  object-fit: cover;
  background: #1b202a;
}

.artwork.is-hidden {
  visibility: hidden;
}

.meta-label {
  display: block;
  margin-bottom: 3px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.song-title,
.song-artist {
  overflow-wrap: anywhere;
}

.song-title {
  font-weight: 700;
}

.song-artist {
  color: var(--muted);
  font-size: 0.88rem;
}

.station-stats {
  display: flex;
  gap: 18px;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.85rem;
}

.station-stats strong {
  color: var(--text);
}

audio {
  display: block;
  width: 100%;
  margin-bottom: 14px;
}

.station-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.play-button,
.stream-link {
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 8px;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
}

.play-button {
  border: 0;
  background: var(--accent);
  color: #090909;
  cursor: pointer;
}

.play-button:hover {
  background: var(--accent-hover);
}

.play-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.stream-link {
  border: 1px solid var(--border);
  color: var(--text);
}

.error-message {
  padding: 18px;
  border: 1px solid rgba(255, 107, 107, 0.35);
  border-radius: var(--radius);
  color: #ffb0b0;
}

.site-footer {
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  text-align: center;
}

@media (max-width: 560px) {
  .wrap {
    padding: 30px 18px 28px;
  }

  .back-link {
    margin-bottom: 24px;
  }

  .station-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .station-card {
    padding: 18px;
  }

  .now-playing {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .artwork {
    width: 58px;
    height: 58px;
  }
}
