/* ============================================================
   NOT ELON — $NOTELON — arcade videogame site
   palette taken straight from logo.jpeg:
   space black #0c0c18 · orange #ff7a00 · red #e83a1e · amber #ffb61e
   ============================================================ */

:root {
  --space-0: #0c0c18;
  --space-1: #14142a;
  --space-2: #1e1e3a;
  --orange:  #ff7a00;
  --orange-1:#ff8c1a;
  --orange-2:#a34d00;
  --red:     #e83a1e;
  --red-2:   #8f1f10;
  --amber:   #ffb61e;
  --peach:   #ff9d76;
  --ink:     #060610;
  --paper:   #f5eeda;
  --px: "Press Start 2P", monospace;
  --tt: "VT323", monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--space-0);
  color: var(--paper);
  font-family: var(--tt);
  font-size: 22px;
  line-height: 1.45;
  overflow-x: hidden;
  background-image:
    radial-gradient(2px 2px at 14% 20%, #ffb61e66, transparent 60%),
    radial-gradient(2px 2px at 76% 10%, #ffffff55, transparent 60%),
    radial-gradient(1.5px 1.5px at 30% 66%, #ff7a0055, transparent 60%),
    radial-gradient(2px 2px at 90% 72%, #ffffff44, transparent 60%),
    radial-gradient(1.5px 1.5px at 58% 38%, #ffb61e44, transparent 60%),
    radial-gradient(2px 2px at 24% 90%, #ffffff33, transparent 60%),
    radial-gradient(1.5px 1.5px at 68% 88%, #ff7a0044, transparent 60%);
}

::selection { background: var(--orange); color: var(--ink); }

/* ---------- CRT scanlines ---------- */
.crt {
  position: fixed; inset: 0; z-index: 9999; pointer-events: none;
  background: repeating-linear-gradient(to bottom,
    transparent 0 2px, rgba(0,0,0,.14) 3px, rgba(0,0,0,.14) 4px);
  mix-blend-mode: multiply;
}
.crt::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(6,6,16,.6) 100%);
}

.blink { animation: blink 1s steps(1) infinite; }
.blink-slow { animation: blink 1.6s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- HUD ---------- */
.hud {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 18px;
  background: var(--ink);
  border-bottom: 4px solid var(--orange);
  font-family: var(--px); font-size: 10px; color: var(--amber);
}
.hud-left, .hud-right { display: flex; gap: 22px; }
.hud-item b { color: var(--paper); font-weight: normal; }
.hud-item.hi { color: var(--orange); }
.lives { color: var(--red); letter-spacing: 3px; text-shadow: 0 0 8px var(--red); }

/* ---------- pixel buttons ---------- */
.px-btn {
  display: inline-block;
  font-family: var(--px); font-size: 12px; text-decoration: none;
  color: var(--paper); background: var(--space-2);
  padding: 14px 20px; cursor: pointer; border: 4px solid var(--orange);
  box-shadow: 4px 4px 0 var(--ink), inset 0 0 0 2px var(--ink);
  transition: transform .05s, box-shadow .05s;
  user-select: none;
}
.px-btn:active {
  transform: translate(4px, 4px); box-shadow: 0 0 0 var(--ink), inset 0 0 0 2px var(--ink);
}
.px-btn.primary {
  background: var(--orange); color: var(--ink);
  border-color: var(--amber);
  text-shadow: 1px 1px 0 var(--peach);
}
.px-btn.small { font-size: 10px; padding: 9px 12px; border-width: 3px; }

/* ---------- hero / title screen ---------- */
.hero {
  min-height: 100vh; padding: 90px 20px 70px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 20px;
  background: radial-gradient(ellipse at 50% 28%, #2a1608 0%, var(--space-1) 42%, var(--space-0) 100%);
}
.press-start { font-family: var(--px); font-size: 13px; color: var(--amber); }

.hero-logo {
  width: min(290px, 62vw); height: auto;
  filter: drop-shadow(0 0 30px rgba(255, 122, 0, .5));
  animation: float 3.2s ease-in-out infinite;
}
@keyframes float { 50% { transform: translateY(-14px); } }

.title {
  font-family: var(--px);
  font-size: clamp(38px, 9vw, 88px);
  line-height: 1.15;
  color: var(--orange);
  text-shadow:
    4px 4px 0 var(--red),
    8px 8px 0 var(--ink),
    0 0 34px rgba(255, 122, 0, .4);
  letter-spacing: 2px;
}
.subtitle { font-size: 26px; color: var(--paper); opacity: .92; }

.stamp {
  font-family: var(--px); font-size: 11px; color: var(--red);
  border: 3px dashed var(--red); padding: 10px 16px;
  transform: rotate(-5deg);
  text-shadow: 2px 2px 0 var(--ink);
  box-shadow: 0 0 22px rgba(232, 58, 30, .25), inset 0 0 14px rgba(232, 58, 30, .12);
}
.stamp2 {
  color: var(--amber); border-color: var(--amber);
  transform: rotate(3deg); font-size: 9px;
  box-shadow: 0 0 22px rgba(255, 182, 30, .2), inset 0 0 14px rgba(255, 182, 30, .1);
}

.ca-box {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: center;
  background: var(--ink); border: 3px solid var(--orange);
  padding: 12px 16px; font-size: 19px; color: var(--amber);
  box-shadow: inset 0 0 18px rgba(255, 122, 0, .12), 4px 4px 0 rgba(0,0,0,.6);
  max-width: 92vw;
}
.ca-label { font-family: var(--px); font-size: 10px; color: var(--orange); }
#caText { word-break: break-all; }

.hero-buttons { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.scroll-hint { font-family: var(--px); font-size: 10px; color: var(--paper); opacity: .75; margin-top: 10px; }

/* ---------- marquee ---------- */
.marquee {
  background: var(--orange); color: var(--ink);
  font-family: var(--px); font-size: 12px;
  border-top: 4px solid var(--red-2); border-bottom: 4px solid var(--red-2);
  overflow: hidden; white-space: nowrap;
}
.marquee-track { display: inline-block; padding: 13px 0; animation: scrollX 20s linear infinite; }
@keyframes scrollX { to { transform: translateX(-50%); } }

/* ---------- scroll video / arcade cabinet ---------- */
.video-section { height: 420vh; position: relative; }

.stage {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px; padding: 16px;
}

.cabinet {
  width: min(92vw, 1000px);
  background: var(--space-1);
  border: 4px solid var(--ink);
  border-radius: 18px;
  padding: 14px 16px 14px;
  box-shadow:
    inset 0 2px 0 #2e2e52,
    0 22px 60px rgba(0,0,0,.65),
    0 0 90px rgba(255, 122, 0, .10);
}
.cabinet-top {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--px); font-size: 11px;
  padding: 2px 8px 12px; letter-spacing: 1px;
}
.cabinet-brand { color: var(--orange); }
.cabinet-rec { color: var(--red); text-shadow: 0 0 10px var(--red); }

.screen {
  position: relative; border-radius: 12px; overflow: hidden;
  background: var(--space-0);
  border: 6px solid var(--ink);
  aspect-ratio: 16 / 9;
}
#scrub { width: 100%; height: 100%; display: block; }
.screen-glare {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse at 18% 8%, rgba(255,255,255,.10), transparent 42%),
    repeating-linear-gradient(to bottom, transparent 0 3px, rgba(0,0,0,.10) 4px);
}
.screen-loading {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--px); font-size: 14px; color: var(--orange);
  background: var(--space-0); letter-spacing: 2px;
  transition: opacity .4s; pointer-events: none;
}
.screen-loading.done { opacity: 0; }

.cabinet-controls {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 12px 2px;
}
.stick {
  width: 34px; height: 34px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--peach), var(--red) 60%, var(--red-2));
  border: 4px solid var(--ink);
  box-shadow: 0 4px 0 rgba(0,0,0,.6);
  position: relative;
}
.stick::before {
  content: ""; position: absolute; left: 50%; top: -18px;
  width: 6px; height: 18px; background: #3a3a55;
  transform: translateX(-50%); border-radius: 3px;
}
.cab-btns { display: inline-flex; gap: 12px; }
.cab-btns i {
  width: 26px; height: 26px; border-radius: 50%; display: block;
  border: 3px solid var(--ink); box-shadow: 0 3px 0 rgba(0,0,0,.55);
}
.cab-btns i:nth-child(1) { background: var(--red); }
.cab-btns i:nth-child(2) { background: var(--orange); }
.cab-btns i:nth-child(3) { background: var(--amber); }
.video-caption { font-family: var(--px); font-size: 10px; color: var(--paper); opacity: .6; letter-spacing: 1px; }

/* ---------- RPG dialog boxes ---------- */
.level { padding: 90px 20px; display: flex; flex-direction: column; align-items: center; gap: 34px; }

.level-tag {
  font-family: var(--px); font-size: 13px; color: var(--ink);
  background: var(--amber); padding: 10px 18px;
  border: 3px solid var(--orange-2); box-shadow: 4px 4px 0 var(--ink);
  letter-spacing: 2px;
}

.dialog {
  position: relative;
  width: min(860px, 94vw);
  background: var(--space-1);
  border: 4px solid var(--paper);
  box-shadow: 0 0 0 4px var(--ink), 8px 12px 0 rgba(0,0,0,.55), inset 0 0 40px rgba(255,122,0,.05);
  padding: 44px 34px 34px;
}
.dialog-name {
  position: absolute; top: -18px; left: 24px;
  font-family: var(--px); font-size: 11px;
  background: var(--red); color: var(--paper);
  padding: 8px 14px; border: 3px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  letter-spacing: 1px;
}
.dialog p { margin-bottom: 18px; font-size: 24px; }
.dialog p:last-child { margin-bottom: 0; }
.dialog .accent { color: var(--amber); }

/* ---------- stats (level 2) ---------- */
.stats .stat { margin-bottom: 26px; }
.stat-head {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--px); font-size: clamp(10px, 1.8vw, 14px); margin-bottom: 10px;
}
.stat-head b { color: var(--orange); font-weight: normal; }
.bar {
  height: 22px; background: var(--ink);
  border: 3px solid var(--paper);
  box-shadow: inset 0 3px 6px rgba(0,0,0,.7);
}
.bar-fill {
  height: 100%;
  background: repeating-linear-gradient(90deg, var(--orange) 0 10px, var(--orange-1) 10px 12px);
  box-shadow: 0 0 14px rgba(255,122,0,.5);
}
.bar-fill.red {
  background: repeating-linear-gradient(90deg, var(--red) 0 10px, var(--red-2) 10px 12px);
  box-shadow: 0 0 14px rgba(232,58,30,.5);
}
.bar-fill.amber {
  background: repeating-linear-gradient(90deg, var(--amber) 0 10px, var(--orange-2) 10px 12px);
  box-shadow: 0 0 14px rgba(255,182,30,.5);
}
.stat-note { margin-top: 8px; font-size: 18px; color: var(--peach); }

.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 30px; }
.stat-cell {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--ink); border: 3px solid var(--space-2);
  padding: 12px 14px; font-family: var(--px); font-size: 10px;
}
.stat-cell span { color: var(--paper); opacity: .75; }
.stat-cell b { color: var(--amber); font-weight: normal; }

