/* ================================
   BASE Y RESET
================================ */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #ffffff;
    box-sizing: border-box;
    height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;

}

/* ================================
   HEADER Y NAVBAR
================================ */
header {
    width: 100%;
    background: #000000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* Estilos para el navbar de Bootstrap */
.navbar {
    width: 100%;
    padding: 0;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff !important;
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: #ffffff !important;
}

.navbar-nav .nav-link.active {
    color: #ffffff !important;
    font-weight: 600;
}

/* Dropdown del menú de administración */
.dropdown-menu {
    border: none;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 0.5rem 0;
}

.dropdown-item {
    padding: 0.75rem 1.5rem;
    color: #333;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    color: #000;
    transform: translateX(5px);
}

.dropdown-item i {
    margin-right: 0.5rem;
    width: 16px;
}

/* Información del usuario en el navbar */
.navbar-text {
    color: rgba(255, 255, 255, 0.9) !important;
}

.navbar-text .badge {
    font-size: 0.75rem;
}

/* Botones del navbar */
.navbar .btn-outline-light {
    border-width: 2px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.navbar .btn-outline-light:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

/* Responsive del navbar */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background-color: rgba(0, 0, 0, 0.95);
        padding: 1rem;
        border-radius: 8px;
        margin-top: 1rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .navbar-nav .nav-link:last-child {
        border-bottom: none;
    }
}

.logo {
    width: 70px;
    height: auto;
    transition: transform 0.3s ease;
}

.menu a {
    color: white;
    text-decoration: none;
    text-transform: uppercase;
    padding: 0 15px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.menu a:hover { color: #ffd700; }

/* ================================
   DROPDOWN MENU
================================ */
.dropdown {
    display: inline-block;
    position: relative;
}

.dropdown-button {
    background: white;
    border: none;
    color: #000000;
    cursor: pointer;
    padding: 8px;
    border-radius: 2px;
    transition: background-color 0.3s ease;
}

.dropdown-button:hover { background-color: #f0f0f0; }

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: white;
    border: 1px solid #ddd;
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    list-style: none;
    margin: 0;
    padding: 0;
    width: 200px;
    border-radius: 4px;
    overflow: hidden;
}

.dropdown-menu li a {
    text-decoration: none;
    color: #333;
    display: block;
    padding: 12px 15px;
    transition: background-color 0.3s ease;
}

.dropdown-menu li a:hover {
    background-color: #f8f9fa;
    color: #000000;
}

.dropdown:hover .dropdown-menu { display: block; }

/* ================================
   CONTENEDOR PRINCIPAL
================================ */

.score-container {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
  /*  padding: 0 !important;
    background: transparent !important;
    height: calc(100vh - var(--header-h)) !important;*/
    
}
/* Los dos equipos lado a lado */
.teams-container {
    flex: 1 1 auto;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    justify-content: stretch;
    min-height: 0;
}

/* Cada equipo ocupa la mitad exacta y centra su contenido */
.teams-container .team {
    flex: 1 1 50%;
    min-width: 0;
    display: flex;
    align-items: center;      /* Centrado vertical */
    justify-content: center;  /* Centrado horizontal */
    padding: clamp(12px, 2vw, 24px);
}

/* Contenido interno centrado */
.team-info {
    text-align: center;
    max-width: 400px;
}

/* ================================
   EQUIPOS
================================ */
.captain-photo {
    margin-bottom: 15px;
}

.captain-photo img {
    width: 100%;              /* ocupa todo el ancho del contenedor */
    height: calc(100% * 9 / 16);        /* mantiene la relación 16:9 */
    aspect-ratio: 16 / 9;               /* fuerza la proporción */
    border-radius: 8px;                 /* opcional: esquinas suaves */
    object-fit: cover;                  /* recorta bien la imagen */
}


.captain-name {
    font-size: clamp(1rem, 3.5vw, 1.5rem);
    font-weight: 400;
    margin: 10px 0 8px 0;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    color: #ffffff;
    letter-spacing: 0.5px;
}

.team-name {
    font-size: clamp(1.2rem, 4vw, 2rem);
    font-weight: 500;
    margin: 8px 0 20px 0;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    letter-spacing: 1px;
}

.score-display { padding: 10px; }

.score {
    font-size: clamp(2rem, 9vw, 4rem);
    font-weight: 600;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.4);
}

/* Colores de fondo */
#team-red { background: linear-gradient(135deg, #dc3545 0%, #c82333 100%); }
#team-green { background: linear-gradient(135deg, #28a745 0%, #20c997 100%); }

/* Equipo ganador */
.team.winner .score {
    color: #ffd700;
    text-shadow: 0 0 20px rgba(255,215,0,0.8);
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.team.winner .captain-photo img {
    animation: pulse 2s infinite;
}

/* ================================
   TABLAS
================================ */
.cont_lista {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

table {
    border-collapse: collapse;
    width: 90%;
    max-width: 800px;
    background: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    overflow: hidden;
}

th, td {
    padding: 12px;
    text-align: center;
    border-bottom: 1px solid #ddd;
}

th {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    font-weight: 600;
}

td { color: #333; }
tr:hover { background-color: #f8f9fa; }
tr:last-child td { border-bottom: none; }

/* ================================
   RESPONSIVE
================================ */
@media (max-width: 768px) {
    .teams-container {
        flex-direction: column;
    }

    /* 1. Reducimos el espacio interno de cada tarjeta de equipo */
    .teams-container .team {
        padding: 10px; /* Menos padding vertical */
        /* Nos aseguramos de que el contenido no se desborde */
        overflow: hidden; 
    }

    /* 2. Hacemos la foto significativamente más pequeña */
    .captain-photo {
        width: 240px;        /* <-- MÁS PEQUEÑO (antes 180px) */
        height: auto;       /* <-- MÁS PEQUEÑO (antes 180px) */
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 10px; /* <-- Menos espacio debajo */
    }

    .captain-photo img {
        width: 100%;
        height: 100%;
    }

    /* 3. Compactamos los textos y sus márgenes */
    .captain-name {
        font-size: 0.9rem; /* Un poco más pequeño */
        margin: 4px 0;     /* Menos espacio vertical */
    }

    .team-name {
        font-size: 1.3rem;
        margin: 4px 0 10px 0; /* Menos margen inferior */
    }

    /* 4. Reducimos drásticamente el tamaño del número del puntaje */
    .score {
        font-size: 2.5rem; /* <-- MUCHO MÁS PEQUEÑO */
    }
}



/* Poné esto en tu CSS */
.competencia-banner {
    background: linear-gradient(90deg, #111 0%, #222 100%);
    color: #fff;
    text-align: center;
    padding: .5em 1em;
    letter-spacing: .3px;
  }
  .competencia-banner .titulo { opacity: .85; margin-right: .5rem; }
  