* { box-sizing: border-box; }
body {
  font-family: -apple-system, system-ui, sans-serif;
  background: #1a1a2e; color: #eaeaea;
  margin: 0; padding: 1rem;
}
main { max-width: 480px; margin: 0 auto; }
h1 { color: #e94560; }
a { color: #e94560; }
input, button {
  font-size: 1.1rem; padding: .7rem 1rem; border-radius: .5rem;
  border: 1px solid #444; background: #16213e; color: #eaeaea; width: 100%;
  margin-top: .5rem;
}
button { cursor: pointer; }
button.big { background: #e94560; border: none; font-weight: 600; }
a.big {
  display: block; text-align: center; background: #e94560; color: #fff;
  padding: .9rem; border-radius: .5rem; text-decoration: none; font-weight: 600;
  margin: 1rem 0;
}
table { width: 100%; border-collapse: collapse; margin-top: 1rem; }
th, td { text-align: left; padding: .45rem .3rem; border-bottom: 1px solid #333; }
.error { color: #ff6b6b; }
.topic { color: #888; font-size: .85rem; margin-bottom: .3rem; }
.front, .back { font-size: 1.4rem; line-height: 1.5; white-space: pre-line; margin: 1rem 0; }
.grades { display: flex; gap: .5rem; }
.grades form { flex: 1; }
button.grade { width: 100%; }
button.g1 { background: #7a2b2b; } button.g2 { background: #7a5a2b; }
button.g3 { background: #2b7a3f; } button.g4 { background: #2b5a7a; }
.options form { margin: 0; }
button.option { text-align: left; }
.correct { color: #6bde8a; } .wrong { color: #ff6b6b; }
button.tutor { background: none; border: 1px dashed #555; margin-top: 1.5rem; font-size: .9rem; }
nav { display: flex; justify-content: space-between; margin-bottom: 1rem; }
header { display: flex; justify-content: space-between; align-items: center; }
header form { width: auto; } header button { width: auto; margin: 0; }
.done { font-size: 1.3rem; text-align: center; margin-top: 3rem; }
