* {
    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 {
    width: 100%;
    max-width: 700px;
}

h1 {
    text-align: center;
    color: white;
    margin-bottom: 30px;
    font-size: 2.5em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 100%;
    margin-top: 10px;
}

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

.btn-primary:active {
    transform: translateY(0);
}

#progress {
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

#question {
    color: #333;
    font-size: 1.3em;
    margin-bottom: 25px;
    line-height: 1.5;
}

#answers {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.answer-btn {
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 16px;
}

.answer-btn:hover {
    border-color: #667eea;
    background: #f8f9ff;
    transform: translateX(5px);
}

.answer-btn.selected {
    border-color: #667eea;
    background: #667eea;
    color: white;
}

.answer-btn.correct {
    border-color: #4caf50;
    background: #4caf50;
    color: white;
}

.answer-btn.incorrect {
    border-color: #f44336;
    background: #f44336;
    color: white;
}

.answer-btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

#score {
    text-align: center;
    font-size: 2em;
    margin: 20px 0;
    color: #667eea;
    font-weight: bold;
}

#review {
    margin: 20px 0;
}

.review-item {
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 8px;
    background: #f5f5f5;
}

.review-item.correct {
    border-left: 5px solid #4caf50;
}

.review-item.incorrect {
    border-left: 5px solid #f44336;
}

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

.review-answer {
    color: #666;
    margin: 5px 0;
}

.hidden {
    display: none !important;
}

#loading {
    text-align: center;
    color: white;
}

.spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media (max-width: 600px) {
    h1 {
        font-size: 2em;
    }
    
    .card {
        padding: 20px;
    }
    
    #question {
        font-size: 1.1em;
    }
}
