/* ============================================================
   PC 前台自适应样式
   与手机端一致的红色主题；投注页两栏在窄屏自动改为上下排列
   ============================================================ */

/* ---------- 页面基础：取消全站 1180 最小宽度 ---------- */
body {
    min-width: 0 !important;
    overflow-x: hidden;
}

/* ---------- 主容器 ---------- */
#gamepage {
    width: 100% !important;
    max-width: 1100px;
    margin: 0 auto 15px;
    padding: 0 12px;
    box-sizing: border-box;
}

#gamepage .open_containers,
#gamepage .lottery_playContainer,
#gamepage .gameBet_left,
#gamepage .gameBet_right,
#gamepage .g_Number_Section {
    box-sizing: border-box;
}

/* ---------- 顶部三块：彩种 / 倒计时 / 开奖号码 ---------- */
.open_containers {
    width: 100% !important;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px;
    margin: 15px 0 0 !important;
}

.open_containers .cz_logo,
.open_containers .cz_daojishi,
.open_containers .cz_openNumb {
    width: auto !important;
    float: none !important;
    margin: 0 !important;
    flex: 1 1 240px;
    min-width: 0;
}

.open_containers .cz_logo {
    flex: 0 0 285px;
}

.open_containers .cz_openNumb {
    flex: 0 0 285px;
}

.open_containers .cz_daojishi {
    flex: 1 1 auto;
    min-width: 300px;
}

.open_containers .cz_logo img {
    max-width: 100%;
    height: auto;
}

.open_containers .cz_openNumb #ssc_winning_sum {
    max-width: 100%;
}

/* ---------- 彩种切换条 ---------- */
.lottery_playContainer {
    width: 100% !important;
}

.lottery_playContainer .system_lottery_box {
    width: 100%;
}

/* ---------- 投注主体：左选号 + 右开奖公告 ---------- */
#gameBet {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.gameBet_left {
    flex: 1 1 auto;
    width: auto !important;
    min-width: 0;
    float: none !important;
    padding: 12px;
}

.gameBet_right {
    flex: 0 0 250px;
    width: 250px !important;
    float: none !important;
    margin-top: 0 !important;
    position: sticky;
    top: 68px;
}

.gameBet_right .right_infsoBlock {
    min-height: 0 !important;
}

/* 开奖公告表格：按容器宽度自适应，避免列被裁掉 */
#gameBet .gameBet_right #fn_getoPenGame {
    width: 100% !important;
    table-layout: fixed;
}

#gameBet .gameBet_right #fn_getoPenGame col {
    width: auto !important;
}

#gameBet .gameBet_right #fn_getoPenGame th,
#gameBet .gameBet_right #fn_getoPenGame td {
    padding: 0 2px !important;
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#gameBet .gameBet_right #fn_getoPenGame th:nth-child(1),
#gameBet .gameBet_right #fn_getoPenGame td:nth-child(1) {
    width: 36%;
}

#gameBet .gameBet_right #fn_getoPenGame th:nth-child(2),
#gameBet .gameBet_right #fn_getoPenGame td:nth-child(2) {
    width: 46%;
}

#gameBet .gameBet_right #fn_getoPenGame th:nth-child(3),
#gameBet .gameBet_right #fn_getoPenGame td:nth-child(3) {
    width: 18%;
}

.g_Number_Section {
    width: 100% !important;
    max-width: 100%;
}

/* ---------- 选号区：方案列表 / 金额汇总 / 操作按钮 不再重叠 ---------- */
#gameBet .gameBet_balls {
    width: 100% !important;
    float: none !important;
    box-sizing: border-box;
}

#gameBet .xiad-left {
    float: none !important;
    width: 100% !important;
    height: auto !important;
    margin: 14px 0 0 !important;
    box-sizing: border-box;
}

#gameBet .xiad-left dl {
    width: 100% !important;
    height: 170px;
    box-sizing: border-box;
}

#gameBet .xiad-left dl dd ul {
    width: 50%;
    min-width: 280px;
    box-sizing: border-box;
}

#gameBet .g_Chase_Section {
    float: none !important;
    width: 100% !important;
    margin: 10px 0 0 !important;
}

#gameBet .xiad-righ {
    float: none !important;
    width: 100% !important;
    height: auto !important;
    clear: both;
    overflow: hidden;
    margin: 12px 0 0 !important;
    text-align: center;
}

#gameBet .xiad-righ ul {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    width: 100% !important;
    height: auto !important;
}

#gameBet .xiad-righ ul li.li22 {
    clear: none !important;
    float: none !important;
    margin: 0 !important;
    flex: 0 0 auto;
}

#gameBet .xiad-righ ul li.li22.li23 {
    margin-left: 0 !important;
}

/* 操作按钮与投注记录之间留出间距 */
#gameBet + .historylist,
.historylist.mt-20 {
    margin-top: 18px !important;
}

/* 暂无投注记录时给表体留出高度，避免表头直接贴住页脚 */
#userBetsListToday:empty {
    height: 56px;
}

/* ---------- 开奖公告（横版，默认收起，点击展开） ---------- */
.x5OpenBar {
    margin: 16px 0 0;
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 6px;
    overflow: hidden;
}

.x5OpenBarHead {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 46px;
    padding: 0 14px;
    cursor: pointer;
    user-select: none;
    box-sizing: border-box;
}

.x5OpenBarHead:hover {
    background: #fafafa;
}

