/* 积分页面特定样式 */

/* 积分表格容器样式 - 调整为更加紧凑均匀的布局 */
#points-content {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    margin: 0 auto;
    width: 100%;
}

/* 加载状态样式 */
.loading-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 64vh;
}

.loading-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #165DFF;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

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

.error-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 64vh;
}

/* 队徽样式 - 支持图片和文本 */
.team-logo {
    width: 49px;
    height: 32px;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 0.875rem;
    overflow: hidden;
}

.team-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* 积分表格标题样式 */
#points-content h2 {
    color: #FFD700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
    margin-bottom: 1.5rem;
}

/* 积分表格响应式样式优化 */
.overflow-x-auto {
    /* 禁用横向滚动 */
    overflow-x: hidden;
    width: 100%;
    margin: 0 auto;
}

/* 表格行悬停效果增强 */
#points-content table {
    /* 改为auto布局，允许表格自适应内容 */
    table-layout: auto;
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
}

/* 表格列宽设置 */
#points-content th:first-child {
    width: 50px; /* 排名列 */
    min-width: 50px;
    padding-left: 18px; /* 向右移动排名列内容 */
}

#points-content th:nth-child(2) {
    width: 130px; /* 球队列 - 减少宽度 */
    min-width: 130px;
    padding-left: 18px; /* 向右移动球队列内容 */
}

#points-content th:nth-child(3),
#points-content th:nth-child(4),
#points-content th:nth-child(5) {
    width: 40px; /* 胜平负列 */
    min-width: 40px;
    text-align: center;
}

#points-content th:nth-child(6) {
    width: 80px; /* 进/失球列 */
    min-width: 80px;
    text-align: center;
}

#points-content th:last-child {
    width: 50px; /* 积分列 */
    min-width: 50px;
    text-align: center;
}

#points-content th {
    padding: 0.5rem;
}

#points-content td {
    padding: 0.5rem;
}

#points-content tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.05);
    transform: translateX(2px);
    transition: all 0.2s ease;
}

/* 排名徽章动画效果 */
#points-content .w-8.h-8 {
    transition: transform 0.2s ease;
}

#points-content tbody tr:hover .w-8.h-8 {
    transform: scale(1.1);
}

/* 队徽悬停效果 */
#points-content .team-logo {
    transition: all 0.2s ease;
}

#points-content tbody tr:hover .team-logo {
    transform: scale(1.05);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

/* 积分高亮效果增强 */
.score-highlight {
    position: relative;
    display: inline-block;
}

.score-highlight::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #FFD700, transparent);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

#points-content tbody tr:hover .score-highlight::after {
    transform: scaleX(1);
}

/* 响应式设计优化 */
@media (max-width: 768px) {
    /* 积分内容容器调整 */
    #points-content {
        min-height: auto;
        padding: 0 4px;
        box-sizing: border-box;
    }
    
    /* 积分表格标题调整 */
    #points-content h2 {
        font-size: 1.3rem;
        margin-bottom: 0.75rem;
        text-align: center;
    }
    
    /* 表格边距调整 */
    #points-content table {
        font-size: 0.65rem;
        width: 100%;
        margin: 0;
        /* 确保表格适应容器宽度 */
        table-layout: auto;
    }
    
    /* 表格单元格内边距调整 */
    #points-content th,
    #points-content td {
        padding: 0.35rem 0.15rem;
        /* 缩小单元格间距 */
    }
    
    /* 队徽大小调整 */
    #points-content .team-logo {
        width: 35px;
        height: 24px;
        font-size: 8px;
        margin-right: 3px;
        border-radius: 0;
    }
    
    /* 排名徽章大小调整 */
    #points-content .w-8.h-8 {
        width: 18px;
        height: 18px;
        font-size: 9px;
    }
    
    /* 球队名称显示优化 */
    #points-content .font-medium {
        font-size: 0.6rem;
        max-width: 50px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    /* 表格列宽调整 - 适配移动设备 */
    #points-content th:first-child,
#points-content td:first-child {
    width: 40px;
    min-width: 40px;
    padding-left: 18px; /* 移动设备上也向右移动排名列内容 */
}
    
    #points-content th:nth-child(2),
#points-content td:nth-child(2) {
    width: 80px; /* 移动设备上也减少球队列宽度 */
    min-width: 80px;
    padding-left: 18px; /* 移动设备上向右移动球队列内容 */
}
    
    #points-content th:nth-child(3),
    #points-content td:nth-child(3) {
        width: 30px;
        min-width: 30px;
    }
    
    #points-content th:nth-child(4),
    #points-content td:nth-child(4) {
        width: 30px;
        min-width: 30px;
    }
    
    #points-content th:nth-child(5),
    #points-content td:nth-child(5) {
        width: 30px;
        min-width: 30px;
    }
    
    #points-content th:nth-child(6),
    #points-content td:nth-child(6) {
        width: 60px;
        min-width: 60px;
        font-size: 0.6rem;
    }
    
    #points-content th:last-child,
    #points-content td:last-child {
        width: 40px;
        min-width: 40px;
    }
    
    /* 移除伪元素内容，避免与JavaScript渲染的表头重复显示 */
}

/* 平板设备响应式调整 */
@media (min-width: 769px) and (max-width: 1024px) {
    /* 表格大小调整 */
    #points-content table {
        font-size: 0.875rem;
    }
    
    /* 表格单元格内边距调整 */
    #points-content th,
    #points-content td {
        padding: 0.75rem 0.5rem;
        padding-left: 18px;
    }
    
    /* 调整平板设备上的球队列宽度 */
    #points-content th:nth-child(2),
    #points-content td:nth-child(2) {
        width: 110px;
        min-width: 110px;
    }
    
    /* 队徽大小调整 */
    #points-content .team-logo {
        width: 40px;
        height: 24px;
        font-size: 12px;
    }
}

/* 确保导航按钮在积分页面正确显示 */
#points-tab.active {
    /* color: #FFD700; */
}

#points-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 3px;
    background-color: #FFD700;
    border-radius: 3px 3px 0 0;
}

/* 为积分页面添加加载动画 */
#points-content {
    opacity: 0;
    animation: fadeIn 0.5s ease-in-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 表格数据渐进式加载动画 */
#points-content tbody tr {
    opacity: 0;
    transform: translateY(5px);
    animation: rowFadeIn 0.3s ease-out forwards;
}

#points-content tbody tr:nth-child(1) { animation-delay: 0.1s; }
#points-content tbody tr:nth-child(2) { animation-delay: 0.15s; }
#points-content tbody tr:nth-child(3) { animation-delay: 0.2s; }
#points-content tbody tr:nth-child(4) { animation-delay: 0.25s; }
#points-content tbody tr:nth-child(5) { animation-delay: 0.3s; }
#points-content tbody tr:nth-child(6) { animation-delay: 0.35s; }
#points-content tbody tr:nth-child(7) { animation-delay: 0.4s; }
#points-content tbody tr:nth-child(8) { animation-delay: 0.45s; }
#points-content tbody tr:nth-child(9) { animation-delay: 0.5s; }
#points-content tbody tr:nth-child(10) { animation-delay: 0.55s; }
#points-content tbody tr:nth-child(11) { animation-delay: 0.6s; }
#points-content tbody tr:nth-child(12) { animation-delay: 0.65s; }

@keyframes rowFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}