/* ============================================================
   مغامرات ناصر ونور الرقمية — Final Merged Stylesheet
   UI: Graphics (Baloo Bhaijaan 2 + Cairo, deep green + amber)
   Features: The Game (4 working mini-games + adventure quizzes)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Baloo+Bhaijaan+2:wght@400;500;600;700;800&family=Cairo:wght@300;400;600;700;800;900&display=swap');

/* ====== CSS Variables ====== */
:root {
  /* Palette (from Graphics) */
  --primary:        #1A4D2E;
  --primary-dark:   #0F3320;
  --primary-light:  #2D7A4A;
  --secondary:      #D97706;
  --secondary-dark: #B45309;
  --accent:         #D97706;

  /* Backward-compat aliases (used by main.js inline styles) */
  --nasser-color: #1A4D2E;
  --noor-color:   #D97706;
  --noor-light:   #FDE68A;

  /* Surface */
  --bg-light:  #F0FDF4;
  --bg-white:  #FFFFFF;
  --text-dark: #0F3320;
  --text-mid:  #1A4D2E;
  --text-light:#4A7C5A;

  /* Tokens */
  --shadow:       0 4px 24px rgba(26,77,46,0.10);
  --shadow-hover: 0 12px 40px rgba(26,77,46,0.20);
  --radius:    16px;
  --radius-lg: 24px;
  --transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
}

/* ====== Reset ====== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Cairo', sans-serif;
  direction: rtl;
  background: var(--bg-light);
  color: var(--text-dark);
  overflow-x: hidden;
  line-height: 1.7;
}
img { max-width: 100%; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; font-family: 'Cairo', sans-serif; }

/* ====== Scrollbar ====== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #e8f5e9; }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 4px; }

/* ====== Particles ====== */
.particles {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none; z-index: 0; overflow: hidden;
}
.particle {
  position: absolute; font-size: 1.1rem; opacity: 0.1;
  animation: floatParticle linear infinite; user-select: none;
}
@keyframes floatParticle {
  0%   { transform: translateY(100vh) rotate(0deg); opacity: 0; }
  10%  { opacity: 0.1; }
  90%  { opacity: 0.1; }
  100% { transform: translateY(-100px) rotate(360deg); opacity: 0; }
}

/* ====== Container ====== */
.container {
  max-width: 1200px; margin: 0 auto;
  padding: 0 20px; position: relative; z-index: 1;
}

/* ====================================================
   NAVBAR
   ==================================================== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  padding: 14px 0;
  background: transparent;
  transition: var(--transition);
}
.navbar.scrolled {
  padding: 10px 0;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(20px);
  box-shadow: 0 2px 24px rgba(0,0,0,0.08);
}
.nav-container {
  max-width: 1200px; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}

/* Logo */
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  background: none; padding: 0;
  transition: var(--transition);
}
.nav-logo:hover { opacity: 0.85; }
.logo-block {
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--primary); color: white;
  font-family: 'Baloo Bhaijaan 2', sans-serif;
  font-size: 1.2rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(26,77,46,0.3);
  transition: var(--transition);
}
.nav-logo:hover .logo-block { transform: scale(1.08); }
.logo-text {
  font-family: 'Baloo Bhaijaan 2', sans-serif;
  font-size: 1.1rem; font-weight: 700;
  color: white;
  transition: var(--transition);
}
.navbar.scrolled .logo-text { color: var(--primary); }

/* Nav links */
.nav-links {
  display: flex; align-items: center; gap: 2px;
}
.nav-link {
  padding: 8px 14px; border-radius: 10px;
  font-size: 0.9rem; font-weight: 600;
  color: rgba(255,255,255,0.9);
  transition: var(--transition);
}
.navbar.scrolled .nav-link { color: var(--primary); }
.nav-link:hover,
.nav-link.active {
  background: rgba(255,255,255,0.15);
  color: white;
}
.navbar.scrolled .nav-link:hover,
.navbar.scrolled .nav-link.active {
  background: rgba(26,77,46,0.08);
  color: var(--secondary);
}

/* Actions */
.nav-actions { display: flex; align-items: center; gap: 10px; }
.btn-start-nav {
  padding: 10px 22px;
  background: var(--secondary);
  color: white; border-radius: 12px;
  font-size: 0.9rem; font-weight: 700;
  transition: var(--transition);
  white-space: nowrap;
  font-family: 'Baloo Bhaijaan 2', sans-serif;
}
.btn-start-nav:hover {
  background: var(--secondary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(217,119,6,0.35);
}

/* Hamburger */
.hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; padding: 8px;
}
.hamburger span {
  width: 24px; height: 2px; border-radius: 2px;
  background: white; transition: var(--transition); display: block;
}
.navbar.scrolled .hamburger span { background: var(--primary); }

