
        /* ===== 全局重置 & 字体 ===== */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        body {
            font-family: 'Segoe UI', Roboto, system-ui, -apple-system, sans-serif;
            background: #0b0e14;
            min-height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
            padding: 20px;
        }
        .game-container {
            max-width: 100%;
            min-height: 100%;
            height: auto;
            border-radius: 0;
            overflow: visible;
            padding: 10px 12px 12px;
            /* 新增：让内部 main-body 的 JS 高度计算更准确 */
            display: flex;
            flex-direction: column;
        }
        .header,
        .carousel-wrap {
            flex: 0 0 auto;
        }
                
        /* ===== 资源加载遮罩 ===== */
        .loading-overlay {
            position: fixed;
            inset: 0;
            z-index: 3000;
            background: rgba(0, 0, 0, 0.9);
            backdrop-filter: blur(8px);
            display: flex;
            justify-content: center;
            align-items: center;
            transition: opacity 0.5s ease;
        }
        .loading-overlay.hidden {
            opacity: 0;
            pointer-events: none;
        }
        .loading-card {
            background: linear-gradient(145deg, #1e2533, #141a24);
            border-radius: 32px;
            padding: 40px 50px;
            border: 1px solid rgba(255, 215, 0, 0.12);
            box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8);
            text-align: center;
            min-width: 320px;
        }
        .loading-spinner {
            width: 48px;
            height: 48px;
            margin: 0 auto 20px;
            border: 4px solid rgba(247, 216, 117, 0.15);
            border-top-color: #f7d875;
            border-radius: 50%;
            animation: spin 0.9s linear infinite;
        }
        @keyframes spin {
            to { transform: rotate(360deg); }
        }
        .loading-text {
            font-size: 18px;
            font-weight: 700;
            color: #f5e6c4;
            margin-bottom: 16px;
            letter-spacing: 1px;
        }
        .loading-bar-wrap {
            width: 100%;
            height: 8px;
            background: rgba(255, 255, 255, 0.06);
            border-radius: 10px;
            overflow: hidden;
            margin-bottom: 12px;
        }
        .loading-bar {
            height: 100%;
            width: 0%;
            background: linear-gradient(90deg, #f7d875, #e8b84a);
            border-radius: 10px;
            transition: width 0.3s ease;
        }
        .loading-sub {
            font-size: 13px;
            color: #887a5a;
            font-variant-numeric: tabular-nums;
        }
        /* ===== 顶部标题栏 ===== */
        .header {
            display: flex;
            flex-wrap: nowrap;          
            align-items: center;
            justify-content: space-between;
            margin-bottom: 18px;
            gap: 8px 12px;
            min-width: 0;
        }
        .title-group {
            display: flex;
            align-items: center;
            gap: 12px;
            flex: 0 1 auto;             /* 可收缩，不溢出 */
            min-width: 0;
        }
        .title-group h1 {
            font-size: 26px;
            font-weight: 700;
            background: linear-gradient(135deg, #f7d875, #f5b342);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            letter-spacing: 1px;
        }
        .title-group .sub {
            font-size: 14px;
            color: #887a5a;
            font-weight: 400;
            background: rgba(255, 215, 0, 0.07);
            padding: 2px 14px;
            border-radius: 30px;
            border: 1px solid rgba(255, 215, 0, 0.12);
        }
        /* ===== 顶部重开按钮 ===== */
        .btn-header-restart {
            font-size: 13px;
            font-weight: 600;
            color: #f7d875;
            background: rgba(247, 216, 117, 0.08);
            border: 1px solid rgba(247, 216, 117, 0.25);
            padding: 4px 14px;
            border-radius: 30px;
            cursor: pointer;
            transition: background 0.2s, transform 0.15s;
            white-space: nowrap;
            flex: 0 0 auto;
        }
        .btn-header-restart:hover {
            background: rgba(247, 216, 117, 0.2);
            transform: scale(1.04);
        }
        .btn-header-restart:active {
            transform: scale(0.96);
        }
        .stats {
            display: flex;
            flex-wrap: nowrap;          /* 关键：内部各项不换行 */
            align-items: center;
            gap: 18px;
            font-size: 14px;
            color: #b8b0a0;
            background: rgba(0, 0, 0, 0.35);
            padding: 8px 20px;
            border-radius: 40px;
            border: 1px solid rgba(255, 255, 255, 0.04);
            flex: 0 1 auto;
            min-width: 0;
            white-space: nowrap;
        }
        .stats span {
            display: flex;
            align-items: center;
            gap: 6px;
        }
        .stats .num {
            color: #f5e6c4;
            font-weight: 600;
            min-width: 24px;
        }
        .stats .highlight {
            color: #f7d875;
        }
        /* ===== 规则触发按钮 ===== */
        .rule-trigger {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 28px;
            height: 28px;
            border-radius: 50%;
            font-size: 18px;
            font-weight: 700;
            color: #f7d875;
            cursor: pointer;
            transition: background 0.2s, transform 0.2s;
            user-select: none;
            background: rgba(247, 216, 117, 0.08);
            margin-left: 4px;
        }
        .rule-trigger:hover {
            background: rgba(247, 216, 117, 0.2);
            transform: scale(1.1);
        }
        .rule-trigger:active {
            transform: scale(0.95);
        }

        /* ===== 规则弹窗 ===== */
        .rule-overlay {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.7);
            backdrop-filter: blur(6px);
            z-index: 1600;
            justify-content: center;
            align-items: center;
            padding: 20px;
            animation: fadeIn 0.3s ease;
        }
        .rule-overlay.active {
            display: flex;
        }
        .rule-card {
            background: linear-gradient(145deg, #1e2533, #141a24);
            border-radius: 40px;
            padding: 40px 48px 36px;
            max-width: 560px;
            width: 100%;
            border: 1px solid rgba(255, 215, 0, 0.1);
            box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8);
            animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
            max-height: 80vh;
            overflow-y: auto;
        }
        .rule-card h2 {
            font-size: 26px;
            color: #f5e6c4;
            text-align: center;
            margin-bottom: 16px;
        }
        .rule-card .rule-content {
            color: #d0c8b8;
            font-size: 16px;
            line-height: 1.7;
        }
        .rule-card .rule-content p {
            margin-bottom: 12px;
        }
        .rule-card .rule-content ul {
            padding-left: 20px;
            margin-bottom: 12px;
        }
        .rule-card .rule-content li {
            margin-bottom: 6px;
        }
        .rule-card .rule-close {
            display: block;
            margin: 20px auto 0;
            padding: 12px 40px;
            border: none;
            border-radius: 40px;
            font-size: 16px;
            font-weight: 700;
            background: linear-gradient(135deg, #f7d875, #e8b84a);
            color: #1a1f2a;
            cursor: pointer;
            transition: transform 0.15s ease;
        }
        .rule-card .rule-close:hover {
            transform: scale(1.04);
        }
        /* ===== 规则弹窗隐藏式滚动条（WebKit） ===== */
        .rule-card::-webkit-scrollbar {
            width: 4px;                 /* 滚动条宽度 */
            background: transparent;    /* 轨道完全透明 */
        }
        .rule-card::-webkit-scrollbar-track {
            background: rgba(255, 255, 255, 0.02); /* 极浅轨道，几乎不可见 */
            border-radius: 10px;
        }
        .rule-card::-webkit-scrollbar-thumb {
            background: rgba(0, 0, 0, 0.25); /* 半透明金色滑块 */
            border-radius: 10px;
            transition: background 0.3s;
        }
        .rule-card::-webkit-scrollbar-thumb:hover {
            background: rgba(0, 0, 0, 0.5);  /* 悬停时加深 */
        }

        /* ===== Firefox 兼容（细滚动条） ===== */
        .rule-card {
            scrollbar-width: thin;          /* 细滚动条 */
            scrollbar-color: rgba(0, 0, 0, 0.25) transparent;
        }
        /* ===== 顶部轮播区 ===== */
        .carousel-wrap {
            position: relative;
            border-radius: 20px;
            overflow: hidden;
            background: #0a0d12;
            margin-bottom: 20px;
            min-height: 90px;
            border: 1px solid rgba(255, 215, 0, 0.08);
            box-shadow: inset 0 0 30px rgba(0,0,0,0.6);
        }
        .carousel-wrap video {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
            opacity: 0.4;
            filter: blur(2px);
        }
        .carousel-content {
            position: relative;
            z-index: 2;
            width: 100%;
            min-height: 90px;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 10px 20px;
        }
        .carousel-text {
            font-size: 32px;
            font-weight: 700;
            color: #f5e6c4;
            text-shadow: 0 0 30px rgba(0,0,0,0.8);
            letter-spacing: 2px;
            transition: all 0.3s;
            text-align: center;
        }
        .carousel-text .highlight {
            color: #f7d875;
        }
        .carousel-text .em {
            color: #ff8a6c;
        }
        @media (max-width: 820px) {
            .carousel-wrap { height: 70px; }
            .carousel-text { font-size: 24px; }
        }
        @media (max-width: 520px) {
            .carousel-wrap { height: 60px; }
            .carousel-text { font-size: 18px; }
            /* ===== 顶部标题栏：单行压缩显示 ===== */
            .header {
                gap: 4px 6px;
                margin-bottom: 8px;
            }
            .title-group {
                gap: 4px;
                min-width: 0;
            }
            .title-group h1 {
                font-size: 14px;
                letter-spacing: 0;
                white-space: nowrap;
            }
            .title-group .sub {
                display: none;          /* 隐藏英文副标题，腾出空间 */
            }
            .btn-header-restart {
                font-size: 10px;
                padding: 3px 8px;
            }
            .stats {
                font-size: 11px;
                padding: 4px 10px;
                gap: 8px;
                overflow: hidden;
            }
            .stats span {
                gap: 3px;
            }
            .stats .num {
                min-width: unset;
            }
            .rule-trigger {
                width: 20px;
                height: 20px;
                font-size: 13px;
                margin-left: 2px;
                flex: 0 0 auto;
            }
        }
        /* ===== 三列主体 ===== */
        .main-body {
            display: flex;
            gap: 20px;
            margin-top: 6px;
            align-items: stretch;
            /* 高度由 JS 动态计算（跟随页面高度），见 updateColumnHeights() */
        }
        .col-left {
            width: 25%;
            min-width: 150px;
            display: flex;
            flex-direction: column;
            min-height: 0;
        }
        .col-center {
            width: 50%;
            display: flex;
            flex-direction: column;
            min-height: 0;
        }
        .col-right {
            width: 25%;
            min-width: 140px;
            display: flex;
            flex-direction: column;
            min-height: 0;
        }

        /* ===== 左侧金额展示板（自适应宽度） ===== */
        .amount-board {
            background: rgba(0,0,0,0.3);
            border-radius: 20px;
            padding: 8px 6px;
            border: 1px solid rgba(255,255,255,0.05);
            height: 100%;
            flex: 1 1 auto;
            min-height: 0;
            min-width: 0;                 /* 允许收缩 */
            width: 100%;
            display: flex;
            flex-direction: column;
            overflow: hidden;             /* 防止内容撑破圆角 */
            /* 关键：声明该容器可被内部元素查询宽度 */
            container-type: inline-size;
            container-name: amountBoard;
        }

        .board-title {
            text-align: center;
            /* 字体随容器宽度自动缩放：容器宽 100px → 3.6px，容器宽 300px → 10.8px，上限 14px */
            font-size: clamp(10px, 4.2cqw, 14px);
            font-weight: 600;
            color: #887a5a;
            letter-spacing: 1px;
            padding-bottom: 8px;
            border-bottom: 1px solid rgba(255,255,255,0.05);
            margin-bottom: 10px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .board-split {
            display: flex;
            flex: 1;
            gap: 4px;
            overflow-y: auto;
            overflow-x: hidden;
            min-height: 0;
            min-width: 0;
            width: 100%;                  /* 撑满父容器宽度 */
        }
        .board-split::-webkit-scrollbar {
            width: 3px;
        }
        .board-split::-webkit-scrollbar-thumb {
            background: #f7d87544;
            border-radius: 10px;
        }

        .board-col {
            flex: 1 1 0;                  /* 严格平分父容器宽度 */
            min-width: 0;                 /* 关键：允许收缩，避免内容撑破 */
            display: flex;
            flex-direction: column;
            gap: 4px;
        }
        .board-col .group-label {
            font-size: clamp(9px, 3.2cqw, 11px);
            font-weight: 600;
            color: #6a6a6a;
            text-align: center;
            padding: 4px 0;
            border-bottom: 1px solid rgba(255,255,255,0.04);
            margin-bottom: 4px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .board-item {
            /* 字号、内边距均随容器宽度自适应 */
            font-size: clamp(9px, 3.6cqw, 13px);
            font-weight: 700;
            color: #000;
            background: #f7d875;
            padding: clamp(2px, 0.9cqw, 4px) clamp(4px, 1.8cqw, 8px);
            border-radius: 6px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 2px;
            transition: opacity 0.3s, background 0.3s;
            font-variant-numeric: tabular-nums;
            border: 1px solid rgba(0,0,0,0.05);
            width: 100%;                  /* 撑满 .board-col 宽度 */
            box-sizing: border-box;
            min-width: 0;
            white-space: nowrap;
            overflow: hidden;
        }
        .board-item > span {
            min-width: 0;
            white-space: nowrap;
            display: block;
        }
        .board-item .box-num {
            font-size: clamp(8px, 2.8cqw, 11px);
            color: #333;
            margin-right: 4px;
        }
        .board-item .amount {
            font-weight: 700;
            color: #000;
        }
        .board-item.dimmed {
            opacity: 0.35;
            background: #a0843a;
            color: #555;
        }
        .board-item.dimmed .box-num,
        .board-item.dimmed .amount {
            color: #444;
        }
        .board-empty {
            color: #4a4a4a;
            font-style: italic;
            font-size: 13px;
            text-align: center;
            padding: 20px 0;
        }
        /* ===== 中间箱子网格【图片箱子改造】 ===== */
        /* 高度跟随页面高度，内容显示不下时出现“隐藏式”细滚动条 */
        .col-center .grid-wrap {
            margin-bottom: 14px;
            flex: 1 1 auto;
            min-height: 0;
            overflow-y: auto;
            overflow-x: hidden;
            overscroll-behavior: contain;
            -webkit-overflow-scrolling: touch;
            /* Firefox：细滚动条 */
            scrollbar-width: thin;
            scrollbar-color: rgba(247, 216, 117, 0.25) transparent;
        }
        /* WebKit / Chromium 隐藏式滚动条 */
        .col-center .grid-wrap::-webkit-scrollbar {
            width: 4px;
            background: transparent;
        }
        .col-center .grid-wrap::-webkit-scrollbar-track {
            background: transparent;
        }
        .col-center .grid-wrap::-webkit-scrollbar-thumb {
            background: rgba(247, 216, 117, 0.25);
            border-radius: 10px;
        }
        .col-center .grid-wrap::-webkit-scrollbar-thumb:hover {
            background: rgba(247, 216, 117, 0.5);
        }
        .col-center .grid {
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            gap: 10px;
        }
        .col-center .box {
            aspect-ratio: 16 / 13;
            border-radius: 18px;
            display:flex;
            flex-direction:column;
            align-items:center;
            justify-content:center;
            cursor: pointer;
            transition: transform 0.18s ease, box-shadow 0.25s ease, border-color 0.25s ease;
            border: 2px solid rgba(255, 255, 255, 0.05);
            box-shadow: 0 6px 0 #0a0d12, 0 8px 24px rgba(0, 0, 0, 0.5);
            position: relative;
            user-select: none;
            padding:4px;
            overflow:hidden;
            background-size:cover;
            background-position:center;
        }
        /* 未开启箱子图片 */
        .col-center .box.unopened{
            background-image:url("https://img.pagehost.cn/autoupload/vlkqb/20260911/n7mD/0X0/closebox4.webp/webp");
        }
        /* 已开启箱子图片 */
        .col-center .box.opened{
            background-image:url("https://img.pagehost.cn/autoupload/vlkqb/20260911/laid/0X0/openedbox4.webp/webp");
        }
        .col-center .box:hover:not(.opened):not(.disabled) {
            transform: translateY(-3px);
            border-color: rgba(255, 215, 0, 0.35);
            box-shadow: 0 8px 0 #0a0d12, 0 14px 32px rgba(0, 0, 0, 0.6);
        }
        .col-center .box .box-number {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            font-size: 30px;
            font-weight: 700;
            color: #483c16;
            letter-spacing: 0.5px;
            transition: color 0.2s, opacity 0.2s;
            text-shadow: 0 2px 6px #000;
            z-index: 2;
        }
        .col-center .box .box-amount {
            position: absolute;
            top: 40%;/* 从 50% 改为 30%，实现中间偏上 */
            left: 50%;
            transform: translate(-50%, -50%);
            font-size: 20px;
            font-weight: 700;
            color: #f7d875;
            opacity: 0;
            transition: opacity 0.3s ease;
            font-variant-numeric: tabular-nums;
            text-shadow: 0 2px 12px #000, 0 0 30px rgba(0,0,0,0.8);
            z-index: 2;
            pointer-events: none;
            white-space: nowrap;
        }
        .col-center .box.opened .box-amount {
            opacity: 1;
        }
        .col-center .box.opened .box-number {
            opacity: 0;   /* 完全隐藏编号 */
        }
        /* 玩家箱子 (选中) */
        .col-center .box.player-box {
            border-color: #f7d875;
            border-width: 3px;
            box-shadow: 0 6px 0 #0a0d12, 0 0 30px rgba(247, 216, 117, 0.12);
        }
        .col-center .box.player-box .box-number {
            color: #f7d875;
        }
        .col-center .box.player-box::after {
            content: '⭐';
            position: absolute;
            top: 6px;
            right: 8px;
            font-size: 16px;
            filter: drop-shadow(0 0 6px rgba(247, 216, 117, 0.5));
            z-index:3;
        }
        .col-center .box.opened {
            border-color: rgba(255, 255, 255, 0.04);
            cursor: default;
            transform: scale(0.97);
            box-shadow: 0 3px 0 #0a0d12, 0 4px 12px rgba(0, 0, 0, 0.4);
        }
        /* ===== 玩家幸运箱：即使已开启（点击“查看所有箱子”后）也保持初始选中的黄色高亮边框 ===== */
        .col-center .box.opened.player-box {
            border-color: #f7d875;
            border-width: 3px;
            box-shadow: 0 3px 0 #0a0d12, 0 0 30px rgba(247, 216, 117, 0.45);
            opacity: 1;
            filter: none;
        }
        /* 幸运箱左上角的 ⭐ 标记在揭示后也保留（原有 ::after 已生效，这里仅确保层级不被盖住） */
        .col-center .box.opened.player-box::after {
            z-index: 3;
        }
        .col-center .box.opened .box-amount.high {
            color: #f7b37a;
        }
        .col-center .box.opened .box-amount.very-high {
            color: #f7d875;
        }
        .col-center .box.opened .box-amount.mega {
            color: #ff7a6a;
        }
        .col-center .box.disabled {
            cursor: not-allowed;
            opacity: 0.6;
            filter: grayscale(0.3);
        }
        .col-center .box.disabled:hover {
            transform: none;
        }

        /* ===== 银行家出价弹窗 ===== */
        .offer-overlay {
            position: absolute;
            inset: 0;
            z-index: 10;
            background: rgba(0, 0, 0, 0.75);
            backdrop-filter: blur(4px);
            border-radius: 20px;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 8px 16px;
            animation: fadeSlide 0.35s ease;
        }

        .offer-overlay-inner {
            width: 100%;
            max-width: 1000px;
        }

        .offer-main-row {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            justify-content: center;
            gap: 6px 16px;
            width: 100%;
        }

        .offer-label {
            font-size: 17px;
            font-weight: 600;
            color: #f5e6c4;
            white-space: nowrap;
        }

        .offer-amount {
            font-size: 30px;
            font-weight: 800;
            background: linear-gradient(135deg, #f7d875, #f5b342);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            white-space: nowrap;
        }

        .offer-sub {
            font-size: 14px;
            color: #b8b0a0;
            white-space: nowrap;
            margin-left: 2px;
        }

        .offer-btn-group {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            align-items: center;
        }

        .btn-inline {
            padding: 8px 22px;
            border: none;
            border-radius: 30px;
            font-size: 15px;
            font-weight: 700;
            cursor: pointer;
            transition: transform 0.15s ease, box-shadow 0.2s, opacity 0.2s;
        }
        .btn-inline:hover {
            transform: scale(1.04);
        }
        .btn-inline:active {
            transform: scale(0.96);
        }
        .btn-inline.btn-deal {
            background: linear-gradient(135deg, #f7d875, #e8b84a);
            color: #1a1f2a;
            box-shadow: 0 4px 20px rgba(247, 216, 117, 0.25);
        }
        .btn-inline.btn-deal:hover {
            box-shadow: 0 6px 32px rgba(247, 216, 117, 0.4);
        }
        .btn-inline.btn-bargain {
            background: rgba(255, 255, 255, 0.1);
            color: #d0c8b8;
            border: 1px solid rgba(255, 255, 255, 0.15);
        }
        .btn-inline.btn-bargain:hover:not(:disabled) {
            background: rgba(255, 255, 255, 0.2);
        }
        .btn-inline.btn-bargain:disabled {
            opacity: 0.35;
            cursor: not-allowed;
            transform: none;
        }
        .btn-inline.btn-nodeal {
            background: rgba(255, 255, 255, 0.06);
            color: #d0c8b8;
            border: 1px solid rgba(255, 255, 255, 0.08);
        }
        .btn-inline.btn-nodeal:hover {
            background: rgba(255, 255, 255, 0.12);
        }

        /* ---------- 粒子容器 ---------- */
        .particle-container {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            pointer-events: none;
            z-index: 1000;
            overflow: visible;
        }

        /* ---------- 单个粒子（纸币） ---------- */
        .particle {
            position: absolute;
            /* 宽高由 JS 动态设置，这里给默认值占位 */
            width: 30px;
            height: 20px;
            background: linear-gradient(145deg, 
                hsla(352, 59%, 58%, 0.88), 
                hsla(356, 63%, 50%, 0.82)
            );
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
            border: 1px solid rgba(200, 170, 80, 0.15);
            opacity: 0;
            /* 关键：使用 3D 变换 + GPU 加速 */
            transform-style: preserve-3d;
            will-change: transform, opacity;
            backface-visibility: hidden;
            pointer-events: none;
        }
        /* =====【新增】开箱视频弹窗 ===== */
        /* ===== 开箱视频弹窗（从中心弹出 + 圆角） ===== */
        .video-popup-overlay {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0);
            z-index: 999;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: background 0.5s ease;
        }
        .video-popup-overlay.active {
            display: flex;
            background: rgba(0, 0, 0, 0.85);
        }

        /* 视频容器 — 承担从中心弹出的动画 */
        .video-wrapper {
            position: relative;
            width: 56%;
            max-width: 56%;
            max-height: 70vh;
            transform: scale(0.4);
            opacity: 0;
            transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
                        opacity 0.5s ease;
            container-type: inline-size;   /* 让内部按钮以本容器宽度为参照 */
        }
        .video-popup-overlay.active .video-wrapper {
            transform: scale(1);
            opacity: 1;
        }

        .video-wrapper video {
            width: 100%;
            height: auto;
            display: block;
            border-radius: 24px;               /* 四角圆角 */
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
            pointer-events: none;              /* 让点击穿透，由 overlay 统一处理 */
        }

        /* 跳过按钮，固定在视频右上角 */
        .video-skip-btn {
            position: absolute;
            top: 2.5cqw;
            right: 2.5cqw;
            padding: 1.6cqw 3.6cqw;
            border: 0.2cqw solid rgba(255, 215, 0, 0.4);
            border-radius: 6cqw;
            background: rgba(0, 0, 0, 0.6);
            color: #f7d875;
            font-size: 2.8cqw;
            font-weight: 700;
            cursor: pointer;
            z-index: 20;
            backdrop-filter: blur(6px);
            transition: transform 0.15s ease, background 0.2s;
            line-height: 1.2;
        }
        .video-skip-btn:hover {
            background: rgba(247, 216, 117, 0.2);
            transform: scale(1.05);
        }
        .video-skip-btn:active {
            transform: scale(0.95);
        }

        /* ===== 金额浮层（居中，播放完成后渐入） ===== */
        .video-amount-overlay {
            position: absolute;
            top: 40%;
            left: 50%;
            transform: translate(-50%, -50%);
            font-size: 10cqw;
            font-weight: 800;
            color: #f7d875;
            text-shadow: 0 0 40px rgba(0, 0, 0, 0.9), 0 0 80px rgba(0, 0, 0, 0.6);
            opacity: 0;
            transition: opacity 0.6s ease;
            pointer-events: none;
            z-index: 10;
            text-align: center;
            background: rgba(0, 0, 0, 0.45);
            padding: 3cqw 4cqw;
            border-radius: 4cqw;
            backdrop-filter: blur(8px);
            border: 0.2cqw solid rgba(255, 215, 0, 0.2);
            font-family: 'Segoe UI', Roboto, sans-serif;
            letter-spacing: 0.4cqw;
            white-space: nowrap;
        }
        .video-amount-overlay.show {
            opacity: 1;
        }

        /* ===== 响应式适配 ===== */
         @media (max-width: 820px) {
            .video-wrapper {
                width: 70%;
                max-width: 70%;
                max-height: 60vh;
            }
        }
        @media (max-width: 520px) {
            .video-wrapper {
                width: 50%;
                max-width: 50%;
                max-height: 70vh;
            }
            .video-amount-overlay {
                white-space: normal;
            }
        }
        /* ===== 报价面板、历史（样式保持不变） ===== */
        .offer-panel {
            display: none;
            padding: 14px 20px;
            border-radius: 20px;
            background: linear-gradient(135deg, rgba(255, 215, 0, 0.06), rgba(255, 215, 0, 0.01));
            border: 1px solid rgba(255, 215, 0, 0.15);
            align-items: center;
            justify-content: space-between;
            flex-wrap: wrap;
            gap: 12px 20px;
            animation: fadeSlide 0.4s ease;
        }
        .offer-panel.active { display: flex; }
        @keyframes fadeSlide {
            0% { opacity: 0; transform: translateY(-10px); }
            100% { opacity: 1; transform: translateY(0); }
        }
        .offer-left {
            display: flex;
            align-items: center;
            gap: 14px;
        }
        .offer-left .label {
            font-size: 15px;
            color: #b8b0a0;
            font-weight: 400;
        }
        .offer-left .amount {
            font-size: 34px;
            font-weight: 800;
            background: linear-gradient(135deg, #f7d875, #f5b342);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            letter-spacing: 1px;
        }
        .offer-buttons {
            display: flex;
            gap: 12px;
        }
        .offer-buttons button {
            padding: 10px 32px;
            border: none;
            border-radius: 40px;
            font-size: 16px;
            font-weight: 700;
            cursor: pointer;
            transition: transform 0.15s ease, box-shadow 0.2s;
            letter-spacing: 0.5px;
        }
        .offer-buttons button:hover { transform: scale(1.04); }
        .offer-buttons button:active { transform: scale(0.96); }
        .btn-deal {
            background: linear-gradient(135deg, #f7d875, #e8b84a);
            color: #1a1f2a;
            box-shadow: 0 4px 20px rgba(247, 216, 117, 0.25);
        }
        .btn-deal:hover { box-shadow: 0 6px 32px rgba(247, 216, 117, 0.4); }
        .btn-nodeal {
            background: rgba(255, 255, 255, 0.06);
            color: #d0c8b8;
            border: 1px solid rgba(255, 255, 255, 0.08);
        }
        .btn-nodeal:hover { background: rgba(255, 255, 255, 0.1); }
        .history {
            padding: 10px 14px;
            background: rgba(0, 0, 0, 0.25);
            border-radius: 16px;
            border: 1px solid rgba(255, 255, 255, 0.03);
            min-height: 38px;
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 4px 8px;
        }
        .history .hist-label {
            font-size: 13px;
            color: #6a6a6a;
            margin-right: 6px;
            font-weight: 500;
        }
        .history .chip {
            background: rgba(255, 255, 255, 0.04);
            padding: 2px 12px;
            border-radius: 30px;
            font-size: 13px;
            color: #b0a898;
            border: 1px solid rgba(255, 255, 255, 0.04);
            font-variant-numeric: tabular-nums;
        }
        .history .chip.low { color: #7a9a7a; }
        .history .chip.mid { color: #d4b87a; }
        .history .chip.high { color: #f7b37a; }
        .history .chip.mega { color: #ff7a6a; }
        .history .empty-history {
            color: #4a4a4a;
            font-size: 14px;
            font-style: italic;
        }
        /* ===== 右侧银行家视频 ===== */
        .banker-video-wrap {
            background: rgba(0,0,0,0.3);
            border-radius: 20px;
            overflow-x: hidden;
            overflow-y: auto;              /* 内容超出时可滑动查看 */
            border: 1px solid rgba(255,215,0,0.06);
            height: 100%;
            flex: 1 1 auto;
            min-height: 0;
            position: relative;
            display: flex;
            align-items: center;
            justify-content: center;
            overscroll-behavior: contain;
            -webkit-overflow-scrolling: touch;
            /* 不显示滚动条（Firefox / IE） */
            scrollbar-width: none;
            -ms-overflow-style: none;
        }
        /* 不显示滚动条（WebKit / Chromium） */
        .banker-video-wrap::-webkit-scrollbar {
            width: 0;
            height: 0;
            display: none;
        }
        .banker-video-wrap video {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }
        .banker-video-wrap .video-overlay {
            position: absolute;
            bottom: 0px;
            left: 0;
            width: 100%;
            text-align: center;
            color: #b8b0a0;
            font-size: 14px;
            font-weight: 500;
            text-shadow: 0 0 20px rgba(0,0,0,0.9);
            pointer-events: none;
            background: linear-gradient(transparent, rgba(0,0,0,0.5));
            padding: 20px 10px 10px;
        }
        .banker-video-wrap .status-badge {
            position: absolute;
            top: 12px;
            right: 12px;
            background: rgba(0,0,0,0.6);
            padding: 4px 16px;
            border-radius: 30px;
            font-size: 13px;
            font-weight: 600;
            color: #f7d875;
            border: 1px solid rgba(255,215,0,0.2);
            backdrop-filter: blur(4px);
            pointer-events: none;
        }
        /* ===== 响应式 ===== */
        @media (max-width: 1024px) and (orientation: portrait) {
            .main-body { flex-wrap: wrap; }
            .col-left, .col-right { width: 100%; min-width: unset; }
            .col-center { width: 100%; }
            .amount-board { min-height: 200px; }
            .banker-video-wrap { min-height: 200px; }
        }
        @media (max-width: 820px) {
            .game-container { padding: 18px 16px 22px; }
            .col-center .grid { gap: 6px; }
            .col-center .box { font-size: 14px; }
            .col-center .box .box-number { font-size: 15px; }
            .col-center .box .box-amount { font-size: 12px; }
            .offer-left .amount { font-size: 26px; }
            /* ===== 顶部标题栏压缩，保证单行 ===== */
            .title-group h1 { font-size: 18px; }
            .title-group .sub { font-size: 12px; padding: 1px 10px; }
            .stats { font-size: 12px; padding: 6px 14px; gap: 10px; }
        }
        @media (max-width: 520px) {
            .col-center .grid { gap: 4px; }
            .col-center .box { border-radius: 10px; }
            .col-center .box .box-number { font-size: 12px; }
            .col-center .box .box-amount { font-size: 10px; }
            /* 移除固定字号，交由 cqw 单位自动缩放 */
            .carousel-text { font-size: 16px; }
        }
        /* ===== 游戏结束弹窗 ===== */
        .game-over-overlay {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.7);
            backdrop-filter: blur(6px);
            justify-content: center;
            align-items: center;
            z-index: 1000;
            padding: 20px;
            animation: fadeIn 0.4s ease;
        }
        .game-over-overlay.active { display: flex; }
        @keyframes fadeIn {
            0% { opacity: 0; }
            100% { opacity: 1; }
        }
        .game-over-card {
            background: linear-gradient(145deg, #1e2533, #141a24);
            border-radius: 40px;
            padding: 40px 48px 36px;
            max-width: 500px;
            width: 100%;
            text-align: center;
            border: 1px solid rgba(255, 215, 0, 0.1);
            box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8);
            animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
        }
        @keyframes popIn {
            0% { opacity: 0; transform: scale(0.9); }
            100% { opacity: 1; transform: scale(1); }
        }
        .game-over-card .icon { font-size: 52px; margin-bottom: 8px; }
        .game-over-card h2 {
            font-size: 28px;
            font-weight: 700;
            color: #f5e6c4;
            margin-bottom: 6px;
        }
        .game-over-card .result-amount {
            font-size: 48px;
            font-weight: 800;
            background: linear-gradient(135deg, #f7d875, #f5b342);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            margin: 10px 0 6px;
        }
        .game-over-card .sub-text {
            color: #9a9080;
            font-size: 16px;
            margin-bottom: 24px;
        }
        .game-over-card .btn-restart {
            padding: 14px 48px;
            border: none;
            border-radius: 40px;
            font-size: 18px;
            font-weight: 700;
            background: linear-gradient(135deg, #f7d875, #e8b84a);
            color: #1a1f2a;
            cursor: pointer;
            transition: transform 0.15s ease, box-shadow 0.2s;
            box-shadow: 0 4px 24px rgba(247, 216, 117, 0.2);
        }
        .game-over-card .btn-restart:hover {
            transform: scale(1.05);
            box-shadow: 0 6px 36px rgba(247, 216, 117, 0.35);
        }
        .game-over-card .btn-reveal {
            margin-top: 6px;
            padding: 14px 48px;
            border: none;
            border-radius: 40px;
            font-size: 18px;
            font-weight: 700;
            background: linear-gradient(135deg, #f7d875, #e8b84a);
            color: #1a1f2a;
            cursor: pointer;
            transition: transform 0.15s ease, box-shadow 0.2s;
            box-shadow: 0 4px 24px rgba(247, 216, 117, 0.2);
        }
        .game-over-card .btn-reveal:hover:not(:disabled) {
            background: rgba(255,255,255,0.15);
            transform: scale(1.02);
        }
        .game-over-card .btn-reveal:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            transform: none;
        }
        /* ===== 讨价还价区域 ===== */
        .bargain-inline {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 6px 10px;
            flex: 1 0 auto;
            justify-content: center;
        }

        .bargain-hint {
            font-size: 14px;
            color: #b8b0a0;
            white-space: nowrap;
        }

        .bargain-inline .currency-symbol {
            font-size: 20px;
            font-weight: 700;
            color: #f7d875;
        }

        .bargain-inline input {
            width: 120px;
            padding: 4px 10px;
            border-radius: 8px;
            border: 1px solid rgba(255, 255, 255, 0.15);
            background: rgba(0, 0, 0, 0.4);
            color: #fff;
            font-size: 16px;
            font-weight: 600;
            outline: none;
            transition: border-color 0.2s;
        }
        .bargain-inline input:focus {
            border-color: #f7d875;
        }
        .bargain-inline input::placeholder {
            color: #666;
            font-size: 13px;
        }

        .bargain-inline .bargain-inline-result {
            font-size: 14px;
            font-weight: 600;
            padding: 2px 12px;
            border-radius: 8px;
            background: rgba(0,0,0,0.3);
            white-space: nowrap;
        }
        .bargain-inline .bargain-inline-result.accepted {
            color: #8fcb9b;
            border: 1px solid rgba(143, 203, 155, 0.3);
        }
        .bargain-inline .bargain-inline-result.rejected {
            color: #ff7a6a;
            border: 1px solid rgba(255, 122, 106, 0.3);
        }

        .btn-inline {
            padding: 5px 16px;
            border: none;
            border-radius: 30px;
            font-size: 14px;
            font-weight: 700;
            cursor: pointer;
            transition: transform 0.15s ease, box-shadow 0.2s, opacity 0.2s;
            white-space: nowrap;
        }
        .btn-inline:hover {
            transform: scale(1.04);
        }
        .btn-inline:active {
            transform: scale(0.96);
        }
        .btn-inline.btn-deal {
            background: linear-gradient(135deg, #f7d875, #e8b84a);
            color: #1a1f2a;
            box-shadow: 0 4px 20px rgba(247, 216, 117, 0.25);
        }
        .btn-inline.btn-deal:hover {
            box-shadow: 0 6px 32px rgba(247, 216, 117, 0.4);
        }
        .btn-inline.btn-bargain {
            background: rgba(255, 255, 255, 0.1);
            color: #d0c8b8;
            border: 1px solid rgba(255, 255, 255, 0.15);
        }
        .btn-inline.btn-bargain:hover:not(:disabled) {
            background: rgba(255, 255, 255, 0.2);
        }
        .btn-inline.btn-bargain:disabled {
            opacity: 0.35;
            cursor: not-allowed;
            transform: none;
        }
        .btn-inline.btn-nodeal {
            background: rgba(255, 255, 255, 0.06);
            color: #d0c8b8;
            border: 1px solid rgba(255, 255, 255, 0.08);
        }
        .btn-inline.btn-nodeal:hover {
            background: rgba(255, 255, 255, 0.12);
        }
        .btn-inline.btn-submit-bargain {
            background: linear-gradient(135deg, #f7d875, #e8b84a);
            color: #1a1f2a;
        }
        .btn-inline.btn-submit-bargain:hover:not(:disabled) {
            transform: scale(1.04);
        }
        .btn-inline.btn-submit-bargain:disabled {
            opacity: 0.4;
            cursor: not-allowed;
            transform: none;
        }
        .btn-inline.btn-cancel-bargain {
            background: rgba(255, 255, 255, 0.06);
            color: #d0c8b8;
            border: 1px solid rgba(255, 255, 255, 0.08);
        }
        .btn-inline.btn-cancel-bargain:hover {
            background: rgba(255, 255, 255, 0.12);
        }

        /* 小屏幕适配 */
        @media (max-width: 820px) {
            .offer-label { font-size: 15px; }
            .offer-amount { font-size: 24px; }
            .offer-sub { font-size: 12px; }
            .btn-inline { font-size: 12px; padding: 4px 12px; }
            /* ===== 规则弹窗：适配横屏可视高度 ===== */
            .rule-overlay {
                padding: 8px;
            }
            .rule-card {
                /* 旋转后可视高度 ≈ 竖屏宽度，宽高都换成 vw 单位 */
                max-width: 62vw;
                width: 62vw;
                max-height: 78vw;
                padding: 18px 24px 16px;
                border-radius: 20px;
            }
            .rule-card h2 {
                font-size: 16px;
                margin-bottom: 8px;
            }
            .rule-card .rule-content {
                font-size: 11px;
                line-height: 1.5;
            }
            .rule-card .rule-content p {
                margin-bottom: 6px;
            }
            .rule-card .rule-content ul {
                padding-left: 14px;
                margin-bottom: 6px;
            }
            .rule-card .rule-content li {
                margin-bottom: 3px;
            }
            .rule-card .rule-close {
                margin: 10px auto 0;
                padding: 6px 22px;
                font-size: 12px;
                border-radius: 20px;
            }
            .bargain-inline input { width: 90px; font-size: 14px; }
            .bargain-hint { font-size: 12px; }
        }
        @media (max-width: 520px) {
            .offer-label { font-size: 13px; }
            .offer-amount { font-size: 20px; }
            .offer-sub { font-size: 11px; }
            .btn-inline { font-size: 11px; padding: 3px 10px; }
            .bargain-inline input { width: 70px; font-size: 12px; padding: 3px 6px; }
            .bargain-hint { font-size: 11px; }
        }
        /* 等待玩家点击幸运箱时的闪烁动画 */
        @keyframes luckyPulse {
            0%, 100% { box-shadow: 0 6px 0 #0a0d12, 0 0 30px rgba(247, 216, 117, 0.5); }
            50%      { box-shadow: 0 6px 0 #0a0d12, 0 0 55px rgba(247, 216, 117, 1); }
        }
        .col-center .box.player-box.awaiting-click {
            animation: luckyPulse 0.9s ease-in-out infinite;
            cursor: pointer;
        }
        /* ===== 移动端强制横屏 ===== */
        @media screen and (max-width: 1024px) and (orientation: portrait) {
            html {
                width: 100vh;
                height: 100vw;
                overflow: hidden;
                position: relative;
            }
            body {
                position: absolute;
                top: 0;
                left: 0;
                width: 100vh;
                height: auto;
                min-height: 100vw;
                padding: 0;
                margin: 0;
                transform-origin: top left;
                transform: rotate(90deg) translateY(-100vw);
                overflow-y: auto;
                overflow-x: hidden;
                -webkit-overflow-scrolling: touch;
                display: block;
            }
            .game-container {
                max-width: 100%;
                min-height: 100%;
                height: auto;
                border-radius: 0;
                overflow: visible;
                padding: 10px 12px 12px;
            }
            /* 防止页面被用户手动旋转拉伸 */
            html, body {
                -webkit-text-size-adjust: 100%;
                touch-action: manipulation;
            }

            /* ===== 覆盖窄屏断点：保持左中右三列布局 ===== */
            .main-body {
                flex-wrap: nowrap;
                gap: 8px;
            }
            .col-left {
                width: 22%;
                min-width: 0;
            }
            .col-center {
                width: 56%;
                min-width: 0;
            }
            .col-right {
                width: 22%;
                min-width: 0;
            }
            .amount-board {
                min-height: 180px;
            }
            .banker-video-wrap {
                min-height: 180px;
            }

            /* ===== 压缩间距与字号，适配横屏较小高度 ===== */
            .header {
                margin-bottom: 8px;
                gap: 6px 10px;
                flex-wrap: nowrap;      /* 横屏也保持一行 */
            }
            .stats {
                flex-wrap: nowrap;
                white-space: nowrap;
            }
            .title-group h1 {
                font-size: 18px;
            }
            .title-group .sub {
                font-size: 11px;
                padding: 1px 10px;
            }
            .btn-header-restart {
                font-size: 10px;
                padding: 3px 8px;
            }
            .stats {
                font-size: 12px;
                padding: 6px 14px;
                gap: 10px;
            }
            .carousel-wrap {
                min-height: 50px;
                height: 50px;
                margin-bottom: 8px;
            }
            .carousel-content {
                min-height: 50px;
                padding: 6px 12px;
            }
            .carousel-text {
                font-size: 16px;
                letter-spacing: 1px;
            }
            .col-center .grid {
                gap: 4px;
            }
            .col-center .box {
                border-radius: 10px;
                padding: 2px;
            }
            .col-center .box .box-number {
                font-size: 14px;
            }
            .col-center .box .box-amount {
                font-size: 11px;
            }
            .board-title {
                font-size: 12px;
                margin-bottom: 6px;
            }
            .board-item {
                font-size: 11px;
                padding: 3px 6px;
            }
            .offer-label { font-size: 14px; }
            .offer-amount { font-size: 22px; }
            .offer-sub { font-size: 12px; }
            .btn-inline { font-size: 12px; padding: 4px 12px; }

            /* ===== 游戏结束弹窗：适配横屏可视高度 ===== */
            .game-over-overlay {
                padding: 8px;
            }
            .game-over-card {
                max-width: 58vw;
                width: 58vw;
                max-height: 86vw;
                padding: 18px 24px 16px;
                border-radius: 20px;
                overflow-y: auto;
                /* 隐藏滚动条 */
                scrollbar-width: none;
                -ms-overflow-style: none;
            }
            .game-over-card::-webkit-scrollbar {
                width: 0;
                height: 0;
                display: none;
            }
            .game-over-card .icon {
                font-size: 28px;
                margin-bottom: 4px;
            }
            .game-over-card h2 {
                font-size: 16px;
                margin-bottom: 4px;
            }
            .game-over-card .result-amount {
                font-size: 26px;
                margin: 4px 0 4px;
            }
            .game-over-card .sub-text {
                font-size: 11px;
                margin-bottom: 10px;
            }
            .game-over-card .btn-restart,
            .game-over-card .btn-reveal {
                padding: 7px 26px;
                font-size: 12px;
                border-radius: 20px;
                margin-top: 4px;
            }
        }
