:root {
  --bg: #01020a;
  --glass: rgba(8, 14, 30, 0.55);
  --line: rgba(120, 190, 255, 0.18);
  --text: #e8f1ff;
  --muted: #8ea3c4;
  --red: #ff3b30;
  --red-glow: rgba(255, 59, 48, 0.55);
  --cyan: #6fd6ff;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --display: 'Orbitron', 'Space Grotesk', system-ui, sans-serif;
  --body: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--text); font-family: var(--body); }
#scene { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; cursor: grab; }
#scene:active { cursor: grabbing; }
[hidden] { display: none !important; }

.scan {
  position: fixed; inset: 0; pointer-events: none; z-index: 1;
  background:
    radial-gradient(ellipse at 50% 50%, transparent 55%, rgba(0, 0, 0, 0.55) 100%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 3px);
}

/* panels */
.panel, .brand, .timeline {
  position: fixed; z-index: 2;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 14px;
  backdrop-filter: blur(10px) saturate(1.2);
  -webkit-backdrop-filter: blur(10px) saturate(1.2);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.label { font-family: var(--mono); font-size: 11px; letter-spacing: 2.5px; color: var(--muted); margin-bottom: 8px; }

.brand { top: max(16px, env(safe-area-inset-top)); left: 20px; display: flex; align-items: center; gap: 14px; padding: 12px 18px; }
.brand h1 { margin: 0; font-family: var(--display); font-weight: 900; font-size: 17px; letter-spacing: 3px; }
.brand p { margin: 2px 0 0; font-size: 12px; color: var(--muted); letter-spacing: 1px; }
.beacon { width: 14px; height: 14px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 0 var(--red-glow); animation: beacon 1.8s infinite; }
.live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--red); margin: 0 3px 1px; animation: blink 1.2s infinite; }
@keyframes beacon { 0% { box-shadow: 0 0 0 0 var(--red-glow); } 100% { box-shadow: 0 0 0 16px rgba(255, 59, 48, 0); } }
@keyframes blink { 50% { opacity: 0.2; } }

