:root {
  --bg: #e8f3ff;
  --card: #ffffff;
  --blue: #0f6fff;
  --lightblue: #38bdf8;
  --red: #dc2626;
}
body {
  margin: 0;
  background: var(--bg);
  font-family: "Tajawal", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #002244;
  text-align: center;
  padding-bottom: 100px;
}
.topbar { padding: 0.8rem 0.5rem 0.3rem; }
.main-title { margin: 0; font-size: 30px; color: var(--blue); font-weight: 700; }
.unit-title { margin: 0.2rem 0 0; color: var(--red); font-weight: 700; font-size: 1.05rem; }
.hint { margin: 0.25rem 0 0.4rem; color: #0f172a; font-weight: 500; }
.author { margin: 0.2rem 0 0.6rem; color: #0f172a; font-size: 0.85rem; direction: ltr; }

.controls {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  justify-content: center;
  margin: 0.6rem auto 0.8rem;
  max-width: 1100px;
}
.btn-random, .btn-repeat, .btn-test, .score-pill {
  border-radius: 1.4rem;
  padding: 0.45rem 1.2rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}
.btn-random, .btn-repeat {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 6px 20px rgba(15,23,42,.06);
}
.btn-test {
  background: #f97316;
  color: #fff;
  box-shadow: 0 6px 20px rgba(15,23,42,.12);
}
.score-pill {
  background: #16a34a;
  color: #fff;
  box-shadow: 0 6px 20px rgba(15,23,42,.12);
  min-width: 120px;
}

.words-wrap { max-width: 500px; margin: 0 auto; }
.word { background: var(--card); border-radius: 1rem; margin: 0.45rem auto; padding: 0.55rem 0.5rem 0.7rem; box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06); }
.word .en { display: flex; gap: 0.45rem; justify-content: center; align-items: center; }
.word .num { color: var(--lightblue); font-weight: 700; font-size: 1.05rem; }
.word .en-text { font-weight: 700; font-size: 1.7rem; color: #0f3b8f; }
.word .ar { font-size: 1.02rem; margin-top: 0.35rem; }

.input-word {
  width: 100%;
  margin-top: 0.4rem;
  padding: 0.35rem 0.5rem;
  border-radius: 0.6rem;
  border: 1px solid #cbd5f5;
  direction: ltr;
}

.correct-answer {
  margin-top: 0.35rem;
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--red);
}

.bottom-nav {
  position: fixed;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: #ffffffd9;
  display: flex;
  gap: 1rem;
  align-items: center;
  padding: 0.4rem 1.3rem;
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(0,0,0,.15);
}
.nav-btn { background: #0f6fff; color: #fff; border: none; padding: 0.35rem 0.8rem; border-radius: 999px; font-weight: 600; }
.page-info { font-weight: 600; }

@media (max-width: 600px) {
  .word .en-text { font-size: 1.8rem; }
  .correct-answer { font-size: 1.7rem; }
  .bottom-nav { width: calc(100% - 20px); justify-content: space-between; }
}
