/* ABV2 赛事赛程 v3.1 — 高密度卡片排版 (纯白底、致敬 V4、固定靠右靠左队徽) */

.abv2-ms-wrapper {
    width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    font-size: 14px;
    color: #111827;
    /* Tailwind Gray 900 */
    background: #f5f7fa;
    /* 灰底容器匹配 v4 */
    padding: 10px;
    border-radius: 12px;
}

/* ===== 1. 日期选择器 (高级浅色模式，增强层次) ===== */
.ms-datebar {
    background: #f8fafc;
    /* 从纯白改为极浅蓝灰，增加与卡片的对比 */
    border-bottom: 1px solid #e2e8f0;
    border-radius: 12px 12px 0 0;
    margin: -10px -10px 0 -10px;
    padding-top: 5px;
}

.ms-datescroll {
    display: flex;
    overflow-x: auto;
    padding: 10px;
    gap: 10px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.ms-datescroll::-webkit-scrollbar {
    display: none;
}

.ms-dtab {
    flex: 0 0 auto;
    text-align: center;
    padding: 10px 14px;
    border-radius: 12px;
    cursor: pointer;
    color: #64748b;
    min-width: 68px;
    user-select: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
    border: 1px solid transparent;
}

.ms-dtab:hover {
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.ms-dtab.ms-active {
    background: #ffffff;
    color: #2563eb;
    border-color: #dbeafe;
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.1), 0 4px 6px -2px rgba(37, 99, 235, 0.05);
    transform: translateY(-1px);
}

.ms-dtab-w {
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.7;
}

.ms-dtab-d {
    font-size: 15px;
    font-weight: 800;
}

/* ===== 2. 联赛筛选栏 (更具质感的药丸设计) ===== */
.ms-filter-bar {
    background: #ffffff;
    padding: 12px;
    margin: 0 -10px 10px -10px;
    border-bottom: 1px solid #f1f5f9;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.ms-filter-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
}

.ms-filter-scroll::-webkit-scrollbar {
    display: none;
}

.ms-filter-item {
    flex: 0 0 auto;
    padding: 7px 14px;
    background: #f1f5f9;
    color: #475569;
    border-radius: 50px;
    /* 完美药丸 */
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #e2e8f0;
}

.ms-filter-item:hover {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #1e293b;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.ms-filter-item.active {
    background: #10b981;
    color: #ffffff;
    border-color: #059669;
    box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.2);
}

.ms-fcount {
    font-size: 11px;
    background: rgba(0, 0, 0, 0.06);
    padding: 1px 6px;
    border-radius: 8px;
    font-weight: 500;
}

.ms-filter-item.active .ms-fcount {
    background: rgba(255, 255, 255, 0.25);
}

/* ===== 核心布局：卡片式列表 (微调阴影) ===== */
#abv2-ms-match-list-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ms-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    border: 1px solid #edf2f7;
    border-radius: 12px;
    padding: 12px 18px;
    min-height: 60px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    transition: all 0.3s ease;
}

.ms-card:hover {
    border-color: #10b981;
    /* 原谅绿 hover, 同 v4 */
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.08);
    transform: translateY(-1px);
}

/* 状态色修饰 */
.ms-card.is-live {
    border-left: 3px solid #ef4444;
}

/* 红边强调进行中 */


/* === 1. Meta 区 (固定宽度) === */
.ms-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 220px;
    flex-shrink: 0;
}

.ms-time {
    font-size: 14px;
    font-weight: 700;
    color: #111827;
}

.ms-status {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 600;
    white-space: nowrap;
    line-height: 1;
}

/* 状态药丸 (Ported from V4 semantic colors) */
.ms-status.ms-ns {
    background: #eff6ff;
    color: #3b82f6;
}

/* 浅蓝 未开赛 */
.ms-status.ms-pst {
    background: #fef3c7;
    color: #d97706;
}

/* 橙黄 延期/取消/中断 */
.ms-status.ms-ft {
    background: #f3f4f6;
    color: #6b7280;
}

/* 浅灰 已结束 */
.ms-status.ms-live {
    background: #fee2e2;
    color: #dc2626;
    animation: msblink 1.5s infinite;
}

/* 浅红 进行中 */
@keyframes msblink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: .6;
    }
}

