:root {
    --bg-dark: #0f172a; 
    --bg-card: rgba(30, 41, 59, 0.7);
    --primary-gradient: linear-gradient(135deg, #FF8C00 0%, #FF0055 100%);
    --accent: #FF8C00; 
    --live-color: #ff0000; 
    --text-main: #f8fafc;
    --text-secondary: #94a3b8;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Fondo Animado */
body::before {
    content: ''; position: fixed; top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(255, 140, 0, 0.15) 0%, rgba(15, 23, 42, 0) 70%);
    z-index: -1; animation: pulseBackground 10s infinite alternate;
}
@keyframes pulseBackground { 0% { transform: scale(1); } 100% { transform: scale(1.1); } }

/* Navbar */
nav {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1rem 5%; backdrop-filter: blur(10px); position: fixed;
    width: 100%; z-index: 200; border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: all 0.3s;
}

.logo-container { display: flex; align-items: center; text-decoration: none; z-index: 202; }
.logo-img { max-height: 50px; width: auto; cursor: pointer; display: block; }

.logo-text {
    font-weight: 800; font-size: 1.5rem; letter-spacing: -1px;
    background: var(--primary-gradient); -webkit-background-clip: text;
    -webkit-text-fill-color: transparent; cursor: pointer; display: none; 
    filter: drop-shadow(0 2px 4px rgba(255, 0, 85, 0.2));
}

/* Menú Escritorio */
.nav-links { display: flex; align-items: center; }
.nav-links a.nav-item { color: var(--text-secondary); text-decoration: none; margin-left: 2rem; font-weight: 600; transition: color 0.3s; }
.nav-links a.nav-item:hover { color: var(--accent); }

/* --- Selector de Idioma Escritorio --- */
.lang-dropdown { position: relative; margin-left: 2rem; display: inline-block; }
.lang-btn {
    background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-main); padding: 0.5rem 1rem; border-radius: 50px;
    cursor: pointer; display: flex; align-items: center; gap: 10px;
    font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 0.85rem;
    transition: all 0.3s ease;
}
.lang-btn:hover, .lang-dropdown:hover .lang-btn { background: rgba(255, 255, 255, 0.1); border-color: var(--accent); box-shadow: 0 0 15px rgba(255, 140, 0, 0.2); }
.lang-flag { width: 20px; height: 15px; object-fit: cover; border-radius: 2px; box-shadow: 0 2px 4px rgba(0,0,0,0.5); }
.lang-menu {
    display: none; position: absolute; top: 120%; right: 0;
    background: #1e293b; min-width: 180px; border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.1); box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    overflow: hidden; z-index: 101; flex-direction: column;
    animation: fadeInMenu 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}
@keyframes fadeInMenu { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
.lang-dropdown:hover .lang-menu { display: flex; }
.lang-option { padding: 12px 15px; display: flex; align-items: center; gap: 10px; color: var(--text-secondary); text-decoration: none; font-size: 0.85rem; font-weight: 600; transition: background 0.2s, color 0.2s; }
.lang-option:hover { background: rgba(255, 140, 0, 0.1); color: var(--accent); }

/* --- CONTROLES MÓVIL (Wrapper) --- */
.mobile-controls-wrapper {
    display: none; /* Oculto en escritorio */
    align-items: center;
    gap: 15px;
    z-index: 202; 
}

/* Mini Banderas en Navbar Móvil */
.mobile-mini-langs {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.05);
    padding: 5px 10px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.1);
}
.mini-flag-btn {
    width: 25px; height: 25px; border-radius: 50%;
    cursor: pointer; transition: transform 0.2s;
    object-fit: cover; opacity: 0.5; border: 1px solid transparent;
}
.mini-flag-btn.active { opacity: 1; transform: scale(1.2); border-color: var(--accent); box-shadow: 0 0 5px var(--accent); }

/* Botón Hamburguesa Unificado */
.mobile-menu-toggle { 
    font-size: 1.5rem; color: white; background: none; border: none; cursor: pointer; 
    width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
    transition: transform 0.3s;
}
.mobile-menu-toggle:active { transform: scale(0.9); }

