/* Shadowium — AI Game Engine */

:root {
  --bg: #060612;
  --bg2: #0c0c20;
  --bg3: #14142e;
  --edge: #1e1e3a;
  --text: #eeeef8;
  --text-mid: #9898b8;
  --text-low: #5a5a78;
  --accent: #00d4ff;
  --accent-hi: #40e8ff;
  --accent-glow: rgba(0, 212, 255, 0.15);
  --purple: #7c5cff;
  --green: #34d399;
  --red: #f87171;
  --radius: 12px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { overflow-x: hidden; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
  overflow-x: hidden;
}
a { color: var(--accent); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--accent-hi); }
img { display: block; max-width: 100%; height: auto; }

/* Reveal */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.reveal.visible { opacity: 1; transform: none; }

/* ── Topbar ── */
.topbar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; height: 56px;
  background: rgba(6, 6, 18, 0.85);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--edge);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand-icon { display: flex; align-items: center; }
.brand-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px; font-weight: 700; letter-spacing: 2px;
}
.nav { display: none; gap: 24px; align-items: center; }
.nav a { font-size: 13px; color: var(--text-mid); font-weight: 500; }
.nav a:hover { color: var(--text); }
.nav-ext { opacity: 0.6; }
.cta-nav {
  background: var(--accent); color: var(--bg) !important;
  padding: 8px 18px; border-radius: 6px; font-weight: 700; font-size: 12px;
  transition: box-shadow 0.2s;
}
.cta-nav:hover { box-shadow: 0 4px 20px rgba(0, 212, 255, 0.3); }
@media (min-width: 768px) { .nav { display: flex; } .hamburger { display: none !important; } }

.hamburger {
  display: flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 36px; height: 36px; padding: 6px;
  background: none; border: none; cursor: pointer;
}
.hamburger span {
  display: block; width: 100%; height: 2px; background: var(--text);
  border-radius: 1px; transition: transform 0.3s var(--ease), opacity 0.3s;
  transform-origin: center;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 56px 0 0 0; z-index: 99;
  background: rgba(6, 6, 18, 0.97); backdrop-filter: blur(20px);
  display: flex; flex-direction: column; padding: 24px 20px; gap: 4px;
  transform: translateX(100%); transition: transform 0.35s var(--ease);
}
.mobile-menu.open { transform: none; }
.mm-link {
  display: block; padding: 14px 16px; border-radius: 8px;
  color: var(--text); font-size: 16px; font-weight: 600;
}
.mm-link:hover { background: var(--bg3); color: var(--text); }
.mm-cta {
  margin-top: 12px; text-align: center;
  background: var(--accent); color: var(--bg) !important; font-weight: 700;
}