.x5OpenBar.is-open .x5OpenBarHead {
    border-bottom: 1px solid #eee;
}

.x5OpenBarTitle {
    flex: 0 0 auto;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.x5OpenBarTitle::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 14px;
    margin-right: 8px;
    vertical-align: -2px;
    background: #e4393c;
    border-radius: 2px;
}

.x5OpenBarLatest {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 12px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.x5OpenBarLatest em {
    color: #e4393c;
    font-style: normal;
    font-weight: 600;
}

.x5OpenBarLatest span {
    color: #e4393c;
    font-weight: 600;
    letter-spacing: 1px;
}

.x5OpenBarLinks {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #ddd;
}

.x5OpenBarLinks a {
    color: #e4393c;
    text-decoration: none;
}

.x5OpenBarLinks a:hover {
    text-decoration: underline;
}

.x5OpenBarArrow {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #999;
}

.x5OpenBarArrow::after {
    content: '';
    width: 6px;
    height: 6px;
    border-right: 1px solid #999;
    border-bottom: 1px solid #999;
    transform: rotate(45deg) translateY(-2px);
    transition: transform .2s ease;
}

.x5OpenBar.is-open .x5OpenBarArrow::after {
    transform: rotate(-135deg) translateY(-2px);
}

.x5OpenBarBody {
    display: none;
    max-height: 320px;
    overflow: auto;
    padding: 0 14px 12px;
}

.x5OpenBar.is-open .x5OpenBarBody {
    display: block;
}

.x5OpenBarBody table {
    width: 100% !important;
    table-layout: fixed;
}

.x5OpenBarBody table th {
    height: 32px;
    line-height: 32px;
    font-weight: normal;
    color: #333;
    background: #f6f7f9;
    border-bottom: 1px solid #e6e6e6;
}

.x5OpenBarBody table td {
    height: 30px;
    line-height: 30px;
    text-align: center;
    color: #666;
    border-bottom: 1px dashed #ebebeb;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.x5OpenBarBody table td:nth-child(2) {
    color: #ff9600;
    letter-spacing: 1px;
}

.x5OpenBarBody table tr:hover td {
    background: #fafafa;
}

.x5OpenBarBody tbody .x5OpenBarEmpty td {
    height: 48px;
    color: #999;
    background: #fff;
}

@media (max-width: 600px) {
    .x5OpenBarHead {
        gap: 8px;
        padding: 0 10px;
    }

    .x5OpenBarTitle {
        font-size: 13px;
    }

    .x5OpenBarBody {
        padding: 0 10px 10px;
    }
}

/* ---------- 下注记录：横向滚动，避免撑破布局 ---------- */.historylist {
    overflow-x: auto;
}

.historylist .mem-biao {
    min-width: 720px;
}

/* ---------- 中屏 ---------- */
@media (max-width: 1080px) {
    .gameBet_right {
        flex-basis: 250px;
        width: 250px !important;
    }

    .open_containers .cz_logo {
        flex: 0 0 240px;
    }

    .open_containers .cz_openNumb {
        flex: 0 0 270px;
    }

    .open_containers .cz_daojishi {
        flex: 1 1 auto;
        min-width: 280px;
    }
}

/* ---------- 窄屏：右栏下移 ---------- */
@media (max-width: 900px) {
    #gameBet {
        display: block;
    }

    .gameBet_left {
        width: 100% !important;
    }

    .gameBet_right {
        width: 100% !important;
        position: static;
        border-left: 0;
        border-top: 1px solid #ddd;
        margin-top: 12px !important;
    }

    .open_containers {
        display: block;
    }

    .open_containers .cz_logo,
    .open_containers .cz_daojishi,
    .open_containers .cz_openNumb {
        width: 100% !important;
        margin-bottom: 10px !important;
    }
}

/* ---------- 小屏 ---------- */
@media (max-width: 600px) {
    #gamepage {
        padding: 0 8px;    }

    .open_containers {
        padding: 8px;
    }

    .play_select_insert .play_select_tit {
        overflow-x: auto;
        white-space: nowrap;
    }

    .play_select_insert .play_select_tit li {
        float: none;
        display: inline-block;
    }

    .historylist .mem-biao {
        min-width: 640px;
    }
}

/* ---------- 页脚：随视口宽度自适应，三栏均匀排布 ---------- */
.footer {
    width: 100% !important;
}

.footer .container {
    width: 100% !important;
    max-width: 1100px;
    margin: 0 auto !important;
    padding: 0 12px !important;
    box-sizing: border-box;
}

.footer .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
}

.footer .footer_left,
.footer .footer_middle,
.footer .footer_right {
    float: none !important;
    box-sizing: border-box;
    min-width: 0;
}

.footer .footer_left {
    flex: 1 1 240px;
    width: auto !important;
}

.footer .footer_middle {
    flex: 1 1 380px;
    width: auto !important;
    padding-left: 25px;
}

.footer .footer_right {
    flex: 1 1 260px;
    width: auto !important;
    padding-left: 30px;
}

.footer .chongzhi_img_box {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 30px 0 0;
}

.footer .chongzhi_img_box span {
    margin-right: 0;
}

@media (max-width: 900px) {
    .footer .footer_left,
    .footer .footer_middle,
    .footer .footer_right {
        flex: 1 1 100%;
        padding-left: 0;
        border-left: 0;
        margin-bottom: 18px;
    }
}
