:root {
    --primary: #ff4430;
    --primaryglass: #ff483405;
    --secondary: #1E3E62;
    --background: #0B192C;
    --surface: #1e293b;
    --text: #f8fafc;
    --border: rgba(248, 250, 252, 0.1);
    --glow: 0 0 7px #0B192C;
    --button-min-size: 44px; /* Tamaño mínimo para botones táctiles */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-md: 1rem;
    --font-size-lg: 1.25rem;
    --font-size-xl: 1.5rem;
    --font-size-2xl: 2rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    touch-action: manipulation; /* Mejora interacciones táctiles */
}

body {
    font-family: system-ui, -apple-system, sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    margin: 0;
    -webkit-tap-highlight-color: transparent; /* Elimina resaltado táctil */
    overscroll-behavior: none; /* Previene scroll rebotes */
}

.container {
    padding: 1rem;
    max-width: 1200px;
    margin: 0 auto;
    overflow-x: hidden;
}

.player-info {
    margin-bottom: 2rem;
    background: var(--surface);
    padding: 1.5rem;
    border-radius: 1rem;
    color: var(--text);
    border: 1px solid var(--border);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(16px);
}

.player-header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.player-header h3 {
    font-size: 2rem;
    margin: 0;
    font-weight: 700;
}

.player-number {
    background: var(--primary);
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 800;
    font-size: 1.75rem;
    color: white;
    transform: rotate(-3deg);
    transition: transform 0.3s ease;
}

.player-number:hover {
    transform: rotate(0deg) scale(1.05);
}

.players-section {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid var(--border);
    margin-bottom: 1.5rem;
}

.players-table-container {
    overflow-x: auto;
    margin-top: 1rem;
}

.players-table {
    width: 100%;
    min-width: 600px;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--background);
    border-radius: 0.5rem;
    overflow: hidden;
}

.players-table thead th {
    background: var(--primary);
    color: white;
    padding: 0.75rem 1rem;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    text-align: center;
}

.players-table thead th:nth-child(1) {
    width: 60px;
}

.players-table thead th:nth-child(2) {
    text-align: left;
    width: auto;
}

.players-table tbody td {
    padding: 0.75rem 1rem;
    text-align: center;
    border-top: 1px solid var(--border);
    color: var(--text);
}

.players-table tbody td.player-name {
    text-align: left;
    font-weight: 500;
}

.players-table tbody tr:hover {
    background: var(--surface);
}

.player-stats-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem;
}

.player-stats-link:hover {
    color: var(--text);
    transform: scale(1.2);
}

.player-stats-link:active {
    transform: scale(0.95);
}

.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--surface);
    border-radius: 1rem;
    padding: 1.25rem;
    border: 1px solid var(--border);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(16px);
    text-align: center;
    transition: all 0.3s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border-color: color-mix(in srgb, var(--primary) 30%, transparent);
}

/* Efecto de toque para dispositivos móviles */
.stat-card:active {
    transform: scale(0.98);
    box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.1);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-section {
    background: var(--surface);
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid var(--border);
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    color: var(--text);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.filter-input, .season-select {
    background: var(--background);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.75rem;
    border-radius: 0.5rem;
    width: 100%;
    font-size: 0.875rem;
    font-family: 'Inter', system-ui, sans-serif;
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none' stroke='%23cbd5e1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='4 6 8 10 12 6'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.5rem;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    min-height: var(--button-min-size);
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: all 0.2s ease;
}

.filter-input:focus, .season-select:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 1px var(--primary);
}

.filter-input:active, .season-select:active {
    background-color: var(--surface);
}

.filter-input option, .season-select option {
    background: var(--background);
    color: var(--text);
    padding: 0.5rem;
}

.player-selector-container,
.season-selector-container {
    margin: 0;
    flex: 1 1 100%;
    align-items: left;
    gap: 0.8rem;
}

.player-selector-container label,
.season-selector-container label {
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
}

.section-header {
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: left;
    background: var(--surface);
    padding: 1rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);;
}

.filter-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: var(--spacing-md);
}

/* Estilos específicos para filtros móviles */
@media (max-width: 480px) {
    .filter-input, .season-select {
        font-size: 16px; /* Evita zoom en móviles */
    }
}