/* ── Hero ── */
.hero {
  position: relative; padding: 80px 20px 60px;
  text-align: center; overflow: hidden;
}
.hero-glow {
  position: absolute; top: -120px; left: 50%; transform: translateX(-50%);
  width: 800px; height: 600px;
  background: radial-gradient(ellipse, rgba(0, 212, 255, 0.08), transparent 70%);
  pointer-events: none;
}
.hero-grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.4), transparent 80%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.4), transparent 80%);
  pointer-events: none;
}
.hero-inner { position: relative; max-width: 720px; margin: 0 auto; }
.hero-badge {
  display: inline-block; padding: 6px 16px; border-radius: 99px;
  background: var(--accent-glow); border: 1px solid rgba(0, 212, 255, 0.2);
  font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 500;
  color: var(--accent); letter-spacing: 1px; margin-bottom: 24px;
}
.hero h1 {
  font-size: clamp(36px, 7vw, 72px);
  font-weight: 900; line-height: 1.05; letter-spacing: -0.03em;
  margin-bottom: 20px;
}
.accent { color: var(--accent); text-shadow: 0 0 40px rgba(0, 212, 255, 0.3); }
.hero-sub {
  font-size: clamp(15px, 2vw, 18px); line-height: 1.7;
  color: var(--text-mid); max-width: 560px; margin: 0 auto 32px;
}
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 40px; }
.hero-stats {
  display: flex; justify-content: center; gap: 24px; flex-wrap: wrap;
}
.stat { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.stat-num { font-family: 'JetBrains Mono', monospace; font-size: 14px; font-weight: 700; color: var(--accent); }
.stat-label { font-size: 11px; color: var(--text-low); }
.stat-sep { width: 1px; height: 32px; background: var(--edge); align-self: center; }

/* Terminal */
.hero-terminal {
  max-width: 640px; margin: 48px auto 0;
  background: var(--bg2); border: 1px solid var(--edge);
  border-radius: 10px; overflow: hidden; text-align: left;
}
.term-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; background: rgba(255,255,255,0.02);
  border-bottom: 1px solid var(--edge);
}
.term-dots { display: flex; gap: 6px; }
.term-dots span { width: 10px; height: 10px; border-radius: 50%; background: var(--edge); }
.term-dots span:first-child { background: #f87171; }
.term-dots span:nth-child(2) { background: #fbbf24; }
.term-dots span:last-child { background: #34d399; }
.term-title { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--text-low); }
.term-body { padding: 16px; font-family: 'JetBrains Mono', monospace; font-size: 13px; line-height: 2; }
.term-line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-prompt { color: var(--accent); }
.t-cmd { color: var(--text); }
.t-ai { display: inline-block; padding: 1px 6px; border-radius: 3px; background: rgba(124, 92, 255, 0.2); color: var(--purple); font-size: 10px; font-weight: 700; margin-right: 6px; }
.t-ok { display: inline-block; padding: 1px 6px; border-radius: 3px; background: rgba(52, 211, 153, 0.15); color: var(--green); font-size: 10px; font-weight: 700; margin-right: 6px; }
.t-link { color: var(--accent); }
.t-fade { color: var(--text-mid); }

@media (max-width: 640px) {
  .hero { padding: 48px 16px 40px; }
  .term-body { font-size: 11px; padding: 12px; overflow-x: auto; }
  .hero-stats { gap: 16px; }
  .stat-sep { display: none; }
}

/* ── Sections ── */
.section-head { max-width: 560px; margin: 0 auto 48px; text-align: center; }
.section-head h2 { font-size: clamp(24px, 4vw, 40px); font-weight: 900; margin-bottom: 12px; letter-spacing: -0.02em; }
.section-head p { color: var(--text-mid); font-size: 15px; line-height: 1.6; }
.badge-sm {
  display: inline-block; padding: 4px 12px; border-radius: 99px;
  background: var(--accent-glow); border: 1px solid rgba(0, 212, 255, 0.15);
  font-family: 'JetBrains Mono', monospace; font-size: 10px; font-weight: 600;
  color: var(--accent); letter-spacing: 1.5px; text-transform: uppercase;
  margin-bottom: 16px;
}

/* ── Features ── */
.features { padding: 80px 20px; max-width: 1080px; margin: 0 auto; }
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 900px) { .feat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .feat-grid { grid-template-columns: 1fr; } }

.feat-card {
  background: var(--bg2); border: 1px solid var(--edge); border-radius: var(--radius);
  padding: 28px 22px; transition: border-color 0.2s, transform 0.2s;
}
.feat-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.feat-icon {
  width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  background: var(--accent-glow); border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 10px; color: var(--accent); margin-bottom: 16px;
}
.feat-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.feat-card p { font-size: 13px; line-height: 1.6; color: var(--text-mid); }

/* ── Engine Steps ── */
.engine { padding: 80px 20px; max-width: 900px; margin: 0 auto; }
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 640px) { .steps-grid { grid-template-columns: 1fr; } }
.step-card {
  background: var(--bg2); border: 1px solid var(--edge); border-radius: var(--radius);
  padding: 28px 22px; text-align: center;
}
.step-num {
  font-family: 'JetBrains Mono', monospace; font-size: 32px; font-weight: 900;
  color: var(--accent); opacity: 0.3; margin-bottom: 12px;
}
.step-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.step-card p { font-size: 13px; color: var(--text-mid); line-height: 1.6; }

/* ── Stack ── */
.stack { padding: 60px 20px 80px; max-width: 900px; margin: 0 auto; }
.stack-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
}
@media (max-width: 768px) { .stack-grid { grid-template-columns: repeat(2, 1fr); } }
.stack-item {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 20px 12px; background: var(--bg2); border: 1px solid var(--edge);
  border-radius: 8px; text-align: center; transition: border-color 0.2s;
}
.stack-item:hover { border-color: var(--accent); }
.stack-name { font-family: 'JetBrains Mono', monospace; font-size: 13px; font-weight: 700; color: var(--accent); }
.stack-desc { font-size: 11px; color: var(--text-low); }

/* ── Pricing ── */
.pricing { padding: 80px 20px; max-width: 800px; margin: 0 auto; }
.price-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 640px) { .price-cards { grid-template-columns: 1fr; } }
.price-card {
  position: relative; background: var(--bg2); border: 1px solid var(--edge);
  border-radius: var(--radius); padding: 32px 24px;
}
.price-card-pro { border-color: var(--accent); box-shadow: 0 0 40px rgba(0, 212, 255, 0.08); }
.price-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: var(--bg); font-size: 10px; font-weight: 700;
  padding: 4px 14px; border-radius: 99px; letter-spacing: 1px;
  font-family: 'JetBrains Mono', monospace;
}
.price-name { font-size: 14px; font-weight: 700; color: var(--text-mid); margin-bottom: 12px; text-transform: uppercase; letter-spacing: 1px; }
.price-amount { margin-bottom: 20px; }
.price-big { font-size: 48px; font-weight: 900; }
.price-card-pro .price-big { color: var(--accent); }
.price-period { font-size: 16px; color: var(--text-mid); }
.price-list { list-style: none; margin-bottom: 24px; }
.price-list li {
  padding: 8px 0; border-bottom: 1px solid var(--edge);
  font-size: 13px; color: var(--text-mid);
}
.price-list li:last-child { border-bottom: none; }
.price-note { font-size: 11px; color: var(--text-low); text-align: center; margin-top: 10px; }

