/* Keyframe Animations */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(5deg); }
}

@keyframes glow {
    0%, 100% { opacity: 1; text-shadow: 0 0 10px currentColor; }
    50% { opacity: 0.8; text-shadow: 0 0 20px currentColor; }
}

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

@keyframes rotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes particle-float {
    0%, 100% { transform: translate(0, 0); opacity: 0; }
    50% { transform: translate(10px, -10px); opacity: 1; }
}

@keyframes shine {
    0% { transform: rotate(45deg) translateX(-100%); }
    100% { transform: rotate(45deg) translateX(100%); }
}

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

@keyframes clickPop {
    0% { transform: translate(-50%, -50%) scale(0); opacity: 1; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.7; }
    100% { transform: translate(-50%, -50%) scale(1.5); opacity: 0; }
}

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

/* Click Effect */
.click-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    font-size: 24px;
    font-weight: 800;
    color: var(--secondary);
    pointer-events: none;
    animation: clickPop 1s ease-out forwards;
    text-shadow: 0 0 10px var(--secondary);
    z-index: 10;
}

/* Crystal animations */
.crystal-orb.pulse {
    animation: crystalShake 0.3s ease-in-out, float 3s ease-in-out infinite;
}

/* Notification animation */
@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

@keyframes slideOutRight {
    from { transform: translateX(0); }
    to { transform: translateX(100%); }
}

/* Background animations */
@keyframes twinkle {
    from { background-position: 0 0; }
    to { background-position: -10000px 5000px; }
}

/* Gradient animations */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.glowy-btn, .crystal-orb {
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
}

/* Hover effects */
.neon-card:hover {
    transform: translateY(-2px);
    transition: all 0.3s ease;
}

.nav-btn:hover {
    color: var(--primary-glow);
    transform: translateY(-1px);
}

/* Loading animation enhancements */
.loading-crystal {
    background-size: 200% 200%;
    animation: gradientShift 2s ease infinite, pulse 1.5s ease-in-out infinite;
}

/* Responsive animations */
@media (max-width: 400px) {
    @keyframes float {
        0%, 100% { transform: translateY(0px) scale(0.9); }
        50% { transform: translateY(-8px) scale(0.95); }
    }
}

/* Enhanced Background Animations */
.nebula {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, 
        rgba(100, 65, 165, 0.3) 0%,
        rgba(42, 14, 73, 0.2) 40%,
        rgba(0, 0, 0, 0) 70%);
    animation: nebulaPulse 20s ease-in-out infinite alternate;
}

.shooting-stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.shooting-stars::before,
.shooting-stars::after {
    content: '';
    position: absolute;
    top: -50px;
    left: -50px;
    width: 4px;
    height: 4px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 8px 2px #fff;
    animation: shootingStar 8s linear infinite;
}

.shooting-stars::after {
    animation-delay: 4s;
    left: 80%;
}

.pulsing-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200vw;
    height: 200vh;
    background: radial-gradient(circle, 
        rgba(76, 0, 255, 0.1) 0%,
        rgba(255, 0, 212, 0.05) 30%,
        rgba(0, 0, 0, 0) 70%);
    animation: pulseGlow 15s ease-in-out infinite;
}

/* Floating Particles */
.floating-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    animation: float 20s infinite linear;
}

.particle-1 {
    width: 2px;
    height: 2px;
    top: 20%;
    left: 10%;
    animation-duration: 25s;
}

.particle-2 {
    width: 3px;
    height: 3px;
    top: 60%;
    left: 80%;
    animation-duration: 30s;
}

.particle-3 {
    width: 1px;
    height: 1px;
    top: 80%;
    left: 20%;
    animation-duration: 20s;
}

.particle-4 {
    width: 2px;
    height: 2px;
    top: 40%;
    left: 90%;
    animation-duration: 35s;
}

.particle-5 {
    width: 3px;
    height: 3px;
    top: 10%;
    left: 50%;
    animation-duration: 28s;
}

.particle-6 {
    width: 1px;
    height: 1px;
    top: 70%;
    left: 30%;
    animation-duration: 22s;
}

/* Enhanced Crystal Animations */
.crystal-orbit {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
}

.orbit-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 1px solid rgba(100, 65, 165, 0.3);
    border-radius: 50%;
    animation: orbitSpin 20s linear infinite;
}

