* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft YaHei", sans-serif;
}

:root {
    --main-white: #ffffff;
    --sub-black: #222222;
    --gray-100: #f7f7f7;
    --gray-200: #eeeeee;
    --gray-300: #dddddd;
    --gray-600: #666666;
    --gray-900: #222222;
    --main-bg: #f7f4f0;
    --common-radius: 12px; /* 统一圆角变量 */
}

body {
    background-color: var(--main-white);
    color: var(--gray-900);
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
}

/* 抽屉展开：锁定下方页面滚动（保留抽屉自身滚动） */
html.mc-drawer-lock,
body.mc-drawer-lock {
    overflow: hidden !important;
    height: 100%;
    touch-action: none !important;
    overscroll-behavior: none;
}

body.mc-drawer-lock .left-nav {
    touch-action: pan-y !important;
}

/* 遮罩层 */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    /* background: url('{% static 'AdminManage/image/bg_x.png' %}') center no-repeat;*/
}

.sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* 左侧固定导航（PC ≥1200px 显示） */
.left-nav {
    width: 260px;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    background-color: var(--main-white);
    border-right: 1px solid var(--gray-200);
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    z-index: 999;
    transition: transform 0.3s ease;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--gray-300) transparent;
}
.left-nav::-webkit-scrollbar { width: 6px; }
.left-nav::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 3px; }
.left-nav::-webkit-scrollbar-thumb:hover { background: var(--gray-600); }
.left-nav::-webkit-scrollbar-track { background: transparent; }

/* 中等屏幕（≤1199px）：侧边栏默认隐藏，宽度 220px */
@media (max-width: 1199px) {
    .left-nav {
        width: 220px;
        transform: translateX(-100%);
        top: -50px;
        height: calc(100vh + 50px);
        padding-top: 60px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch; /* iOS 惯性滚动 */
    }

    .left-nav.show {
        transform: translateX(0);
    }

    .right-content {
        margin-left: 0 !important;
        width: 100% !important;
    }

    /* 左侧栏隐藏时显示展开按钮 */
    .expand-btn {
        display: flex !important;
    }
}

/* 手机端（≤768px）：侧边栏宽度 240px */
@media (max-width: 768px) {
    .left-nav {
        width: 240px;
    }
}

/* 展开按钮（筛选栏右侧，仅左侧栏隐藏时显示）- 带动画的三杠样式 */
.expand-btn {
    display: none;
    width: 36px;
    height: 36px;
    background: transparent;
    border-radius: 6px;
    border: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* 展开按钮激活态（变成叉号） */
.expand-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.expand-btn.active span:nth-child(2) {
    opacity: 0;
}

.expand-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.expand-btn span {
    width: 18px;
    height: 2px;
    background: var(--gray-900);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: center;
    will-change: transform, opacity;
}

.left-nav .logo-box {
    text-align: center;
    padding: 10px 0 20px 0;
    border-bottom: 1px solid var(--gray-200);
}

.left-nav .logo-box h2 {
    font-size: 20px;
    margin-bottom: 8px;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
}

.left-nav .logo-box h2::before {
    content: none;
}

.left-nav .logo-img {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    object-fit: contain;
}

.left-nav .logo-box p {
    font-size: 12px;
    color: var(--gray-600);
}

.left-nav .nav-menu,
.left-nav .sb-menu {
    flex: 1;
    padding: 20px 16px;
}

.left-nav .nav-menu ul,
.left-nav .sb-menu ul {
    list-style: none;
}

.left-nav .nav-menu li,
.left-nav .sb-menu li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    font-size: 15px;
    cursor: pointer;
    padding: 12px 16px;
    border-radius: 8px;
    background-color: transparent;
    transition: all 0.2s ease;
}

.left-nav .nav-menu li:hover,
.left-nav .sb-menu li:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.left-nav .nav-menu li.active,
.left-nav .sb-menu li.active {
    background-color: var(--gray-100);
}

/* 移除原来的伪元素图标样式 */
.left-nav .nav-menu li::before,
.left-nav .sb-menu li::before {
    display: none;
}

/* 新增layui图标样式 */
.left-nav .layui-icon {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

.left-nav .user-center {
    padding: 20px 16px;
    border-top: 1px solid var(--gray-200);
}

.left-nav .user-center .uc-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    margin-bottom: 12px;
}
.left-nav .user-center p {
    font-size: 15px;
    margin-bottom: 0;
    font-weight: 500;
    padding-left: 16px;
    white-space: nowrap;
}
/* 「个人中心」标题右侧：灰色「会员权益」文字链接 */
.left-nav .user-center .uc-vip-link {
    font-size: 13px;
    font-weight: 400;
    color: #666;
    padding-right: 16px;
    white-space: nowrap;
    flex: 0 0 auto;
}
.left-nav .user-center .uc-vip-link .uc-dash {
    color: #999;
}
.left-nav .user-center .uc-vip-link:hover {
    color: var(--primary);
}

