:root {
  --bg: #000;
  --panel: rgba(20, 20, 24, 0.86);
  --text: #f2f2f2;
  --muted: #a0a0a8;
  --accent: #e8b04b;
  --error: #ff7a6b;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.4 -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
}

#stage {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
}

#stage.idle { cursor: none; }

#movie {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--bg);
}

#gate {
  position: absolute;
  inset: 0;
  margin: auto;
  width: min(320px, calc(100% - 32px));
  height: fit-content;
  padding: 28px 24px;
  display: grid;
  gap: 10px;
  background: var(--panel);
  border-radius: 14px;
}

#gate h1 { margin: 0 0 8px; font-size: 22px; font-weight: 600; }
#gate label { color: var(--muted); font-size: 14px; }

#gate input,
#gate button,
#play {
  font: inherit;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #3a3a42;
  background: #111114;
  color: var(--text);
}

#gate button,
#play {
  background: var(--accent);
  border-color: var(--accent);
  color: #1a1206;
  font-weight: 600;
  cursor: pointer;
}

#gate-error { margin: 0; min-height: 1.4em; color: var(--error); font-size: 14px; }

#status {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  padding: 12px 20px;
  background: var(--panel);
  border-radius: 10px;
  font-size: 18px;
}

#play {
  position: absolute;
  left: 50%;
  top: calc(50% + 56px);
  transform: translateX(-50%);
}

#controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
  transition: opacity 0.3s;
}

#controls label { color: var(--muted); font-size: 14px; }
#controls input { width: 160px; accent-color: var(--accent); }

#controls button {
  margin-left: auto;
  font: inherit;
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid #55555e;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

#stage.idle #controls { opacity: 0; }
[hidden] { display: none !important; }
