/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
  --bg-dark: #050a14;
  --bg-card: #0f1623;
  --brand: #fff404;       /* Amarillo Neón */
  --brand-2: #00f2ea;     /* Cyan */
  --orange-grad: linear-gradient(90deg, #ff8c00 0%, #ffffff 100%); /* Nuevo Degradado */
  --text-main: #ffffff;
  --text-muted: #94a3b8;
  --glass-border: rgba(255, 255, 255, 0.08);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: 'Segoe UI', system-ui, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; padding: 0; margin: 0; }
img { max-width: 100%; display: block; }

/* Utilidades */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

/* =========================================
   2. HEADER & NAVIGATION (NUEVO DISEÑO)
   ========================================= */
.site-header { position: fixed; top: 0; width: 100%; z-index: 1000; padding: 15px 0; }

.header-inner.glass-panel {
  background: rgba(5, 10, 20, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  padding: 10px 30px;
  display: flex; justify-content: space-between; align-items: center;
  max-width: 1250px; margin: 0 auto;
}

/* GRUPO LOGO + SLOGAN */
.brand-group {
    display: flex; align-items: center; gap: 15px;
}

.brand img { height: 40px; filter: drop-shadow(0 2px 10px rgba(0,0,0,0.5)); }

.slogan {
    font-weight: 800;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: var(--orange-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    border-left: 1px solid rgba(255,255,255,0.2);
    padding-left: 15px;
    line-height: 1.2;
}

/* MENÚ DE NAVEGACIÓN */
.main-nav ul {
    display: flex; gap: 25px;
}
.nav-link {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    position: relative;
}
.nav-link:hover, .nav-link.active {
    color: white;
}
.nav-link::after {
    content: ''; position: absolute; bottom: -5px; left: 0; width: 0%; height: 2px;
    background: var(--brand-2); transition: 0.3s;
}
.nav-link:hover::after { width: 100%; }

/* BOTÓN CAMBIAR EVENTO */
.btn-nav {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    padding: 8px 20px;
    border-radius: 30px;
    cursor: pointer;
    transition: 0.3s;
    display: flex; align-items: center; gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}
.btn-nav:hover {
    background: var(--brand);
    color: black;
    border-color: var(--brand);
    box-shadow: 0 0 15px rgba(255, 244, 4, 0.3);
}

/* RESPONSIVE HEADER */
@media (max-width: 992px) {
    .slogan { display: none; } /* Ocultar slogan en tablets para espacio */
}

@media (max-width: 768px) {
    .header-inner.glass-panel {
        padding: 10px 20px;
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
        border-radius: 20px;
    }
    .brand-group { width: 100%; justify-content: center; margin-bottom: 5px; }
    .slogan { display: block; font-size: 0.8rem; border: none; padding: 0; } /* Mostrar slogan abajo logo */
    .brand-group { flex-direction: column; gap: 5px; }
    
    .main-nav { order: 3; width: 100%; overflow-x: auto; padding-bottom: 5px; }
    .main-nav ul { justify-content: center; gap: 15px; }
    
    .btn-nav { order: 2; width: 100%; justify-content: center; }
}

/* =========================================
   3. HERO SECTION
   ========================================= */
.results-hero {
    text-align: center;
    padding: 160px 20px 40px; 
    background: radial-gradient(circle at top center, rgba(0, 242, 234, 0.15) 0%, var(--bg-dark) 60%);
    position: relative;
    overflow: hidden;
}

.event-logo-large {
    max-width: 280px;
    margin: 0 auto 20px;
    filter: drop-shadow(0 0 30px rgba(255, 244, 4, 0.2));
    animation: floatLogo 6s ease-in-out infinite;
}

.event-meta { display: flex; justify-content: center; gap: 15px; margin-top: 15px; flex-wrap: wrap; }
.meta-badge { background: rgba(255,255,255,0.1); padding: 8px 16px; border-radius: 20px; font-size: 0.9rem; border: 1px solid rgba(255,255,255,0.2); display: flex; align-items: center; gap: 8px; color: white; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: #ccc; box-shadow: 0 0 5px currentColor; }
.status-finished { background: #00f2ea; color: #00f2ea; }

/* =========================================
   4. PODIO
   ========================================= */
.podium-section { margin-bottom: 50px; perspective: 1000px; }
.podium-title { text-align: center; font-size: 1.5rem; margin: 40px 0 20px; color: #00f2ea; text-transform: uppercase; letter-spacing: 2px; font-weight: bold; }

.dual-podium-wrapper {
    display: flex; justify-content: center; gap: 40px; width: 100%; max-width: 1200px; margin: 0 auto; flex-wrap: wrap;
}
.podium-column { flex: 1; min-width: 300px; display: flex; flex-direction: column; align-items: center; }

.podium-container {
    display: flex; justify-content: center; align-items: flex-end; gap: 10px; height: 350px; width: 100%; padding-bottom: 20px;
}

.podium-place {
    width: 30%; min-width: 90px; display: flex; flex-direction: column; align-items: center; position: relative; transition: transform 0.3s;
}
.place-1 { z-index: 10; } 
.place-2, .place-3 { z-index: 5; }
.podium-place:hover { transform: translateY(-5px); }

.podium-avatar {
    width: 60px; height: 60px;
    background: var(--bg-card);
    border: 3px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    margin-bottom: -20px; 
    font-weight: bold; font-size: 1.4rem; color: white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    position: relative;
    z-index: 2; 
}

.podium-bar {
    width: 100%;
    border-radius: 12px 12px 0 0;
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border); border-bottom: none;
    display: flex; justify-content: center; align-items: flex-end;
    position: relative;
    z-index: 1; 
    box-shadow: 0 0 30px rgba(0,0,0,0.3);
}

.medal-img {
    position: absolute;
    top: -50px; 
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.6));
    z-index: 20; 
    animation: floatMedal 3s ease-in-out infinite;
    pointer-events: none;
}
@keyframes floatMedal {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-8px); }
}

