:root {
    --bg-primary: #07070f;
    --bg-secondary: #0d0d1a;
    --bg-card: #0f0f1e;
    --border: rgba(88, 101, 242, 0.15);
    --accent: #5865f2;
    --accent-glow: rgba(88, 101, 242, 0.3);
    --text-primary: #f0f0ff;
    --text-secondary: #8888aa;
    --nav-bg: rgba(7, 7, 15, 0.9);
    --discord-dark: #313338;
    --discord-msg: #2b2d31;
}

.theme-light {
    --bg-primary: #f8fafc;
    --bg-secondary: #f1f5f9;
    --bg-card: #ffffff;
    --border: rgba(88, 101, 242, 0.2);
    --accent: #5865f2;
    --accent-glow: rgba(88, 101, 242, 0.15);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --nav-bg: rgba(248, 250, 252, 0.9);
    --discord-dark: #ffffff;
    --discord-msg: #f2f3f5;
}

body { background-color: var(--bg-primary); color: var(--text-primary); transition: background-color 0.3s, color 0.3s; font-family: 'Inter', sans-serif; overflow-x: hidden; }

body.lang-en .es-only { display: none !important; }
body.lang-es .en-only { display: none !important; }

.text-gradient { background: linear-gradient(135deg, #ffffff 0%, #a5aff8 50%, #5865f2 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.theme-light .text-gradient { background: linear-gradient(135deg, #0f172a 0%, #334155 50%, #5865f2 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

.glow-border { border: 1px solid var(--border); box-shadow: 0 0 0 1px var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, 0.02); }
.card-hover { transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease; }
.card-hover:hover { transform: translateY(-2px); border-color: rgba(88, 101, 242, 0.4); box-shadow: 0 8px 32px var(--accent-glow); }

.reveal { opacity: 0; transform: scale(0.95) translateY(15px); transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1); }
.reveal.active { opacity: 1; transform: scale(1) translateY(0); }

.theme-light .site-logo { filter: brightness(0.15) contrast(1.2) drop-shadow(0 2px 4px rgba(0,0,0,0.1)); transition: filter 0.3s ease; }

@keyframes float { 0% { transform: translateY(0px); } 50% { transform: translateY(-15px); } 100% { transform: translateY(0px); } }
.animate-float { animation: float 4s ease-in-out infinite; }

.sync-text { opacity: 0; }
@keyframes slideWrite { 0% { transform: translateX(-20px); opacity: 0; } 100% { transform: translateX(0); opacity: 1; } }
.page-loaded .animate-slide-write { animation: slideWrite 1.2s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
@keyframes revealWrite { 0% { clip-path: polygon(0 0, 0 0, 0 100%, 0 100%); opacity: 1; } 100% { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); opacity: 1; } }
.page-loaded .animate-reveal-write { animation: revealWrite 1.2s cubic-bezier(0.22, 1, 0.36, 1) forwards; opacity: 1; }
@keyframes subtlePulse { 0%, 100% { filter: drop-shadow(0 0 0px rgba(88,101,242,0)); } 50% { filter: drop-shadow(0 0 8px rgba(88,101,242,0.6)); } }
.animate-subtle-pulse { animation: subtlePulse 3s infinite ease-in-out; }

.faq-content { max-height: 0; overflow: hidden; transition: max-height 0.3s ease-out; }

.tooltip-content { visibility: hidden; opacity: 0; transform: translateY(4px) scale(0.97); transition: all 0.2s cubic-bezier(0.34, 1.4, 0.64, 1); pointer-events: none; z-index: 50;}
.group:hover .tooltip-content { visibility: visible; opacity: 1; transform: translateY(0) scale(1); }
.tooltip-box { background-color: var(--bg-card); border: 1px solid var(--border); box-shadow: 0 10px 40px rgba(0,0,0,0.3); }

#loader { position: fixed; inset: 0; z-index: 9999; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--bg-primary); transition: opacity 0.5s ease-out; }
.loader-ring { width: 120px; height: 120px; border: 4px solid rgba(88,101,242,0.15); border-top: 4px solid var(--accent); border-radius: 50%; animation: spin 1s linear infinite; position: absolute;}
@keyframes spin { to { transform: rotate(360deg); } }
.grid-bg { background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px); background-size: 60px 60px; }

