@import url('https://fonts.googleapis.com/css2?family=Syne:wght@600;700;800&family=DM+Sans:wght@400;500;700&display=swap');

:root{
  --navy:#0B1220;
  --navy-2:#121B2E;
  --panel:#16213A;
  --teal:#1FB8A6;
  --teal-dim:#15877A;
  --gold:#E8B95C;
  --text:#EAF0F6;
  --text-dim:#9FB0C3;
  --danger:#E2604F;
  --success:#3FBF7F;
  --border:#243355;
}

*{box-sizing:border-box;}
html,body{height:100%;}
body{
  margin:0;
  background:var(--navy);
  color:var(--text);
  font-family:'DM Sans', Arial, Helvetica, sans-serif;
  -webkit-font-smoothing:antialiased;
}

#app{
  display:flex;
  flex-direction:column;
  height:100vh;
  width:100vw;
  overflow:hidden;
}

/* Top bar */
.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 28px;
  background:var(--navy-2);
  border-bottom:1px solid var(--border);
  flex-shrink:0;
}
.brand{
  display:flex;
  align-items:center;
  gap:10px;
  font-family:'Syne',sans-serif;
  font-weight:700;
  letter-spacing:.3px;
  font-size:15px;
  color:var(--text);
}
.brand .dot{
  width:9px;height:9px;border-radius:50%;
  background:var(--teal);
  box-shadow:0 0 10px var(--teal);
}
.progress-wrap{
  flex:1;
  margin:0 28px;
  display:flex;
  align-items:center;
  gap:12px;
}
.progress-track{
  flex:1;
  height:6px;
  background:var(--border);
  border-radius:4px;
  overflow:hidden;
}
.progress-fill{
  height:100%;
  background:linear-gradient(90deg,var(--teal),var(--gold));
  width:0%;
  transition:width .35s ease;
}
.progress-label{
  font-size:12px;
  color:var(--text-dim);
  white-space:nowrap;
  min-width:64px;
  text-align:right;
}
.menu-btn{
  background:transparent;
  border:1px solid var(--border);
  color:var(--text-dim);
  padding:8px 14px;
  border-radius:8px;
  font-size:13px;
  cursor:pointer;
  font-family:'DM Sans',sans-serif;
}
.menu-btn:hover{border-color:var(--teal);color:var(--text);}

/* Main content */
.stage{
  flex:1;
  overflow-y:auto;
  display:flex;
  justify-content:center;
  padding:48px 24px 24px;
}
.screen{
  width:100%;
  max-width:880px;
  animation:fadeIn .35s ease;
}
@keyframes fadeIn{from{opacity:0;transform:translateY(8px);}to{opacity:1;transform:translateY(0);}}

/* Title screen */
.screen-title{
  height:100%;
  min-height:60vh;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
}
.screen-title .eyebrow{
  color:var(--gold);
  font-size:13px;
  letter-spacing:3px;
  text-transform:uppercase;
  margin-bottom:18px;
  font-weight:700;
}
.screen-title h1{
  font-family:'Syne',sans-serif;
  font-size:44px;
  font-weight:800;
  margin:0 0 14px;
  line-height:1.15;
}
.screen-title .sub{
  color:var(--text-dim);
  font-size:17px;
  max-width:520px;
}
.screen-title .pill{
  margin-top:32px;
  border:1px solid var(--border);
  background:var(--panel);
  padding:10px 20px;
  border-radius:30px;
  font-size:13px;
  color:var(--text-dim);
}

/* Section divider */
.screen-section{
  height:100%;
  min-height:50vh;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
}
.screen-section .num{
  font-family:'Syne',sans-serif;
  font-size:64px;
  font-weight:800;
  color:var(--teal);
  opacity:.35;
  margin-bottom:8px;
}
.screen-section h2{
  font-family:'Syne',sans-serif;
  font-size:32px;
  font-weight:700;
  margin:0;
}

