/* =========================================
   VARIABLES Y PALETA DE COLORES ÚNICA
========================================= */
:root {
    --color-fondo: #fcf9fa; /* Blanco con toque de rosa */
    --color-primario: #f48fb1; /* Rosa pastel suave */
    --color-acento: #ff4081; /* Rosa vibrante */
    --color-texto: #4a4a4a;
    --color-tarjeta: #ffffff;
    --sombra-suave: 0 10px 20px rgba(244, 143, 177, 0.15);
    --transicion: all 0.3s ease;
}

/* =========================================
   RESET Y ESTILOS GLOBALES
========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: var(--color-fondo);
    color: var(--color-texto);
    line-height: 1.6;
}

/* =========================================
   NAVEGACIÓN (HEADER)
========================================= */
header {
    background-color: var(--color-tarjeta);
    padding: 20px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--sombra-suave);
    position: sticky;
    top: 0;
    z-index: 100; /* Asegura que el menú siempre esté por encima */
}

.logo {
    font-size: 24px;
    font-weight: 600;
    color: var(--color-acento);
}

nav {
    display: flex;
    align-items: center;
}

nav a {
    text-decoration: none;
    color: var(--color-texto);
    margin-left: 20px;
    font-weight: 400;
    transition: var(--transicion);
}

nav a:hover {
    color: var(--color-acento);
}

/* =========================================
   SECCIONES Y COMPONENTES
========================================= */
.hero {
    position: relative;
    text-align: center;
    padding: 120px 20px; 
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    overflow: hidden; 
}

.video-fondo {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translateX(-50%) translateY(-50%);
    z-index: 0;
    object-fit: cover; 
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); 
    z-index: 1;
}

.hero-contenido {
    position: relative;
    z-index: 2; 
    max-width: 800px;
    color: white; 
}

.hero-contenido h1 {
    font-size: 3.5rem;
    color: #ffffff; 
    margin-bottom: 15px;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5); 
}

.hero-contenido p {
    font-size: 1.2rem;
    font-weight: 300;
    margin-bottom: 30px;
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.5);
}

.btn {
    background-color: var(--color-acento);
    color: white;
    padding: 12px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(255, 64, 129, 0.3);
    transition: var(--transicion);
    display: inline-block;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 64, 129, 0.4);
}

/* =========================================
   ESTILOS DE FORMULARIO
========================================= */
.contenedor-formulario {
    max-width: 800px;
    margin: 40px auto;
    background: var(--color-tarjeta);
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--sombra-suave);
    border-top: 5px solid var(--color-primario);
}

.contenedor-formulario h2 {
    color: var(--color-acento);
    margin-bottom: 30px;
    text-align: center;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 0.9rem;
}

input[type="text"],
input[type="file"] {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 10px;
    background-color: #fafafa;
    transition: var(--transicion);
}

input[type="text"]:focus {
    border-color: var(--color-acento);
    outline: none;
    box-shadow: 0 0 8px rgba(255, 64, 129, 0.2);
    background-color: #fff;
}

.fila-inputs {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
}

.fila-inputs > div, .fila-inputs > input {
    flex: 1;
}

.btn-primario-form {
    background-color: var(--color-acento);
    color: white;
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 30px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transicion);
    font-weight: 600;
    margin-top: 10px;
}

.btn-primario-form:hover {
    background-color: #e91e63;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 64, 129, 0.4);
}

.btn-secundario {
    background-color: #fce4ec;
    color: var(--color-acento);
    border: 1px dashed var(--color-acento);
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.btn-secundario:hover {
    background-color: #f8bbd0;
}

.alerta {
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 600;
}

.alerta.exito {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.alerta.error {
    background-color: #ffebee;
    color: #c62828;
}

/* =========================================
   SECCIÓN DE EQUIPOS Y VOTACIÓN
========================================= */
.seccion-votacion {
    padding: 60px 20px;
    background-color: var(--color-fondo);
}

.contenedor-titulos {
    text-align: center;
    margin-bottom: 40px;
}

.contenedor-titulos h2 {
    color: var(--color-acento);
    font-size: 2.2rem;
}

.grid-equipos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1100px;
    margin: 0 auto;
}

.tarjeta-equipo {
    background-color: var(--color-tarjeta);
    border-radius: 20px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: var(--sombra-suave);
    transition: var(--transicion);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tarjeta-equipo:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(244, 143, 177, 0.25);
}

.contenedor-logo {
    width: 120px;
    height: 120px;
    border-radius: 50%; 
    overflow: hidden;
    margin-bottom: 15px;
    border: 3px solid var(--color-primario);
    padding: 5px;
    background-color: white;
}

.contenedor-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    border-radius: 50%;
}

.tarjeta-equipo h3 {
    color: var(--color-texto);
    font-size: 1.4rem;
    margin-bottom: 5px;
}

.manager {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 15px;
}

.votos-contador {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--color-acento);
    background-color: #ffeaf1;
    padding: 5px 15px;
    border-radius: 20px;
    margin-bottom: 20px;
}

.btn-votar {
    background-color: white;
    color: var(--color-acento);
    border: 2px solid var(--color-acento);
    padding: 8px 25px;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transicion);
    width: 100%;
}

.btn-votar:hover {
    background-color: var(--color-acento);
    color: white;
}

