.audioD {
    max-width: 650px;
    margin: 0 auto;
    margin-top: 15px;
}

.dictant {
    max-width: 800px;
    margin: 20px auto;
    text-align: left;
}

#dictInput {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    line-height: 1.6;
    box-sizing: border-box;
    border-radius: 8px;
    border: 1px solid #ccc;
    resize: vertical;
}

#checkDict {
    margin-top: 10px;
    padding: 8px 18px;
    font-size: 16px;
    border-radius: 8px;
    border: none;
    background: #ff8a00;
    color: #fff;
    cursor: pointer;
}

#checkDict:hover {
    opacity: 0.9;
}

#dictResult {
    margin-left: 12px;
    font-size: 18px;
}

#dictResult.ok {
    color: #1a8b1a;
}

#dictResult.error {
    color: #d11a1a;
}






.plant-listening-task {
    background: #fff;
    padding: 28px;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.plant-question {
    margin-bottom: 24px;
    padding: 22px;

    border: 1px solid #e4e4e4;
    border-radius: 14px;

    background: #fff;
}

.plant-question h3 {
    margin: 0 0 18px;

    font-size: 22px;
    font-weight: 700;

    color: #555;
}

.plant-option {
    display: flex;
    align-items: center;

    gap: 12px;

    margin-bottom: 10px;
    padding: 13px 16px;

    border: 2px solid transparent;
    border-radius: 10px;

    font-size: 18px;
    color: #555;

    cursor: pointer;

    transition: 0.2s;
}

.plant-option:hover {
    background: #fff8ef;
    border-color: #ffb15a;
}

.plant-option input {
    width: 20px;
    height: 20px;

    cursor: pointer;
}

.plant-option.correct {
    background: #e4f8e9;
    border-color: #28a745;
    color: #247a36;
}

.plant-option.wrong {
    background: #fdeaea;
    border-color: #dc3545;
    color: #b02a37;
}

.plant-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;

    margin-top: 12px;
}

#checkPlantQuiz,
#resetPlantQuiz {
    padding: 12px 26px;

    border: none;
    border-radius: 10px;

    font-size: 18px;

    cursor: pointer;
}

#checkPlantQuiz {
    background: #ff8a00;
    color: #fff;
}

#checkPlantQuiz:hover {
    background: #e87900;
}

#resetPlantQuiz {
    background: #e9ecef;
    color: #444;
}

#resetPlantQuiz:hover {
    background: #d8dde2;
}

#plantQuizResult {
    min-height: 32px;

    margin-top: 20px;

    font-size: 21px;
    font-weight: 700;
}

#plantQuizResult.success {
    color: #28a745;
}

#plantQuizResult.error {
    color: #dc3545;
}

@media (max-width: 768px) {

    .plant-question h3 {
        font-size: 19px;
    }

    .plant-option {
        font-size: 16px;
    }

}

.altai-match-task {
    background: #fff;
    padding: 28px;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.altai-match-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.altai-match-row {
    display: grid;
    grid-template-columns: 55px 1fr 130px;
    align-items: center;
    gap: 15px;

    padding: 14px 16px;

    border: 1px solid #ddd;
    border-radius: 10px;

    background: #fff;
}

.altai-number {
    width: 42px;
    height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #ff8a00;
    color: #fff;

    font-size: 19px;
    font-weight: 700;
}

.altai-fact {
    font-size: 20px;
    font-weight: 600;
    color: #555;
}

.altai-select {
    width: 100%;

    padding: 10px;

    border: 2px solid #ccc;
    border-radius: 8px;

    background: #fff;

    font-size: 18px;
    cursor: pointer;
}

.altai-select.correct {
    border-color: #28a745;
    background: #e4f8e9;
}

.altai-select.wrong {
    border-color: #dc3545;
    background: #fdeaea;
}


.altai-information {
    margin-top: 28px;

    padding: 20px;

    background: #f8f9fa;

    border-radius: 12px;
}

.altai-information div {
    padding: 9px 5px;

    font-size: 18px;
    line-height: 1.4;

    color: #555;
}


.altai-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;

    margin-top: 22px;
}

#checkAltaiMatch,
#resetAltaiMatch {
    padding: 12px 25px;

    border: none;
    border-radius: 10px;

    font-size: 18px;

    cursor: pointer;
}

#checkAltaiMatch {
    background: #ff8a00;
    color: #fff;
}

#checkAltaiMatch:hover {
    background: #e87900;
}

#resetAltaiMatch {
    background: #e9ecef;
    color: #444;
}


#altaiMatchResult {
    min-height: 32px;

    margin-top: 20px;

    font-size: 21px;
    font-weight: 700;
}

