* {
  box-sizing: border-box;
}

:root {
  --bg: #080b14;
  --panel: rgba(18, 24, 45, .72);
  --line: rgba(255, 255, 255, .1);
  --text: #f7f8ff;
  --muted: #9ca7c7;
  --a: #7c4dff;
  --b: #00d4ff;
  --c: #72ff9a;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 10%, rgba(124,77,255,.15), transparent 30%),
    radial-gradient(circle at 80% 20%, rgba(0,212,255,.11), transparent 28%),
    linear-gradient(180deg, #090d1a 0%, #05070d 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

body.chaos {
  animation: pagePulse .7s infinite alternate;
}

@keyframes pagePulse {
  from { filter: hue-rotate(0deg); }
  to { filter: hue-rotate(18deg); }
}

button {
  font: inherit;
}

#cursorGlow {
  position: fixed;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(0,212,255,.13), transparent 65%);
  transform: translate(-50%, -50%);
  z-index: 0;
}

#stars {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: white;
  border-radius: 50%;
  opacity: .25;
  animation: twinkle 2s ease-in-out infinite alternate;
}

@keyframes twinkle {
  to { opacity: .85; transform: scale(1.8); }
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 72px;
  padding: 0 clamp(22px, 5vw, 80px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 7, 13, .72);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: .12em;
}

.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 18px var(--c);
}

.mini-btn,
.card-btn,
.terminal-btn {
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(255,255,255,.04);
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  transition: .22s ease;
}

.mini-btn:hover,
.card-btn:hover,
.terminal-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,.26);
  background: rgba(255,255,255,.08);
}

main, footer {
  position: relative;
  z-index: 2;
}

.hero {
  min-height: calc(100vh - 72px);
  max-width: 1320px;
  margin: auto;
  padding: 70px clamp(22px, 5vw, 70px);
  display: grid;
  grid-template-columns: 1.02fr .98fr;
  align-items: center;
  gap: 52px;
}

.eyebrow,
.small {
  color: var(--b);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .19em;
}

h1 {
  margin: 16px 0;
  font-size: clamp(64px, 10vw, 146px);
  line-height: .78;
  letter-spacing: -.07em;
}

.gradient-text {
  background: linear-gradient(90deg, var(--a), var(--b), var(--c));
  -webkit-background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 26px rgba(0,212,255,.13));
}

.lead {
  max-width: 680px;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.55;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 30px 0;
}

.primary-btn,
.secondary-btn {
  border: 0;
  border-radius: 16px;
  padding: 15px 20px;
  font-weight: 900;
  letter-spacing: .04em;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.primary-btn {
  color: #031017;
  background: linear-gradient(135deg, var(--b), var(--c));
  box-shadow: 0 12px 36px rgba(0,212,255,.18);
}

.secondary-btn {
  color: white;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.05);
}

.primary-btn:hover,
.secondary-btn:hover {
  transform: translateY(-3px) scale(1.02);
}

.status-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-width: 680px;
}

.status-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.035);
  backdrop-filter: blur(10px);
}

.status-card .label {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
}

.hero-visual {
  min-height: 580px;
  position: relative;
  display: grid;
  place-items: center;
  perspective: 1000px;
}

.head-core {
  width: min(390px, 65vw);
  aspect-ratio: .92;
  border-radius: 48% 48% 44% 44% / 42% 42% 58% 58%;
  position: relative;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 35% 28%, rgba(255,255,255,.24), transparent 17%),
    radial-gradient(circle at 50% 45%, #5d35eb, #221651 66%, #0b0c1d 100%);
  box-shadow:
    inset 0 0 80px rgba(0,0,0,.42),
    0 0 90px rgba(124,77,255,.24),
    0 30px 80px rgba(0,0,0,.45);
  transition: transform .08s linear;
  z-index: 4;
}

