* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.screen {
    display: none;
    background: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin-bottom: 20px;
}

.screen.active {
    display: block;
}

.button-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 30px;
}

.question-count-container {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: center;
}

.question-count-container label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 1.1rem;
}

.question-count-container input {
    padding: 10px 15px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 1.1rem;
    text-align: center;
    width: 80px;
    transition: border-color 0.3s ease;
}

.question-count-container input:focus {
    outline: none;
    border-color: #667eea;
}

.selection-btn, .btn {
    padding: 15px 30px;
    font-size: 1.1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.selection-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.selection-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn {
    background: #28a745;
    color: white;
}

.btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
}

.btn:hover:not(:disabled) {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
}

.btn-secondary {
    padding: 12px 25px;
    font-size: 0.95rem;
    border: 2px solid #6c757d;
    border-radius: 8px;
    background: transparent;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.btn-secondary:hover {
    background: #6c757d;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(108, 117, 125, 0.3);
}

.progress-bar {
    background: #e9ecef;
    border-radius: 10px;
    height: 8px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.progress-fill {
    background: linear-gradient(90deg, #28a745, #20c997);
    height: 100%;
    border-radius: 10px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    display: block;
    text-align: center;
    margin-top: 10px;
    font-weight: 600;
    color: #666;
}

.question-container {
    margin: 30px 0;
}

#question-text {
    font-size: 1.3rem;
    margin-bottom: 25px;
    line-height: 1.6;
    color: #2c3e50;
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option {
    display: flex;
    align-items: center;
    padding: 20px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    min-height: 60px;
}

.option:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.option input[type="radio"] {
    margin-right: 15px;
    transform: scale(1.4);
    cursor: pointer;
}

.option label {
    flex: 1;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1.4;
    padding: 5px 0;
}

.score-container {
    text-align: center;
    margin-bottom: 40px;
}

.score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #28a745, #20c997);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 5px 20px rgba(40, 167, 69, 0.3);
}

.score-circle span {
    font-size: 2rem;
    font-weight: bold;
    color: white;
}

.review-container {
    margin-top: 30px;
}

.review-container h3 {
    margin-bottom: 20px;
    color: #2c3e50;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 10px;
}

.review-item {
    margin-bottom: 25px;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #28a745;
}

.review-item.incorrect {
    border-left-color: #dc3545;
    background: #fff5f5;
}

.review-item.correct {
    background: #f8fff8;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.question-number {
    font-weight: bold;
    color: #666;
}

.status {
    font-size: 1.2rem;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 4px;
}

.status.correct {
    color: #28a745;
    background: #d4edda;
}

.status.incorrect {
    color: #dc3545;
    background: #f8d7da;
}

.review-question {
    font-weight: 600;
    margin-bottom: 10px;
    color: #2c3e50;
}

.review-answer, .review-correct {
    margin-bottom: 8px;
}

.review-answer .correct,
.review-correct .correct {
    color: #28a745;
    font-weight: 600;
}

.review-answer .incorrect {
    color: #dc3545;
    font-weight: 600;
}

.review-explanation {
    font-style: italic;
    color: #666;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e9ecef;
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .screen {
        padding: 25px;
    }
    
    #question-text {
        font-size: 1.1rem;
    }
    
    .option label {
        font-size: 1rem;
    }
}