/* Currency Switcher with Essential Animations */

/* Main currency switcher container */
.currency-switcher {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 1rem auto;
    gap: 2rem;
    width: 100%;
    padding: 0.75rem;
    background: rgba(5, 32, 119, 0.3);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(203, 138, 88, 0.4);
    position: relative;
    overflow: hidden;
}

/* Automatic left-to-right shine animation */
.currency-switcher::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.2), transparent);
    z-index: 0;
    pointer-events: none;
    animation: shine 3s ease-in-out infinite;
}

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

.currency-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.currency-option:hover {
    background: rgba(255, 215, 0, 0.15);
    transform: translateY(-2px);
}

.currency-title {
    color: var(--pyramid-gold);
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

/* Currency button styles with essential animations */
.currency-btn {
    background: linear-gradient(135deg, rgba(5, 32, 119, 0.8), rgba(53, 53, 171, 0.6));
    border: 2px solid var(--pyramid-gold);
    color: var(--text-light);
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 700;
    min-width: 100px;
    text-align: center;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
    animation: currency-bounce 2s ease-in-out infinite;
    transition: all 0.3s ease;
}

/* Up and down animation for currency buttons */
@keyframes currency-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* Hover effect */
.currency-btn:hover {
    background: linear-gradient(135deg, rgba(203, 138, 88, 0.6), rgba(255, 215, 0, 0.4));
    transform: translateY(-2px);
}

/* Active/Selected state */
.currency-btn.active {
    background: linear-gradient(135deg, var(--pyramid-gold), #e8b56b);
    color: var(--royal-dark-blue);
    font-weight: 800;
    border-color: #fff;
    animation: none; /* Stop bounce when selected */
}

/* Click animation */
.currency-btn:active {
    transform: translateY(1px);
}

/* Responsive design */
@media (max-width: 768px) {
    .currency-switcher {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .currency-option {
        width: 100%;
        justify-content: center;
        padding: 1rem;
    }
    
    .currency-btn {
        min-width: 120px;
        padding: 1rem 2rem;
    }
}

@media (max-width: 480px) {
    .currency-switcher {
        gap: 0.75rem;
    }
    
    .currency-btn {
        font-size: 0.9rem;
        padding: 0.75rem 1.5rem;
        min-width: 100px;
    }
}

/* Additional sparkle animation */
@keyframes sparkle {
    0%, 100% {
        opacity: 0;
        transform: scale(0);
    }
    50% {
        opacity: 1;
        transform: scale(1);
    }
}

.currency-btn.sparkle::after {
    content: '✨';
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 1.2rem;
    animation: sparkle 1s ease-in-out infinite;
}

/* Currency background animation */
.currency-bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.5rem;
    font-weight: bold;
    color: rgba(255, 215, 0, 0.1);
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.8s ease-out;
    text-transform: uppercase;
    text-align: center;
    text-shadow: 0 0 20px rgba(203, 138, 88, 0.5);
    background: radial-gradient(circle, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0) 70%);
}

.currency-bg-animation.active {
    opacity: 1;
    transform: scale(1);
    color: rgba(255, 215, 0, 0.2);
}

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

.currency-bg-animation {
    animation: fadeInScale 0.8s ease-out forwards;
}