/* =========================================================
   ETHNOML QUIZ
   TES AWAL LITERASI MATEMATIS
   ========================================================= */


/* =========================================================
   GLOBAL QUIZ
   ========================================================= */

.quiz-modal {
    border: none;
    border-radius: 30px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 30px 80px rgba(45, 35, 100, 0.20);
}


/* =========================================================
   INTRO QUIZ MODAL
   ========================================================= */

.quiz-intro-modal {
    border: none;
    border-radius: 35px;
    overflow: hidden;

    background: linear-gradient(
        135deg,
        #ffffff 0%,
        #F7F4FF 100%
    );

    box-shadow:
        0 25px 60px rgba(0, 0, 0, .18);
}


/* =========================================================
   INTRO CLOSE BUTTON
   ========================================================= */

.quiz-close {
    position: absolute;

    top: 20px;
    right: 20px;

    z-index: 20;

    width: 45px;
    height: 45px;

    border-radius: 50%;

    background: #ffffff;

    box-shadow:
        0 8px 20px rgba(0, 0, 0, .08);

    transition: all .3s ease;
}

.quiz-close:hover {
    transform: rotate(90deg);
}


/* =========================================================
   INTRO LEFT
   ========================================================= */

.intro-left {
    background: linear-gradient(
        180deg,
        #7367F0,
        #8B7DFF
    );

    min-height: 680px;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    padding: 45px;

    color: #ffffff;
}

.quiz-intro-image {
    width: 95%;
    max-width: 380px;

    transition: .4s;

    animation: floatImage 3s ease-in-out infinite;
}

.quiz-intro-image:hover {
    transform: scale(1.05);
}


/* =========================================================
   FLOAT ANIMATION
   ========================================================= */

@keyframes floatImage {

    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-12px);
    }

    100% {
        transform: translateY(0);
    }

}


/* =========================================================
   INTRO WELCOME
   ========================================================= */

.intro-welcome {
    text-align: center;
    margin-top: 30px;
}

.intro-welcome h4 {
    font-weight: 700;
    font-size: 30px;
}

.intro-welcome p {
    margin-top: 15px;

    line-height: 1.8;

    font-size: 17px;

    opacity: .95;
}


/* =========================================================
   INTRO RIGHT
   ========================================================= */

.intro-right {
    padding: 55px;
}

.quiz-badge {
    display: inline-block;

    background: #EEE9FF;
    color: #6A5AF9;

    font-weight: 700;

    border-radius: 50px;

    padding: 10px 22px;

    font-size: 15px;
}

.quiz-title {
    font-size: 42px;

    margin-top: 22px;

    font-weight: 800;

    color: #333333;

    line-height: 1.2;
}

.quiz-title span {
    display: block;
    color: #6A5AF9;
}

.quiz-description {
    margin-top: 20px;

    color: #666666;

    line-height: 1.9;

    font-size: 17px;
}


/* =========================================================
   INTRO INFO CARD
   ========================================================= */

.intro-card {
    background: #ffffff;

    border-radius: 20px;

    padding: 18px;

    display: flex;
    align-items: center;

    gap: 18px;

    box-shadow:
        0 10px 25px rgba(0, 0, 0, .06);

    transition: .35s;

    height: 100%;
}

.intro-card:hover {
    transform: translateY(-8px);

    box-shadow:
        0 20px 40px rgba(111, 92, 255, .18);
}

.intro-icon {
    width: 58px;
    height: 58px;

    flex-shrink: 0;

    border-radius: 50%;

    background: #F3F0FF;

    display: flex;
    justify-content: center;
    align-items: center;

    font-size: 28px;
}

.intro-card h6 {
    margin: 0;

    font-size: 16px;

    font-weight: 700;

    color: #444444;
}

.intro-card span {
    color: #888888;

    font-size: 14px;
}


/* =========================================================
   CULTURE
   ========================================================= */

.culture-box {
    display: flex;

    gap: 12px;

    flex-wrap: wrap;
}