/* Mobile open */
.nav-links.open {
  display: flex; flex-direction: column;
  position: absolute; top: 100%; left: 0; right: 0;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(20px);
  padding: 16px 20px;
  gap: 4px;
  border-bottom: 1px solid rgba(26,77,46,0.1);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}
.nav-links.open .nav-link { color: var(--primary); }
.nav-links.open .nav-link:hover { background: rgba(26,77,46,0.06); color: var(--secondary); }


/* ====================================================
   HERO SECTION
   ==================================================== */
.hero {
  min-height: 100vh; position: relative;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 120px 20px 80px; overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg-img { width: 100%; height: 100%; object-fit: cover; }
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(26,77,46,0.72) 0%,
    rgba(26,77,46,0.42) 40%,
    rgba(26,77,46,0.80) 100%
  );
}

/* Floating deco bubbles */
.hero-float {
  position: absolute; border-radius: 50%;
  opacity: 0.15; pointer-events: none;
}
.hero-float-1 {
  width: 80px; height: 80px; top: 20%; left: 8%;
  background: var(--secondary);
  animation: floatBubble 4s ease-in-out infinite;
}
.hero-float-2 {
  width: 56px; height: 56px; top: 38%; right: 12%;
  background: rgba(255,255,255,0.6);
  animation: floatBubble 3.5s ease-in-out infinite 0.6s;
}
@keyframes floatBubble {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-16px); }
}

/* Hero content */
.hero-content {
  position: relative; z-index: 2;
  text-align: center; max-width: 720px;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 8px 20px; border-radius: 50px;
  font-size: 0.85rem; font-weight: 600;
  color: rgba(255,255,255,0.92); margin-bottom: 24px;
}
.badge-icon { color: var(--secondary); }