.btn-primary {
    border-radius: 0.75rem;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.2s;
    background: var(--primary);
    color: white;
    border: none;
    min-height: var(--button-min-size);
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    user-select: none;
    cursor: pointer;
}

.btn-primary:hover {
    background: color-mix(in srgb, var(--primary) 80%, white);
}

/* Efecto de clic para dispositivos táctiles */
.btn-primary:active {
    transform: scale(0.97);
}

.btn-secondary {
    border-radius: 0.75rem;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.2s;
    border: 1px solid var(--primary);
    color: var(--primary);
    background: transparent;
    min-height: var(--button-min-size);
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    user-select: none;
    cursor: pointer;
}

.btn-secondary:hover {
    color: #0E1525;
    background: var(--primary);
}

.btn-secondary:active {
    transform: scale(0.97);
}

.hidden {
    display: none !important;
}

.loading-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    min-height: 300px;
}

.error-section {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    margin: 2rem 0;
}

.error-section p {
    color: #fca5a5;
    margin-bottom: 1.5rem;
}

.games-table-container {
    overflow-x: auto;
    padding-bottom: 1rem;
    background: var(--background);
    border-radius: 0.75rem;
    border: 1px solid var(--border);
}

.games-table {
    margin: 0;
    background: var(--background);
    font-size: 0.875rem;
    width: 100%;
    min-width: 1200px;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 0.75rem;
    overflow: hidden;
}

.games-table th {
    color: var(--text);
    font-weight: 500;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem;
    text-align: left;
    white-space: nowrap;
    font-size: 0.75rem;
}

.games-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    white-space: nowrap;
}

.games-table td.higher-score {
    color: var(--primary);
    font-weight: bold;
}

.games-table th:nth-child(1),
.games-table td:nth-child(1) {
    width: 15%;
}

.games-table th:nth-child(2),
.games-table td:nth-child(2) {
    width: 20%;
}

.games-table th:nth-child(n+3):not(:last-child),
.games-table td:nth-child(n+3):not(:last-child) {
    width: 5.5%;
    text-align: center;
}

.games-table th:last-child,
.games-table td:last-child {
    width: 6%;
    text-align: center;
}

.games-table tr:hover td {
    background: var(--surface);
}

.view-details {
    background: var(--primary);
    color: white;
    border: none;
    width: var(--button-min-size);
    height: var(--button-min-size);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.view-details:hover {
    background: color-mix(in srgb, var(--primary) 80%, white);
}

.view-details:active {
    transform: scale(0.95);
}

.view-details i {
    font-size: 1rem;
}

.loader {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(99, 102, 241, 0.1);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive design */
.game-details {
    background: var(--surface);
    border-radius: 0.75rem;
    padding: 1.25rem;
    border: 1px solid var(--border);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.game-details-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.game-details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
}

.game-details-info h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.game-details-meta {
    display: flex;
    gap: 1.5rem;
}

.game-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text);
}

.game-score {
    text-align: center;
    background: var(--primary);
    padding: 1.5rem;
    border-radius: 1rem;
    min-width: 120px;
}

.game-score-value {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.game-score-label {
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    opacity: 0.8;
}

.game-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.8rem;
    margin-top: 1.5rem;
}

.game-stat-card {
    background: var(--surface);
    border-radius: 0.75rem;
    padding: 1rem;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.game-stat-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
}

.game-stat-card:active {
    transform: scale(0.97);
}

.game-stat-card h3 {
    font-size: 0.9rem;
    color: var(--text);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.game-stat-card .game-stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.game-stat-card .game-stat-label {
    font-size: 0.9rem;
    color: var(--text);
}

/* Estilos para la sección de resultados de partido */
.match-score-container {
    margin: 2rem 0;
    background: var(--surface);
    border-radius: 0.75rem;
    padding: 1.5rem;
    border: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 1.5rem;
    text-align: center;
}

.match-score-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--surface);
    border-radius: 0.75rem;
    border: 1px solid var(--border);
}

.team-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    max-width: 40%;
    text-align: center;
}

.local-team {
    padding-right: 1rem;
    text-align: right;
}

.visit-team {
    padding-left: 1rem;
    text-align: left;
}

.final-score {
    font-size: 2rem;
    font-weight: 800;
    color: white;
    background: var(--primary);
    padding: 0.5rem 1.5rem;
    border-radius: 1rem;
    box-shadow: 0 4px 15px rgba(255, 68, 48, 0.3);
}

