/* Animaciones de fondo */
@keyframes backgroundPulse {
    0% { opacity: 0.3; }
    100% { opacity: 0.7; }
}

body::before {
    animation: backgroundPulse 6s ease-in-out infinite alternate;
}

/* Animaciones del logo */
@keyframes logoGlow {
    0% { filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.5)); }
    100% { filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.8)); }
}

.logo {
    animation: logoGlow 3s ease-in-out infinite alternate;
}

/* Animaciones de botones */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.cta-button {
    animation: shimmer 3s linear infinite;
}

/* Animaciones de título principal */
@keyframes titlePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.hero h1 {
    animation: titlePulse 4s ease-in-out infinite;
}

/* Animaciones de grid de fondo */
@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(10px, 10px); }
}

.hero::before {
    animation: gridMove 20s linear infinite;
}

/* Animaciones de líneas brillantes */
@keyframes lineGlow {
    0% { box-shadow: 0 0 5px rgba(255, 215, 0, 0.5); }
    100% { box-shadow: 0 0 15px rgba(255, 215, 0, 1); }
}

.section-title::after {
    animation: lineGlow 2s ease-in-out infinite alternate;
}

/* Animaciones de rotación para cards */
@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.feature-card::before {
    animation: rotate 4s linear infinite;
}

/* Animaciones de flotación */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.arena-logo {
    animation: float 3s ease-in-out infinite;
}

/* Animaciones de sparkles */
@keyframes sparkle {
    0% { opacity: 0; transform: scale(0); }
    50% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(0); }
}

.sparkle {
    animation: sparkle 2s linear infinite;
}

/* Sparkles en el hero */
.hero::after {
    content: '';
    position: absolute;
    top: 20%;
    left: 10%;
    width: 6px;
    height: 6px;
    background: var(--gold-primary);
    border-radius: 50%;
    animation: sparkle 3s linear infinite;
    animation-delay: 0.5s;
}

/* Más sparkles distribuidos */
.hero::before {
    background-image: 
        radial-gradient(circle at 15% 25%, var(--gold-primary) 1px, transparent 1px),
        radial-gradient(circle at 85% 75%, var(--gold-primary) 1px, transparent 1px),
        radial-gradient(circle at 70% 15%, var(--gold-primary) 1px, transparent 1px),
        radial-gradient(circle at 25% 85%, var(--gold-primary) 1px, transparent 1px);
    background-size: 200px 200px, 150px 150px, 300px 300px, 250px 250px;
    animation: sparkleBackground 8s linear infinite;
}

@keyframes sparkleBackground {
    0% { opacity: 0.1; }
    50% { opacity: 0.3; }
    100% { opacity: 0.1; }
}

/* Animaciones de entrada */
@keyframes fadeInUp {
    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);
    }
}

/* Aplicar animaciones de entrada */
.hero-content {
    animation: fadeInUp 1s ease-out 0.3s both;
}

.feature-card:nth-child(odd) {
    animation: fadeInLeft 0.8s ease-out both;
}

.feature-card:nth-child(even) {
    animation: fadeInRight 0.8s ease-out both;
}

.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.2s; }
.feature-card:nth-child(3) { animation-delay: 0.3s; }
.feature-card:nth-child(4) { animation-delay: 0.4s; }
.feature-card:nth-child(5) { animation-delay: 0.5s; }
.feature-card:nth-child(6) { animation-delay: 0.6s; }

/* Animaciones de hover avanzadas */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.feature-icon:hover {
    animation: bounce 0.6s ease;
}

/* Animaciones de texto brillante */
@keyframes textGlow {
    0% { text-shadow: 0 0 10px rgba(255, 215, 0, 0.8); }
    50% { text-shadow: 0 0 20px rgba(255, 215, 0, 1), 0 0 30px rgba(255, 215, 0, 0.8); }
    100% { text-shadow: 0 0 10px rgba(255, 215, 0, 0.8); }
}

.hero h1:hover {
    animation: textGlow 2s ease-in-out infinite;
}

/* Animaciones de pulso para iconos */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.feature-icon {
    animation: pulse 3s ease-in-out infinite;
}

.feature-icon:nth-child(1) { animation-delay: 0s; }
.feature-icon:nth-child(2) { animation-delay: 0.5s; }
.feature-icon:nth-child(3) { animation-delay: 1s; }

/* Animaciones de bordes brillantes */
@keyframes borderGlow {
    0% { border-color: var(--gold-darker); box-shadow: none; }
    50% { border-color: var(--gold-primary); box-shadow: 0 0 15px rgba(255, 215, 0, 0.5); }
    100% { border-color: var(--gold-darker); box-shadow: none; }
}

.feature-card {
    animation: borderGlow 4s ease-in-out infinite;
}

.feature-card:nth-child(1) { animation-delay: 0s; }
.feature-card:nth-child(2) { animation-delay: 0.7s; }
.feature-card:nth-child(3) { animation-delay: 1.4s; }
.feature-card:nth-child(4) { animation-delay: 2.1s; }
.feature-card:nth-child(5) { animation-delay: 2.8s; }
.feature-card:nth-child(6) { animation-delay: 3.5s; }

/* Animaciones de ondas */
@keyframes wave {
    0% { transform: rotate(0deg); }
    10% { transform: rotate(14deg); }
    20% { transform: rotate(-8deg); }
    30% { transform: rotate(14deg); }
    40% { transform: rotate(-4deg); }
    50% { transform: rotate(10deg); }
    60% { transform: rotate(0deg); }
    100% { transform: rotate(0deg); }
}

.feature-icon:hover {
    animation: wave 0.6s ease-in-out;
    transform-origin: 70% 70%;
}

/* Animaciones de typing effect */
@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink {
    50% { border-color: transparent; }
}

/* Animaciones de escala para hover */
@keyframes scaleIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.cta-button:hover {
    animation: scaleIn 0.3s ease-out;
}

/* Animaciones de partículas flotantes */
@keyframes float1 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -30px) rotate(120deg); }
    66% { transform: translate(-20px, 20px) rotate(240deg); }
}

@keyframes float2 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-30px, -20px) rotate(180deg); }
}

@keyframes float3 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(20px, 30px) rotate(90deg); }
    75% { transform: translate(-30px, -10px) rotate(270deg); }
}

/* Crear partículas con pseudo-elementos */
.arena-section::after {
    content: '';
    position: absolute;
    top: 10%;
    left: 5%;
    width: 4px;
    height: 4px;
    background: var(--gold-primary);
    border-radius: 50%;
    animation: float1 15s linear infinite;
    opacity: 0.6;
}

/* Efectos de resplandor en scroll */
@keyframes scrollGlow {
    0% { box-shadow: 0 0 5px rgba(255, 215, 0, 0.3); }
    100% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.8), 0 0 30px rgba(255, 215, 0, 0.4); }
}

/* Animaciones de carga */
@keyframes loadingSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--gold-primary);
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: loadingSpin 1s linear infinite;
}

/* Desactivar animaciones para usuarios que prefieren menos movimiento */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Animaciones suaves para dispositivos móviles */
@media (max-width: 768px) {
    .hero h1 {
        animation-duration: 6s;
    }
    
    .feature-card::before {
        animation-duration: 6s;
    }
    
    .logo {
        animation-duration: 4s;
    }
}

/* Optimización de rendimiento */
.feature-card,
.cta-button,
.logo,
.hero h1 {
    will-change: transform;
}

/* Efectos de enfoque mejorados */
.cta-button:focus {
    animation: pulse 0.5s ease-in-out;
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.5);
}