:root {
  /* Neutral palette: blends with WordPress (or any) host theme.
     --bg/--text are transparent/inherit so the host controls page chrome;
     --card uses a faint tint that works on both light and dark hosts. */
  --bg: transparent;
  --card: rgba(127,127,127,0.08);
  --card-hover: rgba(127,127,127,0.14);
  --accent: #1976d2;
  --accent2: #2e7d32;
  --accent3: #ef6c00;
  --accent4: #c62828;
  --text: inherit;
  --text2: rgba(127,127,127,0.85);
  --correct: #2e7d32;
  --wrong: #c62828;
  --radius: 12px;
}
* { margin:0; padding:0; box-sizing:border-box; }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: transparent;
  color: inherit;
  min-height: 100vh;
  line-height: 1.6;
}

/* NAV */
.topnav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(127,127,127,0.05);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(79,195,247,0.2);
  padding: 10px 20px;
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
.topnav .logo {
  font-size: 18px; font-weight: 700; color: var(--accent);
  cursor: pointer; white-space: nowrap;
}
.topnav .breadcrumb { font-size: 14px; color: var(--text2); flex: 1; min-width: 0; }
.topnav .breadcrumb span { color: var(--text); }
.topnav .score-box { font-size: 14px; color: var(--accent2); font-weight: 600; white-space: nowrap; }
.topnav .lang-box { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text2); }
.topnav .lang-box select {
  background: var(--card); color: var(--text);
  border: 1px solid rgba(79,195,247,0.3); border-radius: 6px;
  padding: 4px 8px; font-size: 13px; cursor: pointer; font-family: inherit;
}
.topnav .lang-box select:focus { outline: none; border-color: var(--accent); }

/* SCREENS */
.screen { display: none; padding: 30px 20px; max-width: 1100px; margin: 0 auto; }
.screen.active { display: block; }

