:root {
  color-scheme: dark;
  --bg: #070707;
  --panel: #111;
  --soft: #1a1a1a;
  --line: #2a2a2a;
  --text: #f5f5f5;
  --muted: #9e9e9e;
  --danger: #ff3434;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input { font: inherit; }
button { cursor: pointer; }
hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); line-height: 1.5; }

.gate-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at top, #181818 0, #080808 42%, #050505 100%); }
.gate-card { width: min(560px, 100%); text-align: center; padding: 42px 24px; }
.eyebrow { font-size: 13px; letter-spacing: .35em; color: var(--muted); margin-bottom: 18px; }
.gate-card h1 { margin: 0 0 34px; font-size: clamp(36px, 8vw, 68px); line-height: .96; letter-spacing: -.04em; }
.gate-card form { display: grid; gap: 12px; }
.gate-card input { width: 100%; border: 1px solid var(--line); background: #0c0c0c; color: white; border-radius: 14px; padding: 17px 18px; outline: none; text-align: center; }
.gate-card input:focus { border-color: #666; }
.gate-card button, .warning-box button, .admin-card button { border: 0; background: #f2f2f2; color: #050505; border-radius: 12px; padding: 13px 16px; font-weight: 800; letter-spacing: .06em; }
.gate-error { color: #ff6b6b; margin-top: 16px; }

.live-page { min-height: 100vh; padding: 22px; background: #050505; }
.live-shell { width: min(1280px, 100%); margin: 0 auto; }
.live-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.brand { font-weight: 900; letter-spacing: .14em; }
.live-badge { font-size: 13px; font-weight: 800; letter-spacing: .08em; display: flex; gap: 8px; align-items: center; }
.live-badge span { width: 9px; height: 9px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 16px rgba(255,52,52,.8); }
.live-badge.offline { color: #888; }
.live-badge.offline span { background: #777; box-shadow: none; }

.player-wrap { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; border: 1px solid #1e1e1e; border-radius: 18px; overflow: hidden; user-select: none; -webkit-user-select: none; }
.player-wrap video { width: 100%; height: 100%; object-fit: contain; background: #000; display: block; }
.player-wrap.is-warning video { filter: blur(28px) brightness(.35); transform: scale(1.06); }
.warning-layer { position: absolute; inset: 0; display: grid; place-items: center; padding: 22px; background: rgba(0,0,0,.24); z-index: 5; }
.warning-layer[hidden] { display: none; }
.warning-box { max-width: 720px; text-align: center; background: rgba(5,5,5,.78); border: 1px solid rgba(255,255,255,.12); backdrop-filter: blur(12px); border-radius: 20px; padding: clamp(24px, 5vw, 44px); }
.warning-kicker { color: #ff6b6b; letter-spacing: .18em; font-weight: 900; font-size: 13px; }
.warning-box h1 { font-size: clamp(24px, 4vw, 44px); line-height: 1.08; margin: 12px 0 26px; }
.warning-box button { min-width: 210px; }

.paused-overlay { position: absolute; inset: 0; z-index: 4; border: 0; color: white; background: rgba(0,0,0,.82); display: grid; place-content: center; gap: 8px; text-align: center; }
.paused-overlay[hidden] { display: none; }
.paused-overlay strong { font-size: clamp(30px, 6vw, 72px); letter-spacing: -.03em; }
.paused-overlay span { color: #c8c8c8; font-size: 16px; }

.controls { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 12px; padding: 18px; background: linear-gradient(transparent, rgba(0,0,0,.82)); }
.controls button { border: 1px solid rgba(255,255,255,.2); background: rgba(0,0,0,.55); color: white; border-radius: 10px; padding: 10px 13px; font-size: 12px; font-weight: 800; }
.volume-label { margin-left: auto; font-size: 11px; color: #c0c0c0; letter-spacing: .08em; }
#volume { width: min(180px, 24vw); }
.status { min-height: 24px; padding: 10px 3px 0; color: #8e8e8e; font-size: 13px; }
.watermark { position: absolute; z-index: 2; right: 18px; top: 18px; font-size: clamp(10px, 1.4vw, 14px); font-weight: 900; letter-spacing: .08em; color: rgba(255,255,255,.48); text-shadow: 0 1px 5px #000; pointer-events: none; }
.secure-cloak { position: fixed; inset: 0; z-index: 99999; background: #000; color: #fff; display: grid; place-content: center; text-align: center; gap: 8px; }
.secure-cloak[hidden] { display: none; }
.secure-cloak strong { font-size: clamp(38px, 9vw, 100px); letter-spacing: .03em; }
.secure-cloak span { color: #aaa; }

.admin-page { min-height: 100vh; background: #080808; padding: 22px; }
.admin-shell { width: min(1400px, 100%); margin: 0 auto; }
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.admin-head h1 { margin: 0; font-size: clamp(38px, 6vw, 72px); line-height: 1; }
.admin-head .eyebrow { margin-bottom: 8px; }
.admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.admin-card { background: #101010; border: 1px solid #242424; border-radius: 18px; padding: 18px; min-width: 0; }
.admin-card.wide { grid-column: 1 / -1; }
.admin-card h2 { margin: 0 0 16px; }
.admin-preview { width: 100%; aspect-ratio: 16/9; background: #000; border-radius: 12px; overflow: hidden; margin-bottom: 10px; }
.admin-preview video { width: 100%; height: 100%; object-fit: contain; display: block; }
.source-buttons { display: grid; gap: 10px; }
.source-buttons button.active { outline: 2px solid #fff; }
.field-label { display: block; margin: 12px 0 8px; font-size: 13px; color: #bbb; }
.admin-card input[type="file"] { width: 100%; margin-bottom: 10px; }
.admin-card input[type="range"] { width: 100%; }
.toggle-row { display: flex; align-items: center; gap: 10px; line-height: 1.4; }
.ghost { border: 1px solid #333 !important; background: #151515 !important; color: white !important; }
.danger-btn { background: #3b1212 !important; color: #ffb0b0 !important; border: 1px solid #6f2323 !important; }
.sessions { display: grid; gap: 10px; margin-top: 12px; }
.session-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; border-top: 1px solid #242424; padding-top: 10px; }
.session-row small { color: #777; overflow-wrap: anywhere; }

@media (max-width: 760px) {
  .live-page { padding: 10px; }
  .player-wrap { border-radius: 12px; aspect-ratio: 9 / 16; }
  .controls { padding: 12px; gap: 8px; }
  .controls button { padding: 9px 10px; }
  .volume-label { display: none; }
  #volume { width: 90px; margin-left: auto; }
  .admin-page { padding: 10px; }
  .admin-grid { grid-template-columns: 1fr; }
  .admin-card.wide { grid-column: auto; }
  .admin-head { align-items: flex-start; }
  .session-row { align-items: flex-start; flex-direction: column; }
}

@media print {
  html, body, body * { visibility: hidden !important; background: #000 !important; color: #000 !important; }
  body::before { content: ""; visibility: visible !important; position: fixed; inset: 0; background: #000; }
}
