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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 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 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 700px;
    width: 100%;
    padding: 40px;
    animation: fadeInScale 0.5s ease-out;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

h1 {
    color: #333;
    margin-bottom: 10px;
    font-size: 28px;
}

.subtitle {
    color: #666;
    margin-bottom: 30px;
    font-size: 14px;
}

.progress-bar {
    background: #e0e0e0;
    height: 8px;
    border-radius: 4px;
    margin-bottom: 30px;
    overflow: hidden;
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.progress-fill {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    height: 100%;
    transition: width 0.5s ease;
    position: relative;
    z-index: 1;
}

.question-container {
    display: none;
}

.question-container.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

.question-number {
    color: #764ba2;
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 14px;
}

.question-text {
    color: #333;
    font-size: 20px;
    margin-bottom: 25px;
    line-height: 1.5;
}

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

.option {
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
}

.option:hover {
    background: #f0f0f0;
    border-color: #667eea;
    transform: translateX(4px);
}

.option.selected {
    background: #e8eaf6;
    border-color: #667eea;
    animation: selectPulse 0.2s ease;
}

@keyframes selectPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.01);
    }
    100% {
        transform: scale(1);
    }
}

.option input[type="radio"] {
    margin-right: 12px;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.option-text {
    color: #333;
    font-size: 16px;
    flex: 1;
}

.navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    gap: 12px;
}

button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
}

button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

button:hover::before {
    width: 300px;
    height: 300px;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

button:active {
    transform: translateY(0);
}

button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

button:disabled::before {
    display: none;
}

button.secondary {
    background: #e0e0e0;
    color: #333;
}

button.secondary:hover {
    background: #d0d0d0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.results {
    display: none;
    text-align: center;
}

.results.active {
    display: block;
    animation: resultsAppear 0.6s ease;
}

@keyframes resultsAppear {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.score {
    font-size: 64px;
    font-weight: 700;
    color: #667eea;
    margin: 20px 0;
    animation: scoreCount 1s ease-out;
}

@keyframes scoreCount {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    50% {
        transform: scale(1.1);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.score-message {
    font-size: 24px;
    color: #333;
    margin-bottom: 30px;
}

.answer-review {
    text-align: left;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #e0e0e0;
}

.review-item {
    margin-bottom: 20px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    animation: reviewSlideIn 0.4s ease;
    animation-fill-mode: both;
}

.review-item:nth-child(1) { animation-delay: 0.05s; }
.review-item:nth-child(2) { animation-delay: 0.1s; }
.review-item:nth-child(3) { animation-delay: 0.15s; }
.review-item:nth-child(4) { animation-delay: 0.2s; }
.review-item:nth-child(5) { animation-delay: 0.25s; }
.review-item:nth-child(6) { animation-delay: 0.3s; }
.review-item:nth-child(7) { animation-delay: 0.35s; }
.review-item:nth-child(8) { animation-delay: 0.4s; }
.review-item:nth-child(9) { animation-delay: 0.45s; }
.review-item:nth-child(10) { animation-delay: 0.5s; }
.review-item:nth-child(11) { animation-delay: 0.55s; }

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

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

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

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

.review-answer {
    color: #666;
    font-size: 14px;
}

.review-answer.correct {
    color: #4caf50;
}

.review-answer.incorrect {
    color: #f44336;
}

.restart-button {
    margin-top: 20px;
}
