/* ================= 💎 全局与重置 ================= */
        * { box-sizing: border-box; -webkit-tap-highlight-color: transparent; margin: 0; padding: 0; }
        body {
            background-color: #050508; color: #ffd700; 
            font-family: "Varela Round", "Arial Rounded MT Bold", "Nunito", "Quicksand", "PingFang SC", "Microsoft YaHei", sans-serif;
            overflow-x: hidden; min-height: 100vh;
            user-select: none; position: relative;
        }
        body.splash-lock { overflow: hidden; touch-action: none; height: 100vh; }
        body.splash-lock .app-container,
        body.splash-lock .fixed-header,
        body.splash-lock .announce-bar { pointer-events: none; }

        /* ================= 🖼️ 用户自定义底图，透明度调至80% ================= */
        .page-background {
            position: fixed; top: 0; left: 0; width: 100%; height: 100%;
            background-image: url('https://files.catbox.moe/yr2p1g.png');
            background-size: cover;
            background-position: center;
            background-repeat: no-repeat;
            opacity: 0.8;
            z-index: -1; pointer-events: none; filter: none;
        }

        /* ================= 🚀 炫酷开场动画 ================= */
        
        #splash-screen {
            position: fixed; top: 0; left: 0; width: 100%; height: 100%;
            background-color: #050508;
            background-image: url('/yy9封面.jpg');
            background-size: cover;
            background-position: center;
            background-repeat: no-repeat;
            z-index: 99999999;
            display: flex; align-items: center; justify-content: center;
            padding: 10px;
            box-sizing: border-box;
            transition: opacity 0.8s ease, visibility 0.8s;
        }
        .splash-content {
            position: absolute;
            left: 50%;
            top: calc(78% + 1.5em);
            transform: translate(-50%, -50%);
            width: min(92vw, 560px);
            padding: 14px 12px 12px;
            border-radius: 14px;
            background: linear-gradient(180deg, rgba(0,0,0,0.46), rgba(0,0,0,0.32));
            border: 1px solid rgba(255,255,255,0.3);
            box-shadow:
                0 14px 34px rgba(0,0,0,0.62),
                0 0 0 1px rgba(255,255,255,0.16),
                inset 0 2px 12px rgba(255,255,255,0.08);
            backdrop-filter: blur(1px);
            -webkit-backdrop-filter: blur(1px);
            text-align: center;
        }
        .splash-title {
            color: #ffd700; font-size: clamp(28px, 8vw, 46px); font-weight: 900; margin-top: 0;
            letter-spacing: 1px; line-height: 1.1;
            -webkit-text-stroke: 1.1px rgba(255,255,255,0.98);
            text-shadow:
                0 0 0.8px rgba(255,255,255,0.98),
                0 2px 0 rgba(255,255,255,0.9),
                0 5px 0 rgba(0,0,0,0.78),
                0 10px 16px rgba(0,0,0,0.94),
                0 0 12px rgba(0,0,0,0.82);
        }
        .splash-loader {
            width: 100%; height: 22px; background: rgba(0,0,0,0.52);
            margin: 12px auto 0; border-radius: 999px; overflow: hidden;
            border: 1.2px solid rgba(255,255,255,0.96);
            box-shadow:
                0 0 0 1px rgba(255,255,255,0.78),
                0 5px 0 rgba(0,0,0,0.68),
                0 10px 16px rgba(0,0,0,0.82),
                inset 0 2px 6px rgba(255,255,255,0.12),
                0 10px 18px 2px rgba(0,0,0,0.5);
        }
        .loader-bar {
            width: 0%; height: 100%;
            background: linear-gradient(90deg, #ffe47a 0%, #ffd700 50%, #fff176 100%);
            box-shadow: 0 0 14px rgba(255, 215, 0, 0.9);
            animation: loadBar 2.4s ease-in-out forwards;
            border-radius: 0 999px 999px 0;
        }
        .splash-text {
            color: rgba(255,255,255,0.92); font-size: 14px; margin-top: 8px; font-weight: 800;
            -webkit-text-stroke: 0.4px rgba(255,255,255,0.45);
            text-shadow: 0 5px 12px rgba(0,0,0,0.85);
            animation: blinkText 1s infinite;
        }
        
        @keyframes pulseLogo { from { transform: scale(0.95); } to { transform: scale(1.05); } }
        @keyframes loadBar {
            0% { width: 0%; }
            25% { width: 45%; }
            60% { width: 75%; }
            85% { width: 92%; }
            100% { width: 100%; }
        }
        @keyframes blinkText { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }
        .splash-hidden { opacity: 0; visibility: hidden; }

        /* ================= 🛸 3D 悬浮与金光引擎 ================= */
        @keyframes float3D {
            0% { transform: translateY(0px) translateX(0px) rotateY(0deg); }
            25% { transform: translateY(-6px) translateX(2px) rotateY(4deg); }
            50% { transform: translateY(0px) translateX(4px) rotateY(0deg); }
            75% { transform: translateY(4px) translateX(-2px) rotateY(-4deg); }
            100% { transform: translateY(0px) translateX(0px) rotateY(0deg); }
        }
        @keyframes goldSweep { 0% { left: -150%; } 50%, 100% { left: 150%; } }

        /* 👑 核心：80% 透明黑金风格 3D 凸起(凹凸)玻璃罩 👑 */
        .magic-3d-item {
            position: relative; transform-style: preserve-3d; perspective: 1000px;
            animation: float3D 6s ease-in-out infinite;
            overflow: hidden; border-radius: 26px; cursor: pointer;
            background:
                linear-gradient(145deg, rgba(255,255,255,0.15), rgba(255,255,255,0.03) 28%, rgba(0,0,0,0.18) 28%, rgba(0,0,0,0.34) 100%),
                linear-gradient(180deg, rgba(31,22,10,0.80), rgba(8,8,9,0.80));
            backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
            border: 1px solid rgba(255, 215, 0, 0.42);
            box-shadow:
                inset 1px 1px 0 rgba(255,255,255,0.45),
                inset -4px -6px 14px rgba(0, 0, 0, 0.62),
                0 18px 32px rgba(0, 0, 0, 0.65),
                0 0 0 1px rgba(255, 215, 0, 0.12);
            display: flex; flex-direction: column; align-items: center; justify-content: center;
            height: auto; aspect-ratio: 3 / 2; transition: transform 0.2s, box-shadow 0.2s;
            opacity: 1;
        }
        .magic-3d-item:active { transform: scale(0.95) !important; }
        .magic-3d-item::after {
            content: '';
            position: absolute; inset: 6px;
            border-radius: 20px;
            border: 1px solid rgba(255,255,255,0.12);
            box-shadow: inset 0 1px 0 rgba(255,255,255,0.14), inset 0 -10px 18px rgba(0,0,0,0.42);
            pointer-events: none;
        }
        .magic-3d-item::before {
            content: ''; position: absolute; top: 0; left: -150%; width: 50%; height: 100%;
            background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,215,0,0.6) 50%, rgba(255,255,255,0) 100%);
            transform: skewX(-25deg); animation: goldSweep 4s infinite; z-index: 2; pointer-events: none;
        }
        .magic-icon {
            font-size: 42px; margin-bottom: 6px; transform: translateZ(32px) rotateX(14deg);
            text-shadow: 0 8px 16px rgba(0,0,0,0.9), 0 0 18px rgba(255,215,0,0.18);
            filter: drop-shadow(0 10px 18px rgba(0,0,0,0.78));
        }
        /* 厅名文字：黑色半透明圆角底垫在字后面，粗体，无描边无白边 */
        .magic-text {
            position: relative;
            font-size: 17px; font-weight: 900; color: #ffd700; transform: translateZ(15px); letter-spacing: 1px;
            padding: 4px 14px; border-radius: 14px;
            background: linear-gradient(180deg, rgba(0,0,0,0.56), rgba(0,0,0,0.34)); border: 1px solid rgba(255,215,0,0.15);
            box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), 0 8px 18px rgba(0,0,0,0.3);
            -webkit-text-stroke: 0;
            text-shadow: none;
        }

        /* ================= 📌 导航栏 ================= */
        .app-container {
            width: 100%; max-width: 480px; margin: 0 auto; min-height: 100vh;
            /* header(100) + announce(28) + widget(~108) ≈ 236px; add a little extra */
            padding-top: 238px; padding-bottom: 20px; position: relative; z-index: 10;
        }
        .fixed-header {
            position: fixed; top: 0; left: 50%; transform: translateX(-50%);
            width: 100%; max-width: 480px; height: 100px;
            background: rgba(10, 10, 10, 0.05); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
            border-bottom: 1px solid rgba(255, 215, 0, 0.3); z-index: 1000;
            display: flex; justify-content: space-between; padding: 15px; box-shadow: 0 4px 15px rgba(0,0,0,0.3);
        }
        .header-col { display: flex; flex-direction: column; gap: 10px; justify-content: center; }
        .header-center { display: flex; flex-direction: column; align-items: center; justify-content: center; }
        .head-btn {
            background: rgba(255,255,255,0.05); border: 1px solid rgba(255,215,0,0.4); color: #ffd700;
            padding: 5px 12px; border-radius: 6px; font-size: 13px; font-weight: bold;
            box-shadow: inset 1px 1px 2px rgba(255,255,255,0.2), inset -1px -1px 2px rgba(0,0,0,0.4); 
            cursor: pointer; text-shadow: 0 0 5px #000;
        }
        
        /* ================= 🪙 放大版纯净小硬币 ================= */
        .orbit-wrapper { display: flex; justify-content: center; align-items: center; width: 80px; height: 80px; }
        .coin-img {
            width: 110px; height: 110px; 
        }

        /* ================= 🏆 顶部悬浮区 (左排行 + 转盘 + 右排行) ================= */
        .top-widget-area {
            display: flex; justify-content: space-between; align-items: center;
            padding: 4px 10px; margin-bottom: 15px; gap: 8px;
            /* Portrait: fixed below announce bar */
            position: fixed;
            top: 128px;
            left: 50%; transform: translateX(-50%);
            width: 100%; max-width: 480px;
            z-index: 200;
            background: rgba(5,5,8,0.2);
            backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
            border-bottom: 1px solid rgba(255,215,0,0.18);
            box-sizing: border-box;
        }
        .leaderboard-box {
            flex: 1; height: 90px; max-width: 138px; min-width: 0;
            border-radius: 12px; padding: 6px 6px;
            background: rgba(8, 8, 8, 0.2); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
            border: 1px solid rgba(255, 215, 0, 0.35);
            box-shadow: inset 1px 1px 3px rgba(255,255,255,0.2), inset -2px -2px 5px rgba(0,0,0,0.4), 0 4px 10px rgba(0,0,0,0.2);
            display: flex; flex-direction: column; overflow: hidden;
            opacity: 1;
        }
        .leaderboard-title { color: #fff; font-size: 11px; font-weight: bold; margin-bottom: 3px; text-shadow: 0 0 8px #ff0000; text-align: center; border-bottom: 1px dashed rgba(255,215,0,0.3); padding-bottom: 2px; }
        .leaderboard-scroll { flex: 1; overflow: hidden; position: relative; color: #fff; font-weight: bold; font-size: 10px; line-height: 16px; text-shadow: 1px 1px 3px #000; text-align: center; }
        .leaderboard-track { display: flex; flex-direction: column; gap: 3px; animation: scrollUp 28s linear infinite; }
        .leaderboard-scroll:hover .leaderboard-track { animation-play-state: paused; }
        @keyframes scrollUp { from { transform: translateY(0); } to { transform: translateY(-50%); } }
        @media (prefers-reduced-motion: reduce) { .leaderboard-track { animation: none; } }

        .inline-wheel-section {
            display: flex; flex-direction: column; align-items: center; justify-content: center;
            position: relative; z-index: 260; margin: -10px 0 -14px;
            background: rgba(8,8,8,0.2);
            border: 1px solid rgba(255,215,0,0.24);
            border-radius: 12px;
            padding: 6px 4px;
        }
        .wheel-wrap { position: relative; width: 124px; height: 124px; margin: 0 auto; pointer-events: auto; touch-action: manipulation; }
        .wheel-body {
            width: 100%; height: 100%; border-radius: 50%;
            background: conic-gradient(
                from -22.5deg, rgba(216, 43, 43, 0.85) 0deg 45deg, rgba(43, 93, 216, 0.85) 45deg 90deg,
                rgba(216, 155, 43, 0.85) 90deg 135deg, rgba(43, 216, 93, 0.85) 135deg 180deg,
                rgba(155, 43, 216, 0.85) 180deg 225deg, rgba(43, 216, 216, 0.85) 225deg 270deg,
                rgba(216, 43, 166, 0.85) 270deg 315deg, rgba(68, 68, 68, 0.85) 315deg 360deg
            );
            border: 4px solid #ffd700; box-shadow: 0 0 20px rgba(255,215,0,0.5);
            transition: transform 4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            position: relative; overflow: hidden;
        }
        .wheel-spin-btn {
            position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
            width: 38px; height: 38px; background: radial-gradient(circle, #ff3333, #aa0000);
            border-radius: 50%; border: 2px solid #ffd700; color: #fff; font-weight: 800; font-size: 12px;
            display: flex; align-items: center; justify-content: center; cursor: pointer;
            box-shadow: 0 0 15px rgba(0,0,0,0.9); z-index: 10; text-shadow: 1px 1px 2px #000;
        }
        .wheel-pointer {
            position: absolute; top: -7px; left: 50%; transform: translateX(-50%);
            width: 0; height: 0; border-left: 8px solid transparent; border-right: 8px solid transparent; border-top: 16px solid #ffd700;
            z-index: 20; filter: drop-shadow(0 4px 5px rgba(0,0,0,0.8));
        }
        .wheel-txt { position: absolute; top: 50%; left: 50%; width: 30px; height: 12px; margin-top: -6px; margin-left: -15px; text-align: center; color: #fff; font-weight: 800; font-size: 10px; text-shadow: 1px 1px 2px #000; }
        .w1 { transform: rotate(0deg) translateY(-47px); }
        .w2 { transform: rotate(45deg) translateY(-47px); }
        .w3 { transform: rotate(90deg) translateY(-47px); }
        .w4 { transform: rotate(135deg) translateY(-47px); }
        .w5 { transform: rotate(180deg) translateY(-47px); }
        .w6 { transform: rotate(225deg) translateY(-47px); }
        .w7 { transform: rotate(270deg) translateY(-47px); }
        .w8 { transform: rotate(315deg) translateY(-47px); }
        #wheelResult { color: #00ff00; font-weight: 800; font-size: 10px; margin-top: 3px; height: 14px; text-shadow: 1px 1px 2px #000; display: block; }

        /* ================= 📱 游戏网格 ================= */
        .main-grid { 
            display: grid; 
            grid-template-columns: 1fr 1fr; 
            gap: 12px; 
            padding: 0 15px; 
            margin-bottom: 30px;
            perspective: 1200px;
        }
        /* Cover-image card (水浒传, 777) — taller than regular cards */
        .magic-3d-item.with-cover {
            padding: 0; justify-content: flex-end; align-items: stretch;
            height: auto; aspect-ratio: 3 / 2;
        }
        .magic-3d-item.with-cover .cover-img {
            position: absolute; inset: 0; width: 100%; height: 100%;
            object-fit: cover; object-position: center;
            border-radius: 26px; z-index: 0;
        }
        .magic-3d-item.with-cover .magic-icon-fallback {
            position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
            font-size: 48px; z-index: 0;
        }
        .magic-3d-item.with-cover .magic-text {
            position: relative; z-index: 1; width: 100%;
            background: linear-gradient(to top, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.42) 60%, transparent 100%);
            padding: 10px 8px 12px; border-radius: 0 0 24px 24px;
            transform: none; border: none; box-shadow: none; text-align: center;
            font-size: 15px;
        }
        .magic-3d-item.with-cover::before { border-radius: 26px; }
        /* Standard icon card */
        .magic-3d-item:not(.with-cover) { height: auto; aspect-ratio: 3 / 2; }
        .main-grid .magic-3d-item:nth-child(3) { background-image: linear-gradient(145deg, rgba(108,75,17,0.28), rgba(255,255,255,0.04) 30%, rgba(0,0,0,0.2) 30%, rgba(11,17,26,0.55)); }
        .main-grid .magic-3d-item:nth-child(4) { background-image: linear-gradient(145deg, rgba(135,82,18,0.28), rgba(255,255,255,0.04) 30%, rgba(0,0,0,0.2) 30%, rgba(22,14,10,0.55)); }
        .main-grid .magic-3d-item:nth-child(5) { background-image: linear-gradient(145deg, rgba(24,103,109,0.24), rgba(255,255,255,0.04) 30%, rgba(0,0,0,0.2) 30%, rgba(7,17,18,0.55)); }
        .main-grid .magic-3d-item:nth-child(6) { background-image: linear-gradient(145deg, rgba(98,54,121,0.24), rgba(255,255,255,0.04) 30%, rgba(0,0,0,0.2) 30%, rgba(16,10,19,0.55)); }
        .main-grid .magic-3d-item:nth-child(7) { background-image: linear-gradient(145deg, rgba(118,60,60,0.24), rgba(255,255,255,0.04) 30%, rgba(0,0,0,0.2) 30%, rgba(20,10,10,0.55)); }
        .main-grid .magic-3d-item:nth-child(8) { background-image: linear-gradient(145deg, rgba(127,96,17,0.28), rgba(255,255,255,0.04) 30%, rgba(0,0,0,0.2) 30%, rgba(19,13,7,0.55)); }
        .main-grid .magic-3d-item:nth-child(9) { background-image: linear-gradient(145deg, rgba(133,67,18,0.26), rgba(255,255,255,0.04) 30%, rgba(0,0,0,0.2) 30%, rgba(23,14,7,0.55)); }
        .main-grid .magic-3d-item:nth-child(10) { background-image: linear-gradient(145deg, rgba(69,72,124,0.24), rgba(255,255,255,0.04) 30%, rgba(0,0,0,0.2) 30%, rgba(9,12,22,0.55)); }
        .main-grid .magic-3d-item:nth-child(odd) .magic-icon { text-shadow: 0 8px 16px rgba(0,0,0,0.9), 0 0 22px rgba(255,215,0,0.26); }
        .main-grid .magic-3d-item:nth-child(even) .magic-icon { text-shadow: 0 8px 16px rgba(0,0,0,0.9), 0 0 22px rgba(255,255,255,0.18); }

        /* 其它通用弹窗 */
        .tg-float-link {
            position: fixed; bottom: 80px; right: 15px;
            background: linear-gradient(135deg, rgba(255,215,0,0.9) 0%, rgba(139,101,8,0.9) 100%); color: #000;
            padding: 10px 16px; border-radius: 20px; font-weight: bold; box-shadow: 0 4px 20px rgba(255,215,0,0.5);
            z-index: 999999; font-size: 13px; border: 1px solid #fff; touch-action: none; cursor: move;
        }
        .modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); backdrop-filter: blur(5px); z-index: 99999; display: none; flex-direction: column; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.3s; }
        .modal-overlay.show { display: flex; opacity: 1; }
        .modal-content { width: 90%; max-width: 400px; max-height: 80vh; background: rgba(20, 15, 5, 0.85); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 2px solid #ffd700; border-radius: 15px; padding: 20px; overflow-y: auto; position: relative; box-shadow: 0 0 40px rgba(255,215,0,0.3); transform: scale(0.9); transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
        .modal-overlay.show .modal-content { transform: scale(1); }
        .modal-close { position: absolute; top: 15px; right: 15px; font-size: 20px; color: #ffd700; background: none; border: none; cursor: pointer; text-shadow: 0 0 10px #ffd700; z-index: 50; }
        .modal-title { text-align: center; font-size: 20px; font-weight: 800; color: #fff; margin-bottom: 20px; border-bottom: 1px dashed #b89742; padding-bottom: 10px; text-shadow: 0 2px 4px #000; }
        .sub-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
        .sub-btn { background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(184, 151, 66, 0.6); color: #fff; padding: 12px 5px; border-radius: 16px; font-size: 13px; font-weight: bold; text-align: center; cursor: pointer; transition: 0.2s; box-shadow: inset 1px 1px 2px rgba(255,255,255,0.1), 0 6px 14px rgba(0,0,0,0.6); text-shadow: 0 3px 6px rgba(0,0,0,0.95); }
        .sub-btn:hover { background: #ffd700; color: #000; text-shadow: none; }
        .player-id[hidden] { display: none; }
        .player-id { display: block; margin-top: 4px; font-size: 10px; color: #ffd700; text-align: center; letter-spacing: 0.5px; }
        .player-panel { background: rgba(255,215,0,0.08); border: 1px solid rgba(184,151,66,0.6); border-radius: 12px; padding: 12px; margin-bottom: 15px; font-size: 13px; color: #fff; line-height: 1.9; }
        .player-panel b { color: #ffd700; }
        .panel-flex { display: flex; align-items: flex-start; gap: 12px; }
        .panel-info { flex: 1; min-width: 0; }
        .panel-avatar-wrap { flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; }
        .panel-avatar-wrap:active { opacity: 0.8; }
        .panel-avatar {
            width: 90px; height: 90px; font-size: 62px;
            display: flex; align-items: center; justify-content: center;
            border-radius: 50%; border: 2px solid rgba(255,215,0,0.65);
            background: rgba(255,215,0,0.08); overflow: hidden;
        }
        .panel-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
        .panel-avatar-hint { font-size: 10px; color: rgba(255,215,0,0.7); white-space: nowrap; }
        .spotlight-section { padding: 0 12px; margin-bottom: 2px; }
        .spotlight-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2px; color: #fff; font-size: 13px; font-weight: 800; }
        .spotlight-title span:last-child { color: #ffd700; font-size: 11px; }
        .spotlight-scroll { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
        .spotlight-scroll::-webkit-scrollbar { display: none; }
        .spotlight-card { flex: 0 0 108px; height: 72px; aspect-ratio: 3 / 2; padding: 5px 7px; border-radius: 12px; border: 1px solid rgba(255,215,0,0.28); background: linear-gradient(180deg, rgba(255,255,255,0.12), rgba(8,8,8,0.94)); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 10px 22px rgba(0,0,0,0.42); cursor: pointer; overflow: hidden; opacity: 1; }
        .spotlight-card:active { transform: scale(0.97); }
        .spotlight-card strong { display: block; font-size: 10px; margin: 2px 0 1px; color: #ffd700; }
        .spotlight-card p { font-size: 9px; line-height: 1.25; color: rgba(255,255,255,0.82); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
        .spotlight-chip { display: inline-block; padding: 1px 6px; border-radius: 999px; font-size: 8px; font-weight: 800; border: 1px solid currentColor; }
        .chip-hot { color: #ff7b7b; background: rgba(255,71,87,0.14); }
        .chip-new { color: #7dffb5; background: rgba(0,255,163,0.12); }
        .chip-fresh { color: #8eb8ff; background: rgba(91,125,255,0.14); }
        .room-hero { text-align: center; margin-bottom: 16px; }
        .room-hero-icon { font-size: 40px; margin-bottom: 8px; }
        .room-summary { color: rgba(255,255,255,0.82); font-size: 13px; line-height: 1.7; margin-bottom: 14px; text-align: center; }
        .room-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 14px; }
        .room-stat { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,215,0,0.18); border-radius: 14px; padding: 10px; text-align: center; }
        .room-stat-label { display: block; font-size: 11px; color: rgba(255,255,255,0.68); margin-bottom: 6px; }
        .room-stat-value { display: block; color: #ffd700; font-size: 16px; font-weight: 800; }
        .room-list { display: grid; gap: 8px; margin-bottom: 14px; }
        .room-list-item { background: rgba(255,255,255,0.04); border-radius: 12px; padding: 11px 12px; color: #fff; font-size: 12px; line-height: 1.6; border: 1px solid rgba(255,255,255,0.08); }
        .room-list-item small { display: block; color: rgba(255,255,255,0.56); font-size: 10px; margin-top: 4px; }
        .room-action-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
        .room-action-btn { width: 100%; border: 1px solid rgba(255,215,0,0.45); border-radius: 14px; padding: 11px 10px; background: rgba(255,215,0,0.08); color: #ffd700; font-weight: 800; cursor: pointer; }
        .room-action-btn.primary { background: linear-gradient(180deg, #ffe36d 0%, #c58c08 100%); color: #000; border-color: #fff1a8; }
        .room-note { margin-top: 12px; font-size: 11px; color: rgba(255,255,255,0.56); text-align: center; line-height: 1.6; }
        .empty-hint { text-align: center; color: rgba(255,255,255,0.6); font-size: 12px; padding: 14px 10px; border: 1px dashed rgba(255,215,0,0.24); border-radius: 12px; }

        /* ================= 🎮 游戏房间卡片网格 ================= */
        .room-games-grid {
            display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px;
        }
        .room-game-card {
            position: relative; aspect-ratio: 3 / 2; border-radius: 16px; overflow: hidden; cursor: pointer;
            border: 1px solid rgba(255,215,0,0.32);
            background: linear-gradient(145deg, rgba(255,255,255,0.12), rgba(0,0,0,0.55));
            display: flex; flex-direction: column; align-items: center; justify-content: center;
            box-shadow: inset 1px 1px 0 rgba(255,255,255,0.28), 0 8px 18px rgba(0,0,0,0.55);
            transition: transform 0.15s;
            opacity: 1;
        }
        .room-game-card:active { transform: scale(0.94); }
        .room-game-card .rgc-cover {
            position: absolute; inset: 0; width: 100%; height: 100%;
            object-fit: cover; border-radius: 16px; z-index: 0;
        }
        .room-game-card:not(.exempt-icon-3d) .rgc-icon {
            font-size: 38px; z-index: 1; margin-bottom: 6px;
            transform: translateZ(24px) rotateX(12deg);
            filter: drop-shadow(0 10px 18px rgba(0,0,0,0.78));
        }
        .room-game-card.exempt-icon-3d .rgc-icon { transform: none; filter: none; }
        .room-game-card .rgc-label {
            position: absolute; bottom: 0; left: 0; right: 0; z-index: 2;
            padding: 6px 8px 8px;
            background: linear-gradient(to top, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.4) 65%, transparent 100%);
            border-radius: 0 0 16px 16px;
            font-size: 13px; font-weight: 800; color: #ffd700;
            text-align: center; text-shadow: 0 1px 4px #000;
        }

        /* ================= 📢 公告滚动条 ================= */
        .announce-bar {
            position: fixed; top: 104px; left: 50%; transform: translateX(-50%);
            width: 50vw; max-width: 240px; height: 24px;
            background: linear-gradient(90deg, transparent, rgba(0,0,0,0.92) 12%, rgba(15,10,5,0.96) 50%, rgba(0,0,0,0.92) 88%, transparent);
            border-radius: 12px; z-index: 998; overflow: hidden;
            display: flex; align-items: center;
            pointer-events: none;
            opacity: 0; transition: opacity 0.5s ease;
        }
        .announce-bar.visible { opacity: 1; }
        .announce-wrap { overflow: hidden; width: 100%; height: 100%; display: flex; align-items: center; }
        .announce-text {
            display: block; width: 100%; text-align: center;
            white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
            color: #ff4444; font-size: 10px; font-weight: bold;
            text-shadow: 0 0 5px rgba(255,50,50,0.5);
            transform: translateY(-120%);
            transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        }
        .announce-text.roll-in  { transform: translateY(0); }
        .announce-text.roll-out { transform: translateY(120%); }
        @media (prefers-reduced-motion: reduce) { .announce-text { transition: none; } }

        /* ================= 👤 头像芯片（顶部右栏） ================= */
        :root { --chip-sz: 66px; }
        @media (max-width: 380px) { :root { --chip-sz: 44px; } }
        @media (max-width: 330px) { :root { --chip-sz: 36px; } }
        .player-chip {
            display: flex; flex-direction: column; align-items: center; gap: 2px;
            cursor: pointer; padding: 2px 4px; border-radius: 8px;
            transition: background 0.15s;
            transform: none;
        }
        .player-chip:active { background: rgba(255,215,0,0.1); }
        .chip-avatar {
            width: var(--chip-sz); height: var(--chip-sz);
            font-size: calc(var(--chip-sz) * 0.72);
            line-height: 1; flex-shrink: 0;
            display: flex; align-items: center; justify-content: center;
            border-radius: 50%;
            border: 2px solid rgba(255,215,0,0.55);
            background: rgba(255,215,0,0.07);
            overflow: hidden;
        }
        .chip-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
        .chip-name {
            font-size: 10px; color: #ffd700; max-width: calc(var(--chip-sz) + 16px);
            overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center;
            display: none;
        }
        .chip-id {
            font-size: 9px; color: rgba(255,255,255,0.65); max-width: calc(var(--chip-sz) + 16px);
            overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center;
        }
        .chip-footer {
            display: flex; align-items: center; gap: 3px;
            font-size: 9px; color: rgba(255,200,0,0.85); white-space: nowrap;
        }
        .head-btn-sm {
            background: rgba(255,255,255,0.05); border: 1px solid rgba(255,215,0,0.4); color: #ffd700;
            padding: 4px 7px; border-radius: 6px; font-size: 11px; font-weight: bold;
            cursor: pointer; text-shadow: 0 0 5px #000; white-space: nowrap;
        }
        .header-right { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; justify-content: center; position: absolute; top: 8px; right: 10px; z-index: 2; }

        /* ================= 📝 资料编辑弹窗 ================= */
        .avatar-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 10px 0; }
        .avatar-opt {
            width: 100%; aspect-ratio: 1; font-size: 28px;
            display: flex; align-items: center; justify-content: center;
            border: 2px solid rgba(255,215,0,0.2); border-radius: 10px;
            cursor: pointer; background: rgba(255,255,255,0.04);
            transition: border-color 0.15s;
        }
        .avatar-opt.selected { border-color: #ffd700; background: rgba(255,215,0,0.12); }
        .avatar-opt:active { transform: scale(0.92); }
        .edit-input {
            width: 100%; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,215,0,0.4);
            border-radius: 8px; color: #fff; font-size: 15px; padding: 8px 12px; margin: 8px 0;
            outline: none;
        }
        .edit-input:focus { border-color: #ffd700; }
        .upload-btn {
            width: 100%; background: rgba(255,255,255,0.05); border: 1px dashed rgba(255,215,0,0.4);
            color: #ffd700; padding: 9px; border-radius: 8px; font-size: 13px; cursor: pointer;
            text-align: center; margin-top: 6px;
        }

        /* ================= 👑 VIP 等级条 ================= */
        .vip-bar-wrap {
            margin: 10px 0 18px; padding: 0 2px;
        }
        .vip-bar-track {
            display: flex; align-items: stretch; gap: 2px; width: 100%; overflow: hidden;
        }
        .vip-seg {
            flex: 1; min-width: 0; border-radius: 4px;
            border: 1.5px solid rgba(255,215,0,0.35); background: transparent;
            display: flex; flex-direction: column; align-items: center; justify-content: center;
            padding: 5px 1px; cursor: default; transition: background 0.2s;
        }
        .vip-seg.active {
            background: linear-gradient(180deg, #ffe36d, #c58c08); border-color: #ffe36d;
        }
        .vip-seg.passed {
            background: rgba(255,215,0,0.18); border-color: rgba(255,215,0,0.5);
        }
        .vip-seg-label {
            font-size: 9px; font-weight: 800; color: #ffd700; white-space: nowrap; line-height: 1.2;
        }
        .vip-seg.active .vip-seg-label { color: #000; }
        .vip-seg.passed .vip-seg-label { color: rgba(255,215,0,0.9); }
        .vip-levels-table {
            width: 100%; border-collapse: collapse; font-size: 11px; margin-top: 4px;
        }
        .vip-levels-table th {
            color: rgba(255,215,0,0.7); font-weight: 700; padding: 5px 4px; text-align: left;
            border-bottom: 1px solid rgba(255,215,0,0.2);
        }
        .vip-levels-table td {
            color: rgba(255,255,255,0.85); padding: 5px 4px; border-bottom: 1px solid rgba(255,255,255,0.05);
        }
        .vip-levels-table tr.current-vip td { color: #ffd700; font-weight: 800; }
        .vip-levels-table tr.coming-soon td { color: rgba(255,255,255,0.35); font-style: italic; }

        /* ================= 💰 流水返水面板 ================= */
        .cashback-info-grid {
            display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0;
        }
        .cashback-stat {
            background: rgba(255,255,255,0.04); border: 1px solid rgba(255,215,0,0.18);
            border-radius: 14px; padding: 10px; text-align: center;
        }
        .cashback-stat-label { display: block; font-size: 11px; color: rgba(255,255,255,0.68); margin-bottom: 5px; }
        .cashback-stat-value { display: block; color: #ffd700; font-size: 18px; font-weight: 800; }
        .cashback-rules {
            font-size: 11px; color: rgba(255,255,255,0.55); line-height: 1.7; margin-top: 10px;
        }
        .cashback-rules p { margin: 3px 0; }

        /* ================= 🏠 精选房间（默认隐藏，横屏媒体查询中显示） ================= */
        .featured-rooms-section { display: none; }

        /* ================= 📱 横屏（Landscape）布局 ================= */
        /* content-col：竖屏时透明包装，横屏时变弹性右栏 */
        .content-col { display: contents; }

        @media (orientation: landscape) {
            /* 背景：横屏时拉伸封面图铺满 */
            .page-background {
                background-image: url('/yy9封面.jpg');
                background-size: cover;
            }
            #splash-screen { background-size: cover; }

            /* ---- 顶部导航栏：严格不超过屏高 1/5 ---- */
            .fixed-header {
                height: min(20vh, 56px);
                max-width: 100vw;
                left: 0;
                transform: none;
                padding: 3px 8px;
                gap: 6px;
            }
            .header-center { order: -2; }
            .header-col    { order: -1; gap: 5px; flex-direction: column; justify-content: center; }
            .header-right  { order:  0; }

            /* Logo 缩小至约一半 */
            .orbit-wrapper { width: 42px; height: 42px; }
            .coin-img      { width: 42px; height: 42px; }

            /* 按钮：卡片风格 */
            .head-btn {
                font-size: 10px; padding: 4px 10px; min-width: 58px;
                text-align: center; border-radius: 8px;
                background: rgba(255,215,0,0.09);
                border: 1px solid rgba(255,215,0,0.55);
                box-shadow: inset 0 1px 0 rgba(255,255,255,0.15), 0 3px 8px rgba(0,0,0,0.4);
            }

            /* 玩家芯片：Grid — 左列(VIP) | 右上(头像) / 右下(昵称) */
            :root { --chip-sz: 34px; }
            .player-chip {
                display: grid !important;
                grid-template-areas: "footer avatar" "footer name";
                grid-template-columns: auto auto;
                grid-template-rows: 1fr 1fr;
                gap: 0 5px;
                transform: none;
                padding: 2px 4px;
            }
            .chip-footer {
                grid-area: footer; order: unset;
                display: flex !important; flex-direction: column;
                align-items: flex-end; justify-content: space-around;
                font-size: 8px; gap: 0;
            }
            .chip-footer span:nth-child(3) { display: none; }
            .chip-avatar { grid-area: avatar; order: unset; align-self: end; }
            .chip-name   { grid-area: name;   order: unset; font-size: 9px; text-align: center; }
            .chip-id     { display: none; }

            /* 公告条：横屏时嵌入导航栏中央 */
            .announce-bar {
                display: flex !important;
                position: fixed; top: 0; left: 50%;
                transform: translateX(-50%);
                width: 38%; max-width: 320px;
                height: min(20vh, 56px);
                background: transparent; border-radius: 0; z-index: 999; overflow: hidden;
            }
            .announce-text { font-size: 11px; }

            /* ---- 主内容区：flex 行布局 ---- */
            .app-container {
                max-width: 100vw;
                padding-top: min(20vh, 56px);
                padding-bottom: 0; padding-left: 6px; padding-right: 6px;
                display: flex; flex-direction: row; align-items: stretch;
                gap: 6px; height: 100vh; overflow: hidden;
            }

            /* ---- 左侧边栏：排行榜 + 转盘 ---- */
            .top-widget-area {
                display: flex !important; flex-direction: column;
                width: 118px; flex-shrink: 0; height: 100%;
                padding: min(20vh, 56px) 0 6px; gap: 6px;
                box-sizing: border-box;
                position: static; transform: none;
                background: transparent;
                backdrop-filter: none; -webkit-backdrop-filter: none;
                border-bottom: none; top: auto; left: auto;
            }
            .leaderboard-box {
                flex: 1; min-height: 0; max-width: none;
                height: auto; aspect-ratio: unset;
            }
            .leaderboard-title { font-size: 11px; margin-bottom: 6px; }
            .leaderboard-scroll { font-size: 10px; line-height: 20px; }
            .leaderboard-track { gap: 8px; }
            .inline-wheel-section { flex-shrink: 0; padding-bottom: 4px; margin: -12px 0 -14px; }
            .wheel-wrap { width: 120px; height: 120px; }
            .wheel-spin-btn { width: 36px; height: 36px; font-size: 11px; }
            .wheel-txt { font-size: 10px; }
            .w1 { transform: rotate(0deg)   translateY(-46px); }
            .w2 { transform: rotate(45deg)  translateY(-46px); }
            .w3 { transform: rotate(90deg)  translateY(-46px); }
            .w4 { transform: rotate(135deg) translateY(-46px); }
            .w5 { transform: rotate(180deg) translateY(-46px); }
            .w6 { transform: rotate(225deg) translateY(-46px); }
            .w7 { transform: rotate(270deg) translateY(-46px); }
            .w8 { transform: rotate(315deg) translateY(-46px); }
            #wheelResult { font-size: 9px; margin-top: 4px; }

            /* ---- 右侧内容列 ---- */
            .content-col {
                display: flex; flex-direction: column; flex: 1; min-width: 0;
                height: 100%;
                padding-top: min(20vh, 56px); padding-bottom: 6px;
                overflow-y: auto; overflow-x: hidden;
                gap: 2px; box-sizing: border-box;
                scrollbar-width: thin;
                scrollbar-color: rgba(255,215,0,0.3) transparent;
            }

            /* ---- Spotlight 区：2行横向滚动网格 ---- */
            .spotlight-section { padding: 0 4px; margin-bottom: 2px; }
            .spotlight-title   { font-size: 11px; margin-bottom: 2px; }
            .spotlight-title span:first-child { font-size: 11px; }
            .spotlight-scroll {
                display: grid !important;
                grid-template-rows: repeat(2, 50px);
                grid-auto-flow: column;
                grid-auto-columns: 75px;
                gap: 4px;
                overflow-x: auto !important;
                overflow-y: hidden;
                padding-bottom: 0;
                scrollbar-width: none;
            }
            .spotlight-scroll::-webkit-scrollbar { display: none; }
            .spotlight-card {
                min-height: 0; height: 50px;
                padding: 4px 5px; border-radius: 8px;
                flex: unset;
            }
            .spotlight-card strong { font-size: 9px; margin: 2px 0 1px; }
            .spotlight-card p      { font-size: 7px; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
            .spotlight-chip        { font-size: 7px; padding: 1px 4px; }

            /* ---- 游戏网格：2行横向滚动，封面卡跨2行 ---- */
            .main-grid {
                display: grid !important;
                grid-template-rows: repeat(2, 60px);
                grid-auto-flow: column;
                grid-auto-columns: 90px;
                overflow-x: auto !important;
                overflow-y: hidden;
                gap: 5px; padding: 0 4px;
                margin-bottom: 4px;
                flex-shrink: 0;
                scrollbar-width: none;
            }
            .main-grid::-webkit-scrollbar { display: none; }
            .main-grid .magic-3d-item {
                flex: unset; width: auto; height: 60px;
                border-radius: 10px; animation: none; aspect-ratio: unset;
            }
            .main-grid .magic-icon { font-size: 22px; margin-bottom: 1px; }
            .main-grid .magic-text { font-size: 9px; padding: 1px 4px; }

            /* ---- 精选房间：横屏时显示 ---- */
            .featured-rooms-section { display: block !important; }
        }


/* 顶部右上按钮稳定展示（登录/VIP + 我的） */
.header-right .head-btn-sm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 62px;
}
.header-right { min-width: 120px; }

/* ── 游戏厅分类入口卡片 ── */
.hall-rooms-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 8px;
}
.hall-room-card {
    background: rgba(255, 215, 0, 0.08);
    border: 1px solid rgba(255, 215, 0, 0.28);
    border-radius: 16px;
    padding: 18px 10px 14px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 4px 16px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.08);
    /* 8% transparent card background */
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}
.hall-room-card:active { transform: scale(0.95); }
.hall-room-card:hover { box-shadow: 0 6px 20px rgba(255,215,0,0.18), inset 0 1px 0 rgba(255,255,255,0.12); border-color: rgba(255,215,0,0.5); }
.hall-room-icon {
    font-size: 40px;
    margin-bottom: 8px;
    display: block;
    /* 3D raised feel for icon */
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.6)) drop-shadow(0 1px 0 rgba(255,255,255,0.15));
    line-height: 1;
}
.hall-room-name {
    font-size: 14px;
    font-weight: 800;
    color: #ffd700;
    letter-spacing: 1px;
    /* 3D text effect */
    text-shadow: 0 2px 0 rgba(0,0,0,0.7), 0 0 10px rgba(255,215,0,0.4), 0 1px 0 rgba(255,200,0,0.9);
}