.satellite {
    position: absolute;
    width: 20px;
    height: 20px;
    background: rgba(100, 65, 165, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 8px;
    animation: satelliteOrbit 15s linear infinite;
}

.s1 { animation-delay: 0s; }
.s2 { animation-delay: -5s; }
.s3 { animation-delay: -10s; }

.energy-beams {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
}

.beam {
    position: absolute;
    width: 2px;
    height: 100px;
    background: linear-gradient(to bottom, 
        transparent 0%,
        rgba(100, 65, 165, 0.8) 50%,
        transparent 100%);
    top: 50%;
    left: 50%;
    transform-origin: 0 0;
    animation: beamRotate 4s linear infinite;
}

.beam-1 { animation-delay: 0s; }
.beam-2 { animation-delay: -1.33s; }
.beam-3 { animation-delay: -2.66s; }

.mining-effects {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 250px;
    height: 250px;
}

.effect-pulse {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 2px solid rgba(100, 65, 165, 0.5);
    border-radius: 50%;
    animation: effectPulse 3s ease-out infinite;
}

.effect-ripple {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 1px solid rgba(100, 65, 165, 0.3);
    border-radius: 50%;
    animation: ripple 4s ease-out infinite;
}

/* Enhanced Button Effects */
.btn-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: inherit;
}

.btn-particles::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, 
        rgba(255, 255, 255, 0.3) 0%,
        rgba(255, 255, 255, 0) 70%);
    animation: btnParticles 2s linear infinite;
}

.btn-hover-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, 
        rgba(100, 65, 165, 0.4) 0%,
        rgba(100, 65, 165, 0) 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: inherit;
}

.mine-btn:hover .btn-hover-glow {
    opacity: 1;
}

/* Enhanced Card Animations */
.card-shimmer {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, 
        transparent 0%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 100%);
    transform: rotate(45deg);
    animation: shimmer 3s ease-in-out infinite;
}

.icon-aura {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: rgba(100, 65, 165, 0.2);
    border-radius: 50%;
    animation: iconPulse 2s ease-in-out infinite;
}

/* Enhanced Navigation */
.nav-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, 
        rgba(15, 10, 29, 0.9) 0%,
        rgba(25, 15, 45, 0.8) 100%);
    backdrop-filter: blur(10px);
    z-index: -1;
}

.nav-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: rgba(100, 65, 165, 0.3);
    border-radius: 50%;
    animation: navPulse 2s ease-in-out infinite;
}

.nav-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, 
        rgba(100, 65, 165, 0.4) 0%,
        rgba(100, 65, 165, 0) 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: inherit;
}

.nav-btn.active .nav-glow,
.nav-btn:hover .nav-glow {
    opacity: 1;
}

/* Keyframes for new animations */
@keyframes nebulaPulse {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.1);
    }
}

@keyframes shootingStar {
    0% {
        transform: translateX(0) translateY(0) rotate(45deg);
        opacity: 1;
    }
    100% {
        transform: translateX(1000px) translateY(1000px) rotate(45deg);
        opacity: 0;
    }
}

@keyframes pulseGlow {
    0%, 100% {
        opacity: 0.3;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1.2);
    }
}

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

@keyframes orbitSpin {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes satelliteOrbit {
    from { transform: rotate(0deg) translateX(150px) rotate(0deg); }
    to { transform: rotate(360deg) translateX(150px) rotate(-360deg); }
}

@keyframes beamRotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes effectPulse {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

@keyframes ripple {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

@keyframes btnParticles {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

@keyframes iconPulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.5;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.8;
    }
}

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

/* Enhanced loading animations */
.loading-particles {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
}

.loading-particles .particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(100, 65, 165, 0.8);
    border-radius: 50%;
    animation: loadingOrbit 3s linear infinite;
}

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

.loading-bar {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin-top: 20px;
    overflow: hidden;
}

.loading-progress {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #6441a5, #8a63d2);
    border-radius: 2px;
    animation: loadingProgress 3s ease-in-out infinite;
}

@keyframes loadingOrbit {
    from { transform: rotate(0deg) translateX(40px) rotate(0deg); }
    to { transform: rotate(360deg) translateX(40px) rotate(-360deg); }
}

@keyframes loadingProgress {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

/* Enhanced notification animations */
.notification-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #6441a5, #8a63d2);
    transform: scaleX(1);
    transform-origin: left;
    animation: notificationProgress 5s linear forwards;
}

@keyframes notificationProgress {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}

/* Responsive enhancements */
@media (max-width: 768px) {
    .crystal-orbit {
        width: 200px;
        height: 200px;
    }
    
    .satellite {
        width: 15px;
        height: 15px;
        font-size: 6px;
    }
    
    .energy-beams {
        width: 150px;
        height: 150px;
    }
    
    .mining-effects {
        width: 180px;
        height: 180px;
    }
}