/* 之前的通用样式保持不变 */
html, body {
    margin: 0 !important; padding: 0 !important;
    background-color: #080506 !important;
    background-image: radial-gradient(900px 520px at 50% -10%, rgba(255, 215, 140, 0.16), transparent 60%), radial-gradient(800px 600px at 8% 18%, rgba(139, 30, 45, 0.26), transparent 62%), linear-gradient(180deg, #0c0608, #080506 55%) !important;
    color: #f7ead5 !important; font-family: system-ui, -apple-system, "Microsoft YaHei", sans-serif !important;
    height: 100vh; overflow: hidden; width: 100%;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent;}
#fx { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
.btn-gold, .btn-ghost { appearance: none; border-radius: 12px; padding: 12px 18px; font-weight: 900; cursor: pointer; font-size: 13px; transition: 0.2s; border: none; display: inline-flex; justify-content: center; align-items: center; text-decoration: none; width: 100%; outline: none;}
.btn-gold { color: #241307; background: linear-gradient(120deg, #fff0c6, #ffdf9e 40%, #c48c35); box-shadow: 0 8px 25px rgba(240,201,107,.2); }
.btn-gold:hover { filter: brightness(1.1); transform: translateY(-2px);}
.btn-ghost { border: 1px solid rgba(240,201,107,.3); color: #f7ead5; background: rgba(255,255,255,.03); cursor: pointer;}
.btn-ghost:hover { background: rgba(240,201,107,.08); }
.btn-gold:disabled { opacity: .4; cursor: not-allowed; transform: none; box-shadow: none; }
.title { font-size: 38px; background: linear-gradient(100deg, #fff7e8 10%, #ffdf9e 40%, #e8c37a 62%, #fff7e8); -webkit-background-clip: text; color: transparent; margin: 0 0 15px; line-height: 1.1; font-family: Georgia, serif;}
.muted { color: #b9a58d; font-size: 13px; line-height: 1.6; }
.crown { width: 46px; height: 46px; border-radius: 12px; background: linear-gradient(135deg, #ffe9b5, #c48c35); position: relative; display: inline-block; vertical-align: middle; flex-shrink: 0;}
.crown::after { content: "♛"; position: absolute; inset: 0; display: flex; justify-content: center; align-items: center; color: #2a1607; font-size: 26px; font-weight: 900; }

.topbar { position: fixed; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 15px; padding: 10px 20px; border-bottom: 1px solid rgba(240,201,107,.22); background: rgba(10,6,8,.95); backdrop-filter: blur(10px); z-index: 100; flex-wrap: nowrap; height: 64px;}
.mini-brand { display: flex; align-items: center; gap: 10px; font-family: Georgia, serif; font-weight: bold; letter-spacing: 1px; color: #f0c96b; flex-shrink: 0;}
.nav { display: flex; gap: 5px; overflow-x: auto; flex: 1; }
.nav a { background: none; border: none; color: #b9a58d; padding: 8px 12px; border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: bold; white-space: nowrap; text-decoration: none;}
.nav a.active { color: #241307; background: linear-gradient(120deg, #ffe6a8, #f0c96b); }
.top-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0;}
.balance-pill { border: 1px solid rgba(240,201,107,.3); background: rgba(240,201,107,.08); color: #ffe6a8; padding: 6px 12px; border-radius: 99px; font-size: 12px; font-weight: bold; white-space: nowrap;}
.avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, #ffe9b5, #c48c35); display: flex; justify-content: center; align-items: center; color: #000; font-weight: bold; font-size: 12px; flex-shrink: 0;}
.topbar #logoutBtn { width: auto !important; padding: 6px 14px !important; height: 32px; font-size: 12px; flex-shrink: 0;}

.page-wrap { padding-top: 80px; width: min(1200px, 95vw); margin: 0 auto; padding-bottom: 40px; height: 100vh; overflow-y: auto;}
.panel { border: 1px solid rgba(240,201,107,.22); border-radius: 20px; background: rgba(20,12,14,.8); box-shadow: 0 10px 40px rgba(0,0,0,.5); margin-bottom: 16px;}
.panel-inner { padding: 20px; }
.panel-head { display: flex; justify-content: space-between; margin-bottom: 15px; flex-wrap: wrap; gap: 10px;}
.panel-head h2, h2 { margin: 0; font-size: 16px; font-family: Georgia, serif; color: #f0c96b; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.hero { padding: 30px; border-radius: 20px; border: 1px solid rgba(240,201,107,.22); background: linear-gradient(135deg, rgba(43,24,27,.9), rgba(14,8,10,.9)); margin-bottom: 20px; }

.auth { min-height: 100vh; display: flex; justify-content: center; align-items: center; padding: 20px; }
.auth-wrap { width: min(1000px, 100%); display: flex; flex-wrap: wrap; border: 1px solid rgba(240,201,107,.3); border-radius: 24px; overflow: hidden; background: rgba(20, 12, 14, 0.85); backdrop-filter: blur(20px); box-shadow: 0 50px 150px rgba(0,0,0,.8); }
.auth-left { flex: 1 1 500px; padding: 50px; display: flex; flex-direction: column; justify-content: center;}
.auth-right { flex: 1 1 400px; padding: 50px; background: rgba(0,0,0,.4); border-left: 1px solid rgba(240,201,107,.2); }
.brand-row { display: flex; gap: 15px; margin-bottom: 30px; align-items: center; }
.brand-row b { display: block; font-family: Georgia, serif; font-size: 18px; letter-spacing: 2px; color: #f0c96b; }
.auth-tabs { display: flex; gap: 10px; margin-bottom: 25px; }
.auth-tabs button { flex: 1; background: none; border: none; border-bottom: 2px solid transparent; color: #b9a58d; padding: 10px; font-size: 16px; cursor: pointer; }
.auth-tabs button.active { color: #f0c96b; border-bottom-color: #f0c96b; }
.field { margin-bottom: 20px; }
.field label { display: block; color: #b9a58d; font-size: 12px; margin-bottom: 8px; }
.field input { width: 100%; padding: 14px; border-radius: 10px; border: 1px solid rgba(240,201,107,.2); background: rgba(0,0,0,.5); color: #fff; outline: none; }
.field input:focus { border-color: #f0c96b; }

.room-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 15px; margin-top: 20px; }
.room-card { background: linear-gradient(180deg, rgba(61,35,40,.95), rgba(20,11,14,.98)); border: 1px solid rgba(240,201,107,.3); border-radius: 16px; padding: 25px 15px; text-align: center; cursor: pointer; transition: 0.3s; text-decoration: none; color: inherit; display: block;}
.room-card:hover { transform: translateY(-5px); border-color: #f0c96b; box-shadow: 0 10px 30px rgba(240,201,107,.15); }
.room-card h3 { margin: 0 0 10px; color: #f0c96b; font-size: 20px; font-family: Georgia, serif;}
.room-card p { color: #b9a58d; font-size: 12px; margin: 5px 0; }
.room-card .online { color: #4ce3a0; font-size: 11px; margin-top: 15px; display: flex; align-items: center; justify-content: center; gap: 5px; }

.numbers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 15px; }
.num { border: 1px solid rgba(240,201,107,.22); background: rgba(0,0,0,.4); color: #fff; font-size: 32px; font-weight: bold; font-family: Georgia, serif; padding: 20px 0; border-radius: 12px; cursor: pointer; transition: 0.2s; text-align: center; }
.num:hover:not(:disabled) { border-color: #f0c96b; }
.num.picked { border-color: #4ce3a0; color: #4ce3a0; box-shadow: 0 0 20px rgba(76,227,160,.3); transform: scale(1.05); }
.num:disabled { cursor: not-allowed; opacity: 0.5; }
.order-box { display: flex; align-items: center; gap: 15px; border: 1px dashed rgba(240,201,107,.22); padding: 15px; border-radius: 12px; margin-bottom: 15px; }
.slots { display: flex; gap: 10px; }
.slots span { width: 50px; height: 40px; border: 1px solid rgba(240,201,107,.22); border-radius: 8px; display: flex; justify-content: center; align-items: center; font-weight: bold; color: #b9a58d; font-size: 14px; transition: 0.3s;}
.multiplier-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 15px; }
.m-btn { background: rgba(0,0,0,0.5); border: 1px solid rgba(240,201,107,0.3); border-radius: 10px; padding: 10px 5px; text-align: center; cursor: pointer; transition: 0.2s; color: #f7ead5; }
.m-btn:hover { border-color: #f0c96b; background: rgba(240,201,107,0.1); }
.m-btn.active { background: linear-gradient(120deg, #ffe6a8, #f0c96b); color: #241307; border-color: #f0c96b; box-shadow: 0 0 15px rgba(240,201,107,0.3); }
.m-btn.disabled { opacity: 0.3; cursor: not-allowed; border-color: #333; background: #111; }
.m-btn b { display: block; font-size: 16px; font-family: Georgia, serif; margin-bottom: 4px; }
.m-btn span { font-size: 10px; }
.result { padding: 20px; border-radius: 12px; text-align: center; font-weight: bold; font-size: 18px; border: 1px solid rgba(240,201,107,.22); background: rgba(255,255,255,.02); }
.result.win { color: #4ce3a0; border-color: #4ce3a0; background: rgba(76,227,160,.1); }
.result.lose { color: #ff6b81; border-color: #ff6b81; background: rgba(255,107,129,.1); }
.seat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 10px; }
.seat { border: 1px solid rgba(240,201,107,.22); background: rgba(0,0,0,.3); border-radius: 12px; padding: 10px; text-align: center; font-size: 11px; transition: 0.3s; }
.seat.you { border-color: #f0c96b; background: rgba(240,201,107,.1); }
.seat.win { border-color: #4ce3a0; background: rgba(76,227,160,.15); box-shadow: 0 0 20px rgba(76,227,160,.3); transform: scale(1.05); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 10px; text-align: left; border-bottom: 1px solid rgba(255,255,255,.05); white-space: nowrap;}
th { color: #b9a58d; font-size: 11px; }
.log-list { display: flex; flex-direction: column; gap: 8px; max-height: 400px; overflow-y: auto; }
.log-item { border: 1px solid rgba(255,255,255,.05); padding: 10px; border-radius: 8px; font-size: 12px; display: flex; justify-content: space-between; }
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.85); display: flex; justify-content: center; align-items: center; z-index: 999; }
.modal[hidden] { display: none !important; }
.modal-content { background: linear-gradient(180deg, #2a1a1e, #11080a); border: 1px solid #f0c96b; padding: 30px 25px 25px 25px; border-radius: 16px; width: 90%; max-width: 380px; text-align: center; position: relative; }
.close-btn { position: absolute; top: 12px; right: 15px; background: transparent; border: none; color: #b9a58d; font-size: 22px; cursor: pointer; line-height: 1; transition: 0.2s;}
.close-btn:hover { color: #fff; }
.toast { position: fixed; bottom: 40px; left: 50%; transform: translateX(-50%) translateY(20px); background: rgba(20,12,14,.95); border: 1px solid #f0c96b; color: #f0c96b; padding: 12px 24px; border-radius: 99px; font-size: 13px; font-weight: bold; z-index: 300; opacity: 0; transition: 0.3s; pointer-events: none; white-space: nowrap;}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.live-broadcast { position: fixed; top: 80px; right: 20px; z-index: 99; pointer-events: none; display: flex; flex-direction: column; align-items: flex-end;}
.lb-item { background: rgba(0,0,0,.7); border: 1px solid rgba(240,201,107,.22); padding: 8px 12px; border-radius: 99px; font-size: 11px; color: #ccc; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; animation: slideIn .3s ease-out; backdrop-filter: blur(4px); }
.lb-item b { color: #f0c96b; }
.avatar-s { width: 20px; height: 20px; border-radius: 50%; display: flex; justify-content: center; align-items: center; color: #fff; font-size: 10px; flex-shrink: 0;}
@keyframes slideIn { from { transform: translateX(20px); opacity: 0; } to { transform: none; opacity: 1; } }
.radar-spinner { width: 80px; height: 80px; border-radius: 50%; border: 2px solid rgba(240,201,107,.2); margin: 0 auto 20px; position: relative; }
.radar-spinner::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid #f0c96b; animation: radar 1.5s linear infinite; }
@keyframes radar { 0% { transform: scale(.3); opacity: 1; } 100% { transform: scale(1.5); opacity: 0; } }

/* ========================================= */
/* 📱 手机端 9:16 绝对沉浸式适配 (暴力强制全屏) */
/* ========================================= */
@media(max-width: 768px) {
    /* 强制登录页全屏无留白 */
    .auth { padding: 0 !important; align-items: stretch !important; }
    .auth-wrap { 
        flex-direction: column !important; 
        width: 100% !important; 
        height: 100vh !important; 
        border-radius: 0 !important; 
        border: none !important; 
        background: transparent !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
    }
    .auth-left { flex: none !important; padding: 60px 20px 40px !important; text-align: center; border-bottom: 1px solid rgba(240,201,107,.2); background: transparent !important;}
    .auth-left .title { font-size: 32px !important; }
    .auth-right { flex: 1 !important; padding: 30px 20px !important; border-left: none !important; background: transparent !important; display: flex; flex-direction: column; justify-content: center;}
    
    /* 顶部导航紧凑收拢 */
    .topbar { height: auto !important; padding: 10px 15px !important; flex-wrap: wrap !important; justify-content: space-between !important; }
    .nav { order: 3 !important; flex-basis: 100% !important; justify-content: flex-start !important; margin-top: 10px !important; padding-bottom: 5px !important;}
    .top-right { margin-left: auto !important; }
    
    /* 内容区100%宽度，底部留出安全区 */
    .page-wrap { padding-top: 110px !important; width: 100% !important; padding-left: 15px !important; padding-right: 15px !important; padding-bottom: 80px !important; height: auto !important;}
    
    /* 大厅变 2x2 网格 */
    .room-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 12px !important; }
    .room-card { padding: 20px 10px !important; }
    .room-card h3 { font-size: 18px !important; }
    
    /* 游戏区适配 */
    .numbers { gap: 8px !important; }
    .num { font-size: 28px !important; padding: 18px 0 !important; }
    .multiplier-grid { grid-template-columns: repeat(3, 1fr) !important; gap: 10px !important;}
    .m-btn { padding: 8px 5px !important; }
    .seat-grid { grid-template-columns: repeat(2, 1fr) !important; }
    
    /* 弹窗居中 */
    .modal-content { width: 90% !important; padding: 20px !important; }
    
    /* 跑马灯下移 */
    .live-broadcast { top: 120px !important; right: 10px !important;}
    .lb-item { font-size: 10px !important; padding: 6px 10px !important; }
    
    /* iOS 底部安全区 */
    .toast { bottom: calc(30px + env(safe-area-inset-bottom)) !important; }
}