/* ---------- quest cards (level 3) ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; width: min(1100px, 94vw); }
.card {
  background: var(--space-1);
  border: 4px solid var(--paper);
  box-shadow: 0 0 0 4px var(--ink), 6px 8px 0 rgba(0,0,0,.55);
  padding: 0 22px 24px; text-align: center;
}
.card-head {
  font-family: var(--px); font-size: 10px; color: var(--ink);
  background: var(--orange); margin: 0 -22px 18px; padding: 10px;
  border-bottom: 4px solid var(--red-2); letter-spacing: 2px;
}
.card-icon { font-size: 30px; color: var(--red); margin-bottom: 12px; text-shadow: 2px 2px 0 var(--ink); }
.card h3 { font-family: var(--px); font-size: 12px; color: var(--amber); margin-bottom: 14px; line-height: 1.8; }
.card p { font-size: 20px; }
.inline-link { color: var(--orange); text-decoration: underline; }
.inline-link:hover { color: var(--amber); }

/* ---------- arcade button ---------- */
.arcade-zone { padding: 30px 20px 110px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 30px; }
.arcade-btn {
  position: relative; width: 170px; height: 170px; border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #6b2018, var(--red-2) 70%, #3a0f08);
  border: 8px solid var(--ink);
  box-shadow: 0 10px 0 #1a0505, 0 16px 40px rgba(232,58,30,.35), inset 0 -14px 24px rgba(0,0,0,.5);
  cursor: pointer; transition: transform .06s, box-shadow .06s;
}
.arcade-btn:active {
  transform: translateY(8px);
  box-shadow: 0 2px 0 #1a0505, 0 8px 24px rgba(232,58,30,.3), inset 0 -10px 20px rgba(0,0,0,.5);
}
.arcade-btn-face {
  font-family: var(--px); font-size: 15px; color: var(--paper);
  text-shadow: 2px 2px 0 var(--ink); letter-spacing: 1px;
}
.boom-meter { font-family: var(--px); font-size: 13px; color: var(--amber); }
.boom-pop {
  position: absolute; font-family: var(--px); font-size: 14px; color: var(--orange);
  pointer-events: none; animation: boomPop .8s ease-out forwards;
  left: 50%; top: -14px;
}
@keyframes boomPop {
  from { transform: translateX(-50%) translateY(0); opacity: 1; }
  to { transform: translateX(-50%) translateY(-80px); opacity: 0; }
}