.left-nav .user-center .user-item {
    font-size: 14px;
    margin-bottom: 8px;
    cursor: pointer;
    color: var(--gray-600);
    padding: 10px 16px;
    border-radius: 8px;
    background-color: transparent;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s ease;
}

.left-nav .user-center .user-item:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.left-nav .user-center .user-item.logout-item {
    color: #e54d42;
}

.left-nav .user-center .user-item.logout-item:hover {
    background-color: rgba(229, 77, 66, 0.08);
}

/* 右下角固定圆形返回按钮 */
.mc-float-back {
    position: fixed;
    right: 58px;
    bottom: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #222222;
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 6px 18px rgba(34, 34, 34, 0.3);
    transition: all 0.2s;
    opacity: 0.5;
}

.mc-float-back .layui-icon {
    font-size: 22px;
    width: 22px;
    color: #fff;
}

.mc-float-back:hover {
    background: #000;
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(34, 34, 34, 0.4);
}

@media (max-width: 1199px) {
    .mc-float-back {
        right: 24px;
    }
}

.left-nav .footer-info {
    padding: 15px 20px;
    text-align: center;
    font-size: 12px;
    color: var(--gray-600);
    border-top: 1px solid var(--gray-200);
}

.left-nav .footer-info .footer-icp {
    margin-top: 6px;
}

.left-nav .footer-info .footer-icp a {
    color: var(--gray-600);
    text-decoration: none;
}

.left-nav .footer-info .footer-icp a:hover {
    color: var(--primary, #1e9fff);
    text-decoration: underline;
}

/* 右侧内容 */
.right-content {
    margin-left: 260px;
    width: calc(100% - 260px);
    padding: 0;
    background-color: var(--main-bg);
    min-height: 100vh;
    /* 给非筛选栏页面预留顶部间距 */
    padding-top: 16px;
}

/* 有顶部筛选栏的页面：通栏白条贴顶，容器顶部间距归零 */
.right-content:has(.filter-bar) {
    padding-top: 0;
}

/* 顶部筛选栏：通栏白条，左右100%宽度，吸顶 top:0，高度62px */
.filter-bar {
    position: sticky;
    top: 0;
    z-index: 98;
    display: flex;
    align-items: center;
    height: 62px;
    padding: 0 16px;
    width: 100%;
    margin: 0;
    background-color: var(--main-white); /* 白色背景 */
    background: var(--main-white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* 栏目滚动区：栏目过多时只在此区域内横向滑动，不影响右侧按钮 */
.filter-scroll {
    flex: 1;
    min-width: 0;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap; /* 栏目不换行 */
    overflow-x: auto; /* 栏目过多时横向滑动查看 */
    scrollbar-width: none; /* 隐藏滚动条 */
    -ms-overflow-style: none;
}

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

/* 展开按钮固定容器：白色，与筛选栏同高，按钮不随栏目横向滚动；
   宽度与按钮一致，右边缘紧贴筛选栏右内边，保证与左侧 logo 距屏幕边缘的距离对称 */
.filter-btn-anchor {
    width: 36px;
    height: 62px;
    flex-shrink: 0;
    background-color: var(--main-white); /* 白色背景 */
    background: var(--main-white);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* PC端筛选栏适配 */
@media (min-width: 1200px) {
    .filter-bar {
        margin-left: 0;
        margin-right: 0;
        width: 100%;
    }

    /* PC端侧边栏常显，无需展开按钮，隐藏其容器 */
    .filter-btn-anchor {
        display: none;
    }
}

/* 移动端适配筛选栏间距 */
@media (max-width: 768px) {
    .filter-bar {
        padding: 0 12px;
        top: 0;
        margin: 0;
        width: 100%;
        transition: transform 0.3s ease;
    }

    /* 移动端：顶部导航条随滚动隐藏（下滑收起）/ 显示（上滑展开、顶部固定） */
    .filter-bar.nav-hidden {
        transform: translateY(-100%);
    }

    /* 移动端右侧内容容器同步调整padding-top */
    .right-content {
        padding-top: 16px;
    }
}

/* 平板端筛选栏适配 */
@media (min-width: 769px) and (max-width: 1199px) {
    .filter-bar {
        margin: 0;
        width: 100%;
    }
}

/* 筛选按钮样式调整 */
.filter-btn {
    padding: 8px 16px;
    border: none; /* 移除原有边框 */
    background-color: transparent; /* 透明背景 */
    border-radius: 25px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--gray-900); /* 默认文字颜色 */
    flex-shrink: 0; /* 横向滚动时不被压缩 */
    white-space: nowrap;
}

.filter-btn.active,
.filter-btn:hover {
    background-color: var(--gray-900);
    color: white;
    border-color: transparent; /* 移除激活态边框 */
}

/* 顶部筛选栏左侧logo：仅手机端显示 */
.filter-logo {
    display: none;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    object-fit: contain;
    border-radius: 6px;
    cursor: pointer;
}

@media (max-width: 768px) {
    .filter-logo {
        display: block;
    }
}

/* 世界杯介绍 */
.worldcup-intro {
    text-align: left;
    padding: 30px 30px;
    background: var(--main-bg);
    margin: 0;
    position: relative;
    box-shadow: none;
    /* 调整上边距，避开筛选栏（筛选栏现在margin-bottom:16px，此处无需额外top） */
    margin-top: 0;
}

.worldcup-intro h3 {
    font-size: 32px;
    margin-bottom: 16px;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.2;
    transform: translateY(10px);
}

/* 今日比赛统计数：上半黑色 + 下半深灰色（总高度不变） */
.worldcup-intro h3 .jc-count-badge {
    display: inline-block;
    background: linear-gradient(to bottom, #000 0%, #000 50%, #3f3f46 50%, #3f3f46 100%);
    color: #fff;
    border-radius: 8px;
    padding: 0 8px;
    margin: 0;
    line-height: 1.3;
    vertical-align: top;
    margin-top: -4px;
}

.worldcup-intro p {
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-600);
    max-width: 800px;
    text-align: left;
    margin: 0;
}

/* 今日已结束比赛结果统计 */
.jc-result-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    margin-top: 10px;
}
.jc-result-stats .jc-stat-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: var(--gray-500);
    padding: 2px 10px;
    border-radius: 5px;
    background: #fff;
    border: 1px solid var(--gray-200);
}
.jc-result-stats .jc-stat-item b {
    font-size: 14px;
    font-weight: 700;
}
.jc-stat-win b,
.jc-stat-lose b,
.jc-stat-draw b { color: #9ca3af; }

/* 卡片容器 - 保证和筛选栏右对齐 */
.match-card-box {
    padding: 10px 30px 40px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    background-color: var(--main-bg);
    position: relative;
    z-index: 1;
}

/* 赛事卡片 - 使用统一圆角变量 */
.match-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--common-radius); /* 12px圆角 */
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease;
}

