/* Animated Gradients */
@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

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

@keyframes heroGradient {
    0% { 
        background-position: 0% 50%;
        background-image: linear-gradient(90deg, var(--primary), var(--accent), var(--secondary), var(--primary-light), var(--primary-dark), var(--primary));
    }
    50% { 
        background-position: 100% 50%;
        background-image: linear-gradient(90deg, var(--accent), var(--secondary), var(--primary-light), var(--primary-dark), var(--primary), var(--accent));
    }
    100% { 
        background-position: 0% 50%;
        background-image: linear-gradient(90deg, var(--secondary), var(--primary-light), var(--primary-dark), var(--primary), var(--accent), var(--secondary));
    }
}

.hero-gradient-text {
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: heroGradient 10s ease infinite;
    background-image: linear-gradient(90deg, #9d4edd, #ff00ff, #7b68ee, #00bfff, #1e90ff, #9d4edd);
    text-shadow: 0 0 10px rgba(157, 78, 221, 0.3);
    transition: all 0.3s ease;
}

.hero-gradient-text .highlight-word {
    position: relative;
    z-index: 1;
}

.hero-gradient-text .highlight-word::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 100%;
    height: 8px;
    background: linear-gradient(90deg, rgba(var(--primary), 0.3), rgba(var(--accent), 0.3));
    z-index: -1;
    border-radius: 4px;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.hero-gradient-text:hover {
    animation: heroGradient 5s ease infinite;
}

.hero-gradient-text:hover .highlight-word::after {
    height: 12px;
    opacity: 0.9;
}

.animated-gradient-text {
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientFlow 8s ease-in-out infinite;
    background-image: linear-gradient(90deg, var(--primary), var(--accent), var(--secondary), var(--primary-light), var(--primary-dark), var(--primary));
}

/* Crypto Meme Animations */
@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(2deg); }
}

@keyframes floatReverse {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(-2deg); }
}

@keyframes floatCrypto {
    0% { 
        transform: translateY(0px) rotate(0deg) scale(1);
        filter: drop-shadow(0 0 5px rgba(var(--primary), 0.7));
    }
    25% { 
        transform: translateY(-15px) rotate(2deg) scale(1.02);
        filter: drop-shadow(0 0 15px rgba(var(--accent), 0.9));
    }
    50% { 
        transform: translateY(5px) rotate(-1deg) scale(0.98);
        filter: drop-shadow(0 0 10px rgba(var(--secondary), 0.8));
    }
    75% { 
        transform: translateY(-10px) rotate(1deg) scale(1.01);
        filter: drop-shadow(0 0 20px rgba(var(--primary-light), 0.6));
    }
    100% { 
        transform: translateY(0px) rotate(0deg) scale(1);
        filter: drop-shadow(0 0 5px rgba(var(--primary), 0.7));
    }
}

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

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

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

@keyframes rotate3d {
    0% { transform: perspective(1000px) rotateY(0deg); }
    100% { transform: perspective(1000px) rotateY(360deg); }
}

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

@keyframes neon {
    0%, 100% { 
        text-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 20px var(--primary-light), 0 0 30px var(--primary-light), 0 0 40px var(--primary-light), 0 0 55px var(--primary-light), 0 0 75px var(--primary-light);
    }
    50% { 
        text-shadow: 0 0 10px #fff, 0 0 20px #fff, 0 0 30px var(--accent), 0 0 40px var(--accent), 0 0 50px var(--accent), 0 0 65px var(--accent), 0 0 85px var(--accent);
    }
}

@keyframes particle {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(-1000px) rotate(720deg); opacity: 0; }
}

/* Animation Classes */
.float { animation: float 6s ease-in-out infinite; }
.float-fast { animation: float 4s ease-in-out infinite; }
.float-slow { animation: float 8s ease-in-out infinite; }
.float-reverse { animation: floatReverse 7s ease-in-out infinite; }

.shine {
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    background-size: 200% 100%;
    animation: shine 3s infinite;
}

.neon { animation: neon 1.5s ease-in-out infinite alternate; }
.crypto-shake { animation: shake 0.5s ease-in-out infinite; }

/* Typing Effect */
@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: var(--primary); }
}

.typing-effect {
    border-right: .15em solid var(--primary);
    white-space: nowrap;
    overflow: hidden;
    display: inline-block;
    animation: 
        typing 3.5s steps(40, end),
        blink-caret .75s step-end infinite;
}

/* Hero Section Gradient */
.hero-gradient {
    background: linear-gradient(-45deg, var(--primary), var(--accent), var(--primary), var(--accent));
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
}

