body {
    font-family: 'Arial', sans-serif;
    background-color: #f4f4f9;
    margin: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

h1 {
    margin-bottom: 20px;
    color: #333;
    font-size: 2em;
    text-align: center;
}

form {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

label {
    margin-bottom: 10px;
    font-weight: bold;
}

input[type="text"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
    transition: border-color 0.2s;
}

input[type="text"]:focus {
    border-color: #007bff;
    outline: none;
}

button {
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #0056b3;
}

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

.hidden {
    display: none;
}

#result, #error, #gradeResult {
    margin-top: 20px;
    text-align: left;
    width: 100%;
}

.question {
    margin-bottom: 20px;
}

.option {
    display: flex;
    align-items: center;
    margin: 5px;
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #fff;
    transition: background-color 0.2s, box-shadow 0.2s;
    cursor: pointer;
    font-size: 1em;
}

.option input[type="radio"] {
    margin-right: 10px;
    display: none;
}

.option input[type="radio"]:checked + label {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

.option label {
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 5px;
    transition: background-color 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    flex: 1;
}

.option:hover {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.option label::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 10px;
    border: 2px solid #ddd;
    border-radius: 50%;
    background-color: #fff;
    box-sizing: border-box;
}

.option input[type="radio"]:checked + label::before {
    border-color: #007bff;
    background-color: #007bff;
}

.correct-answer {
    background-color: #d4edda;
    border-left: 5px solid #28a745;
    padding-left: 10px;
}

#progressBar {
    width: 100%;
    background-color: #f3f3f3;
    margin: 20px 0;
    border-radius: 5px;
    overflow: hidden;
}

#progress {
    width: 0;
    height: 20px;
    background-color: #007bff;
    animation: progressAnimation 3s linear infinite;
}

@keyframes progressAnimation {
    0% { width: 0; }
    50% { width: 100%; }
    100% { width: 0; }
}

@media (max-width: 600px) {
    h1 {
        font-size: 1.5em;
    }
    input[type="text"],
    button {
        font-size: 0.9em;
    }
    .option {
        font-size: 0.9em;
    }
}
