/* ===== LAYOUT PRINCIPAL ===== */
.exercise-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
    margin: 30px auto;
}

/* ===== STÂNGA: adunare orizontală ===== */
.left-side {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Baloo 2', cursive;
}

.hor-num {
    font-size: 2.2rem;
    font-weight: 700;
    color: #21242c;
}

.hor-op {
    font-size: 2.2rem;
    font-weight: 700;
    color: #21242c;
}

.hor-input {
    width: 70px;
    height: 56px;
    font-size: 2rem;
    font-family: 'Baloo 2', cursive;
    font-weight: 700;
    text-align: center;
    border: 2.5px solid #aab4c8;
    border-radius: 12px;
    background: #fff;
    color: #21242c;
    outline: none;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.hor-input:focus {
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74,144,226,0.2);
    background: #f0f7ff;
}

.hor-input.ok {
    border-color: #27ae60 !important;
    background: #eafaf1 !important;
    color: #27ae60 !important;
}

.hor-input.err {
    border-color: #e74c3c !important;
    background: #fdf0ef !important;
    color: #e74c3c !important;
}

/* ===== DREAPTA: grila în coloană ===== */
.right-side {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.col-table {
    border-collapse: separate;
    border-spacing: 6px;
}

.col-table td {
    padding: 0;
    vertical-align: middle;
    text-align: center;
}

/* Casetele de input */
.box {
    width: 58px;
    height: 58px;
    font-size: 2rem;
    font-family: 'Baloo 2', cursive;
    font-weight: 700;
    text-align: center;
    border: 2.5px solid #aab4c8;
    border-radius: 12px;
    background: #fff;
    color: #21242c;
    outline: none;
    cursor: text;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
    -moz-appearance: textfield;
}

.box:focus {
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74,144,226,0.2);
    background: #f0f7ff;
}

/* Casetele rezultat (coloană) */
.box-result {
    border-style: dashed;
    background: #f8f9fa;
}

.box-result.result-active {
    border-style: solid;
    border-color: #9b59b6;
    background: #fdf8ff;
}

.box-result.result-active:focus {
    border-color: #8e44ad;
    box-shadow: 0 0 0 3px rgba(155,89,182,0.2);
}

/* Stări corecte / greșite */
.box.ok {
    border-color: #27ae60 !important;
    border-style: solid !important;
    background: #eafaf1 !important;
    color: #27ae60 !important;
}

.box.err {
    border-color: #e74c3c !important;
    border-style: solid !important;
    background: #fdf0ef !important;
    color: #e74c3c !important;
    animation: shake 0.3s ease;
}

.box:disabled {
    cursor: default;
}

.box[readonly] {
    background: white;
    opacity: 1;
    cursor: default;
    color: #2d3748;
    border-color: #b0b8c9;
}



/* Caseta activa curenta */
.box-active {
    border-color: #4a90e2 !important;
    box-shadow: 0 0 0 3px rgba(74,144,226,0.25) !important;
    background: #f0f7ff !important;
}

/* Semnul + în dreapta grilei */
.plus-col {
    font-size: 2rem;
    font-weight: 700;
    color: #21242c;
    padding-left: 10px !important;
    vertical-align: middle;
}

/* Linia orizontală */
.line-row td { padding: 2px 0 !important; }
.h-line {
    border-bottom: 3px solid #21242c;
    margin: 4px 0;
}

/* ===== FEEDBACK ===== */
#feedback {
    font-size: 1.6rem;
    font-weight: 700;
    color: #27ae60;
    text-align: center;
    margin: 16px 0 8px;
    display: none;
}

/* ===== BUTON URMĂTOR ===== */
#btn-next {
    display: none;
    margin: 0 auto 20px;
    font-size: 1.2rem;
    font-family: 'Baloo 2', cursive;
    font-weight: 700;
    padding: 14px 32px;
    background: #4a90e2;
    color: #fff;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

#btn-next:hover { background: #357abd; }

/* ===== PROGRES ===== */
#progress {
    text-align: center;
    font-size: 1.1rem;
    color: #7f8c8d;
    margin-bottom: 10px;
}

/* ===== FINAL ===== */
#final-message {
    text-align: center;
    padding: 40px 20px;
}

#final-message h1 { font-size: 2.2rem; color: #21242c; }
#final-message h2 { font-size: 1.4rem; color: #5d2d5d; margin: 16px 0 30px; }

.btn-start {
    font-size: 1.3rem;
    font-family: 'Baloo 2', cursive;
    font-weight: 700;
    padding: 16px 36px;
    background: #4a90e2;
    color: #fff;
    border: none;
    border-radius: 14px;
    cursor: pointer;
}

.btn-start:hover { background: #357abd; }

/* ===== ANIMAȚIE ===== */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25%       { transform: translateX(-4px); }
    75%       { transform: translateX(4px); }
}

/* ===== INDICAȚII ===== */
.indicatii {
    background: #f0f7ff;
    border: 2px solid #c3daf7;
    border-radius: 16px;
    padding: 20px 28px;
    margin: 0 auto 24px;
    max-width: 420px;
    text-align: left;
}

.indicatii-titlu {
    font-size: 1.2rem;
    font-family: 'Baloo 2', cursive;
    font-weight: 700;
    color: #2c5f9e;
    margin: 0 0 12px;
}

.indicatii-lista {
    list-style: none;
    padding: 0;
    margin: 0;
}

.indicatii-lista li {
    font-size: 1.05rem;
    font-family: 'Baloo 2', cursive;
    color: #21242c;
    padding: 5px 0 5px 28px;
    position: relative;
}

.indicatii-lista li::before {
    content: "✅";
    position: absolute;
    left: 0;
}