.winner-info { text-align: center; margin-bottom: 15px; z-index: 3; text-shadow: 0 2px 4px rgba(0,0,0,0.8); }
.winner-name { font-weight: 800; color: white; font-size: 0.9rem; display: block; }
.winner-time { font-family: 'Courier New', monospace; color: var(--brand); font-size: 0.85rem; background: rgba(0,0,0,0.6); padding: 2px 6px; border-radius: 4px; }

.place-1 .podium-bar { height: 200px; border-top: 4px solid #FFD700; background: linear-gradient(to bottom, rgba(255, 215, 0, 0.2), rgba(0,0,0,0.3)); }
.place-1 .podium-avatar { border-color: #FFD700; background: #1a1a00; color: #FFD700; }
.place-2 .podium-bar { height: 140px; border-top: 4px solid #C0C0C0; background: linear-gradient(to bottom, rgba(192, 192, 192, 0.15), rgba(0,0,0,0.3)); }
.place-2 .podium-avatar { border-color: #C0C0C0; color: #C0C0C0; }
.place-3 .podium-bar { height: 100px; border-top: 4px solid #CD7F32; background: linear-gradient(to bottom, rgba(205, 127, 50, 0.15), rgba(0,0,0,0.3)); }
.place-3 .podium-avatar { border-color: #CD7F32; color: #CD7F32; }

/* =========================================
   5. CONTROLES Y TABLAS
   ========================================= */
.controls-bar { display: flex; justify-content: center; margin-bottom: 30px; }
.search-box { position: relative; width: 100%; max-width: 400px; }
.search-box input {
    width: 100%; padding: 12px 20px 12px 50px;
    background: rgba(255,255,255,0.05); border: 1px solid var(--glass-border);
    border-radius: 50px; color: white; outline: none; transition: 0.3s;
}
.search-box input:focus { border-color: var(--brand-2); background: rgba(0, 242, 234, 0.05); }
.search-icon { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }

.tabs-container { display: flex; justify-content: center; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.tab-btn {
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.2);
    color: #aaa; padding: 10px 20px; border-radius: 30px; cursor: pointer; transition: 0.3s;
    display: flex; align-items: center; gap: 8px;
}
.tab-btn:hover { background: rgba(255,255,255,0.1); color: white; }
.tab-btn.active { background: #00f2ea; color: #0f1623; font-weight: bold; border-color: #00f2ea; box-shadow: 0 0 15px rgba(0, 242, 234, 0.4); }
.tab-content { display: none; width: 100%; animation: fadeIn 0.5s; }
.tab-content.active { display: block; }

.table-container {
    width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch;
    border-radius: 16px; background: rgba(15, 22, 35, 0.7);
    border: 1px solid var(--glass-border); margin-top: 20px;
}
.results-table { width: 100%; min-width: 700px; border-collapse: collapse; }
.results-table th { background: rgba(0,0,0,0.3); padding: 15px; text-align: left; color: var(--text-muted); font-size: 0.85rem; text-transform: uppercase; }
.results-table td { padding: 15px; border-bottom: 1px solid rgba(255,255,255,0.03); color: white; font-size: 0.9rem; }
.rank-badge { display: inline-block; width: 28px; height: 28px; line-height: 28px; text-align: center; background: rgba(255,255,255,0.1); border-radius: 50%; font-size: 0.8rem; font-weight: bold; }

.btn-cert {
    display: inline-flex; align-items: center; gap: 5px;
    background: rgba(255, 255, 255, 0.1); color: var(--brand-2);
    padding: 5px 10px; border-radius: 6px; border: 1px solid var(--brand-2);
    font-size: 0.75rem; text-decoration: none; text-transform: uppercase; font-weight: bold;
}
.btn-cert:hover { background: var(--brand-2); color: var(--bg-dark); }

.cat-header { width: 100%; text-align: center; margin: 60px 0 30px; border-bottom: 2px solid #00f2ea; line-height: 0.1em; }
.cat-header span { background: var(--bg-dark); padding: 0 20px; color: #00f2ea; font-size: 1.5rem; font-weight: bold; text-transform: uppercase; }

/* =========================================
   6. OTROS
   ========================================= */
#preloader { position: fixed; inset: 0; background-color: var(--bg-dark); z-index: 9999; display: flex; flex-direction: column; align-items: center; justify-content: center; transition: opacity 0.6s; }
.loader-spinner { width: 40px; height: 40px; border: 4px solid rgba(255,255,255,0.1); border-top-color: var(--brand-2); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

#eventModal { position: fixed; inset: 0; background: rgba(15,22,35,0.98); z-index: 10000; display: flex; flex-direction: column; align-items: center; justify-content: center; transition: opacity 0.5s; }
.event-card { background: rgba(255,255,255,0.05); border: 1px solid var(--brand-2); padding: 30px; border-radius: 15px; cursor: pointer; text-align: center; width: 250px; transition: 0.3s; color: white; margin: 10px; }
.event-card:hover { transform: translateY(-10px); background: rgba(255,255,255,0.1); }
.event-card i { font-size: 3rem; margin-bottom: 15px; }

.site-footer { border-top: 1px solid var(--glass-border); background: #020408; padding: 50px 0 20px; margin-top: 80px; text-align: center; }
.whatsapp-btn { display: inline-flex; align-items: center; gap: 10px; background-color: #25D366; color: white; padding: 12px 25px; border-radius: 50px; font-weight: bold; text-decoration: none; margin-top: 15px; }

@media (max-width: 768px) {
    .dual-podium-wrapper { flex-direction: column; }
    .podium-column { width: 100%; }
}
@keyframes floatLogo { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-15px); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideUpFade { to { opacity: 1; transform: translateY(0); } }