/* ---------- footer / game over ---------- */
footer { padding: 70px 24px 50px; text-align: center; }
.gameover { margin-bottom: 40px; }
.gameover-title {
  font-family: var(--px); font-size: clamp(22px, 4.5vw, 38px);
  color: var(--paper); text-shadow: 4px 4px 0 var(--ink);
  margin-bottom: 18px;
}
.countdown {
  font-family: var(--px); font-size: clamp(34px, 6vw, 60px);
  color: var(--red); text-shadow: 0 0 30px rgba(232,58,30,.6), 4px 4px 0 var(--ink);
}
.disclaimer { max-width: 720px; margin: 0 auto 20px; font-size: 19px; opacity: .75; }
.tiny { font-size: 16px; opacity: .5; letter-spacing: 1px; }

/* ---------- modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(6, 6, 16, .82);
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal-window { width: min(460px, 92vw); text-align: center; animation: modalIn .18s steps(3) both; }
@keyframes modalIn { from { transform: scale(.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-text {
  font-family: var(--px); font-size: clamp(16px, 4vw, 24px);
  color: var(--orange); text-shadow: 3px 3px 0 var(--red-2), 5px 5px 0 var(--ink);
  margin-bottom: 16px;
}
.modal-sub { font-size: 20px; opacity: .8; margin-bottom: 24px; }

/* ---------- responsive ---------- */
@media (max-width: 820px) {
  .hud { font-size: 8px; gap: 8px; padding: 8px 10px; }
  .hud-left, .hud-right { gap: 10px; }
  .hud-item.hi { display: none; }
  .cards { grid-template-columns: 1fr; }
  .video-section { height: 340vh; }
  .cabinet { width: 96vw; padding: 10px; }
  .screen { border-width: 4px; }
  .stat-grid { grid-template-columns: 1fr; }
  .dialog { padding: 40px 20px 26px; }
}

@media (prefers-reduced-motion: reduce) {
  .blink, .blink-slow, .hero-logo { animation: none; }
  html { scroll-behavior: auto; }
}
