:root{
  --bg:#08090B;
  --surface:rgba(255,255,255,0.06);
  --surface2:rgba(255,255,255,0.10);
  --border:rgba(255,255,255,0.12);
  --border-strong:rgba(255,255,255,0.18);
  --text:#F3F6FA;
  --text-dim:#A9B0BD;
  --accent1:#FF6B6B;
  --accent2:#4ECDC4;
  --accent3:#FFE66D;
  --accent4:#A78BFA;
  --success:#4FD07C;
  --danger:#FF6B6B;
}

*{box-sizing:border-box;}
html{scroll-behavior:smooth;}
body{
  margin:0;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Inter,Arial,sans-serif;
  background:var(--bg);
  color:var(--text);
  min-height:100vh;
  line-height:1.55;
}

.topbar{
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px 20px;
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
  text-decoration:none;
  color:var(--text);
  font-weight:800;
  font-size:18px;
}

.brand-mark{
  width:44px;
  height:44px;
  border-radius:14px;
  background:linear-gradient(135deg,var(--accent1),var(--accent2));
  display:flex;
  align-items:center;
  justify-content:center;
  color:#000;
  font-size:20px;
  font-weight:900;
  flex-shrink:0;
}

.app{
  max-width:760px;
  margin:0 auto;
  padding:16px 16px 40px;
}

.card{
  background:linear-gradient(155deg,var(--surface2),var(--surface));
  border:1px solid var(--border);
  border-radius:26px;
  padding:24px;
  margin-bottom:18px;
  box-shadow:0 14px 44px rgba(0,0,0,0.35);
}

h1,h2,h3{margin:0 0 12px;line-height:1.2;}
h1{font-size:32px;}
h2{font-size:24px;}
h3{font-size:20px;}
p{margin:0 0 14px;}

.eyebrow{
  display:inline-block;
  font-size:12px;
  font-weight:800;
  letter-spacing:0.05em;
  text-transform:uppercase;
  color:var(--accent2);
  background:rgba(78,205,196,0.12);
  border:1px solid rgba(78,205,196,0.3);
  padding:6px 12px;
  border-radius:20px;
  margin-bottom:14px;
}

.center{text-align:center;}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  border:none;
  border-radius:18px;
  padding:18px 22px;
  font-size:18px;
  font-weight:800;
  cursor:pointer;
  transition:transform .1s,box-shadow .1s,background .15s;
  text-decoration:none;
  min-height:60px;
  width:100%;
  line-height:1.2;
}

.btn:active{transform:scale(0.97);}

.btn-primary{
  background:linear-gradient(90deg,var(--accent1),var(--accent2));
  color:#000;
  box-shadow:0 8px 26px rgba(255,107,107,0.25);
}

.btn-ghost{
  background:var(--surface);
  color:var(--text);
  border:1px solid var(--border-strong);
}

.btn-small{
  min-height:48px;
  font-size:16px;
  padding:12px 18px;
  width:auto;
}

.grid{display:grid;gap:16px;}
.year-grid{grid-template-columns:1fr;}
@media(min-width:560px){.year-grid{grid-template-columns:1fr 1fr;}}
.subject-grid{grid-template-columns:1fr;}
@media(min-width:560px){.subject-grid{grid-template-columns:repeat(3,1fr);}}
.mode-grid{grid-template-columns:1fr;}
@media(min-width:460px){.mode-grid{grid-template-columns:1fr 1fr;}}

.big-choice{
  display:flex;
  flex-direction:column;
  gap:8px;
  padding:22px;
  border-radius:24px;
  background:var(--surface);
  border:2px solid var(--border);
  text-align:left;
  cursor:pointer;
  transition:border-color .12s,transform .12s,background .12s;
}

.big-choice:hover{
  border-color:var(--accent2);
  background:var(--surface2);
}

.big-choice .title{font-size:22px;font-weight:800;}
.big-choice .subtitle{color:var(--text-dim);font-size:15px;line-height:1.4;}
.big-choice .pill{
  align-self:flex-start;
  font-size:11px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:0.04em;
  padding:4px 10px;
  border-radius:20px;
  background:rgba(78,205,196,0.15);
  color:var(--accent2);
  border:1px solid rgba(78,205,196,0.35);
}