/* LOGOS Y TERMINAL CLARO */
.theme-light img.site-logo {
    filter: brightness(0) invert(1) 
            drop-shadow(0px 0px 0.5px #5865F2) 
            drop-shadow(0px 0px 1px #5865F2) 
            drop-shadow(0px 0px 3px rgba(88, 101, 242, 0.4)) !important;
}

.theme-light #changelog-content,
.theme-light #changelog-content div,
.theme-light #changelog-content span {
    color: #e2e8f0 !important; 
}

/* EFECTOS BLINDADOS */
.anim-hacker { position: relative !important; }
.anim-hacker:hover { color: transparent !important; }
.anim-hacker::after {
    content: attr(data-text);
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    color: #5865F2 !important;
    opacity: 0; 
    pointer-events: none;
    white-space: nowrap;
}
.anim-hacker:hover::after { opacity: 1; animation: hacker-scramble 0.4s steps(4) forwards !important; }
@keyframes hacker-scramble {
    0%   { content: "*}{][><"; font-family: monospace; }
    33%  { content: ">_[o*m}<"; font-family: monospace; }
    66%  { content: "x0m4nd0"; font-family: monospace; }
    100% { content: attr(data-text); font-family: inherit; }
}

.anim-premium-glow { position: relative !important; overflow: hidden !important; transition: transform 0.2s ease, text-shadow 0.2s ease !important; }
.anim-premium-glow:hover { transform: scale(1.08) !important; text-shadow: 0 0 10px rgba(234, 179, 8, 0.8) !important; }
.anim-premium-glow::after {
    content: ""; position: absolute; top: 0; left: -100%; width: 40%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
    transform: skewX(-20deg); pointer-events: none;
}
.anim-premium-glow:hover::after { animation: premium-sweep 0.6s ease-in-out forwards !important; }
@keyframes premium-sweep { 0% { left: -100%; } 100% { left: 200%; } }

.anim-star-burst { position: relative !important; display: inline-flex !important; align-items: center; transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), color 0.3s ease !important; }
.anim-star-burst:hover { transform: translateY(-2px) scale(1.05) !important; color: #eab308 !important; text-shadow: 0 0 15px rgba(234, 179, 8, 0.5) !important; }
.anim-star-burst svg, .anim-star-burst i { transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), fill 0.3s ease, filter 0.3s ease !important; }
.anim-star-burst:hover svg, .anim-star-burst:hover i { transform: scale(1.4) rotate(144deg) !important; fill: #eab308 !important; color: #eab308 !important; filter: drop-shadow(0 0 5px rgba(234, 179, 8, 0.8)) !important; }

/* =========================================================
   ANIMACIONES DE DONACIÓN (CHANCHITO Y NAV) ARREGLADAS
   ========================================================= */

/* Corazón del Nav */
.anim-donate-nav svg, .anim-donate-nav i { 
    transform-origin: center; 
}
.anim-donate-nav:hover svg, .anim-donate-nav:hover i { 
    animation: pulse-heart 2s ease-in-out infinite; 
}
@keyframes pulse-heart {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.20); }
}

/* Chanchito */
.donate-piggy-btn { display: inline-flex; }
.donate-piggy-btn .btn-text { transform: translateY(0) scale(1); opacity: 1; transition: all 0.4s ease; }

.donate-piggy-btn:hover .btn-text { transform: translateY(10px) scale(0.8); opacity: 0; }

.donate-piggy-btn .anim-container { opacity: 0; transition: opacity 0.3s ease; pointer-events: none; }
.donate-piggy-btn:hover .anim-container { opacity: 1; }

/* Animaciones Lluvia de Monedas (Jackpot) */
.donate-piggy-btn:hover .coin-drop-1 { animation: coinRain 0.6s ease-in forwards 0.1s; }
.donate-piggy-btn:hover .coin-drop-2 { animation: coinRain 0.5s ease-in forwards; }
.donate-piggy-btn:hover .coin-drop-3 { animation: coinRain 0.7s ease-in forwards 0.2s; }
.donate-piggy-btn:hover .piggy-jump { animation: piggyJackpot 0.8s ease-out forwards; }

@keyframes coinRain {
    0% { transform: translateY(-40px) scale(1); opacity: 0; }
    20% { opacity: 1; }
    70% { transform: translateY(10px) scale(1); opacity: 1; }
    100% { transform: translateY(20px) scale(0); opacity: 0; }
}

@keyframes piggyJackpot {
    0% { transform: translateY(20px) scale(0.9); opacity: 0; }
    30% { transform: translateY(20px) scale(0.9); opacity: 1; }
    50% { transform: translateY(-12px) scale(1.15) rotate(-6deg); opacity: 1; } 
    65% { transform: translateY(-12px) scale(1.15) rotate(6deg); opacity: 1; }  
    80% { transform: translateY(4px) scale(1.05) rotate(0deg); opacity: 1; }
    100% { transform: translateY(0) scale(1.1); opacity: 1; }
} /* <--- FALTABA ESTA LLAVE */

/* ==========================================================================
   EFECTOS VIVOS 2.5D (MICRO-INTERACCIONES EN HOVER)
   ========================================================================== */

/* 1. Efecto de levitación y aura sutil para las tarjetas */
.card-hover {
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
    will-change: transform, box-shadow, border-color;
}

.card-hover:hover {
    transform: translateY(-4px) scale(1.01);
    border-color: rgba(88, 101, 242, 0.3) !important; /* Brillo sutil en el borde */
    box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.6), 0 0 25px rgba(88, 101, 242, 0.15) !important;
    z-index: 10;
}

/* 2. El barrido de luz "Cristal/Premium" al pasar el mouse */
.card-hover::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        to right, 
        rgba(255,255,255,0) 0%, 
        rgba(255,255,255,0.04) 50%, 
        rgba(255,255,255,0) 100%
    );
    transform: skewX(-25deg);
    transition: all 0.75s ease;
    z-index: 1;
    pointer-events: none;
}

.card-hover:hover::after {
    left: 200%;
    transition: all 0.75s ease-in-out;
}

/* 3. Animación magnética para botones principales */
button, .sim-btn, .donate-piggy-btn {
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease !important;
    will-change: transform;
}

button:hover:not(:disabled), .sim-btn:hover, .donate-piggy-btn:hover {
    transform: translateY(-2px);
}

button:active:not(:disabled), .sim-btn:active, .donate-piggy-btn:active {
    transform: translateY(1px) scale(0.98);
}

/* 4. Efecto de iluminación para las filas de las tablas (Guerra de comunidades) */
tbody tr {
    transition: background-color 0.2s ease, transform 0.2s ease;
}

tbody tr:hover {
    background-color: rgba(88, 101, 242, 0.05) !important;
    transform: translateX(4px);
} /* <--- FALTABA ESTA LLAVE */

/* ==========================================================================
   SISTEMA DE NOTIFICACIONES (TOASTS)
   ========================================================================== */
#toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    background: var(--bg-card);
    border-left: 4px solid var(--accent);
    color: var(--text-primary);
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 600;
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.error { border-left-color: #ef4444; }
.toast.success { border-left-color: #2ecc71; }
.cursor-copy { cursor: pointer; }