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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #f5f7fa;
  color: #1a1a2e;
  line-height: 1.5;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
}

.hero {
  text-align: center;
  margin-bottom: 1.5rem;
}
.hero-logo {
  display: inline-block;
  background: #fff;
  border-radius: 12px;
  padding: .6rem 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.hero-logo img {
  display: block;
  height: 44px;
  width: auto;
}
.hero h1 {
  font-size: 1.6rem;
  font-weight: 700;
  color: #16213e;
}
.hero .subtitle {
  margin-top: .5rem;
  font-size: 1.1rem;
  color: #555;
}

/* Tabs */
.tab-bar {
  display: flex;
  gap: 0;
  margin-bottom: 1.25rem;
  border-bottom: 2px solid #e0e4ea;
}
.tab {
  flex: 1;
  padding: .65rem .5rem;
  border: none;
  background: none;
  font-size: .9rem;
  font-weight: 600;
  color: #888;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all .15s;
}
.tab:hover:not(:disabled) { color: #16213e; }
.tab.active {
  color: #16213e;
  border-bottom-color: #16213e;
}
.tab:disabled {
  opacity: .4;
  cursor: default;
}

.tab-content { display: none; }
.tab-content.active { display: block; }

/* Cards */
.card {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.card h2 {
  font-size: 1.15rem;
  margin-bottom: 1rem;
  color: #16213e;
}

.field {
  margin-bottom: 1rem;
}
.field > label {
  display: block;
  font-weight: 600;
  font-size: .85rem;
  margin-bottom: .35rem;
  color: #333;
}

select {
  width: 100%;
  padding: .5rem .75rem;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  font-size: .95rem;
  background: #fff;
}

/* Button groups */
.btn-group {
  display: flex;
  gap: .5rem;
}
.btn-group button {
  flex: 1;
  padding: .5rem;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-size: .9rem;
  transition: all .15s;
}
.btn-group button.active {
  background: #16213e;
  color: #fff;
  border-color: #16213e;
}

/* Slider */
input[type="range"] {
  width: 100%;
  accent-color: #16213e;
}

/* Checkbox group */
.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem .75rem;
}
.checkbox-group label {
  font-size: .9rem;
  font-weight: 400;
  cursor: pointer;
}

/* Toggle group */
.toggle-group {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.toggle {
  display: flex;
  align-items: center;
  gap: .35rem;
  padding: .35rem .7rem;
  border: 1px solid #d0d5dd;
  border-radius: 20px;
  font-size: .85rem;
  cursor: pointer;
  transition: all .15s;
}
.toggle:has(input:checked) {
  background: #e8edf5;
  border-color: #16213e;
}
.toggle input { display: none; }

/* Question mix sliders */
.slider-group { display: flex; flex-direction: column; gap: .6rem; }
.mix-row {
  display: grid;
  grid-template-columns: 140px 1fr 45px;
  align-items: center;
  gap: .5rem;
  font-size: .9rem;
}
.mix-val {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Generate */
.generate-section { text-align: center; }
.generate-btn {
  padding: .75rem 2.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: #16213e;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background .15s;
}
.generate-btn:hover { background: #0f3460; }
.generate-btn:disabled { opacity: .5; cursor: default; }

.status-msg {
  margin-top: .75rem;
  font-size: .9rem;
  color: #16213e;
}
.hidden { display: none; }

/* Loading area */
.loading-area {
  text-align: center;
  padding: 3rem 1rem;
}
.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #e0e4ea;
  border-top-color: #16213e;
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin: 0 auto 1rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

.progress-log {
  text-align: left;
  max-width: 500px;
  margin: 0 auto;
  font-size: .85rem;
  color: #555;
}
.progress-log p {
  margin: .25rem 0;
}

.disabled-msg {
  text-align: center;
  padding: 3rem;
  color: #888;
  font-size: .95rem;
}

/* Lesson Plan result */
#lp-result {
  font-size: .9rem;
}
.lp-meta {
  background: #f0f3f8;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.5rem;
}
.lp-meta span {
  font-size: .85rem;
  color: #555;
}
.lp-meta strong {
  color: #16213e;
}

.lp-section {
  background: #fff;
  border-radius: 10px;
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.lp-section h3 {
  font-size: 1rem;
  color: #16213e;
  margin-bottom: .5rem;
}
.lp-section ul {
  margin-left: 1.25rem;
  margin-bottom: .5rem;
}
.lp-section li {
  margin-bottom: .25rem;
}

/* Timeline block */
.timeline-block {
  border-left: 3px solid #16213e;
  padding: .75rem 1rem;
  margin-bottom: .75rem;
  background: #fafbfd;
  border-radius: 0 8px 8px 0;
}
.timeline-block .tb-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: .35rem;
}
.timeline-block .tb-time {
  font-weight: 700;
  font-size: .85rem;
  color: #16213e;
}
.timeline-block .tb-type {
  font-size: .75rem;
  background: #e8edf5;
  color: #16213e;
  padding: .15rem .5rem;
  border-radius: 10px;
  font-weight: 600;
}
.timeline-block .tb-title {
  font-weight: 600;
  margin-bottom: .25rem;
}
.timeline-block .tb-desc {
  color: #555;
  font-size: .85rem;
}
.timeline-block .tb-notes {
  margin-top: .35rem;
  font-size: .8rem;
  color: #777;
  font-style: italic;
}
.timeline-block .tb-pages {
  margin-top: .25rem;
  font-size: .8rem;
  color: #0f3460;
}

.lp-diff {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.lp-diff > div {
  background: #f7f8fb;
  padding: .75rem 1rem;
  border-radius: 8px;
  font-size: .85rem;
}
.lp-diff > div strong {
  display: block;
  margin-bottom: .25rem;
  color: #16213e;
}

/* Slides */
.slide-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
}
.slide-nav-btn {
  width: 40px;
  height: 40px;
  border: 1px solid #d0d5dd;
  border-radius: 50%;
  background: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
}
.slide-nav-btn:hover { background: #e8edf5; }
#slide-counter {
  font-weight: 600;
  font-size: .9rem;
  min-width: 60px;
  text-align: center;
}

.slide-card {
  background: #fff;
  border-radius: 12px;
  padding: 2rem;
  /* Fixed 16:9 aspect ratio */
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
  margin-bottom: 1rem;
}
.slide-card h2 {
  font-size: 1.3rem;
  color: #16213e;
  margin-bottom: .75rem;
}
.slide-card .slide-subtitle {
  font-size: 1rem;
  color: #555;
  margin-bottom: 1rem;
}
.slide-card ul {
  margin-left: 1.25rem;
}
.slide-card li {
  margin-bottom: .35rem;
  line-height: 1.5;
}
.slide-card .slide-prompt {
  font-size: 1.1rem;
  font-style: italic;
  color: #333;
  padding: 1rem;
  background: #f7f8fb;
  border-radius: 8px;
  text-align: center;
}
.slide-card .slide-fact {
  font-size: 1.05rem;
  padding: 1rem;
  background: #fef9e7;
  border-radius: 8px;
  border-left: 3px solid #f0c040;
}
.slide-card .slide-image-ref {
  background: #f0f3f8;
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
  color: #555;
  font-size: .85rem;
}
.slide-card .quiz-options {
  list-style: none;
  margin-left: 0;
}
.slide-card .quiz-options li {
  padding: .4rem .75rem;
  margin-bottom: .3rem;
  background: #f7f8fb;
  border-radius: 6px;
}
.slide-card .vocab-list {
  list-style: none;
  margin-left: 0;
}
.slide-card .vocab-list dt {
  font-weight: 700;
  color: #16213e;
  margin-top: .5rem;
}
.slide-card .vocab-list dd {
  margin-left: 1rem;
  color: #555;
  font-size: .9rem;
}

.slide-notes {
  background: #f7f8fb;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  font-size: .85rem;
  color: #555;
}
.slide-notes strong {
  display: block;
  color: #16213e;
  margin-bottom: .25rem;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .5px;
}

/* Test */
.test-toggle-bar {
  display: flex;
  gap: .5rem;
  margin-bottom: 1.25rem;
}
.test-toggle {
  flex: 1;
  padding: .5rem;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-size: .9rem;
  font-weight: 600;
  transition: all .15s;
}
.test-toggle.active {
  background: #16213e;
  color: #fff;
  border-color: #16213e;
}

.test-header {
  background: #f0f3f8;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  font-size: .85rem;
}
.test-header h3 {
  margin-bottom: .35rem;
  color: #16213e;
}
.test-instructions {
  color: #555;
  font-style: italic;
}

.test-section {
  margin-bottom: 1.5rem;
}
.test-section h4 {
  font-size: .95rem;
  color: #16213e;
  margin-bottom: .75rem;
  padding-bottom: .35rem;
  border-bottom: 1px solid #e0e4ea;
}

.test-question {
  background: #fff;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: .75rem;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.test-question .q-number {
  font-weight: 700;
  color: #16213e;
  margin-right: .35rem;
}
.test-question .q-text {
  margin-bottom: .5rem;
}
.test-question .q-options {
  list-style: none;
  margin: .5rem 0;
}
.test-question .q-options li {
  padding: .25rem 0;
}
.test-question .q-answer {
  margin-top: .5rem;
  padding: .5rem .75rem;
  background: #e8f5e9;
  border-radius: 6px;
  font-size: .85rem;
}
.test-question .q-explanation {
  font-size: .8rem;
  color: #555;
  margin-top: .25rem;
  font-style: italic;
}
.test-question .q-rubric {
  margin-top: .5rem;
  padding: .5rem .75rem;
  background: #fff8e1;
  border-radius: 6px;
  font-size: .85rem;
}
.test-question .q-rubric ul {
  margin: .25rem 0 0 1rem;
}
.test-question .q-bloom {
  display: inline-block;
  font-size: .7rem;
  background: #e8edf5;
  color: #16213e;
  padding: .1rem .4rem;
  border-radius: 8px;
  margin-top: .35rem;
  font-weight: 600;
  text-transform: uppercase;
}

.test-summary {
  background: #f0f3f8;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  font-size: .85rem;
}
.test-summary h4 {
  border: none;
  padding: 0;
  margin-bottom: .5rem;
}
.test-summary table {
  width: 100%;
  border-collapse: collapse;
}
.test-summary td, .test-summary th {
  padding: .3rem .5rem;
  text-align: left;
  font-size: .85rem;
}
.test-summary th {
  font-weight: 600;
  color: #16213e;
  border-bottom: 1px solid #d0d5dd;
}

/* ══════════════════════════════════════
   SLIDE TYPE STYLES
   ══════════════════════════════════════ */

/* Slide card base – position for badge, number, progress */
.slide-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Progress bar – bottom of slide */
.slide-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 4px;
  background: #16213e;
  border-radius: 0 2px 0 0;
  transition: width .3s ease;
}

/* Type badge – top-right pill */
.slide-type-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  background: #e8edf5;
  color: #16213e;
  padding: .2rem .6rem;
  border-radius: 10px;
}

/* Slide number – bottom-left */
.slide-number {
  position: absolute;
  bottom: .75rem;
  left: 1rem;
  font-size: .75rem;
  font-weight: 600;
  color: #aaa;
}

/* ── Title slide ── */
.slide-type-title {
  background: linear-gradient(135deg, #16213e 0%, #0f3460 100%);
  align-items: center;
  justify-content: center;
  text-align: center;
}
.slide-type-title h2,
.slide-type-title .slide-title-hero {
  color: #fff;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: .5rem;
}
.slide-type-title .slide-subtitle {
  color: rgba(255,255,255,.8);
  font-size: 1.1rem;
}
.slide-type-title .slide-type-badge {
  background: rgba(255,255,255,.2);
  color: #fff;
}
.slide-type-title .slide-number {
  color: rgba(255,255,255,.5);
}

/* ── Objectives slide ── */
.slide-objectives-heading {
  text-decoration: underline;
  text-decoration-color: #16213e;
  text-underline-offset: 6px;
  text-decoration-thickness: 2px;
  margin-bottom: 1rem;
}
.objectives-list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: none;
}
.objectives-list li {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  margin-bottom: .75rem;
  line-height: 1.5;
}
.obj-badge {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #16213e;
  color: #fff;
  font-size: .8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Content slide (no image) – full width ── */
.content-bullets {
  list-style: none;
  margin: 0;
  padding: 0;
}
.content-bullets li {
  padding: .35rem 0;
  line-height: 1.5;
}
.content-bullets li::before {
  content: "\25B8";
  color: #16213e;
  font-weight: 700;
  margin-right: .6rem;
}

/* ── Content slide (with image) – 60/40 split ── */
.content-split {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 1.5rem;
  align-items: start;
}
.content-image img {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  border-radius: 8px;
}
.content-image figcaption {
  margin-top: .4rem;
  font-size: .8rem;
  color: #555;
  font-style: italic;
  text-align: center;
}

/* ── Summary slide ── */
.slide-type-summary {
  background: linear-gradient(135deg, #f0f3f8 0%, #e8edf5 100%);
}
.summary-bullets {
  list-style: none;
  margin: 0;
  padding: 0;
}
.summary-bullets li {
  padding: .4rem 0;
  line-height: 1.5;
}
.summary-bullets li::before {
  content: "\2713";
  color: #27ae60;
  font-weight: 700;
  margin-right: .6rem;
}

/* ── Discussion slide ── */
.slide-type-discussion {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.discussion-card {
  background: #fff;
  border-left: 4px solid #16213e;
  border-radius: 8px;
  padding: 1.5rem 2rem;
  font-size: 1.1rem;
  font-style: italic;
  color: #333;
  max-width: 500px;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

/* ── Did You Know slide ── */
.slide-type-did_you_know {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.slide-type-did_you_know h2 {
  color: #b8860b;
}
.dyk-card {
  background: #fff;
  border-radius: 8px;
  padding: 1.5rem 2rem;
  font-size: 1.05rem;
  color: #333;
  max-width: 500px;
  border-left: 4px solid #f0c040;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

/* ── Quiz slide ── */
.quiz-question {
  font-weight: 600;
  margin-bottom: 1rem;
}
.quiz-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
  margin-bottom: 1rem;
}
.quiz-option {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  padding: .75rem 1rem;
  background: #f7f8fb;
  border-radius: 8px;
  font-size: .9rem;
  line-height: 1.4;
}
.quiz-letter {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #16213e;
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.quiz-answer {
  font-size: .85rem;
  color: #27ae60;
}

/* ── Vocabulary slide ── */
.vocab-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
}
.vocab-card {
  background: #f7f8fb;
  border-radius: 8px;
  padding: .75rem 1rem;
}
.vocab-card dt {
  font-weight: 700;
  color: #16213e;
  margin-bottom: .25rem;
}
.vocab-card dd {
  margin: 0;
  font-size: .85rem;
  color: #555;
}

/* Speaker notes – page refs line */
.notes-pages {
  margin-top: .5rem;
  font-size: .8rem;
  color: #0f3460;
  font-weight: 600;
}

/* Fullscreen button */
.fullscreen-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  margin: .75rem auto 0;
  padding: .5rem 1.25rem;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  background: #fff;
  font-size: .85rem;
  font-weight: 600;
  color: #16213e;
  cursor: pointer;
  transition: all .15s;
}
.fullscreen-btn:hover { background: #e8edf5; }
.fullscreen-btn svg { width: 16px; height: 16px; }

/* ── Fullscreen mode ── */
.slides-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.slides-fullscreen .slide-nav {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 210;
}
.slides-fullscreen .slide-nav-btn {
  background: rgba(255,255,255,.15);
  border-color: rgba(255,255,255,.3);
  color: #fff;
}
.slides-fullscreen .slide-nav-btn:hover {
  background: rgba(255,255,255,.25);
}
.slides-fullscreen #slide-counter {
  color: rgba(255,255,255,.7);
}
.slides-fullscreen .slide-card {
  width: min(92vw, 160vh * 16 / 9);
  height: min(51.75vw, 80vh);
  aspect-ratio: auto;
  border-radius: 8px;
  padding: 3vw;
  font-size: min(1.8vw, 3.2vh);
}
.slides-fullscreen .slide-card h2 {
  font-size: min(3vw, 5.3vh);
  margin-bottom: min(1.5vw, 2.6vh);
}
.slides-fullscreen .slide-type-title h2,
.slides-fullscreen .slide-type-title .slide-title-hero {
  font-size: min(5vw, 8.9vh);
}
.slides-fullscreen .slide-type-title .slide-subtitle {
  font-size: min(2vw, 3.5vh);
}
.slides-fullscreen .obj-badge {
  width: min(3.5vw, 6.2vh);
  height: min(3.5vw, 6.2vh);
  font-size: min(1.5vw, 2.6vh);
}
.slides-fullscreen .quiz-letter {
  width: min(3.2vw, 5.7vh);
  height: min(3.2vw, 5.7vh);
  font-size: min(1.3vw, 2.3vh);
}
.slides-fullscreen .quiz-grid {
  gap: min(1.5vw, 2.6vh);
}
.slides-fullscreen .quiz-option {
  padding: min(1.2vw, 2.1vh) min(1.5vw, 2.6vh);
}
.slides-fullscreen .content-image img {
  max-height: 55vh;
}
.slides-fullscreen .discussion-card,
.slides-fullscreen .dyk-card {
  padding: min(2.5vw, 4.4vh) min(3vw, 5.3vh);
  font-size: min(2.2vw, 3.9vh);
  max-width: 70%;
}
.slides-fullscreen .vocab-grid {
  gap: min(1.5vw, 2.6vh);
}
.slides-fullscreen .vocab-card {
  padding: min(1.2vw, 2.1vh) min(1.5vw, 2.6vh);
}
.slides-fullscreen .slide-type-badge {
  font-size: min(1vw, 1.8vh);
  padding: min(.4vw, .7vh) min(.8vw, 1.4vh);
}
.slides-fullscreen .slide-number {
  font-size: min(1.2vw, 2.1vh);
}
.slides-fullscreen .slide-progress {
  height: min(.5vw, .9vh);
}
.slides-fullscreen .slide-notes {
  display: none;
}
.slides-fullscreen .fullscreen-btn {
  display: none;
}
/* Exit fullscreen button */
.exit-fullscreen-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 210;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.exit-fullscreen-btn:hover { background: rgba(255,255,255,.3); }
.slides-fullscreen .exit-fullscreen-btn { display: flex; }
