* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --background: #0d1117;
  --panel: #161b22;
  --panel-hover: #1f2937;
  --border: #30363d;
  --text: #f0f6fc;
  --muted: #9da7b3;
  --accent: #58a6ff;
  --accent-strong: #79c0ff;
  --success: #3fb950;
  --shadow: 0 14px 34px rgba(0, 0, 0, 0.3);
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top, rgba(88, 166, 255, 0.12), transparent 34rem),
    var(--background);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(13, 17, 23, 0.88);
  backdrop-filter: blur(10px);
}

.header-inner,
.page-shell {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
}

.header-inner {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  padding: 28px 0;
}

.home-link {
  flex: 0 0 auto;
  color: var(--accent);
  text-decoration: none;
  font-weight: bold;
  padding-top: 8px;
}

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

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
}

.site-header p,
.now-playing-panel p {
  color: var(--muted);
  margin-bottom: 0;
}

.page-shell {
  padding: 34px 0 48px;
}

.now-playing-panel {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 420px);
  gap: 28px;
  align-items: center;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.eyebrow {
  display: block;
  margin-bottom: 8px;
  color: var(--success);
  font-size: 0.8rem;
  font-weight: bold;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

audio {
  width: 100%;
}

.controls {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 18px;
  margin: 28px 0 18px;
}

.controls label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: bold;
}

input,
select {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
}

input:focus,
select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.status-message {
  color: var(--muted);
}

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

.station-card {
  display: flex;
  flex-direction: column;
  min-height: 220px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.2);
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.station-card:hover {
  transform: translateY(-3px);
  background: var(--panel-hover);
  border-color: #4b5663;
}

.station-card.playing {
  border-color: var(--success);
}

.station-card h3 {
  margin: 0 0 8px;
  font-size: 1.25rem;
}

.station-meta {
  margin-bottom: 12px;
  color: var(--accent-strong);
  font-size: 0.9rem;
}

.station-description {
  flex: 1;
  color: var(--muted);
  line-height: 1.5;
}

.play-button {
  width: 100%;
  margin-top: 18px;
  padding: 12px 16px;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: #07111d;
  font: inherit;
  font-weight: bold;
  cursor: pointer;
}

.play-button:hover,
.play-button:focus-visible {
  background: var(--accent-strong);
}

.play-button:focus-visible {
  outline: 2px solid white;
  outline-offset: 3px;
}

.empty-message {
  grid-column: 1 / -1;
  padding: 28px;
  border: 1px dashed var(--border);
  border-radius: 14px;
  color: var(--muted);
  text-align: center;
}

footer {
  padding: 24px 16px 34px;
  color: #6e7681;
  text-align: center;
}

@media (max-width: 720px) {
  .header-inner {
    display: block;
  }

  .home-link {
    display: inline-block;
    margin-bottom: 20px;
  }

  .now-playing-panel,
  .controls {
    grid-template-columns: 1fr;
  }

  .page-shell {
    padding-top: 24px;
  }
}