.head-core::before {
  content: "";
  position: absolute;
  inset: 9%;
  border: 1px dashed rgba(255,255,255,.18);
  border-radius: inherit;
  animation: spin 16s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.face {
  transform: translateY(24px);
}

.eyes {
  display: flex;
  gap: 58px;
}

.eye {
  width: 68px;
  height: 48px;
  background: white;
  border-radius: 50%;
  display: grid;
  place-items: center;
  box-shadow: inset 0 -7px 0 rgba(0,0,0,.08);
}

.eye i {
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: #09111a;
  display: block;
  transition: transform .05s linear;
}

.mouth {
  width: 72px;
  height: 22px;
  margin: 34px auto 0;
  border-bottom: 6px solid white;
  border-radius: 0 0 50% 50%;
}

.brain-lines {
  position: absolute;
  top: 18%;
  left: 17%;
  right: 17%;
  height: 22%;
  opacity: .65;
  background:
    repeating-radial-gradient(circle at 20% 50%, transparent 0 9px, rgba(255,255,255,.16) 10px 11px, transparent 12px 20px);
  border-radius: 50%;
}

.tag {
  position: absolute;
  padding: 7px 10px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(0,0,0,.24);
  border-radius: 999px;
  backdrop-filter: blur(10px);
}

.tag-a { top: 18%; right: -18px; }
.tag-b { bottom: 28%; left: -22px; }
.tag-c { bottom: 12%; right: 7%; }

.orbit {
  position: absolute;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 50%;
  animation: rotate 16s linear infinite;
}

.orbit::after {
  content: "";
  width: 12px;
  height: 12px;
  background: var(--b);
  border-radius: 50%;
  position: absolute;
  top: 50%;
  right: -6px;
  box-shadow: 0 0 18px var(--b);
}

.orbit-1 { width: 490px; height: 490px; }
.orbit-2 { width: 610px; height: 350px; animation-duration: 20s; }
.orbit-3 { width: 350px; height: 610px; animation-duration: 24s; animation-direction: reverse; }

@keyframes rotate {
  to { transform: rotate(360deg); }
}

.floating-label {
  position: absolute;
  padding: 10px 13px;
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(8,11,20,.75);
  backdrop-filter: blur(12px);
  animation: float 4s ease-in-out infinite;
}

.label-a { top: 10%; left: 3%; }
.label-b { bottom: 15%; left: 5%; animation-delay: .7s; }
.label-c { top: 22%; right: -2%; animation-delay: 1.4s; }

@keyframes float {
  50% { transform: translateY(-12px); }
}

.panel, .cards, .terminal, .cta {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto 90px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--panel);
  overflow: hidden;
  box-shadow: 0 28px 90px rgba(0,0,0,.2);
}

.panel-title {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .12em;
}

.blink {
  color: var(--c);
  animation: blink 1s steps(2) infinite;
}

@keyframes blink { 50% { opacity: .35; } }

.meter-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
}

.meter-card {
  padding: 26px;
  background: rgba(8,11,20,.88);
}

.meter-card h3 {
  margin-top: 0;
}

.meter-card p {
  margin-bottom: 0;
  color: var(--muted);
}

.meter {
  height: 10px;
  background: rgba(255,255,255,.06);
  border-radius: 999px;
  overflow: hidden;
}

.meter span {
  width: 0%;
  height: 100%;
  display: block;
  background: linear-gradient(90deg, var(--a), var(--b), var(--c));
  border-radius: inherit;
  transition: width 1.5s cubic-bezier(.2,.8,.2,1);
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.fun-card {
  min-height: 300px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.025));
  backdrop-filter: blur(14px);
  transform-style: preserve-3d;
  transition: transform .08s linear, border-color .2s ease;
}

.fun-card:hover {
  border-color: rgba(255,255,255,.25);
}

.fun-card .emoji {
  font-size: 48px;
  display: inline-block;
  transform: translateZ(35px);
}

.fun-card h2 {
  font-size: 30px;
  margin-bottom: 8px;
  transform: translateZ(25px);
}

.fun-card p {
  color: var(--muted);
  line-height: 1.65;
}

.card-btn {
  margin-top: 20px;
}

.terminal {
  border: 1px solid rgba(114,255,154,.2);
  border-radius: 20px;
  overflow: hidden;
  background: #060a09;
  box-shadow: 0 25px 80px rgba(0,0,0,.32);
}

