/* ── Fractions game layout ── */

#game-fractions {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

#fractions-progress {
  font-size: 0.9rem;
  color: #666;
  font-weight: 600;
  text-align: center;
  width: 100%;
}

/* ── Arena: two fractions + symbol ── */
#fractions-arena {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 32px 16px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
  width: 100%;
  min-height: 160px;
}

/* ── Individual fraction display ── */
.fraction-display {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  font-weight: 800;
  color: #334;
  line-height: 1;
  gap: 4px;
  min-width: 70px;
}

.frac-numerator,
.frac-denominator {
  font-size: clamp(2rem, 10vw, 3.2rem);
  line-height: 1;
}

.frac-bar {
  display: block;
  width: 100%;
  min-width: 50px;
  height: 4px;
  background: #334;
  border-radius: 2px;
}

/* ── Compare result symbol (shown between fractions after answer) ── */
.compare-result {
  font-size: clamp(1.8rem, 8vw, 2.8rem);
  font-weight: 900;
  color: #bbb;
  min-width: 36px;
  text-align: center;
  line-height: 1;
  transition: color 0.2s;
}

.result-correct {
  color: var(--color-found);
}

.result-wrong {
  color: var(--color-miss);
}

/* ── Answer buttons ── */
#fractions-buttons {
  display: flex;
  gap: 12px;
  width: 100%;
  justify-content: center;
}

.cmp-btn {
  flex: 1;
  max-width: 110px;
  padding: 18px 8px;
  font-size: clamp(1.4rem, 6vw, 2rem);
  font-weight: 900;
  border: 3px solid #c8ddf5;
  border-radius: 12px;
  background: #f0f6ff;
  cursor: pointer;
  color: #334;
  transition: all 0.12s;
  line-height: 1;
}

.cmp-btn:active:not(:disabled) {
  transform: scale(0.93);
  filter: brightness(0.88);
}

@media (hover: hover) {
  .cmp-btn:hover:not(:disabled) {
    background: #4a90e2;
    border-color: #4a90e2;
    color: white;
  }
}

.cmp-btn.cmp-correct {
  background: var(--color-found);
  border-color: var(--color-found);
  color: white;
}

.cmp-btn.cmp-wrong {
  background: var(--color-miss);
  border-color: var(--color-miss);
  color: white;
}

.cmp-btn:disabled {
  cursor: not-allowed;
  opacity: 0.85;
}

/* ── Feedback bar ── */
.frac-feedback {
  width: 100%;
  padding: 10px 16px;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
}

.frac-feedback.correct {
  background: #e8f5e9;
  color: #2e7d32;
}

.frac-feedback.wrong {
  background: #fdecea;
  color: #c62828;
}
