/* General Styles */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    background-color: var(--light-color);
    color: var(--dark-color);
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

header, footer {
    background-color: var(--dark-color);
    color: white;
    text-align: center;
    padding: 1rem;
}

section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 600px;
    text-align: center;
}

.hidden {
    display: none;
}

/* Upload Section */
#upload-form input[type="file"] {
    display: block;
    margin: 1.5rem auto;
}

button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #0056b3;
}

/* Loader */
.loader {
    border: 8px solid #f3f3f3;
    border-top: 8px solid var(--primary-color);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Quiz Section */
#quiz-header {
    text-align: left;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

#question-text {
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 2rem;
}

#options-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-align: right;
}

.option {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
}

.option:hover {
    background-color: #f0f0f0;
}

.option input {
    margin-left: 10px;
}

/* Results Section */
#score-text {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 2rem;
}

.review-item {
    text-align: right;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.review-item p {
    font-weight: bold;
}

.correct {
    color: var(--success-color);
}

.incorrect {
    color: var(--danger-color);
}

.correct-answer {
    background-color: #d4edda;
    padding: 5px;
    border-radius: 3px;
}
