:root {
    /* 2026 FIFA 官方顶奢色彩矩阵 */
    --bg-color: #040714;
    --card-bg: rgba(10, 15, 36, 0.88);
    --item-bg: #94a3b9;
    --accent-green: #515d70;
    --accent-green-dim: rgb(81 93 112);
    --text-main: #ffffff;
    --text-muted: #515d70;
    --text-live: #ff2a5f;
    /* 直播红 */
}

/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

h2,
.badge-live,
.match-teams,
.btn,
.score-display {
    font-family: 'Poppins', sans-serif;
}

html {
    width: 100%;
    -webkit-text-size-adjust: 100%;
}

/* iframe 内嵌：随父容器宽度伸缩，大屏锁定 1280 */
body {
    background: url(/event/assets/betasia/images/fifa-live/bg-1.png) no-repeat center center;
    background-size: cover;
    background-position: center;
    background-attachment: scroll;
    color: var(--text-main);
    width: 100%;
    margin: 0;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.embed-root {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    box-sizing: border-box;
    min-width: 0;
}

@media (min-width: 1280px) {
    .embed-root {
        width: 1280px;
        /* background: #fff; */
        padding: 0px;
        padding-bottom: 10px;
    }

    body {
        padding: 20px 0;
    }
}



.fifa-header-banner {
    width: 100%;
    min-width: 0;
    padding: 12px 20px;
    border-bottom: 1px solid rgba(103, 255, 0, 0.15);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    background: url(/event/assets/betasia/images/fifa-live/header-bg.jpg) no-repeat center center;
    background-size: cover;
    border-radius: 10px 10px 0px 0px;
}

.fifa-wc-logo {
    height: 72px;
    width: auto;
    display: block;
    flex-shrink: 0;
}

.fifa-wc-title-block {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    line-height: 1.15;
    padding: 6px 14px;
    border-radius: 4px;
    min-width: 0;
    max-width: 100%;
}

.fifa-wc-main-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 900;
    font-size: 28px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #ffffff;
    white-space: nowrap;
}

.fifa-wc-hosts {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0 10px;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-top: 4px;
    justify-content: center;
    margin: 0px auto;
}

.host-canada {
    color: #e31b23;
}

.fifa-wc-hosts .host-sep {
    color: #ffffff94;
    font-weight: 400;
}

.host-mexico {
    color: #8ee6ca;
}

.host-usa {
    color: #96b9d9;
}

/* ==================== PC端极致细节大厂标准布局 ==================== */
.dashboard {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr);
    width: 100%;
    min-width: 0;
    background-color: rgb(217 223 232);
    backdrop-filter: blur(25px);
    border-radius: 0px 0px 24px 24px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
    align-items: start;
    container-type: inline-size;
    container-name: fifa-dash;
    padding: 15px;
    box-shadow: 0px 5px 5px 2px #0000006e;
}

/* 左侧：视频播放器容器 */
.stream-container {
    position: relative;
    background-color: #000;
    aspect-ratio: 16 / 9;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: auto;
}

/* 响应式 YouTube / iframe 16:9 */
.video-responsive {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.video-responsive iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}


/* SABA popup modals (Bootstrap) */
.saba-modal-msg {
    color: #333;
    font-size: 15px;
    line-height: 1.5;
    text-align: center;
    padding: 24px 22px 8px;
}

.saba-modal-footer {
    justify-content: center;
    border-top: none;
}

.saba-modal-btn {
    background: #4fb792;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 26px;
    font-weight: 700;
    cursor: pointer;
}

    .saba-modal-btn:hover {
        background: #3da27f;
    }

/* Parent-controlled buttons overlaid on the player (chat + fullscreen) */
.player-actions {
    display: none;
    position: absolute;
    bottom: 12px;
    right: 12px;
    z-index: 5;
    /*display: flex;*/
    gap: 8px;
}

.fs-btn {
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

    .fs-btn:hover {
        background: rgba(0, 0, 0, 0.85);
    }

    /* chat button "on" state */
    .fs-btn.active {
        background: var(--accent-green, #4fb792);
    }

.video-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.65)), url('https://images.unsplash.com/photo-1508098682722-e99c43a406b2?auto=format&fit=crop&w=1200&q=80') center/cover no-repeat;
    z-index: 1;
    transition: background-image 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
    .video-placeholder .livestream-banner {
        display: block;
        width: 100%;
        height: auto;
    }

    .video-placeholder #streamerFrame {
        display: none;
    }
.player-top-bar {
    position: relative;
    z-index: 2;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.85), transparent);
}

.left-badges {
    display: flex;
    gap: 10px;
    align-items: center;
}

.badge-live {
    background-color: var(--text-live);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 11px;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    animation: live-glow 2s infinite ease-in-out;
}

