:root {
    --bg-color: #000000;
    --card-bg: rgba(17, 24, 17, 0.85);
    --accent-green: #00ff88;
    --gold: #ffd700;
    --text-main: #ffffff;
    --text-muted: #889988;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', sans-serif; }

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    padding: 16px; 
    padding-bottom: 90px;
    display: flex; justify-content: center;
    min-height: 100vh; overflow-x: hidden;
}

.app-container { width: 100%; max-width: 420px; }

/* INTRO */
.intro-screen {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(15, 26, 15, 0.95) 0%, #000000 100%);
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    z-index: 1000; animation: fadeIn 0.8s ease;
}
.intro-logo-container { position: relative; width: 120px; height: 120px; display: flex; justify-content: center; align-items: center; }
.intro-logo { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; border: 3px solid var(--gold); z-index: 2; animation: logoPulse 2s ease-in-out infinite; box-shadow: 0 0 20px rgba(255, 215, 0, 0.5); }
.intro-logo-glow {
    position: absolute; width: 150px; height: 150px; border-radius: 50%;
    background: conic-gradient(from 0deg, transparent, var(--gold), transparent, var(--accent-green), transparent);
    animation: rotateGlow 3s linear infinite; filter: blur(15px); z-index: 1;
}
@keyframes logoPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes rotateGlow { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.intro-title { font-size: 32px; font-weight: bold; color: var(--gold); letter-spacing: 3px; margin-top: 20px; text-shadow: 0 0 20px rgba(255, 215, 0, 0.6); }
.intro-subtitle { font-size: 12px; color: var(--text-muted); letter-spacing: 2px; margin-top: 5px; }
.intro-lang-buttons { display: flex; flex-direction: column; gap: 12px; margin-top: 40px; width: 80%; max-width: 280px; }
.intro-lang-buttons button {
    padding: 16px; border-radius: 14px; border: 2px solid var(--gold);
    background: rgba(255, 215, 0, 0.1); color: #fff; font-size: 16px; font-weight: bold;
    cursor: pointer; transition: all 0.3s; backdrop-filter: blur(10px);
    opacity: 0; animation: slideInButton 0.5s ease forwards;
}
.intro-lang-buttons button:nth-child(1) { animation-delay: 0.3s; }
.intro-lang-buttons button:nth-child(2) { animation-delay: 0.5s; }
.intro-lang-buttons button:nth-child(3) { animation-delay: 0.7s; }
@keyframes slideInButton { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.intro-lang-buttons button:hover { background: var(--gold); color: #000; transform: scale(1.05); box-shadow: 0 0 30px rgba(255, 215, 0, 0.6); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }

/* HEADER */
header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.logo-container { display: flex; align-items: center; gap: 12px; }
.logo-wrapper { position: relative; width: 50px; height: 50px; display: flex; justify-content: center; align-items: center; }
.logo { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; border: 2px solid var(--gold); z-index: 2; box-shadow: 0 0 10px rgba(255, 215, 0, 0.5); }
.logo-glow { position: absolute; width: 60px; height: 60px; border-radius: 50%; background: conic-gradient(from 0deg, transparent, var(--gold), transparent); animation: rotateGlow 3s linear infinite; z-index: 1; filter: blur(8px); }
.glow-text { font-size: 16px; letter-spacing: 1px; text-shadow: 0 0 10px rgba(0, 255, 136, 0.4); }
.subtitle { font-size: 10px; color: var(--text-muted); letter-spacing: 1px; }
.lang-btn { background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); color: #fff; padding: 8px; border-radius: 50%; cursor: pointer; transition: all 0.3s; }
.lang-btn:hover { background: rgba(255, 215, 0, 0.2); transform: rotate(180deg); }

/* CONTENIDO Y PESTAÑAS */
.content-area { width: 100%; position: relative; }
.tab-content { display: none; animation: fadeIn 0.4s ease-out; }
.tab-content.active { display: block; }

/* CARDS */
.card { background: var(--card-bg); backdrop-filter: blur(10px); border-radius: 20px; padding: 20px; margin-bottom: 16px; border: 1px solid rgba(255, 255, 255, 0.05); box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5); position: relative; overflow: hidden; animation: slideUp 0.6s ease-out; }
.balance-header { display: flex; justify-content: space-between; color: var(--text-muted); font-size: 12px; }
.balance-amount { font-size: 36px; font-weight: bold; display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.currency { font-size: 16px; color: var(--accent-green); }

.coin-img { width: 40px; height: 40px; object-fit: contain; animation: coinFloat 3s ease-in-out infinite; filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.6)); }

.action-buttons { display: flex; gap: 12px; margin-top: 20px; }
.btn-primary { flex: 1; padding: 14px; border-radius: 14px; border: none; background: linear-gradient(135deg, var(--accent-green), #00cc6a); color: #000; font-weight: bold; cursor: pointer; transition: all 0.3s; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0, 255, 136, 0.5); }

/* RANKING */
.ranking-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.rank-item { display: flex; justify-content: space-between; padding: 12px; background: rgba(255, 255, 255, 0.03); border-radius: 10px; border-left: 3px solid var(--gold); transition: all 0.3s; }
.rank-item:hover { background: rgba(255, 215, 0, 0.1); transform: translateX(5px); }
.rank-item .points { color: var(--accent-green); font-weight: bold; }

/* TAREAS */
.tasks-section { margin-top: 20px; }
.task-card { background: var(--card-bg); border-radius: 16px; padding: 16px; display: flex; align-items: center; gap: 14px; margin-top: 12px; border: 1px solid rgba(255, 255, 255, 0.05); }
.task-icon-img { width: 40px; height: 40px; object-fit: contain; animation: floatUpDown 3s ease-in-out infinite; filter: drop-shadow(0 0 8px rgba(0, 255, 136, 0.3)); }
.task-info { flex: 1; }
.task-info h3 { font-size: 14px; }
.reward { color: var(--accent-green); font-size: 13px; font-weight: bold; }
.btn-claim { background: linear-gradient(135deg, var(--accent-green), #00cc6a); border: none; padding: 10px 18px; border-radius: 10px; color: #000; font-weight: bold; cursor: pointer; transition: all 0.3s; }
.btn-claim:hover { transform: scale(1.05); }

/* BARRA DE NAVEGACIÓN INFERIOR */
.bottom-nav {
    position: fixed; bottom: 0; left: 0; width: 100%;
    background: rgba(10, 15, 10, 0.95); backdrop-filter: blur(15px);
    border-top: 1px solid rgba(0, 255, 136, 0.2);
    display: flex; justify-content: space-around;
    padding: 10px 0 15px 0; z-index: 999;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.5);
}
.nav-item { background: none; border: none; display: flex; flex-direction: column; align-items: center; color: #889988; cursor: pointer; transition: all 0.3s ease; width: 20%; }
.nav-icon { font-size: 22px; margin-bottom: 4px; filter: grayscale(100%); opacity: 0.7; transition: all 0.3s; }
.nav-text { font-size: 10px; font-weight: bold; letter-spacing: 0.5px; }
.nav-item.active { color: var(--accent-green); }
.nav-item.active .nav-icon { filter: grayscale(0%); opacity: 1; transform: translateY(-3px) scale(1.1); text-shadow: 0 0 10px rgba(0, 255, 136, 0.5); }
.nav-item.active .nav-text { text-shadow: 0 0 10px rgba(0, 255, 136, 0.3); }

/* NOTIFICACIONES BONITAS (TOASTS) */
.toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 90%;
    max-width: 350px;
    pointer-events: none;
}
.toast {
    background: rgba(17, 24, 17, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid #00ff88;
    border-left: 4px solid #00ff88;
    color: #fff;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    box-shadow: 0 4px 15px rgba(0, 255, 136, 0.2);
    animation: slideInToast 0.3s ease forwards;
    display: flex;
    align-items: center;
    gap: 10px;
}
.toast.error {
    border-color: #ff4444;
    border-left-color: #ff4444;
    box-shadow: 0 4px 15px rgba(255, 68, 68, 0.2);
}
@keyframes slideInToast {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- SECCIÓN DE REFERIDOS --- */
.ref-header { text-align: center; margin-bottom: 15px; }
.ref-image-container { text-align: center; margin-bottom: 15px; }
.ref-img { width: 100%; max-width: 180px; animation: floatUpDown 4s ease-in-out infinite; filter: drop-shadow(0 0 20px rgba(0, 255, 136, 0.3)); }
.ref-pill { 
    background: rgba(0, 255, 136, 0.1); 
    border: 1px solid rgba(0, 255, 136, 0.3); 
    padding: 8px 15px; 
    border-radius: 20px; 
    text-align: center; 
    font-size: 13px; 
    font-weight: bold; 
    margin-bottom: 15px; 
    width: fit-content; 
    margin-left: auto; 
    margin-right: auto;
}
.ref-link-box {
    background: #0a0e0a;
    border: 1px solid #1a251a;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 15px;
}
.ref-actions { display: flex; gap: 8px; margin-bottom: 20px; }
.btn-share {
    flex: 1; background: linear-gradient(135deg, #00ff88, #00cc6a);
    color: #000; border: none; padding: 12px; border-radius: 10px;
    font-weight: bold; font-size: 14px; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 5px;
    box-shadow: 0 4px 15px rgba(0, 255, 136, 0.3);
}
.btn-icon {
    background: rgba(255, 255, 255, 0.05); border: 1px solid #1a251a;
    color: #fff; padding: 0 15px; border-radius: 10px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.ref-stats { display: flex; gap: 10px; }
.stat-box {
    flex: 1; background: #0a0e0a; border: 1px solid #1a251a;
    border-radius: 12px; padding: 12px; display: flex; align-items: center; gap: 10px;
}
.stat-icon { font-size: 24px; background: rgba(0, 255, 136, 0.1); padding: 8px; border-radius: 50%; }

/* --- SECCIÓN DE RETIRO --- */
.network-box {
    background: #0a0e0a; border: 1px solid #00ff88; border-radius: 12px;
    padding: 12px; display: flex; justify-content: space-between; align-items: center;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.1);
}
.wallet-input {
    width: 100%; background: #0a0e0a; border: 1px solid #1a251a;
    padding: 14px; border-radius: 10px; color: #fff; font-size: 14px;
    margin-bottom: 15px; outline: none; transition: border 0.3s;
}
.wallet-input:focus { border-color: #00ff88; }
.withdraw-details { background: #0a0e0a; border: 1px solid #1a251a; border-radius: 12px; padding: 15px; margin-bottom: 20px; }
.detail-row { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 8px; color: #889988; }
.detail-row span:last-child { color: #fff; }

/* ANIMACIONES GENERALES */
@keyframes coinFloat { 0%, 100% { transform: translateY(0) rotateY(0deg); } 50% { transform: translateY(-8px) rotateY(180deg); } }
@keyframes floatUpDown { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
/* =========================================
   NUEVOS ESTILOS AÑADIDOS (PayNex)
   ========================================= */

/* BARRA DE CAPITAL (Arriba de todo) */
.capital-bar-container {
    position: fixed;
    top: 0; left: 0; width: 100%;
    background: rgba(10, 15, 10, 0.95);
    border-bottom: 1px solid #00ff88;
    padding: 10px 15px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.capital-text {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #fff;
    font-weight: bold;
}
.capital-text span:last-child {
    color: #00ff88;
}
.capital-progress {
    width: 100%; height: 6px;
    background: #333;
    border-radius: 3px;
    overflow: hidden;
}
.capital-fill {
    height: 100%;
    background: linear-gradient(90deg, #00ff88, #00cc6a);
    width: 100%;
    transition: width 1s linear;
}

/* MENSAJES FLOTANTES DE RETIRO (TOASTS) */
.toast-container {
    position: fixed;
    top: 60px; /* Debajo de la barra de capital */
    left: 50%;
    transform: translateX(-50%);
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 90%;
    max-width: 350px;
    pointer-events: none;
}
.toast {
    background: rgba(17, 24, 17, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid #00ff88;
    border-left: 4px solid #00ff88;
    color: #fff;
    padding: 10px 15px;
    border-radius: 10px;
    font-size: 12px;
    box-shadow: 0 4px 15px rgba(0, 255, 136, 0.2);
    animation: slideInTop 0.4s ease forwards, fadeOutTop 0.5s ease 4s forwards;
    display: flex;
    align-items: center;
    gap: 10px;
}
@keyframes slideInTop { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeOutTop { from { opacity: 1; } to { opacity: 0; } }

/* BOTONES DE RED (BEP20, TRC20, ERC20) */
.network-selector {
    display: flex;
    gap: 5px;
    margin-bottom: 15px;
}
.network-btn {
    flex: 1;
    background: rgba(0,0,0,0.5);
    border: 1px solid #555;
    color: #888;
    padding: 8px;
    border-radius: 5px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Segoe UI', sans-serif;
}
.network-btn.active {
    border-color: #00ff88;
    color: #00ff88;
    background: rgba(0, 255, 136, 0.1);
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.2);
}

/* ARREGLO PARA QUE EL HEADER NO CHOQUE CON LA BARRA DE CAPITAL */
.app-container {
    padding-top: 50px; /* Espacio para la barra de capital */
    }
