/* ===== ADVANCED ANIMATIONS ===== */

/* Particle Effects */
.gold-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--gold-primary);
    border-radius: 50%;
    animation: float-particle 8s linear infinite;
    opacity: 0;
}

@keyframes float-particle {
    0% {
        opacity: 0;
        transform: translateY(100vh) translateX(0) scale(0);
    }
    10% {
        opacity: 1;
        transform: translateY(90vh) translateX(10px) scale(1);
    }
    90% {
        opacity: 1;
        transform: translateY(10vh) translateX(-10px) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(0) translateX(0) scale(0);
    }
}

/* Burning Coins Animation */
.coin-stack {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 40px;
}

.coin-stack::before,
.coin-stack::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 6px;
    background: var(--gradient-gold);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.coin-stack::before {
    bottom: 0;
    left: 0;
    animation: burn-coin 3s ease-in-out infinite;
}

.coin-stack::after {
    bottom: 8px;
    left: 15px;
    animation: burn-coin 3s ease-in-out infinite 0.5s;
}

@keyframes burn-coin {
    0%, 70% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0.5) translateY(-20px);
    }
}

.flames {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 60px;
}

.flames::before,
.flames::after {
    content: '';
    position: absolute;
    bottom: 0;
    width: 20px;
    height: 40px;
    background: linear-gradient(to top, #ff4500, #ff6347, #ffa500);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    animation: flicker-flame 1.5s ease-in-out infinite alternate;
}

.flames::before {
    left: 20px;
}

.flames::after {
    right: 20px;
    animation-delay: 0.3s;
}

@keyframes flicker-flame {
    0% {
        transform: scale(1) rotate(-2deg);
        opacity: 0.8;
    }
    100% {
        transform: scale(1.1) rotate(2deg);
        opacity: 1;
    }
}

/* Vault Animation */
.vault-door {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 50px;
    background: linear-gradient(135deg, #2c2c2c, #1a1a1a);
    border: 3px solid var(--gold-secondary);
    border-radius: 5px;
    animation: vault-close 4s ease-in-out infinite;
}

.vault-door::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 15px;
    height: 15px;
    background: var(--gold-primary);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.vault-door::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 5px;
    transform: translateY(-50%);
    width: 8px;
    height: 2px;
    background: var(--gold-primary);
    border-radius: 1px;
}

@keyframes vault-close {
    0%, 80% {
        transform: translateX(-50%) rotateY(0deg);
    }
    90%, 100% {
        transform: translateX(-50%) rotateY(-90deg);
    }
}

.gold-bars {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 30px;
}

.gold-bars::before,
.gold-bars::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 8px;
    background: var(--gradient-gold);
    border-radius: 2px;
    box-shadow: 0 0 5px rgba(255, 215, 0, 0.3);
    animation: stack-gold 4s ease-in-out infinite;
}

.gold-bars::before {
    bottom: 0;
    left: 5px;
}

.gold-bars::after {
    bottom: 10px;
    right: 5px;
    animation-delay: 0.5s;
}

@keyframes stack-gold {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.5);
    }
    50%, 100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Floating Dice Background */
.floating-dice::before,
.floating-dice::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 30px;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 5px;
    animation: float-dice 15s linear infinite;
}

.floating-dice::before {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.floating-dice::after {
    top: 60%;
    right: 15%;
    animation-delay: 7s;
}

@keyframes float-dice {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.3;
    }
    25% {
        transform: translateY(-20px) rotate(90deg);
        opacity: 0.6;
    }
    50% {
        transform: translateY(0) rotate(180deg);
        opacity: 0.3;
    }
    75% {
        transform: translateY(-15px) rotate(270deg);
        opacity: 0.6;
    }
    100% {
        transform: translateY(0) rotate(360deg);
        opacity: 0.3;
    }
}

/* Counter Animation */
.counter-animate {
    animation: count-up 2s ease-out forwards;
}

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

/* Scroll Reveal Animations */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s ease-out;
}

.reveal-left.revealed {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s ease-out;
}