.badge-viewers {
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.badge-quality {
    background-color: var(--accent-green);
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.5px;
    ;
}

.player-controls {
    position: relative;
    z-index: 2;
    padding: 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95), transparent);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.timeline-container {
    width: 100%;
    display: flex;
    align-items: center;
}

.timeline {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 5px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
    cursor: pointer;
}

.timeline::-webkit-slider-runnable-track {
    background: linear-gradient(to right, var(--accent-green) 95%, rgba(255, 255, 255, 0.2) 95%);
    height: 5px;
    border-radius: 5px;
}

.timeline::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    margin-top: -4.5px;
    box-shadow: 0 0 10px var(--accent-green);
}

.control-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.control-left,
.control-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.control-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.2s, color 0.2s;
}

.control-btn:hover {
    color: var(--accent-green);
    transform: scale(1.15);
}

.time-display {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

/* 右侧：侧边赛事栏，高度 = 左侧 16:9 视频实际高度 */
.sidebar {
    padding: 0px 22px 25px 25px;
    display: flex;
    flex-direction: column;
    border-left: 1px solid rgba(255, 255, 255, 0.05);
    width: 100%;
    min-width: 0;
    max-height: calc(100cqw * (1.8 / 2.8) * 9 / 16);
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
}

/* 极简自定义精细滚动条 */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--item-bg);
    border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--item-bg);
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
    flex-shrink: 0;
}

.sidebar-header i {
    color: var(--accent-green);
    font-size: 22px;
    animation: spin-node 12s infinite linear;
}

.sidebar-header h2 {
    font-size: 22px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #515d70;
}

.match-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    /* 卡片间距拉开，视觉呼吸感极佳 */
}

/* 赛事卡片基础样式 */
.match-card {
    background-color: rgb(226 232 241);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 16px;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    width: 100%;
    cursor: pointer;
    box-shadow: 1px 1px 6px 3px #ccd3df;
}

.match-card:hover {
    transform: translateY(-2px);
    border-color: rgb(137 143 153 / 60%);
    background-color: rgb(148 163 185);
}

.match-card.active {
    background-color: var(--item-bg);
    box-shadow: inset 0 0 20px rgba(103, 255, 0, 0.03), 0 8px 25px rgba(0, 0, 0, 0.3);
}

.match-meta {
    display: flex;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    gap: 6px;
}

.meta-time {
    color: var(--text-muted);
}

.match-card.active .meta-status {
    color: #4fb792;
    font-weight: 800;
    background: #dafbe6;
    padding: 0px 5px;
    border-radius: 5px;
}

.match-card.finished .meta-status {
    color: var(--text-muted);
    background: #c7c7c7;
}

.match-card.upcoming .meta-status {
    color: #00bfff;
    background: #c3e4ef;
}

.match-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.match-teams {
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    color: #3c4048;
}

.score-display {
    color: #131b38;
    margin: 0 4px;
    font-weight: 900;
}

span.meta-status {
    color: #4fb792;
    font-weight: 800;
    background: #dafbe6;
    padding: 0px 5px;
    border-radius: 5px;
}

.blink-colon {
    animation: score-blink 1s cubic-bezier(0.4, 0, 1, 1) infinite;
    display: inline-block;
    padding: 0 1px;
    text-shadow: 0 0 6px var(--accent-green);
}

.match-card.finished .score-display {
    color: #131b38;
}

.match-card.finished .blink-colon {
    animation: none;
    text-shadow: none;
}

