/* =================================================================
   首页「最新赛程」列表模板样式 —— 2 场比赛 / 行
   上传路径： /static19/css/schedule.css
   在 index.txt 的 <head> 里，放在 base.css 之后引入
   ================================================================= */

/* ---------------- 区块标题（最新赛程 / 热门赛事 / 推荐赛事） ---------------- */
.box-title.match-title {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    margin: 18px 0 12px;
    padding-left: 12px;
    font-size: 20px;
    line-height: 28px;
    font-weight: 600;
    color: #1c2533;
}

.box-title.match-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 18px;
    border-radius: 4px;
    background: linear-gradient(180deg, #00b4d8, #0077ff);
}

.match-title-nav {
    margin-left: auto;
    display: flex;
    gap: 8px;
    font-size: 12px;
    font-weight: 400;
}

.match-title-nav a {
    padding: 0 10px;
    line-height: 24px;
    border-radius: 12px;
    background: #f3f6fb;
    color: #5b6472;
    transition: background .2s, color .2s;
}

.match-title-nav a:hover {
    background: #0077ff;
    color: #fff;
}

/* ---------------- 日期分组标题 ---------------- */
.match-grid .dateheader {
    grid-column: 1 / -1;
    position: relative;
    width: 100%;
    height: 34px;
    line-height: 34px;
    margin: 6px 0 0;
    padding-left: 12px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    color: #1c2533;
    background: linear-gradient(90deg, #eaf1fb 0%, #f6f9fd 100%);
    border-radius: 8px;
}

.match-grid .dateheader-day {
    margin-right: 10px;
}

.match-grid .dateheader-sub {
    font-size: 12px;
    font-weight: 400;
    color: #8a94a6;
}

/* =================================================================
   单场卡片：桌面 / 移动端共用的部分
   ================================================================= */
.match-grid .live-item {
    background: #fff;
    border: 1px solid #eef1f6;
    border-radius: 8px;
    transition: border-color .2s, box-shadow .2s, transform .2s;
}

.match-grid .live-item:hover {
    border-color: #d8e6fa;
    box-shadow: 0 6px 16px rgba(12, 39, 68, .09);
    transform: translateY(-1px);
}

/* 联赛标签 */
.match-grid .live-match {
    flex: 0 0 auto;
    width: auto;
    height: 22px;
    padding: 0 8px;
    font-size: 12px;
    line-height: 22px;
    color: #5b6472;
    text-align: center;
    background: #f3f6fb;
    border-radius: 4px;
}

/* 主客队名 */
.match-grid .live-team {
    min-width: 0;
    font-size: 13px;
    color: #1c2533;
}

.match-grid .live-team-h {
    padding-right: 4px;
    text-align: right;
}

.match-grid .live-team-a {
    padding-left: 4px;
    text-align: left;
}

/* 队徽 */
.match-grid .live-logo {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    margin: 0 2px;
    object-fit: contain;
}

/* 比分 / VS */
.match-grid .live-score {
    flex: 0 0 auto;
    width: auto;
    margin: 0 6px;
    gap: 2px;
}

.match-grid .live-score-num {
    width: auto;
    min-width: 24px;
    height: 24px;
    padding: 0 4px;
    font-size: 13px;
    line-height: 24px;
    color: #3b4554;
    background: #f5f7fa;
    border-radius: 4px;
    box-shadow: none;
    text-shadow: none;
}

/* 状态占位 */
.match-grid .live-status {
    flex: 0 0 auto;
    width: auto;
    margin: 0 2px;
}

/* 右侧「即将开始 / 直播中」按钮 */
.match-grid .live-see {
    flex: 0 0 auto;
    width: auto;
    margin-left: 4px;
    font-size: 12px;
}

.match-grid .live-see a {
    display: inline-block;
    margin: 0;
    padding: 0 10px;
    line-height: 24px;
    border-radius: 12px;
    color: #0077ff;
    background: rgba(0, 119, 255, .08);
    transition: background .2s, color .2s;
}

.match-grid .live-see a::before {
    display: none;
}

.match-grid .live-see a:hover {
    color: #fff;
    background: #0077ff;
}

/* 进行中的比赛用红色强调 */
.match-grid .live-see.start a {
    color: #ea3443;
    background: rgba(234, 52, 67, .1);
}

.match-grid .live-see.start a:hover {
    color: #fff;
    background: #ea3443;
}

/* =================================================================
   桌面端：2 场 / 行
   ================================================================= */
@media screen and (min-width: 999px) {

    .match-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px 12px;
        align-items: stretch;
    }

    .match-grid .live-item {
        height: 62px;
        padding: 0 10px;
        overflow: hidden;
    }

    .match-grid .live-icon {
        flex: 0 0 auto;
        width: 16px;
        height: 16px;
        margin: 0 8px 0 0;
    }

    .match-grid .live-time {
        flex: 0 0 auto;
        min-width: 112px;
        width: auto;
        font-size: 12px;
        color: #8a94a6;
        text-align: left;
        white-space: nowrap;
    }

    .match-grid .live-time .match_hot {
        flex: 0 0 auto;
        margin-left: 4px;
    }

    .match-grid .live-match {
        margin: 0 8px 0 4px;
    }

    .match-grid .live-team {
        flex: 1 1 0;
        width: auto;
    }

    .match-grid .live-see {
        margin-left: auto;
    }
}

