:root {
  --bg: #0b0b0b;
  --fg: #eaeaea;
  --accent: #7dd3fc;
  --boxMin: 120px;
  --boxMax: 220px;
  --moveMs: 900;
  --shuffleSec: 7;
  --pad: 12px;
}

* { box-sizing: border-box; }
html, body {
  height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, Apple Color Emoji, Segoe UI Emoji;
}

/* Gate screen */
.gate {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(1200px 700px at 50% 40%, #121212, #080808 60%, #050505 100%);
  padding: 24px;
  z-index: 9999;
}
.gate-card {
  width: min(560px, 92vw);
  border: 1px solid #1f2937;
  background: #0f0f10;
  border-radius: 18px;
  padding: 28px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,.45);
}
.gate h1 {
  margin: 0 0 8px;
  font-weight: 700;
  letter-spacing: .4px;
}
.gate p {
  margin: 0 0 18px;
  opacity: .85;
  line-height: 1.4;
}
.gate button {
  appearance: none;
  border: 0;
  border-radius: 12px;
  padding: 14px 18px;
  font-weight: 700;
  background: linear-gradient(180deg, #0ea5e9, #0284c7);
  color: white;
  cursor: pointer;
  width: 100%;
  transition: transform .08s ease, filter .2s ease;
}
.gate button:hover { filter: brightness(1.05); }
.gate button:active { transform: translateY(1px) scale(.99); }

/* Stage */
.stage {
  position: fixed;
  inset: 0;
  padding: var(--pad);
  overflow: hidden;
}

/* Video box */
.box {
  position: absolute;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 6px 18px rgba(0,0,0,.35);
  transition: transform var(--moveMs) ease-in-out, width var(--moveMs) ease-in-out, height var(--moveMs) ease-in-out, opacity .4s ease;
  will-change: transform, width, height;
  background: #111;
}
video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* HUD */
.hud {
  position: fixed;
  left: 12px;
  bottom: 10px;
  font-size: 12px;
  opacity: .7;
  user-select: none;
}
.hud button {
  margin-right: 6px;
  font-size: 12px;
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px solid #1f2937;
  background: #0f172a;
  color: var(--fg);
  cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
  .box { transition: none; }
}
