/* Loading Bar Styles */
.question-loading-container {
    position: relative;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.loading-progress-bar {
    width: 100%;
    max-width: 400px;
    height: 6px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.loading-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #45a049);
    border-radius: 3px;
    width: 0%;
    transition: width 0.3s ease;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        box-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(76, 175, 80, 0.8);
    }
    100% {
        box-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
    }
}

.loading-message {
    color: #666;
    font-size: 0.9rem;
    text-align: center;
    animation: pulse 1.5s infinite;
}

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

/* Typing Animation for Questions */
.question-text-animated {
    position: relative;
    min-height: 60px;
}

.typing-text {
    display: inline;
    border-right: 2px solid #333;
    animation: blink-cursor 0.75s step-end infinite;
}

@keyframes blink-cursor {
    0%, 50% {
        border-color: #333;
    }
    51%, 100% {
        border-color: transparent;
    }
}

.typing-complete {
    border-right: none;
    animation: none;
}

/* Fade in animation for answers */
.answer-option {
    opacity: 0;
    animation: fadeInAnswer 0.5s ease forwards;
}

.answer-option:nth-child(1) {
    animation-delay: 0.1s;
}

.answer-option:nth-child(2) {
    animation-delay: 0.2s;
}

.answer-option:nth-child(3) {
    animation-delay: 0.3s;
}

.answer-option:nth-child(4) {
    animation-delay: 0.4s;
}

@keyframes fadeInAnswer {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Slideshow loading animation */
.slide-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
    transition: opacity 0.3s ease;
}

.slide-loading-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

/* Loading dots animation */
.loading-dots {
    display: inline-flex;
    gap: 0.3rem;
}

.loading-dot {
    width: 10px;
    height: 10px;
    background: #4CAF50;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.loading-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.loading-dot:nth-child(2) {
    animation-delay: -0.16s;
}

.loading-dot:nth-child(3) {
    animation-delay: 0;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

/* Smooth transitions */
.question-container {
    transition: opacity 0.3s ease;
}

.question-container.loading {
    opacity: 0.5;
}

/* Image loading placeholder */
.image-loading-placeholder {
    width: 100%;
    height: 300px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading-shimmer 1.5s infinite;
    border-radius: 8px;
}

@keyframes loading-shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}