.culture-box span {
    background: #F4F2FF;

    color: #6A5AF9;

    border-radius: 30px;

    padding: 10px 18px;

    font-weight: 600;

    transition: .3s;
}

.culture-box span:hover {
    background: #6A5AF9;
    color: #ffffff;
}


/* =========================================================
   ALERT
   ========================================================= */

.quiz-alert {
    display: flex;

    gap: 15px;

    align-items: flex-start;

    background: #FFF8EA;

    border-left: 5px solid #FFC107;

    padding: 18px;

    border-radius: 18px;

    color: #555555;

    line-height: 1.8;
}

.quiz-alert i {
    color: #FFC107;

    font-size: 22px;
}


/* =========================================================
   START BUTTON
   ========================================================= */

.btn-start-quiz {
    width: 100%;

    border: none;

    border-radius: 18px;

    padding: 18px;

    font-size: 18px;

    font-weight: 700;

    color: #ffffff;

    background: linear-gradient(
        135deg,
        #7367F0,
        #8B7DFF
    );

    transition: .35s;

    box-shadow:
        0 15px 30px rgba(111, 92, 255, .25);
}

.btn-start-quiz:hover {
    transform: translateY(-4px);

    color: #ffffff;

    box-shadow:
        0 22px 45px rgba(111, 92, 255, .30);
}


/* =========================================================
   QUIZ HEADER
   ========================================================= */

.quiz-header {
    padding: 25px 32px 20px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    background: linear-gradient(
        135deg,
        #7367F0,
        #8B7DFF
    );

    color: #ffffff;
}

.quiz-header h5 {
    margin: 0;

    font-size: 22px;

    font-weight: 800;
}

.quiz-header small {
    display: block;

    margin-top: 5px;

    font-size: 14px;

    opacity: .90;
}

.quiz-header .btn-close {
    background-color: #ffffff;

    border-radius: 50%;

    padding: 10px;

    opacity: 1;

    transition: .3s;
}

.quiz-header .btn-close:hover {
    transform: rotate(90deg) scale(1.05);
}


/* =========================================================
   PROGRESS
   ========================================================= */

.quiz-progress-wrapper {
    display: flex;

    align-items: center;

    gap: 15px;

    padding: 20px 30px 5px;

    background: #ffffff;
}

.quiz-progress {
    flex: 1;

    height: 14px;

    border-radius: 30px;

    overflow: hidden;

    background: #ECE9FF;
}

.quiz-progress .progress-bar {
    height: 100%;

    border-radius: 30px;

    background: linear-gradient(
        90deg,
        #6A5AF9,
        #A08BFF
    );

    transition:
        width .5s ease;
}

#progressText {
    min-width: 45px;

    text-align: right;

    font-size: 14px;

    font-weight: 800;

    color: #6A5AF9;
}


/* =========================================================
   QUIZ BODY
   ========================================================= */

.quiz-modal .modal-body {
    padding: 30px 40px 35px !important;

    background:
        linear-gradient(
            180deg,
            #ffffff 0%,
            #FAF9FF 100%
        );

    min-height: 500px;
}


/* =========================================================
   QUIZ SLIDE
   ========================================================= */

.quiz-slide {
    display: none;

    animation:
        fadeSlide .4s ease;
}

.quiz-slide.active {
    display: block;
}


/* =========================================================
   SLIDE ANIMATION
   ========================================================= */

