   /* ============================================================
   Missing Digit Addition — Per-Game Styles
   /maths/css/missingdigitaddition.css
   ============================================================ */

:root {
    --primary-color:        #e74c3c;
    --primary-hover:        #c0392b;
    --primary-light:        rgba(231, 76, 60, 0.10);
    --primary-shadow:       rgba(231, 76, 60, 0.30);
    --btn-text-color:       #fff;
    --hero-gradient-start:  rgba(231, 76, 60, 0.15);
    --hero-gradient-end:    rgba(192, 57, 43, 0.08);
}

/* ===== ADDITION GRID ===== */

.problem-container {
    display: flex;
    justify-content: center;
    overflow-x: auto;
    padding: 1rem 0;
}

.addition-grid {
    display: inline-block;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 1.5rem 2rem;
    background: #fafafa;
}

.grid-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 4px;
}

.answer-row {
    border-top: 3px solid #212529;
    margin-top: 4px;
    padding-top: 4px;
}

/* ===== GRID CELLS ===== */

.grid-cell {
    width: 72px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.digit-display {
    font-size: 2.4rem;
    font-weight: 700;
    color: #212529;
    font-family: 'Courier New', monospace;
}

.operator {
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--primary-color);
    font-family: 'Courier New', monospace;
}

/* ===== DIGIT INPUTS ===== */

.digit-input {
    width: 62px;
    height: 68px;
    font-size: 2.2rem;
    font-weight: 700;
    text-align: center;
    border: 2.5px solid var(--primary-color);
    border-radius: 8px;
    background: var(--primary-light);
    color: #212529;
    font-family: 'Courier New', monospace;
    transition: all 0.2s ease;
    -moz-appearance: textfield;
}

.digit-input::-webkit-outer-spin-button,
.digit-input::-webkit-inner-spin-button { -webkit-appearance: none; }

.digit-input:focus {
    outline: none;
    border-color: var(--primary-hover);
    background: #fff;
    box-shadow: 0 0 0 3px var(--primary-shadow);
}

.digit-input.correct {
    border-color: #28a745;
    background: rgba(40,167,69,0.10);
    color: #28a745;
}

.digit-input.incorrect {
    border-color: #dc3545;
    background: rgba(220,53,69,0.10);
    color: #dc3545;
}

/* ===== QUESTION TEXT ===== */

.question-text {
    text-align: center;
    font-size: 1.15rem;
    font-weight: 600;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

/* ===== FEEDBACK ===== */

.feedback {
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    padding: 0.85rem 1.25rem;
    border-radius: 10px;
    margin: 1rem 0;
}

.feedback.success {
    background: rgba(40,167,69,0.10);
    color: #1a6e30;
    border: 1.5px solid #28a745;
}

.feedback.error {
    background: rgba(220,53,69,0.08);
    color: #842029;
    border: 1.5px solid #dc3545;
}

/* ===== GAME CONTROLS ===== */

.game-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.25rem;
}

.mda-btn {
    padding: 0.8rem 1.75rem;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.mda-btn-primary {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 12px var(--primary-shadow);
}

.mda-btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.mda-btn-secondary {
    background: #fff;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.mda-btn-secondary:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateY(-2px);
}

/* ===== NEXT BUTTON ===== */

.next-btn-wrap {
    text-align: center;
    margin-top: 1.25rem;
    display: none;
}

.next-btn-wrap.show { display: block; }

/* ===== RESPONSIVE ===== */

@media (max-width: 600px) {
    .grid-cell  { width: 54px; height: 62px; }
    .digit-input { width: 46px; height: 52px; font-size: 1.7rem; }
    .digit-display, .operator { font-size: 1.9rem; }
}

@media (max-width: 400px) {
    .grid-cell  { width: 42px; height: 48px; }
    .digit-input { width: 36px; height: 42px; font-size: 1.4rem; }
    .digit-display, .operator { font-size: 1.5rem; }
}