
body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.quiz-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-radius: 20px;
    background: white;
    position: relative;
    overflow: hidden;
}

.quiz-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #4481eb, #04befe);
}

.quiz-progress {
    transition: all 0.3s ease;
    margin-bottom: 2rem;
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 15px;
}

.quiz-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 1.5rem;
    text-align: center;
}

.quiz-stat-item {
    background: white;
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    min-width: 120px;
}

@media (max-width: 768px) {
    .quiz-stats {
        flex-direction: row;
        justify-content: space-between;
        background: white;
        padding: 1rem;
        border-radius: 15px;
        box-shadow: none; /* Remove box-shadow */
    }

    .quiz-stat-item {
        min-width: auto;
        flex: 1;
        padding: 0.5rem;
        margin: 0;
    }

    /* Hide all text content on mobile */
    .quiz-stat-item div {
        display: none;
    }

    .quiz-stat-item strong {
        font-size: 1rem;
        display: block;
    }
}

.quiz-stat-item i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #4481eb;
}

.quiz-question {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.5s ease forwards;
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.quiz-option {
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid #e9ecef;
    margin: 0.8rem 0;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    position: relative;
    padding-left: 3rem;
    background: white;
}

.quiz-option::before {
    content: '';
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 2px solid #dee2e6;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.quiz-option:hover {
    transform: translateX(5px);
    border-color: #4481eb;
    background: #f8f9fa;
}

.quiz-option.correct {
    background-color: rgba(40, 167, 69, 0.1);
    border-color: #28a745;
    animation: correctAnswer 0.5s ease;
}

.quiz-option.correct::before {
    background: #28a745;
    border-color: #28a745;
    animation: checkmark 0.5s ease forwards;
}

.quiz-option.incorrect {
    background-color: rgba(220, 53, 69, 0.1);
    border-color: #dc3545;
    animation: shake 0.5s ease;
}

.quiz-option.incorrect::before {
    background: #dc3545;
    border-color: #dc3545;
}

.quiz-nav-btn {
    transition: all 0.3s ease;
    padding: 0.8rem 2rem;
    border-radius: 10px;
    font-weight: 500;
}

.quiz-nav-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.quiz-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.progress {
    height: 10px;
    border-radius: 5px;
    background: #e9ecef;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, #4481eb, #04befe);
    transition: width 0.5s ease;
}

/* Animation keyframes */
@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes correctAnswer {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes checkmark {
    0% {
        transform: translateY(-50%) scale(0.5);
        opacity: 0;
    }
    100% {
        transform: translateY(-50%) scale(1);
        opacity: 1;
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}

.celebration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
}

.celebration-particle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #28a745;
    border-radius: 50%;
    animation: celebrate 1s ease-out forwards;
}

@keyframes celebrate {
    0% {
        transform: scale(0) translate(0, 0);
        opacity: 1;
    }
    100% {
        transform: scale(1) translate(var(--tx), var(--ty));
        opacity: 0;
    }
}

.correct-icon {
    position: absolute;
    right: 1rem;
    opacity: 0;
    color: #28a745;
    font-size: 1.5rem;
}

.quiz-option.correct .correct-icon {
    animation: fadeInIcon 0.5s ease forwards 0.2s;
}

@keyframes fadeInIcon {
    to {
        opacity: 1;
    }
}