/* ============================================
   加拿大28 - 专业彩票UI风格 v2.0
   枫叶红 + 金色 + 深蓝主题
   ============================================ */

:root {
    --red: #E63946;
    --red-dark: #C1121F;
    --red-light: #FADDE1;
    --gold: #FFD700;
    --gold-dark: #DAA520;
    --blue: #1D3557;
    --blue-light: #457B9D;
    --green: #2A9D8F;
    --purple: #7B2D8E;
    --orange: #E76F51;
    --bg: #F0F2F5;
    --bg-card: #FFFFFF;
    --bg-dark: #1D3557;
    --text: #1A1A2E;
    --text-secondary: #6B7280;
    --text-light: #9CA3AF;
    --border: #E5E7EB;
    --shadow: 0 2px 12px rgba(0,0,0,.08);
    --shadow-lg: 0 8px 30px rgba(0,0,0,.12);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-xs: 6px;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', 'Microsoft YaHei', sans-serif;
    background: var(--bg); color: var(--text);
    min-height: 100vh; min-height: -webkit-fill-available;
    overflow-x: hidden; font-size: .78rem; line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* ========== CSS 图标系统 ========== */
.icon { display: inline-flex; align-items: center; justify-content: center; font-style: normal; }
.icon-svg { width: 1em; height: 1em; fill: currentColor; }

.icon-home::before { content: "⌂"; font-size: 1.2em; }
.icon-record::before { content: "☰"; font-size: 1em; }
.icon-chat::before { content: "☏"; font-size: 1.1em; }
.icon-wallet::before { content: "₿"; font-size: .9em; }
.icon-user::before { content: "◎"; font-size: 1.1em; }
.icon-back::before { content: "‹"; font-size: 1.4em; }
.icon-close::before { content: "✕"; font-size: .9em; }
.icon-arrow::before { content: "›"; font-size: 1em; }
.icon-down::before { content: "▼"; font-size: .6em; }
.icon-up::before { content: "▲"; font-size: .6em; }
.icon-notice::before { content: "ℹ"; font-size: .8em; }
.icon-sync::before { content: "⟳"; font-size: .9em; }
.icon-bet::before { content: "✓"; font-size: .8em; }
.icon-cancel::before { content: "✕"; font-size: .7em; }
.icon-lottery::before { content: "★"; font-size: .9em; }
.icon-trend::before { content: "↗"; font-size: .9em; }
.icon-phone::before { content: "✆"; font-size: .9em; }
.icon-mail::before { content: "✉"; font-size: .8em; }
.icon-copy::before { content: "📋"; font-size: .8em; }
.icon-qr::before { content: "◈"; font-size: .8em; }
.icon-service::before { content: "☺"; font-size: 1em; }
.icon-intro::before { content: "📖"; font-size: .9em; }
.icon-setting::before { content: "⚙"; font-size: .9em; }
.icon-logout::before { content: "⏻"; font-size: .9em; }
.icon-agent::before { content: "👥"; font-size: .9em; }
.icon-team::before { content: "👤"; font-size: .9em; }
.icon-income::before { content: "₿"; font-size: .8em; }
.icon-redpacket::before { content: "🧧"; font-size: .9em; }
.icon-send::before { content: "➤"; font-size: .7em; }
.icon-search::before { content: "🔍"; font-size: .8em; }
.icon-maple { display: inline-flex; }
.icon-maple::before { content: "🍁"; font-size: 1.1em; }

/* ========== 通用组件 ========== */
.page { display: none; flex-direction: column; min-height: 100vh; }
.sub-page { padding-top: 2.4rem; padding-bottom: calc(56px + var(--safe-bottom)); }

.btn-block { width: 100%; display: block; }
.btn-primary {
    width: 100%; padding: .72rem; border: none; border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--red), var(--red-dark)); color: #fff;
    font-size: .82rem; font-weight: 600; cursor: pointer; transition: all .2s;
    box-shadow: 0 4px 12px rgba(230,57,70,.35);
}
.btn-primary:active { transform: scale(.97); opacity: .9; }
.btn-outline {
    width: 100%; padding: .65rem; border: 2px solid var(--red); border-radius: var(--radius-sm);
    background: transparent; color: var(--red); font-size: .82rem; font-weight: 600;
    cursor: pointer; margin-top: .5rem; transition: all .2s;
}
.btn-outline:active { background: var(--red-light); }
.btn-danger {
    width: 100%; padding: .7rem; border: none; border-radius: var(--radius-sm);
    background: var(--red-dark); color: #fff; font-size: .82rem; font-weight: 600; cursor: pointer;
}
.btn-cancel {
    width: 100%; padding: .6rem; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
    background: #fff; color: var(--text-secondary); font-size: .78rem; cursor: pointer; margin-top: .4rem;
}

.section-card {
    background: var(--bg-card); border-radius: var(--radius); margin: .5rem .5rem 0;
    padding: .75rem; box-shadow: var(--shadow);
}
.section-card-title {
    font-size: .78rem; font-weight: 700; color: var(--text); margin-bottom: .5rem;
    display: flex; align-items: center; gap: .35rem;
}
.section-card-title .icon-maple { color: var(--red); }
.section-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: .6rem .6rem .3rem; font-size: .72rem; font-weight: 600; color: var(--text-secondary);
}
.section-more { color: var(--red); cursor: pointer; font-weight: 500; }

