:root {
  color-scheme: light dark;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: #0a0f1c;
  color: #ecf2ff;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 15% 0%, rgba(72, 113, 255, 0.2), transparent 36rem),
    #0a0f1c;
}

main {
  width: min(100% - 2rem, 72rem);
  margin-inline: auto;
  padding-block: clamp(2rem, 5vw, 5rem);
}

.masthead {
  max-width: 50rem;
  margin-bottom: 1.5rem;
}

.eyebrow {
  margin: 0 0 0.6rem;
  color: #8eabff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.lede {
  max-width: 44rem;
  margin: 0.9rem 0 0;
  color: #aebbd3;
  font-size: clamp(1rem, 2vw, 1.15rem);
  line-height: 1.6;
}

.player-card {
  overflow: hidden;
  border: 1px solid #283653;
  border-radius: 1rem;
  background: #11192a;
  box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.32);
}

#player {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.status-panel {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-height: 4.5rem;
  padding: 0.9rem 1rem;
  border-top: 1px solid #283653;
}

.status-dot {
  width: 0.7rem;
  height: 0.7rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #7890b7;
  box-shadow: 0 0 0 0.28rem rgba(120, 144, 183, 0.14);
}

.status-panel[data-state="loading"] .status-dot,
.status-panel[data-state="stalled"] .status-dot {
  background: #ffc857;
  box-shadow: 0 0 0 0.28rem rgba(255, 200, 87, 0.14);
}

.status-panel[data-state="playing"] .status-dot {
  background: #42d392;
  box-shadow: 0 0 0 0.28rem rgba(66, 211, 146, 0.14);
}

.status-panel[data-state="error"] .status-dot {
  background: #ff6b7a;
  box-shadow: 0 0 0 0.28rem rgba(255, 107, 122, 0.14);
}

.status-copy {
  min-width: 0;
  flex: 1;
}

#status {
  display: block;
  color: #ecf2ff;
  font-size: 0.95rem;
}

#protocol {
  display: block;
  overflow: hidden;
  margin-top: 0.18rem;
  color: #93a4c1;
  font-size: 0.8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

button {
  appearance: none;
  padding: 0.62rem 0.9rem;
  border: 1px solid #4563a6;
  border-radius: 0.55rem;
  background: #1b2b50;
  color: #eff4ff;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 650;
  cursor: pointer;
}

button:hover {
  background: #263d70;
}

button:focus-visible {
  outline: 3px solid #8eabff;
  outline-offset: 3px;
}

.note,
noscript {
  display: block;
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid #283653;
  border-radius: 0.7rem;
  background: rgba(17, 25, 42, 0.72);
  color: #aebbd3;
  font-size: 0.88rem;
  line-height: 1.5;
}

@media (max-width: 40rem) {
  main {
    width: min(100% - 1rem, 72rem);
    padding-block: 1.25rem;
  }

  .status-panel {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .status-copy {
    width: calc(100% - 1.5rem);
  }

  button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
