/* Google Fonts - Poppins */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background: #6e48aa; /* Playful Purple Gradient Start */
    background: linear-gradient(135deg, #6e48aa 0%, #9d50bb 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

::selection {
    color: #fff;
    background: #6e48aa;
}

.container {
    width: 100%;
    max-width: 540px;
    padding: 20px;
}

.start_btn, .info_box, .quiz_box, .result_box {
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.start_btn button {
    font-size: 25px;
    font-weight: 500;
    color: #6e48aa;
    padding: 15px 30px;
    outline: none;
    border: none;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    width: 100%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.start_btn button:hover {
    background: #6e48aa;
    color: #fff;
}

.info_box {
    width: 100%;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0.9);
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 5;
    background: #fff;
}

.info_box.activeInfo {
    opacity: 1;
    z-index: 5;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
}

.info_box .info-title {
    height: 60px;
    width: 100%;
    border-bottom: 1px solid lightgrey;
    display: flex;
    align-items: center;
    padding: 0 30px;
    border-radius: 15px 15px 0 0;
    font-size: 20px;
    font-weight: 600;
}

.info_box .info-list {
    padding: 15px 30px;
}

.info_box .info-list .info {
    margin: 5px 0;
    font-size: 17px;
}

.info_box .info-list .info span {
    font-weight: 600;
    color: #6e48aa;
}

.info_box .buttons {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 30px;
    border-top: 1px solid lightgrey;
}

.info_box .buttons button {
    margin: 0 5px;
    height: 40px;
    width: 100px;
    outline: none;
    border: 1px solid #6e48aa;
    border-radius: 5px;
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.buttons button.quit {
    color: #6e48aa;
    background: #fff;
}

.buttons button.quit:hover {
    color: #fff;
    background: #6e48aa;
}

.buttons button.restart {
    color: #fff;
    background: #6e48aa;
}

.buttons button.restart:hover {
    background: #5a3891;
}

.quiz_box {
    width: 100%;
    background: #fff;
    border-radius: 15px;
    display: none; /* Hidden by default */
}

.quiz_box.activeQuiz {
    display: block;
}

.quiz_box header {
    position: relative;
    z-index: 2;
    height: 70px;
    padding: 0 30px;
    background: #fff;
    border-radius: 15px 15px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.quiz_box header .title {
    font-size: 20px;
    font-weight: 600;
}

.quiz_box header .timer {
    color: #004085;
    background: #cce5ff;
    border: 1px solid #b8daff;
    height: 45px;
    padding: 0 8px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 145px;
}

.quiz_box header .timer .time_left_txt {
    font-weight: 400;
    font-size: 17px;
    user-select: none;
}

.quiz_box header .timer .timer_sec {
    font-size: 18px;
    font-weight: 500;
    height: 30px;
    width: 45px;
    color: #fff;
    border-radius: 5px;
    line-height: 30px;
    text-align: center;
    background: #343a40;
    border: 1px solid #343a40;
    user-select: none;
}

.quiz_box header .time_line {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: #6e48aa;
}

section {
    padding: 25px 30px 20px 30px;
    background: #fff;
}

section .que_text {
    font-size: 25px;
    font-weight: 600;
}

section .option_list {
    padding: 20px 0px;
    display: block;
}

section .option_list .option {
    background: aliceblue;
    border: 1px solid #84c5fe;
    border-radius: 5px;
    padding: 8px 15px;
    font-size: 17px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

section .option_list .option:last-child {
    margin-bottom: 0px;
}

section .option_list .option:hover {
    color: #004085;
    background: #cce5ff;
    border: 1px solid #b8daff;
}

section .option_list .option.correct {
    color: #155724;
    background: #d4edda;
    border: 1px solid #c3e6cb;
}

section .option_list .option.incorrect {
    color: #721c24;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
}

section .option_list .option.disabled {
    pointer-events: none;
}

section .option_list .option .icon {
    height: 26px;
    width: 26px;
    border: 2px solid transparent;
    border-radius: 50%;
    text-align: center;
    font-size: 13px;
    pointer-events: none;
    transition: all 0.3s ease;
    line-height: 24px;
}

.option_list .option .icon.tick {
    color: #23903c;
    border-color: #23903c;
    background: #d4edda;
}

.option_list .option .icon.cross {
    color: #a42834;
    background: #f8d7da;
    border-color: #a42834;
}

footer {
    height: 60px;
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid lightgrey;
}

footer .total_que span {
    display: flex;
    user-select: none;
}

footer .total_que span p {
    font-weight: 500;
    padding: 0 5px;
}

footer .total_que span p:first-child {
    padding-left: 0px;
}

footer .next_btn {
    display: none;
    height: 40px;
    padding: 0 13px;
    font-size: 18px;
    font-weight: 400;
    cursor: pointer;
    border: none;
    outline: none;
    color: #fff;
    border-radius: 5px;
    background: #6e48aa;
    border: 1px solid #6e48aa;
    line-height: 10px;
    transition: all 0.3s ease;
}

footer .next_btn:hover {
    background: #5a3891;
}

footer .next_btn.show {
    display: block;
}

.result_box {
    background: #fff;
    border-radius: 15px;
    padding: 25px 30px;
    width: 100%;
    display: none; /* Hidden by default */
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.result_box.activeResult {
    display: flex;
}

.result_box .icon {
    font-size: 100px;
    color: #6e48aa;
    margin-bottom: 10px;
}

.result_box .complete_text {
    font-size: 20px;
    font-weight: 500;
}

.result_box .score_text span {
    display: flex;
    margin: 10px 0;
    font-size: 18px;
    font-weight: 500;
}

.result_box .score_text span p {
    padding: 0 4px;
    font-weight: 600;
}

.result_box .buttons {
    display: flex;
    margin: 20px 0;
}

.result_box .buttons button {
    margin: 0 10px;
    height: 45px;
    padding: 0 20px;
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    outline: none;
    border-radius: 5px;
    transition: all 0.3s ease;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.quiz_box.activeQuiz, .result_box.activeResult {
    animation: fadeIn 0.5s ease-out;
}

/* Responsive adjustments */
@media(max-width: 450px) {
    .info_box, .quiz_box, .result_box {
        width: 90%;
    }
    .info_box .info-title {
        font-size: 18px;
    }
    section .que_text {
        font-size: 20px;
    }
    section .option_list .option {
        font-size: 15px;
    }
}