.match-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.09);
}

.card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    cursor: pointer;
}

.team {
    display: flex;
    align-items: center;
    gap: 10px;
}

.team-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.team-name {
    font-size: 15px;
    font-weight: 500;
}

.vs {
    font-size: 14px;
    color: var(--gray-900);
    font-weight: bold;
}

.vs div {
    font-size: 12px;
    font-weight: normal;
    text-align: center;
    color: #999;
}

.match-detail {
    font-size: 12px;
    color: var(--gray-600);
    line-height: 1.5;
    margin-bottom: 16px;
    border-top: 1px var(--gray-200) solid;
    padding-top: 16px;
}

.match-detail span {
    display: block;
    margin-bottom: 4px;
}

.card-middle {
    margin: 16px 0;
}

.guess-title {
    font-size: 14px;
    margin-bottom: 10px;
    font-weight: 500;
}

.guess-btns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.guess-btn {
    padding: 10px;
    border: 0.8px solid var(--gray-200);
    border-radius: 6px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.guess-btn:hover {
    background-color: var(--gray-100);
}

.guess-btn span {
    font-size: 11px;
    color: var(--gray-600);
    margin-top: 4px;
}

.card-bottom {
    padding-top: 16px;
    border-top: 1px solid var(--gray-200);
}

.hot-point {
    font-size: 13px;
    margin-bottom: 8px;
}

.predict {
    font-size: 12px;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.detail-btn {
    font-size: 12px;
    color: var(--gray-900);
    cursor: pointer;
    font-weight: 500;
}

/* ===================== 响应式 ===================== */
/* 手机（≤768px）：卡片单列 */
@media (max-width: 768px) {
    .worldcup-intro {
        padding: 24px 16px;
        margin-top: 0;
    }

    .worldcup-intro h3 {
        font-size: 24px;
    }

    .match-card-box {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 0 16px 30px; /* 卡片 margin-top 距离为 0，间距由时间条 margin-bottom 15px 提供 */
    }

    .match-card {
        padding: 20px;
    }
}

/* 平板（769px～1199px）：卡片2列，侧边栏隐藏+展开按钮 */
@media (min-width: 769px) and (max-width: 1199px) {
    .match-card-box {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 标准PC（1200px～1599px）：卡片3列，侧边栏显示，宽度240px */
@media (min-width: 1200px) and (max-width: 1599px) {
    .match-card-box {
        grid-template-columns: repeat(3, 1fr);
    }
    .left-nav {
        width: 240px;
    }
    .right-content {
        margin-left: 240px;
        width: calc(100% - 240px);
    }
}

/* 大屏PC（≥1600px）：卡片4列 */
@media (min-width: 1600px) {
    .match-card-box {
        grid-template-columns: repeat(4, 1fr);
    }
}