.terminal-bar {
  padding: 13px 16px;
  display: flex;
  align-items: center;
  gap: 18px;
  background: #101515;
  border-bottom: 1px solid rgba(255,255,255,.08);
  color: #98a6a1;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
}

.dot {
  width: 10px;
  height: 10px;
  display: inline-block;
  border-radius: 50%;
  margin-right: 5px;
}

.red { background: #ff5f57; }
.yellow { background: #febc2e; }
.green { background: #28c840; }

.terminal-body {
  min-height: 230px;
  padding: 24px;
  color: #b7ffd0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  line-height: 1.8;
}

.prompt { color: #4fe6ff; }
.error { color: #ff92b2; }

.terminal-btn {
  margin: 0 24px 24px;
}

.cta {
  text-align: center;
  padding: 80px 24px;
}

.cta h2 {
  margin: 8px auto 10px;
  font-size: clamp(42px, 7vw, 84px);
  max-width: 950px;
  line-height: 1;
  letter-spacing: -.05em;
}

.cta > p:not(.small) {
  color: var(--muted);
  font-size: 20px;
}

.giant {
  margin-top: 24px;
  padding: 18px 24px;
}

footer {
  max-width: 1180px;
  margin: auto;
  padding: 26px 22px 40px;
  border-top: 1px solid var(--line);
  color: #66708c;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 12px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 30px);
  z-index: 50;
  opacity: 0;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15,20,35,.92);
  color: white;
  box-shadow: 0 20px 70px rgba(0,0,0,.35);
  backdrop-filter: blur(16px);
  transition: .25s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0,0,0,.68);
  backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transition: .25s ease;
}

.modal.show {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  width: min(480px, 100%);
  padding: 34px;
  position: relative;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #11172a;
  box-shadow: 0 30px 120px rgba(0,0,0,.5);
  transform: scale(.88);
  transition: .25s ease;
}

.modal.show .modal-card {
  transform: scale(1);
}

.close-modal {
  position: absolute;
  top: 12px;
  right: 14px;
  border: 0;
  background: transparent;
  color: white;
  font-size: 28px;
  cursor: pointer;
}

.modal-icon {
  font-size: 72px;
}

#confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 120;
}

.confetti-piece {
  position: absolute;
  width: 9px;
  height: 15px;
  border-radius: 2px;
  animation: confettiFall 1.9s ease-out forwards;
}

@keyframes confettiFall {
  0% {
    transform: translate3d(0,-30px,0) rotate(0);
    opacity: 1;
  }
  100% {
    transform: translate3d(var(--x), 105vh,0) rotate(720deg);
    opacity: .1;
  }
}

.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: .7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.shake {
  animation: shake .35s linear 3;
}

@keyframes shake {
  25% { transform: translateX(-8px) rotate(-1deg); }
  50% { transform: translateX(8px) rotate(1deg); }
  75% { transform: translateX(-5px); }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 40px;
  }

  .hero-copy {
    text-align: center;
  }

  .lead,
  .status-row {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-visual {
    min-height: 520px;
  }

  .meter-grid,
  .cards {
    grid-template-columns: 1fr;
  }

  .orbit-2, .orbit-3 {
    display: none;
  }
}

@media (max-width: 600px) {
  .topbar {
    height: 62px;
    padding: 0 16px;
  }

  .brand {
    font-size: 13px;
  }

  .mini-btn {
    padding: 8px 10px;
    font-size: 11px;
  }

  .hero {
    min-height: auto;
    padding: 42px 18px 55px;
  }

  h1 {
    font-size: clamp(58px, 22vw, 96px);
  }

  .lead {
    font-size: 17px;
  }

  .status-row {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    min-height: 420px;
  }

  .orbit-1 {
    width: 350px;
    height: 350px;
  }

  .floating-label {
    display: none;
  }

  .panel, .cards, .terminal, .cta {
    width: min(100% - 24px, 1180px);
    margin-bottom: 55px;
  }

  .panel-title {
    gap: 12px;
    font-size: 10px;
  }

  footer {
    flex-direction: column;
  }
}
