:root {
  --bg: #04121a;
  --accent: #ff7a59;
  --accent-2: #43d9c4;
  --text: #eaf6ff;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overflow: hidden;
}

/* The live feed (go2rtc <video-stream> web component) fills the screen */
#feed {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 40%, #0b2a3a, #04121a 70%);
}
#feed video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Hide the native video controls (play/pause/volume/fullscreen) that appear on
   hover — they're useless for a live feed and overlap the music controls */
#feed video::-webkit-media-controls,
#feed video::-webkit-media-controls-enclosure,
#feed video::-webkit-media-controls-panel { display: none !important; }
/* Hide go2rtc's built-in RTC/MSE/MJPEG badge + status text */
#feed .info { display: none !important; }

/* Soft darkening at the edges so text stays readable */
.vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0,0,0,.55), transparent 22%, transparent 78%, rgba(0,0,0,.6));
}

/* ── Top bar ── */
.bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  z-index: 5;
}

.brand {
  font-weight: 700;
  font-size: 20px;
  letter-spacing: .3px;
  text-shadow: 0 2px 12px rgba(0,0,0,.7);
}
.brand span { vertical-align: middle; }

.status {
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.12);
}
.status[data-state="live"]       { color: #6dffb0; }
.status[data-state="connecting"] { color: #ffd36d; }
.status[data-state="offline"]    { color: #ffd36d; }
.status[data-state="error"]      { color: #ff8f8f; }

/* ── Bottom controls ── */
.controls {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  z-index: 5;
}

.btn {
  font-size: 20px;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(6px);
  color: var(--text);
  cursor: pointer;
  transition: transform .12s ease, background .2s ease;
}
.btn:hover { transform: scale(1.06); background: rgba(0,0,0,.6); }

.volume {
  width: 140px;
  accent-color: var(--accent);
}

.track {
  font-size: 13px;
  opacity: .85;
  text-shadow: 0 1px 8px rgba(0,0,0,.8);
}

/* ── Error card (only shown if the stream can't load) ── */
.error {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: rgba(4,18,26,.9);
  backdrop-filter: blur(4px);
  padding: 20px;
}
.error.hidden { display: none; }
.error-card {
  max-width: 460px;
  text-align: center;
  padding: 30px 34px;
  border-radius: 18px;
  background: rgba(40,12,12,.6);
  border: 1px solid rgba(255,120,120,.25);
}
.error-emoji { font-size: 44px; }
.error-text { line-height: 1.5; opacity: .92; }
.error-text code {
  background: rgba(255,255,255,.12);
  padding: 1px 6px;
  border-radius: 5px;
  font-size: .92em;
}

@media (max-width: 480px) {
  .volume { width: 100px; }
  .brand { font-size: 17px; }
}
