:root {
  --bg: #f7f9fc;
  --surface: #ffffff;
  --surface-alt: #eef2ff;
  --text: #181c32;
  --text-muted: #56607a;
  --primary: #4f46e5;
  --primary-dark: #3730a3;
  --primary-light: #818cf8;
  --accent-amber: #f59e0b;
  --accent-amber-dark: #d97706;
  --accent-emerald: #10b981;
  --accent-emerald-dark: #059669;
  --accent-pink: #ec4899;
  --accent-sky: #0ea5e9;
  --border: #e2e8f0;
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --shadow-sm: 0 4px 12px rgba(24, 28, 50, 0.05);
  --shadow-md: 0 12px 28px rgba(79, 70, 229, 0.1);
  --shadow-lg: 0 20px 44px rgba(24, 28, 50, 0.12);
  --font-display: 'Fredoka', system-ui, -apple-system, sans-serif;
  --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

.container {
  width: min(1160px, 92%);
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 249, 252, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--text);
}

.brand-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.brand-tag {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--surface-alt);
  color: var(--primary);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.nav-links a:hover {
  color: var(--primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.mobile-menu-btn {
  display: none;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.65rem;
  cursor: pointer;
  color: var(--text);
  font-weight: 700;
}

/* Tactile 3D Arcade Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.75rem 1.35rem;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease, background 0.14s ease;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 0 var(--primary-dark);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 var(--primary-dark);
}

.btn-primary:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--primary-dark);
}

.btn-amber {
  background: var(--accent-amber);
  color: #181c32;
  box-shadow: 0 4px 0 var(--accent-amber-dark);
}

.btn-amber:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 var(--accent-amber-dark);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 2px solid var(--border);
  box-shadow: 0 4px 0 var(--border);
}

.btn-secondary:hover {
  border-color: var(--primary-light);
  transform: translateY(-2px);
}

/* Hero Section */
.hero {
  padding: 3.5rem 0 4rem;
  background:
    radial-gradient(circle at 12% 18%, rgba(79, 70, 229, 0.1), transparent 38%),
    radial-gradient(circle at 88% 22%, rgba(245, 158, 11, 0.12), transparent 36%),
    radial-gradient(circle at 78% 82%, rgba(16, 185, 129, 0.1), transparent 32%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 2.5rem;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: #ffffff;
  border: 2px solid #e0e7ff;
  color: var(--primary);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.86rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.15rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4.2vw, 3.3rem);
  line-height: 1.14;
  margin: 0 0 1rem;
  letter-spacing: -0.01em;
}

.hero h1 .highlight {
  color: var(--primary);
}

.hero-desc {
  font-size: 1.08rem;
  color: var(--text-muted);
  margin: 0 0 1.75rem;
  max-width: 56ch;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-bottom: 2rem;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.stat-item strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--text);
}

.stat-item span {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Hero Visual Showcase */
.hero-showcase {
  background: var(--surface);
  border: 2px solid var(--border);
  border-bottom: 6px solid #cbd5e1;
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  box-shadow: var(--shadow-lg);
}

.showcase-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.showcase-dots {
  display: flex;
  gap: 0.4rem;
}

.showcase-dots span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.showcase-dots span:nth-child(1) { background: #fb7185; }
.showcase-dots span:nth-child(2) { background: #fbbf24; }
.showcase-dots span:nth-child(3) { background: #34d399; }

.showcase-pill {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-emerald-dark);
  background: #d1fae5;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
}

.mini-game-list {
  display: grid;
  gap: 0.85rem;
}

.mini-game-card {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.85rem;
  border-radius: var(--radius-md);
  background: var(--bg);
  border: 2px solid var(--border);
  transition: transform 0.16s ease, border-color 0.16s ease;
}

.mini-game-card:hover {
  transform: translateX(4px);
  border-color: var(--primary-light);
}

.mini-thumb {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  color: #fff;
  flex-shrink: 0;
}

.thumb-indigo { background: linear-gradient(135deg, #6366f1, #4f46e5); }
.thumb-amber { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #181c32; }
.thumb-emerald { background: linear-gradient(135deg, #34d399, #10b981); }

.mini-game-info h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin: 0 0 0.15rem;
}

.mini-game-info p {
  margin: 0;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.age-chip {
  margin-left: auto;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  background: #ffffff;
  border: 1.5px solid var(--border);
  white-space: nowrap;
}

/* Sections */
.section {
  padding: 4.25rem 0;
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 2.5rem;
}

.section-kicker {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary);
  margin-bottom: 0.45rem;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  margin: 0 0 0.65rem;
}

.section-header p {
  margin: 0;
  color: var(--text-muted);
}

/* Filter Tabs */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
  margin-bottom: 2rem;
}

.filter-btn {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.55rem 1.15rem;
  border-radius: 999px;
  border: 2px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-btn.active,
.filter-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

/* Games Grid */
.games-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.game-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-bottom: 5px solid #cbd5e1;
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.game-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.game-card.hidden {
  display: none;
}

.game-cover {
  height: 156px;
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #ffffff;
  position: relative;
}

.cover-1 { background: linear-gradient(135deg, #4f46e5, #0ea5e9); }
.cover-2 { background: linear-gradient(135deg, #f59e0b, #ec4899); }
.cover-3 { background: linear-gradient(135deg, #10b981, #0ea5e9); }
.cover-4 { background: linear-gradient(135deg, #8b5cf6, #ec4899); }
.cover-5 { background: linear-gradient(135deg, #0ea5e9, #6366f1); }
.cover-6 { background: linear-gradient(135deg, #f97316, #f59e0b); }

.cover-badges {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cover-pill {
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(6px);
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
}

.cover-title {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
}

.game-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.game-body h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin: 0 0 0.45rem;
}

.game-body p {
  margin: 0 0 1rem;
  font-size: 0.92rem;
  color: var(--text-muted);
  flex: 1;
}

.game-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.game-tags span {
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.22rem 0.6rem;
  border-radius: 8px;
  background: var(--bg);
  color: var(--text-muted);
}

/* Pillars / Features */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.feature-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-bottom: 5px solid #cbd5e1;
  border-radius: var(--radius-md);
  padding: 1.6rem;
}

.feature-icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.icon-indigo { background: #e0e7ff; color: var(--primary); }
.icon-emerald { background: #d1fae5; color: var(--accent-emerald-dark); }
.icon-amber { background: #fef3c7; color: var(--accent-amber-dark); }

.feature-card h3 {
  font-family: var(--font-display);
  font-size: 1.22rem;
  margin: 0 0 0.5rem;
}

.feature-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Steps / Login CTA Banner */
.cta-banner {
  background: linear-gradient(135deg, #4f46e5, #3730a3);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 2.75rem;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  align-items: center;
  box-shadow: var(--shadow-lg);
}

.cta-banner h2 {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 2.8vw, 2.25rem);
  margin: 0 0 0.65rem;
}

.cta-banner p {
  margin: 0 0 1.4rem;
  color: #e0e7ff;
}

.steps-mini {
  display: grid;
  gap: 0.75rem;
}

.step-box {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.92rem;
}

.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-amber);
  color: #181c32;
  font-family: var(--font-display);
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

/* FAQ */
.faq-list {
  max-width: 820px;
  margin-inline: auto;
  display: grid;
  gap: 0.9rem;
}

.faq-item {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  background: transparent;
  border: none;
  padding: 1.15rem 1.35rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.faq-answer {
  padding: 0 1.35rem 1.2rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  display: none;
}

.faq-item.open .faq-answer {
  display: block;
}

.faq-item.open .faq-chevron {
  transform: rotate(180deg);
}

.faq-chevron {
  transition: transform 0.2s ease;
  font-weight: 700;
  color: var(--primary);
}

/* Login Page Layout */
.login-shell {
  min-height: calc(100vh - 150px);
  display: grid;
  place-items: center;
  padding: 3rem 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(79, 70, 229, 0.1), transparent 36%),
    radial-gradient(circle at 85% 80%, rgba(16, 185, 129, 0.1), transparent 36%);
}

.login-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 2.25rem;
  align-items: stretch;
}

.login-info-card {
  background: linear-gradient(155deg, #4f46e5, #3730a3);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-lg);
}

.login-info-card h1 {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3vw, 2.4rem);
  margin: 0 0 0.75rem;
  line-height: 1.15;
}

.login-info-card p {
  color: #e0e7ff;
  margin: 0 0 1.5rem;
}

.trust-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.85rem;
}

.trust-list li {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.trust-check {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-emerald);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-size: 0.82rem;
  flex-shrink: 0;
}

.login-form-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-bottom: 6px solid #cbd5e1;
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  box-shadow: var(--shadow-md);
}

.role-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  background: var(--bg);
  padding: 0.4rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
}

.role-tab {
  border: none;
  background: transparent;
  padding: 0.6rem 0.75rem;
  border-radius: 9px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text-muted);
  cursor: pointer;
}

.role-tab.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.form-group {
  margin-bottom: 1.1rem;
}

.form-group label {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
}

.form-control {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.98rem;
  color: var(--text);
  background: var(--bg);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  background: #ffffff;
}

.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  font-size: 0.88rem;
}

.form-status {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 600;
  display: none;
}

.form-status.success {
  display: block;
  background: #d1fae5;
  color: #065f46;
  border: 1.5px solid #34d399;
}

.form-status.error {
  display: block;
  background: #ffe4e6;
  color: #9f1239;
  border: 1.5px solid #fb7185;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.breadcrumb a:hover {
  color: var(--primary);
}

/* Footer */
.site-footer {
  background: #181c32;
  color: #cbd5e1;
  padding: 3rem 0 1.75rem;
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand {
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.65rem;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.footer-col h4 {
  color: #ffffff;
  font-family: var(--font-display);
  margin: 0 0 0.8rem;
  font-size: 1.05rem;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.5rem;
  font-size: 0.92rem;
}

.footer-col a:hover {
  color: #ffffff;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.85rem;
  color: #94a3b8;
}

@media (max-width: 960px) {
  .hero-grid,
  .games-grid,
  .features-grid,
  .cta-banner,
  .login-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .nav-links {
    display: none;
  }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    padding: 1.25rem;
    border-bottom: 2px solid var(--border);
    box-shadow: var(--shadow-md);
  }

  .mobile-menu-btn {
    display: inline-flex;
  }
}
