/* ===================================================
   MathPlay — Design System
   Feira de Matemática CESWF 2026
   =================================================== */

:root {
  --primary: #2C3E50;
  --secondary: #E74C3C;
  --accent: #F1C40F;
  --success: #2ECC71;
  --info: #3498DB;
  --light: #ECF0F1;
  --dark: #1A252F;
  --muted: #7f8c8d;
  --border: #dfe6e9;
  --font-title: 'Poppins', sans-serif;
  --font-body: 'Open Sans', sans-serif;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 20px rgba(0,0,0,.08);
  --shadow-md: 0 8px 32px rgba(0,0,0,.12);
  --navbar-h: 64px;
  --transition: 0.2s ease;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--dark);
  background: #f8f9fa;
  line-height: 1.6;
  min-height: 100vh;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: var(--font-body); border: none; background: none; }
input, textarea, select { font-family: var(--font-body); }

/* ── Container ── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ── Navbar ── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  height: var(--navbar-h);
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-title);
  font-size: 1.35rem;
  font-weight: 800;
}
.brand-icon { font-size: 1.6rem; }
.brand-accent { color: var(--info); }

.navbar-links { display: flex; gap: 1.5rem; }
.navbar-links a {
  color: var(--primary);
  font-weight: 500;
  font-size: .95rem;
  transition: color var(--transition);
}
.navbar-links a:hover { color: var(--info); }

.navbar-toggle {
  display: none;
  font-size: 1.5rem;
  color: var(--primary);
  background: none;
  border: none;
  padding: .25rem .5rem;
}

/* ── Mobile Menu ── */
.mobile-menu {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--primary);
  z-index: 300;
  display: flex;
  flex-direction: column;
  padding: 5rem 2rem 2rem;
  transform: translateX(100%);
  transition: transform .3s ease;
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu-close {
  position: absolute;
  top: 1.25rem; right: 1.5rem;
  color: white;
  font-size: 1.75rem;
  background: none; border: none;
}
.mobile-nav-link {
  color: white;
  font-size: 1.3rem;
  font-weight: 600;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255,255,255,.1);
  display: block;
}

/* ── Main content offset ── */
.main-content { padding-top: var(--navbar-h); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .65rem 1.4rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .95rem;
  transition: all var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
}
.btn-primary {
  background: var(--info);
  color: white;
}
.btn-primary:hover { background: #2176ae; transform: translateY(-1px); }
.btn-success {
  background: var(--success);
  color: white;
}
.btn-success:hover { background: #27ae60; }
.btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--primary);
}
.btn-outline:hover { border-color: var(--info); color: var(--info); }
.btn-lg { padding: .85rem 2rem; font-size: 1.05rem; border-radius: var(--radius); }
.btn-sm { padding: .4rem .9rem; font-size: .85rem; }
.btn-icon {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1rem;
  cursor: pointer;
  padding: .2rem .4rem;
  border-radius: 4px;
  transition: color var(--transition);
}
.btn-icon:hover { color: var(--secondary); }

/* ── Section common ── */
.section-title {
  font-family: var(--font-title);
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  text-align: center;
  margin-bottom: .5rem;
}
.section-subtitle {
  text-align: center;
  color: var(--muted);
  margin-bottom: 2.5rem;
  font-size: 1.05rem;
}

/* ────────────────────────────────────────────────
   HERO
──────────────────────────────────────────────────*/
.hero {
  position: relative;
  min-height: calc(100vh - var(--navbar-h));
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #1a252f 0%, #2c3e50 60%, #1a5276 100%);
  color: white;
  overflow: hidden;
  padding: 4rem 1.5rem;
}

.hero-bg-pattern {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 20% 20%, rgba(52,152,219,.15) 0%, transparent 50%),
                    radial-gradient(circle at 80% 80%, rgba(46,204,113,.1) 0%, transparent 50%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}
.hero-badge {
  display: inline-block;
  background: rgba(52,152,219,.2);
  border: 1px solid rgba(52,152,219,.4);
  color: #7fb3d3;
  padding: .35rem 1rem;
  border-radius: 50px;
  font-size: .85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  letter-spacing: .03em;
}
.hero-title {
  font-family: var(--font-title);
  font-size: clamp(2.2rem, 6vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1rem;
}
.hero-accent {
  color: #f1c40f;
  display: inline-block;
}
.hero-subtitle {
  color: rgba(255,255,255,.75);
  font-size: 1.15rem;
  margin-bottom: 2rem;
}
.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}
.hero-cta .btn-outline {
  border-color: rgba(255,255,255,.4);
  color: white;
}
.hero-cta .btn-outline:hover {
  border-color: white;
  background: rgba(255,255,255,.1);
}

