/* ============================================
   Play & Learn Code - Kids Coding Platform
   A fun, colorful stylesheet for young coders!
   ============================================ */

/* ---------- CSS Variables (Color Palette) ---------- */
:root {
  --blue: #4A90E2;
  --purple: #9B59B6;
  --yellow: #F39C12;
  --pink: #E91E63;
  --green: #2ECC71;
  --light-bg: #F8F9FF;
  --white: #FFFFFF;
  --dark-text: #2C3E50;
  --light-text: #7F8C8D;
  --shadow-soft: 0 4px 15px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.15);
  --radius: 16px;
  --radius-sm: 10px;
  --transition: all 0.3s ease;
}

/* ---------- Reset & Base Styles ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  background: var(--light-bg);
  color: var(--dark-text);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ---------- Animated Background Decoration ---------- */
body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background:
    radial-gradient(circle at 20% 20%, rgba(74, 144, 226, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(155, 89, 182, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(243, 156, 18, 0.03) 0%, transparent 50%);
  z-index: -1;
  animation: bgFloat 20s ease-in-out infinite;
}

@keyframes bgFloat {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-2%, -2%); }
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--dark-text);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
  font-size: 1.1rem;
  line-height: 1.8;
}

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

/* ---------- Container ---------- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */
.site-header {
  background: linear-gradient(135deg, var(--blue), var(--purple));
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(74, 144, 226, 0.3);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
  font-size: 1.5rem;
  font-weight: 800;
}

.logo-icon {
  font-size: 2rem;
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.nav-links {
  display: flex;
  gap: 8px;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.9);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1rem;
  transition: var(--transition);
}

.nav-links a:hover {
  background: rgba(255, 255, 255, 0.2);
  color: var(--white);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  background: linear-gradient(135deg, var(--blue) 0%, var(--purple) 50%, var(--pink) 100%);
  padding: 80px 0 100px;
  text-align: center;
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: '💻 🚀 ⭐ 🤖 🎮 ✨';
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 2rem;
  letter-spacing: 20px;
  opacity: 0.4;
  animation: floatIcons 4s ease-in-out infinite;
}

@keyframes floatIcons {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-10px); }
}

.hero h1 {
  color: var(--white);
  font-size: 3rem;
  margin-bottom: 16px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hero p {
  font-size: 1.3rem;
  opacity: 0.95;
  max-width: 600px;
  margin: 0 auto 32px;
}

.hero-emoji {
  font-size: 4rem;
  display: block;
  margin-bottom: 20px;
  animation: bounce 2s ease-in-out infinite;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--yellow);
  color: var(--dark-text);
  padding: 16px 36px;
  border-radius: 50px;
  font-size: 1.2rem;
  font-weight: 700;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(243, 156, 18, 0.4);
}

.hero-cta:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 25px rgba(243, 156, 18, 0.5);
}

/* Wave divider at bottom of hero */
.hero-wave {
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  line-height: 0;
}

.hero-wave svg {
  display: block;
  width: 100%;
  height: 60px;
}

/* ============================================
   SECTION TITLES
   ============================================ */
.section-title {
  text-align: center;
  margin: 60px 0 40px;
}

.section-title h2 {
  font-size: 2.2rem;
  margin-bottom: 8px;
}

.section-title p {
  color: var(--light-text);
  font-size: 1.15rem;
}

/* ============================================
   LESSON CARDS GRID (Homepage)
   ============================================ */
.lessons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
  padding-bottom: 60px;
}

/* Individual Lesson Card */
.lesson-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  animation: fadeInUp 0.5s ease forwards;
  opacity: 0;
}

.lesson-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}

/* Stagger card entrance animations */
.lesson-card:nth-child(1) { animation-delay: 0.1s; }
.lesson-card:nth-child(2) { animation-delay: 0.2s; }
.lesson-card:nth-child(3) { animation-delay: 0.3s; }
.lesson-card:nth-child(4) { animation-delay: 0.4s; }
.lesson-card:nth-child(5) { animation-delay: 0.5s; }
.lesson-card:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Card colored top banner */
.card-banner {
  height: 8px;
  width: 100%;
}

.card-body {
  padding: 28px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-emoji {
  font-size: 3rem;
  margin-bottom: 12px;
}

.card-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.card-description {
  font-size: 1rem;
  color: var(--light-text);
  margin-bottom: 16px;
  flex: 1;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

/* Difficulty badge on cards */
.difficulty-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--white);
}

.difficulty-badge.beginner { background: var(--green); }
.difficulty-badge.intermediate { background: var(--yellow); color: var(--dark-text); }
.difficulty-badge.advanced { background: var(--pink); }

