:root {
  color-scheme: dark;
  font-family: ui-sans-serif, system-ui, sans-serif;
  background: #0c1118;
  color: #e8edf3;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at top, #243247, #0c1118 55%); }
main { width: min(960px, calc(100% - 2rem)); margin: 0 auto; padding: 3rem 0; }
h1 { margin: .2rem 0 .5rem; font-size: clamp(2rem, 6vw, 4rem); }
.eyebrow { margin: 0; color: #77bdfb; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; }
header > p:last-child { color: #aeb9c7; }
.player-shell { margin-top: 2rem; border: 1px solid #34445a; border-radius: 1rem; overflow: hidden; background: #05080c; box-shadow: 0 1.5rem 4rem #0008; }
video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.status { display: flex; gap: .6rem; align-items: center; min-height: 3rem; padding: .75rem 1rem; }
.status-dot { width: .65rem; height: .65rem; border-radius: 50%; background: #788391; }
.status-dot.live { background: #42d392; box-shadow: 0 0 1rem #42d392; }
.status-dot.error { background: #ff6b6b; }
#latency { margin-left: auto; color: #aeb9c7; }
form { display: grid; grid-template-columns: 1fr 1fr auto auto; gap: 1rem; align-items: end; margin-top: 1.25rem; }
label { display: grid; gap: .4rem; color: #c6d0dc; font-size: .9rem; }
input, button { min-height: 2.8rem; border-radius: .55rem; border: 1px solid #405169; font: inherit; }
input { padding: .6rem .75rem; color: #fff; background: #111923; }
button { padding: .6rem 1rem; cursor: pointer; border-color: #2797f5; background: #1687e5; color: #fff; font-weight: 700; }
button.secondary { border-color: #405169; background: #182230; }
details { margin-top: 1.5rem; color: #aeb9c7; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; padding: 1rem; border-radius: .6rem; background: #080d13; }

html.embedded,
html.embedded body,
html.embedded main {
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #000;
}

html.embedded header,
html.embedded form,
html.embedded details {
  display: none;
}

html.embedded .player-shell {
  position: relative;
  width: 100%;
  height: 100%;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

html.embedded video {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: contain;
}

html.embedded .status {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 760px) { form { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { form { grid-template-columns: 1fr; } }
