/* ================== IXOYEC Exam Styles (universal) ================== */

/* ---------- Base ---------- */
:root{
  --bg: #0f1720;
  --panel: #121a23;
  --card: #16202b;
  --text: #e6edf3;
  --muted: #9fb0c3;
  --border: #233142;
  --ok: #22c55e;
  --bad: #ef4444;
  --info: #38bdf8;
  --btn: #10b981;
  --btn-2: #64748b;
  --btn-3: #0ea5e9;
  --btn-text: #0b1320;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
}

*{ box-sizing:border-box }
html,body{
  margin:0;
  padding:0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, Segoe UI, Roboto, Inter, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji","Segoe UI Emoji";
}

/* ---------- Common wrappers ---------- */
.wrap{
  max-width: 980px;
  margin: 28px auto 80px;
  padding: 0 18px;
}
h1{
  font-size: clamp(22px, 2.6vw, 30px);
  margin: 0 0 8px;
}
.sub{
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14px;
}

/* ---------- Toolbar ---------- */
.toolbar{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
  margin: 14px 0 18px;
}
.btn{
  appearance:none;
  border:1px solid transparent;
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 600;
  cursor:pointer;
  transition:.15s ease;
  box-shadow: var(--shadow);
  background: var(--btn);
  color:#061018;
}
.btn:hover{ transform: translateY(-1px); filter: brightness(1.02) }
.btn:active{ transform: translateY(0) scale(.99) }
.btn:focus{ outline:2px solid var(--info); outline-offset:2px }

.btn.primary{ background: var(--btn); color: var(--btn-text) }
.btn.secondary{ background: var(--btn-2); color:#fff }
.btn.info{ background: var(--btn-3); color:#00131e }

#score{
  margin-left:auto;
  font-weight:700;
  color:#fff;
  background:#0b2536;
  border:1px solid var(--border);
  padding: 10px 14px;
  border-radius: 10px;
}

/* ---------- Cards / Questions ---------- */
.card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 16px 12px;
  margin: 14px 0;
  box-shadow: var(--shadow);
}
.qtext{
  margin: 0 0 10px;
  font-size: 17px;
  letter-spacing:.1px;
}
.choices{
  display:grid;
  grid-template-columns: 1fr;
  gap:10px;
}
.choice{
  display:flex;
  gap:10px;
  align-items:flex-start;
  background:#0f1a24;
  border:1px solid var(--border);
  padding: 10px 12px;
  border-radius: 12px;
  transition:.15s ease;
}
.choice:hover{
  border-color:#2b425a;
  background:#0f2230;
}
.choice input[type="radio"]{
  transform: translateY(2px);
  accent-color: var(--info);
}
.choice.correct{
  border-color: rgba(34,197,94,.55);
  background: rgba(34,197,94,.10);
  box-shadow: 0 0 0 2px rgba(34,197,94,.15) inset;
}
.choice.wrong{
  border-color: rgba(239,68,68,.55);
  background: rgba(239,68,68,.10);
  box-shadow: 0 0 0 2px rgba(239,68,68,.15) inset;
}

/* ---------- Explanation ---------- */
.explanation{
  margin-top: 10px;
  padding: 10px 12px;
  border:1px dashed #2b3a4a;
  border-radius: 10px;
  color: #cce3f7;
  background: #0d2231;
  font-size: 14px;
}

/* ---------- Index (menu) ---------- */
.menu-container{
  max-width: 900px;
  margin: 40px auto 80px;
  padding: 0 18px;
}
.menu-container h1{
  margin-bottom: 6px;
}
.subtitle{
  color: var(--muted);
  margin: 0 0 24px;
}
.button-group{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin: 6px 0 28px;
}
a.btn{
  text-decoration:none;
  display:inline-block;
}
footer{
  margin-top: 40px;
  color: var(--muted);
  font-size: 14px;
}

/* ---------- Tables / Review (optional) ---------- */
.table{
  width:100%;
  border-collapse: collapse;
  border:1px solid var(--border);
  border-radius: var(--radius);
  overflow:hidden;
}
.table th, .table td{
  padding:10px 12px;
  border-bottom:1px solid var(--border);
}
.table th{ background: #0b2536; text-align:left }

/* ---------- Utilities ---------- */
.hide{ display:none !important }

/* ---------- Responsive ---------- */
@media (max-width: 640px){
  .toolbar{ gap:8px }
  .btn{ padding: 9px 12px; font-size: 14px }
  #score{ padding: 8px 12px; font-size: 14px }
  .card{ padding: 14px 12px }
  .qtext{ font-size: 16px }
}

/* ---------- Print (optional quick export) ---------- */
@media print{
  body{ background:#fff; color:#000 }
  .toolbar, #score, .menu-container .button-group, footer{ display:none }
  .card{ page-break-inside: avoid; border-color:#aaa; box-shadow:none; background:#fff }
  .explanation{ border-color:#bbb; background:#f8f8f8; color:#000 }
}