:root {
  --bg: #0d0f14; --surface: #13161e; --surface2: #1a1e2a; --border: #252a38;
  --accent: #4fffb0; --accent2: #ff6b6b; --accent3: #ffd166; --accent4: #74b9ff;
  --text: #e8eaf0; --text-dim: #8890a4; --text-faint: #4a5068;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  background: var(--bg); color: var(--text);
  font-family: 'Literata', Georgia, serif; font-size: 16px; line-height: 1.6;
  min-height: 100vh;
}
.mono { font-family: 'IBM Plex Mono', monospace; }
header {
  background: var(--surface); border-bottom: 1px solid var(--border);
  padding: 1.4rem 2rem; position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  backdrop-filter: blur(12px);
}
header h1 {
  font-family: 'Syne', sans-serif; font-size: 1.4rem; font-weight: 800;
  letter-spacing: -0.02em;
}
.eyebrow {
  font-family: 'IBM Plex Mono', monospace; font-size: 0.68rem;
  letter-spacing: 0.15em; text-transform: uppercase; color: var(--accent);
}
#timer {
  font-family: 'IBM Plex Mono', monospace; font-size: 1.3rem; font-weight: 500;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 8px; padding: 0.4rem 0.9rem; color: var(--accent3);
}
#timer.danger { color: var(--accent2); border-color: var(--accent2); }
main { max-width: 820px; margin: 0 auto; padding: 2rem 1.5rem 4rem; }
.hidden { display: none !important; }

.btn {
  font-family: 'Syne', sans-serif; font-weight: 600; font-size: 0.95rem;
  background: var(--accent); color: #06241a; border: none; border-radius: 8px;
  padding: 0.7rem 1.4rem; cursor: pointer; transition: transform .1s, opacity .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.btn.secondary { background: var(--surface2); color: var(--text); border: 1px solid var(--border); }
.btn.danger { background: transparent; color: var(--accent2); border: 1px solid var(--accent2); }
.btn.ghost { background: transparent; color: var(--accent4); border: 1px solid var(--border); }

.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1.5rem 0; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 1.6rem; cursor: pointer; transition: border-color .2s;
}
.card:hover { border-color: var(--accent); }
.card h3 { font-family: 'Syne', sans-serif; font-size: 1.2rem; margin-bottom: .4rem; }
.card p { color: var(--text-dim); font-size: .9rem; }
.card .tag { font-family: 'IBM Plex Mono', monospace; font-size: .68rem; color: var(--accent3); }

.qbox {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 1.6rem; margin-bottom: 1.2rem;
}
.qmeta { display: flex; gap: .6rem; align-items: center; margin-bottom: .8rem; flex-wrap: wrap; }
.badge {
  font-family: 'IBM Plex Mono', monospace; font-size: .66rem; padding: .18rem .55rem;
  border-radius: 4px; background: var(--surface2); border: 1px solid var(--border);
  color: var(--accent4);
}
.qprompt { font-size: 1.05rem; margin-bottom: 1rem; line-height: 1.5; }
textarea {
  width: 100%; min-height: 90px; background: var(--bg); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px; padding: .8rem;
  font-family: 'Literata', serif; font-size: .95rem; resize: vertical;
}
textarea:focus { outline: none; border-color: var(--accent); }
.qactions { display: flex; gap: .6rem; margin-top: .8rem; flex-wrap: wrap; align-items: center; }
.hint {
  background: rgba(255,209,102,.07); border-left: 3px solid var(--accent3);
  border-radius: 6px; padding: .7rem 1rem; margin-top: .8rem; font-size: .88rem;
  color: #ffe3a0;
}
.feedback { border-radius: 6px; padding: .7rem 1rem; margin-top: .8rem; font-size: .88rem; }
.v-correcto { background: rgba(79,255,176,.08); border-left: 3px solid var(--accent); color: #9effd6; }
.v-parcial { background: rgba(255,209,102,.08); border-left: 3px solid var(--accent3); color: #ffe3a0; }
.v-incorrecto { background: rgba(255,107,107,.08); border-left: 3px solid var(--accent2); color: #ffb3b3; }

.scoreboard { display: flex; gap: 1rem; flex-wrap: wrap; margin: 1rem 0 2rem; }
.score-cell {
  flex: 1; min-width: 140px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 1.2rem; text-align: center;
}
.score-cell .big { font-family: 'Syne', sans-serif; font-size: 2rem; font-weight: 800; color: var(--accent); }
.score-cell .lbl { font-family: 'IBM Plex Mono', monospace; font-size: .66rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: .1em; }
.score-cell.total .big { color: var(--accent3); }

table { width: 100%; border-collapse: collapse; font-size: .85rem; }
th, td { text-align: left; padding: .6rem .5rem; border-bottom: 1px solid var(--border); }
th { font-family: 'IBM Plex Mono', monospace; font-size: .66rem; text-transform: uppercase; color: var(--text-faint); letter-spacing: .1em; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: var(--surface2); }
.pill { font-family: 'IBM Plex Mono', monospace; font-size: .64rem; padding: .12rem .5rem; border-radius: 20px; }
.pill.examen { background: rgba(116,185,255,.12); color: var(--accent4); }
.pill.entrenador { background: rgba(79,255,176,.12); color: var(--accent); }
.toolbar { display: flex; gap: .6rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
h2.section { font-family: 'Syne', sans-serif; font-size: 1.5rem; margin-bottom: 1rem; }
.muted { color: var(--text-dim); font-size: .9rem; }
.warn-banner { background: rgba(255,107,107,.08); border:1px solid var(--accent2); color:#ffb3b3; border-radius:8px; padding:.6rem 1rem; margin-bottom:1rem; font-size:.85rem; }

/* --- Multiple Choice Option Cards --- */
.option-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin: 1rem 0;
}
.option-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: 'Literata', serif;
  font-size: 0.95rem;
  user-select: none;
}
.option-card:hover:not(.disabled) {
  border-color: var(--accent4);
  background: var(--surface2);
  transform: translateX(4px);
}
.option-card.selected {
  border-color: var(--accent);
  background: rgba(79, 255, 176, 0.05);
  box-shadow: 0 0 12px rgba(79, 255, 176, 0.08);
}
.option-card.selected .option-letter {
  background: var(--accent);
  color: #06241a;
  border-color: var(--accent);
}
.option-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--border);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dim);
  flex-shrink: 0;
  transition: all 0.2s;
}
.option-card.disabled {
  cursor: not-allowed;
  opacity: 0.65;
}
.option-text {
  color: var(--text);
  line-height: 1.4;
}

/* MathJax custom tweaks for spacing */
.MathJax {
  outline: none;
}