.ms-league {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    font-weight: 600;
    color: #4b5563;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ms-ico-s {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    object-fit: contain;
}


/* === 2. 比赛核心区 (流式扩展, 水平挤压) === */
.ms-match {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    max-width: 600px;
    margin: 0 20px;
}

/* 球队区：利用 !important 阻止外部样式影响 */
.ms-team {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    width: 40% !important;
}

/* 主队强制靠右。使用 flex-end 会把名称和Logo推向中心比分侧 */
.ms-team.home {
    justify-content: flex-end !important;
    text-align: right !important;
}

/* 客队强制靠左。使用 flex-start 会把Logo和名称拉向中心比分侧 */
.ms-team.away {
    justify-content: flex-start !important;
    text-align: left !important;
}

/* Logo 尺寸固定，绝对不会放大 */
.ms-logo {
    width: 28px;
    height: 28px;
    object-fit: contain;
    flex-shrink: 0;
    margin: 0 !important;
}

/* 队名不允许伸展占据空位，而是固定在 Logo 旁边 */
.ms-name {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 140px;
    flex: 0 1 auto !important;
    width: auto !important;
    margin: 0 !important;
}


/* 比分框区 */
.ms-score-box {
    width: 20%;
    min-width: 70px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.ms-score-main {
    font-size: 20px;
    font-weight: 800;
    color: #111827;
    line-height: 1;
    letter-spacing: 1px;
}

.ms-score-main.ms-vs {
    color: #d1d5db;
    font-size: 17px;
    font-weight: 700;
}

.ms-score-box.ms-live .ms-score-main {
    color: #dc2626;
}

/* 半场/角球 */
.ms-score-sub {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 3px;
}

.ms-score-ht,
.ms-score-cn {
    font-size: 11px;
    font-weight: 500;
}

.ms-score-ht {
    color: #9ca3af;
}

.ms-score-cn {
    color: #f59e0b;
}


/* === 3. 附加信息区 (操作区) === */
.ms-extra {
    flex-shrink: 0;
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 4px;
}


/* =========================================
   移动端响应式 (双行卡片) 
   ========================================= */
@media (max-width: 768px) {
    .abv2-ms-wrapper {
        padding: 4px;
        border-radius: 8px;
    }

    .ms-datebar {
        margin: -4px -4px 10px -4px;
        border-radius: 8px 8px 0 0;
    }

    .ms-card {
        flex-direction: column;
        align-items: stretch;
        padding: 10px 12px;
        gap: 12px;
        min-height: auto;
    }

    /* 上半部分：Meta */
    .ms-meta {
        width: 100%;
        border-bottom: 1px dashed #e5e7eb;
        padding-bottom: 8px;
        justify-content: space-between;
        /* 拉开两边 */
    }

    .ms-league {
        margin-left: -5px;
        /* 把联赛标签往左微调，靠近时间 */
        flex: 1;
        padding-left: 10px;
    }

    /* 下半部分：对阵 */
    .ms-match {
        width: 100%;
        margin: 0;
        justify-content: space-between;
    }

    /* 为了保证极窄屏幕不换行，稍微缩小文字和 Logo */
    .ms-team {
        width: auto !important;
        flex: 1 !important;
        gap: 6px !important;
    }

    /* 移动端两端对齐防止溢出 */
    .ms-team.home {
        justify-content: flex-end !important;
    }

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

    .ms-name {
        font-size: 13px;
        max-width: 90px;
    }

    .ms-logo {
        width: 22px;
        height: 22px;
    }

    .ms-score-box {
        width: auto;
        padding: 0 10px;
    }

    .ms-score-main {
        font-size: 18px;
    }

    .ms-score-main.ms-vs {
        font-size: 15px;
    }

    .ms-extra {
        width: 100%;
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        border-top: 1px dashed #e5e7eb;
        padding-top: 8px;
        margin-top: -4px;
    }

    .ms-extra .abv2-ssr-wrapper {
        margin-left: auto;
    }

    /* 隐藏移动端的 ID */
}

/* ===== 空状态与 Loading ===== */
.ms-empty {
    padding: 40px;
    text-align: center;
    color: #9ca3af;
    background: #fff;
    border-radius: 8px;
}

.ms-skel {
    background: linear-gradient(90deg, #f3f4f6 25%, #f9fafb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
    height: 52px;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}