/* Learning Hub Specific Styles */

.learning-hero {
    position: relative;
    overflow: hidden;
}

.learning-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* Level Tab Styles */
.level-tab {
    transition: all 0.3s ease;
    position: relative;
}

.level-tab.active-tab {
    background: linear-gradient(to bottom, transparent, rgba(59, 130, 246, 0.05));
}

.level-tab:hover {
    background: rgba(0, 0, 0, 0.02);
}

/* Lesson Card Styles */
.lesson-card {
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1.25rem;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.lesson-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.lesson-card.completed::before {
    transform: scaleX(1);
}

.lesson-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.lesson-card.locked {
    opacity: 0.6;
    cursor: not-allowed;
}

.lesson-card.locked:hover {
    transform: none;
    box-shadow: none;
}

/* Progress Bar Animations */
.progress-bar {
    position: relative;
    background: #f3f4f6;
    border-radius: 9999px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 9999px;
    transition: width 0.5s ease-out;
    position: relative;
    overflow: hidden;
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Achievement Badge Styles */
.achievement-badge {
    transition: all 0.3s ease;
    position: relative;
}

.achievement-badge.earned {
    animation: earnBadge 0.6s ease-out;
}

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

@keyframes earnBadge {
    0% {
        transform: scale(0) rotate(0deg);
    }
    50% {
        transform: scale(1.2) rotate(180deg);
    }
    100% {
        transform: scale(1) rotate(360deg);
    }
}

/* Practice Section Styles */
.practice-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 1rem;
    padding: 2rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.practice-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulse 3s ease-in-out infinite;
}

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

/* Quiz Styles */
.quiz-option {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1rem;
    margin: 0.5rem 0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quiz-option:hover {
    border-color: #9333ea;
    background: #faf5ff;
}

.quiz-option.selected {
    border-color: #9333ea;
    background: #f3e8ff;
}

.quiz-option.correct {
    border-color: #10b981;
    background: #d1fae5;
    animation: correctAnswer 0.5s ease;
}

.quiz-option.incorrect {
    border-color: #ef4444;
    background: #fee2e2;
    animation: shake 0.5s ease;
}

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

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

/* Streak Counter */
.streak-counter {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-weight: bold;
    animation: flameFlicker 2s ease-in-out infinite;
}

@keyframes flameFlicker {
    0%, 100% {
        transform: scale(1);
        filter: brightness(1);
    }
    50% {
        transform: scale(1.05);
        filter: brightness(1.2);
    }
}

/* Level Badge Colors */
.beginner-badge {
    background: linear-gradient(135deg, #10b981, #34d399);
}

.intermediate-badge {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
}

.advanced-badge {
    background: linear-gradient(135deg, #9333ea, #a855f7);
}

/* Responsive Design */
@media (max-width: 768px) {
    .lesson-card {
        padding: 1rem;
    }

    .level-tab {
        font-size: 0.875rem;
        padding: 0.75rem 0.5rem;
    }

    .practice-card {
        padding: 1.5rem;
    }
}