/* ===== AUDIO PPT — Story-based Animated Presentations ===== */

:root {
  --ppt-primary: #6366f1;
  --ppt-secondary: #8b5cf6;
  --ppt-accent: #ec4899;
  --ppt-green: #10b981;
  --ppt-amber: #f59e0b;
  --ppt-sky: #38bdf8;
  --ppt-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ppt-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Nunito', sans-serif; overflow: hidden; height: 100vh; overscroll-behavior: none; }

/* ==============================
   STEP 1: LANGUAGE SELECT SCREEN
   ============================== */
.ppt-lang-select {
  width: 100vw; height: 100vh;
  background: linear-gradient(180deg, #e0f2fe 0%, #bae6fd 30%, #7dd3fc 60%, #38bdf8 100%);
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}

/* === SKY SCENE === */
.scene-sky { position: absolute; top: 0; left: 0; right: 0; height: 60%; }

.sun {
  position: absolute; top: 30px; right: 60px;
  width: 70px; height: 70px; border-radius: 50%;
  background: radial-gradient(circle, #fde047, #facc15);
  box-shadow: 0 0 40px rgba(250, 204, 21, 0.6), 0 0 80px rgba(250, 204, 21, 0.3);
  animation: sunPulse 3s ease-in-out infinite;
}
@keyframes sunPulse {
  0%, 100% { box-shadow: 0 0 40px rgba(250,204,21,0.6), 0 0 80px rgba(250,204,21,0.3); transform: scale(1); }
  50% { box-shadow: 0 0 60px rgba(250,204,21,0.8), 0 0 120px rgba(250,204,21,0.4); transform: scale(1.05); }
}

.cloud {
  position: absolute; border-radius: 50%;
  background: rgba(255,255,255,0.9);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.cloud::before, .cloud::after {
  content: ''; position: absolute; border-radius: 50%;
  background: rgba(255,255,255,0.9);
}
.c1 { width: 100px; height: 40px; top: 50px; left: 10%; animation: cloudDrift 20s linear infinite; }
.c1::before { width: 50px; height: 50px; top: -25px; left: 15px; }
.c1::after { width: 60px; height: 45px; top: -20px; left: 40px; }
.c2 { width: 80px; height: 35px; top: 100px; left: 45%; animation: cloudDrift 25s linear infinite 5s; }
.c2::before { width: 45px; height: 42px; top: -22px; left: 10px; }
.c2::after { width: 50px; height: 38px; top: -18px; left: 35px; }
.c3 { width: 70px; height: 30px; top: 70px; left: 75%; animation: cloudDrift 18s linear infinite 10s; }
.c3::before { width: 40px; height: 38px; top: -20px; left: 8px; }
.c3::after { width: 45px; height: 35px; top: -16px; left: 30px; }
@keyframes cloudDrift {
  0% { transform: translateX(0); }
  100% { transform: translateX(calc(100vw + 200px)); }
}

.bird {
  position: absolute;
  width: 16px; height: 4px;
  border: none; background: none;
}
.bird::before, .bird::after {
  content: ''; position: absolute;
  width: 10px; height: 3px; border-top: 2.5px solid #475569;
  border-radius: 50% 50% 0 0;
}
.bird::before { left: -5px; transform: rotate(-20deg); animation: birdFlap 0.6s ease-in-out infinite alternate; }
.bird::after { right: -5px; transform: rotate(20deg); animation: birdFlap 0.6s ease-in-out infinite alternate-reverse; }
.b1 { top: 80px; left: 20%; animation: birdFly 12s linear infinite; }
.b2 { top: 60px; left: 35%; animation: birdFly 15s linear infinite 3s; }
.b3 { top: 95px; left: 55%; animation: birdFly 10s linear infinite 7s; }
@keyframes birdFlap {
  0% { transform: rotate(-30deg); } 100% { transform: rotate(30deg); }
}
@keyframes birdFly {
  0% { transform: translateX(-50px) translateY(0); }
  50% { transform: translateX(calc(50vw)) translateY(-20px); }
  100% { transform: translateX(calc(100vw + 100px)) translateY(0); }
}

/* === GROUND === */
.scene-ground {
  position: absolute; bottom: 0; left: 0; right: 0; height: 40%;
  background: linear-gradient(180deg, #86efac, #22c55e 40%, #16a34a);
  border-radius: 50% 50% 0 0 / 20% 20% 0 0;
}

.tree {
  position: absolute; bottom: 20%;
}
.tree::before {
  content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 12px; height: 50px; background: #92400e; border-radius: 4px;
}
.tree::after {
  content: ''; position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%);
  width: 70px; height: 70px; border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #4ade80, #16a34a);
  box-shadow: -12px 10px 0 -4px #22c55e, 14px 8px 0 -2px #15803d;
  animation: treeWave 4s ease-in-out infinite;
}
.t1 { left: 8%; }
.t2 { right: 12%; }
.t2::after { animation-delay: 1s; }
@keyframes treeWave {
  0%, 100% { transform: translateX(-50%) rotate(0deg); }
  25% { transform: translateX(-50%) rotate(2deg); }
  75% { transform: translateX(-50%) rotate(-2deg); }
}

.flower {
  position: absolute; bottom: 10%; width: 20px; height: 20px;
}
.flower::before {
  content: '🌸'; font-size: 1.4rem;
  animation: flowerSway 3s ease-in-out infinite;
}
.f1 { left: 25%; }
.f1::before { animation-delay: 0s; }
.f2 { left: 50%; }
.f2::before { content: '🌼'; animation-delay: 0.8s; }
.f3 { left: 72%; }
.f3::before { content: '🌺'; animation-delay: 1.6s; }
@keyframes flowerSway {
  0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(10deg); }
}

/* === LANG CARD === */
.ppt-lang-card {
  position: relative; z-index: 10;
  background: rgba(255,255,255,0.92); backdrop-filter: blur(20px);
  border-radius: 32px; padding: 40px 36px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.12);
  text-align: center; max-width: 440px; width: 90%;
  animation: cardPop 0.6s var(--ppt-spring);
}
@keyframes cardPop {
  0% { opacity: 0; transform: scale(0.8) translateY(30px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
.ppt-lang-illustration { display: none; }
.ppt-lang-title { font-size: 1.6rem; font-weight: 900; color: #1e293b; margin-bottom: 4px; }
.ppt-lang-topic { font-size: 1rem; font-weight: 700; color: var(--ppt-primary); margin-bottom: 24px; }
.ppt-topic-preview {
  display: flex; align-items: center; justify-content: center;
  width: 100%; min-height: 120px; margin: -4px 0 18px;
}
.ppt-topic-preview .topic-lottie-player {
  width: 120px; height: 120px;
  filter: drop-shadow(0 12px 30px rgba(99,102,241,0.18));
}
.ppt-lang-question { font-size: 1.1rem; font-weight: 800; color: #334155; margin-bottom: 4px; }
.ppt-lang-question-hi { font-size: 1rem; font-weight: 700; color: #64748b; margin-bottom: 24px; }

.ppt-lang-options { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.ppt-lang-btn {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 20px 32px; border: 2px solid #e2e8f0; border-radius: 20px;
  background: #fff; cursor: pointer; transition: all 0.3s var(--ppt-spring);
  font-family: 'Nunito', sans-serif; min-width: 140px;
}
.ppt-lang-btn:hover {
  border-color: var(--ppt-primary); transform: translateY(-4px) scale(1.03);
  box-shadow: 0 12px 32px rgba(99,102,241,0.15);
}
.ppt-lang-btn:active { transform: scale(0.97); }
.ppt-lang-flag { font-size: 2.2rem; }
.ppt-lang-name { font-size: 1.1rem; font-weight: 800; color: #1e293b; }
.ppt-lang-sub { font-size: 0.72rem; font-weight: 600; color: #94a3b8; }

/* ==============================
   STEP 2: GENERATING / LOADING
   ============================== */
.ppt-generating {
  width: 100vw; height: 100vh;
  background: linear-gradient(180deg, #fef3c7 0%, #fde68a 30%, #38bdf8 60%, #0ea5e9 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 20px; position: relative; overflow: hidden;
}

/* River */
.gen-river {
  position: absolute; bottom: 0; left: 0; right: 0; height: 30%;
  background: linear-gradient(180deg, rgba(56,189,248,0.6), #0284c7);
  overflow: hidden;
}
.river-wave {
  position: absolute; width: 200%; height: 30px;
  background: repeating-linear-gradient(90deg, transparent, transparent 40px, rgba(255,255,255,0.15) 40px, rgba(255,255,255,0.15) 80px);
  animation: waveFlow 4s linear infinite;
}
.w1 { top: 10%; opacity: 0.7; animation-duration: 3s; }
.w2 { top: 40%; opacity: 0.5; animation-duration: 5s; animation-delay: 1s; }
.w3 { top: 70%; opacity: 0.3; animation-duration: 4s; animation-delay: 2s; }
@keyframes waveFlow { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

.river-fish {
  position: absolute; bottom: 30%; left: -30px;
  width: 24px; height: 12px; background: #f59e0b; border-radius: 50% 20% 20% 50%;
  animation: fishSwim 6s ease-in-out infinite;
}
.river-fish::after {
  content: ''; position: absolute; right: -8px; top: 1px;
  border-left: 10px solid #f59e0b; border-top: 6px solid transparent; border-bottom: 6px solid transparent;
}
@keyframes fishSwim {
  0% { transform: translateX(0) translateY(0); }
  25% { transform: translateX(25vw) translateY(-10px); }
  50% { transform: translateX(50vw) translateY(5px); }
  75% { transform: translateX(75vw) translateY(-8px); }
  100% { transform: translateX(calc(100vw + 40px)) translateY(0); }
}

/* Children silhouettes */
.gen-children {
  position: absolute; bottom: 28%; display: flex; gap: 30px;
}
.child {
  width: 20px; height: 40px; position: relative;
}
.child::before {
  content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 16px; height: 16px; border-radius: 50%;
  background: #92400e;
}
.child::after {
  content: ''; position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
  width: 14px; height: 24px; border-radius: 6px 6px 0 0;
}
.child-1::after { background: #ef4444; }
.child-1 { animation: childJump 2s ease-in-out infinite; }
.child-2::after { background: #3b82f6; }
.child-2 { animation: childJump 2s ease-in-out infinite 0.5s; }
@keyframes childJump {
  0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); }
}

.gen-text {
  position: relative; z-index: 10;
  font-size: 1.3rem; font-weight: 800; color: #1e293b;
  text-align: center;
}
.gen-subtext {
  position: relative; z-index: 10;
  font-size: 0.9rem; font-weight: 600; color: #475569;
  text-align: center; max-width: 300px;
}
.gen-progress {
  position: relative; z-index: 10;
  width: 240px; height: 6px; border-radius: 6px;
  background: rgba(255,255,255,0.4);
}
.gen-progress-fill {
  height: 100%; border-radius: 6px; width: 0%;
  background: linear-gradient(90deg, var(--ppt-primary), var(--ppt-accent));
  transition: width 0.5s;
}

/* ==============================
   STEP 3: PPT VIEWER
   ============================== */
.ppt-viewer {
  width: 100vw; height: 100vh;
  display: flex; flex-direction: column;
  position: relative;
}

.ppt-topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 20px; z-index: 20;
  background: rgba(15,23,42,0.7); backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.ppt-back {
  display: flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.1);
  color: #e2e8f0; font-family: 'Nunito', sans-serif; font-weight: 700; font-size: 0.85rem;
  padding: 6px 14px; border-radius: 12px; cursor: pointer; transition: all 0.2s;
}
.ppt-back:hover { background: rgba(255,255,255,0.15); }
.ppt-back svg { width: 16px; height: 16px; }
.ppt-title {
  flex: 1; font-size: 0.95rem; font-weight: 800; color: #fff;
  text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ppt-slide-num {
  font-size: 0.8rem; font-weight: 700; color: #94a3b8;
  padding: 4px 12px; background: rgba(255,255,255,0.06); border-radius: 10px;
}

.ppt-progress { height: 4px; background: rgba(255,255,255,0.08); z-index: 20; }
.ppt-progress-fill {
  height: 100%; width: 0%; border-radius: 4px;
  background: linear-gradient(90deg, var(--ppt-primary), var(--ppt-accent));
  transition: width 0.5s var(--ppt-smooth);
}

/* ===== STAGE ===== */
.ppt-stage {
  flex: 1; position: relative; overflow: hidden;
}
.ppt-topic-lottie-stage {
  position: absolute; top: 28px; right: 24px; z-index: 4;
  width: 180px; height: 180px; pointer-events: none;
  opacity: 0.88;
}
.ppt-topic-lottie-stage .topic-lottie-player {
  width: 100%; height: 100%;
  filter: drop-shadow(0 16px 40px rgba(15,23,42,0.22));
}

/* === ANIMATED SCENE BACKGROUNDS === */
.ppt-scene {
  position: absolute; inset: 0; z-index: 1;
  transition: background 1s;
}

/* Scene types */
.ppt-scene.scene-garden {
  background: linear-gradient(180deg, #bae6fd 0%, #7dd3fc 40%, #86efac 60%, #22c55e 100%);
}
.ppt-scene.scene-river {
  background: linear-gradient(180deg, #e0f2fe 0%, #7dd3fc 35%, #0ea5e9 65%, #0284c7 100%);
}
.ppt-scene.scene-sunset {
  background: linear-gradient(180deg, #fef3c7 0%, #fdba74 30%, #fb923c 60%, #f97316 100%);
}
.ppt-scene.scene-night {
  background: linear-gradient(180deg, #1e1b4b 0%, #312e81 40%, #3730a3 70%, #1e1b4b 100%);
}
.ppt-scene.scene-park {
  background: linear-gradient(180deg, #bfdbfe 0%, #93c5fd 35%, #86efac 55%, #4ade80 100%);
}
.ppt-scene.scene-classroom {
  background: linear-gradient(180deg, #fef9c3 0%, #fde68a 40%, #fcd34d 70%, #f59e0b 100%);
}
.ppt-scene.scene-lake {
  background: linear-gradient(180deg, #c7d2fe 0%, #818cf8 35%, #6366f1 55%, #4f46e5 100%);
}
.ppt-scene.scene-mountain {
  background: linear-gradient(180deg, #f0f9ff 0%, #bae6fd 25%, #64748b 55%, #334155 100%);
}

/* Scene animated elements */
.scene-el {
  position: absolute;
  pointer-events: none;
}

/* Animated river in scene */
.scene-river-anim {
  position: absolute; bottom: 0; left: 0; right: 0; height: 35%;
  background: linear-gradient(180deg, rgba(56,189,248,0.5), rgba(2,132,199,0.8));
  border-radius: 60% 60% 0 0 / 15% 15% 0 0;
  overflow: hidden;
}
.scene-river-anim .river-wave { animation: waveFlow 3s linear infinite; }

/* Trees in scene */
.scene-tree {
  position: absolute; bottom: 0;
}
.scene-tree::before {
  content: ''; display: block; width: 14px; height: 55px;
  background: #92400e; border-radius: 4px; margin: 0 auto;
}
.scene-tree::after {
  content: ''; display: block; width: 80px; height: 80px;
  border-radius: 50%; margin: -55px auto 0;
  background: radial-gradient(circle at 40% 40%, #4ade80, #16a34a);
  box-shadow: -14px 12px 0 -5px #22c55e, 16px 10px 0 -3px #15803d;
  animation: treeWave 5s ease-in-out infinite;
}

/* Garden flowers */
.scene-flowers {
  position: absolute; bottom: 5%; left: 0; right: 0;
  display: flex; justify-content: space-around;
}
.scene-flower-item { font-size: 1.6rem; animation: flowerSway 3s ease-in-out infinite; }
.scene-flower-item:nth-child(2) { animation-delay: 0.5s; }
.scene-flower-item:nth-child(3) { animation-delay: 1s; }
.scene-flower-item:nth-child(4) { animation-delay: 1.5s; }
.scene-flower-item:nth-child(5) { animation-delay: 2s; }

/* Swing in park */
.scene-swing {
  position: absolute; bottom: 25%;
}
.scene-swing-frame {
  width: 60px; height: 80px; position: relative;
}
.scene-swing-frame::before {
  content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 60px; height: 6px; background: #92400e; border-radius: 3px;
}
.scene-swing-rope {
  position: absolute; top: 6px; width: 2px; height: 50px; background: #78716c;
}
.scene-swing-rope:first-child { left: 12px; }
.scene-swing-rope:nth-child(2) { right: 12px; }
.scene-swing-seat {
  position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%);
  width: 30px; height: 5px; background: #92400e; border-radius: 2px;
  animation: swingMotion 3s ease-in-out infinite;
  transform-origin: top center;
}
@keyframes swingMotion {
  0%, 100% { transform: translateX(-50%) rotate(-15deg); }
  50% { transform: translateX(-50%) rotate(15deg); }
}

/* Children playing in scenes */
.scene-child {
  position: absolute; font-size: 1.5rem;
  pointer-events: none; z-index: 3;
}
@keyframes childBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}
@keyframes swingChildAnim {
  0%, 100% { transform: rotate(-18deg); }
  50% { transform: rotate(18deg); }
}
@keyframes childSkip {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(40px); }
}

/* Butterflies */
.scene-butterfly {
  position: absolute; font-size: 1.2rem;
  animation: butterflyFly 8s ease-in-out infinite;
}
.scene-butterfly:nth-child(2) { animation-delay: 3s; animation-duration: 10s; }
@keyframes butterflyFly {
  0% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(80px, -40px) rotate(10deg); }
  50% { transform: translate(160px, 10px) rotate(-5deg); }
  75% { transform: translate(100px, -30px) rotate(8deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}

/* Stars (night scene) */
.scene-star {
  position: absolute; width: 3px; height: 3px;
  background: #fff; border-radius: 50%;
  animation: twinkle 2s ease-in-out infinite;
}
@keyframes twinkle {
  0%, 100% { opacity: 0.3; } 50% { opacity: 1; }
}

/* Lake reflection */
.scene-lake-water {
  position: absolute; bottom: 0; left: 0; right: 0; height: 40%;
  background: linear-gradient(180deg, rgba(99,102,241,0.4), rgba(79,70,229,0.7));
  border-radius: 50% 50% 0 0 / 10% 10% 0 0;
}
.scene-lake-reflection {
  position: absolute; bottom: 10%; left: 50%; transform: translateX(-50%);
  width: 120px; height: 30px;
  background: rgba(255,255,255,0.12); border-radius: 50%;
  animation: lakeShimmer 3s ease-in-out infinite;
}
@keyframes lakeShimmer {
  0%, 100% { opacity: 0.3; transform: translateX(-50%) scaleX(1); }
  50% { opacity: 0.7; transform: translateX(-50%) scaleX(1.2); }
}

/* ===== SLIDE CONTENT OVERLAY ===== */
.ppt-slide {
  position: absolute; inset: 0; z-index: 5;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 24px;
  overflow-y: auto;
}

.ppt-card {
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 28px; padding: 40px 36px;
  max-width: 780px; width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  color: #e2e8f0;
}
.ppt-card-header {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 20px;
}
.ppt-card-copy { flex: 1; min-width: 0; }
.ppt-card-topic-art {
  width: 112px; min-width: 112px; height: 112px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(99,102,241,0.14), rgba(236,72,153,0.12));
  border: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}
.ppt-card-topic-art .topic-lottie-player {
  width: 96px; height: 96px;
}

.ppt-card.slide-enter { animation: cardEnter 0.7s var(--ppt-spring) forwards; }
.ppt-card.slide-exit { animation: cardExit 0.4s var(--ppt-smooth) forwards; }
@keyframes cardEnter {
  0% { opacity: 0; transform: translateY(50px) scale(0.93); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes cardExit {
  0% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: translateY(-30px) scale(0.96); }
}

.ppt-slide-badge {
  display: inline-block; padding: 4px 14px;
  background: rgba(99,102,241,0.2); border: 1px solid rgba(99,102,241,0.3);
  border-radius: 20px; font-size: 0.72rem; font-weight: 800;
  color: #a5b4fc; text-transform: uppercase; letter-spacing: 1.2px;
  margin-bottom: 16px;
  opacity: 0; animation: fadeUp 0.5s var(--ppt-spring) 0.1s forwards;
}

.ppt-slide-icon {
  font-size: 2.8rem; margin-bottom: 12px;
  opacity: 0; transform: scale(0.3);
  animation: iconPop 0.6s var(--ppt-spring) 0.2s forwards;
}
@keyframes iconPop { to { opacity: 1; transform: scale(1); } }

.ppt-slide-title {
  font-size: 1.8rem; font-weight: 900; color: #fff;
  margin-bottom: 20px; line-height: 1.25;
  opacity: 0; transform: translateX(-30px);
  animation: slideRight 0.6s var(--ppt-spring) 0.3s forwards;
}
@keyframes slideRight { to { opacity: 1; transform: translateX(0); } }
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }

/* Story narration text */
.ppt-story-text {
  font-size: 1.15rem; line-height: 2; color: #cbd5e1;
  margin-bottom: 20px;
}
.ppt-story-line {
  display: block; padding: 4px 8px; margin: 4px 0;
  border-radius: 8px; transition: all 0.4s;
  opacity: 0; transform: translateY(8px);
}
.ppt-story-line.visible {
  opacity: 1; transform: translateY(0);
}
.ppt-story-line.speaking {
  background: rgba(99,102,241,0.15); color: #a5b4fc;
  font-weight: 700; border-left: 3px solid var(--ppt-primary);
  padding-left: 12px;
}

/* Examples */
.ppt-examples {
  margin-top: 16px; padding: 16px 20px;
  background: rgba(16,185,129,0.08);
  border-left: 4px solid var(--ppt-green); border-radius: 0 16px 16px 0;
}
.ppt-examples-label {
  font-size: 0.72rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 1.5px; color: var(--ppt-green); margin-bottom: 10px;
}
.ppt-example-item {
  font-size: 1rem; padding: 6px 0; color: #94a3b8;
  display: flex; align-items: center; gap: 8px;
  opacity: 0; transform: translateX(-15px);
}
.ppt-example-item.visible {
  opacity: 1; transform: translateX(0); transition: all 0.5s var(--ppt-spring);
}
.ppt-example-item::before { content: '→'; color: var(--ppt-green); font-weight: 800; }
.ppt-browser-lottie {
  width: 48px; height: 48px; border-radius: 14px;
  background: linear-gradient(135deg,#eef2ff,#fdf2f8);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.ppt-browser-lottie .topic-lottie-player {
  width: 42px; height: 42px;
}

/* ===== CONTROLS ===== */
.ppt-controls {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 14px 24px; z-index: 20;
  background: rgba(15,23,42,0.85); backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255,255,255,0.06);
}
.ppt-ctrl {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border: 1px solid rgba(255,255,255,0.1); border-radius: 14px;
  background: rgba(255,255,255,0.06); color: #cbd5e1;
  cursor: pointer; transition: all 0.25s var(--ppt-spring);
  font-family: 'Nunito', sans-serif;
}
.ppt-ctrl:hover { background: rgba(255,255,255,0.12); transform: translateY(-2px); }
.ppt-ctrl:active { transform: scale(0.93); }
.ppt-ctrl svg { width: 20px; height: 20px; }
.ppt-ctrl-play {
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(135deg, var(--ppt-primary), var(--ppt-secondary));
  border: 2px solid rgba(165,180,252,0.3); color: #fff;
  box-shadow: 0 4px 24px rgba(99,102,241,0.35);
}
.ppt-ctrl-play:hover { box-shadow: 0 6px 32px rgba(99,102,241,0.5); transform: translateY(-2px) scale(1.05); }
.ppt-ctrl-play svg { width: 22px; height: 22px; }
.ppt-ctrl-speed { width: auto; padding: 0 14px; font-weight: 800; font-size: 0.85rem; }
.ppt-ctrl-fs { color: #f472b6; }

/* ===== BUTTONS ===== */
.ppt-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border: none; border-radius: 16px;
  font-family: 'Nunito', sans-serif; font-size: 0.95rem; font-weight: 700;
  cursor: pointer; transition: all 0.25s var(--ppt-spring); text-decoration: none;
}
.ppt-btn:hover { transform: translateY(-2px); }
.ppt-btn-primary {
  background: linear-gradient(135deg, var(--ppt-primary), var(--ppt-secondary));
  color: #fff; box-shadow: 0 4px 20px rgba(99,102,241,0.3);
}
.ppt-btn-secondary {
  background: rgba(255,255,255,0.08); color: #e2e8f0;
  border: 1px solid rgba(255,255,255,0.12);
}
.ppt-btn-accent {
  background: linear-gradient(135deg, var(--ppt-accent), #f472b6);
  color: #fff; box-shadow: 0 4px 20px rgba(236,72,153,0.3);
}

/* ===== END SCREEN ===== */
.ppt-end {
  position: absolute; inset: 0; z-index: 30;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: linear-gradient(180deg, #bfdbfe 0%, #93c5fd 30%, #86efac 55%, #4ade80 100%);
}

.ppt-end-scene { position: absolute; inset: 0; overflow: hidden; }

/* Swings */
.end-park { position: absolute; inset: 0; }
.swing {
  position: absolute; bottom: 35%;
}
.swing::before {
  content: ''; position: absolute; top: 0; left: 0;
  width: 50px; height: 5px; background: #78716c; border-radius: 3px;
}
.swing::after {
  content: ''; position: absolute; top: 5px; left: 10px;
  width: 2px; height: 45px; background: #a8a29e;
  animation: swingMotion 2.5s ease-in-out infinite;
  transform-origin: top;
}
.swing .swing-seat {
  position: absolute; top: 48px; left: 5px;
  width: 25px; height: 4px; background: #92400e; border-radius: 2px;
  animation: swingMotion 2.5s ease-in-out infinite;
  transform-origin: top;
}
.s1 { left: 20%; }
.s2 { left: 40%; }
.s2::after, .s2 .swing-seat { animation-delay: 0.5s; }

.end-tree {
  position: absolute; bottom: 0;
}
.end-tree::before {
  content: ''; display: block; width: 16px; height: 60px;
  background: #92400e; border-radius: 5px; margin: 0 auto;
}
.end-tree::after {
  content: ''; display: block; width: 90px; height: 90px;
  border-radius: 50%; margin: -60px auto 0;
  background: radial-gradient(circle at 35% 35%, #4ade80, #15803d);
  animation: treeWave 4s ease-in-out infinite;
}
.et1 { right: 5%; }
.et2 { left: 5%; }
.et2::after { animation-delay: 1.5s; }

.end-child {
  position: absolute; bottom: 30%; width: 18px; height: 36px;
}
.end-child::before {
  content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 14px; height: 14px; border-radius: 50%; background: #d4a574;
}
.end-child::after {
  content: ''; position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  width: 12px; height: 22px; border-radius: 6px 6px 0 0;
}
.ec1 { left: 60%; animation: childJump 1.8s ease-in-out infinite; }
.ec1::after { background: #ef4444; }
.ec2 { left: 70%; animation: childJump 1.8s ease-in-out infinite 0.4s; }
.ec2::after { background: #3b82f6; }

.end-butterfly {
  position: absolute; font-size: 1.4rem;
}
.bf1 { top: 20%; left: 30%; animation: butterflyFly 7s ease-in-out infinite; }
.bf1::before { content: '🦋'; }
.bf2 { top: 35%; right: 25%; animation: butterflyFly 9s ease-in-out infinite 2s; }
.bf2::before { content: '🦋'; }

.ppt-end-card {
  position: relative; z-index: 10;
  text-align: center; background: rgba(255,255,255,0.9);
  backdrop-filter: blur(20px); border-radius: 28px;
  padding: 40px 36px; box-shadow: 0 20px 60px rgba(0,0,0,0.1);
  animation: cardEnter 0.7s var(--ppt-spring);
  max-width: 440px; width: 90%;
}
.ppt-end-icon { font-size: 3.5rem; margin-bottom: 12px; }
.ppt-end-title { font-size: 1.6rem; font-weight: 900; color: #1e293b; margin-bottom: 6px; }
.ppt-end-subtitle { font-size: 0.95rem; font-weight: 600; color: #64748b; margin-bottom: 24px; }
.ppt-end-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.ppt-end-card .ppt-btn-primary {
  background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff;
}
.ppt-end-card .ppt-btn-secondary {
  background: rgba(0,0,0,0.05); color: #334155; border: 1px solid #e2e8f0;
}
.ppt-end-card .ppt-btn-accent {
  background: linear-gradient(135deg, #ec4899, #f472b6); color: #fff;
}

/* ===== NEXT SLIDE NUDGE ===== */
.ppt-nudge {
  position: fixed; bottom: 100px; left: 50%; transform: translateX(-50%);
  z-index: 50; pointer-events: none;
}
.ppt-nudge.visible {
  pointer-events: all;
  animation: nudgePop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.ppt-nudge.hiding {
  animation: nudgeHide 0.3s ease-in forwards;
}
@keyframes nudgePop {
  0% { opacity: 0; transform: translateX(-50%) translateY(30px) scale(0.85); }
  100% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}
@keyframes nudgeHide {
  0% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
  100% { opacity: 0; transform: translateX(-50%) translateY(20px) scale(0.9); }
}
.ppt-nudge-inner {
  background: rgba(15,23,42,0.92); backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.12); border-radius: 24px;
  padding: 20px 28px; text-align: center;
  box-shadow: 0 12px 48px rgba(0,0,0,0.4), 0 0 0 1px rgba(99,102,241,0.3);
  position: relative; min-width: 260px;
}
.ppt-nudge-emoji {
  font-size: 2rem; margin-bottom: 6px;
  animation: nudgeWiggle 1s ease-in-out infinite;
}
@keyframes nudgeWiggle {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-15deg); }
  75% { transform: rotate(15deg); }
}
.ppt-nudge-text {
  font-size: 1.1rem; font-weight: 900; color: #fff; margin-bottom: 2px;
}
.ppt-nudge-sub {
  font-size: 0.8rem; font-weight: 600; color: #94a3b8; margin-bottom: 14px;
}
.ppt-nudge-btn {
  display: inline-block; padding: 10px 24px;
  background: linear-gradient(135deg, var(--ppt-primary), var(--ppt-secondary));
  color: #fff; border: none; border-radius: 14px;
  font-family: 'Nunito', sans-serif; font-size: 0.95rem; font-weight: 800;
  cursor: pointer; box-shadow: 0 4px 20px rgba(99,102,241,0.4);
  transition: all 0.2s; width: 100%;
}
.ppt-nudge-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 28px rgba(99,102,241,0.5); }
.ppt-nudge-close {
  position: absolute; top: 10px; right: 12px;
  background: none; border: none; color: #64748b;
  font-size: 0.85rem; cursor: pointer; padding: 4px;
  font-family: 'Nunito', sans-serif;
}
.ppt-nudge-close:hover { color: #94a3b8; }

/* ===== ERROR ===== */
.ppt-error-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(15,23,42,0.9);
  display: flex; align-items: center; justify-content: center;
}
.ppt-error-box {
  text-align: center; padding: 40px; background: rgba(30,27,75,0.9);
  border-radius: 24px; border: 1px solid rgba(255,255,255,0.1);
}
.ppt-error-icon { font-size: 3rem; margin-bottom: 12px; }
.ppt-error-msg { font-size: 1.1rem; font-weight: 700; color: #94a3b8; margin-bottom: 20px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .ppt-lang-card { padding: 28px 20px; }
  .ppt-lang-title { font-size: 1.3rem; }
  .ppt-topic-preview .topic-lottie-player { width: 96px; height: 96px; }
  .ppt-lang-btn { padding: 16px 24px; min-width: 120px; }
  .ppt-card { padding: 28px 20px; border-radius: 22px; }
  .ppt-card-header { flex-direction: column; }
  .ppt-card-topic-art { width: 100%; height: 96px; min-width: 0; }
  .ppt-card-topic-art .topic-lottie-player { width: 80px; height: 80px; }
  .ppt-topic-lottie-stage {
    width: 112px; height: 112px; top: 12px; right: 10px; opacity: 0.42;
  }
  .ppt-slide-title { font-size: 1.35rem; }
  .ppt-story-text { font-size: 1rem; line-height: 1.8; }
  .ppt-controls { gap: 8px; padding: 10px 12px; }
  .ppt-ctrl { width: 38px; height: 38px; }
  .ppt-ctrl-play { width: 48px; height: 48px; }
  .ppt-end-card { padding: 28px 20px; }
  .ppt-end-actions { flex-direction: column; }
  .ppt-end-card .ppt-btn { width: 100%; justify-content: center; }
}