.hero-stats {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
}
.hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .1rem;
}
.hero-stat strong {
  font-family: var(--font-title);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent);
}
.hero-stat span {
  font-size: .8rem;
  color: rgba(255,255,255,.6);
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* Floating math symbols */
.hero-visual {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.math-float {
  position: absolute;
  font-size: clamp(1.5rem, 4vw, 3rem);
  color: rgba(255,255,255,.06);
  font-family: var(--font-title);
  animation: floatSym 8s ease-in-out infinite;
}
.f1  { top:10%; left:5%;  animation-delay:0s; }
.f2  { top:20%; right:8%; animation-delay:1s; }
.f3  { top:60%; left:3%;  animation-delay:2s; }
.f4  { top:70%; right:5%; animation-delay:3s; }
.f5  { top:40%; left:15%; animation-delay:4s; }
.f6  { top:50%; right:15%;animation-delay:5s; }
.f7  { top:85%; left:20%; animation-delay:1.5s; }
.f8  { top:15%; left:40%; animation-delay:3.5s; }

@keyframes floatSym {
  0%,100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(5deg); }
}

/* ── Series nav ── */
.series-nav {
  background: white;
  padding: 2.5rem 0 1.5rem;
  border-bottom: 1px solid var(--border);
}
.series-tabs {
  display: flex;
  gap: .5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}
.series-tab {
  padding: .5rem 1.2rem;
  border-radius: 50px;
  border: 2px solid var(--border);
  font-weight: 600;
  font-size: .9rem;
  color: var(--muted);
  transition: all var(--transition);
  cursor: pointer;
  background: white;
}
.series-tab:hover, .series-tab.active {
  border-color: var(--info);
  color: var(--info);
  background: rgba(52,152,219,.07);
}

/* ── Games Grid ── */
.games-section { padding: 3rem 0 4rem; }

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.game-card {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition);
}
.game-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.game-card.hidden { display: none; }