@keyframes fadeSlide {

    from {
        opacity: 0;
        transform: translateX(25px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }

}


/* =========================================================
   QUESTION IMAGE
   ========================================================= */

.question-image {
    width: 100%;

    max-width: 480px;

    max-height: 250px;

    object-fit: contain;

    display: block;

    margin: 5px auto 25px;

    border-radius: 25px;

    box-shadow:
        0 15px 35px rgba(0, 0, 0, .08);

    transition: .3s;
}

.question-image:hover {
    transform: scale(1.015);
}


/* =========================================================
   QUESTION TITLE
   ========================================================= */

.question-title {
    text-align: center;

    margin: 25px auto 0;

    max-width: 850px;

    font-size: 27px;

    font-weight: 750;

    line-height: 1.65;

    color: #303030;
}


/* =========================================================
   QUESTION DESCRIPTION
   ========================================================= */

.question-desc {
    text-align: center;

    margin: 12px auto 0;

    max-width: 750px;

    color: #777777;

    font-size: 16px;

    line-height: 1.7;
}


/* =========================================================
   OPTION AREA
   ========================================================= */

.question-option {
    margin: 32px auto 0;

    max-width: 850px;

    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 18px;
}


/* =========================================================
   OPTION CARD
   ========================================================= */

.option-card {
    position: relative;

    display: flex;

    align-items: center;

    gap: 16px;

    min-height: 78px;

    padding: 17px 20px;

    background: #ffffff;

    border-radius: 20px;

    cursor: pointer;

    border: 3px solid #ECECEC;

    box-shadow:
        0 7px 18px rgba(0, 0, 0, .035);

    transition:
        transform .25s ease,
        border-color .25s ease,
        background .25s ease,
        box-shadow .25s ease;
}

.option-card:hover {
    transform: translateY(-4px);

    border-color: #8B7DFF;

    box-shadow:
        0 13px 30px rgba(122, 103, 255, .14);
}


/* =========================================================
   RADIO
   ========================================================= */

.option-card input {
    position: absolute;

    opacity: 0;

    pointer-events: none;
}


/* =========================================================
   OPTION LETTER
   ========================================================= */

.option-card span {
    width: 45px;
    height: 45px;

    min-width: 45px;

    border-radius: 50%;

    display: flex;

    justify-content: center;
    align-items: center;

    background: #ECE9FF;

    color: #6A5AF9;

    font-size: 17px;

    font-weight: 800;

    transition: .25s;
}


/* =========================================================
   OPTION TEXT
   ========================================================= */

.option-card p {
    margin: 0;

    color: #444444;

    font-size: 17px;

    font-weight: 600;

    line-height: 1.5;
}


/* =========================================================
   SELECTED OPTION
   ========================================================= */

.option-card:has(input:checked) {
    background: #F4F1FF;

    border-color: #6A5AF9;

    box-shadow:
        0 12px 28px rgba(106, 90, 249, .16);

    transform: translateY(-3px);
}

.option-card:has(input:checked) span {
    background: #6A5AF9;

    color: #ffffff;

    transform: scale(1.05);
}

.option-card:has(input:checked) p {
    color: #5145B5;

    font-weight: 700;
}


/* =========================================================
   QUIZ FOOTER
   ========================================================= */

.quiz-footer {
    padding: 22px 32px 28px;

    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 15px;

    background: #ffffff;

    border-top: 1px solid #F0EEF8;
}

.quiz-footer .btn {
    min-width: 145px;

    border-radius: 15px;

    padding: 13px 24px;

    font-size: 15px;

    font-weight: 700;

    transition: .3s;
}

.quiz-footer .btn-primary {
    border: none;

    background: linear-gradient(
        135deg,
        #7367F0,
        #8B7DFF
    );

    box-shadow:
        0 8px 20px rgba(106, 90, 249, .20);
}

.quiz-footer .btn-primary:hover {
    transform: translateY(-3px);

    box-shadow:
        0 13px 28px rgba(106, 90, 249, .28);
}

.quiz-footer .btn-outline-secondary {
    border: 2px solid #E2E0EA;

    color: #666666;

    background: #ffffff;
}

.quiz-footer .btn-outline-secondary:hover:not(:disabled) {
    border-color: #6A5AF9;

    color: #6A5AF9;

    background: #F7F5FF;
}

.quiz-footer .btn:disabled {
    opacity: .45;

    cursor: not-allowed;
}


/* =========================================================
   RESULT MODAL
   ========================================================= */

.result-icon {
    font-size: 70px;

    animation:
        resultBounce .7s ease;
}

@keyframes resultBounce {

    0% {
        transform: scale(.5);
        opacity: 0;
    }

    70% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }

}

