/* =================================== */
/* schedule-espn-style.css – 最终完整版 */
/* 电脑横向 + 移动端极致精简优化 */
/* =================================== */

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

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #e2e8f0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
}

/* ==================== 主容器 ==================== */
.espn-schedule-wrapper {
    min-height: 100vh;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 14px;
    background: rgba(15, 23, 42, 0.94);
    backdrop-filter: blur(12px);
}

/* ==================== 标题 ==================== */
.espn-header h1 {
    font-size: clamp(28px, 8vw, 44px);
    font-weight: 900;
    color: #fff;
    text-align: center;
    margin: 0 0 32px;
    letter-spacing: -0.6px;
}

/* ==================== 筛选器控件（基础样式） ==================== */
.espn-controls {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 36px;
    align-items: center;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.control-group {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control-group label {
    font-weight: 600;
    color: #cbd5e1;
    font-size: 15px;
}

.control-group input,
.control-group select {
    padding: 15px 18px;
    border: 1px solid #475569;
    border-radius: 14px;
    background: #1e293b;
    color: #fff;
    font-size: 16.5px;
}

.btn-primary,
.btn-secondary {
    padding: 16px 32px;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    font-weight: 600;
    font-size: 17px;
    width: 100%;
    transition: all 0.2s;
}
.btn-primary      { background: #3b82f6; color: #fff; }
.btn-primary:hover { background: #2563eb; }
.btn-secondary    { background: #334155; color: #e2e8f0; margin-top: 8px; }
.btn-secondary:hover { background: #475569; }

/* ==================== 电脑端：筛选器横向布局 ==================== */
@media (min-width: 768px) {
    .espn-controls {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-items: end;
        gap: 24px;
        max-width: none;
        margin-bottom: 44px;
    }

    .control-group {
        flex: 0 1 280px;
        width: auto;
    }

    .btn-primary,
    .btn-secondary {
        width: auto;
        flex: 1;
        min-width: 160px;
        margin-top: 0;
    }

    .btn-secondary { margin-top: 0; }
}

/* ==================== 移动端：筛选器精简压缩（高度大幅降低） ==================== */
@media (max-width: 767.98px) {
    .espn-header h1 {
        font-size: clamp(26px, 7.5vw, 36px);
        margin-bottom: 24px;
    }

    .espn-controls {
        gap: 14px;
        margin-bottom: 28px;
        padding: 0 10px;
        max-width: 100%;
    }

    .control-group {
        gap: 6px;
    }

    .control-group label {
        font-size: 14px;
    }

    .control-group input,
    .control-group select {
        padding: 12px 16px !important;
        font-size: 15.5px;
        border-radius: 12px;
    }

    .btn-primary,
    .btn-secondary {
        padding: 13px 24px !important;
        font-size: 16px;
        border-radius: 12px;
        margin-top: 6px !important;
    }

    .btn-secondary {
        margin-top: 4px !important;
    }

    .espn-info-bar {
        padding: 12px;
        font-size: 15px;
        margin-bottom: 32px;
    }
}

/* ==================== 信息条 ==================== */
.espn-info-bar {
    text-align: center;
    padding: 16px;
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 14px;
    color: #dbeafe;
    margin: 0 auto 40px;
    max-width: 900px;
    font-size: 16px;
    font-weight: 500;
}

/* ==================== 日期标题 ==================== */
.date-header {
    text-align: center;
    margin: 0 0 48px;
}
.date-header h2 {
    font-size: clamp(27px, 7vw, 38px);
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 12px;
}
.match-count {
    color: #94a3b8;
    font-size: 17.5px;
}

/* ==================== 联赛分组 ==================== */
.league-block {
    margin-bottom: 50px;
    background: rgba(30, 41, 59, 0.75);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid #334155;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.league-title {
    background: linear-gradient(90deg, #1d4ed8, #1e293b);
    padding: 20px 24px;
    font-size: 23px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 16px;
}
.league-title img {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    flex-shrink: 0;
}

/* ==================== 表格容器 ==================== */
.table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 14px;
}

.match-table {
    width: 100%;
    min-width: 820px;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 16.5px;
    background: rgba(255,255,255,0.04);
}

.match-table thead {
    background: #1e293b;
    color: #e2e8f0;
}
.match-table th {
    padding: 18px 16px;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
}
.match-table td {
    padding: 20px 16px;
    border-bottom: 1px solid #334155;
    color: #cbd5e1;
    white-space: nowrap;
}
.match-table tr:hover td {
    background: rgba(59, 130, 246, 0.18);
}

/* 列宽优化 */
.time-utc { width: 100px; font-weight: 700; color: #60a5fa; }
.teams    { min-width: 340px; }
.score    { width: 110px; text-align: center; font-size: 24px; font-weight: 900; color: #f871ee; }
.status   { width: 110px; text-align: center;center; }

/* 球队布局 */
.teams {
    display: flex;
    align-items: center;
    gap: 14px;
}
.home, .away {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}
.vs { color: #64748b; font-weight: normal; margin: 0 6px; }
.match-table img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ==================== 状态标签 ==================== */
.status {
    font-weight: 700;
    font-size: 13.8px;
    text-transform: uppercase;
    padding: 6px 12px;
    min-width: 90px;
}

.status-live,
.status:contains("En vivo") { background: rgba(52, 211, 153, 0.15); color: #86efac; animation: pulse 3s infinite; }
.status-finished,
.status:contains("Finalizado") { background: rgba(248, 113, 113, 0.15); color: #fca5a5; }
.status-pending,
.status:contains("Pendiente") { background: rgba(148, 163, 184, 0.12); color: #94a3b8; }
.status:contains("Cancelled") { background: rgba(251, 191, 36, 0.18); color: #fbbf24; }

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

/* ==================== 无比赛 & 加载 ==================== */
.no-matches {
    text-align: center;
    padding: 130px 20px;
    background: rgba(0,0,0,0.4);
    border: 2px dashed #475569;
    border-radius: 20px;
    color: #94a3b8;
    font-size: 24px;
    margin: 40px 0;
}