.subject-card .icon{
  width:64px;
  height:64px;
  border-radius:18px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:22px;
  font-weight:900;
  margin-bottom:12px;
  color:#000;
}

.reading .icon{background:linear-gradient(135deg,var(--accent1),var(--accent4));}
.gps .icon{background:linear-gradient(135deg,var(--accent2),var(--accent3));}
.maths .icon{background:linear-gradient(135deg,var(--accent3),var(--accent1));}

.choice-list{display:flex;flex-direction:column;gap:12px;margin:18px 0;}

.option{
  display:flex;
  align-items:center;
  gap:14px;
  padding:18px;
  border-radius:18px;
  background:var(--surface);
  border:2px solid var(--border);
  font-size:18px;
  font-weight:700;
  cursor:pointer;
  transition:all .12s;
  min-height:58px;
}

.option:hover{border-color:var(--accent2);background:var(--surface2);}
.option.selected{border-color:var(--accent2);background:rgba(78,205,196,0.12);}
.option.correct{border-color:var(--success);background:rgba(79,208,124,0.14);}
.option.wrong{border-color:var(--danger);background:rgba(255,107,107,0.12);}

.option-key{
  width:34px;
  height:34px;
  border-radius:50%;
  background:var(--surface2);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:14px;
  font-weight:900;
  flex-shrink:0;
}

.text-input{
  width:100%;
  padding:18px;
  border-radius:18px;
  border:2px solid var(--border);
  background:var(--surface);
  color:var(--text);
  font-size:20px;
  font-weight:700;
  margin:18px 0;
  outline:none;
}

.text-input:focus{border-color:var(--accent2);}

.text-input::placeholder{color:var(--text-dim);}

.feedback{
  padding:18px;
  border-radius:18px;
  margin:18px 0;
  font-size:17px;
  font-weight:700;
}

.feedback.correct{background:rgba(79,208,124,0.14);border:1px solid rgba(79,208,124,0.4);color:var(--success);}
.feedback.wrong{background:rgba(255,107,107,0.12);border:1px solid rgba(255,107,107,0.4);color:var(--danger);}

.explanation{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:18px;
  padding:16px;
  margin-top:12px;
  font-weight:500;
  color:var(--text-dim);
}

.progress-bar{
  height:12px;
  background:var(--surface);
  border-radius:10px;
  overflow:hidden;
  margin:14px 0;
}

.progress-fill{
  height:100%;
  background:linear-gradient(90deg,var(--accent1),var(--accent2));
  border-radius:10px;
  transition:width .25s;
}

.result-score{
  font-size:52px;
  font-weight:900;
  background:linear-gradient(90deg,var(--accent1),var(--accent2));
  -webkit-background-clip:text;background-clip:text;color:transparent;
  margin:14px 0;
}

.passage{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:20px;
  padding:20px;
  font-size:17px;
  line-height:1.7;
  margin-bottom:18px;
}

.breadcrumb{
  display:flex;
  align-items:center;
  gap:8px;
  margin-bottom:16px;
  color:var(--text-dim);
  font-size:14px;
  font-weight:700;
}

.breadcrumb a{color:var(--text);text-decoration:none;}

.controls{
  display:flex;
  gap:12px;
  justify-content:space-between;
  margin-top:18px;
  flex-wrap:wrap;
}

.controls .btn{width:auto;flex:1;min-width:120px;}

.nav-dots{
  display:flex;
  gap:8px;
  justify-content:center;
  margin-top:16px;
  flex-wrap:wrap;
}

.dot{
  width:14px;
  height:14px;
  border-radius:50%;
  background:var(--surface);
  border:1px solid var(--border);
  cursor:pointer;
}

.dot.answered{background:var(--accent2);}
.dot.current{background:var(--accent1);}

.foot{
  text-align:center;
  padding:20px;
  color:var(--text-dim);
  font-size:13px;
}

.foot a{color:var(--text-dim);}

.score-chip{
  display:inline-block;
  font-size:13px;
  font-weight:800;
  padding:4px 10px;
  border-radius:20px;
  background:var(--surface);
  color:var(--text-dim);
  border:1px solid var(--border);
}

@media(max-width:480px){
  h1{font-size:26px;}
  h2{font-size:20px;}
  .btn{font-size:17px;padding:16px 18px;}
}
