/* Microwave Oven Leakage & Wi-Fi Lesson CSS */
#microwave-lesson {
  margin-top: 1.5rem;
}

.lesson-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.75rem;
}

.tab-btn {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 0.5rem 0.9rem;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  background: #e8ecf2;
}

.tab-btn.active {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}

.lesson-panel {
  display: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px rgba(21, 34, 57, 0.04);
}

.lesson-panel.active {
  display: block;
}

.lesson-panel h2 {
  font-size: 1.4rem;
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: var(--ink);
}

.panel-subtitle {
  color: #556987;
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

/* Chapter 1: Physics Cards */
.mw-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.mw-card {
  border: 2px solid var(--line);
  border-radius: 8px;
  padding: 1.25rem;
  background: var(--paper);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.mw-card:hover {
  border-color: #a0aec0;
}

.mw-card.active {
  border-color: var(--blue);
  background: #f0f5ff;
}

.mw-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.4rem;
}

.mw-card h3 {
  margin: 0.2rem 0 0.4rem 0;
  font-size: 1.05rem;
  color: var(--ink);
}

.mw-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: #e2e8f0;
  color: #4a5568;
}

.mw-detail-box {
  background: #0b1320;
  border-radius: 8px;
  padding: 1.5rem;
  color: #fff;
  margin-bottom: 1.5rem;
}

.mw-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.mw-stat-card {
  background: #152239;
  border: 1px solid #23395d;
  padding: 0.85rem;
  border-radius: 6px;
}

.readout-label {
  font-size: 0.75rem;
  color: #8da4c4;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.readout-value {
  font-size: 1.35rem;
  font-weight: 700;
  color: #a8f074;
  margin-top: 0.2rem;
}

/* Chapter 2: Leakage Simulator */
.calc-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
  .calc-container {
    grid-template-columns: 1fr;
  }
}

.calc-controls {
  background: var(--paper);
  padding: 1.25rem;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.calc-visualizer {
  background: #0f172a;
  border-radius: 8px;
  padding: 1.25rem;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.mw-kitchen-stage {
  height: 150px;
  background: #1e293b;
  border-radius: 6px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  overflow: hidden;
}

.custom-select {
  width: 100%;
  padding: 0.6rem;
  border-radius: 6px;
  border: 1px solid var(--line);
  font-family: inherit;
  font-size: 0.9rem;
  background: #fff;
  color: var(--ink);
}

/* Chapter 3: Wi-Fi Collision */
.collision-box {
  background: #0b1320;
  border-radius: 8px;
  padding: 1.5rem;
  color: #fff;
  margin-bottom: 1.5rem;
}

/* Chapter 4: Kitchen Rules */
.kitchen-rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.rule-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.25rem;
  background: var(--paper);
}

.rule-card h3 {
  margin-top: 0;
  font-size: 1rem;
  color: var(--ink);
}

/* Chapter 5: Quiz */
.quiz-item {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.quiz-question {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.75rem;
  color: var(--ink);
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.quiz-opt-btn {
  background: #fff;
  border: 1px solid var(--line);
  padding: 0.75rem 1rem;
  border-radius: 6px;
  text-align: left;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.2s ease;
}

.quiz-opt-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.quiz-opt-btn.correct {
  background: #dcfce7;
  border-color: #16a34a;
  color: #15803d;
  font-weight: 600;
}

.quiz-opt-btn.incorrect {
  background: #fee2e2;
  border-color: #dc2626;
  color: #991b1b;
}

.quiz-feedback {
  margin-top: 0.75rem;
  padding: 0.75rem;
  border-radius: 6px;
  font-size: 0.88rem;
  line-height: 1.4;
  display: none;
}

.quiz-feedback.show {
  display: block;
}

.feedback-correct {
  background: #dcfce7;
  color: #166534;
}

.feedback-incorrect {
  background: #fee2e2;
  color: #991b1b;
}

/* Nav Controls */
.lesson-nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.callout-box {
  background: #f8fafc;
  border-left: 4px solid var(--blue);
  padding: 1rem 1.25rem;
  border-radius: 0 6px 6px 0;
  margin: 1.25rem 0;
  font-size: 0.92rem;
}
