:root{
  --bg:#f1f5f9;
  --surface:#ffffff;
  --card:#ffffff;
  --border:#d1d5db;
  --text:#0f172a;
  --muted:#64748b;

  --primary:#2563eb;
  --danger:#dc2626;

  --answered:#16a34a;
  --current:#f59e0b;
  --locked:#cbd5e1;
}

*{ box-sizing:border-box; }

body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

/* TOPBAR */

.topbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:14px 18px;
  border-bottom:1px solid var(--border);
  background: var(--surface);
  position:sticky;
  top:0;
  z-index:10;
}

.brand{ display:flex; gap:12px; align-items:center; }

.logo{
  width:38px;
  height:38px;
  border-radius:10px;
  display:grid;
  place-items:center;
  background: var(--primary);
  color:white;
  font-weight:800;
}

.title{ font-weight:800; }
.subtitle{ font-size:12px; color:var(--muted); }

.rightInfo{
  display:flex;
  gap:18px;
  align-items:center;
}

.userInfo{
  font-size:12px;
  max-width:320px;
  text-align:right;
}

.timerWrap{ text-align:right; }

.timerLabel{
  font-size:12px;
  color:var(--muted);
}

.timer{
  font-size:18px;
  font-weight:800;
  letter-spacing:1px;
}

.timer.warn{
  color:#dc2626;
  font-weight:900;
}

/* LAYOUT */

.container{
  max-width:1200px;
  margin:22px auto;
  padding:0 16px;
}

.hidden{ display:none !important; }

.card{
  background: var(--card);
  border:1px solid var(--border);
  border-radius:14px;
  padding:18px;
}

/* TYPOGRAPHY */

h1{ margin:0 0 10px 0; font-size:20px; }
h2{ margin:0 0 8px 0; font-size:16px; }

.muted{ color:var(--muted); }

.mt8{ margin-top:8px; }
.mt12{ margin-top:12px; }

/* FORM */

.grid2{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}

@media (max-width:780px){
  .grid2{ grid-template-columns:1fr; }
}

label{
  display:block;
  font-size:12px;
  color:var(--muted);
  margin-bottom:6px;
}

input{
  width:100%;
  padding:10px 12px;
  border-radius:10px;
  border:1px solid var(--border);
  background:#ffffff;
  color:var(--text);
  outline:none;
}

input:focus{
  border-color:#2563eb;
}

.hint{
  font-size:12px;
  color:var(--muted);
}

.actions{
  margin-top:14px;
  display:flex;
  justify-content:flex-end;
  gap:10px;
}

/* BUTTON */

.btn{
  border:none;
  padding:10px 14px;
  border-radius:10px;
  background: var(--primary);
  color:white;
  font-weight:700;
  cursor:pointer;
}

.btn:hover{
  opacity:.9;
}

.btn.secondary{
  background:#475569;
}

.btn.danger{
  background:var(--danger);
}

.btn.full{ width:100%; }

.msg{
  margin-top:10px;
  font-size:13px;
  color:#dc2626;
}

/* MAIN LAYOUT */

.layout{
  display:grid;
  grid-template-columns:320px 1fr;
  gap:12px;
}

@media (max-width:980px){
  .layout{ grid-template-columns:1fr; }
}

/* SIDEBAR */

.sidebar .panel{
  background: var(--card);
  border:1px solid var(--border);
  border-radius:14px;
  padding:14px;
}

.panelTitle{
  font-weight:800;
  margin-bottom:10px;
}

.legend{
  font-size:12px;
  color:var(--muted);
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
  margin-bottom:10px;
}

.dot{
  display:inline-block;
  width:10px;
  height:10px;
  border-radius:50%;
  background:#64748b;
}

.dot.answered{ background:var(--answered); }
.dot.current{ background:var(--current); }
.dot.locked{ background:var(--locked); }

/* NAVIGATION */

.navGrid{
  display:grid;
  grid-template-columns:repeat(5,1fr);
  gap:8px;
}

.navBtn{
  padding:8px 0;
  border-radius:10px;
  border:1px solid var(--border);
  background:#ffffff;
  color:var(--text);
  cursor:pointer;
  font-weight:700;
}

.navBtn.answered{
  border-color:#16a34a;
  background:#dcfce7;
}

.navBtn.current{
  border-color:#f59e0b;
  background:#fef3c7;
}

.navBtn.locked{
  background:#f1f5f9;
  color:#94a3b8;
  cursor:not-allowed;
}

/* QUESTION AREA */

.content .card{
  min-height:420px;
}

