:root {
  color-scheme: light;
  --bg-a: #03122a;
  --bg-b: #0a2f73;
  --ink: #e8f1ff;
  --muted: #b8d1f7;
  --brand: #1d8bff;
  --brand-soft: #0c4ea8;
  --panel: rgba(3, 20, 52, 0.7);
  --border: rgba(126, 180, 255, 0.38);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Avenir Next", "Segoe UI", "Trebuchet MS", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 0%, rgba(29, 139, 255, 0.28), transparent 34%),
    radial-gradient(circle at 90% 100%, rgba(10, 47, 115, 0.8), transparent 30%),
    linear-gradient(170deg, var(--bg-a), var(--bg-b));
  display: flex;
  flex-direction: column;
}

.app-shell {
  width: min(880px, 100%);
  margin: 0 auto;
  padding: 1rem 1rem 8rem;
}

.hero {
  background: linear-gradient(160deg, rgba(16, 74, 162, 0.55), rgba(4, 24, 61, 0.7));
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 0.9rem 1rem;
}

.hero h1 {
  margin: 0;
  font-size: clamp(1.45rem, 4vw, 2rem);
  letter-spacing: 0.02em;
}

.hero p {
  margin: 0.4rem 0 0;
  color: var(--muted);
}

.controls {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.6rem;
}

.controls input,
.controls button {
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 1rem;
  padding: 0.65rem 0.8rem;
}

.controls input {
  background: rgba(6, 28, 70, 0.75);
  color: var(--ink);
}

.controls input::placeholder {
  color: #9dc3ff;
}

.controls button {
  background: linear-gradient(135deg, #2a9dff, #1768d0);
  color: #eff7ff;
  border-color: transparent;
  font-weight: 700;
}

.status {
  margin-top: 0.85rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.shows {
  margin-top: 0.7rem;
  display: grid;
  gap: 0.8rem;
}

.stream-group {
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 16px;
  overflow: hidden;
}

.stream-header {
  list-style: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: minmax(110px, 36%) 1fr;
  align-items: stretch;
  min-height: 92px;
}

.stream-header::-webkit-details-marker {
  display: none;
}

.stream-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: rgba(8, 43, 103, 0.9);
}

.stream-title-wrap {
  padding: 0.7rem 0.85rem;
  display: grid;
  align-content: center;
  gap: 0.35rem;
}

.stream-title {
  margin: 0;
  font-size: clamp(1rem, 2.8vw, 1.25rem);
}

.stream-count {
  color: var(--muted);
  font-size: 0.88rem;
}

.recording-list {
  margin: 0;
  padding: 0.35rem 0.55rem 0.75rem 2.1rem;
}

.recording-list li {
  margin: 0.4rem 0;
  color: #97bfff;
}

.show {
  width: 100%;
  border: 1px solid rgba(132, 185, 255, 0.25);
  background: rgba(5, 28, 72, 0.72);
  border-radius: 12px;
  padding: 0.62rem 0.7rem;
  text-align: left;
  color: inherit;
}

.show-title {
  display: block;
  font-weight: 700;
  word-break: break-word;
}

.show-meta {
  display: block;
  margin-top: 0.18rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.player-panel {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(2, 16, 44, 0.94);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--border);
  padding: 0.65rem 1rem calc(0.65rem + env(safe-area-inset-bottom));
}

.player-panel audio {
  width: 100%;
  margin-top: 0.42rem;
  filter: hue-rotate(185deg) saturate(1.15);
}

.now-playing {
  font-size: 0.92rem;
  font-weight: 700;
  color: #e4f0ff;
}

@media (max-width: 560px) {
  .stream-header {
    grid-template-columns: 1fr;
  }

  .stream-image {
    max-height: 160px;
  }
}
