/* SchoolButCool-style curriculum lecture — Alexandria, dark stage, no scroll */

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

.cv-lecture-body {
  font-family: 'Alexandria', sans-serif;
  background: #0a0e27;
  color: #ffffff;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

.slide:not(.animating) .lect-anim,
.slide:not(.animating) .lect-grid,
.slide:not(.animating) .lect-star {
  animation: none !important;
  opacity: 0;
}

.slide.animating .lect-anim {
  animation: lectFadeUp 0.85s cubic-bezier(0.34, 1.56, 0.64, 1) var(--d, 0.5s) forwards;
}

.slide.animating .lect-grid {
  animation: gridFadeIn 1.2s ease forwards;
}

.slide.animating .lect-star {
  animation: starIn 0.8s ease forwards;
}

@keyframes lectFadeUp {
  from { opacity: 0; transform: translateY(28px) scale(0.98); filter: blur(6px); }
  to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

@keyframes gridFadeIn { to { opacity: 1; } }
@keyframes starIn { to { opacity: 0.65; } }

.progress-bar {
  position: fixed; top: 0; left: 0; right: 0; height: 5px;
  background: rgba(255,255,255,0.06); z-index: 10000;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #20c997, #ffd93d, #ff6b35);
  width: 0%; transition: width 0.45s;
}

.slide-counter {
  position: fixed; top: 1.25rem; left: 1.25rem;
  background: rgba(20,25,45,0.95); backdrop-filter: blur(16px);
  padding: 0.75rem 1.35rem; border-radius: 50px; font-weight: 800;
  z-index: 10000; border: 2px solid rgba(32,201,151,0.35);
  font-family: 'Alexandria', sans-serif;
}
.slide-counter .current { color: #20c997; font-size: 1.35rem; }
.slide-counter .sep,
.slide-counter .total { color: rgba(255,255,255,0.72); font-weight: 700; }

.lecture-lesson-title {
  position: fixed; top: 1.25rem; right: 50%; transform: translateX(50%);
  max-width: min(48vw, 480px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: rgba(20,25,45,0.88); padding: 0.55rem 1.1rem; border-radius: 50px;
  font-size: 0.78rem; font-weight: 800; z-index: 10000;
  border: 1px solid rgba(32,201,151,0.22); color: #fff;
}

.exit-btn {
  position: fixed; top: 1.25rem; right: 1.25rem;
  background: rgba(255,107,53,0.14); border: 2px solid rgba(255,107,53,0.45);
  padding: 0.65rem 1.25rem; border-radius: 50px; color: #ff8a65;
  font-weight: 700; text-decoration: none; z-index: 10000;
  font-family: 'Alexandria', sans-serif; font-size: 0.82rem;
}

.slides-wrapper {
  width: 100vw; height: 100vh; position: relative; overflow: hidden;
}

.slide {
  position: absolute; inset: 0;
  opacity: 0; visibility: hidden; pointer-events: none;
}
.slide.active { opacity: 1; visibility: visible; pointer-events: all; }

.nav-controls {
  position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%);
  display: flex; gap: 0.75rem; z-index: 10000;
  background: rgba(20,25,45,0.96); padding: 1rem 1.5rem; border-radius: 50px;
  border: 2px solid rgba(32,201,151,0.32);
}
.nav-btn {
  background: linear-gradient(135deg, #20c997, #138a6f);
  color: #fff; border: none; padding: 0.8rem 1.75rem; border-radius: 50px;
  cursor: pointer; font-weight: 800; font-family: 'Alexandria', sans-serif;
  font-size: 0.88rem; transition: transform 0.2s;
}
.nav-btn:hover:not(:disabled) { transform: translateY(-2px); }
.nav-btn:disabled {
  opacity: 1;
  cursor: not-allowed;
  background: rgba(32,201,151,0.22);
  color: rgba(255,255,255,0.45);
  box-shadow: none;
}
.nav-btn.complete {
  background: linear-gradient(135deg, #ffd93d, #ffb800); color: #0a0e27;
}

.toast {
  position: fixed; top: 5rem; left: -420px;
  background: linear-gradient(135deg, #20c997, #138a6f);
  color: #fff; padding: 1rem 1.5rem; border-radius: 14px;
  font-weight: 700; z-index: 10001; transition: left 0.45s;
  display: flex; gap: 0.6rem; font-family: 'Alexandria', sans-serif;
}
.toast.show { left: 1.25rem; }

/* ── Slide shell ── */
.lect-slide {
  width: 100%; height: 100%; position: relative;
  padding: 68px 32px 118px; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: #0d2847;
}

.lect-grid {
  position: absolute; inset: 0; opacity: 0; pointer-events: none;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 49px, rgba(100,160,220,0.07) 49px, rgba(100,160,220,0.07) 50px),
    repeating-linear-gradient(90deg, transparent, transparent 49px, rgba(100,160,220,0.07) 49px, rgba(100,160,220,0.07) 50px);
}

.lect-star {
  position: absolute; width: 3px; height: 3px; border-radius: 50%;
  background: #fff; opacity: 0; pointer-events: none;
}

.lect-title {
  font-size: clamp(1.35rem, 2.8vw, 2rem);
  font-weight: 900; color: #ffc107; text-align: center;
  letter-spacing: 0.5px; margin-bottom: 14px; z-index: 2;
  text-shadow: 0 0 24px rgba(255,193,7,0.25);
}

.lect-prose {
  font-size: clamp(0.88rem, 1.6vw, 1.05rem);
  line-height: 1.85; color: #ffffff; font-weight: 600;
}

.lect-hl {
  color: #20c997; font-weight: 900;
  text-shadow: 0 0 12px rgba(32,201,151,0.35);
}

.lect-points {
  list-style: none; margin-top: 14px; display: flex; flex-direction: column; gap: 10px;
}
.lect-points li {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 0.92rem; font-weight: 700; color: #f8fafc; line-height: 1.65;
}
.lect-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #20c997;
  margin-top: 0.45em; flex-shrink: 0;
  box-shadow: 0 0 10px rgba(32,201,151,0.8);
}

.lect-fig-img {
  width: 100%; max-height: min(34vh, 300px);
  object-fit: contain; display: block;
  filter: drop-shadow(0 12px 32px rgba(32,201,151,0.28));
  background: transparent !important;
}

.slide.animating .lect-fig-img {
  animation: lectFigFloat 4.5s ease-in-out 1.2s infinite;
}

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

/* Hero */
.lect-slide--hero { background: #0a0e1a; justify-content: center; }

.lect-hero-wrap {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 24px;
  align-items: center; width: min(1180px, 100%); z-index: 2;
  max-height: calc(100vh - 200px);
}

.lect-hero-visual .lect-fig-img {
  max-height: min(32vh, 280px);
}

.lect-kicker {
  font-size: 0.82rem; font-weight: 800; color: #20c997;
  margin-bottom: 10px;
}

.lect-hero-title {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 900; line-height: 1.15; color: #ffffff;
  text-shadow: 0 0 40px rgba(32,201,151,0.2);
}

.lect-hero-sub {
  margin-top: 12px; font-size: 0.95rem; font-weight: 600;
  color: rgba(255,255,255,0.88); line-height: 1.7;
}

.lect-hero-stats {
  display: flex; gap: 12px; margin-top: 18px; flex-wrap: wrap;
}
.lect-hero-stats div {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: 14px;
  border: 2px solid rgba(32,201,151,0.35);
  background: rgba(32,201,151,0.08);
  color: #fff; font-weight: 800; font-size: 0.78rem;
}
.lect-hero-stats strong { font-size: 1rem; }

.lect-hero-visual {
  position: relative; display: flex; align-items: center; justify-content: center;
}
.lect-visual-glow {
  position: absolute; inset: 10%; border-radius: 50%;
  background: radial-gradient(circle, rgba(32,201,151,0.25), transparent 70%);
  pointer-events: none;
}

/* Split layout */
.lect-split {
  display: grid; grid-template-columns: 1fr 1fr; gap: 22px;
  width: min(1180px, 100%); align-items: center; z-index: 2;
  max-height: calc(100vh - 190px);
}

.lect-split--duo .lect-visual { order: 1; }
.lect-split--duo .lect-copy { order: 2; }

.lect-visual { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.lect-visual--sm .lect-fig-img { max-height: 140px; }

.lect-cap {
  font-size: 0.78rem; font-weight: 800; color: #20c997; text-align: center;
}

.lect-compare {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px;
}
.lect-compare-card {
  padding: 12px; border-radius: 14px; text-align: center;
  border: 2px solid rgba(255,255,255,0.22);
  background: transparent;
  backdrop-filter: none;
}
.lect-compare-card span { font-size: 1.4rem; display: block; margin-bottom: 4px; }
.lect-compare-card strong { display: block; color: #fff; font-size: 0.82rem; margin-bottom: 4px; }
.lect-compare-card p { font-size: 0.72rem; color: rgba(255,255,255,0.82); line-height: 1.5; font-weight: 600; }
.lect-compare-card--ok { border-color: rgba(32,201,151,0.45); }
.lect-compare-card--build { border-color: rgba(255,193,7,0.45); }

/* Materials grid */
.lect-mat-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
  width: min(1100px, 100%); z-index: 2;
}
.lect-mat-card {
  text-align: center; padding: 12px;
  border: 2px solid rgba(32,201,151,0.28);
  border-radius: 16px; background: transparent;
}
.lect-mat-card .lect-fig-img { max-height: 160px; margin-bottom: 8px; }
.lect-mat-card strong { display: block; color: #ffc107; font-size: 0.88rem; margin-bottom: 4px; }
.lect-mat-card p { color: #fff; font-size: 0.74rem; font-weight: 600; line-height: 1.55; }

.lect-tissue-row {
  display: flex; gap: 16px; margin-top: 16px; z-index: 2;
  width: min(900px, 100%);
}
.lect-tissue {
  flex: 1; padding: 14px; border-radius: 14px;
  border: 2px solid rgba(255,255,255,0.18); background: transparent;
  text-align: center;
}
.lect-tissue span { font-size: 1.5rem; display: block; margin-bottom: 4px; }
.lect-tissue strong { color: #20c997; font-size: 0.88rem; display: block; }
.lect-tissue p { color: #fff; font-size: 0.74rem; font-weight: 600; margin-top: 4px; }

/* Apply grid */
.lect-apply-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
  width: min(1100px, 100%); z-index: 2;
}
.lect-apply-item {
  text-align: center; padding: 10px;
  border: 2px solid rgba(32,201,151,0.25); border-radius: 14px;
  background: transparent;
}
.lect-apply-item .lect-fig-img { max-height: 130px; margin-bottom: 8px; }
.lect-apply-item p { color: #fff; font-size: 0.78rem; font-weight: 700; line-height: 1.55; }

/* Inline SVG on dark stage */
.lect-svg-inline { width: 100%; max-height: min(34vh, 300px); display: flex; align-items: center; justify-content: center; }
.lect-svg-inline--hero { max-height: min(32vh, 280px); }
.lect-svg-inline--sm { max-height: min(22vh, 200px); }
.lect-svg-inline svg { width: 100%; height: auto; max-height: inherit; overflow: visible; }
.lect-fig-img--photo { border-radius: 14px; border: 2px solid rgba(32,201,151,0.3); }

.lect-split--text-only { grid-template-columns: 1fr !important; max-width: 820px; }

/* Quiz slides */
.lect-quiz-badge {
  background: rgba(255,193,7,0.12); border: 2px solid rgba(255,193,7,0.45);
  color: #ffc107; padding: 6px 16px; border-radius: 50px;
  font-weight: 800; font-size: 0.78rem; z-index: 2; margin-bottom: 8px;
}
.lect-quiz-layout {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
  width: min(1100px, 100%); align-items: center; z-index: 2;
  max-height: calc(100vh - 200px);
}
.lect-quiz-panel { display: flex; flex-direction: column; gap: 12px; }
.lect-quiz-q { color: #fff; font-weight: 800; font-size: 1rem; line-height: 1.65; }
.lect-quiz-opts { display: flex; flex-direction: column; gap: 8px; }
.lect-quiz-opts--compact { gap: 6px; }
.lect-quiz-opt {
  display: flex; align-items: center; gap: 10px; text-align: right;
  background: rgba(255,255,255,0.04); border: 2px solid rgba(255,255,255,0.2);
  color: #fff; padding: 10px 12px; border-radius: 12px; cursor: pointer;
  font-family: 'Alexandria', sans-serif; font-weight: 700; font-size: 0.82rem;
  transition: transform 0.15s, border-color 0.15s;
}
.lect-quiz-opt:hover { transform: translateY(-1px); border-color: rgba(32,201,151,0.5); }
.lect-quiz-opt.selected { border-color: #20c997; background: rgba(32,201,151,0.12); }
.lect-quiz-opt.correct { border-color: #20c997; background: rgba(32,201,151,0.2); }
.lect-quiz-opt.wrong { border-color: #ff6b35; background: rgba(255,107,53,0.15); }
.lect-quiz-letter {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  background: rgba(32,201,151,0.25); color: #20c997;
  display: flex; align-items: center; justify-content: center; font-weight: 900;
}
.lect-quiz-feedback {
  padding: 10px 12px; border-radius: 12px; font-weight: 800; font-size: 0.82rem;
}
.lect-quiz-feedback--ok { background: rgba(32,201,151,0.18); color: #6ee7b7; border: 1px solid rgba(32,201,151,0.4); }
.lect-quiz-feedback--bad { background: rgba(255,107,53,0.15); color: #ffb199; border: 1px solid rgba(255,107,53,0.35); }

.lect-multi-quiz {
  width: min(900px, 100%); display: flex; flex-direction: column; gap: 10px;
  max-height: calc(100vh - 200px); z-index: 2;
}
.lect-mq-card {
  padding: 10px 12px; border-radius: 14px;
  border: 2px solid rgba(255,255,255,0.15); background: transparent;
}
.lect-mq-num { color: #ffc107; font-weight: 900; font-size: 0.78rem; margin-bottom: 4px; }
.lect-mq-q { color: #fff; font-weight: 700; font-size: 0.84rem; margin-bottom: 8px; line-height: 1.55; }
.lect-mq-submit {
  margin-top: 6px; align-self: center;
  background: linear-gradient(135deg, #ffd93d, #ffb800); color: #0a0e27;
  border: none; padding: 10px 22px; border-radius: 50px; font-weight: 900;
  font-family: 'Alexandria', sans-serif; cursor: pointer;
}
.lect-mq-submit:disabled { opacity: 0.35; cursor: not-allowed; }

.toast.toast--error { background: linear-gradient(135deg, #ff6b35, #c0392b); }

.lect-split--water { grid-template-columns: 0.95fr 1.05fr; }
.lect-fig-img--hero { max-height: min(28vh, 240px) !important; }
.lect-fig-img--sub { max-height: min(18vh, 150px) !important; margin-top: 6px; }

@media (max-width: 900px) {
  .lect-hero-wrap, .lect-split, .lect-mat-grid, .lect-apply-grid { grid-template-columns: 1fr; }
  .lecture-lesson-title { display: none; }
  .lect-slide { padding: 64px 16px 110px; }
  .lect-fig-img { max-height: 24vh !important; }
  .lect-hero-wrap { grid-template-columns: 1fr 1fr; max-height: calc(100vh - 190px); }
}