.stat { left: 20px; top: 110px; width: min(390px, calc(100vw - 40px)); padding: 18px 20px; }
.pct { font-family: var(--display); font-weight: 900; line-height: 1; color: #fff; text-shadow: 0 0 30px var(--red-glow); display: flex; align-items: baseline; }
.pct #pctInt { font-size: 74px; }
.pct .dec { font-family: var(--mono); font-size: 22px; color: #ffb4ae; margin-left: 2px; }
.pct .sym { font-size: 36px; margin-left: 6px; color: var(--red); }
.bar { height: 6px; border-radius: 99px; background: rgba(111, 214, 255, 0.12); overflow: hidden; margin: 14px 0 10px; }
.bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #ff7a5c, var(--red)); box-shadow: 0 0 14px var(--red); }
.zones { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--muted); }
.zones b { font-family: var(--mono); color: var(--text); font-weight: 600; }
.zones .ai b { color: #ff8a80; }
.zones .hu b { color: var(--cyan); }

.eta { right: 20px; top: max(16px, env(safe-area-inset-top)); width: min(400px, calc(100vw - 40px)); padding: 16px 20px; text-align: right; }
.countdown { font-family: var(--display); font-size: 34px; letter-spacing: 1px; color: #fff; }
.countdown b { font-weight: 700; }
.countdown small { font-size: 16px; color: var(--muted); margin: 0 6px 0 2px; font-family: var(--mono); }
.eta-date { margin-top: 8px; font-size: 13px; color: var(--muted); }
.eta-date span { color: #ffb4ae; }

.regions-panel { right: 20px; top: 150px; width: min(400px, calc(100vw - 40px)); padding: 16px 20px; }
.regions { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.regions li { display: grid; grid-template-columns: 120px 1fr 64px; align-items: center; gap: 10px; font-size: 13px; }
.rg-name { color: var(--text); }
.rg-bar { height: 5px; border-radius: 99px; background: rgba(111, 214, 255, 0.12); overflow: hidden; }
.rg-bar i { display: block; height: 100%; background: linear-gradient(90deg, #ff7a5c, var(--red)); transition: width 0.4s ease; }
.rg-pct { font-family: var(--mono); text-align: right; color: #ffb4ae; }

.feed-panel { left: 20px; bottom: 96px; width: min(390px, calc(100vw - 40px)); padding: 14px 18px; }
.feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; min-height: 40px; }
.feed li { display: grid; grid-template-columns: 10px 1fr auto; gap: 10px; align-items: center; font-size: 13px; animation: slide 0.35s ease; }
.feed li:nth-child(n + 4) { opacity: 0.65; }
.ev-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); box-shadow: 0 0 8px var(--red); }
.feed time { font-family: var(--mono); font-size: 11px; color: var(--muted); }
@keyframes slide { from { opacity: 0; transform: translateX(-8px); } }

.timeline { left: 50%; transform: translateX(-50%); bottom: max(18px, env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 10px; padding: 10px 12px; width: min(760px, calc(100vw - 40px)); }
.timeline input[type=range] { flex: 1; min-width: 60px; accent-color: var(--red); }
.year-label { font-family: var(--mono); font-size: 13px; min-width: 76px; text-align: center; }
.chip {
  font-family: var(--mono); font-size: 12px; letter-spacing: 1px; white-space: nowrap;
  color: var(--text); background: rgba(111, 214, 255, 0.08); border: 1px solid var(--line);
  border-radius: 999px; padding: 8px 12px; cursor: pointer;
}
.chip:hover { border-color: rgba(255, 59, 48, 0.6); }
.chip.on { background: rgba(255, 59, 48, 0.2); border-color: var(--red); color: #fff; box-shadow: 0 0 18px rgba(255, 59, 48, 0.35); }

.model-pop { right: 20px; bottom: 96px; width: min(320px, calc(100vw - 40px)); padding: 16px 18px; }
.model-pop label { display: block; font-size: 13px; margin: 10px 0; }
.model-pop output { float: right; font-family: var(--mono); color: #ffb4ae; }
.model-pop input { width: 100%; accent-color: var(--red); margin-top: 6px; }
.model-pop p { margin: 8px 0 0; font-size: 12px; color: var(--muted); }

.disclaimer { position: fixed; z-index: 2; right: 20px; bottom: 26px; margin: 0; font-size: 11px; color: rgba(142, 163, 196, 0.7); max-width: 240px; text-align: right; }

.takeover { position: fixed; inset: 0; z-index: 5; display: grid; place-items: center; text-align: center; background: radial-gradient(circle at 50% 50%, rgba(120, 0, 0, 0.35), rgba(0, 0, 0, 0.75)); animation: fadein 0.8s ease; }
.takeover h2 { margin: 0; font-family: var(--display); font-weight: 900; font-size: clamp(36px, 7vw, 88px); letter-spacing: 6px; color: #fff; text-shadow: 0 0 40px var(--red), 0 0 90px var(--red); animation: glitch 2.4s infinite; }
.takeover p { color: #ffb4ae; font-size: 18px; }
@keyframes fadein { from { opacity: 0; } }
@keyframes glitch { 0%, 92%, 100% { transform: none; } 94% { transform: translate(3px, -2px) skewX(6deg); } 96% { transform: translate(-3px, 2px); } }

.loading { position: fixed; inset: 0; z-index: 6; display: grid; place-items: center; background: var(--bg); font-family: var(--mono); letter-spacing: 3px; font-size: 13px; color: var(--muted); transition: opacity 0.8s ease; }
.loading span { animation: blink 1.2s infinite; }
.loading.gone { opacity: 0; pointer-events: none; }


/* coin bar */
.coinbar {
  position: fixed; z-index: 3; left: 50%; transform: translateX(-50%); top: max(16px, env(safe-area-inset-top));
  display: flex; align-items: center; gap: 8px; padding: 8px 10px 8px 14px; max-width: calc(100vw - 840px); min-width: 0;
  background: rgba(30, 6, 8, 0.6); border: 1px solid rgba(255, 59, 48, 0.45); border-radius: 999px;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 0 30px rgba(255, 59, 48, 0.18);
}
.coin-tk { font-family: var(--display); font-weight: 900; font-size: 14px; letter-spacing: 1px; color: #fff; white-space: nowrap; }
.coin-state { font-family: var(--mono); font-size: 10px; letter-spacing: 1.5px; padding: 3px 7px; border-radius: 99px; background: rgba(142,163,196,.15); color: var(--muted); }
.coin-state.live { background: rgba(255, 59, 48, 0.25); color: #fff; }
.coin-ca { display: flex; align-items: center; gap: 6px; min-width: 0; }
.coin-ca-label { font-family: var(--mono); font-size: 10px; color: var(--muted); }
.coin-ca code { font-family: var(--mono); font-size: 12px; color: #ffd0cc; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.coin-mc { font-family: var(--mono); font-size: 12px; color: #fff; white-space: nowrap; }
.mini { font-family: var(--mono); font-size: 11px; letter-spacing: 1px; color: var(--text); text-decoration: none; cursor: pointer; white-space: nowrap;
  background: rgba(111, 214, 255, 0.08); border: 1px solid var(--line); border-radius: 99px; padding: 6px 10px; }
.mini:hover { border-color: rgba(255, 59, 48, 0.7); }
.mini.buy { background: var(--red); border-color: var(--red); color: #fff; font-weight: 600; box-shadow: 0 0 16px rgba(255, 59, 48, 0.5); }
@media (max-width: 1100px) and (min-width: 761px) {
  .coinbar { top: auto; bottom: 80px; max-width: min(760px, calc(100vw - 40px)); }
}

/* small screens: stack the panels top and bottom, globe in the middle */
@media (max-width: 760px) {
  .brand { left: 12px; right: 12px; padding: 10px 14px; }
  .brand h1 { font-size: 14px; }
  .coinbar { top: 74px; left: 12px; right: 12px; transform: none; max-width: none; padding: 6px 8px 6px 12px; gap: 6px; }
  .coin-ca-label, #coinMc { display: none; }
  .stat { left: 12px; right: 12px; width: auto; top: 124px; padding: 12px 16px; }
  .pct #pctInt { font-size: 48px; }
  .pct .dec { font-size: 16px; }
  .eta { top: auto; bottom: 74px; left: 12px; right: 12px; width: auto; text-align: left; padding: 12px 16px; }
  .countdown { font-size: 22px; }
  .regions-panel, .feed-panel, .disclaimer { display: none; }
  .timeline { width: calc(100vw - 24px); bottom: max(12px, env(safe-area-inset-bottom)); gap: 6px; padding: 8px; }
  .year-label { display: none; }
  #modelBtn { display: none; }
}
@media (max-width: 1100px) and (min-width: 761px) {
  .feed-panel { display: none; }
}

/* render modes for promo graphics (see index.html) */
.clean .brand, .clean .coinbar, .clean .panel, .clean .timeline, .clean .disclaimer, .clean .scan, .clean .loading, .clean .takeover { display: none !important; }
.ad .coinbar, .ad .regions-panel, .ad .feed-panel, .ad .timeline, .ad .disclaimer, .ad .model-pop, .ad .loading, .ad .takeover { display: none !important; }
