/* Hora Academy · Interactive PPT Slide-Deck Lesson Style
 * Clean visual-first slides + collapsible Teacher Voice/Speaker Notes bar at the bottom
 */
body.ppt-mode {
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 212, 59, 0.22) 0, transparent 36%),
    radial-gradient(circle at 88% 12%, rgba(102, 217, 232, 0.25) 0, transparent 38%),
    linear-gradient(180deg, #e8f6ff 0%, #fffdf7 55%, #f2f9f5 100%);
  min-height: 100vh;
}

.ppt-shell {
  max-width: 1080px;
  margin: 0 auto;
  padding: 18px 20px 44px;
}

/* Top Slide Progress Dots */
.ppt-progress-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(255, 255, 255, 0.92);
  border: 2px solid #dcebfa;
  border-radius: 999px;
  padding: 8px 16px;
  margin-bottom: 16px;
  box-shadow: 0 6px 18px rgba(30, 58, 95, 0.06);
  flex-wrap: wrap;
}
.ppt-dots {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.ppt-dot {
  border: none;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: #f1f5f9;
  color: #64748b;
  transition: all .2s ease;
}
.ppt-dot:hover { background: #e2e8f0; color: #1e293b; }
.ppt-dot.active {
  background: linear-gradient(135deg, #15aabf, #4c6ef5);
  color: #fff;
  box-shadow: 0 4px 12px rgba(21, 170, 191, 0.3);
}
.ppt-counter {
  font-size: 12.5px;
  font-weight: 900;
  color: #0c8599;
}

/* Main Slide Stage (Looks like a gorgeous illustrated Keynote/PPT slide) */
.slide-stage {
  position: relative;
  background: #ffffff;
  border-radius: 30px;
  border: 3px solid #ffffff;
  box-shadow: 0 22px 54px rgba(20, 48, 82, 0.13);
  overflow: hidden;
  min-height: 540px;
  display: flex;
  flex-direction: column;
}

.slide {
  display: none;
  flex: 1;
  flex-direction: column;
  animation: slideFade .28s ease;
}
.slide.active { display: flex; }
@keyframes slideFade {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Slide Header Ribbon */
.slide-top {
  padding: 20px 30px 14px;
  background: linear-gradient(120deg, var(--s-from, #15aabf), var(--s-to, #4c6ef5));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.slide-top h2 {
  margin: 0;
  font-size: clamp(22px, 2.8vw, 30px);
  font-weight: 900;
  letter-spacing: -0.015em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.slide-badge {
  font-size: 12px;
  font-weight: 900;
  padding: 5px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(4px);
}

/* Slide Body: Clean, airy, visual-first! */
.slide-body {
  flex: 1;
  padding: 24px 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  background: radial-gradient(circle at 95% 10%, var(--s-glow, rgba(102,217,232,0.12)), transparent 45%), #ffffff;
}

/* Split Visual + Interactive Layout */
.ppt-split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 24px;
  align-items: center;
}
.ppt-photo {
  border-radius: 22px;
  overflow: hidden;
  border: 3px solid #f1f5f9;
  box-shadow: 0 14px 30px rgba(20, 48, 82, 0.14);
  aspect-ratio: 16 / 9;
  background: #e7f5ff;
}
.ppt-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Big Visual Question Title */
.big-q {
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 900;
  color: #1e2d42;
  line-height: 1.25;
  margin: 0 0 14px;
}

/* Short Visual Choice Cards (PPT style: icon + few words!) */
.ppt-choices {
  display: grid;
  gap: 10px;
}
.ppt-choice {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-radius: 16px;
  border: 2px solid #dcebfa;
  background: #f8fbff;
  font-size: 15px;
  font-weight: 800;
  color: #1e2d42;
  text-align: left;
  transition: all .18s ease;
}
.ppt-choice:hover { transform: translateX(4px); border-color: #339af0; background: #fff; }
.ppt-choice .c-ico {
  width: 36px; height: 36px;
  border-radius: 12px;
  background: #fff;
  display: grid;
  place-items: center;
  font-size: 18px;
  flex-shrink: 0;
  box-shadow: 0 3px 8px rgba(0,0,0,0.06);
}
.ppt-choice.correct { background: #d3f9d8; border-color: #2f9e44; color: #1b5e20; }
.ppt-choice.wrong { background: #ffe3e3; border-color: #fa5252; color: #b71c1c; }

/* Big Visual Number Tiles */
.big-tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}
.num-tile {
  width: 68px; height: 68px;
  border-radius: 20px;
  border: 2.5px solid #a5d8ff;
  background: #fff;
  font-size: 24px;
  font-weight: 900;
  color: #1971c2;
  box-shadow: 0 6px 14px rgba(51, 154, 240, 0.12);
  transition: transform .18s ease, background .18s ease;
}
.num-tile:hover { transform: translateY(-3px) scale(1.05); }
.num-tile.hit { background: linear-gradient(135deg, #20c997, #12b886); color: #fff; border-color: transparent; }
.num-tile.miss { background: #ffe3e3; color: #c92a2a; border-color: #ffa8a8; }

/* Visual Comparison Badges (1 vs 2 vs 9) */
.visual-cards-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.v-card {
  border-radius: 20px;
  padding: 18px 14px;
  text-align: center;
  border: 2px solid var(--vc-bd, #dcebfa);
  background: var(--vc-bg, #f8fbff);
}
.v-card .v-big {
  font-size: 42px;
  font-weight: 900;
  line-height: 1.1;
  color: var(--vc-c, #1971c2);
  margin-bottom: 6px;
}
.v-card h4 { margin: 0 0 4px; font-size: 16px; font-weight: 900; color: #1e2d42; }
.v-card p { margin: 0; font-size: 13px; font-weight: 700; color: #475569; }

/* Flip Flashcards for Vocabulary */
.flash-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.flash-card {
  border-radius: 20px;
  padding: 18px 16px;
  text-align: center;
  border: 2px solid var(--fc-bd, #a5d8ff);
  background: var(--fc-bg, #eef7ff);
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}
.flash-card:hover { transform: translateY(-4px); box-shadow: 0 10px 22px rgba(30,58,95,0.1); }
.flash-ico { font-size: 30px; margin-bottom: 6px; }
.flash-word { font-size: 18px; font-weight: 900; color: #1e2d42; margin-bottom: 6px; }
.flash-short { font-size: 13px; font-weight: 700; color: #475569; }

/* Bottom Teacher Speaker Notes & Voice Bar (Text goes HERE, spoken aloud!) */
.speaker-bar {
  border-top: 2px dashed #e2eaf3;
  background: #fffdf5;
  padding: 14px 26px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.speaker-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.speaker-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.speaker-ava {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffd43b, #ff922b);
  display: grid;
  place-items: center;
  font-size: 19px;
}
.speaker-text {
  font-size: 13.5px;
  font-weight: 700;
  color: #5c4400;
  background: #fff9db;
  border: 1.5px solid #ffe066;
  border-radius: 14px;
  padding: 10px 14px;
  display: none;
}
.speaker-text.show { display: block; }

/* Bottom Slide Navigation Controls */
.ppt-nav-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}
.nav-big {
  padding: 12px 24px;
  border-radius: 999px;
  border: 2px solid #cbd8e6;
  background: #fff;
  font-size: 14.5px;
  font-weight: 900;
  color: #1e2d42;
  box-shadow: 0 6px 16px rgba(20, 48, 82, 0.08);
  transition: all .18s ease;
}
.nav-big:hover:not(:disabled) { transform: translateY(-2px); border-color: #15aabf; color: #0c8599; }
.nav-big.next {
  background: linear-gradient(135deg, #ff922b, #ff6b6b);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 10px 22px rgba(255, 107, 107, 0.30);
}
.nav-big.next:hover:not(:disabled) { color: #fff; box-shadow: 0 14px 28px rgba(255, 107, 107, 0.38); }
.nav-big:disabled { opacity: 0.4; cursor: not-allowed; }

@media (max-width: 820px) {
  .ppt-split, .visual-cards-3, .flash-grid { grid-template-columns: 1fr; }
  .slide-body { padding: 18px; }
}

/* ==================== ANIMATED TEACHING STAGE & POINTER STICK ==================== */
.teach-stage {
  position: relative;
  background: linear-gradient(160deg, #f4fbff 0%, #fffdf5 100%);
  border: 2.5px solid #a5d8ff;
  border-radius: 24px;
  padding: 20px;
  min-height: 290px;
  overflow: hidden;
  box-shadow: inset 0 2px 12px rgba(51, 154, 240, 0.08);
}

/* Teacher's Glowing Pointer Stick (小讲解棍棍!) */
.pointer-stick {
  position: absolute;
  z-index: 20;
  pointer-events: none;
  left: 50%;
  top: 50%;
  transform: translate(-10%, -10%) rotate(-28deg);
  transition: left 0.65s cubic-bezier(.22, 1.15, .36, 1), top 0.65s cubic-bezier(.22, 1.15, .36, 1), opacity 0.3s ease;
  display: flex;
  align-items: center;
  filter: drop-shadow(0 6px 10px rgba(247, 103, 7, 0.35));
}
.pointer-tip {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff9db, #ffd43b 60%, #ff922b);
  display: grid;
  place-items: center;
  font-size: 14px;
  box-shadow: 0 0 0 6px rgba(255, 212, 59, 0.35);
  animation: tipPulse 1.2s ease-in-out infinite;
}
.pointer-rod {
  width: 74px; height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff922b, #e8590c);
  margin-left: -4px;
}
@keyframes tipPulse {
  50% { box-shadow: 0 0 0 11px rgba(255, 212, 59, 0.12); transform: scale(1.1); }
}

/* Smoothly Moving & Color-Changing Cookie / Block Tokens */
.mover-arena {
  position: relative;
  height: 195px;
  width: 100%;
  margin: 6px 0;
}
.mover-token {
  position: absolute;
  width: 38px; height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 16px;
  color: #fff;
  background: linear-gradient(135deg, #ff922b, #f76707);
  box-shadow: 0 6px 14px rgba(247, 103, 7, 0.28);
  transition: left 0.7s cubic-bezier(.22, 1.2, .36, 1), top 0.7s cubic-bezier(.22, 1.2, .36, 1), background 0.45s ease, transform 0.35s ease;
}
.mover-token.green {
  background: linear-gradient(135deg, #20c997, #099268);
  box-shadow: 0 6px 14px rgba(18, 184, 134, 0.32);
}
.mover-token.blue {
  background: linear-gradient(135deg, #339af0, #3b5bdb);
  box-shadow: 0 6px 14px rgba(59, 91, 219, 0.30);
}
.mover-token.gold {
  background: linear-gradient(135deg, #ffd43b, #f59f00);
  color: #5c3400;
  box-shadow: 0 6px 16px rgba(245, 159, 0, 0.4);
}
.mover-token.red-shake {
  background: linear-gradient(135deg, #ff6b6b, #e03131);
  animation: wiggle 0.45s ease-in-out 2;
}
@keyframes wiggle {
  0%,100% { transform: translateX(0) rotate(0); }
  25% { transform: translateX(-6px) rotate(-8deg); }
  75% { transform: translateX(6px) rotate(8deg); }
}

.teach-caption {
  text-align: center;
  font-size: 17px;
  font-weight: 900;
  color: #1e2d42;
  padding: 10px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  border: 2px solid #ffe066;
  margin-top: 8px;
}

/* Factor Bubbles Flying In */
.factor-bubbles {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  min-height: 54px;
  align-items: center;
  margin: 10px 0;
}
.f-bubble {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 18px;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(135deg, #339af0, #5c7cfa);
  box-shadow: 0 6px 14px rgba(51, 154, 240, 0.28);
  animation: popBubble .35s cubic-bezier(.2, 1.4, .4, 1);
}
.f-bubble.gold { background: linear-gradient(135deg, #fcc419, #f76707); }
@keyframes popBubble {
  from { transform: scale(0.3); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* 4-Step Prime Factor Check Cards (Clear remainder & zero-overlap pointer!) */
.scanner-gates {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0 34px;
}
.gate-box {
  background: #fff;
  border: 2px solid #dcebfa;
  border-radius: 18px;
  padding: 14px 10px;
  text-align: center;
  transition: all .35s ease;
}
.gate-box.active { border-color: #fab005; background: #fff9db; transform: translateY(-3px); box-shadow: 0 8px 18px rgba(250,176,5,0.2); }
.gate-box.not-div { border-color: #94a3b8; background: #f8fafc; }
.gate-box.found-factor { border-color: #ff6b6b; background: #fff5f5; transform: scale(1.03); box-shadow: 0 10px 22px rgba(255,107,107,0.22); }
.gate-box .g-head { display: block; font-size: 13px; font-weight: 800; color: #64748b; text-transform: uppercase; letter-spacing: 0.05em; }
.gate-box .g-eq { display: block; font-size: 17px; font-weight: 900; color: #1e2d42; margin: 6px 0; min-height: 24px; }
.gate-box .g-tag {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 900;
  padding: 4px 9px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
}
.gate-box.not-div .g-tag { background: #e2e8f0; color: #334155; }
.gate-box.found-factor .g-tag { background: #ffe3e3; color: #c92a2a; }

/* Upward-pointing stick variant so it NEVER covers text inside cards */
.pointer-stick.point-up {
  transform: translate(-12px, 0) rotate(68deg);
}

