/* Year8.css — Year 8 Maths (UK KS3), teal theme */
body { background-color: #ecfdf5; font-family: 'Nunito', sans-serif; margin: 0; padding: 0; }
#feedback { font-size: 18px; text-align: center; font-weight: 800; margin-top: 14px; min-height: 22px; }
#feedback.correct { color: #0f766e; }
#feedback.wrong { color: #e11d48; }
.image-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 20px; background: #f0fdfa; border-radius: 16px; padding: 18px; width: 100%; }
.answer { font-family: 'Nunito', sans-serif; padding: 15px; max-width: 520px; margin: auto; display: flex; flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 14px; }
#score { margin-top: 15px; font-weight: 800; text-align: center; color: #134e4a; }

.number-input { font-family: 'Nunito', sans-serif; font-size: 22px; font-weight: 700; width: 80px; padding: 10px; border: 2px solid #5eead4; border-radius: 12px; text-align: center; outline: none; transition: border-color 0.2s, box-shadow 0.2s; background: #fff; }
.number-input:focus { border-color: #0f766e; box-shadow: 0 0 0 3px rgba(15,118,110,0.15); }
.number-input.wide { width: 160px; }
.number-input.extra-wide { width: 220px; }
.text-input { font-family: 'Nunito', sans-serif; font-size: 18px; font-weight: 700; width: 280px; padding: 10px; border: 2px solid #5eead4; border-radius: 12px; text-align: center; outline: none; transition: border-color 0.2s, box-shadow 0.2s; background: #fff; }
.text-input:focus { border-color: #0f766e; box-shadow: 0 0 0 3px rgba(15,118,110,0.15); }

.equation-box { background: #f0fdfa; border-radius: 16px; padding: 20px 28px; font-size: 26px; font-weight: 900; color: #134e4a; display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 22px; flex-wrap: wrap; width: 100%; box-shadow: inset 0 0 0 1px #ccfbf1; }
.equation-box.large { font-size: 32px; }

.word-problem { background: #f0fdfa; border-left: 5px solid #0f766e; border-radius: 12px; padding: 16px 20px; font-size: 17px; color: #134e4a; margin-bottom: 20px; line-height: 1.6; width: 100%; text-align: left; box-shadow: 0 2px 8px rgba(15,118,110,0.08); }

.option-buttons { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; width: 100%; }
.option-btn { font-family: 'Nunito', sans-serif; font-size: 18px; font-weight: 700; padding: 12px 24px; border-radius: 12px; border: 2px solid #5eead4; background: #f0fdfa; color: #134e4a; cursor: pointer; transition: background 0.15s, transform 0.15s; }
.option-btn:hover { background: #ccfbf1; transform: translateY(-2px); }
.option-btn.selected { background: #0f766e; color: #fff; border-color: #0f766e; }

.fraction { display: inline-flex; flex-direction: column; align-items: center; font-size: 22px; font-weight: 900; color: #134e4a; line-height: 1.1; padding: 0 6px; }
.fraction.large { font-size: 30px; }
.fraction .frac-num { border-bottom: 2px solid #134e4a; padding-bottom: 2px; padding-left: 6px; padding-right: 6px; min-width: 24px; text-align: center; }
.fraction .frac-den { padding-top: 2px; text-align: center; }

.mixed-fraction { display: inline-flex; align-items: center; gap: 4px; font-size: 22px; font-weight: 900; color: #134e4a; }
.mixed-fraction .whole-part { font-size: 26px; }

.large-number { background: #f0fdfa; border-radius: 16px; padding: 24px; font-size: 32px; font-weight: 900; color: #134e4a; text-align: center; margin-bottom: 20px; letter-spacing: 2px; width: 100%; box-shadow: inset 0 0 0 1px #ccfbf1; }

/* Shapes (geometry / diagram questions) */
.shape-display { background: #f0fdfa; border-radius: 16px; padding: 22px; margin-bottom: 20px; width: 100%; display: flex; justify-content: center; align-items: center; box-shadow: inset 0 0 0 1px #ccfbf1; }
.shape-display svg { max-width: 100%; height: auto; }

/* Tables (frequency, data sets, timetables) */
table { border-collapse: collapse; width: 100%; margin: 0 auto 20px; max-width: 460px; background: #f0fdfa; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 8px rgba(15,118,110,0.08); }
th, td { padding: 10px 12px; text-align: center; font-size: 16px; }
th { background: #0f766e; color: #fff; font-weight: 800; }
td { border-top: 1px solid #ccfbf1; color: #134e4a; font-weight: 700; }
tr:nth-child(even) td { background: rgba(255,255,255,0.6); }

/* Operator buttons (>, <, =) — legacy, kept for compatibility */
.sign-buttons { display: flex; justify-content: center; gap: 14px; margin: 14px 0 8px; flex-wrap: wrap; }
.sign-btn { font-family: 'Nunito', sans-serif; font-size: 24px; font-weight: 900; padding: 12px 24px; min-width: 70px; border-radius: 14px; border: 3px solid #5eead4; background: #f0fdfa; color: #134e4a; cursor: pointer; transition: all 0.15s; }
.sign-btn:hover { background: #ccfbf1; transform: translateY(-2px); }
.sign-btn.selected { background: #0f766e; color: #fff; border-color: #0f766e; }

/* Multi-choice grid — used by every question now */
.choice-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 16px; width: 100%; }
.choice-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.choice-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.choice-grid.cols-5 { grid-template-columns: repeat(5, 1fr); }
.choice-cell { font-family: 'Nunito', sans-serif; font-size: 17px; font-weight: 700; padding: 14px 12px; border-radius: 12px; border: 2px solid #5eead4; background: #fff; color: #134e4a; cursor: pointer; text-align: center; transition: background 0.15s, transform 0.15s, box-shadow 0.15s; box-shadow: 0 1px 3px rgba(15,118,110,0.08); }
.choice-cell:hover { background: #f0fdfa; transform: translateY(-2px); box-shadow: 0 4px 10px rgba(15,118,110,0.15); }
.choice-cell.selected { background: #0f766e; color: #fff; border-color: #0f766e; box-shadow: 0 4px 10px rgba(15,118,110,0.3); }
@media (max-width: 480px) {
  .choice-grid, .choice-grid.cols-3, .choice-grid.cols-4, .choice-grid.cols-5 { grid-template-columns: repeat(2, 1fr); }
}

/* Hint chip */
.hint-chip { display: inline-block; background: #ccfbf1; color: #134e4a; font-size: 13px; font-weight: 800; padding: 6px 14px; border-radius: 999px; margin-bottom: 12px; letter-spacing: 0.3px; }

/* Submit button */
button { font-family: 'Nunito', sans-serif; }
.display-question > button { display: block; margin: 6px auto 0; background: linear-gradient(135deg,#0f766e,#134e4a); color: #fff; font-size: 17px; font-weight: 800; border: none; padding: 13px 34px; border-radius: 12px; cursor: pointer; box-shadow: 0 4px 12px rgba(15,118,110,0.3); transition: transform 0.15s, box-shadow 0.15s; }
.display-question > button:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(15,118,110,0.4); }