/* HUB */
.hub-title {
  font-size: 36px; font-weight: 800; text-align: center; margin-bottom: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hub-subtitle { text-align: center; color: var(--text2); font-size: 16px; margin-bottom: 16px; max-width: 800px; margin-left: auto; margin-right: auto; }
.hub-legend { text-align: center; color: var(--text2); font-size: 13px; margin-bottom: 30px; font-style: italic; }
.module-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin-bottom: 40px; }
.module-card {
  background: var(--card); border-radius: var(--radius); padding: 24px;
  border: 1px solid rgba(79,195,247,0.15);
  cursor: pointer; transition: all 0.2s;
  position: relative; overflow: hidden;
}
.module-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 8px 30px rgba(25,118,210,0.18); }
.module-card .badge {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; margin-bottom: 8px;
}
.module-card .badge.m0 { background: rgba(25,118,210,0.15); color: #0d47a1; }
.module-card .badge.m1 { background: rgba(46,125,50,0.15); color: #1b5e20; }
.module-card .badge.m2 { background: rgba(46,125,50,0.15); color: #1b5e20; }
.module-card .badge.m3 { background: rgba(239,108,0,0.18); color: #e65100; }
.module-card .badge.m4 { background: rgba(198,40,40,0.15); color: #b71c1c; }
.module-card .badge.m5 { background: rgba(46,125,50,0.15); color: #1b5e20; }
.module-card .badge.m6 { background: rgba(198,40,40,0.15); color: #b71c1c; }
.module-card .badge.m7 { background: rgba(25,118,210,0.15); color: #0d47a1; }
.module-card .tier { font-size: 11px; color: var(--text2); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 1px; }
.module-card h3 { font-size: 20px; margin-bottom: 8px; }
.module-card p { font-size: 14px; color: var(--text2); margin-bottom: 16px; }
.module-card .exercises-list { list-style: none; font-size: 13px; color: var(--text2); }
.module-card .exercises-list li { padding: 4px 0; padding-left: 18px; position: relative; }
.module-card .exercises-list li::before {
  content: ''; position: absolute; left: 0; top: 11px;
  width: 8px; height: 8px; border-radius: 50%; border: 2px solid var(--text2);
}
.module-card .exercises-list li.done::before { background: var(--correct); border-color: var(--correct); }

/* EXERCISE HEADER */
.ex-header { margin-bottom: 30px; }
.ex-header .ex-num {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  color: var(--accent); letter-spacing: 1px; margin-bottom: 6px;
}
.ex-header h2 { font-size: 28px; font-weight: 700; margin-bottom: 8px; }
.ex-header p { color: var(--text2); font-size: 15px; max-width: 700px; }

/* TEACH SECTION */
.teach-section { background: var(--card); border-radius: var(--radius); padding: 24px; margin-bottom: 30px; border: 1px solid rgba(79,195,247,0.1); }
.teach-section h3 { font-size: 18px; margin-bottom: 12px; color: var(--accent); }
.teach-section p { color: var(--text2); margin-bottom: 12px; font-size: 14px; }
.teach-section .tip {
  background: rgba(255,183,77,0.1); border-left: 3px solid var(--accent3);
  padding: 12px 16px; border-radius: 0 8px 8px 0; margin: 12px 0;
  font-size: 14px; color: var(--accent3);
}

/* COMPARISON GRID */
.compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 20px 0; }
.compare-card { background: rgba(127,127,127,0.05); border-radius: var(--radius); overflow: hidden; border: 2px solid transparent; text-align: center; padding-bottom: 12px; }
.compare-card img { width: 100%; height: 180px; object-fit: contain; background: #fff; padding: 8px; }
.compare-card .label { padding: 8px 12px; font-weight: 600; font-size: 14px; }
.compare-card.boeing-side { border-color: rgba(79,195,247,0.4); }
.compare-card.boeing-side .label { color: var(--accent); }
.compare-card.airbus-side { border-color: rgba(129,199,132,0.4); }
.compare-card.airbus-side .label { color: var(--accent2); }

/* QUIZ AREA */
.quiz-area { background: var(--card); border-radius: var(--radius); padding: 30px; border: 1px solid rgba(79,195,247,0.1); }
.quiz-progress { display: flex; gap: 6px; margin-bottom: 20px; }
.quiz-progress .pip { flex: 1; height: 4px; border-radius: 2px; background: rgba(127,127,127,0.25); }
.quiz-progress .pip.done { background: var(--correct); }
.quiz-progress .pip.wrong { background: var(--wrong); }
.quiz-progress .pip.current { background: var(--accent); }

.quiz-question { font-size: 18px; font-weight: 600; margin-bottom: 20px; text-align: center; }
.quiz-image { text-align: center; margin-bottom: 24px; }
.quiz-image img { max-width: 100%; max-height: 320px; border-radius: 8px; background: #fff; padding: 8px; }
.quiz-image.far img { max-height: 160px; max-width: 60%; filter: blur(0.5px) brightness(0.95); }
.quiz-image.cruise img { max-height: 100px; max-width: 35%; filter: blur(1px) contrast(0.85) brightness(0.85); background: #1a2a3a; padding: 0; }

.quiz-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 600px; margin: 0 auto; }
.quiz-options.col-3 { grid-template-columns: 1fr 1fr 1fr; }
.quiz-btn {
  padding: 16px; border-radius: var(--radius); border: 2px solid rgba(127,127,127,0.25);
  background: rgba(127,127,127,0.06); color: inherit; font-size: 15px; font-weight: 600;
  cursor: pointer; transition: all 0.15s; text-align: center; font-family: inherit;
}
.quiz-btn:hover { border-color: var(--accent); background: rgba(25,118,210,0.12); color: var(--text); }
.quiz-btn.correct { border-color: var(--correct); background: rgba(46,125,50,0.18); color: var(--text); animation: pulse-correct 0.4s; }
.quiz-btn.wrong { border-color: var(--wrong); background: rgba(198,40,40,0.18); color: var(--text); animation: shake 0.4s; }
@keyframes pulse-correct { 0%,100% { transform: scale(1); } 50% { transform: scale(1.04); } }
@keyframes shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

.quiz-feedback { margin-top: 16px; padding: 16px; border-radius: 8px; text-align: center; font-size: 14px; display: none; }
.quiz-feedback.show { display: block; }
.quiz-feedback.correct-fb { background: rgba(76,175,80,0.15); border: 1px solid rgba(76,175,80,0.3); color: var(--correct); }
.quiz-feedback.wrong-fb { background: rgba(244,67,54,0.15); border: 1px solid rgba(244,67,54,0.3); color: var(--wrong); }

/* RESULTS */
.results-screen { text-align: center; padding: 40px 20px; }
.results-screen .big-score {
  font-size: 72px; font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
}
.results-screen .score-label { color: var(--text2); font-size: 16px; margin-bottom: 30px; }
.results-screen .result-msg { font-size: 20px; margin-bottom: 30px; }

/* BUTTONS */
.btn { display: inline-block; padding: 12px 28px; border-radius: 8px; font-size: 15px; font-weight: 600; cursor: pointer; border: none; transition: all 0.15s; font-family: inherit; }
.btn-primary { background: var(--accent); color: #fff; border: 2px solid var(--accent); }
.btn-primary:hover { background: #0d47a1; border-color: #0d47a1; color: #fff; }
.btn-secondary { background: transparent; color: inherit; border: 2px solid rgba(127,127,127,0.35); }
.btn-secondary:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-row { display: flex; gap: 12px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }

/* FEATURE CALLOUT */
.feature-callout {
  display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start;
  background: var(--card); border-radius: var(--radius); padding: 16px;
  margin: 12px 0; border-left: 4px solid var(--accent);
}
.feature-callout img { width: 300px; max-height: 180px; object-fit: contain; background: #fff; border-radius: 8px; padding: 4px; }
.feature-callout .desc h4 { color: var(--accent); margin-bottom: 4px; }
.feature-callout .desc p { color: var(--text2); font-size: 13px; }

/* ============ NIGHT-STROBE STAGE ============ */
.night-stage {
  background: linear-gradient(180deg, #000 0%, #050a14 100%);
  border-radius: 8px; padding: 30px 20px;
  position: relative; min-height: 120px;
  display: flex; align-items: center; justify-content: center; flex-direction: column;
  margin-bottom: 8px;
}
.strobe-row {
  position: relative; width: 80%; max-width: 280px; height: 30px;
  display: flex; justify-content: space-between; align-items: center;
}
.strobe-fuselage { width: 80%; max-width: 280px; height: 6px; background: #222; border-radius: 3px; margin-top: 4px; }
.strobe { width: 14px; height: 14px; border-radius: 50%; opacity: 0.15; }
.strobe.red { background: #f33; box-shadow: 0 0 8px rgba(255,80,80,0.6); opacity:0.9; }
.strobe.green { background: #4f4; box-shadow: 0 0 8px rgba(80,255,80,0.6); opacity:0.9; }
@keyframes strobe-boeing {
  0%, 88%, 100% { opacity: 0.15; transform: scale(1); }
  90%, 95% { opacity: 1; transform: scale(1.6); box-shadow: 0 0 22px #fff; background:#fff; }
}
.strobe-boeing { animation: strobe-boeing 1.6s infinite; }
@keyframes strobe-airbus {
  0%, 78%, 100% { opacity: 0.15; transform: scale(1); }
  80%, 84% { opacity: 1; transform: scale(1.6); box-shadow: 0 0 22px #fff; background:#fff; }
  86% { opacity: 0.15; transform: scale(1); }
  88%, 92% { opacity: 1; transform: scale(1.6); box-shadow: 0 0 22px #fff; background:#fff; }
}
.strobe-airbus { animation: strobe-airbus 1.6s infinite; }
.navlight { width: 14px; height: 14px; border-radius: 50%; opacity: 1; }
.single-light { width: 18px; height: 18px; border-radius: 50%; background: #f33; opacity: 0.15; }
@keyframes beacon-anim { 0%, 70%, 100% { opacity: 0.15; } 10%, 25% { opacity: 1; box-shadow: 0 0 22px #f33; } }
.beacon-anim { animation: beacon-anim 1.2s infinite; }
@keyframes strobe-anim {
  0%, 95%, 100% { opacity: 0.15; background: #f33; }
  96%, 99% { opacity: 1; background: #fff; box-shadow: 0 0 22px #fff; transform: scale(1.4); }
}
.strobe-anim { animation: strobe-anim 1.0s infinite; }
.taxi-light { width: 28px; height: 12px; border-radius: 4px; background: #ffd; box-shadow: 0 0 18px #ffd; opacity: 0.95; }

/* ============ AIRPORT GROUND-LIGHTING STAGE (Module 4) ============ */
.airport-stage {
  background: linear-gradient(180deg, #000 0%, #050a14 100%);
  border-radius: 8px; padding: 18px 12px;
  position: relative; overflow: hidden;
  margin: 0 auto 8px; max-width: 600px;
  display: flex; flex-direction: column; gap: 8px;
}
.light-row {
  display: flex; justify-content: space-between; gap: 4px;
  padding: 0 6px;
}
.apt-dot {
  display: inline-block;
  width: 10px; height: 10px; border-radius: 50%;
  flex: 0 0 auto;
}
.runway-strip {
  height: 36px;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,0.18) 0 18px, transparent 18px 42px);
  border-top: 1px solid rgba(255,255,255,0.08);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
}
.runway-center {
  width: 100%;
}
.runway-center .light-row {
  justify-content: space-between;
}
.papi-row {
  display: flex; gap: 6px;
}
.papi-dot {
  width: 22px; height: 22px; border-radius: 50%;
  display: inline-block;
}

/* ============ CRUISE / contrail stage ============ */
.cruise-stage {
  background: linear-gradient(180deg, #1a2540 0%, #0a1530 100%);
  border-radius: 8px; padding: 24px; height: 220px;
  position: relative; overflow: hidden;
  margin: 0 auto 24px; max-width: 600px;
}
.contrail {
  position: absolute; top: 30px; width: 4px; height: 100px;
  background: linear-gradient(180deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.1) 100%);
  border-radius: 2px;
}
.contrail.tail-trail {
  width: 4px;
  background: linear-gradient(180deg, rgba(255,255,255,0.7) 0%, rgba(255,255,255,0.1) 100%);
}
.cruise-silhouette {
  position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
  width: 60px; height: 8px; background: #ddd; border-radius: 3px;
  box-shadow: 0 0 4px rgba(255,255,255,0.5);
}

/* Responsive */
@media (max-width: 700px) {
  .compare-grid { grid-template-columns: 1fr; }
  .quiz-options { grid-template-columns: 1fr; }
  .quiz-options.col-3 { grid-template-columns: 1fr; }
  .feature-callout { grid-template-columns: 1fr; }
  .feature-callout img { width: 100%; }
  .hub-title { font-size: 26px; }
  .topnav .breadcrumb { flex-basis: 100%; order: 5; }
}