.score-circle {
    width: 170px;
    height: 170px;

    margin: auto;

    border-radius: 50%;

    background: linear-gradient(
        135deg,
        #7367F0,
        #8B7DFF
    );

    display: flex;

    justify-content: center;
    align-items: center;

    color: #ffffff;

    font-size: 55px;

    font-weight: 800;

    box-shadow:
        0 20px 45px rgba(111, 92, 255, .28);

    animation:
        scorePop .7s ease;
}

@keyframes scorePop {

    0% {
        transform: scale(.6);
        opacity: 0;
    }

    80% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }

}

#scoreCategory {
    font-size: 30px;

    font-weight: 800;

    margin-top: 20px;

    color: #333333;
}

#scoreDescription {
    line-height: 1.8;

    color: #666666;
}


/* =========================================================
   RESPONSIVE TABLET
   ========================================================= */

@media (max-width: 991px) {

    .intro-left {
        min-height: auto;

        padding: 40px;
    }

    .intro-right {
        padding: 35px;
    }

    .quiz-title {
        font-size: 32px;
    }

    .quiz-modal .modal-body {
        padding: 25px !important;
    }

    .question-title {
        font-size: 24px;
    }

}


/* =========================================================
   RESPONSIVE MOBILE
   ========================================================= */

@media (max-width: 767px) {

    .quiz-header {
        padding: 20px;
    }

    .quiz-header h5 {
        font-size: 18px;
    }

    .quiz-header small {
        font-size: 12px;
    }

    .quiz-progress-wrapper {
        padding: 15px 20px 5px;
    }

    .quiz-modal .modal-body {
        padding: 22px 18px 25px !important;
    }

    .question-image {
        max-width: 100%;

        max-height: 210px;

        border-radius: 18px;

        margin-bottom: 20px;
    }

    .question-title {
        font-size: 21px;

        line-height: 1.55;
    }

    .question-desc {
        font-size: 14px;
    }

    .question-option {
        grid-template-columns: 1fr;

        gap: 12px;

        margin-top: 25px;
    }

    .option-card {
        min-height: 68px;

        padding: 14px 16px;

        border-radius: 17px;
    }

    .option-card span {
        width: 40px;
        height: 40px;

        min-width: 40px;

        font-size: 15px;
    }

    .option-card p {
        font-size: 15px;
    }

    .quiz-footer {
        padding: 18px;

        gap: 10px;
    }

    .quiz-footer .btn {
        min-width: 0;

        flex: 1;

        padding: 12px 10px;

        font-size: 14px;
    }

}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 480px) {

    .quiz-modal {
        border-radius: 22px;
    }

    .quiz-header {
        padding: 17px;
    }

    .quiz-header h5 {
        font-size: 16px;
    }

    .quiz-header small {
        font-size: 11px;
    }

    .quiz-progress-wrapper {
        padding: 12px 17px 3px;
    }

    .quiz-progress {
        height: 10px;
    }

    #progressText {
        font-size: 12px;

        min-width: 35px;
    }

    .quiz-modal .modal-body {
        min-height: 400px;

        padding: 18px 14px 22px !important;
    }

    .question-image {
        max-height: 180px;

        margin-top: 0;

        border-radius: 16px;
    }

    .question-title {
        font-size: 19px;

        margin-top: 18px;
    }

    .question-desc {
        font-size: 13px;
    }

    .option-card {
        gap: 12px;

        padding: 12px;

        border-width: 2px;
    }

    .option-card span {
        width: 37px;
        height: 37px;

        min-width: 37px;
    }

    .option-card p {
        font-size: 14px;
    }

    .quiz-footer {
        padding: 14px;
    }

    .quiz-footer .btn {
        font-size: 13px;

        padding: 11px 8px;
    }

    .score-circle {
        width: 140px;
        height: 140px;

        font-size: 45px;
    }

    #scoreCategory {
        font-size: 24px;
    }

}