/* ── Variables ── */
:root {
  --bg: #0d0d0d;
  --bg-section: #111111;
  --bg-card: #1a1a1a;
  --bg-card-hover: #222222;
  --border: #2a2a2a;
  --text: #f0f0f0;
  --text-muted: #888888;
  --accent-purple: #9b5de5;
  --accent-cyan: #00f5d4;
  --accent-orange: #f15bb5;
  --accent-yellow: #fee440;
  --radius: 12px;
  --max-width: 1100px;
  --game-width: 390px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ── Layout helpers ── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}
section { padding: 80px 0; }
section:nth-child(even) { background: var(--bg-section); }

/* ── NAV ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13,13,13,0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-size: 1.25rem;
  font-weight: 700;
  background: linear-gradient(90deg, var(--accent-purple), var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.nav-right { display: flex; align-items: center; gap: 12px; }

/* Language dropdown */
.lang-switcher { position: relative; }
#lang-toggle {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 4px;
}
#lang-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 160px;
  overflow: hidden;
  z-index: 200;
}
#lang-dropdown.open { display: block; }
#lang-dropdown a {
  display: block;
  padding: 10px 16px;
  font-size: 0.9rem;
  color: var(--text-muted);
  cursor: pointer;
}
#lang-dropdown a:hover,
#lang-dropdown a.active { background: var(--bg-card-hover); color: var(--text); }

/* Sign in button */
.btn-signin {
  background: var(--accent-purple);
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  font-weight: 600;
}
.btn-signin:hover { opacity: 0.9; }

/* ── RTL NAV ── */
[dir="rtl"] .nav-inner { flex-direction: row-reverse; }
[dir="rtl"] .nav-right { flex-direction: row-reverse; }
[dir="rtl"] #lang-dropdown { right: auto; left: 0; }

/* ── HERO ── */
#section-hero {
  padding: 100px 0 80px;
  text-align: center;
}
.hero-h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 36px;
}
.hero-ctas {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.btn-primary {
  background: var(--accent-purple);
  color: #fff;
  border: none;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
}
.btn-primary:hover { opacity: 0.9; }
.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 14px 28px;
  border-radius: var(--radius);
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
}
.btn-secondary:hover { border-color: var(--accent-cyan); color: var(--accent-cyan); }
.hero-note { font-size: 0.85rem; color: var(--text-muted); }

/* ── SECTION HEADINGS ── */
.section-h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 16px;
  text-align: center;
}
.section-desc {
  color: var(--text-muted);
  text-align: center;
  max-width: 600px;
  margin: 0 auto 40px;
}

/* ── GAME FRAME ── */
.game-embed {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}
.game-frame-wrap {
  width: var(--game-width);
  max-width: 100%;
  aspect-ratio: 390 / 650;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 0 40px rgba(155, 93, 229, 0.2);
}
.game-frame-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}
.game-bullets {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.95rem;
  color: var(--text-muted);
}
.game-bullets li { color: var(--text); }
.game-cta-wrap { text-align: center; }

/* Shooter coming-soon placeholder */
.shooter-placeholder {
  width: var(--game-width);
  max-width: 100%;
  height: 240px;
  border-radius: var(--radius);
  border: 1px dashed var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 1.1rem;
}
.shooter-placeholder .coming-label {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent-orange);
}

/* ── HOW IT WORKS ── */
.how-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 40px;
}
.how-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
}
.how-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--accent-cyan);
}
.how-card p { color: var(--text-muted); font-size: 0.95rem; }