#altaiMatchResult.success {
    color: #28a745;
}

#altaiMatchResult.error {
    color: #dc3545;
}


@media (max-width: 768px) {

    .altai-match-row {
        grid-template-columns: 45px 1fr;
    }

    .altai-select {
        grid-column: 1 / -1;
    }

    .altai-fact {
        font-size: 17px;
    }

}

.quick-action-task {
    background: #fff;
    padding: 28px;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.quick-top {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;
    margin-bottom: 24px;
}

.quick-instruction {
    font-size: 20px;
    line-height: 1.5;
    color: #555;
}

.quick-timer {
    min-width: 95px;

    padding: 12px 18px;

    border-radius: 14px;

    background: #fff3e5;
    border: 2px solid #ff8a00;

    text-align: center;

    font-size: 28px;
    font-weight: 700;

    color: #e87900;
}


/* Карточкалар */

.quick-actions-list {
    display: grid;

    grid-template-columns: repeat(2, 1fr);

    gap: 15px;
}

.quick-card {
    display: flex;
    align-items: center;

    gap: 15px;

    min-height: 85px;

    padding: 16px 20px;

    border: 2px solid #ddd;
    border-radius: 14px;

    background: #fff;

    color: #555;

    font-family: inherit;
    font-size: 18px;

    text-align: left;

    cursor: pointer;

    transition: 0.2s;
}

.quick-card:hover:not(:disabled) {
    border-color: #ff8a00;
    background: #fff8ee;

    transform: translateY(-2px);
}

.quick-icon {
    flex-shrink: 0;

    font-size: 34px;
}


/* Таңдалды */

.quick-card.selected {
    border-color: #ff8a00;
    background: #fff2df;

    box-shadow: 0 0 0 3px rgba(255, 138, 0, 0.12);
}


/* Дұрыс */

.quick-card.correct {
    border-color: #28a745;
    background: #e3f8e8;

    color: #207a34;

    animation: quickCorrect 0.4s ease;
}

@keyframes quickCorrect {
    0% {
        transform: scale(0.94);
    }

    60% {
        transform: scale(1.04);
    }

    100% {
        transform: scale(1);
    }
}


/* Қате */

.quick-card.wrong {
    border-color: #dc3545;
    background: #fde8e8;

    color: #b02a37;

    animation: quickWrong 0.4s ease;
}

@keyframes quickWrong {

    0%, 100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-7px);
    }

    75% {
        transform: translateX(7px);
    }

}


/* Батырмалар */

.quick-bottom {
    display: flex;

    gap: 12px;

    flex-wrap: wrap;

    margin-top: 22px;
}

#startQuickGame,
#checkQuickGame,
#resetQuickGame {
    padding: 12px 24px;

    border: none;
    border-radius: 10px;

    font-size: 18px;

    cursor: pointer;
}

#startQuickGame {
    background: #2096e8;
    color: #fff;
}

#checkQuickGame {
    background: #ff8a00;
    color: #fff;
}

#resetQuickGame {
    background: #e9ecef;
    color: #444;
}

#checkQuickGame:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}


/* Нәтиже */

#quickGameResult {
    min-height: 36px;

    margin-top: 20px;

    font-size: 21px;
    font-weight: 700;
}

#quickGameResult.success {
    color: #28a745;
}

#quickGameResult.error {
    color: #dc3545;
}


/* Таймер соңғы секундтар */

.quick-timer.warning {
    background: #ffe7e7;
    border-color: #dc3545;
    color: #dc3545;
}


@media (max-width: 768px) {

    .quick-actions-list {
        grid-template-columns: 1fr;
    }

    .quick-top {
        align-items: flex-start;
    }

    .quick-instruction {
        font-size: 17px;
    }

    .quick-card {
        font-size: 16px;
    }

}


.train-word-game {
    background: #fff;
    padding: 28px;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}


/* --------------------------
   Түсіндірме
--------------------------- */

.train-legend {
    display: flex;
    flex-direction: column;
    gap: 10px;

    padding: 18px;
    margin-bottom: 25px;

    background: #f8f9fa;
    border-radius: 12px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;

    font-size: 18px;
    color: #555;
}

.legend-color {
    width: 25px;
    height: 25px;

    border-radius: 50%;
    border: 2px solid #333;

    flex-shrink: 0;
}

.synonym-color {
    background: #19c92b;
}

.antonym-color {
    background: #168bd5;
}

.homonym-color {
    background: #8a68e3;
}


/* --------------------------
   Билеттер
--------------------------- */

.ticket-area {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;

    gap: 12px;

    margin-bottom: 35px;
}