.game-card-header {
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.game-number {
  color: rgba(255,255,255,.5);
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 1.1rem;
}
.game-emoji { font-size: 2.5rem; }

.game-card-body {
  padding: 1.25rem;
  flex: 1;
}
.game-card-body h3 {
  font-family: var(--font-title);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: .5rem;
}
.game-card-body p {
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.5;
}
.game-tags { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .75rem; }

.tag {
  display: inline-block;
  padding: .2rem .6rem;
  border-radius: 50px;
  font-size: .75rem;
  font-weight: 600;
}
.tag-blue  { background: rgba(52,152,219,.12); color: #2176ae; }
.tag-green { background: rgba(46,204,113,.12); color: #27ae60; }
.tag-purple { background: rgba(155,89,182,.12); color: #8e44ad; }
.tag-orange { background: rgba(230,126,34,.12); color: #d35400; }
.tag-red   { background: rgba(231,76,60,.12); color: #c0392b; }
.tag-teal  { background: rgba(26,188,156,.12); color: #16a085; }
.tag-dark  { background: rgba(44,62,80,.1); color: #2c3e50; }

.game-card-btn {
  display: block;
  padding: .85rem 1.25rem;
  background: var(--primary);
  color: white;
  text-align: center;
  font-weight: 600;
  font-size: .9rem;
  letter-spacing: .02em;
  transition: background var(--transition);
}
.game-card-btn:hover { background: var(--info); }

/* ── How it works ── */
.how-it-works {
  background: white;
  padding: 5rem 0;
}
.steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}
.step {
  text-align: center;
  max-width: 220px;
}
.step-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--info);
  color: white;
  font-family: var(--font-title);
  font-size: 1.6rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}
.step h3 {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: .35rem;
  color: var(--primary);
}
.step p { color: var(--muted); font-size: .9rem; }
.step-arrow {
  font-size: 1.5rem;
  color: var(--border);
  flex-shrink: 0;
}

/* ── Benefits ── */
.benefits { padding: 5rem 0; background: #f8f9fa; }
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}
.benefit-card {
  background: white;
  padding: 1.75rem 1.25rem;
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow);
}
.benefit-icon { font-size: 2.2rem; margin-bottom: .75rem; }
.benefit-card h3 {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1rem;
  color: var(--primary);
  margin-bottom: .35rem;
}
.benefit-card p { color: var(--muted); font-size: .875rem; }

/* ── CTA Final ── */
.cta-final {
  background: linear-gradient(135deg, #2c3e50, #1a5276);
  padding: 5rem 1.5rem;
  text-align: center;
  color: white;
}
.cta-final h2 {
  font-family: var(--font-title);
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: .75rem;
}
.cta-final p { color: rgba(255,255,255,.75); margin-bottom: 2rem; font-size: 1.1rem; }

/* ── Footer ── */
.footer {
  background: var(--dark);
  color: rgba(255,255,255,.7);
  padding: 3rem 1.5rem;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2rem;
  align-items: start;
}
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: .25rem;
}
.footer-brand strong { color: white; font-family: var(--font-title); font-size: 1.2rem; }
.footer-brand p { color: rgba(255,255,255,.5); font-size: .85rem; margin-top: .25rem; }
.footer-links {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.footer-links a { color: rgba(255,255,255,.6); font-size: .9rem; transition: color var(--transition); }
.footer-links a:hover { color: white; }
.footer-credits { font-size: .85rem; line-height: 1.7; }
.footer-copy { color: rgba(255,255,255,.35); margin-top: .5rem; font-size: .8rem; }

/* ── Toast ── */
#toast-container {
  position: fixed;
  bottom: 1.5rem; right: 1.5rem;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.toast {
  background: var(--primary);
  color: white;
  padding: .75rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  box-shadow: var(--shadow-md);
  animation: toastIn .3s ease;
  max-width: 300px;
}
.toast.toast-success { background: var(--success); }
.toast.toast-error   { background: var(--secondary); }
@keyframes toastIn { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:translateY(0); } }

/* ────────────────────────────────────────────────
   GAME PAGES
──────────────────────────────────────────────────*/
.page-game .main-content { background: #f4f6f8; }

.game-wrapper {
  min-height: calc(100vh - var(--navbar-h));
}

.game-header {
  background: var(--game-color, var(--primary));
  color: white;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.back-btn {
  color: rgba(255,255,255,.8);
  font-weight: 600;
  font-size: .9rem;
  white-space: nowrap;
  transition: color var(--transition);
}
.back-btn:hover { color: white; }
.game-header-info {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex: 1;
}
.game-header-icon { font-size: 2rem; }
.game-header-info h1 {
  font-family: var(--font-title);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: .1rem;
}
.game-header-info p {
  font-size: .85rem;
  color: rgba(255,255,255,.75);
}
.game-score-box {
  background: rgba(0,0,0,.2);
  border-radius: var(--radius-sm);
  padding: .4rem 1rem;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1rem;
  white-space: nowrap;
}

.game-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

/* ── Mathematician grid ── */
.mathematician-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}
.math-card {
  background: white;
  border-radius: var(--radius);
  padding: 1.25rem 1rem;
  text-align: center;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  border: 2px solid transparent;
}
.math-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--info);
}
.math-card-emoji { font-size: 2.5rem; margin-bottom: .5rem; }
.math-card-name {
  font-family: var(--font-title);
  font-size: .9rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: .2rem;
}
.math-card-info { font-size: .78rem; color: var(--muted); }

/* ── Card Modal ── */
.card-modal {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.card-modal-bg {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(4px);
}
.card-modal-content {
  position: relative;
  background: white;
  border-radius: var(--radius);
  padding: 2rem;
  max-width: 520px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: var(--shadow-md);
  animation: modalIn .25s ease;
}
@keyframes modalIn { from { opacity:0; transform:scale(.95); } to { opacity:1; transform:scale(1); } }

.card-modal-close {
  position: absolute;
  top: 1rem; right: 1rem;
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--muted);
  cursor: pointer;
}
.modal-header-emoji { font-size: 3rem; text-align: center; margin-bottom: .75rem; }
.card-modal-content h2 {
  font-family: var(--font-title);
  text-align: center;
  font-size: 1.4rem;
  color: var(--primary);
  margin-bottom: .5rem;
}
.modal-meta {
  display: flex;
  gap: .5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.modal-meta span {
  background: var(--light);
  padding: .2rem .7rem;
  border-radius: 50px;
  font-size: .8rem;
  color: var(--muted);
}
.modal-section { margin-bottom: 1rem; }
.modal-section h4 { font-size: .85rem; font-weight: 700; color: var(--muted); margin-bottom: .25rem; }
.modal-section p { font-size: .95rem; color: var(--dark); line-height: 1.6; }
.modal-curiosity { background: rgba(241,196,15,.08); border-radius: var(--radius-sm); padding: .75rem; }

/* ── IMPA banner ── */
.impa-banner {
  background: linear-gradient(135deg, #1a5276, #2980b9);
  color: white;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  line-height: 1.5;
  margin: 1rem 0;
}

/* ── Quiz styles ── */
.mode-selector { text-align: center; padding: 1.5rem 0; }
.mode-selector h2 { font-family: var(--font-title); font-size: 1.5rem; color: var(--primary); margin-bottom: .5rem; }
.mode-selector p { color: var(--muted); margin-bottom: 1.25rem; }

.quiz-mode { max-width: 640px; margin: 0 auto; }
.quiz-progress {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.quiz-progress-bar {
  flex: 1;
  height: 8px;
  background: var(--border);
  border-radius: 50px;
  overflow: hidden;
}
.quiz-progress-bar > div {
  height: 100%;
  background: var(--info);
  border-radius: 50px;
  transition: width .5s ease;
}
.quiz-progress span { font-size: .85rem; color: var(--muted); white-space: nowrap; }

.quiz-card {
  background: white;
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
}
.quiz-question {
  font-family: var(--font-title);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 1.5rem;
  line-height: 1.4;
}
.quiz-options {
  display: flex;
  flex-direction: column;
  gap: .65rem;
}
.quiz-option {
  padding: .85rem 1.1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: white;
  text-align: left;
  font-size: .95rem;
  cursor: pointer;
  transition: all var(--transition);
}
.quiz-option:hover:not(:disabled) { border-color: var(--info); background: rgba(52,152,219,.04); }
.quiz-option.correct { border-color: var(--success); background: rgba(46,204,113,.1); color: #27ae60; }
.quiz-option.wrong   { border-color: var(--secondary); background: rgba(231,76,60,.1); color: #c0392b; }

.quiz-feedback {
  background: rgba(52,152,219,.08);
  border-left: 4px solid var(--info);
  padding: .75rem 1rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: .9rem;
  color: var(--primary);
  margin-top: .75rem;
  line-height: 1.5;
}
.quiz-feedback.correct-fb { border-color: var(--success); background: rgba(46,204,113,.08); }
.quiz-feedback.wrong-fb   { border-color: var(--secondary); background: rgba(231,76,60,.08); }

.quiz-nav {
  text-align: right;
  margin: .5rem 0 1rem;
  display: flex;
  gap: .5rem;
  justify-content: flex-end;
}

/* ── Result ── */
.game-result {
  max-width: 500px;
  margin: 2rem auto;
  background: white;
  border-radius: var(--radius);
  padding: 3rem 2rem;
  text-align: center;
  box-shadow: var(--shadow-md);
}
.result-emoji { font-size: 4rem; margin-bottom: 1rem; }
.game-result h2 {
  font-family: var(--font-title);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: .5rem;
}
.game-result p { color: var(--muted); margin-bottom: 1.5rem; }
.result-score {
  font-family: var(--font-title);
  font-size: 2rem;
  font-weight: 800;
  color: var(--info);
  margin-bottom: 1.5rem;
}
.result-actions { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }

/* ── Timeline (game3) ── */
.era-buttons {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  justify-content: center;
  margin: 1.5rem 0;
}
.era-btn {
  padding: .6rem 1.1rem;
  border-radius: var(--radius-sm);
  background: white;
  border: 2px solid var(--border);
  font-weight: 600;
  font-size: .9rem;
  cursor: pointer;
  transition: all var(--transition);
}
.era-btn:hover, .era-btn.active {
  border-color: #9b59b6;
  background: rgba(155,89,182,.07);
  color: #8e44ad;
}
.era-header {
  background: linear-gradient(135deg, #8e44ad, #9b59b6);
  color: white;
  padding: 1.25rem;
  border-radius: var(--radius) var(--radius) 0 0;
  margin-bottom: 0;
}
.era-header h3 { font-family: var(--font-title); font-size: 1.2rem; font-weight: 700; }
.timeline-events {
  background: white;
  border-radius: 0 0 var(--radius) var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
}
.timeline-event {
  display: flex;
  gap: 1.25rem;
  padding: 1.25rem;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}
.timeline-event:last-child { border-bottom: none; }
.event-year {
  min-width: 80px;
  font-family: var(--font-title);
  font-weight: 700;
  color: #8e44ad;
  font-size: .95rem;
}
.event-name { font-weight: 600; color: var(--primary); font-size: .95rem; margin-bottom: .25rem; }
.event-desc { color: var(--muted); font-size: .875rem; }
.era-nav { display: flex; gap: .75rem; margin-top: 1rem; justify-content: space-between; }
.timeline-intro { text-align: center; }
.timeline-intro h2 { font-family: var(--font-title); font-size: 1.5rem; color: var(--primary); margin-bottom: .5rem; }

/* Ordering challenge */
.ordering-challenge { max-width: 640px; margin: 0 auto; text-align: center; }
.ordering-challenge h2 { font-family: var(--font-title); font-size: 1.4rem; color: var(--primary); margin-bottom: .5rem; }
.ordering-challenge p { color: var(--muted); margin-bottom: 1rem; }
.challenge-events { display: flex; flex-direction: column; gap: .5rem; margin: 1.5rem 0; }
.challenge-item {
  background: white;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .85rem 1.1rem;
  cursor: grab;
  display: flex;
  align-items: center;
  gap: .75rem;
  font-weight: 500;
  font-size: .95rem;
  transition: box-shadow var(--transition);
  user-select: none;
}
.challenge-item:active { cursor: grabbing; }
.challenge-item.dragging { opacity: .5; box-shadow: var(--shadow-md); }
.drag-handle { color: var(--muted); font-size: .9rem; }
.game3-actions { text-align: center; margin-top: 2rem; }
.order-feedback {
  padding: 1rem;
  border-radius: var(--radius-sm);
  margin-top: 1rem;
  font-size: .95rem;
}

/* ── Puzzle (game4) ── */
.puzzle-menu {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}
.puzzle-option {
  background: white;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1rem;
  text-align: center;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: .35rem;
  transition: all var(--transition);
  font-size: .9rem;
  color: var(--muted);
}
.puzzle-option:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.puzzle-option strong { font-family: var(--font-title); font-size: 1rem; color: var(--primary); }
.puzzle-icon { font-family: var(--font-title); font-size: 1.5rem; font-weight: 800; color: var(--secondary); }

.sudoku-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.sudoku-header h3 { font-family: var(--font-title); flex: 1; text-align: center; }
.sudoku-timer {
  background: var(--primary);
  color: white;
  padding: .3rem .8rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-title);
  font-weight: 700;
  font-size: .95rem;
}
#sudokuInstructions { color: var(--muted); font-size: .9rem; text-align: center; margin-bottom: 1.25rem; }

.sudoku-grid {
  display: grid;
  gap: 0;
  margin: 0 auto;
  width: fit-content;
  border: 3px solid var(--primary);
  border-radius: 4px;
  overflow: hidden;
}
.sudoku-cell {
  width: 48px; height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.1rem;
}
.sudoku-cell input {
  width: 100%; height: 100%;
  text-align: center;
  border: none;
  outline: none;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--info);
  background: transparent;
}
.sudoku-cell.given { background: var(--light); color: var(--primary); }
.sudoku-cell.given input { color: var(--primary); }
.sudoku-cell.error { background: rgba(231,76,60,.1); }
.sudoku-cell.correct-c { background: rgba(46,204,113,.1); }

.sudoku-actions {
  display: flex;
  gap: .75rem;
  margin-top: 1.25rem;
  justify-content: center;
  flex-wrap: wrap;
}
.sudoku-feedback {
  padding: .75rem 1rem;
  border-radius: var(--radius-sm);
  text-align: center;
  font-weight: 600;
  margin-top: .75rem;
}

/* Sequence game */
.sequence-game { max-width: 500px; margin: 0 auto; }
.seq-question {
  background: white;
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  font-family: var(--font-title);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
  letter-spacing: .05em;
}
.seq-input-row { display: flex; gap: .5rem; align-items: center; justify-content: center; }
.seq-input {
  width: 120px;
  padding: .65rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-title);
  font-size: 1.1rem;
  text-align: center;
  transition: border-color var(--transition);
}
.seq-input:focus { outline: none; border-color: var(--info); }
.seq-hint, .seq-feedback {
  padding: .6rem 1rem;
  border-radius: var(--radius-sm);
  margin-top: .75rem;
  font-size: .9rem;
}
.seq-hint { background: rgba(241,196,15,.1); border-left: 3px solid var(--accent); color: #8a6d00; }

/* Hanoi */
.hanoi-container {
  background: white;
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  min-height: 240px;
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: flex-end;
  margin-bottom: 1rem;
}
.hanoi-tower {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  width: 120px;
  cursor: pointer;
  padding: .5rem;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}
.hanoi-tower:hover { background: rgba(52,152,219,.05); }
.hanoi-tower.selected { background: rgba(52,152,219,.1); outline: 2px dashed var(--info); }
.hanoi-pole {
  width: 6px;
  background: var(--primary);
  border-radius: 3px;
  margin-bottom: 0;
}
.hanoi-base {
  width: 100%;
  height: 10px;
  background: var(--primary);
  border-radius: 5px;
  margin-top: .25rem;
}
.hanoi-label { font-size: .8rem; font-weight: 700; color: var(--muted); margin-top: .5rem; }
.hanoi-disk {
  height: 22px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  font-weight: 700;
  color: white;
  margin: 1px 0;
  transition: all .2s ease;
}
.hanoi-discs-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  min-height: 150px;
}
.hanoi-actions { display: flex; gap: .75rem; justify-content: center; align-items: center; flex-wrap: wrap; }
.form-select {
  padding: .5rem .75rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: .9rem;
  background: white;
  color: var(--primary);
}

/* ── Game 5 (Matemática Real) ── */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}
.category-card {
  background: white;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1rem;
  text-align: center;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: .35rem;
  transition: all var(--transition);
  font-size: .9rem;
  color: var(--muted);
}
.category-card:hover {
  border-color: #1abc9c;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.category-card strong { font-family: var(--font-title); font-size: 1rem; color: var(--primary); }
.cat-icon { font-size: 2.5rem; margin-bottom: .25rem; }
.cat-badge { font-size: 1.5rem; }

.problem-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.problem-card {
  background: white;
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}
.problem-text {
  font-size: 1.1rem;
  color: var(--primary);
  line-height: 1.6;
  margin-bottom: 1.25rem;
  font-weight: 500;
}
.problem-input-row { display: flex; gap: .5rem; align-items: center; margin-bottom: .75rem; }
.ans-prefix { font-weight: 700; color: var(--primary); font-size: 1rem; }
.problem-input {
  flex: 1;
  padding: .65rem .9rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  transition: border-color var(--transition);
  max-width: 200px;
}
.problem-input:focus { outline: none; border-color: #1abc9c; }
.problem-hint {
  background: rgba(241,196,15,.1);
  border-left: 3px solid var(--accent);
  padding: .65rem 1rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: .9rem;
  color: #8a6d00;
  margin: .5rem 0;
}
.problem-feedback {
  padding: .65rem 1rem;
  border-radius: var(--radius-sm);
  margin-top: .5rem;
  font-size: .9rem;
  font-weight: 600;
}
.problem-progress { margin-top: 1.5rem; }

/* ── Game 6 Chart Builder ── */
.chart-builder {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 1.5rem;
  align-items: start;
}
.chart-controls {
  background: white;
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.chart-controls h3 { font-family: var(--font-title); font-size: 1.1rem; margin-bottom: 1.25rem; color: var(--primary); }
.control-group { margin-bottom: 1.25rem; }
.control-group label { display: block; font-size: .85rem; font-weight: 600; color: var(--muted); margin-bottom: .4rem; text-transform: uppercase; letter-spacing: .03em; }
.form-input {
  width: 100%;
  padding: .55rem .8rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: .9rem;
  transition: border-color var(--transition);
}
.form-input:focus { outline: none; border-color: var(--info); }

.chart-type-btns { display: flex; gap: .4rem; flex-wrap: wrap; }
.chart-type-btn {
  padding: .4rem .8rem;
  border: 2px solid var(--border);
  border-radius: 6px;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  background: white;
  transition: all var(--transition);
}
.chart-type-btn:hover, .chart-type-btn.active {
  border-color: var(--info);
  background: rgba(52,152,219,.07);
  color: var(--info);
}

.data-row {
  display: grid;
  grid-template-columns: 1fr 80px 30px;
  gap: .35rem;
  margin-bottom: .4rem;
  align-items: center;
}

.color-input { width: 48px; height: 36px; border: 2px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; }

.templates-section { border-top: 1px solid var(--border); padding-top: 1rem; margin-top: 1rem; }
.templates-section h4 { font-size: .8rem; color: var(--muted); margin-bottom: .5rem; }
.template-btns { display: flex; gap: .4rem; flex-wrap: wrap; }

.chart-display {
  background: white;
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.chart-wrapper { position: relative; }
.chart-stats { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.chart-stats h4 { font-size: .9rem; font-weight: 700; color: var(--primary); margin-bottom: .5rem; }
.stats-row { display: flex; gap: 1.5rem; flex-wrap: wrap; font-size: .9rem; color: var(--muted); }
.stats-row strong { color: var(--primary); }

/* ── Game 7 Detective ── */
.detective-progress {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.detective-case {
  background: white;
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.case-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.case-badge { font-size: 2rem; }
.case-header h3 {
  font-family: var(--font-title);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: .25rem;
}
.case-header p { color: var(--muted); font-size: .9rem; }
.case-chart { margin-bottom: 1.5rem; }
.case-question h4 {
  font-family: var(--font-title);
  font-size: 1.05rem;
  color: var(--primary);
  margin-bottom: 1rem;
}
#detectiveIntro { text-align: center; padding: 2rem 0; }
#detectiveIntro h2 { font-family: var(--font-title); font-size: 1.5rem; color: var(--primary); margin-bottom: .5rem; }

/* ── Game 8 Statistics ── */
.stats-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 1.5rem;
  align-items: start;
}
.stats-input-panel {
  background: white;
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.stats-input-panel h3 { font-family: var(--font-title); font-size: 1.1rem; margin-bottom: .75rem; }
.data-textarea {
  width: 100%;
  min-height: 100px;
  padding: .75rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: .95rem;
  resize: vertical;
  transition: border-color var(--transition);
  margin: .5rem 0 1rem;
}
.data-textarea:focus { outline: none; border-color: #7f8c8d; }
.dataset-presets { margin-bottom: 1rem; }
.dataset-presets span { font-size: .85rem; color: var(--muted); display: block; margin-bottom: .4rem; }
.stats-results-panel {
  background: white;
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.stats-results-panel h3 { font-family: var(--font-title); font-size: 1.1rem; margin-bottom: 1rem; }
.stats-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: .75rem;
  margin-bottom: 1.5rem;
}
.stat-card {
  background: var(--light);
  border-radius: var(--radius-sm);
  padding: .85rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
.stat-label { font-size: .78rem; color: var(--muted); }
.stat-value {
  font-family: var(--font-title);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--info);
}
.chart-selector {
  display: flex;
  gap: .4rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.chart-sel-btn {
  padding: .35rem .9rem;
  border: 2px solid var(--border);
  border-radius: 6px;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  background: white;
  transition: all var(--transition);
}
.chart-sel-btn.active, .chart-sel-btn:hover {
  border-color: #7f8c8d;
  background: rgba(127,140,141,.08);
  color: var(--primary);
}

/* ── Game 9 Race ── */
.difficulty-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}
.diff-card {
  background: white;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1rem;
  text-align: center;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: .35rem;
  transition: all var(--transition);
  font-size: .875rem;
  color: var(--muted);
}
.diff-card:hover { border-color: var(--secondary); transform: translateY(-2px); box-shadow: var(--shadow); }
.diff-card strong { font-family: var(--font-title); font-size: 1.05rem; color: var(--primary); }
.diff-icon { font-size: 1.25rem; }
.best-scores { margin-top: 2rem; text-align: center; }
.best-scores h4 { font-family: var(--font-title); font-size: 1rem; color: var(--primary); margin-bottom: .75rem; }

.countdown-display {
  text-align: center;
  padding: 4rem 0;
}
.countdown-number {
  font-family: var(--font-title);
  font-size: 8rem;
  font-weight: 800;
  color: var(--secondary);
  animation: countPulse .5s ease;
}
@keyframes countPulse {
  from { transform: scale(1.5); opacity: .5; }
  to   { transform: scale(1);   opacity: 1; }
}

.race-hud {
  background: white;
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}
.race-timer {
  text-align: center;
  font-family: var(--font-title);
  font-size: 3rem;
  font-weight: 800;
  color: var(--secondary);
  margin-bottom: .25rem;
}
.timer-label { font-size: 1.5rem; }
.race-progress-row {
  display: flex;
  justify-content: space-around;
  font-size: .9rem;
  color: var(--muted);
  margin-bottom: .5rem;
}
.race-progress-row strong { color: var(--primary); }
.race-timer-bar {
  height: 8px;
  background: var(--border);
  border-radius: 50px;
  overflow: hidden;
}
.race-timer-bar > div {
  height: 100%;
  background: var(--secondary);
  border-radius: 50px;
  transition: width 1s linear;
}

.race-question {
  display: flex;
  gap: .75rem;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.question-display {
  background: white;
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
  font-family: var(--font-title);
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  box-shadow: var(--shadow);
  min-width: 200px;
  text-align: center;
  flex-shrink: 0;
}
.race-input {
  padding: .75rem 1rem;
  font-family: var(--font-title);
  font-size: 1.5rem;
  font-weight: 700;
  border: 3px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  width: 140px;
  transition: border-color var(--transition);
}
.race-input:focus { outline: none; border-color: var(--info); }
.btn-race {
  font-size: 1.25rem;
  padding: .75rem 1.25rem !important;
}
.race-feedback {
  text-align: center;
  font-family: var(--font-title);
  font-size: 1.2rem;
  font-weight: 700;
  min-height: 2rem;
}
.result-breakdown { color: var(--muted); font-size: .9rem; margin-bottom: 1rem; }

/* ── Game 10 Tournament ── */
.tournament-levels {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}
.level-card {
  background: white;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1rem;
  text-align: center;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: .35rem;
  transition: all var(--transition);
  position: relative;
}
.level-card.unlocked:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow); }
.level-card.locked { opacity: .5; cursor: not-allowed; background: var(--light); }
.level-num {
  font-family: var(--font-title);
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
}
.level-card strong { font-family: var(--font-title); font-size: 1rem; color: var(--primary); }
.level-card span:last-child { font-size: .8rem; color: var(--muted); }
.level-stars { font-size: 1rem; letter-spacing: .1em; }

.battle-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: .5rem;
  flex-wrap: wrap;
}
.battle-info { flex: 1; display: flex; gap: .75rem; align-items: center; justify-content: center; }
.battle-info span { font-size: .9rem; color: var(--muted); font-weight: 600; }
.battle-timer-wrap {
  font-family: var(--font-title);
  font-size: 1rem;
  font-weight: 700;
  color: var(--secondary);
}
.battle-timer-bar {
  height: 6px;
  background: var(--border);
  border-radius: 50px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}
.battle-timer-bar > div {
  height: 100%;
  background: var(--secondary);
  border-radius: 50px;
  transition: width 1s linear;
}

.equation-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1.5rem;
}
.equation-enemy {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .9rem;
  color: var(--muted);
}
.enemy-icon { font-size: 1.75rem; }
.equation-card {
  background: linear-gradient(135deg, var(--primary), #1a5276);
  color: white;
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow-md);
  min-width: 280px;
}
.equation-type { font-size: .8rem; color: rgba(255,255,255,.6); text-transform: uppercase; letter-spacing: .05em; margin-bottom: .5rem; }
.equation-expr {
  font-family: var(--font-title);
  font-size: 1.75rem;
  font-weight: 800;
}

.battle-input-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  justify-content: center;
  margin-bottom: .75rem;
  flex-wrap: wrap;
}
#inputLabel { font-family: var(--font-title); font-weight: 700; font-size: 1.1rem; color: var(--primary); }
.battle-input {
  width: 120px;
  padding: .65rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-title);
  font-size: 1.25rem;
  text-align: center;
  font-weight: 700;
  transition: border-color var(--transition);
}
.battle-input:focus { outline: none; border-color: var(--primary); }
.battle-hint-row { text-align: center; margin-bottom: .5rem; }
.battle-hint {
  background: rgba(241,196,15,.1);
  border-left: 3px solid var(--accent);
  padding: .75rem 1rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  text-align: left;
  font-size: .9rem;
  margin-top: .5rem;
}
.battle-feedback {
  padding: .75rem 1rem;
  border-radius: var(--radius-sm);
  text-align: center;
  font-weight: 600;
  font-size: 1rem;
}
.result-stars { font-size: 2rem; letter-spacing: .1em; margin-bottom: 1rem; }

/* ── Feedback colors ── */
.feedback-correct {
  background: rgba(46,204,113,.12);
  border-left: 4px solid var(--success);
  color: #27ae60;
}
.feedback-wrong {
  background: rgba(231,76,60,.12);
  border-left: 4px solid var(--secondary);
  color: #c0392b;
}
.feedback-info {
  background: rgba(52,152,219,.08);
  border-left: 4px solid var(--info);
  color: var(--primary);
}

/* ────────────────────────────────────────────────
   LANDING PAGE v2 (index.html)
──────────────────────────────────────────────────*/

/* Urgency strip */
.urgency-strip {
  background: linear-gradient(90deg, #27ae60, #2ecc71);
  color: white;
  text-align: center;
  padding: .55rem 1rem;
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .02em;
  position: sticky;
  top: var(--navbar-h);
  z-index: 150;
}

/* Hero override for landing */
.page-landing .hero {
  min-height: calc(90vh - var(--navbar-h));
}
.page-landing .hero-content {
  animation: none;
}

/* Animate up on load */
.animate-up {
  animation: animUp .7s cubic-bezier(.22,1,.36,1) both;
}
@keyframes animUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Glowing CTA button */
.btn-glow {
  box-shadow: 0 0 0 0 rgba(52,152,219,.6);
  animation: glow 2.2s ease-in-out infinite;
}
@keyframes glow {
  0%,100% { box-shadow: 0 0 0 0 rgba(52,152,219,.5); }
  50%      { box-shadow: 0 0 0 12px rgba(52,152,219,0); }
}

/* Hero stat divider */
.hero-stat-div {
  width: 1px;
  height: 36px;
  background: rgba(255,255,255,.2);
  align-self: center;
}

/* ── Contraste Section ── */
.contrast-section {
  background: white;
  padding: 5rem 0;
}
.contrast-eyebrow {
  text-align: center;
  color: var(--info);
  font-weight: 700;
  font-size: .85rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: .5rem;
}
.contrast-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1.5rem;
  align-items: center;
  margin-top: 2.5rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}
.contrast-card {
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  box-shadow: var(--shadow);
}
.contrast-before {
  background: #fff5f5;
  border: 2px solid #f8d7da;
}
.contrast-after {
  background: #f0fff4;
  border: 2px solid #c3e6cb;
}
.contrast-label {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 1.15rem;
  margin-bottom: 1rem;
}
.contrast-before .contrast-label { color: #c0392b; }
.contrast-after  .contrast-label { color: #27ae60; }
.contrast-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .65rem;
}
.contrast-list li {
  font-size: .95rem;
  color: var(--dark);
  line-height: 1.5;
  padding-left: 1.25rem;
  position: relative;
}
.contrast-before .contrast-list li::before { content: '✗'; position: absolute; left: 0; color: #e74c3c; font-weight: 700; }
.contrast-after  .contrast-list li::before { content: '✓'; position: absolute; left: 0; color: #27ae60; font-weight: 700; }
.contrast-arrow-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  color: var(--muted);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.contrast-arrow {
  font-size: 2rem;
  color: var(--info);
  font-weight: 900;
}

/* ── Featured Games ── */
.featured-games {
  background: #f8f9fa;
  padding: 5rem 0;
}
.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
}
.featured-card {
  background: white;
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  box-shadow: var(--shadow);
  border-top: 5px solid var(--fc, var(--primary));
  position: relative;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  text-decoration: none;
  color: inherit;
}
.featured-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}
.featured-card--highlight {
  background: linear-gradient(135deg, #1a252f, var(--fc, #2c3e50));
  color: white;
}
.featured-card--highlight h3 { color: white; }
.featured-card--highlight p  { color: rgba(255,255,255,.7); }
.featured-card--highlight .featured-cta { color: var(--accent); }
.featured-icon { font-size: 2.5rem; }
.featured-card h3 {
  font-family: var(--font-title);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0;
}
.featured-card p { color: var(--muted); font-size: .9rem; margin: 0; line-height: 1.5; flex: 1; }
.featured-cta {
  font-weight: 700;
  font-size: .9rem;
  color: var(--info);
  margin-top: .5rem;
}
.featured-badge-hot {
  position: absolute;
  top: .75rem;
  right: .75rem;
  background: var(--accent);
  color: var(--dark);
  font-size: .72rem;
  font-weight: 700;
  padding: .2rem .6rem;
  border-radius: 50px;
}
.featured-all-cta {
  text-align: center;
  margin-top: 2.5rem;
}

/* ── Social Proof ── */
.social-proof {
  background: white;
  padding: 5rem 0;
}
.proof-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
}
.proof-card {
  background: #f8f9fa;
  border-radius: var(--radius);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  border-left: 4px solid var(--info);
}
.proof-quote {
  font-size: .95rem;
  line-height: 1.6;
  color: var(--dark);
  font-style: italic;
}
.proof-quote::before { content: '"'; }
.proof-quote::after  { content: '"'; }
.proof-author { font-size: .82rem; color: var(--muted); font-weight: 600; }
.proof-stars  { font-size: .9rem; letter-spacing: .1em; }

.proof-seals {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 3rem;
}
.proof-seal {
  background: var(--light);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: .4rem 1rem;
  font-size: .85rem;
  font-weight: 600;
  color: var(--primary);
}

/* ────────────────────────────────────────────────
   GAMES CATALOG PAGE (/jogos)
──────────────────────────────────────────────────*/
.page-games .main-content { background: #f4f6f8; }

.games-page-header {
  background: white;
  border-bottom: 1px solid var(--border);
  padding: 2.5rem 0 0;
  position: sticky;
  top: var(--navbar-h);
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,.05);
}
.games-page-title h1 {
  font-family: var(--font-title);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary);
}
.games-page-title p { color: var(--muted); font-size: .95rem; margin-top: .25rem; }
.games-page-controls {
  margin-top: 1rem;
}
.search-wrap {
  display: flex;
  align-items: center;
  background: var(--light);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 .75rem;
  max-width: 360px;
  transition: border-color var(--transition);
}
.search-wrap:focus-within { border-color: var(--info); background: white; }
.search-icon { font-size: .9rem; margin-right: .4rem; }
.search-input {
  flex: 1;
  border: none;
  background: transparent;
  padding: .6rem .25rem;
  font-family: var(--font-body);
  font-size: .9rem;
  color: var(--dark);
}
.search-input:focus { outline: none; }
.games-catalog-body { padding: 2rem 0 5rem; }

.games-count {
  font-size: .85rem;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 1.25rem;
}

/* Card score badge */
.game-card-score {
  margin-top: .5rem;
  font-size: .78rem;
  font-weight: 700;
  color: var(--info);
}

/* Hot badge inside card header */
.card-hot-badge {
  background: var(--accent);
  color: var(--dark);
  font-size: .7rem;
  font-weight: 700;
  padding: .15rem .55rem;
  border-radius: 50px;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 4rem 0;
  color: var(--muted);
}
.empty-icon { font-size: 3rem; margin-bottom: 1rem; }

/* Staggered card animation */
.animate-card {
  animation: cardIn .5s cubic-bezier(.22,1,.36,1) both;
}
.animate-card:nth-child(1)  { animation-delay: .05s; }
.animate-card:nth-child(2)  { animation-delay: .10s; }
.animate-card:nth-child(3)  { animation-delay: .15s; }
.animate-card:nth-child(4)  { animation-delay: .20s; }
.animate-card:nth-child(5)  { animation-delay: .25s; }
.animate-card:nth-child(6)  { animation-delay: .30s; }
.animate-card:nth-child(7)  { animation-delay: .35s; }
.animate-card:nth-child(8)  { animation-delay: .40s; }
.animate-card:nth-child(9)  { animation-delay: .45s; }
.animate-card:nth-child(10) { animation-delay: .50s; }
@keyframes cardIn {
  from { opacity: 0; transform: translateY(20px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ────────────────────────────────────────────────
   SERIES TABS (shared)
──────────────────────────────────────────────────*/
.series-nav {
  background: white;
  padding: 2.5rem 0 1.5rem;
  border-bottom: 1px solid var(--border);
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .chart-builder { grid-template-columns: 1fr; }
  .stats-layout  { grid-template-columns: 1fr; }
  .featured-grid { grid-template-columns: 1fr; }
  .proof-grid    { grid-template-columns: 1fr; }
  .contrast-grid { grid-template-columns: 1fr; }
  .contrast-arrow-wrap { display: none; }
}

@media (max-width: 700px) {
  .navbar-links { display: none; }
  .navbar-toggle { display: block; }
  .footer-inner { grid-template-columns: 1fr; }
  .step-arrow { transform: rotate(90deg); }
  .hanoi-container { gap: .25rem; }
  .hanoi-tower { width: 90px; }
  .sudoku-cell { width: 38px; height: 38px; font-size: .95rem; }
  .sudoku-cell input { font-size: .95rem; }
  .game-header { padding: 1rem; }
  .game-header-info h1 { font-size: 1.1rem; }
  .games-page-header { position: static; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 2rem; }
  .hero-cta { flex-direction: column; align-items: center; }
  .hero-stats { gap: 1.25rem; }
  .games-grid { grid-template-columns: 1fr; }
  .game-container { padding: 1.25rem .75rem 3rem; }
  .question-display { font-size: 1.5rem; }
  .race-input { width: 110px; }
  .urgency-strip { font-size: .75rem; }
}

