
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@200;400;600&display=swap');

* {
    box-sizing: border-box;
}

body {
    background: #B3A5C6;
    background: linear-gradient(to right, #9a8aac, #625772);
    font-family: 'Poppins', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    overflow: hidden;
    margin: 0;
    padding: 1rem;
}

.quiz-container {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 10px 20px 5px rgba(0, 0, 0, 0.1);
    width: 600px;
    max-width: 95vw;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
}

.quiz-header {
    padding: 2rem 4rem 4rem 4rem;
    overflow-y: auto;
}

/* Custom Scrollbar for Webkit browsers */
.quiz-header::-webkit-scrollbar {
    width: 8px;
}

.quiz-header::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.quiz-header::-webkit-scrollbar-thumb {
    background: #c7c7c7;
    border-radius: 10px;
}

.quiz-header::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

h2 {
    padding: 1rem;
    text-align: center;
    margin: 0;
    font-weight: 600;
}

ul {
    list-style-type: none;
    padding: 0;
}

ul li {
    font-size: 1.1rem;
    margin: 1.2rem 0;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    padding: 1rem;
    transition: background-color 0.3s, border-color 0.3s;
}

ul li label {
    cursor: pointer;
    display: flex;
    align-items: center;
    width: 100%;
}

/* Custom Radio/Checkbox */
ul li input {
    display: none;
}

ul li label::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 15px;
    border: 2px solid #8e44ad;
    border-radius: 50%;
    transition: background-color 0.3s, border-color 0.3s;
}

ul li input[type="checkbox"] + label::before {
    border-radius: 5px;
}

ul li input:checked + label::before {
    background-color: #8e44ad;
    border-color: #8e44ad;
}

/* Feedback Styles */
ul li.correct {
    background-color: #e8f5e9; /* Light Green */
    border-color: #4CAF50;
}

ul li.incorrect {
    background-color: #ffebee; /* Light Red */
    border-color: #f44336;
}

ul li.correct label::before {
    background-color: #4CAF50;
    border-color: #4CAF50;
}

ul li.incorrect label::before {
    background-color: #f44336;
    border-color: #f44336;
}

#justification-container {
    margin-top: 2rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 5px;
    border-left: 5px solid #8e44ad;
    transition: opacity 0.4s ease-in-out;
}

#justification-container.hidden {
    opacity: 0;
    height: 0;
    padding: 0;
    margin: 0;
    overflow: hidden;
}


button {
    background-color: #8e44ad;
    color: #fff;
    border: none;
    display: block;
    width: 100%;
    cursor: pointer;
    font-size: 1.3rem;
    font-family: inherit;
    font-weight: 600;
    padding: 1.3rem;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #732d91;
}

button:focus {
    outline: none;
    background-color: #5e3370;
}

button:disabled {
    background-color: #bca0cc;
    cursor: not-allowed;
}

.progress-bar-container {
    width: 100%;
    height: 10px;
    background-color: #e0e0e0;
    border-radius: 5px;
    margin: 1rem 0 2rem 0;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: #8e44ad;
    border-radius: 5px;
    transition: width 0.5s ease-in-out;
}
