﻿colors {
    --bg-h1: #ce434b;
    --bg-h2: #065fd0;
    --bg-h3: #ce434b;
    --bg-header: #ddf1fe;
    --bg-button: #f7d8da;
}

.quiz-page {
    width: 100%;
    padding: 20px 10px 30px;
}

.quiz-container {
    max-width: 550px;
    margin: auto;
}

.quiz-header {
    text-align: center;
    margin-bottom: 10px;
}

.quiz-title {
    margin: 0 0 6px;
    font-size: 30px;
    color: #065fd0;
    font-weight: 700;
}

.quiz-description {
    margin: 0 auto;
    max-width: 650px;
    color: #ce434b;
    font-size: 15px;
    font-weight: 600;
}


/* Start */

.quiz-start-card,
.quiz-question-card,
.quiz-result-card {
    background: #fff;
    border: 2px solid #ddf1fe;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,.05);
}

.quiz-start-card {
    max-width: 550px;
    margin: auto;
}

.quiz-total {
    text-align: center;
    margin-bottom: 10px;
}

.quiz-error {
    background: #f8d7da;
    color: #842029;
    padding: 8px 12px;
    margin-bottom: 12px;
    border-radius: 6px;
}

.quiz-field {
    margin-bottom: 12px;
}

    .quiz-field label {
        display: block;
        margin-bottom: 4px;
        font-weight: 600;
    }

    .quiz-field select {
        width: 100%;
        padding: 9px 20px;
        border: 2px solid #ddf1fe;
        border-radius: 6px;
        font-size: 15px;
    }

    .quiz-field input[type="text"] {
        width: 100%;
        padding: 9px 10px;
        border: 2px solid #ddf1fe;
        border-radius: 6px;
        font-size: 15px;
        box-sizing: border-box;
        background: #fff;
        color: #222;
    }

        .quiz-field input[type="text"]:focus {
            outline: none;
            border-color: #0d6efd;
            box-shadow: 0 0 0 2px rgba(13, 110, 253, .1);
        }

        .quiz-field input[type="text"]::placeholder {
            color: #999;
        }

.quiz-start-button,
.quiz-next-button,
.quiz-restart-button {
    border: 0;
    border-radius: 6px;
    padding: 9px 18px;
    background: #0d6efd;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.quiz-start-button {
    width: 100%;
}

    .quiz-start-button:hover,
    .quiz-next-button:hover,
    .quiz-restart-button:hover {
        background: #0b5ed7;
    }


/* Question */

.quiz-progress {
    text-align: center;
    color: #065fd0;
    font-size: 14px;
    margin-bottom: 8px;
}

.quiz-question {
    text-align: left;
    margin-bottom: 12px;
}

    .quiz-question h2 {
        margin: 0;
        font-size: 18px;
        line-height: 1.25;
    }


/* Options */

.quiz-options-form,
.quiz-options-result {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.quiz-option {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 11px;
    border: 1px solid #065fd0;
    border-radius: 8px;
    background: #fff;
    color: #222;
    font-size: 15px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

    .quiz-option:hover {
        border-color: #0d6efd;
        background: #ddf1fe;
    }

.quiz-option-letter {
    min-width: 27px;
    height: 27px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #ddf1fe;
    font-weight: 700;
    font-size: 14px;
}

.quiz-option-text {
    flex: 1;
}


/* Answer result */

.quiz-option-correct {
    background: #d1e7dd;
    border-color: #198754;
    color: #0f5132;
    cursor: default;
}

.quiz-option-wrong {
    background: #f8d7da;
    border-color: #dc3545;
    color: #842029;
    cursor: default;
}

    .quiz-option-correct:hover,
    .quiz-option-wrong:hover {
        transform: none;
    }

.quiz-option-correct .quiz-option-letter {
    background: #198754;
    color: #fff;
}

.quiz-option-wrong .quiz-option-letter {
    background: #dc3545;
    color: #fff;
}


/* Next */

.quiz-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.quiz-previous-form,
.quiz-next-form {
    margin: 0;
}

.quiz-previous-button,
.quiz-next-button {
    border: 0;
    border-radius: 6px;
    padding: 9px 18px;
    background: #0d6efd;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

    .quiz-previous-button:hover,
    .quiz-next-button:hover {
        background: #0b5ed7;
    }


/* Final result */

.quiz-result-card {
    max-width: 550px;
    margin: auto;
    text-align: center;
    background: #f5f9fe;
    border: 2px solid #065fd0;
}

    .quiz-result-card h2 {
        margin: 0 0 15px;
        font-size: 26px;
    }

.quiz-result-details {
    border-radius: 6px;
    padding: 5px 15px;
    margin-bottom: 15px;
}

.quiz-result-row {
    display: flex;
    justify-content: space-between;
    padding: 7px 0;
    border-bottom: 1px solid #065fd0;
    font-size: 15px;
    font-weight: 600;
}

    .quiz-result-row:last-child {
        border-bottom: 0;
    }

.quiz-result-correct {
    color: green;
}

.quiz-result-wrong {
    color: red;
}

.quiz-score {
    padding: 12px;
    background: white;
    border: 2px solid #ddf1fe;
    border-radius: 10px;
    margin-bottom: 15px;
}

    .quiz-score span {
        display: block;
        font-size: 15px;
        font-weight: 600;
        color: #065fd0;
    }

    .quiz-score strong {
        font-size: 40px;
        color: #ce434b;
    }


/* Mobile */

@media (max-width: 600px) {

    .quiz-page {
        padding: 15px 8px 25px;
    }

    .quiz-title {
        font-size: 25px;
    }

    .quiz-description {
        font-size: 14px;
    }

    .quiz-start-card,
    .quiz-question-card,
    .quiz-result-card {
        padding: 14px;
    }

    .quiz-question h2 {
        font-size: 19px;
    }

    .quiz-option {
        padding: 8px 9px;
        font-size: 14px;
    }

    .quiz-option-letter {
        min-width: 25px;
        height: 25px;
    }

    .quiz-next-form {
        text-align: center;
    }

    .quiz-next-button {
        width: 100%;
    }
    .quiz-navigation {
        flex-direction: row;
    }

    .quiz-previous-button,
    .quiz-next-button {
        flex: 1;
    }
}
.quiz-question-image {
    display: block;
    width: 200px;
    height: 200px;
    object-fit: contain;
    margin: 0 auto;
}
.quiz-result-name {
    margin: -5px 0 15px;
    font-size: 18px;
    color: #ce434b;
}

.quiz-navigation {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
}

.quiz-previous-form,
.quiz-next-form {
    margin: 0;
}

.quiz-previous-button,
.quiz-next-button {
    border: 0;
    border-radius: 6px;
    padding: 9px 18px;
    background: #0d6efd;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

    .quiz-previous-button:hover,
    .quiz-next-button:hover {
        background: #0b5ed7;
    }

@media (max-width: 600px) {
    .quiz-navigation {
        flex-direction: row;
    }

    .quiz-previous-button,
    .quiz-next-button {
        flex: 1;
    }
}