/* ─── Reset ───────────────────── */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ─── Layout ──────────────────── */
body {
  font-family: system-ui, sans-serif;
  text-align: center;
  padding: 2rem;
  background: #17335c;
}

h1 {
  margin-bottom: 1.5rem;
  color: beige;
}

/* ─── Scoreboard & Progress ───── */
#scoreboard {
  color: beige;
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
}
#level, #score {
  margin: 0.3rem 0;
}

#progress-container {
  background: #ccc;
  height: 20px;
  width: 200px;
  border-radius: 10px;
  margin: 0.5rem auto;
  overflow: hidden;
}
#progress-bar {
  background: #2ecc71;
  height: 100%;
  width: 0%;
  transition: width 0.3s;
}

/* ─── Grid layout helpers ─────── */
.grid {
  display: grid;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.grid.three {
  grid-template-columns: 90px auto 90px;
}

.grid.two {
  grid-template-columns: repeat(2, 100px);
  gap: 2rem;
}

/* ─── Generic cell styling ────── */
.cell {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2.5rem;
  width: 80px;
  height: 80px;
  background: #ffffff;
  border-radius: 1rem;
  user-select: none;
  transition: background 0.3s, transform 0.2s;
  box-shadow: 3px 3px 5px rgb(0, 0, 0);
  cursor: pointer;
}

/* ─── Empty grid placeholders ─── */
.cell.empty {
  background: transparent;
  box-shadow: none;
  width: 0;
  height: 0;
  padding: 0;
  margin: 0;
}

/* ─── Answer feedback styles ──── */
.correct {
  background: #2ecc71 !important;
  color: #fff;
}

.wrong {
  background: #e74c3c !important;
  color: #fff;
}

/* Red flash → fade back to beige */
.fade-red {
  animation: fadeRed 1s forwards;
}
@keyframes fadeRed {
  from { background-color: #e74c3c; }
  to   { background-color: beige;   }
}

/* ─── Custom number cells ─────── */
.left-num,
.right-num {
  background: beige;
  width: 90px;
  height: 90px;
  font-size: 4rem;
  border-radius: 20%;
}

/* ─── Plus and Equal signs ────── */
.plus-sign,
.equal-sign {
  background: transparent;
  font-size: 5rem;
  color: beige;
  box-shadow: none;
}

/* ─── Answer buttons ──────────── */
.answer-a,
.answer-b {
  background: beige;
  width: 80px;
  height: 80px;
  font-size: 2.5rem;
  border-radius: 50%;
  transition: transform 0.2s;
}
.answer-a:hover,
.answer-b:hover {
  transform: scale(1.08);
}
