* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #6a11cb, #2575fc);
    color: white;
    display: flex;
    justify-content: center; /* Centers content horizontally */
    align-items: center; /* Centers content vertically */
    flex-direction: column; /* Stacks elements vertically */
    min-height: 100vh; /* Ensures the body takes full height */
    font-size: 1.1em;
    overflow-y: auto; /* Allows scrolling if content overflows */
    padding: 20px; /* Adds padding around the body */
    overflow-x: hidden;
}

h1 {
    text-align: center;
    font-size: 2.8em;
    color: #2575fc;
    margin-bottom: 20px;
    margin-top: 20px;
    width: 100%; /* Ensures title spans the width of the screen */
}

.quiz-container {
    background-color: #fff;
    color: #333;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 800px;
    text-align: center;
    opacity: 0;
    animation: fadeIn 1s forwards;
    margin-bottom: 30px;
    overflow-y: auto;
}

.quiz-title {
    font-size: 2.8em;
    color: #2575fc;
    margin-bottom: 30px;
    animation: slideDown 1s ease-out;
}

.question {
    font-size: 1.3em;
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f3f3f3;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    opacity: 0;
    animation: fadeIn 1s ease-out forwards;
}

.options {
    margin-top: 20px;
    text-align: left;
}

.options label {
    display: block;
    margin: 10px 0;
    font-size: 1.2em;
    cursor: pointer;
    position: relative;
    padding-left: 35px;
    opacity: 0;
    animation: fadeIn 1.5s forwards;
    animation-delay: 0.3s;
}

.options input[type="radio"] {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    cursor: pointer;
    width: 20px;
    height: 20px;
}

.options input[type="radio"]:checked + span {
    background-color: #4CAF50;
    border-color: #4CAF50;
}

.options input[type="radio"]:hover + span {
    background-color: #45a049;
}

.options span {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #ccc;
    border-radius: 50%;
    background-color: white;
    transition: background-color 0.3s, border-color 0.3s;
}

button.submit-btn {
    background-color: #2575fc;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 1.2em;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 30px;
    opacity: 0;
    animation: fadeIn 1.5s ease-out forwards;
    animation-delay: 1s;
    margin-bottom: 30px;
    align-self: center; /* Ensures button is centered */
}

button.submit-btn:hover {
    background-color: #4CAF50;
}

.result {
    display: none;
    margin-top: 30px;
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    opacity: 0;
    animation: fadeIn 1s forwards;
    animation-delay: 1s;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 20px;
}

#feedback {
    margin-top: 15px;
    text-align: left;
    font-size: 1.1em;
    color: #f44336;
}

#motivation-message {
    margin-top: 15px;
    font-size: 1.5em;
    font-weight: bold;
    color: #4CAF50;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
    }
    to {
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .quiz-container {
        padding: 20px;
        max-width: 90%;
    }

    h1 {
        font-size: 2em;
    }

    .question {
        font-size: 1.2em;
    }
}