/* Index screen */
.index-list{
  list-style:none;
  padding:0;
  margin:28px 0 0;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.index-list li{
  display:flex;
  align-items:center;
  gap:14px;
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:10px;
  padding:16px 18px;
  font-size:15px;
}
.index-list .n{
  font-family:'Syne',sans-serif;
  font-weight:700;
  color:var(--teal);
  font-size:14px;
  min-width:24px;
}

/* Content card */
.card-title{
  font-family:'Syne',sans-serif;
  font-weight:700;
  font-size:26px;
  margin:0 0 22px;
  padding-bottom:14px;
  border-bottom:1px solid var(--border);
}
.bullets{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  flex-direction:column;
  gap:14px;
}
.bullets li{
  position:relative;
  padding-left:24px;
  font-size:16px;
  line-height:1.6;
  color:var(--text);
}
.bullets li::before{
  content:"";
  position:absolute;
  left:0;
  top:9px;
  width:7px;height:7px;
  border-radius:50%;
  background:var(--teal);
}
.objectives li::before{ background:var(--gold); }

.refs{
  margin-top:28px;
  padding-top:16px;
  border-top:1px dashed var(--border);
}
.refs .refs-label{
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:1.5px;
  color:var(--gold);
  font-weight:700;
  margin-bottom:8px;
}
.refs ol{
  margin:0;
  padding-left:18px;
  display:flex;
  flex-direction:column;
  gap:5px;
}
.refs li{
  font-size:12px;
  color:var(--text-dim);
  line-height:1.5;
}

/* Summary screen */
.summary-card{
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:14px;
  padding:32px;
}
.summary-card .card-title{ border-bottom:none; padding-bottom:0; }

/* Quiz */
.quiz-progress{
  font-size:12px;
  color:var(--gold);
  text-transform:uppercase;
  letter-spacing:1.5px;
  font-weight:700;
  margin-bottom:10px;
}
.quiz-q{
  font-family:'Syne',sans-serif;
  font-size:22px;
  font-weight:700;
  margin:0 0 22px;
  line-height:1.4;
}
.options{
  display:flex;
  flex-direction:column;
  gap:12px;
}
.option{
  display:flex;
  align-items:center;
  gap:14px;
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:10px;
  padding:16px 18px;
  font-size:15px;
  cursor:pointer;
  transition:border-color .15s, background .15s;
}
.option:hover{ border-color:var(--teal); }
.option .letter{
  width:26px;height:26px;
  border-radius:50%;
  border:1px solid var(--border);
  display:flex;align-items:center;justify-content:center;
  font-size:12px;
  font-weight:700;
  flex-shrink:0;
  color:var(--text-dim);
}
.option.selected{ border-color:var(--teal); background:rgba(31,184,166,.1); }
.option.correct{ border-color:var(--success); background:rgba(63,191,127,.12); }
.option.incorrect{ border-color:var(--danger); background:rgba(226,96,79,.12); }
.option.correct .letter{ background:var(--success); color:#0B1220; border-color:var(--success); }
.option.incorrect .letter{ background:var(--danger); color:#0B1220; border-color:var(--danger); }
.option.disabled{ cursor:default; }

.quiz-feedback{
  margin-top:18px;
  font-size:14px;
  padding:14px 16px;
  border-radius:10px;
  display:none;
}
.quiz-feedback.show{ display:block; }
.quiz-feedback.correct{ background:rgba(63,191,127,.12); color:var(--success); border:1px solid rgba(63,191,127,.3); }
.quiz-feedback.incorrect{ background:rgba(226,96,79,.12); color:var(--danger); border:1px solid rgba(226,96,79,.3); }

/* Complete screen */
.screen-complete{
  height:100%;
  min-height:60vh;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
}
.screen-complete .badge{
  width:84px;height:84px;
  border-radius:50%;
  background:radial-gradient(circle at 30% 30%, var(--teal), var(--teal-dim));
  display:flex;align-items:center;justify-content:center;
  margin-bottom:24px;
  font-size:36px;
  box-shadow:0 0 40px rgba(31,184,166,.35);
}
.screen-complete h1{
  font-family:'Syne',sans-serif;
  font-size:32px;
  margin:0 0 12px;
}
.score-box{
  margin-top:24px;
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:14px;
  padding:28px 40px;
  display:flex;
  gap:48px;
}
.score-box .stat{ text-align:center; }
.score-box .stat .val{
  font-family:'Syne',sans-serif;
  font-size:32px;
  font-weight:800;
  color:var(--teal);
}
.score-box .stat .lbl{
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:1.5px;
  color:var(--text-dim);
  margin-top:6px;
}

/* Bottom nav */
.bottombar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:16px 28px;
  background:var(--navy-2);
  border-top:1px solid var(--border);
  flex-shrink:0;
}
.nav-btn{
  display:flex;
  align-items:center;
  gap:8px;
  background:var(--panel);
  border:1px solid var(--border);
  color:var(--text);
  padding:12px 22px;
  border-radius:9px;
  font-size:14px;
  font-weight:500;
  cursor:pointer;
  font-family:'DM Sans',sans-serif;
  transition:border-color .15s, transform .1s;
}
.nav-btn:hover:not(:disabled){ border-color:var(--teal); }
.nav-btn:active:not(:disabled){ transform:scale(.97); }
.nav-btn:disabled{ opacity:.35; cursor:not-allowed; }
.nav-btn.primary{
  background:linear-gradient(90deg,var(--teal),var(--teal-dim));
  border:none;
  color:#06120F;
  font-weight:700;
}
.nav-btn.primary:disabled{ background:var(--panel); color:var(--text-dim); opacity:.5; }
.slide-indicator{
  font-size:12px;
  color:var(--text-dim);
  letter-spacing:.5px;
}

/* Menu overlay */
.menu-overlay{
  position:fixed; inset:0;
  background:rgba(5,9,16,.7);
  backdrop-filter:blur(2px);
  display:none;
  align-items:center;
  justify-content:center;
  z-index:50;
}
.menu-overlay.show{ display:flex; }
.menu-panel{
  width:90%;
  max-width:560px;
  max-height:78vh;
  overflow-y:auto;
  background:var(--navy-2);
  border:1px solid var(--border);
  border-radius:16px;
  padding:24px;
}
.menu-panel h3{
  font-family:'Syne',sans-serif;
  margin:0 0 16px;
}
.menu-item{
  padding:12px 14px;
  border-radius:8px;
  cursor:pointer;
  font-size:14px;
  display:flex;
  justify-content:space-between;
  align-items:center;
}
.menu-item:hover{ background:var(--panel); }
.menu-item.active{ color:var(--teal); font-weight:700; }
.menu-item .tag{
  font-size:10px;
  text-transform:uppercase;
  color:var(--text-dim);
  border:1px solid var(--border);
  padding:2px 8px;
  border-radius:10px;
}
.menu-close{
  margin-top:16px;
  width:100%;
}

@media (max-width:640px){
  .screen-title h1{ font-size:30px; }
  .topbar{ padding:12px 16px; }
  .progress-wrap{ margin:0 14px; }
  .stage{ padding:28px 16px 16px; }
  .score-box{ gap:24px; padding:24px; flex-wrap:wrap; }
  .bottombar{ padding:14px 16px; }
}
