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;
    min-height: 100vh;
    overflow-x: hidden;
}
* { box-sizing: border-box; }
#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;}
.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); }
.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; }

/* 登录页 */
.auth { position: relative; z-index: 1; min-height: 100vh; display: flex; justify-content: center; align-items: center; padding: 20px; overflow: hidden; }
.cinematic-bg { position: absolute; inset: -50%; background: conic-gradient(from 0deg, transparent 0deg, rgba(240,201,107,0.05) 90deg, transparent 180deg, rgba(139,30,45,0.05) 270deg, transparent 360deg); animation: rotateBg 20s linear infinite; z-index: -1; }
@keyframes rotateBg { 100% { transform: rotate(360deg); } }
.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; position: relative; 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; }
.brand-row span { color: #b9a58d; font-size: 10px; letter-spacing: 2px; }
.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; transition: 0.2s;}
.field input:focus { border-color: #f0c96b; }
.msg { color: #ff6b81; font-size: 12px; margin-bottom: 10px; display: none; }

/* 主应用 */
.app { position: relative; z-index: 1; min-height: 100vh; }
.topbar { position: sticky; top: 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: 30; flex-wrap: wrap;}
.mini-brand { display: flex; align-items: center; gap: 10px; font-family: Georgia, serif; font-weight: bold; letter-spacing: 1px; color: #f0c96b; }
.nav { display: flex; gap: 5px; overflow-x: auto; flex: 1; }
.nav button { background: none; border: none; color: #b9a58d; padding: 8px 12px; border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: bold; white-space: nowrap; }
.nav button.active { color: #241307; background: linear-gradient(120deg, #ffe6a8, #f0c96b); }
.top-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap;}
.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; }
.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; }
.main { width: min(1200px, 95vw); margin: 0 auto; padding: 20px 0 60px; }
.view { display: none; animation: fadeIn .3s ease; }
.view.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* 面板 */
.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); }
.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; }

/* 后台菜单 */
.admin-nav { display: flex; gap: 10px; margin-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 10px; overflow-x: auto;}
.admin-nav button { background: none; border: none; color: #b9a58d; font-size: 16px; font-weight: bold; cursor: pointer; padding: 5px 15px; white-space: nowrap;}
.admin-nav button.active { color: #f0c96b; border-bottom: 2px solid #f0c96b; }
.atab-content { display: none; animation: fadeIn .3s; }
.atab-content.active { display: block; }

/* 大厅场次卡片 */
.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; }
.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; }
.dot-green { width: 6px; height: 6px; background: #4ce3a0; border-radius: 50%; box-shadow: 0 0 8px #4ce3a0; animation: pulse 1.5s infinite; }
@keyframes pulse { 0% { opacity: 0.6; } 50% { opacity: 1; } 100% { opacity: 0.6; } }

/* 游戏区 */
.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 { border-color: #f0c96b; }
.num.picked { border-color: #f0c96b; color: #f0c96b; box-shadow: 0 0 20px rgba(240,201,107,.3); transform: scale(1.05); }
.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: 40px; 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: #f0c96b; font-size: 18px; }
.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); animation: popWin 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.result.lose { color: #ff6b81; border-color: #ff6b81; background: rgba(255,107,129,.1); }
@keyframes popWin { 0% { transform: scale(0.8); opacity: 0; } 100% { transform: scale(1); opacity: 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); }
.seat b { display: block; color: #fff; margin-bottom: 5px; font-size: 12px; }
.seat span { color: #b9a58d; }

/* 表格 */
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: 300px; 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; backdrop-filter: blur(5px); }
.modal[hidden] { display: none !important; }
.modal-content { background: linear-gradient(180deg, #2a1a1e, #11080a); border: 1px solid #f0c96b; padding: 25px; border-radius: 16px; width: 90%; max-width: 380px; text-align: center; position: relative; }
.close-btn { position: absolute; top: 10px; right: 15px; background: none; border: none; color: #b9a58d; font-size: 20px; cursor: pointer; }
.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; } }
.toast { position: fixed; bottom: 30px; 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; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.live-broadcast { position: fixed; top: 80px; left: 20px; z-index: 10; pointer-events: none; }
.lb-item { background: rgba(0,0,0,.6); 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; } }

/* 手机端适配 */
@media(max-width: 768px) {
  .auth-wrap { flex-direction: column; }
  .auth-left { padding: 30px; }
  .auth-right { padding: 30px; border-left: none; border-top: 1px solid rgba(240,201,107,.2); }
}