:root {
    --color-primary: #000000;
    --color-secondary: #ffc107;
    --color-accent: #e63946;
    --color-background: #f8f9fa;
    --color-card: #ffffff;
    --color-text: #212529;
    --color-success: #28a745;
    --color-danger: #dc3545;
    --color-warning: #ffc107;
    --color-info: #17a2b8;
}

body {
    background-color: var(--color-background);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--color-text);
}

.hero-section {
    position: relative;
    margin-bottom: 2rem;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.category-title {
    color: var(--color-primary);
    font-weight: 800;
    text-align: center;
    margin: 2rem 0;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.category-title:after {
    content: '';
    display: block;
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    margin: 15px auto;
    border-radius: 2px;
}

.nav-pills .nav-link {
    color: var(--color-text);
    font-weight: 600;
    border-radius: 50px;
    margin: 0 5px;
    padding: 0.5rem 1.5rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.nav-pills .nav-link:hover {
    background-color: rgba(0,0,0,0.05);
}

.nav-pills .nav-link.active {
    background-color: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    margin-bottom: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-7px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.15);
}

.card-header {
    background: linear-gradient(135deg, var(--color-primary) 0%, #333 100%);
    color: white;
    border-radius: 0 !important;
    font-weight: 700;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
}

.card-header i {
    margin-right: 10px;
    font-size: 1.2rem;
}

.team-logo {
    width: 35px;
    height: 35px;
    object-fit: contain;
    margin-right: 12px;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    background: white;
    padding: 2px;
}

.table th {
    border-top: none;
    font-weight: 700;
    color: var(--color-primary);
    padding: 1rem 0.75rem;
    background-color: #f8f9fa;
}

.table td {
    padding: 1rem 0.75rem;
    vertical-align: middle;
}

.badge-estado {
    font-size: 0.75rem;
    padding: 0.5em 0.8em;
    border-radius: 50px;
    font-weight: 600;
}

.fase-header {
    background: linear-gradient(90deg, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0.1) 100%);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    margin: 2rem 0 1rem;
    font-weight: 700;
    color: var(--color-primary);
    border-left: 5px solid var(--color-primary);
}

.grupo-header {
    background-color: #f1f1f1;
    padding: 0.6rem 1.25rem;
    border-radius: 6px;
    margin: 1.25rem 0 0.75rem;
    font-weight: 600;
    color: #555;
    border-left: 4px solid var(--color-secondary);
}

.partido-item {
    padding: 1rem;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.partido-item:hover {
    background-color: #f9f9f9;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.partido-item:last-child {
    border-bottom: none;
}

.resultado-destacado {
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--color-primary);
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.scroll-to-top {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background: var(--color-primary);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
}

.scroll-to-top.visible {
    opacity: 1;
}

.scroll-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.25);
}

.stats-box {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    margin-bottom: 1.5rem;
    text-align: center;
    transition: transform 0.3s;
}

.stats-box:hover {
    transform: translateY(-5px);
}

.stats-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--color-primary);
    line-height: 1;
    margin: 0.5rem 0;
}

.stats-label {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-section {
    background: white;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}

.team-row {
    transition: background-color 0.2s;
}

.team-row:hover {
    background-color: #f8f9fa;
}

.position-badge {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 700;
    background: #f1f1f1;
}

.position-1 {
    background: linear-gradient(135deg, #FFD700 0%, #DAA520 100%);
    color: white;
}

.position-2 {
    background: linear-gradient(135deg, #C0C0C0 0%, #A9A9A9 100%);
    color: white;
}

.position-3 {
    background: linear-gradient(135deg, #CD7F32 0%, #8C6B46 100%);
    color: white;
}

@media (max-width: 768px) {
    .card {
        margin-bottom: 1.25rem;
    }
    
    .table-responsive {
        font-size: 0.85rem;
    }
    
    .team-logo {
        width: 28px;
        height: 28px;
    }
    
    .stats-number {
        font-size: 2rem;
    }
    
    .nav-pills .nav-link {
        padding: 0.4rem 1rem;
        font-size: 0.9rem;
        margin: 0 2px;
    }
}

/* Estados de partidos */
.estado-programado { background-color: #e9ecef; color: #495057; }
.estado-jugado { background-color: #28a745; color: white; }
.estado-suspendido { background-color: #dc3545; color: white; }
.estado-aplazado { background-color: #ffc107; color: #212529; }
.estado-en_juego { 
    background-color: #17a2b8; 
    color: white;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.goleadora-destacada {
    background: linear-gradient(45deg, #f8f9fa, #e9ecef);
    border-left: 4px solid var(--color-secondary);
}

.goleadora-top {
    font-weight: 800;
    color: var(--color-primary);
}

.tabla-grupo {
    margin-bottom: 2.5rem;
}

.grupo-title {
    background: linear-gradient(90deg, var(--color-secondary) 0%, rgba(255,193,7,0.3) 100%);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0 1rem;
    font-weight: 700;
    color: var(--color-primary);
    border-left: 5px solid var(--color-primary);
    display: flex;
    align-items: center;
}

.grupo-title i {
    margin-right: 10px;
    font-size: 1.2rem;
}

/* botones de tablas de posiciones */
.vista-toggle .btn {
    border-radius: 20px !important;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
}

.vista-toggle .btn.active {
    background-color: #ffc107 !important;
    color: #ffffffff !important;
    box-shadow: 0 0 8px rgba(99, 103, 109, 0.5);
}