/* ═══════════════════════════════════════════════════════════
   FuturisticMath.com — Global Stylesheet
   Theme: Dark cosmic / neon-indigo / electric
═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;600&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --brand:    #6366F1;   /* indigo */
  --brand2:   #8B5CF6;   /* violet */
  --accent:   #06B6D4;   /* cyan */
  --green:    #10B981;
  --yellow:   #F59E0B;
  --red:      #EF4444;
  --pink:     #EC4899;

  --bg:       #0D0D1A;
  --bg2:      #111127;
  --bg3:      #161630;
  --surface:  #1A1A35;
  --border:   rgba(99,102,241,.2);

  --text:     #E2E8F0;
  --muted:    #94A3B8;
  --dim:      #64748B;

  --font:     'Inter', sans-serif;
  --font-h:   'Space Grotesk', sans-serif;
  --font-mono:'JetBrains Mono', monospace;

  --radius:   14px;
  --radius-sm:8px;
  --shadow:   0 4px 24px rgba(0,0,0,.4);
  --glow:     0 0 40px rgba(99,102,241,.15);
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
}

/* ── NAV ─────────────────────────────────────────────────── */
.fm-nav {
  background: rgba(13,13,26,.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: .75rem 2rem; flex-wrap: wrap;
}
.fm-nav-brand {
  display: flex; align-items: center; gap: .6rem;
  text-decoration: none;
}
.fm-logo-mark {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-h); font-weight: 800; font-size: .9rem;
  color: #fff;
  box-shadow: 0 0 16px rgba(99,102,241,.4);
}
.fm-logo-text {
  font-family: var(--font-h); font-weight: 700; font-size: 1rem; color: #fff;
}
.fm-logo-dot { color: var(--accent); }
.fm-nav-links { display: flex; gap: .15rem; flex-wrap: wrap; }
.fm-nav-links a {
  color: var(--muted); text-decoration: none;
  font-size: .83rem; font-weight: 500;
  padding: .35rem .75rem; border-radius: 6px;
  transition: all .2s;
}
.fm-nav-links a:hover,
.fm-nav-links a.active {
  color: #fff; background: rgba(99,102,241,.18);
}
.fm-nav-links a.active { color: #A5B4FC; }

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .4rem;
  font-family: var(--font-h); font-weight: 700;
  padding: .7rem 1.5rem; border-radius: 10px;
  border: none; cursor: pointer; text-decoration: none;
  transition: all .2s; font-size: .92rem;
}
.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  color: #fff;
  box-shadow: 0 4px 20px rgba(99,102,241,.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(99,102,241,.45); }
.btn-outline {
  background: transparent; color: var(--accent);
  border: 2px solid var(--accent);
}
.btn-outline:hover { background: var(--accent); color: var(--bg); }

/* ── CARDS ───────────────────────────────────────────────── */
.fm-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.fm-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--glow);
  border-color: rgba(99,102,241,.4);
}

/* ── SECTION HEADINGS ────────────────────────────────────── */
.section-label {
  display: inline-block;
  font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent); margin-bottom: .6rem;
}
.section-title {
  font-family: var(--font-h); font-weight: 800;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.2; color: #fff; margin-bottom: 1rem;
}
.section-title span { color: var(--brand); }
.section-sub { color: var(--muted); font-size: 1.05rem; max-width: 600px; }