/* =========================================
   VENTANAS MODALES PREMIUM (ANIMADAS)
========================================= */
.modal-overlay {
    display: none; 
    position: fixed;
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background: rgba(10, 10, 15, 0.6); 
    backdrop-filter: blur(8px); 
    z-index: 1000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.modal-overlay.activo {
    display: flex;
    opacity: 1;
}

.modal-contenido {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 25px;
    width: 90%;
    max-width: 550px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
    transform: scale(0.8) translateY(30px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
    border-top: 6px solid var(--color-acento);
}

.modal-overlay.activo .modal-contenido {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.btn-cerrar {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 2rem;
    background: none;
    border: none;
    color: #ccc;
    cursor: pointer;
    transition: var(--transicion);
    line-height: 1;
}

.btn-cerrar:hover {
    color: #ff5252;
    transform: rotate(90deg); 
}

.lista-jugadoras-modal {
    list-style: none;
    margin-top: 25px;
    text-align: left;
    padding: 0 10px;
}

.lista-jugadoras-modal li {
    padding: 15px 20px;
    margin-bottom: 12px;
    background: #fff;
    border-radius: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
    border: 1px solid #f0f0f0;
    transition: all 0.3s ease;
}

.lista-jugadoras-modal li:hover {
    transform: translateX(5px);
    box-shadow: 0 8px 20px rgba(244, 143, 177, 0.15);
    border-color: #ffeaf1;
}

.jugadora-dpto {
    color: #888;
    font-size: 0.85rem;
    background: #f5f5f5;
    padding: 3px 10px;
    border-radius: 10px;
    display: inline-block;
    margin-top: 5px;
}

.btn-votar-modal {
    background: linear-gradient(135deg, var(--color-primario), var(--color-acento));
    color: white;
    border: none;
    border-radius: 20px;
    padding: 8px 18px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 64, 129, 0.3);
    transition: all 0.3s ease;
}

.btn-votar-modal:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 64, 129, 0.5);
}

/* =========================================
   PANEL DE ADMINISTRACIÓN Y TABLAS
========================================= */
.cabecera-admin {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.tabla-contenedor {
    background: var(--color-tarjeta);
    border-radius: 20px;
    box-shadow: var(--sombra-suave);
    overflow-x: auto;
    border-top: 5px solid var(--color-primario);
}

.tabla-admin {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.tabla-admin th, .tabla-admin td {
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.tabla-admin th {
    background-color: #ffeaf1;
    color: var(--color-acento);
    font-weight: 600;
}

.tabla-admin tr:hover {
    background-color: #fcf9fa;
}

.logo-miniatura {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--color-primario);
}

.acciones {
    display: flex;
    gap: 10px;
}

.btn-peligro {
    background-color: #ff5252;
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transicion);
    border: none;
}

.btn-editar {
    background-color: #e0f7fa;
    color: #0097a7;
    padding: 8px 15px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transicion);
}

/* =========================================
   SECCIÓN TOP 3 MVP
========================================= */
.seccion-mvp {
    padding: 60px 20px;
    background: linear-gradient(to bottom, #ffffff, var(--color-fondo));
    text-align: center;
}

.grid-mvp {
    display: flex;
    justify-content: center;
    gap: 30px;
    max-width: 1000px;
    margin: 30px auto 0 auto;
    flex-wrap: wrap;
}

.tarjeta-mvp {
    background: white;
    border-radius: 20px;
    padding: 30px 20px;
    width: 280px;
    box-shadow: 0 10px 25px rgba(255, 64, 129, 0.1);
    position: relative;
    border-top: 4px solid #ffd700; 
    transition: var(--transicion);
}

.corona {
    font-size: 2.5rem;
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    text-shadow: 0 4px 10px rgba(255, 215, 0, 0.5);
}

.mvp-votos {
    display: inline-block;
    margin-top: 15px;
    background: #fff4e5;
    color: #ff9800;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 1.1rem;
}

/* =========================================
   NOTIFICACIONES MODERNAS (TOASTS)
========================================= */
#toast-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.toast-moderno {
    background: white;
    color: var(--color-texto);
    padding: 16px 24px;
    border-radius: 15px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55); 
}

.toast-moderno.mostrar {
    transform: translateX(0);
    opacity: 1;
}

.toast-exito { border-left: 5px solid #4caf50; }
.toast-aviso { border-left: 5px solid #ff9800; }
.toast-error { border-left: 5px solid #f44336; }


/* =========================================
   📱 RESPONSIVE (DISEÑO PARA CELULARES)
========================================= */
@media (max-width: 768px) {
    /* Menú (Header) apilado y centrado */
    header {
        flex-direction: column;
        padding: 15px 20px;
        gap: 15px;
    }

    nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    nav a {
        margin-left: 0;
        background-color: #fff0f5; /* Fondo tipo botón para móviles */
        padding: 8px 15px;
        border-radius: 20px;
        font-size: 0.9rem;
    }

    /* Ajuste del Hero y texto principal */
    .hero {
        padding: 80px 20px;
        min-height: 50vh;
    }

    .hero-contenido h1 {
        font-size: 2.2rem; /* Título más pequeño */
    }

    .hero-contenido p {
        font-size: 1rem;
    }

    /* Formularios apilados */
    .fila-inputs {
        flex-direction: column;
        gap: 0; /* Ya tienen margin-bottom los inputs */
    }
    
    .contenedor-formulario {
        padding: 25px 20px;
    }

    /* Panel de Admin ajustado */
    .cabecera-admin {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    /* Ventanas Modales */
    .modal-contenido {
        padding: 25px 15px;
        width: 95%;
    }
    
    .btn-cerrar {
        top: 10px;
        right: 15px;
    }

    /* Toasts centrados abajo */
    #toast-container {
        bottom: 20px;
        left: 20px;
        right: 20px;
        align-items: center;
    }

    .toast-moderno {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
}