.form-row { display: flex; align-items: center; margin-bottom: .6rem; gap: .4rem; }
.form-row label { width: 4.2rem; font-size: .72rem; color: var(--text-secondary); flex-shrink: 0; }
.form-row input, .form-row select {
    flex: 1; padding: .5rem .6rem; border: 1px solid var(--border); border-radius: var(--radius-xs);
    font-size: .78rem; outline: none; background: #fafafa; transition: border-color .2s;
}
.form-row input:focus, .form-row select:focus { border-color: var(--red); background: #fff; }
.form-tip { font-size: .68rem; color: var(--text-secondary); background: #F0F2F5; padding: .45rem .6rem; border-radius: var(--radius-xs); margin-bottom: .6rem; }

.list-container { padding: .25rem .5rem; }
.empty-state { text-align: center; padding: 2.5rem 1rem; color: var(--text-light); }
.empty-state .icon { font-size: 2.2rem; margin-bottom: .4rem; }

/* ========== Toast ========== */
.toast {
    position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
    background: rgba(29,53,87,.92); color: #fff; padding: .55rem 1rem; border-radius: 10px;
    font-size: .78rem; z-index: 9999; display: none; max-width: 85%; text-align: center;
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 8px 30px rgba(0,0,0,.25);
}

/* ========== 遮罩 ========== */
.v-modal { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 99; display: none; backdrop-filter: blur(3px); }
.v-modal.show { display: block; }

/* ========== 登录/注册页 ========== */
.auth-page {
    min-height: 100vh; min-height: -webkit-fill-available;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(160deg, #1D3557 0%, #16213e 40%, #0a1628 100%);
    padding: 1.2rem; position: relative; overflow: hidden;
}
.auth-page::before {
    content: '28'; position: absolute; font-size: 20rem; font-weight: 900;
    color: rgba(255,255,255,.03); top: 50%; left: 50%; transform: translate(-50%,-50%);
    pointer-events: none;
}
.auth-bg-circle {
    position: absolute; border-radius: 50%; background: rgba(255,255,255,.03);
}
.auth-bg-circle.c1 { width: 300px; height: 300px; top: -80px; right: -60px; }
.auth-bg-circle.c2 { width: 200px; height: 200px; bottom: -40px; left: -40px; }

.auth-card {
    width: 100%; max-width: 340px; background: #fff; border-radius: 18px;
    padding: 2rem 1.5rem; box-shadow: 0 12px 48px rgba(0,0,0,.3); position: relative; z-index: 1;
}
.auth-logo { text-align: center; margin-bottom: 1.5rem; }
.auth-logo-icon {
    width: 3.4rem; height: 3.4rem; border-radius: 14px; margin: 0 auto .5rem;
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; font-weight: 800; color: #fff; box-shadow: 0 4px 16px rgba(230,57,70,.4);
}
.auth-logo-text { font-size: 1.1rem; font-weight: 700; color: var(--text); }
.auth-logo-sub { font-size: .65rem; color: var(--text-light); margin-top: .15rem; }

.input-group {
    display: flex; align-items: center; border: 2px solid var(--border); border-radius: var(--radius-sm);
    padding: 0 .7rem; margin-bottom: .7rem; background: #fafafa; transition: all .2s;
}
.input-group:focus-within { border-color: var(--red); background: #fff; box-shadow: 0 0 0 3px rgba(230,57,70,.1); }
.input-icon { font-size: .9rem; margin-right: .45rem; color: var(--text-light); }
.input-group input {
    flex: 1; border: none; background: transparent; padding: .62rem 0; font-size: .82rem;
    outline: none; color: var(--text);
}

.auth-remember { margin-bottom: 1rem; }
.checkbox-label { display: flex; align-items: center; font-size: .72rem; color: var(--text-secondary); cursor: pointer; }
.checkbox-label input { display: none; }
.checkbox-label span {
    width: .95rem; height: .95rem; border: 2px solid var(--border); border-radius: 4px;
    margin-right: .35rem; display: flex; align-items: center; justify-content: center;
    font-size: .65rem; color: #fff; transition: all .2s;
}
.checkbox-label input:checked + span { background: var(--red); border-color: var(--red); }
.checkbox-label input:checked + span::after { content: "✓"; }

.auth-link { text-align: center; margin-top: .9rem; font-size: .72rem; color: var(--red); cursor: pointer; font-weight: 500; }
.auth-footer { text-align: center; margin-top: 1.2rem; font-size: .65rem; color: rgba(255,255,255,.4); }

/* ========== 顶部导航 ========== */
.topbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 50;
    height: 2.4rem; background: linear-gradient(135deg, var(--red), var(--red-dark));
    display: flex; align-items: center; padding: 0 .5rem; max-width: 768px; margin: 0 auto;
    color: #fff;
}
.topbar-back {
    width: 2rem; height: 2rem; border: none; background: rgba(255,255,255,.15);
    border-radius: 50%; font-size: 1.2rem; color: #fff; cursor: pointer;
    display: flex; align-items: center; justify-content: center; transition: background .2s;
}
.topbar-back:active { background: rgba(255,255,255,.25); }
.topbar-title { flex: 1; text-align: center; font-size: .85rem; font-weight: 700; letter-spacing: .5px; }
.topbar-action { width: 2rem; height: 2rem; border: none; background: transparent; color: #fff; }

/* ========== 底部TabBar ========== */
.tabbar {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
    height: calc(56px + var(--safe-bottom)); padding-bottom: var(--safe-bottom);
    background: #fff; border-top: 1px solid var(--border);
    display: flex; max-width: 768px; margin: 0 auto;
    box-shadow: 0 -2px 12px rgba(0,0,0,.06);
}
.tabbar-item {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    color: var(--text-light); font-size: .58rem; cursor: pointer; transition: all .2s; gap: .08rem;
    position: relative;
}
.tabbar-item.active { color: var(--red); }
.tabbar-item.active::after {
    content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 1.5rem; height: 2px; background: var(--red); border-radius: 0 0 2px 2px;
}
.tabbar-icon { font-size: 1.3rem; line-height: 1; }
.tabbar-icon .icon { font-size: 1.3rem; }
.tabbar-label { font-size: .58rem; margin-top: .08rem; }

/* ========== 首页 ========== */
.home-scroll { padding-bottom: calc(56px + var(--safe-bottom)); }

.notice-bar {
    margin: .5rem; padding: .45rem .6rem; border-radius: 20px;
    background: linear-gradient(90deg, var(--bg-dark), #16213e);
    display: flex; align-items: center; gap: .35rem; overflow: hidden;
    height: 1.8rem; box-shadow: 0 2px 8px rgba(0,0,0,.1);
}
.notice-icon { font-size: .7rem; flex-shrink: 0; color: var(--gold); }
.notice-text { flex: 1; overflow: hidden; position: relative; height: 100%; display: flex; align-items: center; }
.notice-text-inner {
    white-space: nowrap; color: var(--gold); font-size: .68rem;
    animation: noticeScroll 20s linear infinite;
}
@keyframes noticeScroll { 0% { transform: translateX(100%); } 100% { transform: translateX(-100%); } }

.home-lottery-card {
    margin: .5rem; background: linear-gradient(135deg, var(--bg-dark), #16213e);
    border-radius: var(--radius); padding: .9rem .5rem .7rem; text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,.15); position: relative; overflow: hidden;
}
.home-lottery-card::before {
    content: 'PC28'; position: absolute; top: .3rem; right: .5rem;
    font-size: .5rem; color: rgba(255,255,255,.08); font-weight: 900; letter-spacing: 2px;
}
.hlc-title { font-size: .6rem; color: rgba(255,255,255,.4); margin-bottom: .25rem; letter-spacing: 1px; }
.hlc-period { font-size: .7rem; color: var(--gold); margin-bottom: .4rem; font-weight: 700; }
.hlc-balls { display: flex; align-items: center; justify-content: center; gap: .3rem; margin-bottom: .35rem; }
.hlc-ball {
    width: 1.8rem; height: 1.8rem; border-radius: 50%; display: flex; align-items: center;
    justify-content: center; font-size: .72rem; font-weight: 800; color: #fff;
    background: #8e8e93; box-shadow: inset 0 -2px 4px rgba(0,0,0,.2);
}
.hlc-ball.purple { background: linear-gradient(135deg, #9C27B0, #7B1FA2); }
.hlc-ball.gray { background: linear-gradient(135deg, #78909C, #546E7A); }
.hlc-ball.green { background: linear-gradient(135deg, var(--green), #21867A); }
.hlc-ball.red { background: linear-gradient(135deg, var(--red), var(--red-dark)); }
.hlc-ball.hlc-result { width: 2.2rem; height: 2.2rem; font-size: .85rem; box-shadow: 0 0 12px rgba(255,215,0,.3); }
.hlc-plus, .hlc-eq { font-size: .65rem; color: rgba(255,255,255,.4); font-weight: 700; }
.hlc-combo { font-size: .68rem; color: rgba(255,255,255,.7); font-weight: 600; }
.lottery-scratch-mask { position: relative; cursor: pointer; }
.lottery-scratch-mask > .hlc-ball, .lottery-scratch-mask > .hlc-plus, .lottery-scratch-mask > .hlc-eq { filter: blur(7px); opacity: .35; }
.scratch-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: .7rem; font-weight: 700; letter-spacing: .04em; background: rgba(11,18,38,.72); border-radius: .5rem; }
.lottery-scratch-mask .scratch-overlay::before { content: '✦'; margin-right: .25rem; color: var(--gold); }

.room-cards { display: flex; gap: .5rem; padding: 0 .5rem; margin-top: .5rem; }
.room-card {
    flex: 1; border-radius: var(--radius); padding: .9rem .7rem; color: #fff;
    position: relative; overflow: hidden; cursor: pointer; transition: transform .15s;
}
.room-card:active { transform: scale(.96); }
.room-low { background: linear-gradient(135deg, var(--blue), var(--blue-light)); }
.room-high { background: linear-gradient(135deg, var(--red), var(--red-dark)); }
.room-card::after {
    content: '28'; position: absolute; bottom: -.2rem; right: -.1rem;
    font-size: 3rem; font-weight: 900; color: rgba(255,255,255,.05); pointer-events: none;
}
.room-card-tag {
    display: inline-block; padding: .12rem .4rem; border-radius: 4px; font-size: .55rem;
    background: rgba(255,255,255,.2); margin-bottom: .3rem; font-weight: 600;
}
.room-card-tag.hot { background: var(--red-dark); }
.room-card-name { font-size: .85rem; font-weight: 700; margin-bottom: .15rem; }
.room-card-odds { font-size: .8rem; font-weight: 700; margin-bottom: .1rem; }
.room-card-desc { font-size: .58rem; opacity: .75; }

.trend-mini { padding: 0 .5rem; }
.trend-mini-item {
    display: flex; align-items: center; padding: .35rem 0; border-bottom: 1px solid var(--border); gap: .4rem;
}
.trend-mini-item:last-child { border-bottom: none; }
.tm-period { font-size: .6rem; color: var(--blue-light); width: 3.5rem; flex-shrink: 0; font-weight: 500; }
.tm-ball {
    width: 1.15rem; height: 1.15rem; border-radius: 50%; display: flex; align-items: center;
    justify-content: center; font-size: .5rem; font-weight: 700; color: #fff; flex-shrink: 0;
}
.tm-combo { font-size: .6rem; color: var(--text-secondary); margin-left: auto; }

/* ========== 游戏房间 ========== */
.game-container { padding-bottom: 68px; }

.game-room-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: .5rem .6rem; background: #fff; border-bottom: 1px solid var(--border);
}
.game-room-name { font-size: .85rem; font-weight: 700; display: flex; align-items: center; gap: .3rem; }
.game-room-tag {
    font-size: .65rem; padding: .15rem .5rem; border-radius: 4px;
    background: var(--red-light); color: var(--red); font-weight: 700;
}

.game-info-bar {
    display: flex; background: #fff; padding: .5rem .6rem; border-bottom: 1px solid var(--border);
    position: sticky; top: 2.4rem; z-index: 10;
}
.game-info-item { flex: 1; text-align: center; }
.game-info-label { font-size: .58rem; color: var(--text-secondary); margin-bottom: .1rem; }
.game-info-value { font-size: .82rem; font-weight: 700; }
.game-info-value.countdown { color: var(--red); font-size: .9rem; font-variant-numeric: tabular-nums; }
.game-info-value.balance { color: var(--text); }

.lottery-display {
    background: #fff; margin: .5rem; border-radius: var(--radius); padding: .9rem .5rem;
    text-align: center; box-shadow: var(--shadow);
}
.lottery-balls { display: flex; align-items: center; justify-content: center; gap: .3rem; margin-bottom: .4rem; }
.l-ball {
    width: 1.9rem; height: 1.9rem; border-radius: 50%; display: flex; align-items: center;
    justify-content: center; font-size: .75rem; font-weight: 800; color: #fff;
    background: #8e8e93; box-shadow: inset 0 -2px 4px rgba(0,0,0,.2); transition: all .3s;
}
.l-ball.purple { background: linear-gradient(135deg, #9C27B0, #7B1FA2); }
.l-ball.gray { background: linear-gradient(135deg, #78909C, #546E7A); }
.l-ball.green { background: linear-gradient(135deg, var(--green), #21867A); }
.l-ball.red { background: linear-gradient(135deg, var(--red), var(--red-dark)); }
.l-ball.result { width: 2.3rem; height: 2.3rem; font-size: .88rem; box-shadow: 0 0 16px rgba(255,215,0,.3); }
.l-plus, .l-eq { font-size: .65rem; color: var(--text-light); font-weight: 700; }

.lottery-combo { font-size: .7rem; color: var(--text-secondary); font-weight: 600; }

.sealed-bar {
    margin: .25rem .5rem; padding: .35rem; text-align: center; font-size: .65rem;
    background: #FFF3E0; color: #E65100; border-radius: var(--radius-xs); border: 1px solid #FFE0B2;
    font-weight: 500;
}

.history-panel {
    background: #fff; margin: .5rem; border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow);
}
.history-header {
    display: flex; align-items: center; padding: .5rem .6rem; font-size: .72rem;
    border-bottom: 1px solid var(--border); cursor: pointer; font-weight: 600;
}
.history-latest { display: flex; align-items: center; gap: .25rem; margin-left: auto; }
.history-num {
    width: 1.15rem; height: 1.15rem; border-radius: 50%; display: flex; align-items: center;
    justify-content: center; font-size: .5rem; font-weight: 700; color: #fff; background: #8e8e93;
}
.history-arrow { font-size: .58rem; color: var(--text-light); margin-left: .3rem; }
.history-body { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.history-body.open { max-height: 500px; overflow-y: auto; }
.history-item {
    display: flex; align-items: center; padding: .38rem .6rem; font-size: .62rem;
    border-bottom: 1px solid #f5f5f5; gap: .35rem;
}
.history-item .period { color: var(--blue-light); width: 3.8rem; flex-shrink: 0; font-weight: 500; }
.history-item .ball {
    width: 1rem; height: 1rem; border-radius: 50%; display: flex; align-items: center;
    justify-content: center; font-size: .45rem; font-weight: 700; color: #fff;
}
.history-item .combo { width: 2.2rem; color: var(--text-secondary); }

.game-actions {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
    background: #fff; border-top: 1px solid var(--border);
    display: flex; gap: .4rem; padding: .5rem .5rem; padding-bottom: calc(.5rem + var(--safe-bottom));
    max-width: 768px; margin: 0 auto;
}
.game-input-wrap {
    flex: 1; border: 2px solid var(--border); border-radius: var(--radius-sm);
    display: flex; align-items: center; padding: 0 .6rem; background: #fafafa;
    transition: border-color .2s;
}
.game-input-wrap:focus-within { border-color: var(--red); }
.game-input-wrap input { flex: 1; border: none; background: transparent; padding: .55rem 0; font-size: .78rem; outline: none; }
.btn-bet {
    padding: 0 1.4rem; border: none; border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--red), var(--red-dark)); color: #fff;
    font-size: .85rem; font-weight: 700; cursor: pointer;
    box-shadow: 0 4px 12px rgba(230,57,70,.35); transition: all .2s;
}
.btn-bet:active { transform: scale(.96); }

/* ========== 下注键盘 ========== */
.bet-popup {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
    background: #fff; border-radius: 16px 16px 0 0;
    height: 65vh; display: none; flex-direction: column;
    box-shadow: 0 -8px 30px rgba(0,0,0,.15); max-width: 768px; margin: 0 auto;
}
.bet-popup.show { display: flex; animation: slideUp .25s ease; }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

.bet-popup-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: .7rem .9rem; border-bottom: 1px solid var(--border);
}
.bet-popup-title { font-size: .82rem; font-weight: 600; }
.bet-popup-close {
    width: 1.6rem; height: 1.6rem; border: none; background: var(--bg); border-radius: 50%;
    font-size: .75rem; color: var(--text-secondary); cursor: pointer; transition: background .2s;
}
.bet-popup-close:active { background: var(--border); }

.bet-popup-body { flex: 1; display: flex; overflow: hidden; }
.bet-categories {
    width: 5.2rem; background: #f8f8f8; overflow-y: auto; flex-shrink: 0;
}
.bet-categories li {
    padding: .65rem .4rem; font-size: .72rem; text-align: center; cursor: pointer;
    border-left: 3px solid transparent; color: var(--text-secondary); list-style: none;
    transition: all .12s;
}
.bet-categories li.active { background: #fff; color: var(--red); font-weight: 700; border-left-color: var(--red); }
.bet-categories li:active { background: #f0f0f0; }

.bet-plays { flex: 1; overflow-y: auto; padding: .4rem; }
.bet-plays dl { overflow: hidden; }
.bet-plays dl dt {
    text-align: center; padding: .35rem 0; font-size: .68rem; font-weight: 600;
    color: var(--text-secondary); border-bottom: 1px solid var(--border); margin-bottom: .3rem;
}
.bet-plays dl dd { width: 50%; float: left; padding-bottom: .35rem; }
.bet-plays dl dd:nth-child(odd) { padding-right: .25rem; }
.bet-plays dl dd:nth-child(2n) { padding-left: .25rem; }

.betPlay {
    display: flex; align-items: center; justify-content: space-between;
    padding: .5rem .55rem; background: #f7f7f9; border-radius: var(--radius-xs);
    cursor: pointer; font-size: .72rem; border: 2px solid transparent; transition: all .12s;
}
.betPlay:active { transform: scale(.96); }
.betPlay.pit { background: var(--red-light); border-color: var(--red); color: var(--red); }
.betPlay em { font-style: normal; font-weight: 500; }
.betPlay span { font-weight: 700; color: var(--red); font-size: .68rem; }
.betPlay.pit span { color: var(--red-dark); }

.bet-popup-footer {
    border-top: 1px solid var(--border); padding: .5rem .7rem; padding-bottom: calc(.5rem + var(--safe-bottom));
}
.bet-amount-row { display: flex; gap: .35rem; margin-bottom: .4rem; align-items: center; }
.bet-amount-row input {
    flex: 1; padding: .45rem .5rem; border: 2px solid var(--border); border-radius: var(--radius-xs);
    font-size: .78rem; outline: none; transition: border-color .2s;
}
.bet-amount-row input:focus { border-color: var(--red); }
.btn-amount {
    padding: .35rem .5rem; border: 1.5px solid var(--border); border-radius: var(--radius-xs);
    background: #fff; font-size: .68rem; cursor: pointer; color: var(--text-secondary);
    font-weight: 600; transition: all .12s;
}
.btn-amount:active { background: var(--bg); border-color: var(--red); color: var(--red); }

.bet-selected {
    display: flex; align-items: center; justify-content: space-between;
    background: #FFF8E1; padding: .45rem .6rem; border-radius: var(--radius-xs);
    font-size: .68rem; border: 1px solid #FFE082;
}
.btn-confirm {
    padding: .35rem .8rem; border: none; border-radius: var(--radius-xs);
    background: linear-gradient(135deg, var(--red), var(--red-dark)); color: #fff;
    font-size: .68rem; font-weight: 700; cursor: pointer;
    box-shadow: 0 2px 8px rgba(230,57,70,.3);
}
.btn-confirm:active { transform: scale(.96); }

/* ========== 聊天室 ========== */
.chat-page { display: flex; flex-direction: column; height: calc(100vh - 2.4rem - 56px); background: var(--bg); }
.chat-messages { flex: 1; overflow-y: auto; padding: .4rem; -webkit-overflow-scrolling: touch; }
.chat-msg { display: flex; margin-bottom: .4rem; align-items: flex-start; gap: .35rem; }
.chat-msg.self { flex-direction: row-reverse; }
.chat-avatar {
    width: 1.6rem; height: 1.6rem; border-radius: 50%;
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: .55rem; font-weight: 700; flex-shrink: 0;
}
.chat-msg.self .chat-avatar { background: linear-gradient(135deg, var(--blue), var(--blue-light)); }
.chat-bubble {
    max-width: 75%; padding: .38rem .55rem; background: #fff; border-radius: 10px;
    font-size: .72rem; line-height: 1.4; word-break: break-all;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.chat-msg.self .chat-bubble { background: #DCF8C6; }
.chat-name { font-size: .52rem; color: var(--text-light); margin-bottom: .08rem; }
.chat-msg.self .chat-name { text-align: right; }
.chat-system-wrap { text-align: center; margin: .3rem 0; }
.chat-system {
    display: inline-block; font-size: .62rem; color: var(--text-light);
    background: rgba(0,0,0,.04); padding: .18rem .5rem; border-radius: 10px;
}

.chat-bar {
    display: flex; gap: .35rem; padding: .4rem .5rem; background: #fff;
    border-top: 1px solid var(--border); align-items: center;
    padding-bottom: calc(.4rem + var(--safe-bottom));
}
.chat-bar input {
    flex: 1; height: 1.8rem; border: 2px solid var(--border); border-radius: var(--radius-xs);
    padding: 0 .5rem; font-size: .72rem; outline: none; background: #fafafa;
    transition: border-color .2s;
}
.chat-bar input:focus { border-color: var(--red); background: #fff; }
.chat-btn-send {
    padding: 0 .85rem; height: 1.8rem; border: none; border-radius: var(--radius-xs);
    background: linear-gradient(135deg, var(--red), var(--red-dark)); color: #fff;
    font-size: .72rem; font-weight: 600; cursor: pointer;
}
.chat-btn-red {
    width: 1.8rem; height: 1.8rem; border: none; border-radius: 50%;
    background: var(--red-dark); color: #fff; font-size: .95rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}

/* 红包 */
.chat-red-packet {
    background: linear-gradient(135deg, var(--red), var(--red-dark)); border-radius: 10px;
    padding: .45rem .6rem; color: #fff; cursor: pointer; min-width: 6.5rem;
}
.chat-red-packet .rp-greeting { font-size: .68rem; }
.chat-red-packet .rp-label { font-size: .52rem; color: rgba(255,255,255,.7); margin-top: .08rem; }

.rp-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 200; display: none;
    align-items: center; justify-content: center; backdrop-filter: blur(4px);
}
.rp-overlay.show { display: flex; }
.rp-card {
    background: linear-gradient(180deg, var(--red), var(--red-dark)); border-radius: 16px;
    padding: 1.5rem; width: 10.5rem; text-align: center; color: #fff;
    animation: scaleIn .3s ease; box-shadow: 0 12px 40px rgba(0,0,0,.3);
}
@keyframes scaleIn { from { transform: scale(.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.rp-sender { font-size: .68rem; margin-bottom: .25rem; color: rgba(255,255,255,.8); }
.rp-greeting { font-size: .85rem; font-weight: 700; margin-bottom: .5rem; }
.rp-open-btn {
    background: var(--gold); color: var(--red-dark); border: none; border-radius: 24px;
    padding: .4rem 2rem; font-size: .85rem; font-weight: 800; cursor: pointer; margin-bottom: .35rem;
    box-shadow: 0 4px 12px rgba(0,0,0,.2);
}
.rp-close-btn { color: rgba(255,255,255,.6); font-size: .62rem; cursor: pointer; margin-top: .25rem; }
.rp-list { margin-top: .4rem; max-height: 5rem; overflow-y: auto; }
.rp-list-item { display: flex; justify-content: space-between; padding: .25rem 0; border-top: 1px solid rgba(255,255,255,.1); font-size: .62rem; }

.sheet-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 200; display: none;
    align-items: flex-end; justify-content: center;
}
.sheet-overlay.show { display: flex; }
.sheet-card {
    background: #fff; width: 100%; max-width: 500px; border-radius: 16px 16px 0 0;
    padding: 1rem; animation: slideUp .25s ease;
}
.sheet-card h3 { text-align: center; font-size: .85rem; margin-bottom: .7rem; color: var(--red); }

/* ========== 记录页 ========== */
.filter-tabs {
    display: flex; background: #fff; border-bottom: 1px solid var(--border);
    position: sticky; top: 2.4rem; z-index: 10;
}
.filter-tab {
    flex: 1; text-align: center; padding: .5rem; font-size: .72rem; color: var(--text-secondary);
    cursor: pointer; position: relative; font-weight: 500; transition: color .2s;
}
.filter-tab.active { color: var(--red); font-weight: 700; }
.filter-tab.active:after {
    content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
    width: 1.5rem; height: 3px; background: var(--red); border-radius: 2px;
}

.record-card {
    background: #fff; border-radius: var(--radius-sm); padding: .6rem .7rem;
    margin-bottom: .4rem; box-shadow: var(--shadow);
}
.rc-header { display: flex; justify-content: space-between; margin-bottom: .25rem; }
.rc-game { font-size: .68rem; font-weight: 700; }
.rc-time { font-size: .58rem; color: var(--text-secondary); }
.rc-bet { display: flex; justify-content: space-between; margin-bottom: .25rem; font-size: .68rem; }
.rc-bet .content { color: var(--text-secondary); }
.rc-bet .amount { color: var(--text-secondary); }
.rc-result { display: flex; align-items: center; justify-content: space-between; padding: .2rem 0; }
.rc-result .label { font-size: .58rem; font-weight: 500; color: var(--text-secondary); }
.rc-result .balls { display: flex; align-items: center; gap: .15rem; }
.rc-result .ball {
    width: 1rem; height: 1rem; border-radius: 50%; display: flex; align-items: center;
    justify-content: center; font-size: .45rem; font-weight: 700; color: #fff;
}
.rc-footer { display: flex; justify-content: space-between; padding-top: .2rem; border-top: 1px solid var(--border); font-size: .58rem; }
.rc-footer .after-balance { color: var(--red); }
.rc-footer .settle.win { color: var(--green); font-weight: 700; }
.rc-footer .settle.lose { color: var(--red); font-weight: 700; }
.rc-footer .settle.pending { color: var(--text-light); }

/* ========== 走势图 ========== */
.trend-chart {
    min-width: 100%; height: 130px; overflow-x: auto; position: relative;
    display: flex; align-items: flex-end; gap: 2px; padding: .4rem 0;
}
.trend-bar-wrap { display: flex; flex-direction: column; align-items: center; flex: 1; min-width: 1.1rem; }
.trend-bar {
    width: 65%; border-radius: 3px 3px 0 0; min-height: 2px; transition: height .35s ease;
}
.trend-bar-label { font-size: .42rem; color: var(--text-light); margin-top: .12rem; }

/* ========== 个人中心 ========== */
.profile-card {
    background: linear-gradient(160deg, var(--bg-dark), #16213e);
    padding: 2rem 1.3rem 1.5rem;
    text-align: center; color: #fff; border-radius: 0 0 20px 20px;
    position: relative; overflow: hidden;
}
.profile-card::before {
    content: '28'; position: absolute; bottom: -.3rem; right: .3rem;
    font-size: 4rem; font-weight: 900; color: rgba(255,255,255,.04); pointer-events: none;
}
.profile-avatar {
    width: 3.4rem; height: 3.4rem; border-radius: 50%;
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    margin: 0 auto .5rem; display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; font-weight: 700; box-shadow: 0 4px 16px rgba(0,0,0,.2);
}
.profile-name { font-size: .88rem; font-weight: 700; margin-bottom: .15rem; }
.profile-id { font-size: .62rem; color: rgba(255,255,255,.5); margin-bottom: .7rem; }
.profile-wallet {
    background: rgba(255,255,255,.1); border-radius: 12px; padding: .55rem;
    backdrop-filter: blur(4px);
}
.profile-wallet-label { font-size: .58rem; color: rgba(255,255,255,.6); }
.profile-wallet-amount { font-size: 1.25rem; font-weight: 800; color: var(--gold); margin-top: .08rem; }

.menu-list { background: #fff; margin: .5rem .5rem 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.menu-item {
    display: flex; align-items: center; padding: .7rem .75rem; border-bottom: 1px solid var(--border);
    cursor: pointer; transition: background .12s;
}
.menu-item:last-child { border-bottom: none; }
.menu-item:active { background: #fafafa; }
.menu-icon {
    width: 1.6rem; height: 1.6rem; border-radius: 8px; margin-right: .5rem; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; font-size: .75rem; color: #fff;
}
.menu-icon.c1 { background: linear-gradient(135deg, var(--red), var(--red-dark)); }
.menu-icon.c2 { background: linear-gradient(135deg, var(--blue), var(--blue-light)); }
.menu-icon.c3 { background: linear-gradient(135deg, var(--green), #21867A); }
.menu-icon.c4 { background: linear-gradient(135deg, var(--orange), #D35400); }
.menu-icon.c5 { background: linear-gradient(135deg, var(--purple), #6A1B9A); }
.menu-icon.c6 { background: linear-gradient(135deg, var(--gold-dark), #B8860B); }
.menu-item > span:nth-child(3) { flex: 1; font-size: .78rem; font-weight: 500; }
.menu-arrow { color: #ccc; font-size: .7rem; font-weight: 700; }

.stats-grid { display: flex; gap: .25rem; }
.stat-item { flex: 1; text-align: center; padding: .35rem 0; }
.stat-val { font-size: .85rem; font-weight: 700; color: var(--text); }
.stat-val.win { color: var(--green); }
.stat-label { font-size: .58rem; color: var(--text-secondary); margin-top: .08rem; }

/* ========== 充值提现 ========== */
.pay-methods { display: flex; gap: .4rem; margin-bottom: .7rem; flex-wrap: wrap; }
.pay-method {
    flex: 1; min-width: 4.2rem; padding: .5rem .25rem; text-align: center;
    border: 2px solid var(--border); border-radius: var(--radius-sm); cursor: pointer;
    font-size: .68rem; transition: all .12s; font-weight: 500;
}
.pay-method.active { border-color: var(--red); background: var(--red-light); color: var(--red); font-weight: 700; }

/* ========== 代理中心 ========== */
.agent-code {
    font-size: 1rem; font-weight: 800; color: var(--red); margin-bottom: .25rem;
}
.agent-url {
    background: var(--bg); padding: .5rem; border-radius: var(--radius-xs);
    font-size: .62rem; color: var(--text-secondary); word-break: break-all; margin-bottom: .4rem;
}

/* ========== 客服页面 ========== */
.service-card-wrap { padding: 12px 0; }
.service-card { background: var(--bg-card); border-radius: var(--radius); margin: 0 12px 12px; overflow: hidden; box-shadow: var(--shadow); }
.service-card-header { display: flex; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.service-card-avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--red), var(--red-dark)); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.1rem; font-weight: 700; margin-right: 12px; flex-shrink: 0; }
.service-card-info { flex: 1; }
.service-card-name { font-size: .9rem; font-weight: 600; color: var(--text); }
.service-card-time { font-size: .72rem; color: var(--text-light); margin-top: 2px; }
.service-card-status { font-size: .72rem; padding: 2px 8px; border-radius: 10px; }
.service-card-status.online { background: #E8F5E9; color: var(--green); }
.service-card-status.offline { background: #FBE9E7; color: var(--red-dark); }
.service-card-body { padding: 12px 16px; }
.service-card-item { display: flex; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); }
.service-card-item:last-child { border-bottom: none; }
.service-card-item-icon { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .75rem; margin-right: 10px; flex-shrink: 0; }
.service-card-item-icon.wechat { background: #E8F5E9; }
.service-card-item-icon.qq { background: #E3F2FD; }
.service-card-item-icon.telegram { background: #E0F7FA; }
.service-card-item-icon.phone { background: #FFF3E0; }
.service-card-item-label { font-size: .78rem; color: var(--text-secondary); width: 50px; flex-shrink: 0; }
.service-card-item-value { font-size: .82rem; color: var(--text); flex: 1; word-break: break-all; }
.service-card-item-action { font-size: .75rem; color: var(--red); text-decoration: none; padding: 4px 12px; border: 1px solid var(--red); border-radius: 14px; white-space: nowrap; font-weight: 500; }
.service-card-footer { padding: 10px 16px 14px; text-align: center; }
.service-card-footer .tip { font-size: .7rem; color: var(--text-light); }
.service-empty { text-align: center; padding: 40px 20px; color: var(--text-light); }
.service-empty .icon { font-size: 3rem; margin-bottom: 10px; }

/* ========== 滚动条 ========== */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,.08); border-radius: 2px; }

/* ========== 响应式 ========== */
@media (min-width: 768px) {
    .topbar, .tabbar, .game-actions { max-width: 768px; left: 50%; transform: translateX(-50%); }
    .topbar { transform: translateX(-50%); }
    body { max-width: 768px; margin: 0 auto; }
}

/* ========== 全站 UI 统一升级 ========== */
:root {
    --red: #ef476f;
    --red-dark: #c9184a;
    --red-light: #fff0f3;
    --blue: #172554;
    --blue-light: #315aa8;
    --green: #0f9f78;
    --bg: #f5f7fb;
    --border: #e7eaf0;
    --shadow: 0 8px 24px rgba(23,37,84,.07);
    --shadow-lg: 0 18px 48px rgba(23,37,84,.14);
    --radius: 16px;
    --radius-sm: 11px;
}

body { background: radial-gradient(circle at 20% -10%, #fff 0, var(--bg) 42%, #eef1f7 100%); }
button, input, select, textarea { font-family: inherit; }
button { -webkit-appearance: none; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 3px solid rgba(239,71,111,.25); outline-offset: 2px; }
.page { animation: pageIn .22s ease both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

.topbar { height: 3.1rem; padding: 0 .75rem; background: rgba(23,37,84,.94); backdrop-filter: blur(14px); box-shadow: 0 4px 18px rgba(23,37,84,.16); }
.topbar-back { width: 2.2rem; height: 2.2rem; background: rgba(255,255,255,.12); }
.topbar-title { font-size: .9rem; letter-spacing: .2px; }
.sub-page { padding-top: 3.1rem; }

.auth-page { background: radial-gradient(circle at 15% 15%, rgba(239,71,111,.22), transparent 32%), linear-gradient(145deg, #172554, #0b122d 72%); }
.auth-card { max-width: 390px; padding: 2.25rem 1.75rem; border: 1px solid rgba(255,255,255,.65); box-shadow: var(--shadow-lg); }
.auth-logo { margin-bottom: 1.8rem; }
.auth-logo-icon { border-radius: 18px; box-shadow: 0 10px 24px rgba(239,71,111,.28); }
.input-group { min-height: 3rem; background: #f8f9fc; border-color: #e9ebf2; }
.btn-primary, .btn-danger, .btn-bet { min-height: 2.8rem; border-radius: var(--radius-sm); background: linear-gradient(135deg, #ef476f, #c9184a); box-shadow: 0 8px 18px rgba(201,24,74,.2); }
.btn-outline { min-height: 2.8rem; border-radius: var(--radius-sm); }

.notice-bar { height: 2.15rem; margin: .75rem .65rem .55rem; border-radius: 12px; background: linear-gradient(90deg, #172554, #253b78); }
.home-lottery-card { margin: .65rem; padding: 1.2rem .7rem .95rem; border-radius: 20px; background: linear-gradient(145deg, #172554, #253b78); box-shadow: 0 12px 28px rgba(23,37,84,.22); }
.hlc-ball { width: 2rem; height: 2rem; }
.hlc-ball.hlc-result { width: 2.45rem; height: 2.45rem; }
.room-cards { gap: .7rem; padding: 0 .65rem; }
.room-card { min-height: 8.1rem; padding: 1rem .85rem; border-radius: 18px; box-shadow: 0 10px 20px rgba(23,37,84,.12); }
.room-card-name { font-size: .95rem; }
.section-header { padding: .9rem .75rem .45rem; }
.trend-mini { padding: 0 .75rem; background: rgba(255,255,255,.55); border-radius: 14px; margin: 0 .65rem; }

.game-room-header, .game-info-bar { padding-left: .8rem; padding-right: .8rem; }
.game-room-header { min-height: 3rem; }
.game-info-bar { top: 3.1rem; border-radius: 0 0 14px 14px; box-shadow: 0 4px 14px rgba(23,37,84,.05); }
.lottery-display, .history-panel, .section-card, .record-card, .menu-list, .profile-card { box-shadow: var(--shadow); }
.lottery-display { margin: .7rem; padding: 1.2rem .6rem; }
.history-panel { margin: .7rem; }
.game-actions { padding: .65rem .7rem; box-shadow: 0 -6px 20px rgba(23,37,84,.08); }
.bet-popup { height: min(72vh, 620px); border-radius: 20px 20px 0 0; box-shadow: 0 -16px 40px rgba(23,37,84,.2); }
.bet-popup-header { padding: .85rem 1rem; }
.bet-categories { width: 6rem; }
.bet-categories li { padding: .8rem .4rem; }
.betPlay { min-height: 2.7rem; background: #f8f9fc; }

.chat-page { height: calc(100vh - 3.1rem); }
.chat-messages { padding: .7rem; }
.chat-bar { padding: .65rem .7rem; }
.chat-bubble, .chat-red-packet { border-radius: 14px; }
.filter-tabs { top: 3.1rem; box-shadow: 0 3px 12px rgba(23,37,84,.05); }
.filter-tab { padding: .75rem .5rem; }
.list-container { padding: .45rem .7rem; }
.record-card { padding: .8rem .85rem; border: 1px solid rgba(231,234,240,.75); }
.profile-card { padding-top: 2.5rem; border-radius: 0 0 24px 24px; }
.menu-list { margin: .7rem .65rem 0; }
.menu-item { min-height: 3.1rem; padding: .8rem .85rem; }
.form-row { margin-bottom: .8rem; }
.form-row input, .form-row select { min-height: 2.65rem; background: #fafbfe; }
.service-card { margin: 0 .7rem .7rem; }

@media (max-width: 380px) {
    html { font-size: 15px; }
    .auth-card { padding-left: 1.1rem; padding-right: 1.1rem; }
    .room-card { min-height: 7.4rem; padding: .8rem .65rem; }
    .bet-categories { width: 5.2rem; }
    .btn-amount { padding-left: .35rem; padding-right: .35rem; }
}
@media (min-width: 769px) {
    body { min-height: 100vh; background: #eef1f7; }
    #main_app { min-height: 100vh; background: var(--bg); box-shadow: 0 0 40px rgba(23,37,84,.08); }
}

/* Material Design 3 visual layer */
:root {
    --md-primary: #6750a4;
    --md-primary-dark: #4f378b;
    --md-on-primary: #fff;
    --md-secondary: #625b71;
    --md-surface: #fffbfe;
    --md-surface-container: #f3edf7;
    --md-outline: #79747e;
    --md-outline-soft: #cac4d0;
    --md-error: #b3261e;
    --md-success: #146c43;
    --radius: 20px;
    --radius-sm: 12px;
    --shadow: 0 2px 8px rgba(35, 25, 50, .10);
    --shadow-lg: 0 10px 28px rgba(35, 25, 50, .16);
}
body { background: var(--md-surface); color: #1d1b20; font-size: .82rem; }
.auth-page { background: radial-gradient(circle at 80% 8%, rgba(208,188,255,.24), transparent 28%), linear-gradient(145deg, #1d1730, #33234f 58%, #6750a4); }
.auth-card { border: 1px solid rgba(255,255,255,.7); border-radius: 28px; box-shadow: 0 20px 60px rgba(25, 16, 40, .32); }
.auth-logo-icon { background: var(--md-primary); box-shadow: 0 6px 18px rgba(103,80,164,.35); }
.input-group { border: 1px solid var(--md-outline); border-radius: 12px; background: var(--md-surface); }
.input-group:focus-within { border-color: var(--md-primary); box-shadow: 0 0 0 1px var(--md-primary); }
.btn-primary, .btn-danger, .btn-bet, .btn-confirm { background: var(--md-primary); box-shadow: none; border-radius: 999px; }
.btn-primary:hover, .btn-danger:hover, .btn-bet:hover, .btn-confirm:hover { background: var(--md-primary-dark); }
.btn-outline { border: 1px solid var(--md-outline); color: var(--md-primary); border-radius: 999px; background: transparent; }
.btn-outline:active { background: var(--md-surface-container); }
.topbar { background: rgba(255,251,254,.94); color: #1d1b20; border-bottom: 1px solid var(--md-outline-soft); box-shadow: 0 2px 8px rgba(35,25,50,.08); }
.topbar-back { color: var(--md-primary); background: var(--md-surface-container); }
.topbar-action { color: var(--md-primary); }
.notice-bar { background: var(--md-surface-container); box-shadow: none; }
.notice-icon, .notice-text-inner { color: var(--md-primary); }
.home-lottery-card, .profile-card { background: linear-gradient(145deg, #4f378b, #6750a4); box-shadow: var(--shadow-lg); }
.room-low { background: linear-gradient(145deg, #3f3a56, #625b71); }
.room-high { background: linear-gradient(145deg, #7d5260, #b3261e); }
.section-card, .lottery-display, .history-panel, .record-card, .menu-list { border: 1px solid rgba(121,116,126,.18); }
.game-room-header, .game-info-bar, .tabbar, .game-actions, .bet-popup, .sheet-card { background: var(--md-surface); }
.game-info-bar { border-bottom: 1px solid var(--md-outline-soft); }
.game-info-value.countdown { color: var(--md-error); }
.form-row input, .form-row select, .game-input-wrap, .game-input-wrap input, .chat-bar input, .bet-amount-row input { background: var(--md-surface); border-color: var(--md-outline); }
.form-row input:focus, .form-row select:focus, .chat-bar input:focus, .bet-amount-row input:focus, .game-input-wrap:focus-within { border-color: var(--md-primary); }
.filter-tab.active, .section-more, .auth-link, .service-card-item-action { color: var(--md-primary); }
.filter-tab.active:after, .tabbar-item.active:after { background: var(--md-primary); }
.tabbar-item.active { color: var(--md-primary); }
.bet-categories { background: var(--md-surface-container); }
.bet-categories li.active { color: var(--md-primary); border-left-color: var(--md-primary); }
.betPlay { background: var(--md-surface-container); }
.betPlay.pit { background: #e8def8; border-color: var(--md-primary); color: var(--md-primary); }
.betPlay span { color: var(--md-primary); }
.chat-msg.self .chat-bubble { background: #e8def8; }
.chat-btn-send, .chat-btn-red { background: var(--md-primary); }
.sealed-bar { background: #fff4e5; color: #8a4b08; border-color: #f2c078; }
.empty-state { color: var(--md-secondary); }
.menu-icon.c1, .menu-icon.c2, .menu-icon.c3, .menu-icon.c4, .menu-icon.c5, .menu-icon.c6 { background: var(--md-primary); }
.pay-method.active { border-color: var(--md-primary); background: #e8def8; color: var(--md-primary); }
.loading-state { display:flex; align-items:center; justify-content:center; gap:.5rem; padding:2rem 1rem; color:var(--md-secondary); }
.loading-state::before { content:''; width:1rem; height:1rem; border:2px solid var(--md-outline-soft); border-top-color:var(--md-primary); border-radius:50%; animation:mdSpin .7s linear infinite; }
@keyframes mdSpin { to { transform:rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration:.01ms !important; transition-duration:.01ms !important; } }

/* ========== 每日流水红包入口 ========== */
.daily-red-banner {
    display: flex; align-items: center; gap: .6rem; padding: .25rem 0;
}
.dr-icon { font-size: 1.8rem; flex-shrink: 0; }
.dr-info { flex: 1; text-align: left; }
.dr-title { font-size: .78rem; font-weight: 700; color: var(--md-primary); }
.dr-desc { font-size: .65rem; color: var(--text-secondary); margin-top: .08rem; }

/* ========== 客服私聊 ========== */
.private-chat-container {
    display: flex; flex-direction: column; height: calc(100vh - 3.1rem - 56px); background: var(--bg);
}
.private-chat-messages {
    flex: 1; overflow-y: auto; padding: .7rem; -webkit-overflow-scrolling: touch;
}
.private-chat-bar {
    display: flex; gap: .35rem; padding: .5rem .7rem; background: #fff;
    border-top: 1px solid var(--border); align-items: center;
    padding-bottom: calc(.5rem + var(--safe-bottom));
}
.private-chat-bar input {
    flex: 1; height: 2rem; border: 2px solid var(--border); border-radius: var(--radius-xs);
    padding: 0 .5rem; font-size: .78rem; outline: none; background: #fafafa;
    transition: border-color .2s;
}
.private-chat-bar input:focus { border-color: var(--md-primary); background: #fff; }

