#app {
    display: block;
    font-family: sans-serif;
}

.menu {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    padding: 0px 10px;
    margin-bottom: 10px;
}

.menu h1 {
    margin-top: 0;
    margin-bottom: 0;
    padding: 5px 25px;
    font-size: x-large;
    background-color: #d3d4cf;
    border-radius: 5px;
}

.menu a {
    text-decoration: none;
    color: #333;
    margin-left: 20px;
}

.menu a.router-link-active {
    /* Clase que se añade automáticamente al enlace activo */
    font-weight: bold;
    color: #007bff;
}

.content {
    flex-grow: 1;
    padding: 10px;
}

.player-stats-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 0.9em;
}

.player-stats-table th,
.player-stats-table td {
    border: none;
    padding: 10px 15px;
    text-align: center;
}

.player-stats-table tbody tr:nth-child(even) {
    background-color: #f0ebeb;
}

.player-stats-table tbody tr:nth-child(odd) {
    background-color: #ffffff;
}

.player-stats-table tbody tr {
    border-bottom: 1px solid #dee2e6;
}

.player-stats-table thead th {
    color: black;
    font-weight: bold;
    font-size: 1em;
    border-bottom: 2px solid #23272b;
    border-top: 2px solid #23272b;
}

.player-stats-table tbody tr td:nth-child(2),
.player-stats-table tbody tr td:nth-child(3) {
    font-weight: 900;
}

.player-stats-table th:first-child,
.player-stats-table td:first-child {
    text-align: left;
    font-weight: 400;
    max-width: 300px;
    width: 300px;
    word-wrap: break-word;
    word-break: break-all;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-stats-table tfoot tr {
    background-color: #dfd9d9;
    font-weight: bold;
    border-top: 3px double #343a40;
}

.stats-container {
    display: flex;
    gap: 20px;
    width: 100%;
    flex-wrap: wrap;
}

.team-stats {
    flex: 1 1 48%;
    min-width: 300px;
}

.team-stats {
    text-align: center;
    margin-bottom: 15px;
    padding-bottom: 5px;
}

.team-name {
    font-weight: bold;
    font-size: 1.5rem;
    width: 100%;
}

.team-score {
    font-weight: bold;
    font-size: 3rem;
}

.home-team .team-name {
    color: #007bff;
}

.home-team .team-score {
    color: #007bff;
    margin-right: 5px;
}

.visitor-team .team-name {
    color: #dc3545;
}

.visitor-team .team-score {
    color: #dc3545;
    margin-left: 5px;
}

.score-display {
    display: flex;
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
    margin-top: 10px;
}

.score-display:not(.is-local) {
    flex-direction: row-reverse;
}

.team-summary {
    display: flex;
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
}

.team-summary:not(.is-local) {
    flex-direction: row-reverse;
}

.team-periods-container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;

    margin-top: 10px;
    margin-bottom: 10px;
}

.team-periods-item {
    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;
    padding: 6px 15px;
    margin: 5px;
    border: 1px solid;
    border-radius: 4px;

    /* Configuración para que el item no crezca ni encoja, manteniendo su contenido */
    flex-shrink: 0;
    flex-grow: 0;
}

.team-period-label-title {
    text-align: center;
    font-size: 0.8rem;
    margin-bottom: 3px;
}

.team-period-label-value {
    text-align: center;
    font-size: 1.1rem;
}

.team-total-container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;

    background-color: #f4f4f4;
    border-radius: 8px;
    border: 2px solid;
}

.team-total-item {
    display: flex;
    flex-direction: row;

    align-items: center;
    justify-content: center;
    margin: 10px;
}

.radio-container {
    /* padding: 15px; */
    margin-bottom: 10px;
}

.radio-label {
    font-weight: bold;
    color: #333;
    font-size: 1.1rem;
    margin-right: 20px;
}

.search-container {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    border-bottom: 1px solid;
}

.search-label {
    font-weight: bold;
    color: #333;
    flex-shrink: 0;
    /* Evita que la etiqueta se encoja */
}

.search-input {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    width: 575px;
    min-width: 150px;
}

.search-button {
    padding: 8px 15px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s;
    flex-shrink: 0;
    /* Evita que el botón se encoja */
    margin-left: 10px;
}

.search-button:hover {
    background-color: #0056b3;
}


.selector-grid {
    display: grid;
    /* Define 3 columnas de igual ancho (1fr) */
    grid-template-columns: repeat(3, 1fr);
    gap: 10px 15px;
    /* (Fila) (Columna) */
    padding: 15px;
    border-bottom: 1px solid;
}

.selector-item-wrapper {
    display: flex;
    flex-direction: row;
    align-items: center;
    /* Espacio entre la etiqueta y el selector */
    gap: 10px;
}

.selector-label {
    font-weight: bold;
    color: #333;
    font-size: 0.9rem;
    width: 85px;
    /* Evita que el texto de la etiqueta se envuelva */
    flex-shrink: 0;
}

select {
    width: 100%;
    padding: 5px 15px 5px 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #ffffff;
    font-size: 0.9rem;
    /* Altura uniforme para todos */
    height: 35px;
    /* Estilos para quitar apariencia nativa y añadir el icono de flecha */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 14px;
}

select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2);
}

.selector-title {
    /* * Indica que este elemento debe empezar en la columna 1 
     * y abarcar hasta la línea 4 (el final de la tercera columna).
     * Esto hace que ocupe todo el ancho. 
     */
    grid-column: 1 / 4;

    font-size: 1.2rem;
    margin-bottom: 5px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ddd;
}

.game-container {
    margin-top: 20px;
}

.game-stats-link {
    font-size: 0.8rem;
    font-weight: bold;
}

.game-stats-link a {
    color: black;
}

@media (max-width: 768px) {
    .selector-grid {
        grid-template-columns: 1fr;
    }

    .team-summary,
    .team-summary:not(.is-local) {
        align-items: center;
        flex-direction: column-reverse;
    }

    .score-display,
    .score-display:not(.is-local) {
        flex-direction: column;
    }

    .team-periods-item {
        padding: 6px;
    }

    .player-stats-table th:first-child,
    .player-stats-table td:first-child {
        max-width: 165px;
    }

    .player-stats-table th,
    .player-stats-table td {
        padding: 10px 7px;
    }

    .player-stats-table {
        font-size: 0.8em;
    }

    .search-container {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px 5px;
    }

    .search-subcontainer {
        display: flex;
    }

    .search-input {
        width: 270px;
    }
}

@media (max-width: 1212px) {
    .team-stats {
        flex: 1 1 100%;
    }

    .score-display,
    .score-display:not(.is-local) {
        flex-direction: column;
    }

    .team-summary,
    .team-summary:not(.is-local) {
        flex-direction: column-reverse;
    }
}