/* ===================================================== */
/* 足球赛程卡片模式  */
/* ===================================================== */

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

html, body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f8f9fa;
    color: #1f2937;
}

.hoy-wrapper {
    padding: 12px 8px;
    background: #f8f9fa;
}

.hoy-main {
    max-width: 1100px;
    margin: 0 auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    overflow: hidden;
}

/* 导航栏 */
.data-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    padding: 0 12px;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
}

.data-nav a {
    padding: 12px 14px;
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    text-decoration: none;
    border-bottom: 3px solid transparent;
}

.data-nav a.active {
    color: #dc2626;
    border-bottom: 3px solid #dc2626;
}

.data-nav .count {
    background: #e2e8f0;
    color: #475569;
    font-size: 12px;
    padding: 1px 7px;
    border-radius: 9999px;
}

/* 顶部筛选栏 */
.hoy-topbar {
    padding: 16px 12px;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
}

.hoy-topbar > div {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

#date-input, #country-filter, #league-filter, #universal-search {
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    flex: 1;
    min-width: 160px;
}

button {
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
}

button[onclick="changeDate()"] { background: linear-gradient(135deg,#1e40af,#1e3a8a); color: #fff; }
button[onclick="clearFilters()"] { background: #64748b; color: #fff; }

/* 时间条 */
.info-bar {
    padding: 12px 16px;
    background: #f0f7ff;
    border-bottom: 1px solid #e5e7eb;
    font-size: 14px;
    font-weight: 600;
    color: #1e40af;
    text-align: center;
}

/* ==================== 卡片核心样式 ==================== */

.matches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 12px;
    padding: 12px 10px 20px;
}

@media (max-width: 480px) {
    .matches-grid {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 10px 8px;
    }
}

.match-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.07);
    border: 1px solid #e5e7eb;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.match-card.in-progress { border-left: 5px solid #dc2626; }
.match-card.match-finished { border-left: 5px solid #16a34a; }
.match-card.not-started { border-left: 5px solid #64748b; }
.match-card.postponed { border-left: 5px solid #f59e0b; }

.match-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: #f8fafc;
    border-bottom: 1px solid #f1f5f9;
}

.match-card .league-tag {
    display: inline-flex;
    padding: 3px 9px;
    border-radius: 9999px;
    font-size: 11.5px;
    font-weight: 700;
    color: #fff;
}

.match-card .status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 11.5px;
    font-weight: 700;
    min-width: 56px;
    text-align: center;
}

.match-card.not-started .status { background: #64748b; color: #fff; }
.match-card.in-progress .status { background: #dc2626; color: #fff; animation: pulse 2s infinite; }
.match-card.match-finished .status { background: #16a34a; color: #fff; }
.match-card.postponed .status { background: #f59e0b; color: #fff; }

.match-card .teams-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 12px 10px;
    gap: 4px;
}

.match-card .team {
    display: flex;
    align-items: center;
    gap: 7px;
    flex: 1;
    min-width: 0;
}

.match-card .home-team { justify-content: flex-start; }
.match-card .away-team { justify-content: flex-end; flex-direction: row-reverse; }

.match-card .team-logo {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #e5e7eb;
}

.match-card .team-name {
    font-weight: 700;
    font-size: 14.5px;
    color: #1f2937;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.match-card .score-section {
    text-align: center;
    min-width: 68px;
}

.match-card .score {
    font-size: 24px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.match-card.in-progress .score,
.match-card.match-finished .score {
    color: #dc2626;
}

.match-card .score-sub {
    font-size: 11px;
    color: #64748b;
    margin-top: 3px;
    font-weight: 600;
}

.match-card .match-stats {
    display: flex;
    justify-content: center;
    gap: 14px;
    padding: 8px 12px 11px;
    background: #fafafa;
    border-top: 1px solid #f1f5f9;
}

.match-card .stat-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 700;
}

.match-card .stat-item.corners { color: #10b981; }
.match-card .stat-item.yellow  { color: #f59e0b; }
.match-card .stat-item.red     { color: #ef4444; }

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

.notice {
    text-align: center;
    padding: 20px;
    background: #f8fafc;
    color: #64748b;
    border-radius: 8px;
    margin: 20px;
}
/* ==================== 足球/篮球切换按钮（仅手机端显示） ==================== */
.sport-switch {
    display: flex;
    background: #f1f5f9;
    border-radius: 9999px;
    padding: 4px;
    margin: 12px 12px 0;
    width: fit-content;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

/* 电脑端隐藏 */
@media (min-width: 768px) {
    .sport-switch {
        display: none !important;
    }
}

.sport-switch a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 20px;
    font-size: 15px;
    font-weight: 600;
    color: #475569;
    text-decoration: none;
    border-radius: 9999px;
    transition: all 0.2s ease;
    min-width: 120px;
}

.sport-switch a.active {
    background: #fff;
    color: #1e40af;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    font-weight: 700;
}

.sport-switch a:hover:not(.active) {
    background: #e2e8f0;
    color: #1e40af;
}

/* 移动端适配 */
@media (max-width: 480px) {
    .sport-switch {
        margin: 10px 8px 0;
        width: 100%;
        max-width: 100%;
    }
    
    .sport-switch a {
        flex: 1;
        padding: 8px 12px;
        font-size: 14px;
        min-width: auto;
    }
}