/* ===== ANIMATIONS & EFFECTS ===== */

/* ===== PAGE ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== HOVER ANIMATIONS ===== */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px var(--primary-purple);
    }
    50% {
        box-shadow: 0 0 20px var(--primary-purple), 0 0 30px var(--primary-purple);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-10px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(10px);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* ===== LOADING ANIMATIONS ===== */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes loadingDots {
    0%, 20% {
        color: var(--text-muted);
        text-shadow: 0.25em 0 0 var(--text-muted), 0.5em 0 0 var(--text-muted);
    }
    40% {
        color: var(--primary-purple);
        text-shadow: 0.25em 0 0 var(--text-muted), 0.5em 0 0 var(--text-muted);
    }
    60% {
        text-shadow: 0.25em 0 0 var(--primary-purple), 0.5em 0 0 var(--text-muted);
    }
    80%, 100% {
        text-shadow: 0.25em 0 0 var(--primary-purple), 0.5em 0 0 var(--primary-purple);
    }
}

/* ===== GRADIENT ANIMATIONS ===== */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes rainbow {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* ===== PARTICLE ANIMATIONS ===== */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes drift {
    0% {
        transform: translateX(0px) translateY(0px);
    }
    25% {
        transform: translateX(20px) translateY(-20px);
    }
    50% {
        transform: translateX(-10px) translateY(-40px);
    }
    75% {
        transform: translateX(-30px) translateY(-20px);
    }
    100% {
        transform: translateX(0px) translateY(0px);
    }
}

/* ===== ANIMATION CLASSES ===== */
.animate-in {
    animation: fadeInUp 0.6s ease-out;
}

.animate-fade-in {
    animation: fadeInUp 0.8s ease-out;
}

.animate-scale-in {
    animation: scaleIn 0.5s ease-out;
}

.animate-slide-in-top {
    animation: slideInFromTop 0.6s ease-out;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

.animate-glow {
    animation: glow 2s infinite;
}

.animate-shake {
    animation: shake 0.5s ease-in-out;
}

.animate-bounce {
    animation: bounce 2s infinite;
}

.animate-spin {
    animation: spin 1s linear infinite;
}

.animate-loading {
    animation: loadingDots 1.5s infinite;
}

.animate-gradient {
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-drift {
    animation: drift 6s ease-in-out infinite;
}

/* ===== HOVER EFFECTS ===== */
.hover-lift {
    transition: var(--transition-normal);
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.hover-glow {
    transition: var(--transition-normal);
}

.hover-glow:hover {
    box-shadow: 0 0 20px var(--primary-purple);
}

.hover-scale {
    transition: var(--transition-normal);
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-rotate {
    transition: var(--transition-normal);
}

.hover-rotate:hover {
    transform: rotate(5deg);
}

/* ===== DISCOORD ICON ANIMATIONS ===== */
@keyframes discordFloat {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    25% {
        transform: translateY(-15px) rotate(1deg);
    }
    50% {
        transform: translateY(-25px) rotate(0deg);
    }
    75% {
        transform: translateY(-15px) rotate(-1deg);
    }
}

@keyframes discordGlow {
    0% {
        box-shadow: 0 0 50px rgba(88, 101, 242, 0.5), 0 0 100px rgba(88, 101, 242, 0.3);
    }
    100% {
        box-shadow: 0 0 80px rgba(88, 101, 242, 0.8), 0 0 150px rgba(88, 101, 242, 0.5);
    }
}

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

@keyframes logoGlow {
    0% {
        box-shadow: 0 4px 15px rgba(88, 101, 242, 0.4), 0 0 20px rgba(139, 92, 246, 0.3);
    }
    100% {
        box-shadow: 0 6px 20px rgba(88, 101, 242, 0.6), 0 0 30px rgba(139, 92, 246, 0.5);
    }
}

.discord-icon i {
    animation: discordSpin 8s linear infinite;
}

.pulse-ring {
    animation: pulse-ring 2s ease-out infinite;
}

.pulse-ring-2 {
    animation: pulse-ring 2s ease-out infinite 0.5s;
}

/* ===== BUTTON ANIMATIONS ===== */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: var(--transition-slow);
}

.btn:hover::before {
    left: 100%;
}

.btn:active {
    transform: scale(0.95);
}

/* ===== CARD ANIMATIONS ===== */
.feature-card, .server-card, .premium-card {
    transition: var(--transition-normal);
}

.feature-card:hover {
    transform: translateY(-10px) scale(1.02);
}

.server-card:hover {
    transform: translateY(-5px);
}

.premium-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

/* ===== NAVIGATION ANIMATIONS ===== */
.nav-link {
    position: relative;
    transition: var(--transition-fast);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition-fast);
}

.nav-link:hover::after {
    width: 100%;
}

/* ===== MODAL ANIMATIONS ===== */
.page-overlay {
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-normal);
}

.page-overlay.active {
    opacity: 1;
    visibility: visible;
}

.overlay-content {
    transform: scale(0.8);
    transition: var(--transition-normal);
}

.page-overlay.active .overlay-content {
    transform: scale(1);
}

/* ===== NOTIFICATION ANIMATIONS ===== */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    z-index: 10000;
    transform: translateX(400px);
    opacity: 0;
    transition: var(--transition-normal);
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification-info {
    border-left: 4px solid var(--accent-blue);
}

.notification-success {
    border-left: 4px solid #10B981;
}

.notification-error {
    border-left: 4px solid #EF4444;
}

.notification-warning {
    border-left: 4px solid var(--accent-gold);
}

/* ===== PROGRESS BAR ANIMATIONS ===== */
.progress-bar {
    position: relative;
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: loading 2s infinite;
}

@keyframes loading {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* ===== TEXT ANIMATIONS ===== */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
}

.text-glow {
    text-shadow: 0 0 10px var(--primary-purple);
}

.text-shake {
    animation: shake 0.5s ease-in-out;
}

/* ===== SCROLL ANIMATIONS ===== */
.scroll-indicator {
    animation: bounce 2s infinite;
}

.scroll-arrow {
    animation: pulse 2s infinite;
}

/* ===== LOADING SPINNER ===== */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--glass-border);
    border-top: 4px solid var(--primary-purple);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner-small {
    width: 20px;
    height: 20px;
    border: 2px solid var(--glass-border);
    border-top: 2px solid var(--primary-purple);
}

/* ===== PARTICLE EFFECTS ===== */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    background: var(--primary-purple);
    border-radius: 50%;
    opacity: 0.6;
    animation: drift 8s infinite linear;
}

.particle:nth-child(1) { animation-delay: 0s; }
.particle:nth-child(2) { animation-delay: 1s; }
.particle:nth-child(3) { animation-delay: 2s; }
.particle:nth-child(4) { animation-delay: 3s; }
.particle:nth-child(5) { animation-delay: 4s; }

/* ===== RESPONSIVE ANIMATIONS ===== */
@media (max-width: 768px) {
    .animate-float {
        animation: none;
    }
    
    .animate-drift {
        animation: none;
    }
    
    .discord-icon {
        animation: none;
    }
    
    .pulse-ring,
    .pulse-ring-2 {
        animation: none;
    }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .animate-float,
    .animate-drift,
    .animate-pulse,
    .animate-glow,
    .animate-bounce {
        animation: none;
    }
}

/* ===== FEATURE CARD ANIMATIONS ===== */
@keyframes slideInFromLeft {
    from {
        transform: translateX(-100px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInFromRight {
    from {
        transform: translateX(100px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInFromSide {
    from {
        transform: translateX(-50px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

@keyframes wiggle {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(5deg);
    }
    75% {
        transform: rotate(-5deg);
    }
}

@keyframes pulse-ring {
    0% {
        transform: scale(0.33);
        opacity: 1;
    }
    80%, 100% {
        transform: scale(2.4);
        opacity: 0;
    }
}

@keyframes musicBars {
    0%, 100% {
        height: 20px;
    }
    50% {
        height: 60px;
    }
}

@keyframes borderGlow {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.02);
    }
}

@keyframes iconPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 
            0 0 30px rgba(255, 215, 0, 0.8),
            0 0 60px rgba(255, 215, 0, 0.4),
            0 8px 25px rgba(0, 0, 0, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 
            0 0 40px rgba(255, 215, 0, 1),
            0 0 80px rgba(255, 215, 0, 0.6),
            0 12px 30px rgba(0, 0, 0, 0.4);
    }
}

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

@keyframes visualizerShine {
    0% {
        left: -100%;
    }
    50% {
        left: 100%;
    }
    100% {
        left: 100%;
    }
}

@keyframes playButtonGlow {
    0%, 100% {
        box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5);
    }
    50% {
        box-shadow: 0 8px 25px rgba(255, 215, 0, 0.8);
    }
}

/* ===== BUTTON ANIMATIONS ===== */
@keyframes buttonGlow {
    0%, 100% { 
        box-shadow: 
            0 15px 40px rgba(0, 0, 0, 0.5),
            0 0 30px rgba(139, 92, 246, 0.4),
            0 0 60px rgba(139, 92, 246, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }
    50% { 
        box-shadow: 
            0 20px 50px rgba(0, 0, 0, 0.6),
            0 0 40px rgba(139, 92, 246, 0.6),
            0 0 80px rgba(139, 92, 246, 0.4),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
}

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

@keyframes buttonShimmer {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

@keyframes secondaryButtonGlow {
    0%, 100% { 
        box-shadow: 
            0 12px 35px rgba(0, 0, 0, 0.4),
            0 0 20px rgba(100, 100, 100, 0.1),
            inset 0 1px 0 rgba(255, 255, 255, 0.1);
    }
    50% { 
        box-shadow: 
            0 18px 45px rgba(0, 0, 0, 0.5),
            0 0 30px rgba(139, 92, 246, 0.3),
            0 0 50px rgba(139, 92, 246, 0.1),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }
}

/* ===== LANGUAGE TOGGLE ANIMATIONS ===== */
@keyframes languageShimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* ===== LOGO ANIMATIONS ===== */
@keyframes logoGlow {
    0%, 100% { 
        box-shadow: 
            0 8px 25px rgba(139, 92, 246, 0.4),
            0 0 15px rgba(139, 92, 246, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
        transform: scale(1);
    }
    50% { 
        box-shadow: 
            0 12px 35px rgba(139, 92, 246, 0.6),
            0 0 25px rgba(139, 92, 246, 0.5),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
        transform: scale(1.05);
    }
}

@keyframes botAvatarHover {
    0% {
        transform: scale(1) rotate(0deg);
    }
    100% {
        transform: scale(1.1) rotate(360deg);
    }
}

/* ===== SUBSCRIBE BUTTON ANIMATIONS ===== */
@keyframes subscribeButtonPulse {
    0%, 100% {
        box-shadow: 
            0 8px 25px rgba(0, 0, 0, 0.4),
            0 0 20px rgba(139, 92, 246, 0.3),
            inset 0 2px 0 rgba(255, 255, 255, 0.2);
        transform: scale(1);
    }
    50% {
        box-shadow: 
            0 12px 35px rgba(0, 0, 0, 0.5),
            0 0 30px rgba(139, 92, 246, 0.5),
            0 0 50px rgba(139, 92, 246, 0.3),
            inset 0 2px 0 rgba(255, 255, 255, 0.3);
        transform: scale(1.02);
    }
}

@keyframes subscribeButtonShine {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

@keyframes buttonBorderGlow {
    0%, 100% {
        border-color: rgba(139, 92, 246, 0.5);
        box-shadow: 
            0 8px 25px rgba(0, 0, 0, 0.4),
            0 0 20px rgba(139, 92, 246, 0.3);
    }
    50% {
        border-color: rgba(139, 92, 246, 0.8);
        box-shadow: 
            0 12px 35px rgba(0, 0, 0, 0.5),
            0 0 30px rgba(139, 92, 246, 0.6),
            0 0 50px rgba(139, 92, 246, 0.4);
    }
}

/* ===== HERO TEXT ANIMATIONS ===== */
@keyframes titleGlow {
    0%, 100% { 
        text-shadow: 
            0 0 30px rgba(139, 92, 246, 0.5),
            0 0 60px rgba(139, 92, 246, 0.3);
        filter: brightness(1);
    }
    50% { 
        text-shadow: 
            0 0 40px rgba(139, 92, 246, 0.7),
            0 0 80px rgba(139, 92, 246, 0.5),
            0 0 120px rgba(139, 92, 246, 0.3);
        filter: brightness(1.1);
    }
}

@keyframes subtitleFade {
    0%, 100% { 
        opacity: 0.95;
        transform: translateY(0);
        text-shadow: 
            0 2px 15px rgba(0, 0, 0, 0.4),
            0 0 20px rgba(139, 92, 246, 0.2);
    }
    50% { 
        opacity: 1;
        transform: translateY(-3px);
        text-shadow: 
            0 4px 20px rgba(0, 0, 0, 0.5),
            0 0 30px rgba(139, 92, 246, 0.4),
            0 0 40px rgba(139, 92, 246, 0.2);
    }
}

/* ===== ENHANCED MUSIC ICON ANIMATIONS ===== */
@keyframes heroMusicIconShine {
    0%, 100% {
        background: linear-gradient(135deg, 
            rgba(139, 92, 246, 0.95) 0%, 
            rgba(168, 85, 247, 0.95) 20%,
            rgba(196, 181, 253, 0.95) 40%,
            rgba(221, 214, 254, 0.95) 60%,
            rgba(255, 255, 255, 0.9) 80%,
            rgba(139, 92, 246, 0.95) 100%);
    }
    50% {
        background: linear-gradient(135deg, 
            rgba(255, 255, 255, 0.9) 0%, 
            rgba(221, 214, 254, 0.95) 20%,
            rgba(196, 181, 253, 0.95) 40%,
            rgba(168, 85, 247, 0.95) 60%,
            rgba(139, 92, 246, 0.95) 80%,
            rgba(255, 255, 255, 0.9) 100%);
    }
}

@keyframes heroMusicSymbolGlow {
    0%, 100% {
        text-shadow: 
            0 0 30px rgba(255, 255, 255, 0.9),
            0 0 60px rgba(255, 255, 255, 0.6),
            0 0 90px rgba(255, 255, 255, 0.3);
    }
    50% {
        text-shadow: 
            0 0 40px rgba(255, 255, 255, 1),
            0 0 80px rgba(255, 255, 255, 0.8),
            0 0 120px rgba(255, 255, 255, 0.5);
    }
}
