/* 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;
    }
}
/* v27.80：卡内入口按钮样式（原站 abv2-match-schedule 页内联样式整段移植） */
.abv2-ssr-open-modal-btn { background: linear-gradient(135deg, #04241a 0%, #064e3b 100%); color: #fde68a; border: 1px solid rgba(253, 230, 138, 0.28); padding: 4px 12px; border-radius: 999px; cursor: pointer; font-size: 11.5px; font-weight: 700; transition: all 0.2s; white-space: nowrap; height: 28px; line-height: 18px; margin: 0; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 3px 10px rgba(4, 36, 26, 0.16); }
.abv2-ssr-open-modal-btn[data-balance="0"] { background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%); color: #92400e; border-color: rgba(217, 119, 6, 0.34); box-shadow: none; }
.abv2-ssr-open-modal-btn:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.06); }
.abv2-ssr-open-modal-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.abv2-ssr-login-btn { background: #ecfdf5; color: #047857; border: 1px solid rgba(5, 150, 105, 0.28); padding: 4px 12px; border-radius: 999px; font-size: 11.5px; font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; height: 28px; box-sizing: border-box; transition: all 0.2s; }
.abv2-ssr-login-btn:hover { background: #059669; color: #ffffff; border-color: #059669; }
.abv2-ssr-wrapper { display: inline-flex; align-items: center; justify-content: center; margin: 0; }
