* {
    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;
}

.quiz-container {
    max-width: 900px;
    margin: 0 auto;
}

.screen {
    display: none;
}

.screen.active {
    display: block;
}

/* Start Screen */
#start-screen .card {
    border: none;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.98);
}

.quiz-info {
    border: 2px dashed #667eea;
}

.topics-covered {
    border: 1px solid #e0e0e0;
}

.topics-covered ul li {
    margin-bottom: 8px;
    font-size: 14px;
}

.topics-covered ul li i {
    margin-right: 8px;
}

#start-btn {
    border-radius: 50px;
    padding: 15px 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

#start-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.4);
}

/* Quiz Screen */
.quiz-header {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.progress-info {
    font-weight: 600;
    color: #667eea;
}

.timer {
    font-weight: 700;
    color: #dc3545;
}

.timer.warning {
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.question-card {
    border: none;
    border-radius: 15px;
    transition: all 0.3s ease;
}

.question-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.question-topic {
    margin-bottom: 15px;
}

.question-text {
    color: #333;
    font-weight: 600;
    line-height: 1.6;
}

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

.option-btn {
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background: #fff;
    text-align: left;
    transition: all 0.3s ease;
    font-size: 15px;
    cursor: pointer;
    position: relative;
}

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

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

.option-btn.selected::after {
    content: '\F26A';
    font-family: 'bootstrap-icons';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.option-btn.correct {
    border-color: #28a745;
    background: #d4edda;
    color: #155724;
}

.option-btn.correct::after {
    content: '\F634';
    font-family: 'bootstrap-icons';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.option-btn.wrong {
    border-color: #dc3545;
    background: #f8d7da;
    color: #721c24;
}

.option-btn.wrong::after {
    content: '\F62A';
    font-family: 'bootstrap-icons';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.option-btn.show-correct {
    border-color: #28a745;
    background: #d4edda;
}

.quiz-navigation {
    gap: 15px;
}

.quiz-navigation .btn {
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.quiz-navigation .btn:hover {
    transform: translateY(-2px);
}

/* Question Navigator */
.question-navigator {
    border: none;
    border-radius: 15px;
}

.question-navigator .card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 15px 15px 0 0 !important;
}

#navigator-grid {
    max-height: 300px;
    overflow-y: auto;
}

.navigator-btn {
    width: 45px;
    height: 45px;
    border-radius: 10px;
    border: 2px solid #e0e0e0;
    background: #fff;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.navigator-btn:hover {
    border-color: #667eea;
    transform: scale(1.1);
}

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

.navigator-btn.current {
    border-color: #17a2b8;
    background: #17a2b8;
    color: white;
    box-shadow: 0 0 0 3px rgba(23, 162, 184, 0.3);
}

/* Result Screen */
#result-screen .card {
    border: none;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.98);
}

.score-circle {
    width: 200px;
    height: 200px;
    position: relative;
}

.score-circle svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.score-bg {
    fill: none;
    stroke: #e0e0e0;
    stroke-width: 8;
}

.score-progress {
    fill: none;
    stroke: url(#gradient);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 283;
    stroke-dashoffset: 283;
    transition: stroke-dashoffset 1.5s ease;
}

.score-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 42px;
    font-weight: 700;
    color: #667eea;
}

.stat-item i {
    margin-bottom: 10px;
}

.stat-item h4 {
    font-weight: 700;
    color: #333;
}

.grade-display {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    padding: 30px;
}

#final-grade {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Review Screen */
#review-screen .card {
    border: none;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.98);
}

#review-content {
    max-height: 600px;
    overflow-y: auto;
}

.review-question {
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    background: #fff;
}

.review-question.correct {
    border-color: #28a745;
    background: #f8fff8;
}

.review-question.wrong {
    border-color: #dc3545;
    background: #fff8f8;
}

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

.review-question-number {
    font-weight: 700;
    color: #667eea;
}

.review-question-status {
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.review-question-status.correct {
    background: #d4edda;
    color: #155724;
}

.review-question-status.wrong {
    background: #f8d7da;
    color: #721c24;
}

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

.review-option {
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 14px;
}

.review-option.user-selected {
    background: #e7f3ff;
    border-left: 4px solid #667eea;
}

.review-option.correct-answer {
    background: #d4edda;
    border-left: 4px solid #28a745;
}

.review-option.wrong-answer {
    background: #f8d7da;
    border-left: 4px solid #dc3545;
}

/* Footer */
footer {
    color: rgba(255, 255, 255, 0.9);
}

footer a {
    color: #fff;
    text-decoration: underline;
}

footer a:hover {
    color: #fff;
    text-decoration: none;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .quiz-info .row {
        flex-direction: column;
    }
    
    .score-circle {
        width: 150px;
        height: 150px;
    }
    
    .score-text {
        font-size: 32px;
    }
    
    .quiz-navigation {
        flex-direction: column;
    }
    
    .quiz-navigation .btn {
        width: 100%;
    }
    
    #navigator-grid {
        justify-content: center;
    }
    
    .navigator-btn {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
}

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

.screen.active {
    animation: fadeIn 0.5s ease;
}

.option-btn {
    animation: slideIn 0.3s ease;
}

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

/* Scrollbar Styling */
#review-content::-webkit-scrollbar,
#navigator-grid::-webkit-scrollbar {
    width: 8px;
}

#review-content::-webkit-scrollbar-track,
#navigator-grid::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

#review-content::-webkit-scrollbar-thumb,
#navigator-grid::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

#review-content::-webkit-scrollbar-thumb:hover,
#navigator-grid::-webkit-scrollbar-thumb:hover {
    background: #764ba2;
}
