:root {
  --bg: #0a0c0e;
  --card: #000;
  --gold: #efbf61;
  --gold2: #ecbc60;
  --pink: #f5275d;
  --blue: #4263eb;
  --white15: hsla(0, 0%, 100%, .15);
  --white10: hsla(0, 0%, 100%, .1);
  --white20: hsla(0, 0%, 100%, .2);
  --white70: hsla(0, 0%, 100%, .7);
  --white90: hsla(0, 0%, 100%, .9);
  --muted: #8b8f90;
  --green: #5ac725;
  --red: #f56c6c;
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { background: var(--bg); }
body { color: #fff; font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif; font-size: 14px; }
button { font-family: inherit; border: none; cursor: pointer; }
input, textarea { font-family: inherit; }
.page { max-width: 390px; margin: 0 auto; min-height: 100vh; background: var(--bg); position: relative; }
#view { padding-bottom: 84px; }

/* ---------- nav bar ---------- */
.nav-bar { display: flex; align-items: center; height: 44px; padding: 0 12px; position: relative; border-bottom: 1px solid var(--white15); background: #0d0f12; }
.nav-bar .back { width: 28px; height: 28px; cursor: pointer; }
.nav-bar .nav-title { flex: 1; text-align: center; font-size: 17px; font-weight: 600; margin-right: 28px; }
.nav-bar .nav-right { width: 28px; }

/* ---------- login ---------- */
.login-page { min-height: 100vh; background: radial-gradient(120% 90% at 50% 0%, #1a1d24 0%, #0a0c0e 55%); display: flex; flex-direction: column; align-items: center; padding: 60px 28px 0; }
.login-page .logo { font-size: 30px; font-weight: 800; color: var(--gold); letter-spacing: 2px; margin-bottom: 6px; }
.login-page .slogan { color: var(--white70); font-size: 13px; margin-bottom: 40px; }
.login-form { width: 100%; }
.login-form .field { background: #14171c; border: 1px solid var(--white15); border-radius: 10px; height: 48px; display: flex; align-items: center; padding: 0 14px; margin-bottom: 14px; }
.login-form .field input { flex: 1; background: transparent; border: none; outline: none; color: #fff; font-size: 15px; }
.login-form .field input::placeholder { color: #5d6066; }
.login-btn { width: 100%; height: 46px; border-radius: 10px; background: linear-gradient(135deg, #efbf61, #e0a83e); color: #000; font-size: 17px; font-weight: 700; margin-top: 10px; }
.login-links { display: flex; justify-content: space-between; margin-top: 18px; font-size: 13px; color: var(--gold); }
.login-links a { color: var(--gold); text-decoration: none; }

/* ---------- home ---------- */
.swiper { height: 234px; position: relative; overflow: hidden; }
.swiper .track { display: flex; height: 100%; transition: transform .35s ease; }
.swiper .slide { flex: 0 0 100%; height: 100%; }
.swiper .slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.swiper .dots { position: absolute; bottom: 6px; left: 0; right: 0; display: flex; justify-content: center; gap: 5px; }
.swiper .dots i { width: 4px; height: 4px; border-radius: 2px; background: #d9d9d9; opacity: .6; }
.swiper .dots i.on { width: 12px; height: 4px; border-radius: 2px; background: #d9d9d9; opacity: 1; }

.assets { margin: 0 10px; border: 1px solid var(--white15); border-radius: 12px; background: rgba(0, 0, 0, .25); overflow: hidden; }
.notice-bar { height: 52px; margin: 8px 8px 0; background: var(--white10); border: 1px solid var(--white20); border-radius: 6px; display: flex; align-items: center; padding: 0 12px; font-size: 13px; overflow: hidden; white-space: nowrap; }
.notice-bar .nicon { margin-right: 8px; font-size: 16px; color: var(--gold); }
.notice-bar .ntext { overflow: hidden; text-overflow: ellipsis; color: var(--white90); }
.assets-content { display: flex; justify-content: space-between; align-items: center; padding: 12px 10px; }
.assets-left .welcome { font-size: 16px; color: var(--white90); margin-bottom: 8px; }
.assets-left .user-info { display: flex; align-items: baseline; }
.assets-left .totalBalance { font-size: 29px; font-weight: 700; color: var(--gold2); margin-right: 6px; }
.assets-left .unit { font-size: 16px; font-weight: 600; color: var(--gold2); }
.assets-right { display: flex; gap: 6px; }
.action-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--white15); border-radius: 10px; min-width: 52px; padding: 6px 8px; }
.action-btn .btn-icon { width: 29px; height: 29px; margin-bottom: 4px; font-size: 22px; text-align: center; line-height: 29px; }
.action-btn .btn-text { font-size: 15px; font-weight: 600; color: #fff; }
.action-btn:active { opacity: .7; transform: scale(.98); }

.tabs { display: flex; justify-content: space-between; margin: 12px 16px 0; }
.tabs .tab { height: 39px; width: calc(25% - 5px); display: flex; align-items: center; justify-content: center; border-radius: 19px; border: 1.6px solid #a7a3ba; font-size: 13px; color: #fff; }
.tabs .tab.active { background: var(--pink); box-shadow: 0 0 30px var(--pink); border: none; color: #fff; font-weight: 600; }

.section { margin-top: 12px; }
.section-header { display: flex; align-items: center; padding: 12px 16px 8px; }
.section-header .line { width: 3px; height: 16px; background: linear-gradient(180deg, #efbf61, #f5d78e); border-radius: 1px; margin-right: 8px; }
.section-header .title { font-size: 16px; font-weight: 600; }
.game-card { display: flex; align-items: center; padding: 12px 16px; margin: 0 8px 8px; border-radius: 12px; border: 1px solid var(--gold); background: #000; height: 120px; }
.game-info { flex: 1; display: flex; flex-direction: column; margin-right: 12px; }
.game-title { font-size: 18px; font-weight: 700; color: var(--gold); margin-bottom: 4px; }
.game-subtitle { font-size: 10px; color: var(--white70); margin-bottom: 12px; }
.go-button { background: var(--gold); color: #000; font-size: 14px; font-weight: 700; padding: 8px 24px; border-radius: 6px; width: fit-content; }
.game-image { width: 40%; text-align: right; }
.game-image img { max-width: 100%; max-height: 90px; }

/* ---------- tabbar ---------- */
#tabbar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 390px; background: #0d0f12; border-top: 1px solid var(--white15); display: flex; z-index: 50; }
#tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 10px 0 12px; color: #8b8f90; text-decoration: none; font-size: 12px; width: 20%; }
#tabbar a .ic { height: 24px; margin-bottom: 4px; display: flex; align-items: center; justify-content: center; }
#tabbar a .ic svg { width: 22px; height: 22px; stroke: #8b8f90; fill: none; stroke-width: 1.6; }
#tabbar a.active { color: var(--gold); }
#tabbar a.active .ic svg { stroke: var(--gold); }
#tabbar a.circle .ic { width: 49px; height: 49px; border-radius: 50%; background: var(--blue); margin-top: -22px; box-shadow: 0 4px 14px rgba(66, 99, 235, .45); }
#tabbar a.circle .ic svg { stroke: #fff; }
#tabbar a.circle.active { color: var(--gold); }

/* ---------- cards & lists ---------- */
.panel { background: #101216; border: 1px solid var(--white15); border-radius: 12px; margin: 10px; padding: 14px; }
.panel h3 { font-size: 15px; color: var(--gold); margin-bottom: 10px; }
.muted { color: #8b8f90; font-size: 12px; }
.row { display: flex; align-items: center; gap: 8px; }
.space-between { justify-content: space-between; }
.list-item { background: #101216; border: 1px solid var(--white15); border-radius: 10px; padding: 12px; margin: 0 10px 10px; }
.list-item .t { font-size: 14px; font-weight: 600; }
.list-item .d { font-size: 12px; color: #8b8f90; margin-top: 4px; }
.money-plus { color: var(--green); font-weight: 700; }
.money-minus { color: var(--red); font-weight: 700; }
.tag { font-size: 11px; padding: 2px 8px; border-radius: 10px; border: 1px solid var(--white20); color: var(--white90); }
.tag-win { color: var(--green); border-color: var(--green); }
.tag-lose { color: var(--red); border-color: var(--red); }
.tag-pending { color: var(--gold); border-color: var(--gold); }

/* ---------- game page ---------- */
.game-page .balance-bar { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; background: #101216; border-bottom: 1px solid var(--white15); }
.game-page .balance-bar .label { color: #8b8f90; font-size: 13px; }
.game-page .balance-bar .val { color: var(--gold2); font-size: 20px; font-weight: 700; }
.period-card { margin: 10px; background: #101216; border: 1px solid var(--white15); border-radius: 12px; padding: 14px; text-align: center; }
.period-card .pno { font-size: 13px; color: #8b8f90; }
.period-card .cd { font-size: 40px; font-weight: 800; color: var(--gold); margin: 6px 0 2px; }
.period-card .cd-label { font-size: 12px; color: #8b8f90; }
.results-strip { display: flex; gap: 8px; overflow-x: auto; margin-top: 12px; padding: 4px 0; }
.result-item { flex: 0 0 auto; background: #171a20; border: 1px solid var(--white15); border-radius: 8px; padding: 8px 10px; text-align: center; min-width: 58px; font-size: 12px; }
.result-item .sum { color: var(--gold); font-weight: 700; font-size: 16px; }
.result-item .muted { font-size: 10px; }
.opt-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.opt-grid.g7 { grid-template-columns: repeat(7, 1fr); }
.opt { background: #14171c; border: 1px solid var(--white15); border-radius: 8px; padding: 10px 4px; text-align: center; cursor: pointer; }
.opt .n { display: block; font-size: 15px; font-weight: 700; color: #fff; }
.opt .o { display: block; font-size: 10px; color: #8b8f90; margin-top: 3px; }
.opt.selected { border-color: var(--gold); background: rgba(239, 191, 97, .12); }
.opt.selected .n { color: var(--gold); }
.amount-input { width: 100%; background: #14171c; border: 1px solid var(--white15); border-radius: 8px; color: #fff; padding: 12px; font-size: 18px; font-weight: 700; outline: none; }
.amount-quick { display: flex; gap: 8px; margin: 10px 0; }
.amount-quick button { flex: 1; background: #14171c; border: 1px solid var(--white15); color: #fff; border-radius: 8px; padding: 9px 0; font-size: 13px; }
.bet-summary { display: flex; justify-content: space-between; align-items: center; background: #14171c; border: 1px solid var(--white15); border-radius: 8px; padding: 10px 12px; margin: 10px 0; font-size: 13px; }
.bet-summary b { color: var(--gold); }
.bet-btn { width: 100%; height: 46px; border-radius: 10px; background: linear-gradient(135deg, #efbf61, #e0a83e); color: #000; font-size: 17px; font-weight: 700; }
.mybet { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--white15); font-size: 13px; }
.mybet:last-child { border-bottom: none; }
.tabs-mini { display: flex; border-bottom: 1px solid var(--white15); margin-bottom: 10px; }
.tabs-mini span { padding: 8px 14px; font-size: 14px; color: #8b8f90; }
.tabs-mini span.on { color: var(--gold); border-bottom: 2px solid var(--gold); }
.empty { text-align: center; color: #8b8f90; padding: 30px 0; font-size: 13px; }

/* ---------- profile / wallet ---------- */
.profile-head { display: flex; align-items: center; gap: 14px; padding: 18px 14px; background: linear-gradient(135deg, #15181e, #0d0f12); border-bottom: 1px solid var(--white15); }
.avatar { width: 58px; height: 58px; border-radius: 50%; background: var(--blue); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 700; }
.profile-head .name { font-size: 17px; font-weight: 700; }
.profile-head .sub { font-size: 12px; color: #8b8f90; margin-top: 4px; }
.menu-item { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--white10); font-size: 14px; cursor: pointer; }
.menu-item .arrow { color: #8b8f90; }
.kv { display: flex; justify-content: space-between; padding: 8px 0; font-size: 13px; border-bottom: 1px dashed var(--white10); }
.kv:last-child { border: none; }
.notice-content { white-space: pre-wrap; font-size: 14px; line-height: 1.8; }
.wallet-bal { text-align: center; padding: 26px 0 18px; }
.wallet-bal .lb { color: #8b8f90; font-size: 13px; }
.wallet-bal .num { font-size: 40px; font-weight: 800; color: var(--gold2); margin: 8px 0; }
.wallet-actions { display: flex; gap: 10px; padding: 0 14px; }
.wallet-actions .btn { flex: 1; height: 44px; border-radius: 10px; font-size: 15px; font-weight: 600; }
.btn-gold { background: linear-gradient(135deg, #efbf61, #e0a83e); color: #000; }
.btn-ghost { background: var(--white10); color: #fff; border: 1px solid var(--white20); }
.btn-red { background: rgba(245, 108, 108, .2); color: var(--red); border: 1px solid var(--red); }
.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 8px; width: auto; }
