/* 体育运动比分页面样式 */
.scoreboard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
}

/* 顶部日期导航 */
.scoreboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 8px;
}

.date-nav {
    display: flex;
    align-items: center;
    gap: 15px;
}

.date-nav button {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.date-nav button:hover {
    background: #667eea;
    color: #fff;
    border-color: #667eea;
}

.current-date {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

/* 状态筛选标签 */
.status-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.status-tab {
    padding: 8px 16px;
    border: 2px solid #e0e0e0;
    background: #fff;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.status-tab:hover {
    border-color: #667eea;
    color: #667eea;
}

.status-tab.active {
    background: #667eea;
    color: #fff;
    border-color: #667eea;
}

/* 运动类型筛选 */
.sport-type-filter {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.sport-type-btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s;
}

.sport-type-btn:hover {
    background: #f0f0f0;
}

.sport-type-btn.active {
    background: #7D4A4E;
    color: #fff;
    border-color: #7D4A4E;
}

/* 比赛列表 */
.scoreboard-list {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

/* 联赛分组 */
.league-group {
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.3s ease;
}

.league-group:last-child {
    border-bottom: none;
}

/* 比赛项 - 响应式布局 */
.match-item {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    z-index: 1;
    padding: 14px 12px;
}

.match-item:hover {
    background: rgba(102, 126, 234, 0.04);
    transform: translateX(2px);
}

.match-item:last-child {
    border-bottom: none;
}

/* 移动端布局默认显示，桌面端隐藏 */
.mobile-layout {
    display: block;
}

.desktop-layout {
    display: none;
}

/* 第一行：联赛信息 + 状态 */
.match-row-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.match-league-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

/* 第二、三行：队伍行 */
.match-row-team {
    display: grid;
    grid-template-columns: 55px 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
}

.team-time-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #7f8c8d;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
}

.team-time-cell.empty {
    visibility: hidden;
}

/* 队伍侧边 */
.team-side {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
}

.team-side.home {
    justify-content: flex-start;
}

.team-side.away {
    justify-content: flex-start;
}

/* 主客队标记 */
.team-indicator {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: 0.5px;
}

.home-indicator {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    color: #1565c0;
    box-shadow: 0 1px 2px rgba(21, 101, 192, 0.15);
}

.away-indicator {
    background: linear-gradient(135deg, #fce4ec, #f8bbd0);
    color: #c2185b;
    box-shadow: 0 1px 2px rgba(194, 24, 91, 0.15);
}

/* 桌面端适配 - 显示桌面布局，隐藏移动布局 */
@media (min-width: 769px) {
    .match-item {
        display: flex;
        align-items: stretch;
    }

    .mobile-layout {
        display: none;
    }

    .desktop-layout {
        display: flex;
        align-items: stretch;
        width: 100%;
    }

    /* 恢复原有的列布局 */
    .match-league {
        width: 100px;
        display: flex;
        align-items: center;
        justify-content: left;
        gap: 8px;
        flex-shrink: 0;
        padding: 5px 10px;
        min-height: 40px;
    }

    .match-time {
        min-width: 60px;
        width: 60px;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        font-size: 13px;
        color: #666;
        font-weight: 500;
        flex-shrink: 0;
        margin: auto;
    }

    .match-teams {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
        min-width: 0;
    }

    .team-side {
        display: flex;
        align-items: center;
        gap: 8px;
        min-width: 0;
    }

    .team-side.home {
        justify-content: flex-end;
        flex: 1;
    }

    .team-side.away {
        justify-content: flex-start;
        flex: 1;
    }

    .team-logo {
        width: 28px;
        height: 28px;
        object-fit: contain;
        border-radius: 50%;
        flex-shrink: 0;
    }

    .team-name {
        font-size: 14px;
        color: #333;
        font-weight: 500;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .team-name.home {
        text-align: right;
    }

    .team-name.away {
        text-align: left;
    }

    .match-score-area {
        display: flex;
        align-items: center;
        gap: 6px;
        flex-shrink: 0;
    }

    .team-score {
        font-size: 18px;
        font-weight: bold;
        color: #333;
        min-width: 24px;
        text-align: center;
    }

    .match-status-badge {
        font-size: 11px;
        padding: 4px 8px;
        border-radius: 10px;
        font-weight: 600;
        white-space: nowrap;
        min-width: 40px;
        max-width: 80px;
        text-align: center;
        text-overflow: ellipsis;
        overflow: hidden;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        line-height: 1.2;
        margin: auto;
    }
}

/* 联赛图标 - 雪碧图 */
.league-name {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.league-name:before {
    content: "";
    display: inline-block;
    vertical-align: middle;
    margin: -2px 6px 0 0;
    width: 17px;
    height: 17px;
    background: url(/img/sp_livescore.png) no-repeat 0 -250px;
}

.league-name.baseball:before {
    background-position: -20px -250px;
}

.league-name.basketball:before {
    background-position: -40px -250px;
}

.league-name.icehockey:before,
.league-name.hockey:before {
    background-position: -80px -250px;
}
.league-name.volleyball:before {
    background-position: -60px -250px;
}

.league-name.tennis:before {
    background-position: -100px -250px;
}

.league-name.lol:before,
.league-name.esports:before {
    background-position: -120px -250px;
}

/* 第二列：比赛时间 */
.match-time {
    min-width: 60px;
    width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 13px;
    color: #666;
    font-weight: 500;
    flex-shrink: 0;
    margin: auto;
}

/* 第四列：半场比分 */
.match-half-scores {
    min-width: 50px;
    width: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 12px;
    color: #888;
    font-weight: 600;
    flex-shrink: 0;
    gap: 2px;
}

.match-half-scores .half-score-divider {
    color: #bbb;
    font-weight: 400;
}

/* 第三列：比赛信息（主队 vs 客队） */
.match-teams {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-width: 0;
}

.team-side {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.team-side.home {
    justify-content: flex-end;
    flex: 1;
}

.team-side.away {
    justify-content: flex-start;
    flex: 1;
}

.team-logo {
    width: 28px;
    height: 28px;
    object-fit: contain;
    border-radius: 50%;
    flex-shrink: 0;
}

.team-name {
    font-size: 14px;
    color: #2c3e50;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
    letter-spacing: 0.3px;
}

.team-name.home {
    text-align: right;
}

.team-name.away {
    text-align: left;
}

/* 比分 */
.team-score {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    min-width: 32px;
    text-align: center;
    flex-shrink: 0;
    line-height: 1;
}

.team-score.winner {
    color: #667eea;
    font-weight: 800;
    text-shadow: 0 0 8px rgba(102, 126, 234, 0.3);
}

.match-status-badge {
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 10px;
    font-weight: 600;
    white-space: nowrap;
    min-width: 40px;
    max-width: 80px;
    text-align: center;
    text-overflow: ellipsis;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
    margin: auto;
}

.match-status-badge.live {
    background: linear-gradient(135deg, #ff4444, #ff6b6b);
    color: #fff;
    animation: pulse 2s infinite;
    box-shadow: 0 2px 4px rgba(255, 68, 68, 0.3);
}

.match-status-badge.finished {
    background: linear-gradient(135deg, #999, #aaa);
    color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.match-status-badge.upcoming {
    background: #bbb;
    color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 特殊状态样式 */
.match-status-badge:contains("취소") {
    background: linear-gradient(135deg, #ff9800, #ffb74d);
    color: #fff;
}

.match-status-badge:contains("연기"),
.match-status-badge:contains("중단") {
    background: linear-gradient(135deg, #ff5722, #ff8a65);
    color: #fff;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state i {
    font-size: 64px;
    margin-bottom: 20px;
    color: #ddd;
}

.empty-state p {
    font-size: 16px;
}

/* 刷新按钮 */
.refresh-btn {
    padding: 8px 16px;
    background: #667eea;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.refresh-btn:hover {
    background: #5568d3;
    transform: translateY(-2px);
}

/* 已结束的比赛区域 */
.finished-games-section {
    margin-top: 30px;
    border-top: 2px solid #e0e0e0;
    padding-top: 20px;
}

.finished-games-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    padding: 0 10px;
}

.finished-games-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.finished-count {
    background: #999;
    color: #fff;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
}

.finished-games-list {
    background: #f9f9f9;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.finished-games-list .match-item {
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
}

.finished-games-list .match-item:hover {
    background: #f5f5f5;
}

.finished-games-list .match-status-badge {
    background: #999;
    color: #fff;
    animation: none;
}

/* 移动端响应式优化 */
@media (max-width: 768px) {
    .scoreboard-container {
        padding: 10px;
    }

    /* 顶部导航一行显示 */
    .scoreboard-header {
        flex-direction: row !important;
        padding: 10px !important;
        margin-bottom: 15px !important;
        gap: 10px !important;
    }

    .date-nav {
        gap: 8px !important;
        flex-wrap: nowrap !important;
    }

    .date-nav button {
        padding: 6px 10px !important;
        font-size: 13px !important;
    }

    .current-date {
        font-size: 15px !important;
        font-weight: 600 !important;
    }

    .refresh-btn {
        padding: 6px 10px !important;
        font-size: 16px !important;
    }

    .match-item {
        padding: 12px 10px;
    }

    .match-item:hover {
        transform: none;
    }

    /* 状态标签一行显示 */
    .status-tabs {
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        gap: 8px !important;
        margin-bottom: 15px !important;
        padding-bottom: 4px;
    }

    .status-tab {
        flex-shrink: 0 !important;
        padding: 6px 12px !important;
        font-size: 12px !important;
        white-space: nowrap !important;
    }

    /* 第一行优化 */
    .match-row-top {
        margin-bottom: 8px;
        padding-bottom: 7px;
    }

    .match-league-info {
        max-width: 65%;
    }

    .league-name {
        font-size: 12px;
        font-weight: 600;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .match-status-badge {
        font-size: 10px;
        padding: 3px 7px;
        min-width: 38px;
        max-width: 65px;
        font-weight: 600;
		margin: 0;
    }

    /* 队伍行优化 */
    .match-row-team {
        grid-template-columns: 50px 1fr auto;
        gap: 8px;
        padding: 5px 0;
    }

    .team-time-cell {
        font-size: 11px;
        color: #95a5a6;
        font-weight: 600;
        font-family: 'Courier New', monospace;
    }

    /* 覆盖PC端样式 */
    .team-side {
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
        min-width: 0 !important;
        flex: 1 !important;
        justify-content: flex-start !important;
    }

    .team-side.home {
        justify-content: flex-start !important;
        flex: 1 !important;
    }

    .team-side.away {
        justify-content: flex-start !important;
        flex: 1 !important;
    }

    .team-indicator {
        font-size: 10px;
        padding: 2px 6px;
        border-radius: 3px;
        font-weight: 600;
        flex-shrink: 0 !important;
    }

    /* 覆盖PC端队伍名称对齐 */
    .team-name {
        font-size: 13px;
        font-weight: 500;
        color: #2c3e50;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        letter-spacing: 0.2px;
        text-align: left !important;
        flex: 1;
        min-width: 0;
    }

    .team-name.home {
        text-align: left !important;
    }

    .team-name.away {
        text-align: left !important;
    }

    .team-score {
        font-size: 16px;
        min-width: 30px;
        font-weight: 700;
    }

    /* 足球特有：移动端详情行 */
    .match-row-details {
        display: none !important;
    }
}
