/* F1 Championship Table Styles - Glass Effect */
.championship-table {
    inline-size: 100%;
    border-collapse: collapse;
    background: transparent;
    border-radius: 12px;
    overflow: hidden;
    margin-block-end: 30px;
    animation: fadeInScale 0.8s ease-out;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.championship-table thead {
    background: rgba(0, 191, 255, 0.15);
    backdrop-filter: blur(10px);
    color: #ffffff;
    border-block-end: 2px solid rgba(0, 229, 255, 0.3);
    animation: headerShimmer 3s ease-in-out infinite;
}

@keyframes headerShimmer {
    0%, 100% {
        background: rgba(0, 191, 255, 0.15);
    }
    50% {
        background: rgba(0, 191, 255, 0.25);
    }
}

.championship-table th {
    padding: 16px 14px;
    text-align: start;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    color: #ffffff;
}

.championship-table tbody tr {
    transition: all 0.3s ease;
    border-block-end: 1px solid rgba(255, 255, 255, 0.08);
    animation: fadeInRow 0.5s ease-out backwards;
}

.championship-table tbody tr:nth-child(1) { animation-delay: 0.1s; }
.championship-table tbody tr:nth-child(2) { animation-delay: 0.15s; }
.championship-table tbody tr:nth-child(3) { animation-delay: 0.2s; }
.championship-table tbody tr:nth-child(4) { animation-delay: 0.25s; }
.championship-table tbody tr:nth-child(5) { animation-delay: 0.3s; }
.championship-table tbody tr:nth-child(6) { animation-delay: 0.35s; }
.championship-table tbody tr:nth-child(7) { animation-delay: 0.4s; }
.championship-table tbody tr:nth-child(8) { animation-delay: 0.45s; }
.championship-table tbody tr:nth-child(9) { animation-delay: 0.5s; }
.championship-table tbody tr:nth-child(10) { animation-delay: 0.55s; }

@keyframes fadeInRow {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.championship-table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.03);
}

.championship-table tbody tr:hover {
    background: rgba(0, 229, 255, 0.1);
    transform: translateX(4px);
    border-inline-start: 3px solid #00E5FF;
}

.championship-table td {
    padding: 14px;
    color: #ffffff;
    font-weight: 400;
}

.position-cell {
    font-weight: bold;
    font-size: 1.1rem;
    text-align: center;
    inline-size: 60px;
}

.driver-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    min-inline-size: 200px;
}

.flag-icon {
    inline-size: 24px;
    block-size: 16px;
    border-radius: 2px;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

.driver-name {
    font-weight: bold;
    font-size: 1rem;
}

.points-cell {
    font-weight: 700;
    font-size: 1.15rem;
    color: #00E5FF;
    text-align: center;
    inline-size: 80px;
    text-shadow: 0 0 10px rgba(0, 229, 255, 0.3);
    animation: pointsGlow 2s ease-in-out infinite;
}

@keyframes pointsGlow {
    0%, 100% {
        text-shadow: 0 0 10px rgba(0, 229, 255, 0.3);
    }
    50% {
        text-shadow: 0 0 15px rgba(0, 229, 255, 0.6);
    }
}

.team-cell {
    display: flex;
    align-items: center;
    justify-content: center; /* Centrar horizontalmente */
    gap: 8px;
    min-inline-size: 250px;
    text-align: center; /* Asegurar que el texto esté centrado */
}

.team-logo {
    inline-size: 20px;
    block-size: 20px;
    flex-shrink: 0;
}

.team-name {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

/* Team Colors */
.team-mclaren { color: #ff6600; }
.team-redbull { color: #1e41ff; }
.team-mercedes { color: #00d2be; }
.team-ferrari { color: #dc143c; }
.team-williams { color: #005aff; }
.team-haas { color: #ffffff; background: #b6babd; padding: 2px 6px; border-radius: 3px; }
.team-kick { color: #00c851; }

/* Position highlighting - Cyan theme */
.position-1 { 
    background: linear-gradient(90deg, rgba(0, 191, 255, 0.3), rgba(0, 229, 255, 0.2)) !important; 
    color: #ffffff !important;
    border-inline-start: 4px solid #00E5FF !important;
}
.position-2 { 
    background: linear-gradient(90deg, rgba(0, 191, 255, 0.2), rgba(0, 229, 255, 0.15)) !important; 
    color: #ffffff !important;
    border-inline-start: 4px solid rgba(0, 229, 255, 0.7) !important;
}
.position-3 { 
    background: linear-gradient(90deg, rgba(0, 191, 255, 0.15), rgba(0, 229, 255, 0.1)) !important; 
    color: #ffffff !important;
    border-inline-start: 4px solid rgba(0, 229, 255, 0.5) !important;
}

.position-1 td,
.position-2 td,
.position-3 td {
    color: #ffffff !important;
    font-weight: 600;
}

.position-1 .driver-name,
.position-2 .driver-name,
.position-3 .driver-name,
.position-1 .team-name,
.position-2 .team-name,
.position-3 .team-name {
    color: #ffffff !important;
}

/* Table Responsive */
@media (max-width: 768px) {
    .championship-table {
        font-size: 0.8rem;
        overflow-x: auto;
        display: block;
        white-space: nowrap;
    }
    
    .championship-table thead,
    .championship-table tbody,
    .championship-table th,
    .championship-table td,
    .championship-table tr {
        display: block;
    }
    
    .championship-table thead tr {
        position: absolute;
        inset-block-start: -9999px;
        inset-inline-start: -9999px;
    }
    
    .championship-table tr {
        border: 1px solid rgba(255, 255, 255, 0.1);
        margin-block-end: 10px;
        padding: 10px;
        border-radius: 8px;
        background: rgba(45, 45, 45, 0.7);
        backdrop-filter: blur(10px);
    }
    
    .championship-table td {
        border: none;
        position: relative;
        padding: 8px 0 8px 50%;
        text-align: start;
        white-space: normal;
    }
    
    .championship-table td:before {
        content: attr(data-label) ": ";
        position: absolute;
        inset-inline-start: 6px;
        inline-size: 45%;
        padding-inline-end: 10px;
        white-space: nowrap;
        font-weight: bold;
        color: var(--accent-blue);
    }
    
    .driver-name {
        font-size: 1rem;
        font-weight: bold;
    }
    
    .points-cell {
        font-size: 1.1rem;
        color: var(--accent-blue);
    }
}
