/*
 * Shared styles for Turbo Math Games static content pages
 * (For Parents + topic landing pages). Arcade / neon theme to match the app.
 */

:root {
  --bg: #0a0a0f;
  --bg-panel: #12121a;
  --cyan: #00f3ff;
  --magenta: #ff00ff;
  --yellow: #ffea00;
  --green: #22c55e;
  --amber: #f59e0b;
  --red: #ef4444;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --border: rgba(255, 255, 255, 0.1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(124, 58, 237, 0.25), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.display {
  font-family: "Courier New", Courier, monospace;
  letter-spacing: 0.02em;
}

.wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 20px;
}

/* --- Top nav --- */
.topbar {
  border-bottom: 1px solid var(--border);
  background: rgba(10, 10, 15, 0.7);
  backdrop-filter: blur(6px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand {
  font-family: "Courier New", Courier, monospace;
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  background: linear-gradient(90deg, var(--cyan), var(--magenta));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.topbar nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  margin-left: 18px;
}
.topbar nav a:hover { color: var(--cyan); }

/* --- Hero --- */
.hero {
  text-align: center;
  padding: 64px 0 40px;
}
.hero h1 {
  font-family: "Courier New", Courier, monospace;
  font-size: clamp(2rem, 6vw, 3.4rem);
  line-height: 1.1;
  margin: 0 0 16px;
  background: linear-gradient(90deg, var(--cyan), #a855f7 55%, var(--magenta));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 30px rgba(0, 243, 255, 0.15);
}
.hero p.lede {
  font-size: clamp(1.05rem, 2.5vw, 1.3rem);
  color: var(--text);
  max-width: 620px;
  margin: 0 auto 28px;
}

/* --- Buttons --- */
.cta {
  display: inline-block;
  font-family: "Courier New", Courier, monospace;
  font-weight: 700;
  text-decoration: none;
  padding: 14px 30px;
  border-radius: 999px;
  color: #04121a;
  background: linear-gradient(90deg, var(--cyan), #8b5cf6);
  box-shadow: 0 0 24px rgba(0, 243, 255, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.cta:hover { transform: translateY(-2px); box-shadow: 0 0 34px rgba(0, 243, 255, 0.55); }
.cta.secondary {
  color: var(--cyan);
  background: transparent;
  border: 2px solid rgba(0, 243, 255, 0.5);
  box-shadow: none;
}
.cta.secondary:hover { border-color: var(--cyan); box-shadow: 0 0 20px rgba(0, 243, 255, 0.25); }

.btn-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

/* --- Sections --- */
section { padding: 34px 0; }
h2 {
  font-family: "Courier New", Courier, monospace;
  font-size: clamp(1.5rem, 4vw, 2rem);
  color: #fff;
  margin: 0 0 8px;
}
h2 .accent { color: var(--cyan); }
.section-intro { color: var(--muted); margin: 0 0 22px; max-width: 640px; }

/* --- Cards --- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}
.card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.card:hover { border-color: rgba(0, 243, 255, 0.4); transform: translateY(-2px); }
.card h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
  color: #fff;
}
.card .icon { font-size: 1.7rem; display: block; margin-bottom: 10px; }
.card p { margin: 0; color: var(--muted); font-size: 0.97rem; }
.card p strong { color: var(--text); }

/* --- Game list --- */
.game { display: flex; gap: 16px; align-items: flex-start; }
.game .emoji { font-size: 2rem; line-height: 1; }
.game h3 { margin: 0 0 4px; color: #fff; }

/* --- Legend (progress dashboard states) --- */
.legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 14px; }
.legend span { display: inline-flex; align-items: center; gap: 8px; font-size: 0.9rem; color: var(--muted); }
.swatch { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.swatch.green { background: var(--green); }
.swatch.amber { background: var(--amber); }
.swatch.red { background: var(--red); }
.swatch.gray { background: #4b5563; }

/* --- FAQ --- */
.faq details {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4px 18px;
  margin-bottom: 12px;
  background: var(--bg-panel);
}
.faq summary {
  cursor: pointer;
  padding: 14px 0;
  font-weight: 600;
  color: #fff;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "＋ "; color: var(--cyan); }
.faq details[open] summary::before { content: "－ "; }
.faq details p { margin: 0 0 16px; color: var(--muted); }

/* --- CTA band --- */
.cta-band {
  text-align: center;
  background: linear-gradient(180deg, rgba(124, 58, 237, 0.12), transparent);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 40px 24px;
  margin: 40px 0;
}
.cta-band h2 { margin-bottom: 18px; }

/* --- Related links --- */
.pills { display: flex; flex-wrap: wrap; gap: 10px; }
.pill {
  text-decoration: none;
  color: var(--cyan);
  border: 1px solid rgba(0, 243, 255, 0.4);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.9rem;
}
.pill:hover { background: rgba(0, 243, 255, 0.1); }

/* --- Footer --- */
footer {
  border-top: 1px solid var(--border);
  margin-top: 30px;
  padding: 30px 0;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}
footer a { color: var(--muted); }
footer a:hover { color: var(--cyan); }

a { color: var(--cyan); }
