/* =========================================
   MONETIX - LOADER & PAGE TRANSITIONS
   Extracted from index.html <style> block
   ========================================= */

/* 2. BOTÓN DE TEMA */
.theme-toggle-btn {
    position: fixed !important;
    top: 25px;
    left: 25px;
    right: auto;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    font-size: 20px;
    cursor: pointer;
    z-index: 99999;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.theme-toggle-btn:hover {
    transform: scale(1.1);
}

/* 3. LOADER CHANCHITO (Z-INDEX 999999) */
#custom-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-card);
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 999999 !important;
}

.piggy-loader-container {
    position: relative;
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
}

.piggy-icon-loader {
    font-size: 60px;
    color: var(--piggy-color);
    position: absolute;
    bottom: 0;
    left: 0;
    z-index: 1;
}

.coin-icon-loader {
    font-size: 25px;
    color: var(--coin-color);
    position: absolute;
    top: -30px;
    left: 25px;
    animation: dropCoin 1.2s infinite ease-in-out;
    z-index: 0;
}

@keyframes dropCoin {
    0% {
        top: -40px;
        opacity: 0;
        transform: rotateY(0deg);
    }

    20% {
        opacity: 1;
    }

    100% {
        top: 15px;
        opacity: 0;
        transform: rotateY(360deg);
    }
}

.loader-text {
    font-size: 16px;
    color: var(--text-primary);
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* PAGE TRANSITIONS */
.slide-out-left {
    animation: slideOutLeft 0.5s ease-in-out forwards;
}

.slide-in-right {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    background: #f0f2f5;
    /* Fallback/light bg */
    animation: slideInRight 0.5s ease-in-out forwards;
}

@keyframes slideOutLeft {
    0% {
        transform: translateX(0);
        opacity: 1;
    }

    100% {
        transform: translateX(-100%);
        opacity: 0;
    }
}

@keyframes slideInRight {
    0% {
        transform: translateX(100%);
        opacity: 0;
    }

    100% {
        transform: translateX(0);
        opacity: 1;
    }
}