:root {
  --bg: #05070d;
  --panel: rgba(13, 18, 31, .86);
  --panel2: #111827;
  --line: rgba(148, 163, 184, .18);
  --text: #f6f8ff;
  --muted: #9aa8c7;
  --brand: #00d4ff;
  --brand2: #7c3aed;
  --ok: #22c55e;
  --bad: #ef4444;
  --warn: #f59e0b;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(0, 212, 255, .08), transparent 34%),
    radial-gradient(circle at 82% 0%, rgba(124, 58, 237, .22), transparent 30%),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Arial, sans-serif;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select {
  font: inherit;
}
button, .btn {
  border: 1px solid var(--line);
  background: #172033;
  color: var(--text);
  min-height: 42px;
  border-radius: 8px;
  padding: 9px 13px;
  font-weight: 800;
  cursor: pointer;
}
button:hover, .btn:hover { filter: brightness(1.12); }
.primary { background: linear-gradient(135deg, var(--brand), var(--brand2)); border: 0; }
.bad { background: rgba(239, 68, 68, .14); color: #fecaca; border-color: rgba(239, 68, 68, .35); }
.ok { background: rgba(34, 197, 94, .14); color: #bbf7d0; border-color: rgba(34, 197, 94, .35); }
.warn { background: rgba(245, 158, 11, .14); color: #fde68a; border-color: rgba(245, 158, 11, .35); }
input, textarea, select {
  width: 100%;
  min-height: 42px;
  color: var(--text);
  background: #080e1b;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 11px;
  outline: none;
}
textarea { min-height: 118px; resize: vertical; font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.shell { width: min(1280px, calc(100% - 28px)); margin: 0 auto; }
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
  background: rgba(5, 7, 13, .72);
  border-bottom: 1px solid var(--line);
}
.navin { min-height: 68px; display: flex; align-items: center; gap: 14px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 950; letter-spacing: .01em; }
.mark {
  width: 38px; height: 38px; border-radius: 8px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  box-shadow: 0 18px 44px rgba(0, 212, 255, .18);
  font-size: 12px;
}
.spacer { flex: 1; }
.hero { min-height: calc(100vh - 68px); display: grid; align-items: center; padding: 46px 0; }
.heroGrid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 28px; align-items: center; }
.eyebrow { color: #9eeaff; font-weight: 900; text-transform: uppercase; font-size: 12px; letter-spacing: .12em; }
h1 { font-size: clamp(38px, 7vw, 78px); line-height: .96; margin: 12px 0 16px; letter-spacing: 0; }
.lead { color: #c9d6ee; font-size: 18px; line-height: 1.6; max-width: 680px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.stage {
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.02)),
    #08101f;
  padding: 14px;
  box-shadow: 0 30px 80px rgba(0,0,0,.38);
}
.fakePlayer { height: 100%; border-radius: 7px; background: #000; overflow: hidden; position: relative; }
.scan { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(0,212,255,.2), rgba(124,58,237,.16)), radial-gradient(circle at 50% 50%, rgba(255,255,255,.2), transparent 12%); }
.playdot { position: absolute; inset: 0; display: grid; place-items: center; font-size: 54px; }
.grid { display: grid; grid-template-columns: 280px 1fr; gap: 14px; padding: 14px 0; }
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.section { padding: 14px; border-bottom: 1px solid var(--line); }
.section:last-child { border-bottom: 0; }
.title { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 950; margin-bottom: 10px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.row > * { flex: 1 1 130px; }
.status {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px;
  color: #dbeafe; background: rgba(255,255,255,.05); font-size: 12px; font-weight: 800;
}
.status.open { color: #bbf7d0; border-color: rgba(34,197,94,.36); }
.status.closed { color: #fecaca; border-color: rgba(239,68,68,.36); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 10px; }
.card {
  min-height: 150px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.logoBox {
  width: 54px; height: 54px; border-radius: 8px;
  display: grid; place-items: center; overflow: hidden;
  background: linear-gradient(135deg, rgba(0,212,255,.18), rgba(124,58,237,.18));
  border: 1px solid var(--line); font-weight: 950;
}
.logoBox img { width: 100%; height: 100%; object-fit: contain; }
.card h3 { margin: 0; font-size: 15px; line-height: 1.2; }
.meta { color: var(--muted); font-size: 12px; }
.pill { display: inline-flex; width: fit-content; padding: 4px 7px; border-radius: 999px; background: #101827; color: #b9c7df; font-size: 11px; font-weight: 900; }
.lock {
  min-height: calc(100vh - 68px);
  display: grid; place-items: center; text-align: center; padding: 24px;
}
.lockBox { max-width: 520px; }
.notice { color: var(--muted); line-height: 1.55; }
.tabs { display: flex; gap: 7px; flex-wrap: wrap; }
.tab.active { background: linear-gradient(135deg, var(--brand), var(--brand2)); border: 0; }
.hidden { display: none !important; }
.playerBody { overflow: hidden; background: #000; }
.playerShell { width: 100vw; height: 100vh; position: relative; background: #000; }
#video, #embedFrame { width: 100%; height: 100%; border: 0; background: #000; object-fit: contain; }
#embedFrame { display: none; }
.playerTop, .playerBottom {
  position: absolute; left: 0; right: 0; z-index: 5;
  padding: 15px;
  background: linear-gradient(180deg, rgba(0,0,0,.82), transparent);
}
.playerBottom { top: auto; bottom: 0; background: linear-gradient(0deg, rgba(0,0,0,.82), transparent); display: flex; gap: 8px; flex-wrap: wrap; align-items: end; }
.playerTitle { font-size: 20px; font-weight: 950; }
.loader { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.32); z-index: 4; text-align: center; }
.guide { line-height: 1.65; color: #dce7fa; }
.guide code { background: #08101f; border: 1px solid var(--line); padding: 2px 5px; border-radius: 5px; }
@media (max-width: 860px) {
  .heroGrid, .grid { grid-template-columns: 1fr; }
  h1 { font-size: 42px; }
  .stage { order: -1; }
}

body.light {
  --bg: #f5f7fb;
  --panel: rgba(255, 255, 255, .88);
  --panel2: #ffffff;
  --line: rgba(15, 23, 42, .12);
  --text: #0f172a;
  --muted: #59667a;
  color-scheme: light;
}
body.theme-ocean { --brand: #00d4ff; --brand2: #2563eb; }
body.theme-royal { --brand: #a78bfa; --brand2: #ec4899; }
body.theme-emerald { --brand: #34d399; --brand2: #06b6d4; }
body.theme-gold { --brand: #f59e0b; --brand2: #ef4444; }
body.light {
  background:
    linear-gradient(180deg, rgba(0, 110, 255, .08), transparent 34%),
    radial-gradient(circle at 82% 0%, rgba(124, 58, 237, .12), transparent 30%),
    var(--bg);
}
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.toolbar select, .toolbar button { width: auto; min-width: 116px; }
.premiumGrid { grid-template-columns: 340px 1fr; }
.panel {
  box-shadow: 0 24px 80px rgba(0,0,0,.18);
}
body.light .panel, body.light .card, body.light .stage {
  box-shadow: 0 22px 70px rgba(15, 23, 42, .08);
}
.card {
  min-height: 172px;
  position: relative;
  overflow: hidden;
}
.card:before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 15% 0%, color-mix(in srgb, var(--brand) 18%, transparent), transparent 36%);
  pointer-events: none;
}
.card > * { position: relative; }
.card .row { margin-top: auto; }
.scheduleList { display: grid; gap: 8px; }
.scheduleItem {
  display: grid;
  grid-template-columns: 1fr 120px 120px auto;
  gap: 8px;
  align-items: center;
}
.playerControls {
  position: absolute;
  right: 14px;
  top: 14px;
  z-index: 8;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  pointer-events: none;
}
.playerControls > * { pointer-events: auto; }
.playerTools {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 8;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto;
  gap: 8px;
  align-items: end;
  pointer-events: none;
}
.playerTools > * { pointer-events: auto; }
.toolPanel {
  display: none;
  max-height: 42vh;
  overflow: auto;
  padding: 10px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 8px;
  background: rgba(3, 7, 18, .84);
  backdrop-filter: blur(14px);
}
.toolPanel.show { display: block; }
.toolPanel label { display: grid; grid-template-columns: 92px 1fr 48px; gap: 8px; align-items: center; margin: 7px 0; font-size: 12px; color: #dbeafe; }
.toolPanel input[type="range"] { min-height: 0; padding: 0; }
.playerTop.embedMode, .playerBottom.embedMode { display: none; }
.embedHint {
  position: absolute;
  left: 14px;
  top: 14px;
  z-index: 7;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,.5);
  color: white;
  font-size: 12px;
  pointer-events: none;
}
@media (max-width: 860px) {
  .premiumGrid { grid-template-columns: 1fr; }
  .scheduleItem { grid-template-columns: 1fr 1fr; }
  .playerTools { grid-template-columns: 1fr; }
  .playerControls { left: 10px; right: 10px; top: 10px; justify-content: center; }
}