/* ── Buttons ── */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 28px; border-radius: 8px; border: none;
  background: var(--accent); color: var(--bg); font-weight: 700; font-size: 14px;
  cursor: pointer; font-family: inherit; transition: box-shadow 0.2s, transform 0.15s;
}
.btn-primary:hover { box-shadow: 0 6px 24px rgba(0, 212, 255, 0.3); transform: translateY(-1px); color: var(--bg); }
.btn-outline {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 28px; border-radius: 8px;
  background: transparent; border: 1px solid var(--edge);
  color: var(--text); font-weight: 600; font-size: 14px;
  cursor: pointer; font-family: inherit; transition: border-color 0.15s;
}
.btn-outline:hover { border-color: var(--accent); color: var(--text); }
.btn-accent {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 28px; border-radius: 8px; border: none;
  background: linear-gradient(135deg, var(--accent), #0090ff);
  color: #fff; font-weight: 700; font-size: 15px;
  cursor: pointer; font-family: inherit; transition: box-shadow 0.2s;
}
.btn-accent:hover { box-shadow: 0 8px 32px rgba(0, 212, 255, 0.3); }
.btn-block { display: flex; width: 100%; }
.btn-ghost {
  display: block; width: 100%; padding: 10px; border-radius: 6px;
  background: transparent; border: 1px solid var(--edge);
  color: var(--text-mid); font-size: 13px; cursor: pointer;
  font-family: inherit; transition: border-color 0.15s; margin-top: 8px;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--text); }
.btn-primary:disabled, .btn-accent:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Auth Section ── */
.start { padding: 60px 20px 80px; }
.start-card {
  max-width: 420px; margin: 0 auto;
  background: var(--bg2); border: 1px solid var(--edge); border-radius: 16px;
  padding: 36px 28px;
}
.start-card h2 { font-size: 24px; font-weight: 900; margin-bottom: 8px; text-align: center; }
.start-sub { color: var(--text-mid); font-size: 14px; text-align: center; margin-bottom: 24px; }

.hidden { display: none !important; }
.step { display: block; } .step.hidden { display: none; }
.step label { display: block; font-size: 11px; color: var(--text-mid); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 1px; }
.step input {
  width: 100%; padding: 12px 14px;
  background: var(--bg); border: 1px solid var(--edge); border-radius: 8px;
  color: var(--text); font-size: 15px; font-family: inherit; margin-bottom: 12px;
}
.step input:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
#code { letter-spacing: 8px; text-align: center; font-family: 'JetBrains Mono', monospace; font-size: 20px; }
#totp { letter-spacing: 4px; text-align: center; }
#totp.hidden { display: none; }

.welcome { text-align: center; color: var(--text-mid); margin-bottom: 14px; font-size: 13px; }
.welcome span { color: var(--accent); font-weight: 700; }
.premium-box { text-align: center; padding: 20px; background: var(--accent-glow); border: 1px solid rgba(0,212,255,0.2); border-radius: 10px; margin-bottom: 14px; }
.premium-box.hidden { display: none; }
.premium-icon { margin-bottom: 8px; display: flex; justify-content: center; }
.premium-text { color: var(--text); margin-bottom: 14px; font-size: 14px; }
.hint { color: var(--text-low); font-size: 11px; margin-bottom: 8px; line-height: 1.5; text-align: center; }
.actions-row { display: flex; gap: 8px; }
.actions-row .btn-ghost { flex: 1; }

.msg { margin-top: 14px; padding: 10px; border-radius: 6px; text-align: center; font-size: 13px; display: none; }
.msg.show { display: block; }
.msg.error { background: rgba(248,113,113,0.1); color: var(--red); border: 1px solid rgba(248,113,113,0.2); }
.msg.ok { background: rgba(52,211,153,0.08); color: var(--green); border: 1px solid rgba(52,211,153,0.2); }

@media (max-width: 520px) {
  .start-card { padding: 28px 16px; }
}

/* ── Footer ── */
.footer { border-top: 1px solid var(--edge); padding: 32px 20px; }
.footer-inner {
  max-width: 1080px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px;
}
.footer-brand { display: flex; align-items: center; gap: 8px; font-family: 'JetBrains Mono', monospace; font-size: 13px; font-weight: 700; color: var(--text-mid); }
.footer-links { display: flex; gap: 20px; }
.footer-links a { font-size: 13px; color: var(--text-low); }
.footer-links a:hover { color: var(--text); }
.footer-copy { font-size: 11px; color: var(--text-low); }
@media (max-width: 640px) {
  .footer-inner { flex-direction: column; text-align: center; }
}

/* ── Legal ── */
.legal-page { max-width: 720px; margin: 48px auto; padding: 0 24px 60px; }
.legal-page h1 { font-family: 'JetBrains Mono', monospace; font-size: 16px; color: var(--accent); letter-spacing: 2px; margin-bottom: 20px; }
.legal-page h2 { font-size: 17px; color: var(--text); margin: 28px 0 10px; }
.legal-page p, .legal-page li { color: var(--text-mid); font-size: 14px; line-height: 1.7; margin-bottom: 10px; }
.legal-page ul { margin-left: 20px; }
.legal-back { display: inline-block; margin-bottom: 28px; color: var(--accent); }
