:root {
  color-scheme: dark;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: #03050a;
  color: #f7fbff;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 85, 0, 0.16), transparent 30%),
    radial-gradient(circle at 80% 22%, rgba(60, 210, 255, 0.18), transparent 33%),
    linear-gradient(130deg, #03050a 0%, #090d15 48%, #020308 100%);
}

button {
  font: inherit;
}

.stage {
  position: relative;
  width: 100vw;
  height: 100dvh;
  min-height: 520px;
  overflow: hidden;
  background: #02040a;
}

.stage::before {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(90deg, rgba(255, 78, 0, 0.2), transparent 24%, transparent 76%, rgba(88, 220, 255, 0.18)),
    radial-gradient(circle at center, transparent 34%, rgba(1, 2, 6, 0.48) 100%);
  mix-blend-mode: screen;
}

.stage::after {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  content: "";
  opacity: 0.42;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 100% 4px, 4px 100%;
}

.camera,
.scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.camera {
  object-fit: cover;
  transform: scaleX(-1);
  filter: contrast(1.14) saturate(0.84) brightness(0.76);
}

.scene {
  z-index: 1;
}

.gate {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 38%, rgba(255, 255, 255, 0.08), transparent 22%),
    linear-gradient(135deg, rgba(4, 5, 11, 0.86), rgba(1, 2, 5, 0.96));
  transition:
    opacity 420ms ease,
    visibility 420ms ease;
}

.gate.is-hidden {
  visibility: hidden;
  opacity: 0;
}

.gate__content {
  width: min(680px, 100%);
  text-align: center;
}

.eyebrow {
  margin: 0 0 10px;
  color: #78e7ff;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1 {
  max-width: 12ch;
  margin: 0 auto;
  font-size: clamp(3.1rem, 8vw, 6.9rem);
  line-height: 0.88;
  letter-spacing: 0;
  text-wrap: balance;
}

.gate p:not(.eyebrow) {
  max-width: 560px;
  margin: 24px auto 0;
  color: rgba(247, 251, 255, 0.78);
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  line-height: 1.6;
}

#startButton {
  min-width: 170px;
  min-height: 48px;
  margin-top: 34px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 6px;
  color: #061018;
  font-weight: 800;
  cursor: pointer;
  background: linear-gradient(135deg, #ff7b2d, #f4f7ff 48%, #5ae7ff);
  box-shadow:
    0 0 32px rgba(255, 102, 0, 0.26),
    0 0 42px rgba(80, 225, 255, 0.2);
}

#startButton:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 4px;
}

.hud {
  position: absolute;
  top: 20px;
  left: 50%;
  z-index: 4;
  display: flex;
  gap: 10px;
  transform: translateX(-50%);
}

.hud__item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: rgba(247, 251, 255, 0.78);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  backdrop-filter: blur(16px);
  background: rgba(5, 7, 14, 0.42);
}

.hud__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.hud__dot--fire {
  background: #ff6b24;
  box-shadow: 0 0 14px #ff6b24;
}

.hud__dot--lightning {
  background: #63e8ff;
  box-shadow: 0 0 14px #63e8ff;
}

.status {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 4;
  max-width: min(420px, calc(100vw - 36px));
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: rgba(247, 251, 255, 0.76);
  font-size: 0.86rem;
  backdrop-filter: blur(16px);
  background: rgba(4, 6, 12, 0.54);
}

@media (max-width: 720px) {
  .stage {
    min-height: 100dvh;
  }

  .hud {
    top: 12px;
    width: calc(100% - 24px);
    justify-content: center;
    flex-wrap: wrap;
  }

  .hud__item {
    flex: 1 1 150px;
    justify-content: center;
  }

  .status {
    right: 12px;
    bottom: 12px;
    left: 12px;
  }
}
