/* Estilos generales del sistema BScore */

#bscore_sistema {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    max-width: 1200px;
    margin: 20px auto;
    font-family: 'Segoe UI', Arial, sans-serif;
}

/* Navegación */
.bscore-nav {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    border-radius: 10px;
    padding: 0;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    display: flex;
    flex-wrap: wrap;
}

.nav-item {
    flex: 1;
    min-width: 0;
    padding: 15px 10px;
    background: transparent;
    color: #ecf0f1;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 16px;
    font-weight: 500;
    position: relative;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-item:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-2px);
}

.nav-item.active {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    font-weight: bold;
}

.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: #f39c12;
}

/* Contenido de los menús */
.menu-content {
    display: none;
    background: white;
    padding: 20px;
    border-radius: 10px;
    border: 2px solid #ecf0f1;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.menu-content.active {
    display: block;
}

/* Marcador visual */
#marcador_display {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* Marcador Principal - Versión Compacta */
.marcador-compacto {
    margin: 15px 0;
    background: #ffffff;
    border: 2px solid #3498db;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.15);
}

.marcador-contenido {
    display: flex;
    align-items: center;
    padding: 15px;
    gap: 20px;
}

.equipo-item {
    flex: 1;
    text-align: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.equipo-local {
    border-left: 4px solid #27ae60;
}

.equipo-visitante {
    border-left: 4px solid #e74c3c;
}

.equipo-nombre {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.equipo-goles {
    font-size: 32px;
    font-weight: 900;
    color: #3498db;
    line-height: 1;
}

.vs-divisor {
    font-size: 14px;
    font-weight: bold;
    color: #7f8c8d;
    background: #ecf0f1;
    padding: 8px 12px;
    border-radius: 50%;
    border: 2px solid #bdc3c7;
}

/* Formularios */
.form-grid {
    display: grid;
    gap: 20px;
    margin-bottom: 20px;
}

.form-grid-2 {
    grid-template-columns: 1fr 1fr;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #34495e;
}

.form-input {
    padding: 12px;
    border: 2px solid #bdc3c7;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-input:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

/* Controles de goles */
.goles-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.goles-input {
    width: 70px;
    padding: 12px 8px;
    border: 2px solid #bdc3c7;
    border-radius: 6px;
    font-size: 24px;
    text-align: center;
    font-weight: bold;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.btn-gol {
    background: linear-gradient(135deg, #27ae60, #229954);
    color: white;
    border: none;
    border-radius: 4px;
    width: 40px;
    height: 32px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-gol.btn-menos {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.btn-gol:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.btn-gol:active {
    transform: translateY(0);
}

/* Botones principales */
.btn-primary {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    padding: 15px 40px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
    transition: all 0.3s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.4);
}

/* Formulario Compacto del Marcador */
.marcador-form-compact {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 15px;
    margin-top: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.form-header h4 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    text-align: center;
    font-size: 16px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.equipos-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.equipo-input {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.equipo-input label {
    font-size: 12px;
    font-weight: 600;
    color: #5a6c7d;
    text-transform: uppercase;
    text-align: center;
    letter-spacing: 0.5px;
}

.form-input-compact {
    padding: 8px 10px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
    font-weight: 500;
    transition: border-color 0.2s ease;
}

.form-input-compact:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.15);
}

.vs-separator {
    font-size: 12px;
    font-weight: bold;
    color: #7f8c8d;
    background: #ecf0f1;
    padding: 4px 8px;
    border-radius: 50%;
    min-width: 30px;
    text-align: center;
}

.goles-row {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 12px;
}

.gol-control {
    display: flex;
    justify-content: center;
}

.goles-container-compact {
    display: flex;
    align-items: center;
    gap: 5px;
}

.goles-input-compact {
    width: 50px;
    padding: 6px;
    border: 2px solid #ced4da;
    border-radius: 4px;
    font-size: 20px;
    text-align: center;
    font-weight: bold;
    background: white !important;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: textfield;
    outline: none;
    transition: border-color 0.2s ease;
    cursor: text;
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    pointer-events: auto !important;
}

.goles-input-compact:focus {
    border-color: #3498db !important;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2) !important;
    background: white !important;
}

.goles-input-compact:hover {
    border-color: #85C1E9;
}

.goles-input-compact::-webkit-outer-spin-button,
.goles-input-compact::-webkit-inner-spin-button {
    appearance: none;
    -webkit-appearance: none;
    margin: 0;
    display: none;
}

.btn-gol-compact {
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-gol-compact.btn-menos {
    background: #e74c3c;
}

.btn-gol-compact.btn-mas {
    background: #27ae60;
}

.btn-gol-compact:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.btn-container {
    text-align: center;
    margin: 15px 0;
}

.btn-actualizar-compact {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 12px 32px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
    transition: all 0.2s;
    min-height: 48px;
    display: inline-block;
}

.btn-actualizar-compact:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

/* Alineaciones - Versión móvil optimizada */
.alineaciones-container-mobile {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.equipo-alineacion-mobile {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border: 2px solid #dee2e6;
}

.equipo-titulo-mobile {
    text-align: center;
    font-size: 16px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 15px;
    padding: 8px;
    background: linear-gradient(135deg, #ecf0f1, #bdc3c7);
    border-radius: 5px;
}

.jugadores-grid-mobile {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 8px;
    margin-bottom: 15px;
}

.jugador-item-mobile {
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    padding: 6px 8px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.jugador-item-mobile.tecnico-item {
    background: #f8fff9;
    border: 2px solid #28a745;
    margin-top: 10px;
    padding: 8px 10px;
}

.jugador-numero-mobile {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 6px 10px;
    border-radius: 50%;
    font-weight: bold;
    font-size: 12px;
    min-width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tecnico-item .jugador-numero-mobile {
    background: linear-gradient(135deg, #28a745, #20a83a);
    font-size: 14px;
}

.jugador-input-mobile {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    background: white;
}

.jugador-input-mobile:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.tecnico-input-mobile {
    font-weight: 500;
    background: #ffffff !important;
}

.tecnico-container-mobile {
    border-top: 2px solid #dee2e6;
    padding-top: 10px;
}

/* Botones guardar por equipo */
.btn-guardar-alineacion {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 12px rgba(46, 204, 113, 0.3);
    margin-top: 15px;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-guardar-alineacion:hover {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 18px rgba(46, 204, 113, 0.4);
}

.btn-guardar-alineacion:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(46, 204, 113, 0.3);
}

/* Versión móvil de botones guardar */
@media screen and (max-width: 768px) {
    .btn-guardar-alineacion {
        padding: 12px 16px;
        font-size: 13px;
        margin-top: 12px;
        border-radius: 6px;
    }
}

/* Títulos GC - Versión optimizada para vMix Graphics */
.titulos-gc-container {
    display: grid;
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.gc-group {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.gc-group:hover {
    border-color: #3498db;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.15);
    transform: translateY(-2px);
}

.gc-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f8f9fa;
}

.gc-numero {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 14px;
    min-width: 60px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

.gc-campos {
    display: grid;
    gap: 12px;
    margin-bottom: 15px;
}

.gc-btn-container {
    text-align: center;
    padding-top: 10px;
    border-top: 1px solid #f8f9fa;
}

.btn-guardar-gc {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
    padding: 8px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(243, 156, 18, 0.3);
}

.btn-guardar-gc:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.4);
    background: linear-gradient(135deg, #e67e22, #d68910);
}

.btn-guardar-gc:active {
    transform: translateY(0);
}

.campo-gc {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.campo-gc {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.campo-label {
    font-size: 13px;
    font-weight: 600;
    color: #2c3e50;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.titulo-input-gc {
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #fafbfc;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.titulo-input-gc:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
    background: white;
    outline: none;
    transform: translateY(-1px);
}

.titulo-input-gc.descripcion {
    border-color: #27ae60;
    background: #f8fff9;
}

.titulo-input-gc.descripcion:focus {
    border-color: #27ae60;
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.2);
}

/* Indicadores visuales */
.campo-gc:nth-child(1) .campo-label::before {
    content: "📝 ";
    margin-right: 5px;
}

.campo-gc:nth-child(2) .campo-label::before {
    content: "💬 ";
    margin-right: 5px;
}

/* Títulos - Versión móvil optimizada (mantener para compatibilidad) */
.titulos-grid-mobile {
    display: grid;
    gap: 10px;
    max-width: 100%;
    margin: 0 auto;
}

.titulo-item-mobile {
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    padding: 10px;
    border-radius: 8px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.titulo-item-mobile:hover {
    border-color: #3498db;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.15);
}

.titulo-numero-mobile {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 8px 12px;
    border-radius: 50%;
    font-weight: bold;
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.titulo-input-mobile {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #fafbfc;
}

.titulo-input-mobile:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
    transform: translateY(-1px);
    background: white;
    outline: none;
}

/* Contenedor de botones móvil */
.btn-container-mobile {
    text-align: center;
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-top: 3px solid #3498db;
}

.btn-mobile {
    width: 100%;
    max-width: 300px;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-mobile:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.4);
}

/* Estilos adicionales para optimización móvil */

/* Inputs con mejor UX móvil */
.jugador-input-mobile,
.titulo-input-mobile {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border-radius: 6px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

/* Mejoras de accesibilidad táctil */
.jugador-item-mobile,
.titulo-item-mobile {
    min-height: 44px; /* Área táctil mínima recomendada */
    -webkit-tap-highlight-color: rgba(52, 152, 219, 0.2);
}

/* Animaciones suaves */
.jugador-item-mobile,
.titulo-item-mobile,
.jugador-input-mobile,
.titulo-input-mobile {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Estados de focus mejorados */
.jugador-input-mobile:focus,
.titulo-input-mobile:focus {
    transform: scale(1.02);
}

/* Indicador de carga/guardado */
.saving-indicator {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(39, 174, 96, 0.9);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    z-index: 1000;
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.3s ease;
}

.saving-indicator.show {
    opacity: 1;
    transform: translateX(0);
}

/* Mejoras de contraste */
.jugador-numero-mobile,
.titulo-numero-mobile {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Espaciado optimizado */
.equipo-alineacion-mobile {
    margin-bottom: 15px;
}

.equipo-alineacion-mobile:last-child {
    margin-bottom: 0;
}

/* Mejoras para inputs pequeños */
@media (max-width: 480px) {
    .jugador-input-mobile,
    .titulo-input-mobile {
        font-size: 16px; /* Previene zoom en iOS */
        line-height: 1.4;
    }
    
    /* Ajustes para teclados virtuales */
    .menu-content {
        padding-bottom: 20px;
    }
}

/* Scroll suave en contenedores */
.jugadores-grid-mobile {
    scroll-behavior: smooth;
}

/* Highlight para elementos activos */
.jugador-item-mobile:has(input:focus),
.titulo-item-mobile:has(input:focus) {
    background: #f0f8ff;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.1);
}

/* Separador visual entre secciones */
.tecnico-container-mobile::before {
    content: "CUERPO TÉCNICO";
    display: block;
    font-size: 11px;
    font-weight: bold;
    color: #6c757d;
    text-align: center;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Mensajes */
#mensaje {
    margin: 15px 0;
}

.mensaje-success {
    color: #27ae60;
    background: #d5f4e6;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
    font-weight: bold;
    border-left: 4px solid #27ae60;
}

.mensaje-error {
    color: #721c24;
    background: #f8d7da;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
    font-weight: bold;
    border-left: 4px solid #dc3545;
}

/* Info conexión */
.conexion-info {
    margin-top: 20px;
    padding: 15px;
    background: #ecf0f1;
    border-radius: 8px;
    font-size: 12px;
    color: #7f8c8d;
    text-align: center;
}

/* Info conexión */
.conexion-info {
    margin-top: 20px;
    padding: 15px;
    background: #ecf0f1;
    border-radius: 8px;
    font-size: 12px;
    color: #7f8c8d;
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
    #bscore_sistema {
        padding: 0;
        margin: 0;
        width: 100%;
        max-width: none;
    }
    
    .bscore-nav {
        margin: 0;
        border-radius: 0;
        border-left: none;
        border-right: none;
        padding: 0;
    }
    
    .nav-item {
        display: block;
        text-align: center;
        padding: 10px;
        font-size: 14px;
    }
    
    .menu-content {
        padding: 0;
        margin: 0;
    }
    
    #menu-marcador {
        padding: 0;
    }
    
    .marcador-compacto {
        margin: 0;
        border-left: none;
        border-right: none;
        border-radius: 0;
    }
    
    .marcador-contenido {
        padding: 8px 0;
        gap: 5px;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .equipo-item {
        padding: 6px 4px;
        flex: 1;
        min-width: 0;
    }
    
    .equipo-nombre {
        font-size: 11px;
        margin-bottom: 3px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .equipo-goles {
        font-size: 20px;
        line-height: 1;
        position: relative;
        top: 1px;
    }
    
    .vs-divisor {
        font-size: 10px;
        padding: 4px 6px;
        flex-shrink: 0;
        min-width: 25px;
    }
    
    .form-grid-2 {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .goles-container {
        flex-direction: row;
        gap: 8px;
        justify-content: center;
    }
    
    .goles-input {
        width: 60px;
        font-size: 20px;
    }
    
    .btn-gol {
        width: 45px;
        height: 35px;
        font-size: 14px;
    }
    
    /* Alineaciones móvil */
    .jugadores-grid-mobile {
        grid-template-columns: 1fr;
    }
    
    .jugador-item-mobile {
        padding: 8px 10px;
    }
    
    .jugador-numero-mobile {
        min-width: 28px;
        height: 28px;
        font-size: 11px;
    }
    
    .jugador-input-mobile {
        font-size: 15px;
        padding: 10px;
    }
    
    /* Títulos GC responsive */
    .titulos-gc-container {
        gap: 15px;
    }
    
    .gc-group {
        padding: 12px;
    }
    
    .gc-header {
        flex-direction: column;
        align-items: center;
        gap: 8px;
        margin-bottom: 12px;
    }
    
    .gc-numero {
        font-size: 13px;
        padding: 6px 12px;
        min-width: 55px;
    }
    
    .btn-guardar-gc {
        padding: 6px 16px;
        font-size: 13px;
    }
    
    .titulo-input-gc {
        font-size: 15px;
        padding: 10px 12px;
    }
    
    .campo-label {
        font-size: 12px;
    }
    
    .menu-content {
        padding: 15px;
    }
    
    /* Formulario Compacto Móvil */
    .marcador-form-compact {
        padding: 10px 0;
        margin-top: 0;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    
    .form-header h4 {
        font-size: 14px;
        margin-bottom: 10px;
        padding: 0 10px;
    }
    
    .equipos-row {
        gap: 5px;
        margin-bottom: 10px;
        padding: 0 10px;
    }
    
    .equipo-input label {
        font-size: 11px;
    }
    
    .form-input-compact {
        padding: 6px 4px;
        font-size: 13px;
    }
    
    .vs-separator {
        font-size: 10px;
        padding: 3px 6px;
        min-width: 25px;
    }
    
    .goles-row {
        gap: 8px;
        margin-bottom: 10px;
        justify-content: space-around;
        padding: 0 5px;
    }
    
    .goles-container-compact {
        display: flex;
        align-items: center;
        gap: 2px;
        justify-content: center;
    }
    
    .goles-input-compact {
        width: 62px;
        padding: 8px 4px;
        font-size: 18px;
        border-width: 2px;
        background: white !important;
        pointer-events: auto !important;
        -webkit-user-select: text !important;
        user-select: text !important;
        position: relative;
        top: 1px;
    }
    
    .goles-input-compact:focus {
        border-color: #3498db !important;
        box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.25) !important;
    }
    
    .btn-gol-compact {
        width: 22px;
        height: 22px;
        font-size: 11px;
        border-radius: 3px;
    }
    
    .btn-actualizar-compact {
        padding: 12px 28px;
        font-size: 15px;
        margin: 8px 10px;
        min-height: 44px;
    }
}

@media (max-width: 480px) {
    #bscore_sistema {
        padding: 8px;
        margin: 2px;
    }
    
    .equipo-goles {
        font-size: 32px;
    }
    
    .equipo-nombre {
        font-size: 14px;
    }
    
    .btn-primary {
        padding: 10px 20px;
        font-size: 15px;
    }
    
    .nav-item {
        padding: 8px;
        font-size: 13px;
    }
    
    /* Alineaciones muy pequeñas */
    .equipo-alineacion-mobile {
        padding: 10px;
    }
    
    .jugador-item-mobile {
        padding: 6px 8px;
        gap: 8px;
    }
    
    .jugador-numero-mobile {
        min-width: 25px;
        height: 25px;
        font-size: 10px;
        padding: 4px 6px;
    }
    
    .jugador-input-mobile {
        font-size: 14px;
        padding: 8px;
    }
    
    /* Títulos GC muy pequeñas */
    .gc-group {
        padding: 10px;
        margin-bottom: 10px;
    }
    
    .gc-header {
        margin-bottom: 10px;
    }
    
    .gc-numero {
        font-size: 12px;
        padding: 5px 10px;
        min-width: 50px;
    }
    
    .btn-guardar-gc {
        padding: 5px 12px;
        font-size: 12px;
    }
    
    .titulo-input-gc {
        font-size: 16px; /* Mantener 16px para evitar zoom en iOS */
        padding: 10px;
    }
    
    .campo-label {
        font-size: 11px;
    }
    
    .gc-campos {
        gap: 10px;
    }
    
    .btn-container-mobile {
        padding: 10px;
        margin-top: 15px;
    }
    
    .btn-mobile {
        padding: 10px 15px;
        font-size: 14px;
    }
}

@media (min-width: 769px) {
    /* Mantener diseño desktop original para alineaciones */
    .alineaciones-container-mobile {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 30px;
        flex-direction: row;
    }
    
    .jugadores-grid-mobile {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }
    
    .btn-mobile {
        width: auto;
        max-width: none;
        padding: 15px 40px;
        font-size: 18px;
    }
    
    .btn-container-mobile {
        background: transparent;
        border: none;
        padding: 20px;
    }
}

/* Feedback táctil para móviles */
.touched {
    transform: scale(0.98);
    opacity: 0.8;
    transition: all 0.15s ease;
}

.btn-primary.touched,
.btn-gol.touched,
.btn-guardar-gc.touched {
    transform: scale(0.95);
}

/* Mejoras de rendimiento y UX */
* {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

input[type="text"],
input[type="number"],
textarea {
    -webkit-user-select: text;
    -khtml-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* Indicador de guardado flotante */
.saving-indicator {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(39, 174, 96, 0.95);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    z-index: 1000;
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.saving-indicator.show {
    opacity: 1;
    transform: translateX(0);
}

@media (max-width: 480px) {
    .saving-indicator {
        top: 10px;
        right: 10px;
        font-size: 13px;
        padding: 6px 12px;
    }
}