/* Button Gradient */
.btn-gradient {
    background: linear-gradient(45deg, var(--primary), var(--accent));
    background-size: 200% 200%;
    border: none;
    color: white;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-gradient:hover {
    animation: gradientBG 3s ease infinite, pulse 2s infinite;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(var(--primary), 0.3), 0 0 30px rgba(var(--primary), 0.5);
    filter: brightness(1.2);
    transition: all 0.3s ease;
}

/* Card Gradient */
.card-gradient {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.card-gradient::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(var(--primary), 0.1), transparent);
    transform: rotate(45deg);
    transition: 0.6s;
}

.card-gradient:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(var(--primary), 0.2);
}

.card-gradient:hover::before {
    left: 100%;
}

/* Animated Background */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(-45deg, var(--dark), var(--darker), var(--dark), var(--secondary));
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
}

/* Glow Effect */
.glow {
    position: relative;
    transition: all 0.3s ease;
}

.glow::after {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: linear-gradient(45deg, var(--primary), var(--accent), var(--primary));
    background-size: 200%;
    z-index: -1;
    border-radius: 15px;
    opacity: 0;
    transition: 0.5s;
    animation: gradientBG 3s ease infinite;
}

.glow:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 10px rgba(var(--primary), 0.7));
}

.glow:hover::after {
    opacity: 0.7;
    filter: blur(15px);
    animation: gradientBG 1.5s ease infinite, pulse 2s infinite;
}

/* Crypto Particles */
.crypto-particle {
    position: absolute;
    pointer-events: none;
    background: linear-gradient(45deg, var(--primary), var(--accent));
    border-radius: 50%;
    opacity: 0;
    z-index: 1000;
    animation: particle 2s ease-out forwards;
}

/* Hover Effects */
.hover-3d {
    transform-style: preserve-3d;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-3d:hover {
    transform: perspective(1000px) rotateX(5deg) rotateY(5deg) translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Crypto Price Ticker Effect */
@keyframes priceUp {
    0% { color: #4caf50; transform: scale(1); }
    50% { color: #8bc34a; transform: scale(1.1); }
    100% { color: #4caf50; transform: scale(1); }
}

@keyframes priceDown {
    0% { color: #f44336; transform: scale(1); }
    50% { color: #ff9800; transform: scale(1.1); }
    100% { color: #f44336; transform: scale(1); }
}

.price-up { animation: priceUp 1s ease-in-out; }
.price-down { animation: priceDown 1s ease-in-out; }

/* Pulse Animation */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(var(--primary), 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(var(--primary), 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(var(--primary), 0);
    }
}

.pulse {
    animation: pulse 2s infinite;
    border-radius: 50%;
}

/* Hero Title Gradient */
.hero-text-gradient,
.hero .text-gradient {
    background: linear-gradient(90deg, 
        var(--primary),  /* Gold */
        var(--accent),  /* Amber */
        var(--secondary),  /* Goldenrod */
        var(--primary-light),  /* Lighter Gold */
        var(--primary-dark)); /* Darker Gold */
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 100%;
    animation: heroGradient 6s ease infinite;
    position: relative;
    display: inline-block;
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1.1;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
    padding: 0 5px;
    margin: 0 -5px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

@keyframes heroGradient {
    0% {
        background-position: 0% 50%;
        text-shadow: 0 2px 15px rgba(var(--primary), 0.3);
    }
    25% {
        text-shadow: 0 2px 20px rgba(var(--accent), 0.4);
    }
    50% {
        background-position: 100% 50%;
        text-shadow: 0 2px 25px rgba(var(--secondary), 0.5);
    }
    75% {
        text-shadow: 0 2px 20px rgba(var(--primary-light), 0.4);
    }
    100% {
        background-position: 0% 50%;
        text-shadow: 0 2px 15px rgba(var(--primary-dark), 0.3);
    }
}

/* Efecto de brillo en hover */
.hero .text-gradient::after {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: inherit;
    background-size: 300% 100%;
    z-index: -1;
    filter: blur(15px);
    opacity: 0;
    transition: opacity 0.5s ease;
    border-radius: 10px;
}

.hero .text-gradient:hover::after {
    opacity: 0.7;
}

/* Text Gradient para otros elementos */
.text-gradient:not(.hero .text-gradient) {
    background: linear-gradient(90deg, var(--primary-light), var(--accent), var(--secondary), var(--primary-light));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 300% 100%;
    animation: gradientBG 8s linear infinite;
    display: inline-block;
    font-weight: 700;
    letter-spacing: -0.5px;
}

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

/* Responsive Adjustments */
@media (max-width: 768px) {
    .hero-gradient {
        background-size: 300% 300%;
    }
    
    .btn-gradient {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .float, .float-fast, .float-slow, .float-reverse {
        animation: none !important;
        transform: none !important;
    }
    
    .crypto-shake {
        animation: none !important;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0f0f1a;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, var(--primary), var(--accent));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #5d3abf, #6fb8b3);
}