/* "Start Lesson" link on card */
.card-link {
  font-weight: 700;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.card-link:hover {
  gap: 10px;
}

.card-link .arrow {
  transition: var(--transition);
}

/* ============================================
   LESSON DETAIL PAGE
   ============================================ */

/* Lesson Hero (top of detail page) */
.lesson-hero {
  padding: 60px 0 80px;
  text-align: center;
  color: var(--white);
  position: relative;
}

.lesson-hero h1 {
  color: var(--white);
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.lesson-hero .lesson-emoji {
  font-size: 4.5rem;
  display: block;
  margin-bottom: 16px;
  animation: bounce 2s ease-in-out infinite;
}

.lesson-hero .lesson-goal {
  font-size: 1.2rem;
  opacity: 0.9;
  max-width: 650px;
  margin: 0 auto;
  line-height: 1.7;
}

/* Progress indicator */
.progress-bar-container {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50px;
  height: 12px;
  max-width: 400px;
  margin: 24px auto 0;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 50px;
  background: var(--yellow);
  transition: width 0.8s ease;
}

.progress-text {
  font-size: 0.95rem;
  margin-top: 8px;
  opacity: 0.85;
}

/* Lesson content wrapper */
.lesson-content {
  max-width: 850px;
  margin: -40px auto 0;
  padding: 0 24px 60px;
  position: relative;
  z-index: 2;
}

/* Content section cards */
.content-section {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 32px;
  margin-bottom: 28px;
  animation: fadeInUp 0.5s ease forwards;
  opacity: 0;
}

.content-section:nth-child(1) { animation-delay: 0.1s; }
.content-section:nth-child(2) { animation-delay: 0.15s; }
.content-section:nth-child(3) { animation-delay: 0.2s; }
.content-section:nth-child(4) { animation-delay: 0.25s; }
.content-section:nth-child(5) { animation-delay: 0.3s; }
.content-section:nth-child(6) { animation-delay: 0.35s; }
.content-section:nth-child(7) { animation-delay: 0.4s; }
.content-section:nth-child(8) { animation-delay: 0.45s; }

.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.section-icon {
  font-size: 2rem;
}

.section-header h2 {
  font-size: 1.6rem;
}

/* Story section special styling */
.story-text {
  font-size: 1.15rem;
  line-height: 1.9;
  color: #444;
  background: linear-gradient(135deg, #f0f4ff, #f8f0ff);
  padding: 24px;
  border-radius: var(--radius-sm);
  border-left: 5px solid var(--blue);
}

/* Steps list */
.steps-list {
  list-style: none;
  counter-reset: step-counter;
}

.step-item {
  display: flex;
  gap: 16px;
  padding: 20px;
  margin-bottom: 16px;
  background: var(--light-bg);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.step-item:hover {
  transform: translateX(5px);
  box-shadow: var(--shadow-soft);
}

.step-number {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--white);
}

.step-content h4 {
  font-size: 1.15rem;
  margin-bottom: 6px;
}

.step-content p {
  font-size: 1.05rem;
  color: #555;
}

.step-emoji {
  font-size: 1.5rem;
  margin-left: auto;
  flex-shrink: 0;
}

/* Activity & Challenge sections */
.activity-box,
.challenge-box {
  padding: 24px;
  border-radius: var(--radius-sm);
  margin-top: 12px;
}

.activity-box {
  background: linear-gradient(135deg, #e8f5e9, #f1f8e9);
  border-left: 5px solid var(--green);
}

.challenge-box {
  background: linear-gradient(135deg, #fff3e0, #fff8e1);
  border-left: 5px solid var(--yellow);
}

.activity-box h4,
.challenge-box h4 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.activity-box p,
.challenge-box p {
  font-size: 1.05rem;
  color: #555;
}

.example-block {
  background: rgba(255, 255, 255, 0.7);
  padding: 16px;
  border-radius: 8px;
  margin-top: 12px;
  font-family: 'Courier New', monospace;
  white-space: pre-line;
  font-size: 1rem;
  color: #333;
  border: 1px dashed #ccc;
}

/* ============================================
   QUIZ SECTION
   ============================================ */
.quiz-container {
  margin-top: 12px;
}

.quiz-question {
  background: var(--light-bg);
  border-radius: var(--radius-sm);
  padding: 24px;
  margin-bottom: 20px;
}

.quiz-question h4 {
  font-size: 1.15rem;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.quiz-question h4 .q-number {
  flex-shrink: 0;
  background: var(--purple);
  color: var(--white);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quiz-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--white);
  border: 2px solid #e0e0e0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 1.05rem;
  font-weight: 500;
  transition: var(--transition);
  min-height: 48px;
}

.quiz-option:hover {
  border-color: var(--blue);
  background: #f0f7ff;
  transform: translateX(4px);
}

.quiz-option.correct {
  border-color: var(--green);
  background: #e8f5e9;
  animation: popIn 0.3s ease;
}

.quiz-option.incorrect {
  border-color: #e74c3c;
  background: #ffebee;
  animation: shake 0.4s ease;
}

.quiz-option.disabled {
  pointer-events: none;
  opacity: 0.7;
}

.quiz-option .option-letter {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #eee;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}

.quiz-explanation {
  margin-top: 12px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 1rem;
  display: none;
}

.quiz-explanation.show {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  animation: fadeInUp 0.3s ease;
}

.quiz-explanation.correct-explanation {
  background: #e8f5e9;
  color: #2e7d32;
}

.quiz-explanation.incorrect-explanation {
  background: #ffebee;
  color: #c62828;
}

@keyframes popIn {
  0% { transform: scale(0.95); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}

/* ============================================
   BADGE SECTION
   ============================================ */
.badge-display {
  text-align: center;
  padding: 40px 20px;
}

.badge-icon {
  font-size: 5rem;
  display: block;
  margin-bottom: 16px;
  animation: bounce 2s ease-in-out infinite;
}

.badge-name {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--yellow), var(--pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.badge-description {
  font-size: 1.1rem;
  color: var(--light-text);
}

/* ============================================
   PARENT GUIDE SECTION
   ============================================ */
.parent-guide-text {
  font-size: 1.05rem;
  line-height: 1.9;
  color: #555;
  background: linear-gradient(135deg, #f3e5f5, #ede7f6);
  padding: 24px;
  border-radius: var(--radius-sm);
  border-left: 5px solid var(--purple);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border: none;
  border-radius: 50px;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  min-height: 48px;
  font-family: inherit;
  text-align: center;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: linear-gradient(135deg, var(--blue), var(--purple));
  color: var(--white);
  box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
}

.btn-secondary {
  background: var(--white);
  color: var(--dark-text);
  border: 2px solid #e0e0e0;
}

.btn-secondary:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.btn-yellow {
  background: var(--yellow);
  color: var(--dark-text);
  box-shadow: 0 4px 15px rgba(243, 156, 18, 0.3);
}

.btn-yellow:hover {
  box-shadow: 0 6px 20px rgba(243, 156, 18, 0.4);
}

/* Lesson navigation */
.lesson-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 40px 0;
  max-width: 850px;
  margin: 0 auto;
}

.lesson-nav .btn {
  flex-shrink: 0;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--dark-text);
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  padding: 30px 0;
  font-size: 1rem;
}

.site-footer .footer-emoji {
  font-size: 1.3rem;
  margin: 0 4px;
}

/* ============================================
   LOADING SPINNER
   ============================================ */
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  gap: 16px;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid #e0e0e0;
  border-top: 5px solid var(--blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-text {
  font-size: 1.15rem;
  color: var(--light-text);
  font-weight: 600;
}

/* Error state */
.error-message {
  text-align: center;
  padding: 60px 20px;
}

.error-message .error-emoji {
  font-size: 4rem;
  display: block;
  margin-bottom: 16px;
}

.error-message h2 {
  margin-bottom: 8px;
}

.error-message p {
  color: var(--light-text);
  margin-bottom: 24px;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablets (768px and below) */
@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.6rem; }

  .hero { padding: 50px 0 70px; }
  .hero h1 { font-size: 2.2rem; }
  .hero p { font-size: 1.1rem; }
  .hero-emoji { font-size: 3rem; }

  .lessons-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .content-section { padding: 24px 20px; }

  .section-title { margin: 40px 0 28px; }
  .section-title h2 { font-size: 1.8rem; }

  .lesson-hero h1 { font-size: 2rem; }
  .lesson-hero .lesson-emoji { font-size: 3.5rem; }

  .lesson-nav {
    flex-direction: column;
    align-items: stretch;
    padding: 30px 24px;
  }

  .lesson-nav .btn { width: 100%; }

  .badge-icon { font-size: 4rem; }
  .badge-name { font-size: 1.5rem; }
}

/* Mobile phones (480px and below) */
@media (max-width: 480px) {
  html { font-size: 15px; }

  .container { padding: 0 16px; }

  .site-header .container {
    flex-direction: column;
    gap: 10px;
  }

  .logo { font-size: 1.3rem; }

  .hero { padding: 40px 0 60px; }
  .hero h1 { font-size: 1.8rem; }
  .hero-cta { padding: 14px 28px; font-size: 1.1rem; }

  .step-item {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }

  .step-emoji { margin-left: 0; }

  .quiz-option {
    padding: 12px 14px;
    font-size: 1rem;
  }

  .content-section { padding: 20px 16px; }
}

/* Large screens */
@media (min-width: 1200px) {
  .lessons-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* =========================
   INTERACTIVE PLAYGROUND
========================= */

.interactive-playground {
  margin-top: 40px;
  padding: 30px;
  background: #fff7ed;
  border-radius: 20px;
  text-align: center;
}

.robot {
  font-size: 100px;
  margin: 30px auto;
  transition: all 0.3s ease;
  cursor: pointer;
}

.sleeping {
  opacity: 0.5;
  filter: grayscale(1);
}

.awake {
  opacity: 1;
  filter: none;
}

.dancing {
  animation: wiggle 0.4s infinite;
}

.jumping {
  animation: jump 0.6s ease;
}

@keyframes wiggle {
  0%,100% { transform: rotate(-10deg); }
  50% { transform: rotate(10deg); }
}

@keyframes jump {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-40px); }
}

#speech-bubble {
  background: white;
  padding: 15px;
  border-radius: 15px;
  margin: 20px auto;
  width: fit-content;
  font-weight: bold;
}

.control-buttons button {
  margin: 10px;
  padding: 12px 20px;
  border: none;
  border-radius: 12px;
  background: #f59e0b;
  color: white;
  font-weight: bold;
  cursor: pointer;
}

.instruction-box {
  margin-top: 20px;
  background: white;
  padding: 20px;
  border-radius: 15px;
}

/* =========================
   LESSON 6 MISSION MODE
========================= */

.mission-box {
  margin: 30px auto;
  padding: 25px;
  background: #ffffff;
  border-radius: 18px;
  max-width: 700px;
  text-align: left;
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.mission-box h3 {
  margin-bottom: 10px;
  color: #1f2937;
}

.mission-box ul {
  list-style: none;
  padding-left: 0;
  margin-top: 15px;
}

.mission-box li {
  padding: 12px;
  margin: 8px 0;
  background: #f3f4f6;
  border-radius: 12px;
  font-weight: 600;
}

.mission-done {
  background: #dcfce7 !important;
  color: #166534;
}

.final-reward {
  margin-top: 20px;
  padding: 18px;
  background: linear-gradient(135deg, #facc15, #fb923c);
  color: white;
  font-weight: 800;
  text-align: center;
  border-radius: 16px;
  font-size: 20px;
}

/* =========================
   LESSON 6 MINI GAME
========================= */

.mini-game-box {
  margin-top: 40px;
  padding: 30px;
  background: #ffffff;
  border-radius: 20px;
  text-align: center;
}

#game-area {
  position: relative;
  width: 320px;
  height: 400px;
  margin: 20px auto;
  background: linear-gradient(to bottom, #dbeafe, #bfdbfe);
  border-radius: 20px;
  overflow: hidden;
  border: 4px solid #60a5fa;
}

#player {
  position: absolute;
  bottom: 10px;
  font-size: 60px;
  transition: left 0.1s linear;
}

#obstacle {
  position: absolute;
  top: -60px;
  font-size: 50px;
}

#game-score {
  font-weight: bold;
  padding: 10px;
  font-size: 20px;
}

#start-game-btn {
  margin-top: 20px;
  padding: 14px 24px;
  border: none;
  border-radius: 12px;
  background: #f59e0b;
  color: white;
  font-weight: bold;
  cursor: pointer;
  font-size: 18px;
}

.game-over {
  margin-top: 20px;
  padding: 20px;
  background: #fee2e2;
  color: #991b1b;
  border-radius: 16px;
  font-weight: bold;
}

.game-win {
  margin-top: 20px;
  padding: 20px;
  background: #dcfce7;
  color: #166534;
  border-radius: 16px;
  font-weight: bold;
}

/* =========================
   MOBILE GAME CONTROLS
========================= */

.mobile-controls {
  margin-top: 20px;
}

.mobile-controls button {
  margin: 10px;
  padding: 14px 24px;
  border: none;
  border-radius: 14px;
  background: #3b82f6;
  color: white;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
}

/* Hide reading/activity/quiz sections for interactive Lesson 6 only */
body.lesson-6 .steps-section,
body.lesson-6 .activity-section,
body.lesson-6 .quiz-section {
  display: none !important;
}

/* =========================
   CONFETTI CELEBRATION
========================= */

.confetti-piece {
  position: fixed;
  top: -40px;
  z-index: 9999;
  font-size: 28px;
  animation: confettiFall 2.5s linear forwards;
  pointer-events: none;
}

@keyframes confettiFall {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(110vh) rotate(720deg);
    opacity: 0;
  }
}

/* ============================================================
   INTERACTIVE LESSONS 1–5 STYLES
============================================================ */

.kid-game-box {
  margin-top: 40px;
  padding: 30px;
  background: #fff7ed;
  border-radius: 24px;
  text-align: center;
  box-shadow: 0 12px 30px rgba(0,0,0,0.08);
}

.kid-button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin: 20px 0;
}

.kid-button-row button,
.kid-game-box button {
  padding: 14px 22px;
  border: none;
  border-radius: 16px;
  background: #3b82f6;
  color: white;
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
}

.danger-btn {
  background: #ef4444 !important;
}

.game-screen {
  margin: 20px auto;
  padding: 25px;
  border-radius: 20px;
  min-height: 120px;
  max-width: 650px;
  background: #dbeafe;
}

.dark-screen {
  background: #1f2937;
}

.big-character {
  font-size: 80px;
  transition: all 0.3s ease;
}

.star-corner {
  font-size: 28px;
  min-height: 36px;
}

.game-message-light {
  color: white;
  font-weight: 800;
  margin-top: 15px;
}

.code-log {
  margin: 18px auto;
  padding: 16px;
  max-width: 650px;
  border-radius: 16px;
  background: #f3f4f6;
  font-family: monospace;
  text-align: left;
  font-size: 15px;
}

.success-msg {
  margin-top: 15px;
  font-size: 20px;
  font-weight: 900;
  color: #166534;
}

.order-step {
  margin: 10px auto;
  padding: 16px;
  max-width: 500px;
  background: white;
  border: 3px solid #d1d5db;
  border-radius: 16px;
  font-weight: 800;
  cursor: pointer;
}

.selected-step {
  border-color: #f59e0b !important;
  background: #fef3c7 !important;
}

.kid-select {
  padding: 10px;
  border-radius: 12px;
  font-size: 18px;
}

.big-label {
  font-size: 18px;
  font-weight: 800;
}

.pop-emoji {
  display: inline-block;
  animation: popEmoji 0.35s ease;
}

@keyframes popEmoji {
  0% { transform: scale(0); }
  70% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

.variable-grid {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 25px 0;
}

.variable-card {
  background: white;
  border-radius: 20px;
  padding: 22px;
  min-width: 180px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.variable-value {
  font-size: 42px;
  font-weight: 900;
  color: #1f2937;
  margin: 15px 0;
}

@media (max-width: 600px) {
  .kid-game-box {
    padding: 20px;
  }

  .kid-button-row button,
  .kid-game-box button {
    width: 100%;
    font-size: 18px;
  }

  .big-character {
    font-size: 60px;
  }

  .variable-card {
    width: 100%;
  }
}

/* ============================================================
   LESSON 1 MISSION POLISH
============================================================ */

.mini-mission-box {
  margin: 25px auto;
  padding: 22px;
  background: #ffffff;
  border-radius: 18px;
  max-width: 700px;
  text-align: left;
  box-shadow: 0 8px 22px rgba(0,0,0,0.08);
}

.mini-mission-box h3 {
  margin-bottom: 8px;
  color: #1f2937;
}

.mini-mission-box ul {
  list-style: none;
  padding-left: 0;
  margin-top: 14px;
}

.mini-mission-box li {
  padding: 12px;
  margin: 8px 0;
  background: #f3f4f6;
  border-radius: 12px;
  font-weight: 700;
}

/* ============================================================
   LESSON 7 — SPRITES & CHARACTERS
============================================================ */

.l7-game-box {
  background: #f5f0ff;
  border: 3px solid #8b5cf633;
}

.l7-stage {
  margin: 25px auto;
  max-width: 650px;
  min-height: 260px;
  background: linear-gradient(135deg, #312e81, #6d28d9);
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 22px;
  padding: 30px;
  box-shadow: inset 0 0 30px rgba(255,255,255,0.08);
}

.l7-sprite {
  font-size: 90px;
  width: 140px;
  height: 140px;
  background: #ffffff;
  border-radius: 28px;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.3s ease;
  box-shadow: 0 12px 25px rgba(0,0,0,0.25);
}

.l7-speech {
  background: #ffffff;
  color: #1f2937;
  font-weight: 900;
  padding: 14px 22px;
  border-radius: 18px;
  min-width: 220px;
  text-align: center;
}

.l7-name-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin: 18px auto;
}

.l7-name-row label {
  font-weight: 900;
  color: #1f2937;
}

.l7-name-row input {
  padding: 14px 16px;
  border-radius: 14px;
  border: 3px solid #ddd6fe;
  font-size: 16px;
  font-weight: 700;
}

.l7-pop {
  animation: l7Pop 0.5s ease;
}

.l7-dance {
  animation: l7Dance 0.35s infinite;
}

@keyframes l7Pop {
  0% { transform: scale(0.8); }
  60% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

@keyframes l7Dance {
  0%, 100% { transform: rotate(-8deg) scale(1); }
  50% { transform: rotate(8deg) scale(1.1); }
}

@media (max-width: 600px) {
  .l7-stage {
    min-height: 220px;
    padding: 20px;
  }

  .l7-sprite {
    width: 110px;
    height: 110px;
    font-size: 70px;
  }

  .l7-name-row input,
  .l7-name-row button {
    width: 100%;
  }
}

/* ============================================================
   LESSON 8 — MOVE ON THE SCREEN
============================================================ */

.l8-game-box {
  background: #ecfeff;
  border: 3px solid #06b6d433;
}

.l8-stage {
  position: relative;
  margin: 25px auto;
  max-width: 600px;
  height: 340px;
  background: linear-gradient(135deg, #cffafe, #a5f3fc);
  border: 4px solid #06b6d4;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: inset 0 0 30px rgba(255,255,255,0.5);
}

.l8-player {
  position: absolute;
  left: 20px;
  top: 220px;
  font-size: 58px;
  transition: all 0.18s ease;
  z-index: 3;
}

.l8-flag {
  position: absolute;
  right: 28px;
  top: 35px;
  font-size: 58px;
  z-index: 2;
  animation: l8FlagWave 0.8s infinite alternate;
}

.l8-message {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  background: white;
  color: #155e75;
  font-weight: 900;
  padding: 12px 18px;
  border-radius: 16px;
  min-width: 240px;
  text-align: center;
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

.l8-controls {
  margin: 20px auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

/* make Lesson 8 controls stand out */
.l8-controls button {
  padding: 14px 22px;
  border: none;
  border-radius: 16px;
  background: #06b6d4;
  color: white;
  font-size: 17px;
  font-weight: 900;
  cursor: pointer;
  margin: 4px;
}

@keyframes l8FlagWave {
  from { transform: rotate(-5deg); }
  to { transform: rotate(5deg); }
}

@media (max-width: 700px) {
  .l8-stage {
    height: 300px;
  }

  .l8-player {
    font-size: 48px;
  }

  .l8-flag {
    font-size: 48px;
  }

  .l8-controls button {
    width: 140px;
  }
}

/* ============================================================
   LESSON 9 — SOUNDS & REACTIONS
============================================================ */

.l9-game-box {
  background: #fff0f7;
  border: 3px solid #ec489933;
}

.l9-stage {
  position: relative;
  margin: 25px auto;
  max-width: 650px;
  min-height: 300px;
  background: linear-gradient(135deg, #fce7f3, #f9a8d4);
  border: 4px solid #ec4899;
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 22px;
  overflow: hidden;
  transition: all 0.35s ease;
}

.l9-character {
  font-size: 90px;
  background: white;
  width: 140px;
  height: 140px;
  border-radius: 28px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 12px 25px rgba(0,0,0,0.18);
}

.l9-bubble {
  background: white;
  color: #831843;
  font-weight: 900;
  padding: 14px 22px;
  border-radius: 18px;
  min-width: 260px;
  text-align: center;
  box-shadow: 0 8px 18px rgba(0,0,0,0.12);
}

.l9-effect {
  position: absolute;
  top: 25px;
  right: 35px;
  font-size: 42px;
  font-weight: 900;
}

.l9-bounce {
  animation: l9Bounce 0.6s ease;
}

.l9-wiggle {
  animation: l9Wiggle 0.25s infinite;
}

.l9-dance {
  animation: l9Dance 0.35s infinite;
}

.l9-effect-pop {
  animation: l9EffectPop 0.8s ease;
}

@keyframes l9Bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-35px); }
}

@keyframes l9Wiggle {
  0%, 100% { transform: rotate(-8deg); }
  50% { transform: rotate(8deg); }
}

@keyframes l9Dance {
  0%, 100% { transform: rotate(-8deg) scale(1); }
  50% { transform: rotate(8deg) scale(1.12); }
}

@keyframes l9EffectPop {
  0% { transform: scale(0.3); opacity: 0; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(1); opacity: 0; }
}

@media (max-width: 600px) {
  .l9-stage {
    min-height: 260px;
    padding: 20px;
  }

  .l9-character {
    width: 110px;
    height: 110px;
    font-size: 70px;
  }

  .l9-bubble {
    min-width: 200px;
    font-size: 15px;
  }
}

/* ============================================================
   LESSON 10 — CATCH THE STAR GAME
============================================================ */

.l10-game-box {
  background: #fff7ed;
  border: 3px solid #f9731633;
}

.l10-score-board {
  margin: 15px auto;
  padding: 14px 22px;
  background: #ffffff;
  color: #9a3412;
  border-radius: 18px;
  font-size: 22px;
  font-weight: 900;
  width: fit-content;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.l10-game-area {
  position: relative;
  margin: 25px auto;
  width: 420px;
  height: 400px;
  background: linear-gradient(180deg, #ffedd5, #fed7aa);
  border: 4px solid #f97316;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: inset 0 0 30px rgba(255,255,255,0.5);
}

.l10-player {
  position: absolute;
  bottom: 18px;
  left: 160px;
  font-size: 58px;
  transition: left 0.12s ease;
  z-index: 3;
}

.l10-star {
  position: absolute;
  top: 0;
  left: 160px;
  font-size: 42px;
  z-index: 2;
  animation: l10Spin 0.8s infinite linear;
}

.l10-message {
  position: absolute;
  left: 50%;
  bottom: 95px;
  transform: translateX(-50%);
  background: #ffffff;
  color: #9a3412;
  font-weight: 900;
  padding: 12px 18px;
  border-radius: 16px;
  min-width: 240px;
  text-align: center;
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

.l10-controls {
  margin: 20px auto;
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.l10-controls button,
#l10-start-btn {
  padding: 14px 24px;
  border: none;
  border-radius: 16px;
  background: #f97316;
  color: white;
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
}

@keyframes l10Spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@media (max-width: 600px) {
  .l10-game-area {
    width: 320px;
    height: 360px;
  }

  .l10-player {
    font-size: 48px;
  }

  .l10-star {
    font-size: 36px;
  }

  .l10-message {
    min-width: 200px;
    font-size: 14px;
  }

  .l10-controls button,
  #l10-start-btn {
    width: 140px;
  }
}

/* ============================================================
   AGE 7 HOMEPAGE ADVENTURE DESIGN
============================================================ */

.age7-homepage {
  margin: 0;
  background: #f7f7ff;
  color: #263447;
}

.home-header {
  min-height: 80px;
  padding: 0 7%;
  background: linear-gradient(135deg, #4f8df7, #9b5de5);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: white;
}

.home-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 28px;
  font-weight: 900;
}

.home-logo span {
  font-size: 38px;
}

.home-link {
  color: white;
  text-decoration: none;
  font-size: 18px;
  font-weight: 800;
}

.age-hero {
  padding: 70px 7%;
  background: linear-gradient(135deg, #4f8df7, #ec4899);
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 40px;
  align-items: center;
  color: white;
}

.age-badge {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(255,255,255,0.18);
  color: white;
  font-weight: 900;
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.age-badge.small {
  background: #ede9fe;
  color: #7c3aed;
}

.age-hero h1 {
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.05;
  margin: 0 0 20px;
  font-weight: 900;
}

.age-hero p {
  font-size: 22px;
  line-height: 1.6;
  max-width: 760px;
}

.hero-actions {
  margin-top: 30px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.start-adventure-btn,
.view-path-btn {
  padding: 16px 26px;
  border-radius: 18px;
  text-decoration: none;
  font-weight: 900;
  font-size: 18px;
}

.start-adventure-btn {
  background: #f59e0b;
  color: white;
  box-shadow: 0 12px 25px rgba(245,158,11,0.35);
}

.view-path-btn {
  background: white;
  color: #7c3aed;
}

.age-hero-card {
  background: white;
  color: #263447;
  border-radius: 28px;
  padding: 34px;
  text-align: center;
  box-shadow: 0 20px 45px rgba(0,0,0,0.18);
}

.hero-character {
  font-size: 90px;
  margin-bottom: 10px;
}

.age-hero-card h2 {
  font-size: 34px;
  margin: 0;
}

.age-hero-card p {
  color: #667085;
  font-size: 18px;
  margin: 10px 0 22px;
}

.progress-strip {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 6px;
}

.progress-strip span {
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #f59e0b, #ec4899);
}

.path-summary {
  padding: 40px 7%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: -40px;
  position: relative;
  z-index: 2;
}

.summary-card {
  background: white;
  padding: 28px;
  border-radius: 24px;
  box-shadow: 0 12px 35px rgba(0,0,0,0.08);
}

.summary-card span {
  font-size: 42px;
}

.summary-card h3 {
  font-size: 24px;
  margin: 12px 0 8px;
}

.summary-card p {
  color: #667085;
  line-height: 1.5;
}

.lesson-path-section {
  padding: 30px 7% 70px;
}

.section-title {
  text-align: center;
  margin-bottom: 34px;
}

.section-title h2 {
  font-size: 44px;
  margin: 12px 0;
}

.section-title p {
  color: #667085;
  font-size: 20px;
}

.age-lesson-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.age-lesson-card {
  position: relative;
  min-height: 330px;
  background: white;
  border-radius: 28px;
  padding: 28px;
  text-decoration: none;
  color: #263447;
  box-shadow: 0 16px 40px rgba(0,0,0,0.08);
  border-top: 10px solid var(--lesson-color);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}

.age-lesson-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 22px 50px rgba(0,0,0,0.13);
}

.lesson-number {
  display: inline-block;
  padding: 7px 13px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--lesson-color) 14%, white);
  color: var(--lesson-color);
  font-weight: 900;
  margin-bottom: 16px;
}

.lesson-emoji {
  font-size: 60px;
  margin-bottom: 18px;
}

.age-lesson-card h3 {
  font-size: 26px;
  margin: 0 0 12px;
  color: #263447;
}

.age-lesson-card p {
  color: #667085;
  font-size: 17px;
  line-height: 1.6;
}

.lesson-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 20px 0;
}

.lesson-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #374151;
  font-size: 13px;
  font-weight: 900;
}

.play-mission {
  position: absolute;
  bottom: 24px;
  left: 28px;
  right: 28px;
  padding: 14px;
  border-radius: 16px;
  background: var(--lesson-color);
  color: white;
  font-weight: 900;
  text-align: center;
}

.loading-lessons {
  grid-column: 1 / -1;
  padding: 40px;
  background: white;
  border-radius: 20px;
  text-align: center;
  font-weight: 900;
}

.future-paths {
  padding: 40px 7% 80px;
  background: #ffffff;
}

.future-paths h2 {
  text-align: center;
  font-size: 38px;
  margin-bottom: 28px;
}

.future-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.future-card {
  padding: 30px;
  border-radius: 24px;
  background: #f9fafb;
  text-align: center;
}

.future-card span {
  font-size: 42px;
}

.future-card h3 {
  font-size: 26px;
  margin: 10px 0;
}

.future-card p {
  color: #667085;
  font-weight: 800;
}

.locked {
  opacity: 0.75;
}

@media (max-width: 900px) {
  .age-hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .path-summary,
  .age-lesson-grid,
  .future-grid {
    grid-template-columns: 1fr;
  }

  .age-hero p {
    margin: 0 auto;
  }

  .hero-actions {
    justify-content: center;
  }
}

@media (max-width: 600px) {
  .home-header {
    padding: 18px 5%;
  }

  .home-logo strong {
    font-size: 20px;
  }

  .age-hero {
    padding: 50px 5%;
  }

  .section-title h2 {
    font-size: 32px;
  }

  .age-lesson-card {
    min-height: 320px;
  }
}

/* ============================================================
   COMPACT GAME-FIRST LESSON HERO
============================================================ */

.lesson-hero {
  padding-top: 45px !important;
  padding-bottom: 90px !important;
}

.lesson-hero h1 {
  font-size: 42px !important;
  margin-bottom: 18px !important;
}

.lesson-hero .lesson-goal {
  font-size: 20px !important;
}

@media (max-width: 600px) {
  .lesson-hero {
    padding-top: 35px !important;
    padding-bottom: 70px !important;
  }

  .lesson-hero h1 {
    font-size: 32px !important;
  }
}

/* ============================================================
   FORCE HIDE OLD STATIC LESSON CONTENT — AGE 7 GAME-FIRST MODE
   Keep: interactive games, Mission Mode, Badge, Parent Guide, navigation
============================================================ */

body.lesson-1 .story-section,
body.lesson-1 .steps-section,
body.lesson-1 .activity-section,
body.lesson-1 .challenge-section,
body.lesson-1 .quiz-section,

body.lesson-2 .story-section,
body.lesson-2 .steps-section,
body.lesson-2 .activity-section,
body.lesson-2 .challenge-section,
body.lesson-2 .quiz-section,

body.lesson-3 .story-section,
body.lesson-3 .steps-section,
body.lesson-3 .activity-section,
body.lesson-3 .challenge-section,
body.lesson-3 .quiz-section,

body.lesson-4 .story-section,
body.lesson-4 .steps-section,
body.lesson-4 .activity-section,
body.lesson-4 .challenge-section,
body.lesson-4 .quiz-section,

body.lesson-5 .story-section,
body.lesson-5 .steps-section,
body.lesson-5 .activity-section,
body.lesson-5 .challenge-section,
body.lesson-5 .quiz-section,

body.lesson-6 .story-section,
body.lesson-6 .steps-section,
body.lesson-6 .activity-section,
body.lesson-6 .challenge-section,
body.lesson-6 .quiz-section,

body.lesson-7 .story-section,
body.lesson-7 .steps-section,
body.lesson-7 .activity-section,
body.lesson-7 .challenge-section,
body.lesson-7 .quiz-section,

body.lesson-8 .story-section,
body.lesson-8 .steps-section,
body.lesson-8 .activity-section,
body.lesson-8 .challenge-section,
body.lesson-8 .quiz-section,

body.lesson-9 .story-section,
body.lesson-9 .steps-section,
body.lesson-9 .activity-section,
body.lesson-9 .challenge-section,
body.lesson-9 .quiz-section,

body.lesson-10 .story-section,
body.lesson-10 .steps-section,
body.lesson-10 .activity-section,
body.lesson-10 .challenge-section,
body.lesson-10 .quiz-section {
  display: none !important;
}

/* ============================================================
   AGE 7 LESSON PAGE WIDTH / CENTER POLISH
============================================================ */

.lesson-main,
.lesson-content,
#lesson-content {
  max-width: 980px !important;
  width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.kid-game-box,
.interactive-playground,
.content-section,
.mini-mission-box {
  max-width: 900px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.l6-game-box,
.l7-game-box,
.l8-game-box,
.l9-game-box,
.l10-game-box {
  max-width: 900px !important;
  width: 100% !important;
}

.l10-game-area {
  margin-left: auto !important;
  margin-right: auto !important;
}

.badge-section,
.parent-guide-section,
.lesson-nav {
  max-width: 900px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

@media (max-width: 700px) {
  .lesson-main,
  .lesson-content,
  #lesson-content {
    max-width: 100% !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  .kid-game-box,
  .interactive-playground,
  .content-section,
  .mini-mission-box {
    max-width: 100% !important;
  }
}

/* ============================================================
   LEARNING PATHS ROADMAP SECTION
============================================================ */

.learning-paths-roadmap {
  padding: 60px 7% 80px;
  background: linear-gradient(135deg, #f8f7ff, #fff7ed);
}

.learning-path-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1180px;
  margin: 0 auto;
}

.learning-path-card {
  background: #ffffff;
  border-radius: 26px;
  padding: 28px;
  box-shadow: 0 14px 35px rgba(0,0,0,0.08);
  border: 2px solid #f1f5f9;
  min-height: 300px;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.learning-path-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 45px rgba(0,0,0,0.12);
}

.path-status {
  display: inline-block;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.8px;
  padding: 7px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.active-path {
  border: 3px solid #22c55e;
}

.active-path .path-status {
  background: #dcfce7;
  color: #15803d;
}

.locked-path .path-status {
  background: #f3f4f6;
  color: #6b7280;
}

.future-path .path-status {
  background: #ede9fe;
  color: #7c3aed;
}

.path-icon {
  font-size: 48px;
  margin-bottom: 14px;
}

.learning-path-card h3 {
  font-size: 30px;
  margin: 0;
  color: #263447;
}

.learning-path-card h4 {
  font-size: 20px;
  margin: 6px 0 14px;
  color: #7c3aed;
}

.learning-path-card p {
  color: #667085;
  font-size: 16px;
  line-height: 1.6;
}

.path-button {
  display: inline-block;
  margin-top: 20px;
  padding: 13px 18px;
  background: #22c55e;
  color: white;
  text-decoration: none;
  border-radius: 16px;
  font-weight: 900;
}

@media (max-width: 1000px) {
  .learning-path-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 650px) {
  .learning-path-grid {
    grid-template-columns: 1fr;
  }

  .learning-path-card {
    min-height: auto;
  }
}

/* ============================================================
   FUTURE PLATFORM FEATURES SECTION
============================================================ */

.platform-features-section {
  padding: 70px 7% 90px;
  background: #ffffff;
}

.platform-feature-grid {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.platform-feature-card {
  background: linear-gradient(135deg, #f8fafc, #ffffff);
  border: 2px solid #eef2ff;
  border-radius: 26px;
  padding: 28px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.platform-feature-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(0,0,0,0.1);
}

.platform-feature-card span {
  display: inline-flex;
  width: 58px;
  height: 58px;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: #f3f4ff;
  font-size: 34px;
  margin-bottom: 18px;
}

.platform-feature-card h3 {
  font-size: 24px;
  margin: 0 0 10px;
  color: #263447;
}

.platform-feature-card p {
  color: #667085;
  font-size: 16px;
  line-height: 1.6;
}

@media (max-width: 950px) {
  .platform-feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 620px) {
  .platform-feature-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   HOMEPAGE WIDTH / SPACING POLISH
============================================================ */

.age7-homepage .home-header {
  padding-left: 7% !important;
  padding-right: 7% !important;
}

.age7-homepage .age-hero {
  padding-left: 7% !important;
  padding-right: 7% !important;
  gap: 60px !important;
}

.age7-homepage .age-hero-content {
  max-width: 720px !important;
}

.age7-homepage .age-hero h1 {
  max-width: 760px !important;
  font-size: clamp(42px, 5vw, 72px) !important;
}

.age7-homepage .age-hero p {
  max-width: 680px !important;
}

.age7-homepage .age-hero-card {
  max-width: 520px !important;
  margin-left: auto !important;
}

.age7-homepage .path-summary,
.age7-homepage .lesson-path-section,
.age7-homepage .learning-paths-roadmap,
.age7-homepage .platform-features-section {
  padding-left: 7% !important;
  padding-right: 7% !important;
}

.age7-homepage .age-lesson-grid,
.age7-homepage .learning-path-grid,
.age7-homepage .platform-feature-grid {
  max-width: 1180px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

@media (max-width: 900px) {
  .age7-homepage .age-hero {
    grid-template-columns: 1fr !important;
    text-align: center !important;
  }

  .age7-homepage .age-hero-card {
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .age7-homepage .hero-actions {
    justify-content: center !important;
  }
}

@media (max-width: 600px) {
  .age7-homepage .home-header,
  .age7-homepage .age-hero,
  .age7-homepage .path-summary,
  .age7-homepage .lesson-path-section,
  .age7-homepage .learning-paths-roadmap,
  .age7-homepage .platform-features-section {
    padding-left: 18px !important;
    padding-right: 18px !important;
  }
}

/* ============================================================
   HOMEPAGE GAP / SECTION SPACING POLISH
============================================================ */

.age7-homepage .lesson-path-section {
  padding-bottom: 35px !important;
}

.age7-homepage .learning-paths-roadmap {
  padding-top: 45px !important;
}

.age7-homepage .age-lesson-grid {
  align-items: stretch !important;
}

.age7-homepage .age-lesson-card {
  min-height: 300px !important;
}

.age7-homepage .section-title {
  margin-bottom: 28px !important;
}

@media (max-width: 900px) {
  .age7-homepage .lesson-path-section {
    padding-bottom: 25px !important;
  }

  .age7-homepage .learning-paths-roadmap {
    padding-top: 35px !important;
  }
}

/* ============================================================
   MOBILE HOMEPAGE POLISH
============================================================ */

@media (max-width: 600px) {
  .age7-homepage .home-header {
    min-height: 68px !important;
    padding-top: 12px !important;
    padding-bottom: 12px !important;
  }

  .age7-homepage .home-logo {
    font-size: 18px !important;
    gap: 8px !important;
  }

  .age7-homepage .home-logo span {
    font-size: 30px !important;
  }

  .age7-homepage .home-link {
    font-size: 16px !important;
  }

  .age7-homepage .age-hero {
    padding-top: 42px !important;
    padding-bottom: 48px !important;
    gap: 26px !important;
  }

  .age7-homepage .age-badge {
    font-size: 12px !important;
    padding: 8px 14px !important;
    margin-bottom: 14px !important;
  }

  .age7-homepage .age-hero h1 {
    font-size: 38px !important;
    line-height: 1.12 !important;
    margin-bottom: 18px !important;
  }

  .age7-homepage .age-hero p {
    font-size: 19px !important;
    line-height: 1.5 !important;
  }

  .age7-homepage .hero-actions {
    margin-top: 24px !important;
    gap: 14px !important;
  }

  .age7-homepage .start-adventure-btn,
  .age7-homepage .view-path-btn {
    width: 100% !important;
    max-width: 280px !important;
    text-align: center !important;
    padding: 15px 20px !important;
  }

  .age7-homepage .age-hero-card {
    max-width: 280px !important;
    padding: 24px !important;
  }

  .age7-homepage .hero-character {
    font-size: 64px !important;
  }

  .age7-homepage .path-summary {
    margin-top: 0 !important;
    padding-top: 22px !important;
  }

  .age7-homepage .summary-card {
    padding: 22px !important;
  }

  .age7-homepage .lesson-path-section {
    padding-top: 30px !important;
  }

  .age7-homepage .section-title h2 {
    font-size: 30px !important;
    line-height: 1.2 !important;
  }

  .age7-homepage .section-title p {
    font-size: 16px !important;
  }
}

/* ============================================================
   MOBILE LESSON PAGE POLISH
============================================================ */

@media (max-width: 600px) {
  .lesson-header,
  .home-header {
    min-height: 62px !important;
    padding: 10px 16px !important;
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
  }

  .lesson-header .logo,
  .home-logo {
    font-size: 17px !important;
    gap: 8px !important;
    display: flex !important;
    align-items: center !important;
  }

  .lesson-header .logo span,
  .home-logo span {
    font-size: 26px !important;
  }

  .lesson-header a,
  .home-link {
    font-size: 14px !important;
    white-space: nowrap !important;
  }

  .lesson-hero {
    padding-top: 28px !important;
    padding-bottom: 55px !important;
  }

  .lesson-hero h1 {
    font-size: 30px !important;
    line-height: 1.15 !important;
  }

  .lesson-hero .lesson-goal {
    font-size: 16px !important;
    line-height: 1.4 !important;
  }

  .kid-game-box,
  .interactive-playground {
    border-radius: 18px !important;
    padding: 18px !important;
  }

  .mini-mission-box {
    padding: 18px !important;
    border-radius: 18px !important;
  }

  .mini-mission-box h3 {
    font-size: 24px !important;
  }

  .mini-mission-box li {
    font-size: 15px !important;
    line-height: 1.35 !important;
  }

  .kid-button-row {
    gap: 10px !important;
  }

  .kid-button-row button,
  .l8-controls button,
  .l10-controls button,
  #l10-start-btn,
  .danger-btn {
    min-height: 52px !important;
    font-size: 16px !important;
    border-radius: 14px !important;
  }

  .l10-score-board {
    font-size: 24px !important;
    padding: 12px 18px !important;
  }

  .l10-game-area {
    width: 320px !important;
    max-width: 100% !important;
    height: 350px !important;
  }

  .l10-message {
    min-width: 190px !important;
    font-size: 14px !important;
  }

  .badge-display {
    padding: 20px !important;
  }

  .parent-guide-text {
    font-size: 16px !important;
  }
}

/* ============================================================
   FINAL MOBILE HEADER POLISH
   Keep logo + Home on one row
============================================================ */

@media (max-width: 600px) {
  header,
  .home-header,
  .lesson-header {
    min-height: 58px !important;
    height: 58px !important;
    padding: 8px 14px !important;
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 8px !important;
  }

  .home-logo,
  .lesson-header .logo,
  header .logo {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    font-size: 16px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }

  .home-logo span,
  .lesson-header .logo span,
  header .logo span {
    font-size: 24px !important;
  }

  .home-logo strong,
  .lesson-header .logo strong,
  header .logo strong {
    font-size: 16px !important;
    line-height: 1 !important;
  }

  .home-link,
  .lesson-header a,
  header a {
    font-size: 13px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    margin: 0 !important;
  }

  .lesson-hero {
    padding-top: 22px !important;
    padding-bottom: 45px !important;
  }
}

/* ============================================================
   FORCE MOBILE HEADER ONE ROW
============================================================ */

@media (max-width: 600px) {
  body .lesson-header,
  body .home-header,
  body header {
    height: 56px !important;
    min-height: 56px !important;
    max-height: 56px !important;
    padding: 8px 14px !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: space-between !important;
    align-items: center !important;
    text-align: left !important;
  }

  body .lesson-header .logo,
  body .home-header .home-logo,
  body header .logo,
  body header .home-logo {
    width: auto !important;
    max-width: 75% !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 6px !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: left !important;
    white-space: nowrap !important;
  }

  body .lesson-header .logo span,
  body .home-header .home-logo span,
  body header .logo span,
  body header .home-logo span {
    font-size: 22px !important;
    line-height: 1 !important;
    margin: 0 !important;
  }

  body .lesson-header .logo strong,
  body .home-header .home-logo strong,
  body header .logo strong,
  body header .home-logo strong {
    font-size: 15px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }

  body .lesson-header a,
  body .home-header .home-link,
  body header a {
    width: auto !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 13px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    text-align: right !important;
  }

  body .lesson-hero {
    padding-top: 24px !important;
    padding-bottom: 46px !important;
  }
}

/* ============================================================
   STEP 7 — LOCAL PROGRESS UI
============================================================ */

.home-progress-status {
  margin-top: 22px;
  padding: 14px 18px;
  background: #f0fdf4;
  border: 2px solid #bbf7d0;
  color: #166534;
  border-radius: 18px;
  font-weight: 900;
}

.home-progress-status strong {
  display: block;
  font-size: 26px;
}

.home-progress-status span {
  display: block;
  font-size: 14px;
  color: #15803d;
}

.completed-ribbon {
  position: absolute;
  top: 22px;
  right: 22px;
  background: #dcfce7;
  color: #15803d;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.lesson-completed-card {
  border-color: #22c55e !important;
  box-shadow: 0 16px 42px rgba(34,197,94,0.18) !important;
}

.lesson-completed-card .play-mission {
  background: #22c55e !important;
}

@media (max-width: 600px) {
  .completed-ribbon {
    position: static;
    display: inline-block;
    margin-bottom: 12px;
  }

  .home-progress-status strong {
    font-size: 22px;
  }
}

/* ============================================================
   STEP 8 — RESET PROGRESS BUTTON
============================================================ */

.reset-progress-btn {
  margin-top: 12px;
  padding: 9px 13px;
  border: none;
  border-radius: 12px;
  background: #ef4444;
  color: white;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.reset-progress-btn:hover {
  background: #dc2626;
}

@media (max-width: 600px) {
  .reset-progress-btn {
    width: 100%;
    font-size: 13px;
    padding: 11px 14px;
  }
}

/* ============================================================
   STEP 9 — KID-FRIENDLY TOAST MESSAGE
============================================================ */

.kid-toast {
  position: fixed;
  top: 90px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  z-index: 99999;
  background: #22c55e;
  color: white;
  padding: 16px 24px;
  border-radius: 18px;
  font-size: 18px;
  font-weight: 900;
  box-shadow: 0 18px 40px rgba(0,0,0,0.22);
  opacity: 0;
  pointer-events: none;
  transition: all 0.35s ease;
  text-align: center;
  max-width: 90%;
}

.kid-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.kid-toast.error {
  background: #ef4444;
}

@media (max-width: 600px) {
  .kid-toast {
    top: 72px;
    font-size: 15px;
    padding: 14px 18px;
    border-radius: 16px;
  }
}


/* ===============================
   Play & Learn Code - Learning Map
   =============================== */

.learning-map-section {
  padding: 48px 20px;
  max-width: 1180px;
  margin: 0 auto;
}

.learning-map-section .section-header {
  text-align: center;
  margin-bottom: 28px;
}

.section-kicker {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  background: #fff3c4;
  color: #8a5a00;
  font-weight: 800;
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.learning-map-section h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  margin: 8px 0;
}

.learning-map-section p {
  color: #5f6472;
  font-size: 1.05rem;
}

.learning-map {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 18px;
  align-items: stretch;
}

.map-node {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 145px;
  padding: 18px;
  border-radius: 24px;
  text-decoration: none;
  color: inherit;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(44, 62, 80, 0.12);
  border: 3px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.map-node:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 38px rgba(44, 62, 80, 0.18);
}

.map-node.completed {
  border-color: #57d68d;
  background: linear-gradient(135deg, #ffffff, #eafff2);
}

.map-node.current {
  border-color: #ffb84d;
  background: linear-gradient(135deg, #ffffff, #fff4d8);
}

.map-node.locked {
  opacity: 0.88;
  background: #f6f7fb;
}

.map-node .map-status {
  font-size: 1.8rem;
}

.map-node .map-lesson {
  font-size: 0.85rem;
  font-weight: 900;
  color: #697386;
  text-transform: uppercase;
}

.map-node .map-title {
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.25;
}

.map-node .map-action {
  margin-top: auto;
  font-size: 0.85rem;
  font-weight: 800;
  color: #4f46e5;
}

.plc-mission-footer {
  padding: 36px 20px 48px;
  max-width: 1180px;
  margin: 0 auto;
}

.footer-card {
  border-radius: 28px;
  padding: 32px;
  text-align: center;
  background: linear-gradient(135deg, #eef2ff, #fff7ed);
  box-shadow: 0 14px 34px rgba(44, 62, 80, 0.12);
}

.footer-card h2 {
  margin: 0 0 12px;
  font-size: clamp(1.5rem, 3vw, 2.4rem);
}

.footer-card p {
  max-width: 720px;
  margin: 0 auto 18px;
  color: #555b6d;
  font-size: 1.05rem;
  line-height: 1.6;
}

.footer-tags {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.footer-tags span {
  background: white;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 800;
  box-shadow: 0 6px 16px rgba(44, 62, 80, 0.08);
}

@media (max-width: 900px) {
  .learning-map {
    grid-template-columns: repeat(2, minmax(130px, 1fr));
  }
}

@media (max-width: 520px) {
  .learning-map-section {
    padding: 34px 14px;
  }

  .learning-map {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .map-node {
    min-height: auto;
    padding: 16px;
    border-radius: 20px;
  }

  .footer-card {
    padding: 24px 16px;
  }
}


/* Age 7 Extra Lessons 11-15 */
.extra-lesson-hero,
.extra-section,
.extra-nav {
  max-width: 980px;
  margin: 28px auto;
  padding: 0 18px;
}

.extra-lesson-card {
  background: linear-gradient(135deg, #eef2ff, #fff7ed);
  border-radius: 30px;
  padding: 36px 20px;
  text-align: center;
  box-shadow: 0 16px 40px rgba(44, 62, 80, 0.12);
}

.extra-emoji {
  font-size: 4rem;
}

.extra-lesson-card h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin: 14px 0 8px;
}

.extra-lesson-card p {
  font-size: 1.1rem;
  color: #5f6472;
}

.extra-section {
  background: white;
  border-radius: 24px;
  padding: 26px;
  box-shadow: 0 12px 28px rgba(44, 62, 80, 0.1);
}

.extra-game-box {
  background: #1f2937;
  color: white;
  border-radius: 24px;
  padding: 28px;
  text-align: center;
}

.extra-big {
  font-size: 3rem;
  margin-bottom: 14px;
}

.extra-game-box button,
.extra-save-btn,
.extra-nav a {
  border: 0;
  margin: 8px;
  padding: 14px 20px;
  border-radius: 999px;
  font-weight: 900;
  cursor: pointer;
  background: #22c55e;
  color: white;
  text-decoration: none;
  display: inline-block;
}

.extra-game-box button:nth-of-type(2) {
  background: #f97316;
}

.extra-mission-list {
  display: grid;
  gap: 12px;
  margin: 18px 0;
}

.extra-mission-list label {
  background: #f3f4f6;
  padding: 14px;
  border-radius: 14px;
  font-weight: 700;
}

.extra-badge {
  display: inline-block;
  padding: 14px 18px;
  background: #fff3c4;
  border-radius: 999px;
  font-weight: 900;
}

.extra-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.extra-nav a {
  background: #8b5cf6;
}

@media (max-width: 560px) {
  .extra-section {
    padding: 18px;
  }

  .extra-nav {
    justify-content: center;
  }
}


/* Forced Age 7 Lesson Cards 11-15 */
.forced-age7-card {
  position: relative;
}

.forced-age7-card .lesson-badge {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 999px;
  background: #eef2ff;
  color: #7c3aed;
  font-weight: 900;
  margin-bottom: 28px;
}

.forced-age7-card .completed-badge {
  position: absolute;
  right: 22px;
  top: 26px;
  background: #dcfce7;
  color: #15803d;
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 0.85rem;
}

.forced-age7-card .lesson-emoji {
  font-size: 3.5rem;
  margin: 12px 0 28px;
}

.forced-age7-card h3 {
  font-size: 1.6rem;
  margin-bottom: 14px;
  color: #263548;
}

.forced-age7-card p {
  color: #64748b;
  line-height: 1.7;
  margin-bottom: 26px;
}

.forced-age7-card .play-mission-btn {
  display: block;
  text-align: center;
  color: white;
  background: linear-gradient(90deg, #667eea, #8b5cf6);
  text-decoration: none;
  padding: 16px 20px;
  border-radius: 16px;
  font-weight: 900;
}


/* Age 8 Scratch Basics Preview */
.age8-preview-section {
  max-width: 1180px;
  margin: 40px auto;
  padding: 48px 20px;
}

.age8-preview-header {
  text-align: center;
  margin-bottom: 30px;
}

.age8-kicker {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 999px;
  background: #ede9fe;
  color: #7c3aed;
  font-weight: 900;
  margin-bottom: 12px;
}

.age8-preview-header h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin: 10px 0;
  color: #263548;
}

.age8-preview-header p {
  color: #64748b;
  font-size: 1.05rem;
}

.age8-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 20px;
}

.age8-preview-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 300px;
  padding: 24px;
  border-radius: 26px;
  background: white;
  color: inherit;
  text-decoration: none;
  box-shadow: 0 14px 34px rgba(44, 62, 80, 0.12);
  border-top: 8px solid #8b5cf6;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.age8-preview-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 42px rgba(44, 62, 80, 0.18);
}

.age8-card-status {
  align-self: flex-start;
  background: #fff7ed;
  color: #ea580c;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 900;
}

.age8-card-emoji {
  font-size: 3.2rem;
  margin: 24px 0 18px;
}

.age8-card-lesson {
  color: #7c3aed;
  font-weight: 900;
  margin-bottom: 8px;
}

.age8-preview-card h3 {
  font-size: 1.45rem;
  color: #263548;
  margin: 0 0 12px;
}

.age8-preview-card p {
  color: #64748b;
  line-height: 1.6;
}

.age8-card-action {
  margin-top: auto;
  display: block;
  background: linear-gradient(90deg, #667eea, #8b5cf6);
  color: white;
  padding: 14px 18px;
  border-radius: 16px;
  text-align: center;
  font-weight: 900;
}

@media (max-width: 900px) {
  .age8-preview-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }
}

@media (max-width: 560px) {
  .age8-preview-section {
    padding: 34px 14px;
  }

  .age8-preview-grid {
    grid-template-columns: 1fr;
  }

  .age8-preview-card {
    min-height: auto;
  }
}


/* Clean Homepage Goals and Learning Paths */
.plc-clean-goals-paths {
  max-width: 1180px;
  margin: 42px auto;
  padding: 48px 20px;
}

.plc-clean-header {
  text-align: center;
  margin-bottom: 30px;
}

.plc-clean-kicker {
  display: inline-block;
  background: #ede9fe;
  color: #7c3aed;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 1000;
  margin-bottom: 14px;
}

.plc-clean-header h2 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  color: #263548;
  margin: 0 0 14px;
  letter-spacing: -0.04em;
}

.plc-clean-header p {
  max-width: 850px;
  margin: 0 auto;
  color: #64748b;
  font-size: 1.12rem;
  line-height: 1.7;
}

.plc-ambition-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 32px 0;
}

.plc-ambition-card {
  background: white;
  border-radius: 26px;
  padding: 26px;
  box-shadow: 0 14px 34px rgba(44, 62, 80, 0.12);
  border-top: 7px solid #8b5cf6;
}

.plc-ambition-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.plc-ambition-card h3 {
  color: #263548;
  font-size: 1.35rem;
  margin: 0 0 10px;
}

.plc-ambition-card p {
  color: #64748b;
  line-height: 1.65;
  margin: 0;
}

.plc-path-columns {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 22px;
}

.plc-path-box {
  background: white;
  border-radius: 30px;
  padding: 28px;
  box-shadow: 0 16px 38px rgba(44, 62, 80, 0.12);
}

.plc-path-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.plc-path-title-row span {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: #f3e8ff;
  font-size: 1.8rem;
}

.plc-path-title-row h3 {
  margin: 0;
  color: #263548;
  font-size: 1.65rem;
}

.plc-path-list {
  display: grid;
  gap: 14px;
}

.plc-path-item {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 18px;
  border-radius: 20px;
  background: #f8fafc;
  border: 2px solid #e5e7eb;
}

.plc-path-item strong {
  display: block;
  color: #263548;
  font-size: 1.08rem;
  margin-bottom: 7px;
}

.plc-path-item span {
  display: block;
  color: #64748b;
  line-height: 1.55;
  margin-bottom: 10px;
}

.plc-path-item em {
  font-style: normal;
  font-weight: 1000;
  color: #7c3aed;
}

.plc-path-item.available {
  background: #f0fdf4;
  border-color: #22c55e;
}

.plc-path-item.playable {
  background: #f5f3ff;
  border-color: #8b5cf6;
}

.plc-path-item.coming {
  opacity: 0.9;
}

.plc-level-road {
  display: grid;
  gap: 14px;
}

.plc-level-step {
  position: relative;
  padding: 18px 18px 18px 24px;
  border-radius: 20px;
  background: #f8fafc;
  border-left: 8px solid #cbd5e1;
}

.plc-level-step span {
  display: inline-block;
  background: white;
  color: #475569;
  padding: 7px 12px;
  border-radius: 999px;
  font-weight: 1000;
  margin-bottom: 10px;
}

.plc-level-step strong {
  display: block;
  color: #263548;
  font-size: 1.15rem;
  margin-bottom: 6px;
}

.plc-level-step p {
  color: #64748b;
  line-height: 1.55;
  margin: 0;
}

.plc-level-step.done {
  border-left-color: #22c55e;
  background: #f0fdf4;
}

.plc-level-step.active {
  border-left-color: #8b5cf6;
  background: #f5f3ff;
}

.plc-level-step.future {
  border-left-color: #f59e0b;
  background: #fff7ed;
}

.plc-launch-note {
  margin-top: 22px;
  background: linear-gradient(135deg, #fff7ed, #eef2ff);
  border-radius: 24px;
  padding: 22px;
  text-align: center;
  color: #263548;
  font-size: 1.05rem;
  line-height: 1.6;
  box-shadow: 0 12px 28px rgba(44, 62, 80, 0.1);
}

@media (max-width: 900px) {
  .plc-ambition-grid,
  .plc-path-columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .plc-clean-goals-paths {
    padding: 34px 14px;
  }

  .plc-path-box,
  .plc-ambition-card {
    padding: 22px;
    border-radius: 22px;
  }

  .plc-path-title-row h3 {
    font-size: 1.35rem;
  }
}

/* Lesson 13 mobile compact override */
@media (max-width: 560px) {
  .choice-stage {
    padding: 14px 10px !important;
  }

  .choice-status {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    margin-bottom: 10px !important;
  }

  .choice-status span {
    font-size: 15px !important;
    padding: 8px 8px !important;
  }

  .choice-status span:nth-child(3) {
    grid-column: 1 / 3 !important;
  }

  .choice-icon {
    font-size: 38px !important;
    margin: 8px 0 !important;
  }

  .choice-question {
    font-size: 20px !important;
    line-height: 1.3 !important;
    margin: 10px 0 14px !important;
  }

  .choice-buttons {
    gap: 10px !important;
  }

  .choice-buttons button {
    min-height: 52px !important;
    font-size: 18px !important;
    padding: 12px 14px !important;
  }
}
