:root {
  color-scheme: dark;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --bg: #07090f;
  --panel: #10131c;
  --panel-border: rgba(255, 255, 255, 0.08);
  --text: #f5f7ff;
  --muted: #9aa2c8;
  --accent: #f44336;
  --accent-soft: rgba(244, 67, 54, 0.15);
  --success: #2ecc71;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top, rgba(244, 67, 54, 0.12), transparent 55%), var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.site-header {
  padding: 3.5rem 1.5rem 1rem;
}

.hero {
  max-width: 960px;
  margin: 0 auto;
}

.page-nav {
  margin-top: 1.75rem;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.page-nav__link {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.9rem;
  padding: 0.4rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.2s ease, color 0.2s ease;
}

.page-nav__link:hover {
  border-color: rgba(255, 255, 255, 0.4);
  color: var(--text);
}

.page-nav__link.is-active {
  border-color: var(--accent);
  color: var(--text);
  background: rgba(244, 67, 54, 0.15);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.8rem;
  color: var(--accent);
  margin: 0 0 0.5rem;
}

h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(2.2rem, 6vw, 3.5rem);
}

.lede {
  font-size: 1.15rem;
  margin: 0 0 0.25rem;
}

.hero-meta {
  color: var(--muted);
  font-size: 1rem;
}

.timezone-note {
  color: var(--muted);
  margin: 0.25rem 0 0;
  font-size: 0.95rem;
}

.creator-picker {
  margin-top: 1.25rem;
}

.creator-picker label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.creator-picker select {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.65rem;
  padding: 0.45rem 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
}

main {
  padding: 0 1.5rem 3rem;
}

.viewer-shell {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.channel-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  padding: 1rem;
}

.channel-tab {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: var(--text);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.channel-tab:hover,
.channel-tab:focus-visible {
  border-color: rgba(255, 255, 255, 0.5);
}

.channel-tab.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.viewer-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: flex-start;
}

.viewer-player {
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
}

.viewer-info {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 1.25rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.viewer-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.viewer-title {
  margin: 0;
  font-size: 1.6rem;
}

.schedule-heading {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.channel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
}

.loading {
  text-align: center;
  padding: 3rem;
  color: var(--muted);
  width: 100%;
}

.channel-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 1.25rem;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
  overflow: hidden;
}

.channel-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  border: 1px solid transparent;
  background: linear-gradient(135deg, rgba(244, 67, 54, 0.18), transparent 60%);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.channel-card:hover::after {
  opacity: 1;
}

.channel-header {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.channel-header h2 {
  margin: 0;
  font-size: 1.4rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  width: fit-content;
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--accent-soft);
  color: var(--accent);
}

.channel-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.player-wrapper {
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
  background: #000;
  aspect-ratio: 16 / 9;
}

.player-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.now-playing h3 {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
}

.now-playing p {
  margin: 0.1rem 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.progress-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 0.4rem;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #ff9800);
  width: 0%;
  transition: width 0.4s ease;
}

.schedule-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.schedule-item {
  display: flex;
  flex-direction: column;
  padding: 0.75rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.schedule-item strong {
  font-size: 0.95rem;
}

.schedule-item span {
  color: var(--muted);
  font-size: 0.85rem;
}

.schedule-item[data-state="now"] {
  border-color: var(--accent);
  background: rgba(244, 67, 54, 0.08);
}

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

.noscript {
  text-align: center;
  padding: 1rem;
}

@media (max-width: 600px) {
  .channel-card {
    padding: 1rem;
  }

  .viewer-layout {
    grid-template-columns: 1fr;
  }

  .channel-tabs {
    flex-direction: column;
  }
}
