/* Question-Answer Intro Animation Styles */

.question-intro-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    z-index: 10005;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: fadeInIntro 0.6s ease-out forwards;
}

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

.intro-content {
    max-width: 800px;
    width: 90%;
    text-align: center;
    padding: 40px;
}

.intro-header {
    margin-bottom: 60px;
}

.intro-header h2 {
    color: white;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #FFD166 0%, #FF6B6B 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.intro-header p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.2rem;
    line-height: 1.5;
}

.example-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 30px;
    margin: 20px 0 60px 0;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Question Display */
.question-display {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
    margin-bottom: 30px;
}

.question-display.visible {
    opacity: 1;
    transform: translateY(0);
}

.question-text {
    background: rgba(66, 165, 245, 0.15);
    border: 2px solid #42A5F5;
    border-radius: 20px;
    padding: 24px 32px;
    color: white;
    font-size: 1.3rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 16px;
    text-align: left;
}

.question-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
}

/* Answer Display */
.answer-display {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.answer-display.visible {
    opacity: 1;
    transform: translateY(0);
}

.answer-wrong, .answer-correct {
    border-radius: 16px;
    padding: 20px 28px;
    display: flex;
    align-items: center;
    gap: 16px;
    text-align: left;
    font-size: 1.1rem;
    transition: all 0.5s ease;
}

/* Wrong Answer Styles */
.answer-wrong {
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
}

.answer-wrong.strikethrough {
    background: rgba(244, 67, 54, 0.15);
    border-color: #F44336;
    animation: strikethroughAnimation 1s ease-out forwards;
}

.answer-wrong.strikethrough .answer-text {
    position: relative;
}

.answer-wrong.strikethrough .answer-text::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 0;
    height: 3px;
    background: #F44336;
    animation: strikethrough 0.8s ease-out forwards;
}

@keyframes strikethroughAnimation {
    to {
        transform: scale(0.98);
        opacity: 0.6;
    }
}

@keyframes strikethrough {
    to {
        width: 100%;
    }
}

/* Correct Answer Styles */
.answer-correct {
    background: rgba(76, 175, 80, 0.15);
    border: 2px solid #4CAF50;
    color: white;
    opacity: 0;
    transform: translateY(20px);
    animation: slideInCorrect 0.8s ease-out forwards;
}

.answer-correct.highlight {
    animation: slideInCorrect 0.8s ease-out forwards, greenGlow 2s ease-in-out infinite;
}

@keyframes slideInCorrect {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes greenGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(76, 175, 80, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(76, 175, 80, 0.6), 0 0 40px rgba(76, 175, 80, 0.2);
    }
}

.answer-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

/* Continue Button */
.intro-footer {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 10003;
    text-align: center;
}

.intro-footer.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.intro-continue-btn {
    background: linear-gradient(135deg, #4CAF50 0%, #45A049 100%);
    color: white;
    border: none;
    padding: 20px 50px;
    border-radius: 30px;
    font-size: 1.3rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 12px 35px rgba(76, 175, 80, 0.4);
    position: relative;
    overflow: hidden;
    animation: buttonPulse 2s infinite;
    min-width: 200px;
}

.intro-continue-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s;
}

.intro-continue-btn:hover::before {
    left: 100%;
}

@keyframes buttonPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 12px 35px rgba(76, 175, 80, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 16px 45px rgba(76, 175, 80, 0.6);
    }
}

.intro-continue-btn:hover {
    transform: translateY(-3px) scale(1.08);
    box-shadow: 0 16px 45px rgba(76, 175, 80, 0.6);
    animation: none;
}

.intro-continue-btn:active {
    transform: translateY(-1px) scale(1.02);
}

/* Responsive Design */
@media (max-width: 768px) {
    .intro-content {
        padding: 20px;
        width: 95%;
    }
    
    .intro-header h2 {
        font-size: 2rem;
    }
    
    .intro-header p {
        font-size: 1rem;
    }
    
    .example-container {
        padding: 20px;
        min-height: 200px;
        margin: 15px 0 40px 0;
    }
    
    .question-text {
        font-size: 1.1rem;
        padding: 18px 20px;
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .answer-wrong, .answer-correct {
        font-size: 1rem;
        padding: 14px 18px;
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .intro-footer {
        bottom: 80px;
    }
    
    .intro-continue-btn {
        padding: 18px 40px;
        font-size: 1.2rem;
        min-width: 180px;
    }
}

/* Animation for better mobile performance */
@media (prefers-reduced-motion: reduce) {
    .question-intro-animation,
    .question-display,
    .answer-display,
    .intro-footer {
        animation: none;
        transition: none;
    }
    
    .question-display.visible,
    .answer-display.visible,
    .intro-footer.visible {
        opacity: 1;
        transform: none;
    }
}