* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; background: #000; overflow: hidden;
  font-family: "Segoe UI", system-ui, sans-serif; }
#stage { position: fixed; inset: 0; background: #000; cursor: default; }
#stage.hide-cursor { cursor: none; }
video { position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; background: #000; }
video.front { z-index: 2; } video.back { z-index: 1; visibility: hidden; }
#vT { z-index: 0; visibility: hidden; }
#vT.front { z-index: 4; }
#freeze { position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: 3; filter: blur(28px) brightness(0.35); object-fit: cover; }

/* #frame tracks the displayed video rectangle (object-fit: contain math)
   so broadcast overlays sit ON the picture, not in the letterbox bars. */
#frame { position: absolute; inset: 0; z-index: 8; pointer-events: none;
  transition: opacity 0.3s; }

#live-dot { position: absolute; top: 14px; left: 16px; z-index: 10;
  transition: opacity 0.8s;
  color: rgba(255,255,255,0.55); font-size: 11px; letter-spacing: 2px;
  font-weight: 600; padding: 3px 8px 3px 18px; user-select: none; }
#live-dot::before { content: ""; position: absolute; left: 4px; top: 50%;
  transform: translateY(-50%); width: 7px; height: 7px; border-radius: 50%;
  background: rgba(220,50,50,0.75); }

#bug { position: absolute; right: 18px; bottom: 20px; z-index: 9;
  color: rgba(255,255,255,0.5); font-weight: 700; font-size: 15px;
  letter-spacing: 3px; padding: 3px 7px;
  border: 1px solid rgba(255,255,255,0.35); border-radius: 2px;
  user-select: none; pointer-events: none;
  transition: opacity 1.4s; opacity: 0.55; }
#bug.faded { opacity: 0; }
#bug.lower-left { right: auto; left: 26px; }

#tvma { position: absolute; top: 16px; right: 20px; z-index: 11;
  pointer-events: none; transition: opacity 0.8s; }
#tvma.upper-left { right: auto; left: 16px; }
/* Authentic TV Parental Guidelines badge: black rounded square, small "TV"
   stacked over large "MA". */
#tvma .tvma-box { display: inline-flex; flex-direction: column;
  align-items: center; justify-content: center;
  width: 72px; height: 72px; background: rgba(0,0,0,0.78); color: #fff;
  border-radius: 8px; font-family: Helvetica, Arial, sans-serif;
  line-height: 1; }
#tvma .tvma-tv { font-size: 15px; font-weight: 700; letter-spacing: 4px;
  margin-bottom: 3px; margin-left: 4px; }
#tvma .tvma-ma { font-size: 34px; font-weight: 700; letter-spacing: 1px; }
#tvma.variant-purple .tvma-box { background: rgba(46,16,58,0.85);
  color: #e6d3f2; box-shadow: 0 0 8px rgba(181,126,220,0.45); }
#tvma.variant-green .tvma-box { background: rgba(10,42,18,0.85);
  color: #d2f2dd; box-shadow: 0 0 8px rgba(111,207,143,0.45); }
#tvma.glitch-in { animation: tvma-glitch 0.45s steps(6) 1; }
@keyframes tvma-glitch {
  0% { transform: translateX(-4px) skewX(-6deg); opacity: 0.2; }
  33% { transform: translateX(3px) skewX(4deg); opacity: 0.7; }
  66% { transform: translateX(-2px); opacity: 0.5; }
  100% { transform: none; opacity: 1; }
}

#controls { position: absolute; left: 0; right: 0; bottom: 0; z-index: 12;
  display: flex; align-items: center; gap: 14px; padding: 14px 22px;
  background: linear-gradient(transparent, rgba(0,0,0,0.55));
  transition: opacity 0.4s; }
#controls.hidden { opacity: 0; pointer-events: none; }
#controls .spacer { flex: 1; }
#clock { color: rgba(255,255,255,0.75); font-size: 13px; letter-spacing: 1px;
  font-variant-numeric: tabular-nums; }
#controls button { background: none; color: rgba(255,255,255,0.85);
  border: none; padding: 8px; cursor: pointer; display: flex;
  align-items: center; border-radius: 50%; }
#controls button:hover { background: rgba(255,255,255,0.15); color: #fff; }
#cc { font-size: 12px; font-weight: 700; letter-spacing: 1px;
  border: 1.5px solid rgba(255,255,255,0.55) !important;
  border-radius: 4px !important; padding: 4px 8px !important;
  opacity: 0.65; }
#cc.cc-on { opacity: 1; background: rgba(255,255,255,0.22); }
video::cue { background: rgba(0,0,0,0.75); color: #fff;
  font-family: "Segoe UI", system-ui, sans-serif;
  text-shadow: 1px 1px 2px #000; }
#mute .ic-sound-off { display: none; }
#mute.is-muted .ic-sound-on { display: none; }
#mute.is-muted .ic-sound-off { display: block; }
#vol { width: 110px; accent-color: #c8c8c8; }

#notice { position: absolute; left: 50%; bottom: 12%; transform: translateX(-50%);
  z-index: 11; transition: opacity 1.2s; pointer-events: none; }
#notice.gone { opacity: 0; }
.notice-inner { background: rgba(0,0,0,0.72); color: #ddd; text-align: center;
  padding: 14px 26px; border-left: 3px solid #888; font-size: 13px; }
.notice-head { font-size: 11px; letter-spacing: 3px; color: #999; margin-bottom: 6px; }

/* Facebook-style unmute pill: dark rounded pill, speaker-off icon, one
   click anywhere on the page unmutes. */
#tap-sound { position: absolute; left: 50%; bottom: 9%;
  transform: translateX(-50%); z-index: 13;
  display: flex; align-items: center; gap: 9px;
  background: rgba(20,20,20,0.85); color: #fff;
  font-size: 14px; font-weight: 600;
  padding: 11px 18px; border-radius: 24px; cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,0.45); user-select: none; }
#tap-sound svg { flex: 0 0 auto; }

#still, #reconnect, #offair { position: absolute; inset: 0; z-index: 20;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.55); }
.hidden { display: none !important; }
.panel { background: #101010; border: 1px solid #2c2c2c; padding: 34px 48px;
  text-align: center; color: #ddd; }
.panel-head { font-size: 15px; letter-spacing: 4px; margin-bottom: 12px; }
.panel-sub { font-size: 12px; color: #888; margin-bottom: 16px; }
.panel .row { display: flex; gap: 14px; justify-content: center; }
.panel button { background: #1c1c1c; color: #eee; border: 1px solid #3a3a3a;
  padding: 10px 26px; font-size: 12px; letter-spacing: 2px; cursor: pointer; }
.panel button:hover { background: #2a2a2a; }
#still-count { font-size: 34px; font-variant-numeric: tabular-nums;
  margin-bottom: 16px; color: #fff; }
