@import url("https://fonts.googleapis.com/css2?family=Silkscreen:wght@400;700&family=VT323&display=swap");

:root {
  --desktop: #008080;
  --chrome: #c0c0c0;
  --light: #ffffff;
  --shadow: #808080;
  --dark: #000000;
  --navy: #000080;
  --phosphor: #39ff55;
  --phosphor-dim: #13982b;
}

* { box-sizing: border-box; }

html,
body { min-height: 100%; }

body {
  margin: 0;
  overflow: hidden;
  color: var(--dark);
  background:
    radial-gradient(circle at 78% 18%, rgba(255, 255, 255, 0.08), transparent 22rem),
    linear-gradient(135deg, transparent 0 48%, rgba(0, 0, 0, 0.035) 48% 52%, transparent 52% 100%),
    var(--desktop);
  background-size: auto, 11px 11px, auto;
}

.scanlines {
  position: fixed;
  z-index: 10;
  inset: 0;
  pointer-events: none;
  opacity: 0.24;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.18) 0 1px, transparent 1px 4px);
  mix-blend-mode: multiply;
}

.gate {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: clamp(18px, 5vw, 72px);
}

.window {
  width: min(880px, 100%);
  padding: 3px;
  background: var(--chrome);
  border: 1px solid var(--dark);
  box-shadow:
    inset 2px 2px 0 var(--light),
    inset -2px -2px 0 var(--shadow),
    18px 18px 0 rgba(0, 0, 0, 0.23);
  animation: arrive 650ms steps(7, end) both;
}

.titlebar {
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3px 4px 3px 9px;
  color: var(--light);
  background: linear-gradient(90deg, var(--navy), #1084d0);
  font: 700 13px/1 "Silkscreen", monospace;
}

.controls { display: flex; gap: 3px; }

.controls i {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  color: #111;
  background: var(--chrome);
  box-shadow: inset 1px 1px 0 var(--light), inset -1px -1px 0 #404040;
  font: 700 14px/1 sans-serif;
  font-style: normal;
}

.screen {
  min-height: clamp(330px, 48vw, 500px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(26px, 7vw, 78px);
  background:
    radial-gradient(ellipse at center, rgba(51, 255, 51, 0.09), transparent 62%),
    #030803;
  border: 4px solid var(--chrome);
  box-shadow: inset 2px 2px 0 #404040, inset -2px -2px 0 var(--light);
}

.prompt {
  margin-bottom: 0.4rem;
  color: var(--phosphor-dim);
  font: 20px/1 "VT323", monospace;
  letter-spacing: 0.08em;
}

.cursor { animation: blink 850ms steps(1, end) infinite; }

h1 {
  margin: 0 0 clamp(28px, 5vw, 50px);
  color: var(--phosphor);
  font: 700 clamp(64px, 15vw, 154px)/0.82 "Silkscreen", monospace;
  letter-spacing: -0.075em;
  text-shadow: 0 0 8px rgba(57, 255, 85, 0.8), 5px 5px 0 #0b5c18;
}

.countdown {
  display: grid;
  grid-template-columns: repeat(7, auto);
  align-items: start;
  justify-content: start;
  gap: clamp(4px, 1.4vw, 17px);
  color: var(--phosphor);
  font-family: "VT323", monospace;
}

.countdown div { display: grid; min-width: 2ch; }

.countdown strong,
.countdown > b {
  font: 400 clamp(37px, 7vw, 76px)/0.85 "VT323", monospace;
  text-shadow: 0 0 9px rgba(57, 255, 85, 0.52);
}

.countdown span {
  margin-top: 9px;
  color: var(--phosphor-dim);
  font: 400 clamp(11px, 1.6vw, 16px)/1 "Silkscreen", monospace;
}

.progress {
  height: 19px;
  margin-top: clamp(30px, 6vw, 56px);
  padding: 3px;
  border: 1px solid var(--phosphor-dim);
}

.progress i {
  display: block;
  width: 0;
  height: 100%;
  background: repeating-linear-gradient(90deg, var(--phosphor) 0 13px, transparent 13px 17px);
  transition: width 1s linear;
}

@keyframes arrive {
  from { opacity: 0; transform: translateY(24px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

@keyframes blink { 50% { opacity: 0; } }

@media (max-width: 560px) {
  .gate { padding: 12px; }
  .window { box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.23); }
  .screen { min-height: 360px; padding: 28px 20px; }
  .countdown { width: 100%; justify-content: space-between; gap: 2px; }
  .countdown span { font-size: 8px; letter-spacing: -0.06em; }
}

@media (prefers-reduced-motion: reduce) {
  .window { animation: none; }
  .cursor { animation: none; }
  .progress i { transition: none; }
}
