    /* ============================================================
   Long Multiplication — Per-Game Styles
   /maths/css/longmultiplication.css
   ============================================================ */

:root {
    --primary-color:        #7C5CBF;
    --primary-hover:        #6344A8;
    --primary-light:        rgba(124, 92, 191, 0.10);
    --primary-shadow:       rgba(124, 92, 191, 0.30);
    --btn-text-color:       #fff;
    --hero-gradient-start:  rgba(124, 92, 191, 0.15);
    --hero-gradient-end:    rgba(99, 68, 168, 0.08);
}

/* ===== COLUMN MULTIPLICATION GRID ===== */

.problem-container {
    display: flex;
    justify-content: center;
    overflow-x: auto;
    padding: 1rem 0 0.5rem;
}

.column-multiplication {
    display: inline-block;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    background: #fafafa;
    min-width: 200px;
}

/* ===== GRID ROWS ===== */

.number-row,
.carry-row,
.multiplier-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.number-row { margin-bottom: 2px; }

.multiplier-row {
    border-bottom: 3px solid #212529;
    margin-bottom: 4px;
    padding-bottom: 4px;
}

.final-answer-row {
    border-top: 3px solid #212529;
    margin-top: 4px;
    padding-top: 4px;
}

/* ===== DIGIT CELLS ===== */

.digit-cell,
.carry-cell {
    width: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.carry-cell { height: 40px; }

.number-display {
    font-size: 2.4rem;
    font-weight: 700;
    color: #212529;
    font-family: 'Courier New', monospace;
    line-height: 1;
}

.operator {
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--primary-color);
    font-family: 'Courier New', monospace;
}

/* ===== DIGIT INPUTS (answer boxes) ===== */

.digit-input {
    width: 62px;
    height: 68px;
    font-size: 2.2rem;
    font-weight: 700;
    text-align: center;
    border: 2px 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;
}

/* ===== CARRY INPUTS (small yellow boxes) ===== */

.carry-input {
    width: 38px;
    height: 34px;
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    border: 1.5px dashed #E69A22;
    border-radius: 4px;
    background: rgba(230, 154, 34, 0.10);
    color: #212529;
    font-family: 'Courier New', monospace;
    transition: all 0.2s ease;
    -moz-appearance: textfield;
}

.carry-input::-webkit-outer-spin-button,
.carry-input::-webkit-inner-spin-button { -webkit-appearance: none; }

.carry-input:focus {
    outline: none;
    border-style: solid;
    border-color: #E69A22;
    background: #fff;
}

.carry-input.correct {
    border-color: #28a745;
    border-style: solid;
    background: rgba(40, 167, 69, 0.10);
    color: #28a745;
}

.carry-input.incorrect {
    border-color: #dc3545;
    border-style: solid;
    background: rgba(220, 53, 69, 0.10);
    color: #dc3545;
}

/* ===== FEEDBACK ===== */

.lm-feedback {
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    padding: 0.85rem 1.25rem;
    border-radius: 10px;
    margin: 1rem 0;
    display: none;
}

.lm-feedback.show  { display: block; }

.lm-feedback.success {
    background: rgba(40, 167, 69, 0.10);
    color: #1a6e30;
    border: 1.5px solid #28a745;
}

.lm-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;
    margin-top: 1.25rem;
    flex-wrap: wrap;
}

.lm-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;
}

.lm-btn-primary {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 12px var(--primary-shadow);
}

.lm-btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.lm-btn-secondary {
    background: #fff;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.lm-btn-secondary:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateY(-2px);
}

/* ===== INSTRUCTIONS BOX ===== */

.game-instructions {
    background: rgba(124, 92, 191, 0.06);
    border: 1.5px solid rgba(124, 92, 191, 0.20);
    border-radius: 10px;
    padding: 0.85rem 1.25rem;
    font-size: 0.9rem;
    color: #495057;
    margin-bottom: 1rem;
    text-align: center;
}

/* ===== QUESTION TEXT ===== */

.question-text {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 0.75rem;
    font-family: 'Courier New', monospace;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 600px) {
    .digit-cell, .carry-cell { width: 52px; }
    .digit-input { width: 44px; height: 50px; font-size: 1.6rem; }
    .carry-input { width: 28px; height: 26px; font-size: 0.85rem; }
    .number-display, .operator { font-size: 1.8rem; }
}

@media (max-width: 400px) {
    .digit-cell, .carry-cell { width: 40px; }
    .digit-input { width: 34px; height: 40px; font-size: 1.3rem; }
    .carry-input { width: 22px; height: 20px; font-size: 0.75rem; }
    .number-display, .operator { font-size: 1.4rem; }
}