.reveal-right.revealed {
    opacity: 1;
    transform: translateX(0);
}

/* Hover Glow Effects */
.glow-on-hover {
    transition: all 0.3s ease;
}

.glow-on-hover:hover {
    filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.6));
}

.red-glow-on-hover {
    transition: all 0.3s ease;
}

.red-glow-on-hover:hover {
    filter: drop-shadow(0 0 20px rgba(255, 0, 64, 0.6));
}

/* Text Typing Effect */
.typing-effect {
    overflow: hidden;
    border-right: 3px solid var(--gold-primary);
    white-space: nowrap;
    animation: typing 3s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

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

/* Dice Roll Animation */
.dice-roll {
    animation: roll-dice 1s ease-in-out;
}

@keyframes roll-dice {
    0% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(90deg) scale(1.1); }
    50% { transform: rotate(180deg) scale(1); }
    75% { transform: rotate(270deg) scale(1.1); }
    100% { transform: rotate(360deg) scale(1); }
}

/* Pulsing Elements */
.pulse-gold {
    animation: pulse-gold-effect 2s ease-in-out infinite;
}

@keyframes pulse-gold-effect {
    0%, 100% {
        box-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
    }
    50% {
        box-shadow: 0 0 25px rgba(255, 215, 0, 0.8);
    }
}

.pulse-red {
    animation: pulse-red-effect 2s ease-in-out infinite;
}

@keyframes pulse-red-effect {
    0%, 100% {
        box-shadow: 0 0 5px rgba(255, 0, 64, 0.5);
    }
    50% {
        box-shadow: 0 0 25px rgba(255, 0, 64, 0.8);
    }
}

/* Shimmer Effect */
.shimmer {
    position: relative;
    overflow: hidden;
}

.shimmer::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 215, 0, 0.3),
        transparent
    );
    animation: shimmer-effect 3s ease-in-out infinite;
}

@keyframes shimmer-effect {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Loading Spinner */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 215, 0, 0.3);
    border-top: 4px solid var(--gold-primary);
    border-radius: 50%;
    animation: spin-loader 1s linear infinite;
}

@keyframes spin-loader {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Neon Text Effect */
.neon-text {
    text-shadow: 
        0 0 5px currentColor,
        0 0 10px currentColor,
        0 0 15px currentColor,
        0 0 20px currentColor;
    animation: neon-flicker 2s ease-in-out infinite alternate;
}

@keyframes neon-flicker {
    0%, 100% {
        text-shadow: 
            0 0 5px currentColor,
            0 0 10px currentColor,
            0 0 15px currentColor,
            0 0 20px currentColor;
    }
    50% {
        text-shadow: 
            0 0 2px currentColor,
            0 0 5px currentColor,
            0 0 8px currentColor,
            0 0 12px currentColor;
    }
}

/* Slide In Animations */
.slide-in-left {
    animation: slide-in-from-left 1s ease-out forwards;
}

@keyframes slide-in-from-left {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slide-in-from-right 1s ease-out forwards;
}

@keyframes slide-in-from-right {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scale Animations */
.scale-in {
    animation: scale-in-effect 0.8s ease-out forwards;
}

@keyframes scale-in-effect {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Website Flip Animation */
.website-flip {
    animation: website-flip 1.5s ease-in-out;
    transform-style: preserve-3d;
}

@keyframes website-flip {
    0% {
        transform: rotateY(0deg);
    }
    50% {
        transform: rotateY(180deg);
    }
    100% {
        transform: rotateY(360deg);
    }
}

/* Prevent interaction during flip */
.website-flip * {
    pointer-events: none;
}

/* Stagger Animation Delays */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }

/* Hover Animations */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.hover-glow-gold {
    transition: all 0.3s ease;
}

.hover-glow-gold:hover {
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.6);
    transform: scale(1.05);
}

.hover-glow-red {
    transition: all 0.3s ease;
}

.hover-glow-red:hover {
    box-shadow: 0 0 30px rgba(255, 0, 64, 0.6);
    transform: scale(1.05);
}