/* Overlay Menú Móvil */
.mobile-nav-overlay {
    position: fixed; top: 0; right: -100%; width: 100%; height: 100vh;
    background: rgba(15, 23, 42, 0.98); backdrop-filter: blur(15px);
    z-index: 201; /* Debajo del navbar/toggle */
    transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 2rem;
}
.mobile-nav-overlay.active { right: 0; }
.mobile-nav-link {
    font-size: 2rem; font-weight: 800; color: white; text-decoration: none;
    transition: color 0.3s;
}
.mobile-nav-link:hover { color: var(--accent); }


/* Hero */
.hero { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 7rem 1rem 2rem 1rem; }
.hero-image-box {
    width: 100%; max-width: 1200px; height: 400px; margin-bottom: 3rem;
    border-radius: 20px; overflow: hidden; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1); opacity: 0; animation: fadeInDown 1s ease-out forwards;
}
.hero-image-box img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: center; }
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }

.hero h1 { font-size: 3.5rem; line-height: 1.1; margin-bottom: 1.5rem; font-weight: 800; }
.hero h1 span { color: var(--accent); background: var(--primary-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero p { font-size: 1.25rem; color: var(--text-secondary); max-width: 600px; margin-bottom: 2.5rem; }

.cta-btn {
    padding: 1rem 2.5rem; background: var(--primary-gradient); color: white; border: none;
    border-radius: 50px; font-size: 1.1rem; font-weight: 700; cursor: pointer;
    box-shadow: 0 10px 25px -5px rgba(255, 0, 85, 0.5); transition: transform 0.2s, box-shadow 0.2s; text-decoration: none;
}
.cta-btn:hover { transform: translateY(-3px); box-shadow: 0 20px 30px -10px rgba(255, 0, 85, 0.6); }

/* Categorias */
.categories { padding: 4rem 10%; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.card {
    background: var(--bg-card); padding: 2.5rem; border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.1); backdrop-filter: blur(12px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); text-align: center; position: relative; overflow: hidden; cursor: pointer;
}
.card:hover { transform: translateY(-12px); border-color: var(--accent); background: rgba(30, 41, 59, 0.95); box-shadow: 0 0 25px rgba(255, 140, 0, 0.3), inset 0 0 10px rgba(255, 140, 0, 0.1); }
.card i { font-size: 3rem; margin-bottom: 1.5rem; background: var(--primary-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; transition: transform 0.3s; }
.card:hover i { transform: scale(1.1); }

/* === BADGE RADIO (Texto) === */
.live-badge { position: absolute; top: 15px; right: 15px; background: var(--live-color); color: white; font-size: 0.6rem; font-weight: 800; padding: 3px 8px; border-radius: 10px; }

/* === BADGE TV (Onda Expansiva / Radar) === */
.signal-badge {
    position: absolute;
    top: 20px; right: 20px;
    width: 10px; height: 10px;
    background-color: var(--live-color);
    border-radius: 50%;
    z-index: 5;
}
.signal-badge::before,
.signal-badge::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 100%; height: 100%;
    border-radius: 50%;
    border: 1px solid var(--live-color);
    opacity: 0;
    animation: signalWave 2s infinite cubic-bezier(0, 0.2, 0.8, 1);
}
.signal-badge::after { animation-delay: 0.8s; }

@keyframes signalWave {
    0% { width: 100%; height: 100%; opacity: 1; border-width: 2px; }
    100% { width: 400%; height: 400%; opacity: 0; border-width: 0px; }
}

.card.live-effect { animation: blink-glow 2s infinite ease-in-out; }
@keyframes blink-glow { 0% { box-shadow: 0 0 5px rgba(255,0,85,0.2); } 50% { box-shadow: 0 0 20px rgba(255,0,85,0.6); } 100% { box-shadow: 0 0 5px rgba(255,0,85,0.2); } }

.card h3 { margin-bottom: 1rem; font-size: 1.5rem; position: relative; z-index: 2; }
.card p { color: var(--text-secondary); font-size: 0.95rem; transition: opacity 0.3s, transform 0.3s; position: relative; z-index: 2; }
.card::after {
    content: attr(data-content); position: absolute; bottom: 20px; left: 0; width: 100%;
    text-align: center; font-size: 0.85rem; font-weight: 800; letter-spacing: 1px;
    color: var(--accent); opacity: 0; transform: translateY(20px); transition: all 0.4s ease;
    z-index: 3; text-shadow: 0 0 5px rgba(255, 140, 0, 0.5);
}
.card:hover::after { opacity: 1; transform: translateY(0); }
.card:hover p { opacity: 0.4; transform: translateY(-5px); }

/* Ranking */
.ranking-section { padding: 2rem 10%; margin-top: 4rem; }
.ranking-main-title { text-align: center; font-size: 2rem; font-weight: 800; margin-bottom: 2rem; color: white; }

.highlight {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.trophy-icon {
    font-size: 2.2rem;
    margin-left: 10px;
    vertical-align: middle;
    background: linear-gradient(180deg, #ffb300 0%, #ff4500 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.5));
}

.ranking-subtitle, .partners-title, .map-title { 
    text-align: center; font-size: 2rem; font-weight: 800; margin-bottom: 3rem; position: relative; margin-top: 4rem;
}
.ranking-subtitle { font-size: 1.5rem; margin-top: 4rem; margin-bottom: 2rem;}

.ranking-subtitle::after, 
.partners-title::after, 
.map-title::after { 
    content: ''; display: block; width: 60px; height: 3px; 
    background: var(--primary-gradient); 
    margin: 10px auto 0; border-radius: 2px; 
}

.ranking-row { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; margin-bottom: 2rem; }
.ranking-column h3 { text-align: center; margin-bottom: 1.5rem; font-size: 1.25rem; color: var(--accent); text-transform: uppercase; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 10px; }
.rank-item { display: flex; align-items: center; background: rgba(255,255,255,0.03); margin-bottom: 0.8rem; padding: 0.8rem; border-radius: 12px; border: 1px solid rgba(255,255,255,0.05); transition: transform 0.2s; text-decoration: none; color: var(--text-main); }
.rank-item:hover { transform: translateX(5px); background: rgba(255,255,255,0.08); border-color: var(--accent); }
.rank-number { font-size: 1.2rem; font-weight: 900; width: 30px; text-align: center; margin-right: 10px; color: var(--text-secondary); }
.rank-cover { width: 50px; height: 50px; border-radius: 8px; object-fit: cover; margin-right: 15px; flex-shrink: 0; background-color: rgba(255,255,255,0.1); }
.rank-info { flex: 1; overflow: hidden; }
.rank-name { font-weight: 700; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 0.9rem; }
.rank-meta { font-size: 0.7rem; color: var(--text-secondary); }

/* Socios */
.partners-section { padding: 4rem 0; position: relative; overflow: hidden; }
.partners-wrapper { position: relative; display: flex; align-items: center; width: 100%; }
.partners-wrapper::before, .partners-wrapper::after { content: ''; position: absolute; top: 0; bottom: 0; width: 80px; z-index: 2; pointer-events: none; }
.partners-wrapper::before { left: 0; background: linear-gradient(to right, var(--bg-dark), transparent); }
.partners-wrapper::after { right: 0; background: linear-gradient(to left, var(--bg-dark), transparent); }

.partners-track { 
    display: flex; gap: 2.5rem; overflow-x: auto; scroll-behavior: smooth; 
    padding: 2rem 70px; /* Padding extra para que las flechas no tapen */
    width: 100%; scrollbar-width: none; -ms-overflow-style: none; 
}

.partners-track::-webkit-scrollbar { display: none; }
.partner-item { flex: 0 0 auto; width: 130px; height: 130px; background: rgba(255,255,255,0.02); border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 2px solid transparent; background-image: linear-gradient(#0f172a, #0f172a), var(--primary-gradient); background-origin: border-box; background-clip: content-box, border-box; transition: transform 0.3s, box-shadow 0.3s; cursor: pointer; }
.partner-item:hover { transform: scale(1.1); box-shadow: 0 0 25px rgba(255, 140, 0, 0.4); }
.partner-img { width: 92%; height: 92%; border-radius: 50%; object-fit: cover; filter: grayscale(100%); transition: filter 0.3s; }
.partner-item:hover .partner-img { filter: grayscale(0%); }
.scroll-btn { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.1); color: white; border: 1px solid rgba(255,255,255,0.2); backdrop-filter: blur(5px); width: 45px; height: 45px; border-radius: 50%; cursor: pointer; z-index: 10; transition: all 0.3s; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; }
.scroll-btn.visible { opacity: 1; visibility: visible; }
.scroll-btn:hover { background: var(--accent); border-color: var(--accent); transform: translateY(-50%) scale(1.1); }
.scroll-btn.left { left: 20px; }
.scroll-btn.right { right: 20px; }

/* --- SECCIÓN MAPA --- */
.map-section { padding: 4rem 10%; text-align: center; }
.map-title .highlight { background: var(--primary-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.map-title span[data-translate] { color: var(--text-main); }

#conecta-map { width: 100%; height: 500px; border-radius: 20px; box-shadow: 0 0 30px rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.1); z-index: 1; background-color: #242424; }

/* --- ESTILOS DE MARCADORES --- */
.custom-vip-marker {
    font-family: 'Montserrat', sans-serif; font-weight: 900; font-size: 18px;
    color: #FF8C00; text-align: center; line-height: 20px;
    transition: all 0.3s ease; text-shadow: 0 2px 4px rgba(0,0,0,0.8); background: transparent;
}
.custom-vip-marker:hover {
    color: #ff0055; font-size: 24px; text-shadow: 0 0 10px #ff0055, 0 0 20px #ff0055; transform: scale(1.2); cursor: pointer;
}
.custom-c { 
    font-family: 'Montserrat', sans-serif; font-weight: 900; font-size: 16px; 
    color: #FF8C00; text-shadow: 0 2px 4px rgba(0,0,0,0.9); text-align: center; line-height: 20px; 
    cursor: pointer; 
}

/* Stats */
.stats { display: flex; justify-content: space-around; padding: 4rem 10%; border-top: 1px solid rgba(255,255,255,0.05); background: rgba(0,0,0,0.2); margin-top: 4rem; }
.stat-item { text-align: center; }
.stat-number { font-size: 2.5rem; font-weight: 800; color: white; display: block;}
.stat-label { color: var(--text-secondary); font-size: 0.9rem; letter-spacing: 1px; text-transform: uppercase;}

/* Scroll Top */
#scrollTopBtn { position: fixed; bottom: 30px; right: 30px; z-index: 99; border: none; outline: none; background: var(--primary-gradient); color: white; cursor: pointer; width: 50px; height: 50px; border-radius: 50%; font-size: 1.2rem; box-shadow: 0 4px 15px rgba(0,0,0,0.5); opacity: 0; visibility: hidden; transform: translateY(20px); transition: all 0.3s ease; }
#scrollTopBtn.show { opacity: 1; visibility: visible; transform: translateY(0); }

/* Modal Generico */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.85); backdrop-filter: blur(8px); display: flex; justify-content: center; align-items: center; z-index: 9999; opacity: 0; visibility: hidden; transition: opacity 0.25s ease, visibility 0.25s ease; }
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-content { background: #1e293b; width: 90%; max-width: 800px; border-radius: 20px; padding: 2rem; border: 1px solid rgba(255,255,255,0.1); box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5); transform: scale(0.95); transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275); max-height: 90vh; overflow-y: auto; }
.modal-overlay.active .modal-content { transform: scale(1); }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 1rem; }
.modal-title { font-size: 1.5rem; font-weight: 700; color: white; }
.close-modal { background: none; border: none; color: var(--text-secondary); font-size: 1.5rem; cursor: pointer; }

.grid-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.grid-item { display: flex; align-items: center; gap: 12px; padding: 1rem; background: rgba(255,255,255,0.03); border-radius: 12px; text-decoration: none; color: var(--text-main); transition: transform 0.2s; }
.grid-item:hover { background: rgba(255,255,255,0.08); border-color: var(--accent); transform: translateX(5px); }
.item-icon { width: 40px; height: 40px; background: rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center; border-radius: 50%; overflow: hidden; }
.item-icon img { width: 100%; height: 100%; object-fit: cover; }
.item-icon i { font-size: 1rem; background: var(--primary-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

/* --- MODAL ACERCA DE (FULL SCREEN) - FIXED --- */
.about-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    z-index: 99999;
    /* Flex para centrar */
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    opacity: 0; visibility: hidden; transition: all 0.4s ease;
    text-align: center; color: white;
}
.about-overlay.active { opacity: 1; visibility: visible; }

/* Contenedor Flex Interno para apilar verticalmente */
.about-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.about-content h2 { font-size: 2.5rem; margin-bottom: 1rem; background: var(--primary-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; font-weight: 900; }
.about-content p { font-size: 1.2rem; margin-bottom: 0.5rem; color: var(--text-secondary); margin-top: 0; }
.about-content strong { color: white; }

/* Estilo para la versión dentro del modal (Arriba del botón) */
.about-version {
    display: block; /* Asegura su propia linea */
    margin-top: 2rem !important; /* Separación con el email */
    margin-bottom: 1.5rem !important; /* Separación con el botón */
    padding: 5px 15px;
    background: rgba(255,255,255,0.1);
    border-radius: 15px;
    font-size: 0.9rem !important;
    color: var(--accent) !important;
    font-weight: 600;
}

.about-close-btn {
    /* Sin margen top grande, ya lo da la versión */
    padding: 10px 30px;
    background: transparent;
    border: 2px solid var(--accent);
    color: var(--accent);
    border-radius: 50px;
    font-size: 1rem; font-weight: 700;
    cursor: pointer; transition: all 0.3s;
}
.about-close-btn:hover { background: var(--accent); color: white; box-shadow: 0 0 20px rgba(255,140,0,0.5); }

/* --- FOOTER & BRANDING --- */
footer { text-align: center; padding: 3rem; color: var(--text-secondary); font-size: 0.9rem; border-top: 1px solid rgba(255,255,255,0.05); }

.footer-logo-box { margin-bottom: 2rem; display: flex; justify-content: center; width: 100%; }
.footer-img { max-height: 60px; width: auto; display: block; }

/* Fallback Texto Degradado */
.footer-fallback { 
    display: none; 
    font-size: 2rem; 
    font-weight: 900; 
    letter-spacing: -1px;
    background: linear-gradient(90deg, #ff0055 0%, #ff8c00 100%); 
    -webkit-background-clip: text; 
    -webkit-text-fill-color: transparent;
}

/* === Botón Acerca de LLAMATIVO === */
.version-container { display: flex; justify-content: center; align-items: center; gap: 15px; margin-top: 1rem; }

.about-btn-trigger {
    background: var(--primary-gradient);
    border: none;
    color: white;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex; align-items: center; gap: 8px;
    box-shadow: 0 0 15px rgba(255, 0, 85, 0.4); 
    animation: pulseBtn 3s infinite;
}

.about-btn-trigger:hover {
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(255, 140, 0, 0.6);
}

@keyframes pulseBtn {
    0% { box-shadow: 0 0 10px rgba(255, 0, 85, 0.4); }
    50% { box-shadow: 0 0 20px rgba(255, 140, 0, 0.6); }
    100% { box-shadow: 0 0 10px rgba(255, 0, 85, 0.4); }
}

/* --- RESPONSIVE / MOBILE --- */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.5rem; } 
    .nav-links { display: none; } 
    
    .mobile-controls-wrapper { display: flex; }

    .stats { flex-direction: column; gap: 2rem; } 
    .hero-image-box { height: 250px; }
    .ranking-row { grid-template-columns: 1fr; gap: 2rem; }
    #conecta-map { height: 400px; }
    
    .scroll-btn { 
        display: flex !important; 
        opacity: 1 !important; 
        visibility: visible !important;
        background: rgba(0,0,0,0.6); 
    }
}