/* ===== FUN INTERACTIVE CONTENT STYLES ===== */

/* Fun Fact Card */
.fun-fact-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 24px;
    margin: 24px 0;
    position: relative;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    overflow: hidden;
}

.fun-fact-card::before {
    content: '✨';
    position: absolute;
    top: -20px;
    right: -20px;
    font-size: 80px;
    opacity: 0.1;
    animation: sparkle 3s infinite;
}

.fun-fact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.4);
}

.fun-fact-card.flipping {
    animation: cardFlip 0.6s ease;
}

@keyframes cardFlip {
    0%, 100% { transform: rotateY(0deg); }
    50% { transform: rotateY(90deg); }
}

@keyframes sparkle {
    0%, 100% { transform: rotate(0deg) scale(1); opacity: 0.1; }
    50% { transform: rotate(180deg) scale(1.2); opacity: 0.2; }
}

.fun-fact-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.fun-fact-icon {
    font-size: 48px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.fun-fact-text {
    color: white;
    font-size: 16px;
    line-height: 1.6;
    flex: 1;
}

.fun-fact-next {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.fun-fact-next:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(180deg);
}

.fun-fact-next:active {
    transform: scale(0.9) rotate(180deg);
}

/* Quiz Card */
.quiz-card {
    background: var(--bg-primary);
    border: 2px solid var(--accent-primary);
    border-radius: 16px;
    padding: 24px;
    margin: 24px 0;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.2);
    animation: slideInUp 0.5s ease;
}

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

.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border-color);
}

.quiz-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 20px;
}

.quiz-score {
    background: var(--accent-primary);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
}

.quiz-question {
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.question-text {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 20px;
    line-height: 1.6;
}

.quiz-options {
    display: grid;
    gap: 12px;
}

.quiz-option {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    font-size: 16px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.quiz-option:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
    transform: translateX(10px);
}

.quiz-option:active {
    transform: scale(0.98);
}

.quiz-result {
    text-align: center;
    padding: 32px;
    animation: popIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes popIn {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.result-icon {
    font-size: 64px;
    margin-bottom: 16px;
    animation: iconBounce 0.8s ease;
}

@keyframes iconBounce {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.2); }
    50% { transform: scale(0.9); }
    75% { transform: scale(1.1); }
}

.quiz-result h4 {
    font-size: 24px;
    margin: 0 0 12px 0;
    color: var(--text-primary);
}

.quiz-result p {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 24px;
}

.quiz-result.correct {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%);
    border-radius: 12px;
}

.quiz-result.wrong {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(245, 158, 11, 0.05) 100%);
    border-radius: 12px;
}

.quiz-next-btn, .quiz-restart-btn {
    background: var(--accent-gradient);
    border: none;
    border-radius: 12px;
    padding: 14px 32px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.quiz-next-btn:hover, .quiz-restart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.4);
}

.quiz-next-btn:active, .quiz-restart-btn:active {
    transform: translateY(0);
}

.quiz-final {
    text-align: center;
    padding: 40px 20px;
}

.final-emoji {
    font-size: 80px;
    margin-bottom: 20px;
    animation: celebration 1s ease infinite;
}

@keyframes celebration {
    0%, 100% { transform: rotate(-10deg); }
    50% { transform: rotate(10deg); }
}

.quiz-final h3 {
    font-size: 28px;
    color: var(--text-primary);
    margin: 0 0 16px 0;
}

.final-score {
    font-size: 48px;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 16px 0;
}

.final-percentage {
    font-size: 32px;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

/* Motivational Banner */
.motivational-banner {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 16px;
    padding: 20px 24px;
    margin: 24px 0;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 6px 20px rgba(245, 87, 108, 0.3);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.motivational-banner.visible {
    opacity: 1;
    transform: translateY(0);
}

.banner-emoji {
    font-size: 40px;
    animation: pulse 2s ease infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.banner-text {
    color: white;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
}

/* Enhanced Achievement Cards with Animations */
.achievement-badge {
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    cursor: pointer;
    position: relative;
}

.achievement-badge::before {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 12px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.achievement-badge:hover::before {
    opacity: 0.2;
}

.achievement-badge:hover {
    transform: scale(1.1) rotate(5deg);
}

.achievement-badge.unlocked {
    animation: unlockPop 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes unlockPop {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

.achievement-badge.locked {
    filter: grayscale(100%);
    opacity: 0.5;
}

.achievement-badge.locked:hover {
    filter: grayscale(70%);
    opacity: 0.7;
}

/* Sparkle effects */
.achievement-badge.unlocked::after {
    content: '✨';
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 20px;
    animation: sparkleFloat 2s infinite;
}

@keyframes sparkleFloat {
    0%, 100% { transform: translate(0, 0) rotate(0deg); opacity: 1; }
    50% { transform: translate(5px, -5px) rotate(180deg); opacity: 0.5; }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .fun-fact-content {
        flex-direction: column;
        text-align: center;
    }
    
    .fun-fact-icon {
        font-size: 40px;
    }
    
    .fun-fact-text {
        font-size: 14px;
    }
    
    .quiz-header h3 {
        font-size: 18px;
    }
    
    .question-text {
        font-size: 16px;
    }
    
    .quiz-option {
        padding: 12px;
        font-size: 14px;
    }
    
    .banner-emoji {
        font-size: 32px;
    }
    
    .banner-text {
        font-size: 16px;
    }
}

/* Dark Theme Adjustments */
[data-theme="dark"] .fun-fact-card {
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

[data-theme="dark"] .quiz-card {
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
    border-color: var(--accent-secondary);
}

[data-theme="dark"] .motivational-banner {
    box-shadow: 0 6px 20px rgba(245, 87, 108, 0.4);
}