.hero-title {
  font-family: 'Baloo Bhaijaan 2', sans-serif;
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 800; color: white;
  line-height: 1.2; margin-bottom: 16px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.hero-title-sub { color: var(--secondary); }
.name-nasser { color: #86EFAC; }
.name-noor   { color: #FDE68A; }

.hero-subtitle {
  font-size: 1.1rem; color: rgba(255,255,255,0.88);
  margin-bottom: 8px; max-width: 600px; margin-left: auto; margin-right: auto;
}
.hero-subtext {
  font-size: 0.95rem; color: rgba(255,255,255,0.65);
  margin-bottom: 32px;
}

.hero-buttons { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn-primary {
  padding: 15px 32px;
  background: var(--secondary); color: white;
  border-radius: 14px; font-size: 1rem; font-weight: 800;
  font-family: 'Baloo Bhaijaan 2', sans-serif;
  transition: var(--transition); display: flex; align-items: center; gap: 8px;
  box-shadow: 0 8px 24px rgba(217,119,6,0.4);
}
.btn-primary:hover { background: var(--secondary-dark); transform: translateY(-3px); box-shadow: 0 14px 32px rgba(217,119,6,0.5); }
.btn-secondary {
  padding: 15px 32px;
  background: rgba(255,255,255,0.12); color: white;
  border-radius: 14px; font-size: 1rem; font-weight: 600;
  border: 1.5px solid rgba(255,255,255,0.3);
  backdrop-filter: blur(8px); transition: var(--transition);
}
.btn-secondary:hover { background: rgba(255,255,255,0.22); transform: translateY(-3px); }

/* Hero character cards */
.hero-characters {
  position: relative; z-index: 2;
  display: flex; gap: 20px; align-items: center;
  margin-top: 36px; flex-wrap: wrap; justify-content: center;
}
.character-card {
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(16px);
  border-radius: var(--radius-lg); padding: 20px 24px;
  text-align: center; min-width: 160px;
  transition: var(--transition); border: 2px solid transparent;
  box-shadow: var(--shadow);
}
.nasser-card { border-color: rgba(26,77,46,0.25); }
.noor-card   { border-color: rgba(217,119,6,0.25); }
.character-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-hover); }

.character-avatar-img {
  width: 120px; height: 150px; margin: 0 auto 10px;
  border-radius: 14px; overflow: hidden;
  border: 2.5px solid rgba(26,77,46,0.2);
  background: linear-gradient(135deg, #e8f5e9, #f1f8e9);
}
.noor-card .character-avatar-img {
  border-color: rgba(217,119,6,0.2);
  background: linear-gradient(135deg, #FEF3C7, #FFFBEB);
}
.character-avatar-img img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform 0.4s; }
.character-card:hover .character-avatar-img img { transform: scale(1.06); }

.character-name { font-family: 'Baloo Bhaijaan 2', sans-serif; font-size: 1.2rem; font-weight: 800; color: var(--primary); }
.noor-card .character-name { color: var(--secondary-dark); }
.character-desc { font-size: 0.78rem; color: var(--text-light); margin: 4px 0; }
.character-badge {
  font-size: 0.72rem; font-weight: 700;
  padding: 4px 10px; border-radius: 50px; margin-top: 8px; display: inline-block;
  background: linear-gradient(135deg, #dcfce7, #bbf7d0); color: var(--primary);
}
.noor-badge { background: linear-gradient(135deg, #FEF3C7, #FDE68A); color: var(--secondary-dark); }

.vs-badge {
  font-size: 1.1rem; font-weight: 900; color: white;
  background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
  width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(217,119,6,0.4);
}

/* Scroll indicator */
.scroll-indicator {
  position: relative; z-index: 2; margin-top: 36px; cursor: pointer;
}
.scroll-dot-wrap {
  width: 28px; height: 44px;
  border: 2px solid rgba(255,255,255,0.35); border-radius: 14px;
  display: flex; justify-content: center; padding-top: 6px;
  margin: 0 auto;
}
.scroll-dot {
  width: 6px; height: 12px;
  background: rgba(255,255,255,0.55); border-radius: 3px;
  animation: scrollAnim 2s ease-in-out infinite;
}
@keyframes scrollAnim {
  0%, 100% { transform: translateY(0); opacity: 1; }
  60%       { transform: translateY(12px); opacity: 0.2; }
}


/* ====================================================
   GENERAL SECTION STYLES
   ==================================================== */
.section { padding: 96px 0; position: relative; }

.section-header { text-align: center; margin-bottom: 56px; }
.section-tag {
  display: inline-block;
  background: rgba(26,77,46,0.08); color: var(--primary);
  padding: 7px 18px; border-radius: 50px;
  font-size: 0.82rem; font-weight: 700;
  letter-spacing: 0.03em; margin-bottom: 14px;
}
.section-tag.green-tag  { background: rgba(26,77,46,0.08); color: var(--primary); }
.section-tag.amber-tag  { background: rgba(217,119,6,0.10); color: var(--secondary); }
.section-tag.light-tag  { background: rgba(255,255,255,0.15); color: rgba(255,255,255,0.9); }
.section-tag.vision-tag { background: rgba(217,119,6,0.18); color: var(--secondary); }

.section-title {
  font-family: 'Baloo Bhaijaan 2', sans-serif;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 800; color: var(--primary); margin-bottom: 12px; line-height: 1.2;
}
.light-title  { color: white; }
.vision-title { color: white; }

.section-desc { font-size: 1rem; color: var(--text-light); max-width: 600px; margin: 0 auto; line-height: 1.8; }
.light-desc   { color: rgba(255,255,255,0.7); }
.vision-desc  { color: rgba(255,255,255,0.65); }


/* ====================================================
   HEROES / CHARACTERS SECTION
   ==================================================== */
.heroes-section { background: white; }

.heroes-grid {
  display: grid; grid-template-columns: 1fr auto 1fr;
  gap: 32px; align-items: start;
}

/* Profile Cards */
.hero-profile-card {
  background: white; border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow);
  transition: var(--transition); border: 2px solid rgba(26,77,46,0.08);
}
.hero-profile-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.nasser-profile { border-top: 4px solid var(--primary); }
.noor-profile   { border-top: 4px solid var(--secondary); }

.profile-header {
  padding: 24px; background: linear-gradient(135deg, #dcfce7, #f0fdf4);
  display: flex; align-items: center; gap: 16px;
}
.noor-header { background: linear-gradient(135deg, #FEF3C7, #FFFBEB); }

.profile-avatar-wrap { position: relative; }
.profile-avatar {
  font-size: 3.5rem; width: 90px; height: 110px;
  background: white; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  border: 2.5px solid var(--primary); overflow: hidden;
}
.noor-avatar { border-color: var(--secondary); }
.profile-avatar-img img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform 0.4s; }
.hero-profile-card:hover .profile-avatar-img img { transform: scale(1.05); }

.level-badge {
  position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%);
  background: var(--secondary); color: white;
  font-size: 0.6rem; font-weight: 700; padding: 3px 8px;
  border-radius: 50px; white-space: nowrap;
}
.noor-level { background: var(--secondary-dark); }

.profile-info h3 {
  font-family: 'Baloo Bhaijaan 2', sans-serif;
  font-size: 1.6rem; font-weight: 800; color: var(--primary); line-height: 1;
}
.noor-name { color: var(--secondary-dark) !important; }
.profile-role  { font-size: 0.82rem; color: var(--text-light); margin: 4px 0; }
.profile-stars { font-size: 0.85rem; }

.profile-body { padding: 24px; }
.profile-story { color: var(--text-mid); font-size: 0.88rem; line-height: 1.7; margin-bottom: 16px; }

/* Character trait tags */
.char-traits { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.char-trait {
  padding: 4px 10px; border-radius: 50px; font-size: 0.72rem; font-weight: 600;
  background: rgba(26,77,46,0.07); color: var(--primary);
}
.noor-trait { background: rgba(217,119,6,0.08); color: var(--secondary-dark); }

/* Skill bars */
.skill { margin-bottom: 10px; }
.skill-name { font-size: 0.82rem; font-weight: 600; color: var(--text-mid); display: block; margin-bottom: 5px; }
.skill-bar { background: #e8f5e9; height: 7px; border-radius: 4px; overflow: hidden; }
.skill-fill { height: 100%; background: linear-gradient(90deg, var(--primary-light), var(--primary)); border-radius: 4px; transition: width 1.5s ease; }
.noor-bar  { background: #FEF3C7; }
.noor-fill { background: linear-gradient(90deg, #FDE68A, var(--secondary)); }

/* Achievements */
.profile-achievements { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.achievement {
  font-size: 0.72rem; padding: 5px 10px;
  background: #f0fdf4; border-radius: 50px;
  color: var(--primary); font-weight: 600;
  border: 1px solid rgba(26,77,46,0.12);
}
.noor-ach { background: #FFFBEB; color: var(--secondary-dark); border-color: rgba(217,119,6,0.12); }

/* Center characters image */
.heroes-center {
  display: flex; flex-direction: column;
  align-items: center; gap: 24px; padding-top: 28px;
}
.center-chars-img {
  position: relative;
}
.center-chars-img::before {
  content: '';
  position: absolute;
  inset: -12px;
  background: radial-gradient(ellipse, rgba(26,77,46,0.12) 0%, rgba(217,119,6,0.08) 60%, transparent 80%);
  border-radius: 50%;
  filter: blur(16px);
}
.center-chars-img img {
  position: relative;
  width: 180px;
  height: 180px;
  object-fit: contain;
  drop-shadow: 0 8px 24px rgba(26,77,46,0.25);
  filter: drop-shadow(0 8px 24px rgba(26,77,46,0.25));
}
.connect-line { width: 2px; height: 40px; background: linear-gradient(to bottom, var(--primary), transparent); }

.shared-stats { display: flex; flex-direction: column; gap: 14px; width: 100%; }
.shared-stat { text-align: center; }
.shared-stat-num { font-family: 'Baloo Bhaijaan 2', sans-serif; font-size: 1.6rem; font-weight: 800; color: var(--primary); line-height: 1; }
.shared-stat-label { font-size: 0.72rem; color: var(--text-light); margin-top: 2px; }


/* ====================================================
   ADVENTURES SECTION
   ==================================================== */
.adventures-section { background: var(--bg-light); }

/* Filter bar */
.filter-bar {
  display: flex; gap: 8px; flex-wrap: wrap;
  justify-content: center; margin-bottom: 40px;
}
.filter-btn {
  padding: 10px 20px; border-radius: 50px;
  font-size: 0.88rem; font-weight: 600;
  background: white; color: var(--text-mid);
  border: 1.5px solid rgba(26,77,46,0.15);
  transition: var(--transition);
}
.filter-btn:hover { border-color: var(--primary); color: var(--primary); }
.filter-btn.active { background: var(--primary); color: white; border-color: var(--primary); }

/* Adventures grid */
.adventures-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 24px;
}
.adv-card {
  background: white; border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid rgba(26,77,46,0.06);
  display: flex; flex-direction: column;
}
.adv-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.adv-card.hidden { display: none; }

/* Image header */
.adv-card-img {
  position: relative; height: 200px;
  background-size: cover; background-position: center;
  overflow: hidden;
}
.adv-card-img::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.58) 0%, transparent 60%);
}
.adv-card:hover .adv-card-img { /* zoom via transform on pseudo */  }
.adv-card:hover .adv-card-img { background-size: 108% auto; }

.adv-grade-num {
  position: absolute; top: 14px; right: 14px;
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: white; font-family: 'Baloo Bhaijaan 2', sans-serif;
  font-size: 1.2rem; font-weight: 800;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.adv-grade-label {
  position: absolute; bottom: 12px; right: 12px;
  background: rgba(255,255,255,0.18); backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.2);
  color: white; font-size: 0.72rem; font-weight: 600;
  padding: 3px 10px; border-radius: 20px;
}

/* Card body */
.adv-card-body { padding: 18px 18px 10px; flex: 1; }
.adv-title {
  font-family: 'Baloo Bhaijaan 2', sans-serif;
  font-size: 1.15rem; font-weight: 800; margin-bottom: 4px;
}
.adv-location { font-size: 0.78rem; color: var(--text-light); margin-bottom: 8px; }
.adv-desc { font-size: 0.85rem; color: var(--text-mid); line-height: 1.6; margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.adv-skills { display: flex; gap: 6px; flex-wrap: wrap; }
.adv-skill-tag { padding: 3px 10px; border-radius: 20px; font-size: 0.72rem; font-weight: 600; }

/* Card footer */
.adv-card-footer {
  padding: 12px 18px 18px;
  display: flex; align-items: center; justify-content: space-between;
  border-top: 1px solid rgba(26,77,46,0.06);
}
.adv-meta { display: flex; gap: 12px; font-size: 0.78rem; color: var(--text-light); }
.adv-meta i { margin-left: 3px; }
.adv-btn {
  padding: 9px 18px; border-radius: 10px;
  color: white; font-size: 0.85rem; font-weight: 700;
  transition: var(--transition); display: flex; align-items: center; gap: 6px;
  background: var(--primary);
}
.adv-btn:hover { filter: brightness(1.12); transform: translateY(-1px); }
.adv-btn-locked { opacity: 0.6; cursor: not-allowed; }
.adv-btn-locked:hover { filter: none; transform: none; }


/* ====================================================
   GAMES SECTION
   ==================================================== */
.games-section {
  background: var(--primary);
  position: relative; overflow: hidden;
}
.games-section::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 60px;
  background: var(--bg-light);
  clip-path: ellipse(55% 100% at 50% 0%);
}

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

.game-card {
  background: white; border-radius: var(--radius-lg);
  overflow: hidden; cursor: pointer;
  transition: var(--transition);
  display: flex; flex-direction: column;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.game-card:hover { transform: translateY(-8px); box-shadow: 0 16px 40px rgba(0,0,0,0.25); }

.game-icon-wrap {
  position: relative; padding: 28px 0 20px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #dcfce7, #f0fdf4);
}
.game-icon { font-size: 3rem; position: relative; z-index: 1; }
.game-glow {
  position: absolute; width: 80px; height: 80px; border-radius: 50%;
  background: rgba(26,77,46,0.12); filter: blur(16px);
}
.science-glow { background: rgba(217,119,6,0.12); }
.puzzle-glow  { background: rgba(59,130,246,0.12); }
.word-glow    { background: rgba(139,92,246,0.12); }

.game-body { padding: 16px 18px; flex: 1; }
.game-title {
  font-family: 'Baloo Bhaijaan 2', sans-serif;
  font-size: 1.1rem; font-weight: 800; color: var(--primary); margin-bottom: 6px;
}
.game-desc { font-size: 0.82rem; color: var(--text-mid); line-height: 1.6; margin-bottom: 12px; }
.game-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.game-level {
  padding: 3px 10px; border-radius: 20px; font-size: 0.72rem; font-weight: 700;
}
.easy   { background: #dcfce7; color: #166534; }
.medium { background: #FEF3C7; color: #92400E; }
.hard   { background: #fee2e2; color: #991b1b; }
.game-players { font-size: 0.72rem; color: var(--text-light); }
.game-players i { margin-left: 3px; }

.game-footer {
  padding: 12px 18px 16px;
  display: flex; align-items: center; justify-content: space-between;
  border-top: 1px solid rgba(26,77,46,0.06);
}
.game-score-info { font-size: 0.78rem; color: var(--text-light); }
.game-score-info b { color: var(--primary); font-weight: 700; }

.game-play-btn {
  padding: 8px 16px; background: var(--primary); color: white;
  border-radius: 10px; font-size: 0.82rem; font-weight: 700;
  transition: var(--transition); display: flex; align-items: center; gap: 5px;
}
.game-play-btn:hover { background: var(--primary-light); }
.science-btn { background: var(--secondary); }
.science-btn:hover { background: var(--secondary-dark); }
.puzzle-btn  { background: #3B82F6; }
.puzzle-btn:hover  { background: #2563EB; }
.word-btn    { background: #8B5CF6; }
.word-btn:hover    { background: #7C3AED; }


/* ====================================================
   FEATURES SECTION
   ==================================================== */
.features-section { background: white; position: relative; }
.features-pattern {
  position: absolute; inset: 0; opacity: 0.025; pointer-events: none;
  background-image: url('https://d2xsxph8kpxj0f.cloudfront.net/310519663338399174/Fb34iZHCqcxhR8yKGXGvkh/pattern_bg-aJbegvPAzA5tzJ2yAMmtt8.webp');
  background-size: 350px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px; margin-bottom: 48px;
}

.feature-card {
  background: white; border-radius: var(--radius-lg); padding: 26px;
  box-shadow: var(--shadow); border: 1px solid rgba(26,77,46,0.06);
  position: relative; overflow: hidden;
  transition: var(--transition);
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }

.feature-corner {
  position: absolute; top: -20px; left: -20px;
  width: 72px; height: 72px; border-radius: 50%;
  opacity: 0.08; transition: opacity 0.3s;
}
.feature-card:hover .feature-corner { opacity: 0.16; }
.even-corner { background: var(--primary); }
.odd-corner  { background: var(--secondary); }

.feature-icon { font-size: 2.4rem; margin-bottom: 14px; position: relative; z-index: 1; }
.feature-title {
  font-family: 'Baloo Bhaijaan 2', sans-serif;
  font-size: 1.05rem; font-weight: 800; color: var(--primary);
  margin-bottom: 10px; position: relative; z-index: 1;
}
.feature-desc { font-size: 0.85rem; color: var(--text-light); line-height: 1.7; position: relative; z-index: 1; }

/* Gamification box */
.gamification-box {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: var(--radius-lg); padding: 36px;
  display: flex; align-items: center; gap: 32px;
  flex-wrap: wrap;
}
.gamification-content { flex: 1; min-width: 220px; }
.gamification-title {
  font-family: 'Baloo Bhaijaan 2', sans-serif;
  font-size: 1.5rem; font-weight: 800; color: white; margin-bottom: 10px;
}
.gamification-desc { font-size: 0.88rem; color: rgba(255,255,255,0.78); line-height: 1.7; margin-bottom: 20px; }
.gamification-badges { display: flex; gap: 12px; }
.gamification-badge {
  background: rgba(255,255,255,0.12); backdrop-filter: blur(6px);
  padding: 10px 16px; border-radius: 12px; text-align: center; min-width: 64px;
}
.gamification-badge-icon { font-size: 1.6rem; color: var(--secondary); }
.gamification-badge-label { font-size: 0.72rem; color: rgba(255,255,255,0.75); margin-top: 4px; }
.gamification-img-wrap { width: 160px; height: 160px; flex-shrink: 0; }
.gamification-img-wrap img { width: 100%; height: 100%; object-fit: contain; }


/* ====================================================
   VISION SECTION
   ==================================================== */
.vision-section {
  background: var(--primary); position: relative; overflow: hidden;
}
.vision-deco {
  position: absolute; border-radius: 50%; pointer-events: none;
}
.vision-deco-1 {
  width: 280px; height: 280px; top: -80px; left: -80px;
  background: rgba(255,255,255,0.04);
}
.vision-deco-2 {
  width: 400px; height: 400px; bottom: -120px; right: -100px;
  background: rgba(217,119,6,0.08);
}

.vision-list { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.vision-panel {
  background: rgba(255,255,255,0.07); backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: var(--radius); padding: 22px 24px;
  display: flex; align-items: center; gap: 20px;
  transition: var(--transition);
}
.vision-panel:hover { background: rgba(255,255,255,0.11); }
.vision-num {
  font-family: 'Baloo Bhaijaan 2', sans-serif;
  font-size: 2rem; font-weight: 800; color: var(--secondary);
  flex-shrink: 0; width: 56px; text-align: center;
}
.vision-divider { width: 2px; height: 48px; background: rgba(217,119,6,0.3); flex-shrink: 0; }
.vision-text h3 {
  font-family: 'Baloo Bhaijaan 2', sans-serif;
  font-size: 1rem; font-weight: 700; color: white; margin-bottom: 4px;
}
.vision-text p { font-size: 0.85rem; color: rgba(255,255,255,0.62); line-height: 1.6; }

.vision-quote {
  max-width: 560px; margin: 48px auto 0;
  text-align: center;
}
.vision-quote p { font-size: 1rem; color: var(--secondary); font-style: italic; font-weight: 600; }
.vision-quote span { font-size: 0.82rem; color: rgba(255,255,255,0.38); display: block; margin-top: 6px; }


/* ====================================================
   CTA SECTION
   ==================================================== */
.cta-section { padding: 80px 0; position: relative; overflow: hidden; }
.cta-pattern {
  position: absolute; inset: 0; opacity: 0.025; pointer-events: none;
  background-image: url('https://d2xsxph8kpxj0f.cloudfront.net/310519663338399174/Fb34iZHCqcxhR8yKGXGvkh/pattern_bg-aJbegvPAzA5tzJ2yAMmtt8.webp');
  background-size: 280px;
}
.cta-box {
  max-width: 680px; margin: 0 auto; text-align: center;
  background: linear-gradient(135deg, rgba(217,119,6,0.07), rgba(26,77,46,0.04), rgba(217,119,6,0.07));
  border: 1px solid rgba(26,77,46,0.10);
  border-radius: var(--radius-lg); padding: 48px 32px;
  position: relative; z-index: 1;
}
.cta-chars {
  display: flex; justify-content: center; gap: -20px; margin-bottom: 24px;
  position: relative;
}
.cta-char-img {
  width: 90px; height: 120px; object-fit: cover; object-position: top;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}
.cta-nasser { margin-left: -16px; }
.cta-noor   { margin-right: -16px; }

.cta-title {
  font-family: 'Baloo Bhaijaan 2', sans-serif;
  font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; color: var(--primary); margin-bottom: 12px;
}
.cta-desc { font-size: 1rem; color: var(--text-light); margin-bottom: 28px; max-width: 480px; margin-left: auto; margin-right: auto; }
.cta-buttons { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn-cta-primary {
  padding: 14px 32px; background: var(--secondary); color: white;
  border-radius: 14px; font-size: 1rem; font-weight: 700;
  font-family: 'Baloo Bhaijaan 2', sans-serif;
  transition: var(--transition); box-shadow: 0 6px 20px rgba(217,119,6,0.3);
}
.btn-cta-primary:hover { background: var(--secondary-dark); transform: translateY(-2px); }
.btn-cta-secondary {
  padding: 14px 32px; background: var(--primary); color: white;
  border-radius: 14px; font-size: 1rem; font-weight: 700;
  transition: var(--transition);
}
.btn-cta-secondary:hover { background: var(--primary-light); transform: translateY(-2px); }


/* ====================================================
   FOOTER
   ==================================================== */
.footer { background: var(--primary-dark); position: relative; overflow: hidden; }
.footer-pattern {
  position: absolute; inset: 0; opacity: 0.025; pointer-events: none;
  background-image: url('https://d2xsxph8kpxj0f.cloudfront.net/310519663338399174/Fb34iZHCqcxhR8yKGXGvkh/pattern_bg-aJbegvPAzA5tzJ2yAMmtt8.webp');
  background-size: 200px;
}
.footer .container { padding-top: 48px; padding-bottom: 0; position: relative; z-index: 1; }
.footer-grid {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 40px;
  padding-bottom: 36px;
}

.footer-logo {
  display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
}
.footer-logo-block {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--secondary); color: white;
  font-family: 'Baloo Bhaijaan 2', sans-serif; font-size: 1.1rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.footer-logo span {
  font-family: 'Baloo Bhaijaan 2', sans-serif;
  font-size: 1rem; font-weight: 700; color: white;
}
.footer-desc { font-size: 0.82rem; color: rgba(255,255,255,0.48); line-height: 1.7; max-width: 280px; }
.footer-social { display: flex; gap: 10px; margin-top: 16px; }
.social-btn {
  width: 36px; height: 36px; border-radius: 9px;
  background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.55);
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.social-btn:hover { background: var(--secondary); color: white; transform: translateY(-2px); }

.footer-links-title { font-family: 'Baloo Bhaijaan 2', sans-serif; font-size: 0.9rem; font-weight: 700; color: var(--secondary); margin-bottom: 14px; }
.footer-links a { display: block; font-size: 0.82rem; color: rgba(255,255,255,0.48); margin-bottom: 8px; transition: color 0.2s; }
.footer-links a:hover { color: white; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 20px 0;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 8px;
}
.footer-bottom p { font-size: 0.75rem; color: rgba(255,255,255,0.28); }
.heart { color: #f87171; }


/* ====================================================
   MODALS
   ==================================================== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,0.55); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
}
.modal-overlay.active { opacity: 1; pointer-events: all; }

.modal-container {
  background: white; border-radius: var(--radius-lg);
  width: 100%; max-width: 580px;
  max-height: 90vh; overflow-y: auto;
  position: relative;
  box-shadow: 0 24px 64px rgba(0,0,0,0.25);
  animation: modalIn 0.35s cubic-bezier(0.34,1.56,0.64,1) forwards;
}
@keyframes modalIn {
  from { transform: scale(0.88); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.adv-modal-container { max-width: 620px; }

.modal-close {
  position: sticky; top: 12px; left: 12px; z-index: 10;
  float: left; margin: 12px;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(26,77,46,0.08); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; transition: var(--transition);
}
.modal-close:hover { background: var(--primary); color: white; }


/* ====================================================
   GAME CONTENT (generated by main.js)
   ==================================================== */
.game-content {
  padding: 28px; font-family: 'Cairo', sans-serif;
}
.game-content-header {
  text-align: center; padding-bottom: 20px;
  border-bottom: 1px solid rgba(26,77,46,0.08); margin-bottom: 20px;
}
.game-content-header h2 {
  font-family: 'Baloo Bhaijaan 2', sans-serif;
  font-size: 1.4rem; font-weight: 800; color: var(--primary); margin-bottom: 4px;
}
.game-content-header p { font-size: 0.88rem; color: var(--text-light); }

/* Scoreboard */
.game-scoreboard {
  display: flex; gap: 10px; margin-bottom: 16px; justify-content: center; flex-wrap: wrap;
}
.score-box {
  background: linear-gradient(135deg, #dcfce7, #f0fdf4);
  border-radius: 12px; padding: 12px 20px; text-align: center; min-width: 90px;
}
.score-label { font-size: 0.72rem; color: var(--text-light); display: block; margin-bottom: 4px; }
.score-val { font-family: 'Baloo Bhaijaan 2', sans-serif; font-size: 1.6rem; font-weight: 800; color: var(--primary); }

/* Timer bar */
.game-timer-bar {
  height: 8px; background: #e8f5e9; border-radius: 4px; overflow: hidden; margin-bottom: 20px;
}
.timer-fill {
  height: 100%; background: linear-gradient(90deg, var(--primary-light), var(--primary));
  border-radius: 4px; transition: width 1s linear;
}

/* Question area */
.question-area {
  text-align: center; padding: 20px;
  background: var(--bg-light); border-radius: var(--radius); margin-bottom: 16px;
}
.question-emoji { font-size: 2.4rem; display: block; margin-bottom: 10px; }
.question-text  { font-size: 1.25rem; font-weight: 700; color: var(--primary); margin-bottom: 6px; }
.question-hint  { font-size: 0.82rem; color: var(--text-light); }

/* Answer buttons */
.answers-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.answer-btn {
  padding: 14px; border-radius: var(--radius); font-size: 1rem; font-weight: 700;
  background: white; color: var(--primary);
  border: 2px solid rgba(26,77,46,0.15);
  transition: var(--transition); cursor: pointer; font-family: 'Cairo', sans-serif;
}
.answer-btn:hover { background: var(--primary); color: white; border-color: var(--primary); }
.answer-btn.correct { background: #dcfce7; border-color: #16a34a; color: #166534; }
.answer-btn.wrong   { background: #fee2e2; border-color: #dc2626; color: #991b1b; }

/* Memory game (generated by JS) */
.memory-grid {
  display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; margin: 16px 0;
}
.memory-card {
  aspect-ratio: 1; border-radius: 10px; background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; cursor: pointer; transition: var(--transition);
  border: 2px solid rgba(255,255,255,0.15);
}
.memory-card:hover { transform: scale(1.05); }
.memory-card.flipped { background: white; border-color: var(--primary-light); }
.memory-card.matched { background: #dcfce7; border-color: #16a34a; }
.memory-card-back { display: none; }
.memory-card.flipped .memory-card-back,
.memory-card.matched .memory-card-back { display: block; }
.memory-card-front { color: rgba(255,255,255,0.3); font-size: 1.2rem; }
.memory-card.flipped .memory-card-front,
.memory-card.matched .memory-card-front { display: none; }

/* Puzzle game (generated by JS) */
.puzzle-grid {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 6px;
  max-width: 280px; margin: 16px auto;
}
.puzzle-tile {
  aspect-ratio: 1; border-radius: 10px;
  background: var(--primary); color: white;
  font-family: 'Baloo Bhaijaan 2', sans-serif; font-size: 1.6rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: var(--transition);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.puzzle-tile:hover { transform: scale(1.04); }
.puzzle-tile.empty { background: rgba(26,77,46,0.08); box-shadow: none; cursor: default; }


/* ====================================================
   TOAST
   ==================================================== */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--primary-dark); color: white;
  padding: 12px 24px; border-radius: 50px;
  font-size: 0.9rem; font-weight: 600;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  z-index: 9999; opacity: 0; transition: opacity 0.35s, transform 0.35s;
  pointer-events: none; white-space: nowrap;
  transform: translateX(-50%) translateY(16px);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}


/* ====================================================
   RESPONSIVE
   ==================================================== */
@media (max-width: 1024px) {
  .heroes-grid { grid-template-columns: 1fr; gap: 24px; }
  .heroes-center { flex-direction: row; justify-content: center; padding-top: 0; }
  .shared-stats { flex-direction: row; gap: 24px; width: auto; }
  .connect-line { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  .section { padding: 64px 0; }
  .nav-links { display: none; }
  .hamburger { display: flex; }

  .hero { padding: 100px 16px 60px; }
  .hero-characters { gap: 12px; }
  .character-card { min-width: 140px; padding: 16px; }
  .character-avatar-img { width: 100px; height: 120px; }

  .adventures-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
  .games-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .features-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; text-align: center; }

  .gamification-box { flex-direction: column; padding: 24px; }
  .gamification-img-wrap { width: 120px; height: 120px; }

  .answers-grid { grid-template-columns: 1fr; }
  .memory-grid  { grid-template-columns: repeat(4,1fr); }
}

@media (max-width: 480px) {
  .hero-title { font-size: 2rem; }
  .adventures-grid { grid-template-columns: 1fr; }
  .games-grid { grid-template-columns: 1fr; }
  .filter-bar { gap: 6px; }
  .filter-btn { padding: 8px 14px; font-size: 0.82rem; }
  .cta-box { padding: 32px 18px; }
  .cta-chars { gap: 8px; }
  .cta-char-img { width: 70px; height: 90px; }

  .modal-container { border-radius: var(--radius); }
  .game-content { padding: 18px; }
  .question-text { font-size: 1.05rem; }
}
