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

body {
    font-family: 'Arial', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.header-container {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: white;
    padding: 15px 0;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: relative;
}

.logo-container {
    background: white;
    border-radius: 60px 60px 60px 60px / 40px 40px 40px 40px;
    padding: 10px 40px;
    display: inline-block;
    margin-bottom: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    width: auto;
    max-width: 300px;
}

.logo {
    height: 60px;
    width: auto;
}

h1 {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 10px;
    padding: 0 10px;
}

.btn-inicio {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #ff6b35;
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.btn-inicio:hover {
    background: #e55a2b;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 107, 53, 0.3);
}

/* Menú hamburguesa */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    position: absolute;
    top: 20px;
    left: 15px;
    z-index: 1001;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: white;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px;
}

/* Navegación de categorías - Desktop */
.categorias-nav {
    display: flex;
    justify-content: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 10px;
}

.categoria-btn {
    background: #2a5298;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
    min-width: 100px;
}

.categoria-btn:hover {
    background: #1e3c72;
    transform: translateY(-2px);
}

.categoria-btn.active {
    background: #ff6b35;
    box-shadow: 0 4px 8px rgba(255, 107, 53, 0.3);
}

/* Tablas de posiciones */
.tabla-posiciones {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 25px;
    display: none;
}

.tabla-posiciones.active {
    display: block;
}

.tabla-header {
    background: #2a5298;
    color: white;
    padding: 12px 15px;
    text-align: center;
}

.tabla-header h2 {
    font-size: 1.3rem;
    margin: 0;
}

.tabla-content {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 500px;
}

th {
    background: #f8f9fa;
    padding: 12px 8px;
    text-align: center;
    font-weight: bold;
    border-bottom: 2px solid #dee2e6;
    color: #495057;
    font-size: 0.9rem;
}

td {
    padding: 10px 8px;
    text-align: center;
    border-bottom: 1px solid #dee2e6;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 0.9rem;
}

tr:hover td {
    background-color: #f8f9fa;
}

.equipo-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-start;
    text-align: left;
}

.equipo-logo {
    width: 25px;
    height: 25px;
    object-fit: contain;
}

.equipo-nombre {
    font-weight: bold;
    font-size: 0.9rem;
}

.equipo-abreviatura {
    display: none;
    font-weight: bold;
    font-size: 0.9rem;
}

/* Columnas para desktop */
.col-desktop {
    display: table-cell;
}

/* Botón de descarga */
.descarga-container {
    text-align: center;
    padding: 15px;
    border-top: 1px solid #dee2e6;
}

.btn-descarga {
    background: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: bold;
    transition: background-color 0.3s ease;
    margin-bottom: 10px;
}

.btn-descarga:hover {
    background: #218838;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 15px;
    border-radius: 10px;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 12px;
    top: 8px;
}

.close:hover {
    color: #000;
}

#modal-titulo {
    margin-bottom: 15px;
    color: #2a5298;
    font-size: 1.2rem;
}