/* ── FOOTER ──────────────────────────────────────────────── */
.fm-footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 3.5rem 2rem 1.5rem;
  margin-top: 5rem;
}
.fm-footer-inner { max-width: 1200px; margin: 0 auto; }
.fm-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem; margin-bottom: 2.5rem;
}
.fm-footer-logo {
  width: 42px; height: 42px;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-h); font-weight: 800; color: #fff;
  margin-bottom: .75rem;
}
.fm-footer-name { font-family: var(--font-h); font-weight: 700; color: #fff; margin-bottom: .5rem; }
.fm-footer-desc { font-size: .83rem; color: var(--muted); line-height: 1.65; }
.fm-footer-col h4 { font-family: var(--font-h); font-weight: 700; color: #fff; font-size: .88rem; margin-bottom: .75rem; }
.fm-footer-col ul { list-style: none; }
.fm-footer-col li { margin-bottom: .4rem; }
.fm-footer-col a { color: var(--muted); text-decoration: none; font-size: .83rem; transition: color .2s; }
.fm-footer-col a:hover { color: #fff; }
.fm-footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: .75rem;
  font-size: .78rem; color: var(--dim);
}
.fm-footer-bottom a { color: var(--dim); text-decoration: none; }
.fm-footer-bottom a:hover { color: var(--muted); }

/* ── HERO SHARED ─────────────────────────────────────────── */
.fm-hero {
  background: radial-gradient(ellipse at 20% 50%, rgba(99,102,241,.18) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 20%, rgba(139,92,246,.12) 0%, transparent 60%),
              var(--bg);
  padding: 5rem 2rem 4rem;
  text-align: center;
  position: relative; overflow: hidden;
}
.fm-hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(99,102,241,.08) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}
.fm-hero-inner { position: relative; max-width: 800px; margin: 0 auto; }
.fm-hero-badge {
  display: inline-block;
  background: rgba(99,102,241,.15);
  border: 1px solid rgba(99,102,241,.35);
  color: #A5B4FC;
  font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: .3rem 1rem; border-radius: 20px; margin-bottom: 1.2rem;
}
.fm-hero-title {
  font-family: var(--font-h); font-weight: 800;
  font-size: clamp(2.2rem, 6vw, 3.8rem);
  line-height: 1.15; color: #fff; margin-bottom: 1rem;
}
.fm-hero-title .grad {
  background: linear-gradient(135deg, var(--brand), var(--accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.fm-hero-sub {
  font-size: 1.1rem; color: var(--muted);
  max-width: 560px; margin: 0 auto 2rem;
}
.fm-hero-btns { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ── GRID LAYOUTS ────────────────────────────────────────── */
.fm-grid-2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.5rem; }
.fm-grid-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.fm-grid-4 { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.25rem; }

/* ── STAT CHIPS ──────────────────────────────────────────── */
.fm-stats { display: flex; gap: 2.5rem; justify-content: center; flex-wrap: wrap; }
.fm-stat { text-align: center; }
.fm-stat-num { font-family: var(--font-h); font-weight: 800; font-size: 2rem; color: var(--accent); }
.fm-stat-lbl { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }

/* ── GAME / QUIZ CARD ────────────────────────────────────── */
.game-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
  text-decoration: none; color: inherit;
  display: flex; flex-direction: column;
}
.game-card:hover { transform: translateY(-5px); box-shadow: 0 12px 40px rgba(99,102,241,.25); }
.game-card-banner {
  height: 120px;
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem;
  position: relative; overflow: hidden;
}
.game-card-body { padding: 1.1rem 1.25rem 1.25rem; flex: 1; display: flex; flex-direction: column; gap: .4rem; }
.game-card-tag {
  font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--brand); background: rgba(99,102,241,.12);
  padding: .15rem .5rem; border-radius: 6px; align-self: flex-start;
}
.game-card-title { font-family: var(--font-h); font-weight: 700; font-size: 1rem; color: #fff; }
.game-card-desc { font-size: .83rem; color: var(--muted); flex: 1; }
.game-card-btn {
  margin-top: .75rem; display: inline-block; text-align: center;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  color: #fff; font-weight: 700; font-size: .82rem;
  padding: .5rem 1rem; border-radius: 8px; text-decoration: none;
  transition: opacity .2s;
}
.game-card-btn:hover { opacity: .85; }

/* ── SECTION WRAPPER ─────────────────────────────────────── */
.fm-section { max-width: 1200px; margin: 0 auto; padding: 4rem 2rem; }
.fm-section-header { margin-bottom: 2.5rem; }

/* ── PAGE HEADER ─────────────────────────────────────────── */
.page-header {
  background: linear-gradient(135deg, var(--bg2), var(--bg3));
  border-bottom: 1px solid var(--border);
  padding: 3rem 2rem;
  text-align: center;
}
.page-header h1 {
  font-family: var(--font-h); font-weight: 800;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: #fff; margin-bottom: .6rem;
}
.page-header p { color: var(--muted); font-size: 1.05rem; }

/* ── BREADCRUMB ──────────────────────────────────────────── */
.fm-breadcrumb {
  background: var(--bg2); border-bottom: 1px solid var(--border);
  padding: .6rem 2rem;
}
.fm-breadcrumb-inner {
  max-width: 1200px; margin: 0 auto;
  font-size: .8rem; color: var(--muted); display: flex; gap: .4rem; align-items: center;
}
.fm-breadcrumb a { color: var(--muted); text-decoration: none; }
.fm-breadcrumb a:hover { color: #fff; }
.fm-breadcrumb-sep { opacity: .4; }

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .fm-footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .fm-nav { padding: .6rem 1rem; }
  .fm-section { padding: 2.5rem 1rem; }
  .fm-footer { padding: 2.5rem 1rem 1.5rem; }
  .fm-footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .fm-hero { padding: 3.5rem 1rem 2.5rem; }
}