.qTop{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  gap:12px;
  margin-bottom:10px;
}

.qNo{
  font-weight:900;
}

.qText{
  margin-top:10px;
  line-height:1.65;
  font-size:16px;
}

/* PASSAGE */

.passage{
  border:1px solid var(--border);
  background:#f8fafc;
  border-radius:12px;
  padding:12px;
  margin:10px 0 12px 0;
  white-space:pre-wrap;
}

/* OPTIONS */

.options{
  margin-top:14px;
  display:flex;
  flex-direction:column;
  gap:8px;
}

.opt{
  border:1px solid var(--border);
  background:#ffffff;
  border-radius:12px;
  padding:10px 12px;
  display:flex;
  gap:10px;
  cursor:pointer;
}

.opt:hover{
  border-color:#2563eb;
}

.opt input{
  width:auto;
  margin-top:3px;
}

.opt .label{
  font-weight:800;
  width:22px;
}

.opt.selected{
  border-color:#2563eb;
  background:#eff6ff;
}

/* QUESTION NAV BUTTONS */

.qActions{
  margin-top:14px;
  display:flex;
  justify-content:space-between;
  gap:10px;
}

/* MODAL */

.modal{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.35);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
  z-index:50;
}

.modalCard{
  width:min(520px,100%);
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:14px;
  padding:16px;
}

.modalActions{
  margin-top:14px;
  display:flex;
  justify-content:flex-end;
  gap:10px;
}

/* TOAST */

.toast{
  position:fixed;
  left:50%;
  bottom:18px;
  transform:translateX(-50%);
  background:#ffffff;
  border:1px solid var(--border);
  color:var(--text);
  padding:10px 12px;
  border-radius:12px;
  font-size:13px;
  opacity:0;
  pointer-events:none;
  transition:opacity .2s ease;
  z-index:60;
}

.toast.show{
  opacity:1;
}

/* REVIEW */

.scoreBox{
  border:1px solid var(--border);
  background:#ffffff;
  border-radius:12px;
  padding:12px;
}

.reviewList{
  margin-top:12px;
  display:flex;
  flex-direction:column;
  gap:12px;
}

.reviewItem{
  border:1px solid var(--border);
  background:#ffffff;
  border-radius:12px;
  padding:12px;
}

.reviewHeader{
  display:flex;
  justify-content:space-between;
  gap:10px;
  margin-bottom:8px;
}

.badge{
  font-size:12px;
  padding:4px 8px;
  border-radius:999px;
  border:1px solid var(--border);
}

.badge.ok{
  border-color:#16a34a;
  color:#166534;
}

.badge.no{
  border-color:#dc2626;
  color:#991b1b;
}

.badge.na{
  border-color:#64748b;
  color:#475569;
}
.passageImageWrap{
  text-align: center;
  margin-top: 12px;
}

.passageImage{
  width: 280px;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}
.question-table{
  border-collapse: collapse;
  width: 100%;
  margin: 12px 0;
  font-size: 15px;
}

.question-table th,
.question-table td{
  border: 1px solid #444;
  padding: 6px 10px;
  vertical-align: top;
}

.question-table th{
  text-align: center;
  font-weight: 600;
}
.question-table{
  border-collapse: collapse;
  margin: 10px auto;
  width: auto;          /* mengikuti isi */
}

.question-table th,
.question-table td{
  border:1px solid #444;
  padding:4px 10px;     /* lebih kecil */
  text-align:center;
  vertical-align:middle;
  white-space:nowrap;   /* supaya tidak melebar */
}
.small{
  padding:6px 10px;
  font-size:13px;
}
/* tombol dapatkan token */
.btnToken{
  display:inline-block;
  margin-left:8px;
  padding:10px 18px;

  background:#ff7a00;
  color:white;

  font-weight:600;
  border-radius:8px;

  text-decoration:none; /* hilangkan garis bawah */

  box-shadow:0 0 0 rgba(255,122,0,0.7);

  animation:pulseToken 1.8s infinite;

  transition:transform 0.2s ease, box-shadow 0.2s ease;
}

/* efek hover */
.btnToken:hover{
  transform:translateY(-2px) scale(1.05);
  box-shadow:0 6px 20px rgba(255,122,0,0.5);
}

/* animasi pulse */
@keyframes pulseToken{
  0%{
    box-shadow:0 0 0 0 rgba(255,122,0,0.6);
  }
  70%{
    box-shadow:0 0 0 10px rgba(255,122,0,0);
  }
  100%{
    box-shadow:0 0 0 0 rgba(255,122,0,0);
  }
}