.resultado-partido {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.resultado-partido:last-child {
    border-bottom: none;
}

.equipo-modal {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.marcador {
    font-weight: bold;
    font-size: 1.1rem;
    min-width: 60px;
    text-align: center;
}

.info-partido {
    text-align: right;
    font-size: 0.8rem;
    color: #666;
    flex: 1;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .header-container {
        padding: 10px 0;
    }
    
    .logo-container {
        padding: 8px 30px;
        margin-bottom: 8px;
        max-width: 250px;
    }
    
    .logo {
        height: 50px;
    }
    
    h1 {
        font-size: 1.4rem;
        margin-bottom: 8px;
    }
    
    .btn-inicio {
        top: 10px;
        right: 10px;
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    .container {
        padding: 10px;
    }
    
    /* Menú hamburguesa visible en móviles */
    .menu-toggle {
        display: flex;
    }
    
    /* Navegación oculta por defecto en móviles */
    .categorias-nav {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #2a5298;
        z-index: 1000;
        padding: 10px;
        box-shadow: 0 4px 15px rgba(0,0,0,0.2);
        margin-bottom: 0;
    }
    
    .categorias-nav.active {
        display: flex;
    }
    
    .categoria-btn {
        width: 100%;
        margin: 2px 0;
        border-radius: 8px;
        padding: 12px;
        font-size: 1rem;
    }
    
    /* Ocultar columnas en móviles */
    .col-mobile-hide {
        display: none;
    }
    
    /* Mostrar abreviaturas en móviles */
    .equipo-nombre {
        display: none;
    }
    
    .equipo-abreviatura {
        display: inline;
    }
    
    th, td {
        padding: 8px 5px;
        font-size: 0.8rem;
    }
    
    .equipo-cell {
        flex-direction: row;
        gap: 5px;
    }
    
    .equipo-logo {
        width: 20px;
        height: 20px;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
        padding: 12px;
    }
    
    .resultado-partido {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    .equipo-modal {
        justify-content: center;
    }
    
    .info-partido {
        text-align: center;
    }
    
    /* En móviles, mostrar abreviaturas en el modal también */
    .equipo-modal .equipo-nombre {
        display: none;
    }
    
    .equipo-modal .equipo-abreviatura {
        display: inline;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.2rem;
    }
    
    .logo-container {
        padding: 6px 25px;
        max-width: 200px;
    }
    
    .logo {
        height: 40px;
    }
    
    .tabla-header h2 {
        font-size: 1.1rem;
    }
    
    th, td {
        padding: 6px 3px;
        font-size: 0.75rem;
    }
    
    .equipo-cell {
        flex-direction: column;
        gap: 2px;
    }
    
    .btn-descarga {
        padding: 8px 16px;
        font-size: 0.8rem;
    }
}

/* Estilos para cuando el menú está activo */
body.menu-open {
    overflow: hidden;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}





/* ===== ESTILOS DE ADMINISTRACIÓN ===== */
.admin-nav {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    gap: 10px;
}

.admin-secciones {
    display: flex;
    justify-content: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 10px;
}

.admin-btn {
    background: #2a5298;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
    min-width: 200px;
}

.admin-btn:hover {
    background: #1e3c72;
    transform: translateY(-2px);
}

.admin-btn.active {
    background: #ff6b35;
    box-shadow: 0 4px 8px rgba(255, 107, 53, 0.3);
}

.admin-seccion {
    display: none;
}

.admin-seccion.active {
    display: block;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.admin-header h2 {
    color: #2a5298;
    margin: 0;
}

.btn-agregar {
    background: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.btn-agregar:hover {
    background: #218838;
}

.filtros {
    margin-bottom: 20px;
}

.filtros select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    min-width: 200px;
}

.tabla-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 25px;
}

.tabla-admin {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.tabla-admin th {
    background: #2a5298;
    color: white;
    padding: 12px 8px;
    text-align: center;
    font-weight: bold;
    font-size: 0.9rem;
}

.tabla-admin td {
    padding: 10px 8px;
    text-align: center;
    border-bottom: 1px solid #dee2e6;
    font-size: 0.9rem;
}

.acciones {
    display: flex;
    gap: 5px;
    justify-content: center;
}

.btn-editar {
    background: #ffc107;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

.btn-editar:hover {
    background: #e0a800;
}

.btn-eliminar {
    background: #dc3545;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

.btn-eliminar:hover {
    background: #c82333;
}

/* Formularios de Administración */
.admin-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.form-row .form-group {
    flex: 1;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #495057;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #2a5298;
    box-shadow: 0 0 0 2px rgba(42, 82, 152, 0.2);
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.btn-guardar {
    background: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
}

.btn-guardar:hover {
    background: #218838;
}

.btn-cancelar {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
}

.btn-cancelar:hover {
    background: #5a6268;
}

/* Sección de Archivos PDF */
.archivos-container {
    display: grid;
    gap: 20px;
}

.archivo-item {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.archivo-item h3 {
    color: #2a5298;
    margin-bottom: 10px;
}

.archivo-item p {
    margin-bottom: 15px;
    color: #666;
}

.form-archivo {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.form-archivo input[type="file"] {
    flex: 1;
    min-width: 200px;
}

/* Modal de Confirmación */
.confirmacion {
    text-align: center;
    max-width: 400px;
}

.confirmacion h3 {
    color: #dc3545;
    margin-bottom: 15px;
}

/* Responsive para Administración */
@media (max-width: 768px) {
    .admin-nav {
        position: static;
        justify-content: center;
        margin-bottom: 15px;
    }
    
    .admin-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .admin-btn {
        min-width: 150px;
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .tabla-admin {
        min-width: 800px;
    }
    
    .acciones {
        flex-direction: column;
        gap: 3px;
    }
    
    .btn-editar,
    .btn-eliminar {
        padding: 8px 12px;
        font-size: 11px;
    }
    
    .form-archivo {
        flex-direction: column;
        align-items: stretch;
    }
    
    .form-archivo input[type="file"] {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .admin-header h2 {
        font-size: 1.2rem;
    }
    
    .btn-agregar {
        width: 100%;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn-guardar,
    .btn-cancelar {
        width: 100%;
    }
}