.period-scores-container {
    overflow-x: auto;
    background: var(--surface);
    border-radius: 0.75rem;
    padding: 1rem;
    border: 1px solid var(--border);
}

.period-scores-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 0 auto;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    overflow: hidden;
}

.period-scores-table th, 
.period-scores-table td {
    padding: 0.8rem;
    text-align: center;
    min-width: 60px;
}

.period-scores-table th {
    background: var(--primary);
    color: white;
    padding: 0.75rem 1rem;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    text-align: center;
}

.period-scores-table th:first-child {
    border-top-left-radius: 0.5rem;
}

.period-scores-table th:last-child {
    border-top-right-radius: 0.5rem;
}

.period-scores-table td {
    background: var(--bg-dark);
    border-top: 1px solid var(--border);
    color: var(--text);
}

.period-scores-table tr:hover td {
    background: var(--surface);
}

.period-scores-table .total-row td {
    background: rgba(255, 101, 0, 0.03);
    font-weight: 700;
    font-size: 1.1rem;
    border-top: 1px solid var(--primary);
}

.period-scores-table .total-row td:first-child {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
}

/* Estilos para la tabla de estadísticas */
.stats-table-container {
    margin: 1rem 0;
    border-radius: 1rem;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.stats-table tr {
    border-bottom: 1px solid var(--border);
    transition: background-color 0.2s ease;
}

.stats-table tr:last-child {
    border-bottom: none;
}

.stats-table tr:hover {
    background-color: rgba(255, 101, 0, 0.05);
}

.stats-table td {
    padding: 0.9rem 1.25rem;
}

.stats-table td.stat-label {
    font-weight: 500;
    color: var(--text);
    width: 60%;
}

.stats-table td.stat-value {
    font-weight: 700;
    color: var(--primary);
    text-align: right;
    font-size: 1.05rem;
}

/* Estilos para marcar ganador de periodo */
.period-winner {
    font-weight: 700;
    color: var(--primary);
    position: relative;
    background-color: rgba(255, 101, 0, 0.05);
}

.period-winner::after {
    content: "●";
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    font-size: 8px;
    color: var(--primary);
}

/* Estilos para marcar ganador del partido */
.game-winner {
    font-weight: 800;
    color: var(--primary);
    background-color: rgba(255, 101, 0, 0.15) !important;
}

.winner-team {
    font-weight: 700;
    color: var(--primary);
}

.details-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 0;
    gap: 1.5rem;
}

.details-loading p {
    color: var(--text);
    font-size: 1.1rem;
}

/* Botón flotante para ir a home */
.floating-home-btn {
    position: fixed;  /* Mantiene el botón en una posición fija */
    bottom: 2rem;     /* Distancia desde la parte inferior */
    right: 2rem;      /* Distancia desde la derecha */
    width: 60px;      /* Ancho del botón */
    height: 60px;     /* Altura del botón */
    background: var(--primaryglass); /* Color de fondo */
    border: 1px solid var(--border);
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(16px) saturate(120%);
    color: white;     /* Color del icono */
    border-radius: 50%; /* Hace el botón redondo */
    display: flex;    /* Para centrar el icono en el botón */
    align-items: center; /* Centra contenido verticalmente */
    justify-content: center; /* Centra contenido horizontalmente */
    font-size: 1.5rem; /* Tamaño del icono */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), 0 0 0 0 rgba(255, 101, 0, 0.4);
    transition: all 0.3s ease; /* Transición suave para hover */
    z-index: 1000; /* Asegura que esté en la parte superior */
    text-decoration: none; /* Sin subrayado */
    -webkit-tap-highlight-color: transparent; /* Sin resaltado en móviles */
    cursor: pointer; /* Cambia el cursor al pasar sobre el botón */
}

.floating-home-btn:hover {
    background: color-mix(in srgb, var(--primary) 80%, white);
    transform: scale(1.15); /* Aumenta ligeramente el tamaño al hover */
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), 0 0 0 8px rgba(255, 101, 0, 0.2);
}

.floating-home-btn:active {
    transform: scale(0.95); /* Reduce el tamaño al hacer clic */
}

