/* News Channel POC: calm, high-contrast pages for older viewers.
   Phone pages scale from 20px; the TV page scales with the screen width (10-foot view). */

:root {
  --bg: #0b1f3a;
  --panel: #13294b;
  --text: #ffffff;
  --muted: #c9d4e5;
  --accent: #ffd35c;
  --good: #8fe3a8;
  --warn: #ffb4a2;
  --line: #2c4a78;
  --radius: 14px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { font-size: 20px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "DejaVu Sans", sans-serif;
  line-height: 1.5;
}

main { max-width: 34rem; margin: 0 auto; padding: 1.25rem 1rem 3rem; }

h1 { font-size: 1.6rem; line-height: 1.2; margin: 0.5rem 0 1rem; }
h2 { font-size: 1.2rem; margin: 1.75rem 0 0.5rem; }
p { margin: 0.5rem 0 1rem; }
.muted { color: var(--muted); }

.station { font-weight: 700; letter-spacing: 0.02em; color: var(--accent); }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  margin: 1rem 0;
}

.status-good { color: var(--good); font-weight: 700; }
.status-warn { color: var(--warn); font-weight: 700; }

button, .button {
  display: block;
  width: 100%;
  min-height: 3rem;
  margin: 0.75rem 0;
  padding: 0.6rem 1rem;
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent);
  color: #10213d;
  font: inherit;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

button.secondary, .button.secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}

button:disabled { opacity: 0.5; cursor: default; }

:focus-visible { outline: 5px solid var(--accent); outline-offset: 4px; }

label { display: block; font-weight: 700; margin: 1rem 0 0.25rem; }

input {
  width: 100%;
  min-height: 3rem;
  padding: 0.5rem 0.75rem;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: #0e2344;
  color: var(--text);
  font: inherit;
  font-size: 1.5rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.devices { list-style: none; padding: 0; margin: 0; }
.devices li {
  display: flex; gap: 0.75rem; align-items: center; justify-content: space-between;
  padding: 0.6rem 0; border-bottom: 1px solid var(--line);
}
.devices li button { width: auto; margin: 0; min-height: 2.5rem; }

.message { min-height: 1.5rem; }

footer { margin-top: 2.5rem; font-size: 0.85rem; color: var(--muted); }

[hidden] { display: none !important; }

/* ---- TV page ------------------------------------------------------------------------- */

body.tv {
  font-size: clamp(18px, 2.1vw, 64px);
  overflow: hidden;
  height: 100vh;
  cursor: none;
}

.tv .screen {
  position: fixed; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 4vh 6vw; text-align: center;
}

.tv h1 { font-size: 2.2em; margin: 0 0 0.4em; }
.tv p { font-size: 1.15em; max-width: 40em; margin: 0.3em auto; }

.pair-layout { display: flex; gap: 6vw; align-items: center; justify-content: center; }
.pair-code {
  font-size: 4.2em; font-weight: 800; letter-spacing: 0.12em;
  color: var(--accent); margin: 0.2em 0; font-variant-numeric: tabular-nums;
}
.qr { background: #fff; padding: 1.2vw; border-radius: var(--radius); line-height: 0; }
.qr img { width: 22vw; height: 22vw; image-rendering: pixelated; }
.site-address { font-weight: 700; color: var(--text); word-break: break-all; }

.tv button { width: auto; min-width: 14em; font-size: 0.9em; margin: 1.2em auto 0; }

#player { padding: 0; background: #000; }
#player video { width: 100vw; height: 100vh; object-fit: contain; background: #000; }

.overlay {
  position: fixed; left: 50%; bottom: 8vh; transform: translateX(-50%);
  background: rgba(11, 31, 58, 0.92); border: 2px solid var(--line);
  border-radius: var(--radius); padding: 1em 1.6em; text-align: center; max-width: 80vw;
}
.overlay p { margin: 0.2em 0; }
.overlay button { margin-top: 0.6em; }
