/* Primary6.css — extends Primary5 base with Year 6 components */
body { background-color: #eef2f7; font-family: 'Nunito', 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: #f5f3ff; border-radius: 16px; padding: 18px; width: 100%; }
.answer { font-family: 'Nunito', sans-serif; padding: 15px; max-width: 500px; 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: 'Nunito', sans-serif; font-size: 22px; font-weight: 700; width: 80px; padding: 10px; border: 2px solid #a78bfa; border-radius: 12px; text-align: center; outline: none; transition: border-color 0.2s; }
.number-input:focus { border-color: #7c3aed; }
.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 #a78bfa; border-radius: 12px; text-align: center; outline: none; transition: border-color 0.2s; }
.text-input:focus { border-color: #7c3aed; }

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

.vertical-equation { background: #f5f3ff; border-radius: 16px; padding: 20px 28px; font-size: 26px; font-weight: 900; color: #1e1b4b; display: inline-flex; flex-direction: column; align-items: flex-end; gap: 4px; margin-bottom: 22px; min-width: 140px; }
.vertical-equation .v-row { display: flex; align-items: center; gap: 10px; }
.vertical-equation .v-line { border-top: 3px solid #1e1b4b; width: 100%; margin: 4px 0; }
.vertical-equation .v-op { color: #7c3aed; font-size: 28px; margin-right: 6px; }

.word-problem { background: #eff6ff; border-left: 4px solid #2563eb; border-radius: 12px; padding: 16px 20px; font-size: 17px; color: #1e3a5f; margin-bottom: 20px; line-height: 1.6; width: 100%; text-align: left; }

.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 #a78bfa; background: #f5f3ff; color: #4c1d95; cursor: pointer; transition: background 0.15s, transform 0.15s; }
.option-btn:hover { background: #ede9fe; transform: translateY(-2px); }
.option-btn.selected { background: #7c3aed; color: #fff; border-color: #7c3aed; }

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

.roman-display { background: #f5f3ff; border-radius: 16px; padding: 20px; font-size: 28px; font-weight: 900; color: #4f46e5; text-align: center; margin-bottom: 20px; letter-spacing: 4px; width: 100%; }
.money-display { background: #f0ead8; border-radius: 16px; padding: 20px; font-size: 26px; font-weight: 900; color: #b45309; text-align: center; margin-bottom: 20px; width: 100%; }

/* Year 6 additions */
.large-number { background: #f5f3ff; border-radius: 16px; padding: 24px; font-size: 32px; font-weight: 900; color: #1e1b4b; text-align: center; margin-bottom: 20px; letter-spacing: 2px; width: 100%; }
.number-words { background: #f5f3ff; border-radius: 16px; padding: 20px; font-size: 18px; font-weight: 700; color: #1e1b4b; text-align: center; margin-bottom: 20px; width: 100%; line-height: 1.5; }

/* Shapes (geometry questions) */
.shape-display { background: #f5f3ff; 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, tally, etc.) */
table { border-collapse: collapse; width: 100%; margin: 0 auto 20px; max-width: 460px; background: #f5f3ff; border-radius: 12px; overflow: hidden; }
th, td { padding: 10px 12px; text-align: center; font-size: 16px; }
th { background: #7c3aed; color: #fff; font-weight: 800; }
td { border-top: 1px solid #ede9fe; color: #1e1b4b; font-weight: 700; }
tr:nth-child(even) td { background: rgba(255,255,255,0.4); }

/* Bar charts (statistics) */
.bar-chart { background: #f5f3ff; border-radius: 16px; padding: 20px; margin-bottom: 20px; width: 100%; }
.bar-chart .bar-row { display: flex; align-items: center; gap: 10px; margin: 6px 0; font-weight: 700; color: #1e1b4b; }
.bar-chart .bar-label { width: 80px; font-size: 14px; }
.bar-chart .bar-fill { height: 22px; background: linear-gradient(90deg, #7c3aed, #a78bfa); border-radius: 6px; }
.bar-chart .bar-value { font-size: 14px; }

/* Pictogram */
.pictogram { background: #f5f3ff; border-radius: 16px; padding: 20px; margin-bottom: 20px; width: 100%; }
.pictogram .picto-row { display: flex; align-items: center; gap: 8px; margin: 6px 0; }
.pictogram .picto-label { width: 90px; font-weight: 700; color: #1e1b4b; font-size: 14px; }
.pictogram .picto-icons { font-size: 22px; letter-spacing: 4px; }

/* Pie chart key */
.pie-key { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 10px; }
.pie-key .key-item { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: #1e1b4b; }
.pie-key .key-swatch { width: 14px; height: 14px; border-radius: 4px; }

/* Operator buttons (>, <, =) */
.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 #a78bfa; background: #f5f3ff; color: #4c1d95; cursor: pointer; transition: all 0.15s; }
.sign-btn:hover { background: #ede9fe; transform: translateY(-2px); }
.sign-btn.selected { background: #7c3aed; color: #fff; border-color: #7c3aed; }

/* Multi-choice grid (for word answers, fraction options, etc.) */
.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-cell { font-family: 'Nunito', sans-serif; font-size: 17px; font-weight: 700; padding: 14px 12px; border-radius: 12px; border: 2px solid #a78bfa; background: #f5f3ff; color: #4c1d95; cursor: pointer; text-align: center; transition: all 0.15s; }
.choice-cell:hover { background: #ede9fe; transform: translateY(-2px); }
.choice-cell.selected { background: #7c3aed; color: #fff; border-color: #7c3aed; }
@media (max-width: 480px) {
  .choice-grid, .choice-grid.cols-3, .choice-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
}

/* Hint chip (e.g. "Round to the nearest 10") */
.hint-chip { display: inline-block; background: #ddd6fe; color: #5b21b6; font-size: 13px; font-weight: 800; padding: 6px 14px; border-radius: 999px; margin-bottom: 12px; letter-spacing: 0.3px; }
