/* 🎓✨ Cyber Academy WOW Effects - Supreme Kawaii Excellence! */

/* ========== Animated Background Patterns ========== */
.course-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(0, 255, 255, 0.1) 50%,
        transparent 70%
    );
    transform: rotate(45deg);
    transition: all 0.5s ease;
    opacity: 0;
}

.course-card:hover::before {
    animation: shimmerWave 1s ease-in-out;
}

/* ========== Floating Elements ========== */
.course-card .course-icon {
    position: relative;
    font-size: 3rem;
    margin-bottom: var(--spacing-sm);
    display: inline-block;
    animation: floatIcon 3s ease-in-out infinite;
}

.course-card:hover .course-icon {
    animation: bounceRotate 0.6s ease-out;
}

/* ========== Progress Rings with Glow ========== */
.course-card .progress-ring {
    position: relative;
    width: 60px;
    height: 60px;
    margin: 0 auto var(--spacing-md);
}

.course-card .progress-ring svg {
    transform: rotate(-90deg);
    filter: drop-shadow(0 0 10px currentColor);
}

.course-card.beginner .progress-arc {
    stroke: #00ff88;
    animation: pulseStroke 2s ease-in-out infinite;
}

.course-card.intermediate .progress-arc {
    stroke: #00b4ff;
    animation: pulseStroke 2s ease-in-out infinite 0.3s;
}

.course-card.advanced .progress-arc {
    stroke: #b700ff;
    animation: pulseStroke 2s ease-in-out infinite 0.6s;
}

.course-card.special .progress-arc {
    stroke: url(#rainbow-gradient);
    animation: rotateRainbow 3s linear infinite;
}

/* ========== Particle Effects ========== */
.course-card .particle-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.course-card .particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: currentColor;
    border-radius: 50%;
    opacity: 0;
}

.course-card:hover .particle {
    animation: particleFloat 2s ease-out infinite;
}

.course-card:hover .particle:nth-child(1) { animation-delay: 0s; left: 10%; }
.course-card:hover .particle:nth-child(2) { animation-delay: 0.2s; left: 30%; }
.course-card:hover .particle:nth-child(3) { animation-delay: 0.4s; left: 50%; }
.course-card:hover .particle:nth-child(4) { animation-delay: 0.6s; left: 70%; }
.course-card:hover .particle:nth-child(5) { animation-delay: 0.8s; left: 90%; }

/* ========== XP Counter Animation ========== */
.course-card .xp-reward {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #000;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.875rem;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    animation: xpGlow 2s ease-in-out infinite;
}

/* ========== Special Course Effects ========== */
.course-card.special {
    background: 
        linear-gradient(135deg, 
            rgba(255, 0, 255, 0.05), 
            rgba(0, 255, 255, 0.05)),
        rgba(45, 45, 74, 0.9);
    border-color: rgba(255, 0, 255, 0.5);
}

.course-card.special::after {
    content: '⭐';
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 2rem;
    animation: starSpin 3s linear infinite;
}

/* ========== Hidden Portal Effect (Easter Egg) ========== */
.course-card.special:hover {
    animation: portalPulse 1s ease-in-out;
}

.course-card.special:hover::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, 
        rgba(255, 0, 255, 0.8), 
        rgba(0, 255, 255, 0.8), 
        transparent);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: portalOpen 0.6s ease-out forwards;
}

/* ========== Animations ========== */
@keyframes shimmerWave {
    0% { opacity: 0; transform: rotate(45deg) translateX(-100%); }
    50% { opacity: 1; }
    100% { opacity: 0; transform: rotate(45deg) translateX(100%); }
}

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

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

@keyframes pulseStroke {
    0%, 100% { stroke-width: 6; opacity: 1; }
    50% { stroke-width: 8; opacity: 0.8; }
}

@keyframes rotateRainbow {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes particleFloat {
    0% {
        opacity: 0;
        transform: translateY(0) scale(0);
    }
    20% {
        opacity: 1;
        transform: translateY(-20px) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-80px) scale(0);
    }
}

@keyframes xpGlow {
    0%, 100% { 
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 0 30px rgba(255, 215, 0, 0.8);
        transform: scale(1.05);
    }
}

@keyframes starSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

@keyframes portalOpen {
    0% {
        width: 0;
        height: 0;
        opacity: 0;
    }
    100% {
        width: 200px;
        height: 200px;
        opacity: 0.3;
    }
}

/* ========== Rainbow Gradient Definition ========== */
.course-card svg {
    position: absolute;
    width: 0;
    height: 0;
}

/* ========== Compact Content Styling ========== */
.course-card .course-header {
    text-align: center;
    margin-bottom: var(--spacing-sm);
}

.course-card .course-header h3 {
    font-size: 1.1rem;
    margin: var(--spacing-xs) 0;
    color: var(--primary-cyan);
    text-shadow: 0 0 10px currentColor;
}

.course-card .difficulty-badge {
    display: inline-block;
    padding: 2px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.course-card.beginner .difficulty-badge {
    background: rgba(0, 255, 136, 0.2);
    color: #00ff88;
    border: 1px solid #00ff88;
}

.course-card.intermediate .difficulty-badge {
    background: rgba(0, 180, 255, 0.2);
    color: #00b4ff;
    border: 1px solid #00b4ff;
}

.course-card.advanced .difficulty-badge {
    background: rgba(183, 0, 255, 0.2);
    color: #b700ff;
    border: 1px solid #b700ff;
}

.course-card.special .difficulty-badge {
    background: linear-gradient(135deg, 
        rgba(255, 0, 255, 0.2), 
        rgba(0, 255, 255, 0.2));
    color: #fff;
    border: 1px solid transparent;
    animation: rainbowBorder 3s linear infinite;
}

@keyframes rainbowBorder {
    0%, 100% { border-color: #ff00ff; }
    33% { border-color: #00ffff; }
    66% { border-color: #ffff00; }
}

/* ========== Mobile Optimizations ========== */
@media (max-width: 768px) {
    .course-card {
        min-height: 240px;
        max-height: 280px;
    }
    
    .course-card .course-icon {
        font-size: 2.5rem;
    }
    
    .course-card .progress-ring {
        width: 50px;
        height: 50px;
    }
}