/* 核心防切断：按钮组禁止收缩弹性 */
.actions-group {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.btn {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    border: none;
    transition: all 0.23s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.btn-watching {
    background: #e2e8f1;
    color: var(--accent-green);
    cursor: default;
}

.btn-switch {
    background-color: var(--accent-green);
    color: #fff;

}

.btn-switch:hover {
    background-color: #515d70;
    transform: scale(1.05);

}

.btn-remind {
    background-color: rgb(81 93 112);
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.btn-remind:hover {
    background-color: rgba(255, 255, 255, 0.12);
}

.btn-highlights {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-main);
    background-color: var(--accent-green);
    color: #ffffff;
}

.btn-highlights:hover {
    background-color: rgba(255, 255, 255, 0.06);
}

/* 动画帧 */
@keyframes live-glow {

    0%,
    100% {
        box-shadow: 0 0 6px rgba(255, 42, 95, 0.4);
        opacity: 0.9;
    }

    50% {
        box-shadow: 0 0 16px rgba(255, 42, 95, 0.8);
        opacity: 1;
    }
}

@keyframes score-blink {

    0%,
    100% {
        opacity: 1;
        filter: brightness(1.2);
    }

    50% {
        opacity: 0.1;
        filter: brightness(0.5);
    }
}

@keyframes spin-node {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* iframe 中等宽度：单列流式，宽度跟父容器 */
@media (max-width: 1279px) {
    body {
        padding: 0;
    }

    .embed-root {
        width: 100%;
        max-width: none;
    }

    .fifa-wc-main-title {
        font-size: clamp(13px, 3.2vw, 28px);
        white-space: normal;
    }

    .fifa-wc-logo {
        height: clamp(40px, 10vw, 72px);
    }

    .fifa-wc-title-block {
        flex: 1 1 auto;
    }

    /* 768–1279：双栏时视频随宽度缩小，右侧赛事始终可见 */
    .dashboard {
        grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    }

    .sidebar {
        max-height: calc(100cqw * (1.35 / 2.35) * 9 / 16);
    }

    .player-top-bar,
    .player-controls {
        padding: 12px 14px;
    }

    .control-left,
    .control-right {
        gap: 10px;
    }

    .control-btn {
        font-size: 14px;
    }

    .badge-viewers {
        font-size: 10px;
        padding: 5px 10px;
    }

    .badge-quality {
        font-size: 10px;
        padding: 5px 8px;
    }

    .time-display {
        font-size: 11px;
    }

    .sidebar {
        padding: 16px 12px 16px 14px;
    }

    .sidebar-header h2 {
        font-size: 18px;
    }

    .match-card {
        padding: 12px 10px;
    }

    .match-teams {
        font-size: 13px;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .match-details {
        min-width: 0;
    }
}

/* ==================== 💎 MOBILE：≤767px 右侧赛事叠到视频下方 💎 ==================== */
@media (max-width: 767px) {
    body {
        padding: 0;
    }

    .dashboard {
        grid-template-columns: 1fr;
        width: 100%;
        border-radius: 0;
        border: none;
        box-shadow: none;
        background-color: transparent;
        overflow: visible !important;
        padding: 0px;
        /* 开启对 sticky 限制松绑 */
    }

    /* 移动端原生级“真吸顶吸住”机制 */
    .stream-container {
        position: -webkit-sticky;
        position: sticky;
        top: 0;
        z-index: 9999;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        aspect-ratio: 16 / 9;
        height: auto;
        ;
    }

    /* 列表层自然平铺，随手势滚动从视频下方穿过 */
    .sidebar {
        border-left: none;
        background-color: rgb(217 223 232);
        padding: 14px 10px;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        height: auto;
        max-height: none !important;
        overflow-y: visible !important;
    }

    .sidebar-header {
        margin-bottom: 14px;
        padding-left: 4px;
    }

    .sidebar-header h2 {
        font-size: 18px;
    }

    .match-list {
        gap: 8px;
    }

    /* 移动端赛事严格 1 排单行强制流 */
    .match-card {
        padding: 12px 10px;
        gap: 4px;
    }

    .match-details {
        display: flex;
        flex-direction: row !important;
        /* 坚决保持单排水平横移 */
        justify-content: space-between;
        align-items: center;
        gap: 8px;
        width: 100%;
        flex-wrap: nowrap !important;
        /* 强制不换行 */
    }

    .match-teams {
        font-size: 13px;
        flex-grow: 1;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        display: flex;
        align-items: center;
        gap: 4px;
    }

    .score-display {
        margin: 0 2px;
        font-size: 14px;
    }

    /* 右侧动作按钮组防挤压 */
    .actions-group {
        display: flex;
        gap: 6px;
        flex-shrink: 0 !important;
        /* 强制按钮抗挤压完整展现 */
    }

    .btn {
        padding: 6px 12px;
        font-size: 10px;
        border-radius: 6px;
        height: 28px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .fifa-header-banner {
        top: 0;
        z-index: 10000;
        width: 100%;
        margin-bottom: 0;
        backdrop-filter: blur(15px);
        padding: 8px 12px;
        border-bottom: 1px solid rgba(103, 255, 0, 0.2);
        gap: 12px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
        border-radius: 0px 0px 0px 0px;
    }

    .fifa-wc-logo {
        height: 48px;
    }

    .fifa-wc-title-block {
        padding: 4px 10px;
        justify-content: center;
        align-items: center;
    }

    .fifa-wc-main-title {
        font-size: 18px;
        white-space: normal;
        text-align: center;
    }

    .fifa-wc-hosts {
        font-size: 9px;
        gap: 0 6px;
        margin-top: 2px;
    }



}

/* 针对 iPhone SE 等超极限超窄屏手机的流式缩放容错 */
@media (max-width: 360px) {
    .match-teams {
        font-size: 11px;
    }

    .btn {
        padding: 4px 8px;
    }
}