/* Year9.css — Year 9 Maths, navy/teal theme matching Primary 5's UI */
body { background-color: #eef2f9; font-family: 'DM Sans', sans-serif; margin: 0; padding: 0; }
#feedback { font-size: 18px; text-align: center; font-weight: 700; margin-top: 14px; min-height: 22px; }
.image-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 20px; background: #eaf6f3; border-radius: 16px; padding: 18px; width: 100%; }
.answer { font-family: 'DM Sans', 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: bold; text-align: center; }
.number-input { font-family: 'DM Sans', sans-serif; font-size: 22px; font-weight: 700; width: 90px; padding: 10px; border: 2px solid #a9d6cb; border-radius: 12px; text-align: center; outline: none; transition: border-color 0.2s, box-shadow 0.2s; background: #fff; }
.number-input:focus { border-color: #36a38f; box-shadow: 0 0 0 3px rgba(54,163,143,0.15); }
.number-input.wide { width: 170px; }
.number-input.extra-wide { width: 230px; }
.text-input { font-family: 'DM Sans', sans-serif; font-size: 18px; font-weight: 700; width: 280px; padding: 10px; border: 2px solid #a9d6cb; border-radius: 12px; text-align: center; outline: none; transition: border-color 0.2s, box-shadow 0.2s; background: #fff; }
.text-input:focus { border-color: #36a38f; box-shadow: 0 0 0 3px rgba(54,163,143,0.15); }

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

/* Soft rounded prompt bubble — used for word problems and scenario text */
.word-problem { background: #eaf6f3; border-left: 4px solid #36a38f; border-radius: 12px; padding: 16px 20px; font-size: 17px; color: #0f2557; margin-bottom: 20px; line-height: 1.6; width: 100%; text-align: left; box-shadow: 0 2px 8px rgba(15,37,87,0.06); }

.option-buttons { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; width: 100%; }
.option-btn { font-family: 'DM Sans', sans-serif; font-size: 18px; font-weight: 700; padding: 12px 24px; border-radius: 12px; border: 2px solid #a9d6cb; background: #eaf6f3; color: #0f2557; cursor: pointer; transition: background 0.15s, transform 0.15s; }
.option-btn:hover { background: #d7f0e8; transform: translateY(-2px); }
.option-btn.selected { background: #36a38f; color: #fff; border-color: #36a38f; }

.fraction { display: inline-flex; flex-direction: column; align-items: center; font-size: 22px; font-weight: 900; color: #0f2557; line-height: 1.1; padding: 0 6px; }
.fraction.large { font-size: 30px; }
.fraction .frac-num { border-bottom: 2px solid #0f2557; 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: #0f2557; }
.mixed-fraction .whole-part { font-size: 26px; }

.large-number { background: #eaf6f3; border-radius: 16px; padding: 24px; font-size: 32px; font-weight: 900; color: #0f2557; text-align: center; margin-bottom: 20px; letter-spacing: 2px; width: 100%; }

/* Shapes / diagrams (geometry, trig, graphs) */
.shape-display { background: #eaf6f3; border-radius: 16px; padding: 22px; margin-bottom: 20px; width: 100%; display: flex; justify-content: center; align-items: center; }
.shape-display svg { max-width: 100%; height: auto; }

/* Tables (frequency tables, two-way tables, cumulative frequency) */
table { border-collapse: collapse; width: 100%; margin: 0 auto 20px; max-width: 460px; background: #eaf6f3; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 8px rgba(15,37,87,0.06); }
th, td { padding: 10px 12px; text-align: center; font-size: 15px; }
th { background: #36a38f; color: #fff; font-weight: 800; }
td { border-top: 1px solid #d7f0e8; color: #0f2557; font-weight: 700; }
tr:nth-child(even) td { background: rgba(255,255,255,0.6); }

/* Multi-choice grid */
.choice-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-bottom: 20px; width: 100%; }
.choice-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.choice-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.choice-cell { font-family: 'DM Sans', sans-serif; font-size: 17px; font-weight: 700; padding: 22px 20px; min-height: 24px; border-radius: 14px; border: 2px solid #a9d6cb; background: #fff; color: #0f2557; cursor: pointer; text-align: center; display: flex; align-items: center; justify-content: center; transition: all 0.15s; }
.choice-cell:hover { background: #eaf6f3; transform: translateY(-2px); }
.choice-cell.selected { background: #36a38f; color: #fff; border-color: #36a38f; }
@media (max-width: 480px) {
  .choice-grid, .choice-grid.cols-3, .choice-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
}

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