/* ── WORD JOURNEY ── */
.journey-path {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-top: 40px;
  overflow-x: auto;
  padding-bottom: 16px;
}
.journey-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 80px;
}
.journey-badge {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}
.journey-step:nth-child(1) .journey-badge { border-color: var(--text-muted); }
.journey-step:nth-child(2) .journey-badge { border-color: #4caf50; }
.journey-step:nth-child(3) .journey-badge { border-color: var(--accent-cyan); }
.journey-step:nth-child(4) .journey-badge { border-color: var(--accent-purple); }
.journey-step:nth-child(5) .journey-badge { border-color: var(--accent-orange); }
.journey-step:nth-child(6) .journey-badge { border-color: var(--accent-yellow); }
.journey-step-label { font-size: 0.8rem; font-weight: 600; text-align: center; }
.journey-step-desc { font-size: 0.75rem; color: var(--text-muted); text-align: center; }
.journey-connector {
  width: 24px;
  height: 2px;
  background: var(--border);
  margin-top: 27px;
  flex-shrink: 0;
}

/* Mobile journey → vertical list */
@media (max-width: 600px) {
  .journey-path { flex-direction: column; align-items: flex-start; overflow-x: unset; }
  .journey-step { flex-direction: row; align-items: center; min-width: unset; width: 100%; gap: 16px; }
  .journey-connector { display: none; }
  .journey-step-desc { text-align: left; }
  .journey-step-label { text-align: left; }
}

/* ── WHAT YOU LEARN ── */
.learn-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
  margin-top: 40px;
}
.learn-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
}
.learn-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--accent-yellow);
}
.learn-card p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 16px; }
.tier-list { display: flex; flex-direction: column; gap: 6px; }
.tier-list li {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 6px 10px;
  background: var(--bg-card-hover);
  border-radius: 6px;
  border-left: 3px solid var(--accent-purple);
}

/* ── PLATFORMS ── */
.platforms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 40px;
}
.platform-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.platform-icon { font-size: 1.8rem; flex-shrink: 0; }
.platform-text strong { display: block; font-size: 0.95rem; margin-bottom: 4px; }
.platform-text span { font-size: 0.85rem; color: var(--text-muted); }

/* ── FAQ ── */
.faq-list {
  max-width: 720px;
  margin: 40px auto 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
  padding: 18px 20px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.faq-question::after {
  content: '▾';
  font-size: 1rem;
  color: var(--text-muted);
  transition: transform 0.2s;
  flex-shrink: 0;
}
.faq-item.open .faq-question::after { transform: rotate(180deg); }
.faq-answer {
  display: none;
  padding: 0 20px 18px;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}
.faq-item.open .faq-answer { display: block; }

/* Desktop: all FAQ open */
@media (min-width: 768px) {
  .faq-answer { display: block; }
  .faq-question { cursor: default; }
  .faq-question::after { display: none; }
}

/* RTL FAQ */
[dir="rtl"] .faq-question { text-align: right; flex-direction: row-reverse; }

/* ── FOOTER ── */
footer {
  background: var(--bg-section);
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}
.footer-logo {
  font-size: 1.4rem;
  font-weight: 800;
  background: linear-gradient(90deg, var(--accent-purple), var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 24px;
  display: inline-block;
}
.footer-links {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.footer-col h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 8px; }
.footer-col a { font-size: 0.9rem; color: var(--text-muted); }
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.footer-bottom a:hover { color: var(--text); }

/* RTL footer */
[dir="rtl"] .footer-links { flex-direction: row-reverse; }
[dir="rtl"] .footer-bottom { flex-direction: row-reverse; }

/* ── Sign-in Modal ─────────────────────────────────────── */
#signin-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
#signin-modal-overlay.open {
  display: flex;
}
#signin-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px 36px;
  max-width: 360px;
  width: 90%;
  text-align: center;
  position: relative;
}
#signin-modal h2 {
  font-size: 1.4rem;
  margin-bottom: 12px;
}
#signin-modal p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 28px;
  line-height: 1.5;
}
#google-btn-container {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}
.signin-note {
  font-size: 0.8rem !important;
  margin-bottom: 0 !important;
}
#signin-modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px 8px;
}
#signin-modal-close:hover { color: var(--text); }

/* ── Landing ad banner ── */
#landing-ad {
  max-width: var(--game-width);
  margin: 16px auto 0;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  overflow: hidden;
}

/* ── Sign-up prompt overlay ── */
#signup-prompt-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 1100;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
#signup-prompt-overlay.open { display: flex; }
#signup-prompt {
  background: #0d0d1a;
  border: 1px solid #333355;
  border-radius: 16px;
  padding: 32px 28px;
  max-width: 340px;
  width: 100%;
  text-align: center;
}
#signup-prompt-title {
  font-size: 1.3rem;
  font-weight: bold;
  color: #ffffff;
  margin-bottom: 10px;
}
#signup-prompt-body {
  font-size: 0.9rem;
  color: #888899;
  margin-bottom: 24px;
  line-height: 1.5;
}
#signup-prompt-skip {
  background: none;
  border: none;
  color: #555577;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 6px;
  width: 100%;
}
#signup-prompt-skip:hover { color: #aaaacc; }