/* Mejoras responsive */
@media (max-width: 768px) {
    body {
        padding: 5px;
    }

    .container {
        padding: 5px;
    }

    /* Tarjetas de estadísticas */
    .stats-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .stat-card {
        padding: 0.8rem;
    }

    .stat-value {
        font-size: 1.4rem;
    }

    /* Cabecera e info del jugador */
    .player-header {
        flex-direction: column;
        text-align: center;
    }

    .player-header h3 {
        font-size: 1.8rem;
    }

    .player-number {
        font-size: 1.5rem;
        padding: 0.8rem 1.5rem;
    }

    /* Selección de jugador/temporada */
    .section-header {
        flex-direction: column;
        gap: 1rem;
        padding: 0.8rem;
    }

    /* Filtros */
    .filter-section {
        padding: 1rem;
    }

    .filter-row {
        grid-template-columns: 1fr;
        gap: 0.7rem;
        margin-bottom: 0.7rem;
    }

    .filter-buttons {
        flex-direction: column;
        width: 100%;
        margin-top: 0.7rem;
    }

    .btn-primary, .btn-secondary {
        width: 100%;
        padding: 0.8rem;
    }

    /* Tabla de partidos */
    .games-table {
        font-size: 0.85rem;
    }

    .games-table th, 
    .games-table td {
        padding: 0.5rem 0.3rem;
        font-size: 0.75rem;
    }

    .games-table tr:hover td {
        transform: none; /* Deshabilita escalado en hover para móviles */
    }

    .view-details {
        width: 38px;
        height: 38px;
        margin: 0 auto; /* Centra el botón */
    }

    .view-details i {
        font-size: 1rem;
    }

    /* Detalles del partido */
    .game-details {
        padding: 0.75rem;
        margin-top: 1rem;
    }

    .game-details-title {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        margin-bottom: 1.5rem;
    }

    .game-details-title .btn-secondary {
        margin-top: 0.5rem;
    }

    .game-details-meta {
        flex-direction: column;
        gap: 1rem;
    }

    /* Tablas de estadísticas en móvil */
    .stats-table-container {
        margin: 0.8rem 0;
        border-radius: 0.8rem;
    }

    .stats-table {
        font-size: 0.85rem;
    }

    .stats-table td {
        padding: 0.75rem 1rem;
    }

    .stats-table td.stat-value {
        font-size: 0.95rem;
    }

    .game-stats-grid {
        grid-template-columns: 1fr 1fr; /* 2 columnas en móvil */
        gap: 0.6rem;
    }

    .game-stat-card {
        padding: 0.8rem;
    }

    .game-stat-card .game-stat-value {
        font-size: 1.4rem;
    }

    /* Marcador del partido */
    .match-score-container {
        padding: 1rem;
        margin: 1.5rem 0;
    }

    .match-score-header {
        flex-direction: column;
        gap: 1rem;
        padding: 0.8rem;
    }

    .team-name {
        max-width: 100%;
        text-align: center;
        font-size: 1rem;
    }

    .local-team, .visit-team {
        padding: 0;
        text-align: center;
    }

    .final-score {
        font-size: 1.5rem;
        padding: 0.5rem 1rem;
    }

    /* Tabla de resultados por periodos */
    .period-scores-container {
        padding: 0.8rem;
    }

    .period-scores-table {
        font-size: 0.85rem;
    }

    .period-scores-table th, 
    .period-scores-table td {
        padding: 0.6rem 0.8rem;
    }

    /* Inputs y selects */
    .filter-input, .season-select {
        padding: 0.8rem;
        font-size: 0.9rem;
    }

    .floating-home-btn {
        bottom: 1.5rem; /* Distancia ajustada para móviles */
        right: 1.5rem; /* Distancia ajustada para móviles */
        width: 56px; /* Tamaño ajustado para móviles */
        height: 56px; /* Tamaño ajustado para móviles */
        font-size: 1.4rem; /* Tamaño de icono ajustado para móviles */
    }
}

/* Optimizaciones específicas para pantallas muy pequeñas */
@media (max-width: 380px) {
    .stats-cards {
        grid-template-columns: 1fr; /* Una columna en pantallas muy pequeñas */
    }

    .game-stats-grid {
        grid-template-columns: 1fr; /* Una columna en pantallas muy pequeñas */
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-value {
        font-size: 1.6rem; /* Aumentar tamaño al tener más espacio */
    }

    .player-selector-container,
    .season-selector-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.4rem;
    }
}