/* =================================================================
   移动端：单场一行（卡片），队名不换行省略
   ================================================================= */
@media screen and (max-width: 998px) {

    .box-title.match-title {
        margin: 12px 0 8px;
        padding-left: 10px;
        font-size: 16px;
        line-height: 22px;
    }

    .box-title.match-title::before {
        width: 3px;
        height: 14px;
    }

    .match-title-nav a {
        padding: 0 8px;
        line-height: 22px;
    }

    .match-grid {
        display: block;
    }

    .match-grid .dateheader {
        width: 100%;
        margin-bottom: 6px;
        padding-left: 10px;
    }

    /* 移动端单场卡片：3 行网格 —— 联赛/时间、对阵、按钮 */
    .match-grid .live-item {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 22px auto 22px minmax(0, 1fr);
        grid-template-rows: auto auto auto;
        align-items: center;
        column-gap: 0;
        row-gap: 6px;
        margin-bottom: 8px;
        padding: 10px 12px;
    }

    .match-grid .live-icon {
        grid-area: 1 / 1;
        justify-self: start;
        width: 16px;
        height: 16px;
        margin: 0;
    }

    .match-grid .live-match {
        grid-area: 1 / 1 / auto / span 3;
        justify-self: start;
        margin-left: 24px;
    }

    .match-grid .live-time {
        grid-area: 1 / 4 / auto / span 2;
        justify-self: end;
        width: auto;
        min-width: 0;
        margin: 0;
        font-size: 12px;
        color: #8a94a6;
        text-align: right;
        white-space: nowrap;
    }

    .match-grid .live-team-h {
        grid-area: 2 / 1;
    }

    .match-grid .live-team-a {
        grid-area: 2 / 5;
    }

    .match-grid .live-team {
        flex: none;
        width: auto;
    }

    .match-grid .live-logo {
        justify-self: center;
        width: 22px;
        height: 22px;
        margin: 0;
    }

    .match-grid .live-logo:nth-of-type(2) {
        grid-area: 2 / 2;
    }

    .match-grid .live-logo:nth-of-type(3) {
        grid-area: 2 / 4;
    }

    .match-grid .live-score {
        grid-area: 2 / 3;
        margin: 0;
    }

    .match-grid .live-score-num {
        min-width: 26px;
        height: 26px;
        font-size: 14px;
        line-height: 26px;
    }

    .match-grid .live-status {
        grid-area: 3 / 1;
        margin: 0;
    }

    .match-grid .live-see {
        grid-area: 3 / 1 / auto / span 5;
        justify-self: end;
        margin: 0;
    }
}