.word-ticket {
    min-width: 210px;

    padding: 13px 17px;

    background: #fff9e8;

    border: 2px dashed #e49a15;
    border-radius: 12px;

    font-size: 17px;
    color: #555;

    cursor: grab;

    box-shadow: 0 3px 8px rgba(0,0,0,0.07);

    transition: 0.2s;
}

.word-ticket:hover {
    transform: translateY(-3px);

    box-shadow: 0 6px 12px rgba(0,0,0,0.12);
}

.word-ticket:active {
    cursor: grabbing;
}


/* Омоним суреттері */

.homonym-ticket {
    min-width: 280px;
}

.ticket-pictures {
    display: flex;
    gap: 12px;

    margin-bottom: 7px;

    font-size: 27px;
}


/* --------------------------
   Пойыз
--------------------------- */

.train-wrapper {
    display: grid;

    grid-template-columns:
        190px
        repeat(3, 1fr);

    gap: 10px;

    align-items: stretch;

    overflow-x: auto;
}


/* Локомотив */

.train-engine {
    min-height: 300px;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    padding: 15px;

    background:
        linear-gradient(
            145deg,
            #ffb900,
            #ff7a00
        );

    border: 4px solid #b75b00;
    border-radius: 40px 15px 15px 20px;

    color: #fff;

    font-size: 19px;
    font-weight: 800;

    text-align: center;

    box-shadow:
        inset 0 0 0 4px rgba(255,255,255,.25),
        0 5px 12px rgba(0,0,0,.12);
}

.engine-icon {
    font-size: 75px;
    margin-bottom: 12px;
}


/* Вагон */

.train-car {
    position: relative;

    min-width: 240px;
    min-height: 300px;

    padding: 18px;

    border-radius: 18px;

    transition: 0.2s;
}

.synonym-car {
    background: #e7fae9;
    border: 4px solid #19b82a;
}

.antonym-car {
    background: #e8f5ff;
    border: 4px solid #168bd5;
}

.homonym-car {
    background: #f0ebff;
    border: 4px solid #8060da;
}

.car-title {
    text-align: center;

    font-size: 23px;
    font-weight: 800;

    margin-bottom: 14px;
}

.car-drop {
    min-height: 205px;

    display: flex;
    flex-direction: column;

    align-items: center;

    gap: 8px;

    padding: 10px;

    color: #999;

    font-size: 14px;
}


/* Дөңгелектер */

.train-wheels {
    position: absolute;

    bottom: -18px;
    left: 0;
    right: 0;

    text-align: center;

    font-size: 30px;

    letter-spacing: 45px;
}


/* Drag кезінде */

.train-car.drag-over {
    transform: translateY(-5px);

    box-shadow:
        0 0 0 5px rgba(255,140,0,.17);
}


/* --------------------------
   Дұрыс билет
--------------------------- */

.word-ticket.correct {
    width: 100%;
    min-width: 0;

    background: #e5f8e9;

    border: 2px solid #28a745;

    color: #247a36;

    text-align: center;

    cursor: default;

    animation: trainCorrect 0.4s ease;
}

@keyframes trainCorrect {

    0% {
        transform: scale(.85);
    }

    60% {
        transform: scale(1.07);
    }

    100% {
        transform: scale(1);
    }

}


/* --------------------------
   Қате билет
--------------------------- */

.word-ticket.wrong {
    background: #fde7e7;

    border-color: #dc3545;

    animation: trainWrong 0.4s;
}

@keyframes trainWrong {

    0%, 100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-8px);
    }

    75% {
        transform: translateX(8px);
    }

}


/* --------------------------
   Хабарлама
--------------------------- */

#trainMessage {
    min-height: 38px;

    margin-top: 35px;

    text-align: center;

    font-size: 21px;
    font-weight: 700;
}

#trainMessage.success {
    color: #28a745;
}

#trainMessage.error {
    color: #dc3545;
}


/* --------------------------
   Reset
--------------------------- */

#resetTrainGame {
    display: block;

    margin: 14px auto 0;

    padding: 12px 25px;

    border: none;
    border-radius: 10px;

    background: #ff8a00;
    color: white;

    font-size: 18px;

    cursor: pointer;
}

#resetTrainGame:hover {
    background: #e87900;
}


/* --------------------------
   Телефон
--------------------------- */

@media (max-width: 900px) {

    .train-wrapper {
        grid-template-columns: 1fr;
    }

    .train-engine {
        min-height: 150px;
    }

    .train-car {
        min-height: 250px;
    }

    .train-wheels {
        display: none;
    }

    .word-ticket {
        width: 100%;
    }

}











