/* CONFIGURACIÓN GENERAL Y FUENTES */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif; scroll-behavior: smooth; }
body { background-color: #121214; color: #ffffff; min-height: 100vh; }

/* BARRA DE NAVEGACIÓN */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    background-color: rgba(26, 26, 30, 0.95);
    border-bottom: 1px solid #29292e;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 700;
    color: #a800ff; 
}

.nav-links-desktop {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links-desktop a {
    color: #a8a8b3;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links-desktop a:hover, .nav-links-desktop a.active {
    color: #a800ff; 
}

.profile-avatar {
    width: 35px; height: 35px; background-color: #a800ff; color: white;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-weight: bold; border: 2px solid #ffffff;
}

/* ÁREA DE USUARIO Y SALDO */
.nav-user-section { display: flex; align-items: center; gap: 15px; }
.balance-pill { display: flex; align-items: center; gap: 10px; background-color: #1e1e24; border: 1px solid #41414d; padding: 6px 15px; border-radius: 30px; }
.wallet-icon { color: #a800ff; font-size: 20px; }
.balance-info { display: flex; flex-direction: column; line-height: 1.1; }
.balance-label { font-size: 10px; color: #a8a8b3; font-weight: 600; }
.balance-amount { font-size: 14px; color: #ffffff; font-weight: 700; }

.user-profile {
    display: flex; align-items: center; gap: 8px; background-color: #a800ff; color: white;
    padding: 8px 15px; border-radius: 30px; font-size: 14px; font-weight: 600; cursor: pointer;
    transition: background-color 0.2s;
}
.user-profile:hover { background-color: #8200c4; }

/* PORTADA PRINCIPAL (HERO) */
.hero-container {
    background: linear-gradient(rgba(18, 18, 20, 0.7), rgba(18, 18, 20, 1)), url('hero-bg.jpg');
    background-size: cover; background-position: center; padding: 100px 20px 50px 20px;
    text-align: center; display: flex; flex-direction: column; align-items: center;
}

.hero-badge {
    border: 1px solid #a800ff; color: #a800ff; padding: 6px 16px; border-radius: 30px;
    font-size: 12px; font-weight: 700; display: inline-block; margin-bottom: 20px; background-color: rgba(168, 0, 255, 0.1);
}

.hero-title { font-size: 48px; font-weight: 700; line-height: 1.2; margin-bottom: 15px; }
.hero-title .highlight { color: #a800ff; }
.hero-subtitle { color: #a8a8b3; font-size: 16px; max-width: 600px; margin: 0 auto 30px auto; }

.btn-primary {
    background-color: #a800ff; color: white; border: none; padding: 12px 30px; border-radius: 30px;
    font-size: 16px; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 8px;
    margin: 0 auto 50px auto; transition: background-color 0.2s, transform 0.2s;
}
.btn-primary:hover { background-color: #8200c4; transform: scale(1.05); }

.hero-stats { display: flex; justify-content: center; gap: 50px; text-align: center; }
.stat-box h2 { color: #a800ff; font-size: 32px; margin-bottom: 5px; }
.stat-box p { color: #a8a8b3; font-size: 14px; }

/* SECCIÓN: ELIGE TU JUEGO */
.games-section { display: flex; flex-direction: column; align-items: center; padding: 40px 20px; border-bottom: 1px solid #29292e; }
.section-badge { border: 1px solid #41414d; padding: 8px 20px; border-radius: 30px; font-size: 14px; font-weight: 600; color: #e1e1e6; display: flex; align-items: center; gap: 10px; margin-bottom: 30px; }
.section-badge .dot { width: 8px; height: 8px; background-color: #a800ff; border-radius: 50%; }
.games-grid { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; }

/* LA MAGIA DEL GUSANILLO */
.game-card { width: 200px; border-radius: 16px; cursor: pointer; position: relative; padding: 3px; transition: transform 0.3s; background-color: #1a1a1e; overflow: hidden; }
.game-card:hover { transform: translateY(-5px); }
.game-content { background-color: #1a1a1e; border-radius: 14px; height: 100%; position: relative; z-index: 2; overflow: hidden; }

/* El gusanillo oculto por defecto */
.game-card::before { 
    content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; 
    background: conic-gradient(transparent, transparent, transparent, #00e5ff, #a800ff); 
    animation: rotateWorm 3s linear infinite; z-index: 1; 
    opacity: 0; transition: opacity 0.3s ease; 
}

/* El gusanillo se ilumina al pasar el mouse */
.game-card:hover::before { opacity: 1; }

@keyframes rotateWorm { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Estilos y rutas de las imágenes de los juegos */
.game-image { height: 250px; background-color: #29292e; background-size: cover; background-position: center; }
.free-fire-bg { background-image: url('freefire.jpg'); }
.free-fire-pr-bg { background-image: url('freefirepr.jpg'); }

/* Textos debajo de las fotos */
.game-info { padding: 15px; }
.game-info h3 { font-size: 16px; margin-bottom: 5px; color: white; }
.game-info p { font-size: 12px; color: #a800ff; background-color: rgba(168, 0, 255, 0.1); padding: 4px 8px; border-radius: 6px; display: inline-block; }
/* CONTENEDOR PRINCIPAL Y ALERTA */
.container { max-width: 1200px; margin: 0 auto; padding: 60px 20px; border-bottom: 1px solid #29292e; }
.category-header { text-align: center; margin-bottom: 40px; }
.category-header h2 { font-size: 24px; color: #ffffff; margin-bottom: 15px; }
.alert-banner { background-color: rgba(234, 29, 44, 0.15); border: 1px solid #ea1d2c; color: #ffb3b8; padding: 12px 20px; border-radius: 8px; font-size: 14px; display: inline-block; max-width: 800px; }

/* GRILLA DE TARJETAS DE DIAMANTES */
.products-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; }
.card { background-color: #1a1a1e; border: 1px solid #29292e; border-radius: 12px; padding: 25px; text-align: center; position: relative; overflow: hidden; transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease; }
.card:hover { transform: translateY(-8px); border-color: #a800ff; box-shadow: 0 10px 20px rgba(168, 0, 255, 0.3); }
.card-badge { position: absolute; top: 15px; left: 15px; background-color: #ea1d2c; color: white; font-size: 12px; font-weight: bold; padding: 4px 8px; border-radius: 6px; }
.card-icon { font-size: 45px; margin-bottom: 15px; }
.card-title { font-size: 18px; margin-bottom: 5px; }
.card-stock { font-size: 12px; color: #04d361; margin-bottom: 15px; }
.card-prices { display: flex; justify-content: center; align-items: center; gap: 10px; margin-bottom: 20px; }
.price-old { color: #737380; text-decoration: line-through; font-size: 14px; }
.price-current { font-size: 20px; font-weight: 700; color: #ffffff; }
.btn-buy { width: 100%; background-color: #a800ff; color: white; border: none; padding: 12px; font-size: 14px; font-weight: 600; border-radius: 8px; cursor: pointer; transition: background-color 0.2s; }
.btn-buy:hover { background-color: #8200c4; }

/* ========================================== */
/* ESTILOS DE LA NUEVA TABLA DE RANKING       */
/* ========================================== */
.ranking-table-container { background-color: #1a1a1e; border: 1px solid #29292e; border-radius: 12px; overflow: hidden; max-width: 800px; margin: 0 auto; }
.ranking-table { width: 100%; border-collapse: collapse; text-align: left; }
.ranking-table th, .ranking-table td { padding: 15px 20px; font-size: 15px; }
.ranking-table th { background-color: #29292e; color: #a8a8b3; font-weight: 600; }
.ranking-table tbody tr { border-bottom: 1px solid #29292e; transition: background-color 0.2s; }
.ranking-table tbody tr:hover { background-color: rgba(168, 0, 255, 0.05); }
.top-rank { font-weight: 600; }
.rank-badge { padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: bold; }
.rank-badge.gold { background-color: rgba(255, 215, 0, 0.15); color: #ffd700; }
.rank-badge.silver { background-color: rgba(192, 192, 192, 0.15); color: #c0c0c0; }
.rank-badge.bronze { background-color: rgba(205, 127, 50, 0.15); color: #cd7f32; }
.rank-badge.common { background-color: rgba(168, 0, 255, 0.15); color: #d699ff; }

/* ========================================== */
/* ESTILOS DE LA NUEVA TARJETA DE SOPORTE     */
/* ========================================== */
.support-card { background-color: #1a1a1e; border: 1px solid #29292e; border-radius: 12px; padding: 40px; text-align: center; max-width: 600px; margin: 0 auto; }
.support-icon-box { width: 80px; height: 80px; background-color: rgba(168, 0, 255, 0.1); border: 2px solid #a800ff; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px auto; }
.support-icon-box span { color: #a800ff; font-size: 40px; }
.support-card h3 { font-size: 20px; margin-bottom: 10px; }
.support-card p { color: #a8a8b3; font-size: 14px; line-height: 1.6; margin-bottom: 30px; }
.btn-whatsapp { background-color: #04d361; color: white; text-decoration: none; padding: 14px 30px; border-radius: 30px; font-weight: 600; display: inline-flex; align-items: center; gap: 10px; box-shadow: 0 4px 15px rgba(4, 211, 97, 0.3); transition: transform 0.2s, background-color 0.2s; }
.btn-whatsapp:hover { background-color: #03b854; transform: translateY(-2px); }

/* MODALS */
.nav-auth-section { display: flex; gap: 15px; }
.btn-text { background: none; border: none; color: #a8a8b3; font-weight: 600; font-size: 14px; cursor: pointer; transition: color 0.2s; }
.btn-text:hover { color: #ffffff; }
.btn-outline { background: transparent; border: 2px solid #a800ff; color: #a800ff; padding: 8px 20px; border-radius: 30px; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.btn-outline:hover { background: #a800ff; color: white; }
.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.85); z-index: 1000; justify-content: center; align-items: center; backdrop-filter: blur(5px); }
.modal-box { background-color: #1a1a1e; border: 1px solid #29292e; width: 90%; max-width: 400px; padding: 30px; border-radius: 16px; position: relative; box-shadow: 0 20px 40px rgba(0,0,0,0.5); animation: slideUp 0.3s ease-out; }
.modal-large { max-width: 500px; }
@keyframes slideUp { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.close-btn { position: absolute; top: 15px; right: 20px; font-size: 24px; color: #a8a8b3; cursor: pointer; }
.close-btn:hover { color: white; }
.modal-header { margin-bottom: 25px; text-align: center; }
.modal-header h2 { font-size: 22px; color: white; margin-bottom: 5px; }
.modal-header p { font-size: 14px; color: #a8a8b3; }
.input-form { width: 100%; background-color: #121214; border: 1px solid #29292e; color: white; padding: 14px 15px; border-radius: 8px; margin-bottom: 15px; font-size: 14px; outline: none; transition: border-color 0.2s; }
.input-form:focus { border-color: #a800ff; }
.code-inputs { display: flex; justify-content: center; gap: 10px; margin-top: 20px; }
.code-box { width: 45px; height: 55px; text-align: center; font-size: 24px; font-weight: bold; background-color: #121214; border: 1px solid #29292e; color: #a800ff; border-radius: 8px; }
.profile-header { display: flex; align-items: center; gap: 15px; margin-bottom: 25px; }
.large-avatar { width: 60px; height: 60px; font-size: 24px; }
.greeting { font-size: 12px; color: #a8a8b3; font-weight: 600; letter-spacing: 1px; }
.balance-card { background: linear-gradient(135deg, rgba(168,0,255,0.2) 0%, rgba(26,26,30,1) 100%); border: 1px solid #a800ff; padding: 25px; border-radius: 12px; text-align: center; margin-bottom: 20px; }
.balance-card p { font-size: 12px; color: #a8a8b3; font-weight: 600; margin-bottom: 5px; }
.balance-card h1 { font-size: 40px; color: white; margin-bottom: 15px; }
.btn-recharge-action { background-color: #a800ff; color: white; border: none; padding: 12px 30px; border-radius: 30px; font-weight: 600; cursor: pointer; width: 100%; font-size: 16px; }
.profile-stats { display: flex; justify-content: space-between; gap: 15px; }
.p-stat { flex: 1; background-color: #121214; padding: 15px; border-radius: 8px; text-align: center; border: 1px solid #29292e; }
.p-stat h3 { color: white; font-size: 20px; }
.p-stat p { color: #a8a8b3; font-size: 10px; font-weight: 600; margin-top: 5px; }
.quick-amounts { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.amount-btn { flex: 1 1 calc(33% - 10px); background-color: #121214; border: 1px solid #29292e; color: white; padding: 12px; border-radius: 8px; cursor: pointer; font-weight: 600; transition: all 0.2s; }
.amount-btn:hover { border-color: #a800ff; }
.active-amount { background-color: rgba(168, 0, 255, 0.1); border-color: #a800ff; color: #a800ff; }
.custom-amount { display: flex; align-items: center; background-color: #121214; border: 1px solid #29292e; padding: 10px 15px; border-radius: 8px; margin-bottom: 20px; }
.custom-amount span { color: #a800ff; font-weight: 700; font-size: 20px; margin-right: 10px; }
.custom-amount input { background: transparent; border: none; color: white; font-size: 24px; font-weight: 700; outline: none; width: 100%; }
.warning-box { background-color: rgba(234, 29, 44, 0.1); border: 1px solid #ea1d2c; padding: 15px; border-radius: 8px; text-align: left; }
.warning-box h4 { color: #ffb3b8; font-size: 12px; margin-bottom: 10px; }
.warning-box ul { list-style: none; color: #a8a8b3; font-size: 12px; line-height: 1.5; }
.warning-box li { margin-bottom: 8px; padding-left: 15px; position: relative; }
.warning-box li::before { content: '×'; color: #ea1d2c; position: absolute; left: 0; font-weight: bold; }

/* ========================================== */
/* DISEÑO RESPONSIVO INTEGRADO (MEDIA QUERIES) */
/* ========================================== */
@media screen and (max-width: 768px) {
    .navbar { flex-direction: column; gap: 15px; padding: 15px; }
    .nav-links-desktop { gap: 20px; }
    .nav-auth-section, .nav-user-section { width: 100%; justify-content: center; }
    .hero-container { padding: 60px 15px 30px 15px; }
    .hero-title { font-size: 32px; }
    .hero-stats { flex-direction: column; gap: 20px; }
    .games-grid { flex-direction: column; align-items: center; }
    .game-card { width: 100%; max-width: 320px; }
    .products-grid { grid-template-columns: 1fr; gap: 20px; }
    .modal-box { width: 95%; padding: 20px; margin: 10px; }
    .balance-card h1 { font-size: 32px; }
    .quick-amounts { justify-content: center; }
    .amount-btn { flex: 1 1 calc(50% - 10px); }
    .ranking-table th, .ranking-table td { padding: 10px; font-size: 13px; }
    .support-card { padding: 20px; }

    /* Ocultar la foto de la derecha en celulares para ahorrar espacio */
    .login-container { flex-direction: column; margin-top: 60px; }
    .login-right { display: none; }
    .login-left { padding: 30px 20px; }
    .back-link { top: 15px; left: 15px; }
}

/* ========================================== */
/* PÁGINA DE LOGIN DIVIDIDA (ESTILO PINXTORE) */
/* ========================================== */
.login-body {
    display: flex; align-items: center; justify-content: center;
    min-height: 100vh; background-color: #0d0d0f; padding: 20px; position: relative;
}

.back-link {
    position: absolute; top: 30px; left: 30px; color: #a8a8b3;
    text-decoration: none; display: flex; align-items: center; gap: 8px;
    font-weight: 600; transition: color 0.3s;
}
.back-link:hover { color: #a800ff; }

.login-container {
    display: flex; background-color: #121214; border: 1px solid #29292e;
    border-radius: 20px; overflow: hidden; max-width: 1000px; width: 100%;
    box-shadow: 0 25px 50px rgba(0,0,0,0.5); margin-top: 40px;
}

.login-left { flex: 1; padding: 50px; display: flex; flex-direction: column; justify-content: center; }

.login-header { display: flex; align-items: center; gap: 15px; margin-bottom: 30px; }
.login-header h2 { font-size: 20px; color: white; }
.login-header p { font-size: 12px; color: #a8a8b3; }

.login-title { font-size: 28px; margin-bottom: 5px; }
.login-subtitle { color: #a8a8b3; font-size: 14px; margin-bottom: 30px; }

.login-form label { display: block; font-size: 12px; color: #a8a8b3; margin-bottom: 8px; font-weight: 600; }
.input-group {
    display: flex; align-items: center; background-color: #1a1a1e;
    border: 1px solid #29292e; border-radius: 8px; padding: 0 15px;
    margin-bottom: 20px; transition: border-color 0.3s;
}
.input-group:focus-within { border-color: #a800ff; }
.input-group .material-icons { color: #a8a8b3; font-size: 20px; }
.input-group input { background: transparent; border: none; color: white; padding: 15px 10px; width: 100%; outline: none; font-size: 14px; }
.eye-icon { cursor: pointer; color: #a8a8b3; }
.eye-icon:hover { color: white; }

.login-options { display: flex; justify-content: space-between; align-items: center; font-size: 12px; margin-bottom: 25px; color: #a8a8b3; }
.login-options a { color: #a800ff; text-decoration: none; }
.login-options input { margin-right: 5px; accent-color: #a800ff; }

.divider { display: flex; align-items: center; text-align: center; color: #41414d; margin: 20px 0; font-size: 12px; }
.divider::before, .divider::after { content: ''; flex: 1; border-bottom: 1px solid #29292e; }
.divider span { padding: 0 10px; }

.btn-social {
    width: 100%; background-color: #1a1a1e; border: 1px solid #29292e;
    color: white; padding: 12px; border-radius: 8px; font-size: 14px;
    font-weight: 600; display: flex; align-items: center; justify-content: center;
    gap: 10px; cursor: pointer; margin-bottom: 10px; transition: background-color 0.2s;
}
.btn-social:hover { background-color: #29292e; }
.btn-social img { width: 20px; height: 20px; }

.terms-text { text-align: center; font-size: 10px; color: #a8a8b3; margin-top: 25px; line-height: 1.5; }
.terms-text a { color: #a800ff; text-decoration: none; }

/* Lado Derecho */
.login-right {
    flex: 1; background: linear-gradient(135deg, #1a1a1e 0%, #121214 100%);
    padding: 50px; border-left: 1px solid #29292e; display: flex;
    flex-direction: column; justify-content: center;
}

.promo-image { height: 200px; background-color: #29292e; border-radius: 12px; margin-bottom: 30px; background-size: cover; background-position: center; }
.login-bg { background-image: url('hero-bg.jpg'); } 

.login-right h2 { font-size: 24px; margin-bottom: 15px; color: #00e5ff; }
.login-right p { color: #a8a8b3; font-size: 14px; line-height: 1.6; margin-bottom: 30px; }

.promo-list { list-style: none; margin-bottom: 30px; }
.promo-list li { display: flex; align-items: center; gap: 15px; margin-bottom: 15px; font-size: 14px; color: #e1e1e6; }
.promo-list li .material-icons { color: #00e5ff; background-color: rgba(0, 229, 255, 0.1); padding: 8px; border-radius: 8px; }

.promo-stats { display: flex; gap: 15px; }
.promo-stat-box { flex: 1; background-color: #1a1a1e; border: 1px solid #29292e; padding: 15px; border-radius: 8px; text-align: center; }
.promo-stat-box h3 { color: #00e5ff; font-size: 20px; margin-bottom: 5px; }
.promo-stat-box p { color: #a8a8b3; font-size: 11px; font-weight: 600; }
/* DISEÑO RESPONSIVO PARA MÓVILES */
@media (max-width: 768px) {
    body { padding: 10px; }
    .admin-header { flex-direction: column; text-align: center; gap: 15px; }
    .admin-table-container { padding: 10px; }
    
    /* Hacemos que las tablas sean desplazables horizontalmente sin romper el diseño */
    .admin-table-container { overflow-x: auto; }
    table { font-size: 12px; }
    th, td { padding: 10px 5px; }
    
    /* El buscador se adapta al ancho de la pantalla */
    .search-bar { width: 100%; box-sizing: border-box; }
    
    /* Ajuste para el formulario de códigos */
    .admin-table-container > div { grid-template-columns: 1fr !important; }
    
    /* Botones más grandes para dedos en móvil */
    .btn-add, .btn-remove, .btn-complete { padding: 10px; font-size: 12px; }
}