* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 900px;
    margin: 0 auto;
}

header {
    background: white;
    padding: 30px;
    border-radius: 15px 15px 0 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
}

h1 {
    color: #FF9900;
    font-size: 2.5em;
    margin-bottom: 10px;
}

h2 {
    color: #232F3E;
    font-size: 1.5em;
    margin-bottom: 20px;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
    margin: 20px 0 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #FF9900, #FF6600);
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    color: #666;
    font-size: 0.9em;
    margin-top: 10px;
}

main {
    background: white;
    padding: 40px;
    border-radius: 0 0 15px 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    min-height: 500px;
}

.question-card {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.question-number {
    color: #FF9900;
    font-size: 1.2em;
    margin-bottom: 15px;
}

.question-text {
    font-size: 1.2em;
    color: #232F3E;
    margin-bottom: 30px;
    line-height: 1.6;
    font-weight: 500;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.option {
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    padding: 20px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 15px;
}

.option:hover {
    background: #e8f4f8;
    border-color: #FF9900;
    transform: translateX(5px);
}

.option.selected {
    background: #fff3e0;
    border-color: #FF9900;
    font-weight: 500;
}

.option.correct {
    background: #d4edda;
    border-color: #28a745;
}

.option.incorrect {
    background: #f8d7da;
    border-color: #dc3545;
}

.option.disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.option-letter {
    background: #FF9900;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.option.correct .option-letter {
    background: #28a745;
}

.option.incorrect .option-letter {
    background: #dc3545;
}

.feedback {
    background: #e8f4f8;
    border-left: 4px solid #FF9900;
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 5px;
}

.feedback.correct {
    background: #d4edda;
    border-left-color: #28a745;
}

.feedback.incorrect {
    background: #f8d7da;
    border-left-color: #dc3545;
}

#feedbackText {
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 10px;
}

#explanationText {
    color: #555;
    line-height: 1.6;
}

.navigation {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
}

.btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: #FF9900;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #e68a00;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background: #5a6268;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover:not(:disabled) {
    background: #218838;
}

.results-card {
    text-align: center;
    animation: fadeIn 0.5s ease;
}

.results-card h2 {
    color: #232F3E;
    margin-bottom: 30px;
    font-size: 2em;
}

.score-display {
    margin: 30px 0;
}

.score-circle {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF9900, #FF6600);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 3em;
    font-weight: bold;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.score-text {
    font-size: 1.2em;
    color: #555;
    margin: 20px 0;
}

.result-message {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin: 30px 0;
    font-size: 1.1em;
    color: #232F3E;
}

.results-details {
    text-align: left;
    margin: 30px 0;
    max-height: 400px;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.result-item {
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    border-left: 4px solid;
}

.result-item.correct {
    background: #d4edda;
    border-left-color: #28a745;
}

.result-item.incorrect {
    background: #f8d7da;
    border-left-color: #dc3545;
}

.result-item-header {
    font-weight: bold;
    margin-bottom: 5px;
}

.result-item-question {
    color: #555;
    font-size: 0.9em;
    margin-bottom: 5px;
}

/* Back Button */
.back-button {
    margin-bottom: 20px;
}

.btn-back {
    display: inline-block;
    padding: 12px 24px;
    background: #6c757d;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-back:hover {
    background: #5a6268;
    transform: translateX(-5px);
}

/* Results Actions */
.results-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    justify-content: center;
}

.results-actions .btn {
    flex: 1;
    max-width: 300px;
}

.results-actions a {
    text-decoration: none;
}

footer {
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    margin-top: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

footer p {
    color: #232F3E;
    margin: 5px 0;
}

.footer-note {
    font-size: 0.9em;
    color: #666;
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    h1 {
        font-size: 1.8em;
    }

    h2 {
        font-size: 1.2em;
    }

    main {
        padding: 20px;
    }

    .question-text {
        font-size: 1em;
    }

    .navigation {
        flex-direction: column;
    }

    .score-circle {
        width: 150px;
        height: 150px;
        font-size: 2em;
    }
}
