* {
    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;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 700px;
    width: 100%;
    padding: 40px;
}

.quiz-header {
    text-align: center;
    margin-bottom: 40px;
}

.quiz-header h1 {
    color: #333;
    font-size: 2.5em;
    margin-bottom: 10px;
}

.quiz-header p {
    color: #666;
    font-size: 1.1em;
}

.quiz-container {
    animation: slideIn 0.3s ease-in;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.question-wrapper {
    margin-bottom: 40px;
    animation: slideIn 0.3s ease-in;
}

.question-number {
    color: #667eea;
    font-weight: bold;
    font-size: 0.9em;
    margin-bottom: 10px;
}

.question-text {
    font-size: 1.3em;
    color: #333;
    margin-bottom: 25px;
    font-weight: 500;
}

.progress-bar {
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    margin-bottom: 30px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width 0.3s ease;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option {
    position: relative;
    margin-bottom: 5px;
}

.option input[type="radio"] {
    display: none;
}

.option-label {
    display: block;
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f9f9f9;
    font-size: 1em;
    color: #333;
}

.option-label:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.option input[type="radio"]:checked + .option-label {
    border-color: #667eea;
    background: #e8ecff;
    color: #667eea;
    font-weight: 600;
}

.option.correct .option-label {
    border-color: #4caf50;
    background: #e8f5e9;
    color: #2e7d32;
}

.option.incorrect .option-label {
    border-color: #f44336;
    background: #ffebee;
    color: #c62828;
}

.button-group {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    justify-content: space-between;
}

.btn {
    padding: 12px 30px;
    font-size: 1em;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    background: #e0e0e0;
    color: #333;
}

.btn-secondary:hover:not(:disabled) {
    background: #d0d0d0;
}

.results-container {
    text-align: center;
    animation: slideIn 0.3s ease-in;
}

.results-container h2 {
    color: #333;
    font-size: 2em;
    margin-bottom: 30px;
}

.score-display {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 40px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.score-display p {
    font-size: 1.5em;
    margin: 10px 0;
}

.percentage {
    font-size: 2em;
    font-weight: bold;
    margin-top: 15px;
}

#results-details {
    text-align: left;
    margin: 30px 0;
    max-height: 400px;
    overflow-y: auto;
}

.result-item {
    background: #f5f5f5;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 8px;
    border-left: 4px solid #e0e0e0;
}

.result-item.correct {
    border-left-color: #4caf50;
    background: #f1f8e9;
}

.result-item.incorrect {
    border-left-color: #f44336;
    background: #fff3e0;
}

.result-question {
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    font-size: 1em;
}

.result-answer {
    color: #666;
    font-size: 0.95em;
    margin: 5px 0;
}

.result-answer.user {
    color: #f44336;
}

.result-answer.correct {
    color: #4caf50;
}

@media (max-width: 600px) {
    .container {
        padding: 20px;
    }

    .quiz-header h1 {
        font-size: 1.8em;
    }

    .question-text {
        font-size: 1.1em;
    }

    .button-group {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}
