/*
 * 新前端主题：深色红金风格
 * 仅使用本站自有样式，不依赖外部 CDN
 */
:root {
    --bg: #080606;
    --bg-soft: #100b0c;
    --panel: #171011;
    --panel-2: #1f1517;
    --panel-3: #271a1c;
    --line: rgba(255, 210, 120, 0.14);
    --line-strong: rgba(255, 210, 120, 0.28);
    --red: #c40000;
    --red-bright: #ef1717;
    --red-dark: #7d0000;
    --gold: #ffd24a;
    --gold-2: #f0b53c;
    --text: #f6eee4;
    --muted: #a99d94;
    --muted-2: #726863;
    --green: #31d07d;
    --shadow: 0 18px 60px rgba(0, 0, 0, 0.42);
    --radius: 14px;
    --container: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(1000px 520px at 50% -160px, rgba(196, 0, 0, 0.24), transparent 70%),
        radial-gradient(800px 420px at 100% 20%, rgba(255, 210, 74, 0.04), transparent 70%),
        var(--bg);
    font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.22;
    background-image:
        linear-gradient(rgba(255, 210, 74, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 210, 74, 0.035) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(to bottom, black, transparent 78%);
    z-index: -1;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }

.container {
    width: min(var(--container), calc(100% - 36px));
    margin-inline: auto;
}

.hide { display: none !important; }

/* ---------- top bar ---------- */
.site-top {
    background: #171313;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #a39a92;
    font-size: 12px;
}
.site-top .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 34px;
    gap: 14px;
}
.site-top .top-left,
.site-top .top-right {
    display: flex;
    align-items: center;
    gap: 16px;
    white-space: nowrap;
}
.site-top .dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 10px rgba(49, 208, 125, 0.8);
    display: inline-block;
    margin-right: 7px;
}
.site-top a:hover { color: var(--gold); }

/* ---------- header ---------- */
.site-header {
    background: linear-gradient(180deg, #2a0809 0%, #150607 100%);
    border-bottom: 1px solid rgba(255, 210, 74, 0.13);
    position: relative;
    z-index: 20;
}
.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 78px;
    gap: 24px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 220px;
}
.brand-mark {
    width: 42px; height: 42px;
    position: relative;
    border-radius: 11px;
    background: linear-gradient(145deg, #ff3a3a, #9c0000 58%, #5b0000);
    box-shadow: 0 6px 22px rgba(239, 23, 23, 0.28), inset 0 1px 0 rgba(255,255,255,.25);
    transform: rotate(45deg);
    flex: none;
}
.brand-mark::after {
    content: "A";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    transform: rotate(-45deg);
    color: #ffe18a;
    font-weight: 900;
    font-size: 19px;
    text-shadow: 0 2px 0 rgba(0,0,0,.4);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name {
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 2px;
    background: linear-gradient(180deg, #fff3bf, #ffc62e 55%, #d7920d);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.brand-sub {
    color: #a88d70;
    font-size: 10px;
    letter-spacing: 2.6px;
    text-transform: uppercase;
    margin-top: 4px;
}
.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.header-actions .balance-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 13px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 210, 74, 0.055);
    color: var(--muted);
    font-size: 12px;
}
.header-actions .balance-pill strong { color: var(--gold); font-size: 15px; }
.header-actions .user-chip {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 6px 12px 6px 7px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.18);
}
.user-avatar {
    width: 30px; height: 30px;
    border-radius: 50%;
    display: grid; place-items: center;
    background: linear-gradient(145deg, #ffcf57, #9e6300);
    color: #2b1200;
    font-weight: 900;
    font-size: 13px;
}
.user-chip .u-name { font-size: 12px; color: #e9dcc9; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.btn {
    border: 1px solid transparent;
    border-radius: 9px;
    padding: 10px 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-weight: 700;
    font-size: 13px;
    transition: 0.18s ease;
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
    white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
.btn:active { transform: translateY(0); }
.btn-gold {
    color: #2b1300;
    background: linear-gradient(180deg, #ffe58a, #ffc12e 55%, #e3a10e);
    box-shadow: 0 8px 24px rgba(255, 193, 46, 0.18);
}
.btn-red {
    color: #fff;
    background: linear-gradient(180deg, #ef2020, #b00000);
    box-shadow: 0 8px 24px rgba(196, 0, 0, 0.26);
}
.btn-ghost {
    border-color: var(--line-strong);
    color: #f3d9a0;
    background: rgba(255, 210, 74, 0.04);
}
.btn-block { width: 100%; }
.btn-lg { padding: 13px 24px; font-size: 15px; border-radius: 10px; }
.btn-sm { padding: 7px 12px; font-size: 12px; border-radius: 7px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

/* ---------- nav ---------- */
.site-nav {
    background: linear-gradient(180deg, #c40000, #9e0000);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset, 0 10px 30px rgba(0,0,0,.22);
    position: relative;
    z-index: 19;
}
.site-nav .container {
    display: flex;
    align-items: center;
    overflow-x: auto;
    scrollbar-width: none;
}
.site-nav .container::-webkit-scrollbar { display: none; }
.site-nav a {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 22px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .5px;
    white-space: nowrap;
}
.site-nav a:hover, .site-nav a.active {
    color: var(--gold);
    background: rgba(0, 0, 0, 0.16);
}
.site-nav a.active::after {
    content: "";
    position: absolute;
    left: 22px; right: 22px; bottom: 0;
    height: 3px;
    border-radius: 2px 2px 0 0;
    background: var(--gold);
    box-shadow: 0 -2px 12px rgba(255, 210, 74, 0.6);
}

/* ---------- hero / home ---------- */
.hero {
    position: relative;
    overflow: hidden;
    margin-top: 24px;
    border-radius: 20px;
    min-height: 330px;
    display: grid;
    grid-template-columns: 1.25fr .75fr;
    gap: 30px;
    padding: 46px 46px 42px;
    background:
        radial-gradient(620px 300px at 12% 20%, rgba(255, 210, 74, 0.14), transparent 65%),
        radial-gradient(700px 360px at 80% 120%, rgba(196, 0, 0, 0.55), transparent 65%),
        linear-gradient(120deg, #230708 0%, #140607 56%, #3b0a0b 100%);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}
.hero::before {
    content: "";
    position: absolute;
    width: 330px; height: 330px;
    right: -100px; top: -120px;
    border-radius: 50%;
    border: 1px solid rgba(255, 210, 74, 0.14);
    box-shadow: 0 0 0 36px rgba(255, 210, 74, 0.035), 0 0 0 76px rgba(255, 210, 74, 0.02);
}
.hero-copy { position: relative; z-index: 1; }
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 11px;
    border-radius: 999px;
    border: 1px solid rgba(255, 210, 74, 0.3);
    color: var(--gold);
    background: rgba(255, 210, 74, 0.06);
    font-size: 12px;
    letter-spacing: 1px;
    margin-bottom: 18px;
}
.hero h1 {
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.18;
    letter-spacing: 1px;
    font-weight: 900;
}
.hero h1 em {
    font-style: normal;
    color: var(--gold);
    text-shadow: 0 0 26px rgba(255, 210, 74, 0.24);
}
.hero p {
    color: #c9b8a4;
    margin-top: 14px;
    max-width: 560px;
    font-size: 14px;
    line-height: 1.9;
}
.hero-actions { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.hero-side {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
}
.hero-stat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 210, 74, 0.16);
    backdrop-filter: blur(6px);
}
.hero-stat span { color: #b5a493; font-size: 12px; }
.hero-stat strong { color: var(--gold); font-size: 18px; letter-spacing: .4px; }

.notice-bar {
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 11px;
    background: var(--panel);
    border: 1px solid var(--line);
    color: #c9b8a4;
    overflow: hidden;
}
.notice-bar .label {
    flex: none;
    color: var(--gold);
    font-weight: 700;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.notice-bar .marquee { flex: 1; overflow: hidden; white-space: nowrap; }
.notice-bar .marquee span { display: inline-block; padding-left: 100%; animation: marquee 26s linear infinite; }
@keyframes marquee { to { transform: translateX(-100%); } }

.section {
    margin-top: 34px;
}
.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
}
.section-head h2 {
    font-size: 22px;
    letter-spacing: 1px;
    position: relative;
    padding-left: 13px;
}
.section-head h2::before {
    content: "";
    position: absolute;
    left: 0; top: 5px; bottom: 5px;
    width: 4px;
    border-radius: 4px;
    background: linear-gradient(180deg, var(--gold), #9b6100);
}
.section-head p { color: var(--muted); font-size: 12px; }
.section-head .more { color: var(--gold); font-size: 12px; }

.game-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}
.game-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    padding: 20px;
    min-height: 205px;
    display: flex;
    flex-direction: column;
    background: linear-gradient(155deg, #211617, #120c0d 78%);
    border: 1px solid var(--line);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.22);
    transition: 0.22s ease;
}
.game-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 210, 74, 0.36);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
}
.game-card.featured {
    background:
        radial-gradient(400px 170px at 20% 0%, rgba(255, 210, 74, 0.13), transparent 70%),
        linear-gradient(155deg, #351012, #15090a 78%);
}
.game-card .game-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.game-icon {
    width: 46px; height: 46px;
    border-radius: 12px;
    display: grid; place-items: center;
    font-size: 22px;
    background: linear-gradient(145deg, rgba(255, 210, 74, 0.22), rgba(196, 0, 0, 0.22));
    border: 1px solid var(--line-strong);
}
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 10px;
    letter-spacing: .5px;
    border: 1px solid var(--line);
    color: var(--gold);
    background: rgba(255, 210, 74, 0.06);
}
.badge.off { color: #b9aaa0; border-color: rgba(255,255,255,.12); background: rgba(255,255,255,.04); }
.game-card h3 { margin-top: 16px; font-size: 19px; letter-spacing: .5px; }
.game-card p { color: var(--muted); font-size: 12px; margin-top: 6px; line-height: 1.8; }
.game-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.game-tags span { font-size: 10px; padding: 3px 7px; border-radius: 5px; background: rgba(255,255,255,.05); color: #cbb9a6; }
.game-card .game-foot { margin-top: auto; padding-top: 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.game-link { color: var(--gold); font-size: 12px; font-weight: 700; }

.feature-strip {
    margin-top: 34px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
.feature {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 16px;
    border-radius: 12px;
    background: var(--panel);
    border: 1px solid var(--line);
}
.feature .fi {
    width: 38px; height: 38px;
    border-radius: 10px;
    display: grid; place-items: center;
    background: rgba(196, 0, 0, 0.16);
    color: var(--gold);
    font-size: 17px;
    flex: none;
}
.feature b { display: block; font-size: 13px; }
.feature small { color: var(--muted); font-size: 11px; }

/* ---------- footer ---------- */
.site-footer {
    margin-top: 56px;
    border-top: 1px solid var(--line);
    background: #0d090a;
}
.site-footer .foot-main {
    padding: 34px 0 26px;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 30px;
}
.site-footer .foot-brand .brand { min-width: 0; }
.site-footer .foot-brand p { color: var(--muted); font-size: 12px; margin-top: 14px; max-width: 380px; line-height: 1.9; }
.site-footer h4 { color: #e8d9c4; font-size: 13px; margin-bottom: 12px; }
.site-footer .foot-links { display: grid; gap: 8px; color: var(--muted); font-size: 12px; }
.site-footer .foot-links a:hover { color: var(--gold); }
.site-footer .foot-bottom {
    border-top: 1px solid rgba(255,255,255,.06);
    padding: 14px 0 18px;
    color: #786d66;
    font-size: 11px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.age-tag { color: var(--gold); font-weight: 700; }

/* ---------- auth ---------- */
.auth-page {
    min-height: calc(100vh - 34px);
    display: flex;
    flex-direction: column;
}
.auth-main {
    flex: 1;
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 0;
    align-items: stretch;
    margin: 30px auto 40px;
    width: min(1020px, calc(100% - 36px));
    border-radius: 18px;
    overflow: hidden;
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}
.auth-visual {
    position: relative;
    padding: 44px 42px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background:
        radial-gradient(400px 220px at 20% 15%, rgba(255, 210, 74, 0.16), transparent 70%),
        radial-gradient(600px 400px at 100% 100%, rgba(196, 0, 0, 0.55), transparent 70%),
        linear-gradient(150deg, #2a090b, #130607 70%);
    min-height: 540px;
}
.auth-visual h1 { font-size: 34px; line-height: 1.3; letter-spacing: 1px; }
.auth-visual h1 em { font-style: normal; color: var(--gold); }
.auth-visual p { color: #c4b09c; margin-top: 14px; line-height: 1.9; max-width: 380px; }
.auth-features { display: grid; gap: 12px; margin-top: 26px; }
.auth-feature { display: flex; gap: 10px; align-items: center; color: #e5d6c1; font-size: 13px; }
.auth-feature i {
    width: 20px; height: 20px; border-radius: 50%;
    display: grid; place-items: center;
    background: rgba(255, 210, 74, 0.13);
    color: var(--gold);
    font-style: normal;
    font-size: 11px;
    flex: none;
}
.auth-form-wrap { padding: 42px 44px; display: flex; flex-direction: column; justify-content: center; background: linear-gradient(180deg, #171011, #100b0c); }
.auth-form-head { margin-bottom: 26px; }
.auth-form-head h2 { font-size: 26px; letter-spacing: 1px; }
.auth-form-head p { color: var(--muted); font-size: 12px; margin-top: 6px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; color: #c9b8a4; font-size: 12px; margin-bottom: 7px; }
.form-control {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    color: var(--text);
    background: rgba(0, 0, 0, 0.24);
    border: 1px solid rgba(255, 210, 74, 0.16);
    border-radius: 9px;
    outline: none;
    transition: 0.18s ease;
}
.form-control::placeholder { color: #7f746c; }
.form-control:focus { border-color: rgba(255, 210, 74, 0.55); box-shadow: 0 0 0 3px rgba(255, 210, 74, 0.07); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.input-with-code { display: flex; gap: 10px; align-items: stretch; }
.input-with-code .form-control { flex: 1; }
.captcha-img {
    width: 108px;
    height: 46px;
    border-radius: 9px;
    border: 1px solid rgba(255, 210, 74, 0.18);
    object-fit: cover;
    cursor: pointer;
    background: #fff;
}
.form-error {
    min-height: 20px;
    color: #ff8d8d;
    font-size: 12px;
    margin: -4px 0 10px;
}
.form-help { color: var(--muted-2); font-size: 11px; margin-top: 5px; }
.auth-switch { margin-top: 18px; color: var(--muted); font-size: 12px; text-align: center; }
.auth-switch a { color: var(--gold); }
.auth-submit { height: 48px; margin-top: 4px; }
.auth-bottom-note { margin-top: 22px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.06); color: #7d716a; font-size: 11px; line-height: 1.8; }

/* ---------- game page ---------- */
.game-page { padding-bottom: 40px; }
.game-grid-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 18px;
    margin-top: 20px;
    align-items: start;
}
.game-top-card {
    border-radius: 16px;
    background:
        radial-gradient(460px 220px at 12% 0%, rgba(255, 210, 74, 0.10), transparent 70%),
        linear-gradient(150deg, #241011, #130a0b 80%);
    border: 1px solid var(--line);
    padding: 22px;
    box-shadow: 0 14px 40px rgba(0,0,0,.22);
}
.game-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.game-title-row h1 { font-size: 25px; letter-spacing: 1px; display: flex; align-items: center; gap: 10px; }
.game-title-row h1 .mini-icon { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: rgba(255, 210, 74, 0.1); border: 1px solid var(--line); font-size: 17px; }
.game-title-row .sub { color: var(--muted); font-size: 12px; margin-top: 6px; }
.issue-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.issue-pill { padding: 7px 11px; border-radius: 8px; background: rgba(0,0,0,.24); border: 1px solid var(--line); color: #d6c4b0; font-size: 12px; }
.issue-pill b { color: var(--gold); font-weight: 700; }

.draw-panel {
    margin-top: 20px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 18px;
    align-items: center;
}
.balls { display: flex; gap: 9px; flex-wrap: wrap; }
.ball {
    width: 46px; height: 46px;
    border-radius: 50%;
    display: grid; place-items: center;
    font-size: 19px;
    font-weight: 900;
    color: #3a1600;
    background: linear-gradient(145deg, #ffe99c, #ffc83d 58%, #d89509);
    box-shadow: 0 5px 16px rgba(255, 200, 61, 0.2), inset 0 1px 0 rgba(255,255,255,.5);
}
.ball.red {
    color: #fff;
    background: linear-gradient(145deg, #ff5b5b, #c40000 58%, #7d0000);
    box-shadow: 0 5px 16px rgba(196, 0, 0, 0.26), inset 0 1px 0 rgba(255,255,255,.2);
}
.draw-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 13px; }
.chip { padding: 4px 9px; border-radius: 6px; font-size: 11px; color: #d9c6b1; background: rgba(255,255,255,.055); border: 1px solid rgba(255,255,255,.06); }
.chip b { color: var(--gold); }
.countdown-box { text-align: right; min-width: 150px; }
.countdown-box .cd-label { color: var(--muted); font-size: 11px; letter-spacing: .5px; }
.countdown-box .cd-time { font-size: 30px; font-weight: 900; color: var(--gold); font-variant-numeric: tabular-nums; letter-spacing: 1px; line-height: 1.2; }
.countdown-box .cd-state { font-size: 11px; color: var(--green); margin-top: 3px; }
.countdown-box.closed .cd-time { color: #ff7b7b; }
.countdown-box.closed .cd-state { color: #ff7b7b; }

.panel {
    border-radius: 16px;
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: 0 12px 34px rgba(0,0,0,.18);
}
.panel-head {
    padding: 16px 18px;
    border-bottom: 1px solid rgba(255,255,255,.06);
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.panel-head h3 { font-size: 15px; letter-spacing: .5px; display: flex; align-items: center; gap: 8px; }
.panel-head h3::before { content: ""; width: 3px; height: 15px; border-radius: 3px; background: var(--gold); }
.panel-head .muted { color: var(--muted); font-size: 11px; }
.panel-body { padding: 18px; }

.bet-tabs { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 16px; }
.bet-tab {
    border: 1px solid rgba(255,255,255,.08);
    background: rgba(255,255,255,.035);
    color: #cdbcaa;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 12px;
    transition: .16s ease;
}
.bet-tab:hover { border-color: rgba(255, 210, 74, .35); color: var(--gold); }
.bet-tab.active { color: #2a1200; background: linear-gradient(180deg, #ffe58a, #ffc12e); border-color: transparent; font-weight: 800; }
.bet-hint { color: var(--muted); font-size: 11px; margin-bottom: 12px; }
.bet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: 8px; }
.bet-option {
    border: 1px solid rgba(255,255,255,.08);
    background: rgba(0,0,0,.16);
    border-radius: 9px;
    padding: 9px 6px;
    text-align: center;
    transition: .16s ease;
    color: #e5d5c2;
}
.bet-option:hover { border-color: rgba(255, 210, 74, .4); background: rgba(255, 210, 74, .05); }
.bet-option.active { border-color: var(--gold); background: rgba(255, 210, 74, .11); box-shadow: 0 0 0 2px rgba(255, 210, 74, .08) inset; }
.bet-option .v { font-size: 16px; font-weight: 800; line-height: 1.2; }
.bet-option .o { color: var(--gold); font-size: 10px; margin-top: 2px; }
.bet-option.empty { visibility: hidden; pointer-events: none; }

.bet-side { position: sticky; top: 16px; display: grid; gap: 14px; }
.slip { overflow: hidden; }
.slip .panel-body { padding: 16px; }
.slip-balance {
    display: flex; align-items: center; justify-content: space-between;
    padding: 11px 12px; border-radius: 9px;
    background: rgba(255, 210, 74, .055);
    border: 1px solid var(--line);
    margin-bottom: 14px;
}
.slip-balance span { color: var(--muted); font-size: 11px; }
.slip-balance strong { color: var(--gold); font-size: 19px; }
.slip-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--muted); margin-bottom: 9px; }
.slip-row b { color: #ead8bf; font-weight: 700; }
.amount-wrap { display: flex; align-items: center; gap: 6px; margin: 12px 0 10px; }
.amount-wrap .currency { color: var(--gold); font-weight: 800; }
.amount-input {
    flex: 1; height: 44px; padding: 0 12px; border-radius: 8px;
    border: 1px solid rgba(255, 210, 74, .25);
    background: rgba(0,0,0,.3); color: var(--text); outline: none;
    font-size: 17px; font-weight: 800; letter-spacing: .5px;
}
.amount-input:focus { border-color: var(--gold); }
.quick-amounts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 14px; }
.quick-amounts button {
    border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.035); color: #cbb9a6;
    border-radius: 6px; padding: 6px 0; font-size: 11px;
}
.quick-amounts button:hover { color: var(--gold); border-color: rgba(255,210,74,.3); }
.slip-actions { display: grid; grid-template-columns: 1fr 1.5fr; gap: 8px; }
.slip-msg { min-height: 18px; margin-top: 10px; font-size: 11px; color: #ff9c9c; }
.slip-msg.ok { color: var(--green); }
.recent-orders { display: grid; gap: 8px; }
.recent-order {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    padding: 8px 10px; border-radius: 8px; background: rgba(255,255,255,.035);
    color: #c9b8a4; font-size: 11px;
}
.recent-order .r-play { color: #e8d6bf; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-order .r-amt { color: var(--gold); flex: none; }

.history-panel { margin-top: 18px; }
.table-wrap { overflow-x: auto; }
table.data-table { width: 100%; border-collapse: collapse; min-width: 680px; }
.data-table th, .data-table td { padding: 11px 13px; border-bottom: 1px solid rgba(255,255,255,.055); text-align: left; font-size: 12px; white-space: nowrap; }
.data-table th { color: #9d8f84; font-weight: 600; background: rgba(255,255,255,.025); }
.data-table td { color: #d7c6b3; }
.data-table tr:last-child td { border-bottom: none; }
.mini-balls { display: flex; gap: 4px; }
.mini-ball { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,210,74,.12); color: var(--gold); font-size: 11px; font-weight: 800; }
.mini-ball.red { background: rgba(196,0,0,.3); color: #ff9a9a; }
.tag-win { color: var(--green); }
.tag-lose { color: #ff8d8d; }

.toast-wrap { position: fixed; z-index: 9999; right: 18px; bottom: 22px; display: grid; gap: 8px; }
.toast {
    min-width: 220px; max-width: 360px;
    padding: 12px 15px; border-radius: 10px;
    background: #221718; color: #f2e4d4; border: 1px solid rgba(255,210,74,.22);
    box-shadow: 0 14px 38px rgba(0,0,0,.4); font-size: 12px;
    animation: toastIn .2s ease both;
}
.toast.ok { border-color: rgba(49,208,125,.35); }
.toast.err { border-color: rgba(255,90,90,.4); }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }

.empty-state { padding: 26px 10px; text-align: center; color: var(--muted); font-size: 12px; }

@media (max-width: 980px) {
    .game-grid-wrap { grid-template-columns: 1fr; }
    .bet-side { position: static; grid-template-columns: 1fr 1fr; }
    .hero { grid-template-columns: 1fr; padding: 34px 26px; }
    .hero-side { display: none; }
    .game-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .feature-strip { grid-template-columns: repeat(2, 1fr); }
    .auth-main { grid-template-columns: 1fr; }
    .auth-visual { min-height: 300px; padding: 30px; }
    .site-footer .foot-main { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
    .container { width: calc(100% - 24px); }
    .site-top .top-left .hide-sm, .site-top .top-right .hide-sm { display: none; }
    .site-header .container { min-height: 66px; gap: 10px; }
    .brand { min-width: 0; }
    .brand-mark { width: 34px; height: 34px; border-radius: 9px; }
    .brand-mark::after { font-size: 15px; }
    .brand-name { font-size: 19px; }
    .brand-sub { font-size: 8px; letter-spacing: 1.6px; }
    .header-actions .balance-pill { display: none; }
    .header-actions .btn { padding: 8px 11px; font-size: 12px; }
    .site-nav a { min-height: 40px; padding: 0 13px; font-size: 12px; }
    .hero { margin-top: 14px; border-radius: 14px; padding: 28px 20px; }
    .hero h1 { font-size: 28px; }
    .notice-bar { padding: 0 11px; }
    .game-grid { grid-template-columns: 1fr; }
    .feature-strip { grid-template-columns: 1fr; }
    .game-top-card { padding: 16px; }
    .draw-panel { grid-template-columns: 1fr; }
    .countdown-box { text-align: left; }
    .ball { width: 38px; height: 38px; font-size: 16px; }
    .bet-side { grid-template-columns: 1fr; }
    .auth-main { margin: 16px auto 26px; }
    .auth-form-wrap { padding: 28px 20px; }
    .auth-visual { padding: 26px 22px; }
    .auth-visual h1 { font-size: 26px; }
    .form-row { grid-template-columns: 1fr; }
    .site-footer .foot-main { grid-template-columns: 1fr; gap: 20px; }
    .site-footer .foot-bottom { display: block; line-height: 1.9; }
}

/* ---------- member center ---------- */
.user-hero {
    margin-top: 20px;
    border-radius: 18px;
    padding: 26px;
    background:
        radial-gradient(520px 260px at 12% 0%, rgba(255, 210, 74, 0.13), transparent 70%),
        linear-gradient(145deg, #2b1012, #14090a 80%);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}
.user-profile { display: flex; align-items: center; justify-content: space-between; gap: 22px; flex-wrap: wrap; }
.user-profile-left { display: flex; align-items: center; gap: 14px; }
.avatar-lg {
    width: 58px; height: 58px; border-radius: 50%;
    display: grid; place-items: center;
    background: linear-gradient(145deg, #ffe58a, #b87400);
    color: #2b1300; font-size: 22px; font-weight: 900;
    box-shadow: 0 8px 24px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.4);
    flex: none;
}
.user-profile-left h1 { font-size: 22px; letter-spacing: .5px; }
.user-profile-left p { color: var(--muted); font-size: 12px; margin-top: 3px; }
.user-balance { text-align: right; }
.user-balance span { color: var(--muted); font-size: 11px; display: block; }
.user-balance strong { color: var(--gold); font-size: 31px; line-height: 1.2; letter-spacing: .5px; }
.user-balance small { color: var(--muted-2); font-size: 11px; }
.user-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 22px;
}
.stat-box {
    padding: 13px 14px;
    border-radius: 10px;
    background: rgba(0,0,0,.2);
    border: 1px solid rgba(255, 210, 74, .12);
}
.stat-box span { display: block; color: var(--muted); font-size: 11px; }
.stat-box strong { display: block; margin-top: 4px; font-size: 18px; color: #f3dfc2; }
.stat-box.gold strong { color: var(--gold); }
.stat-box.green strong { color: var(--green); }
.menu-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.menu-item {
    display: flex; gap: 12px; align-items: center;
    padding: 16px;
    border-radius: 12px;
    background: var(--panel);
    border: 1px solid var(--line);
    transition: .18s ease;
}
.menu-item:hover { transform: translateY(-2px); border-color: rgba(255,210,74,.35); background: var(--panel-2); }
.menu-icon {
    width: 40px; height: 40px; border-radius: 10px;
    display: grid; place-items: center;
    background: rgba(196,0,0,.16);
    color: var(--gold);
    font-size: 16px;
    flex: none;
}
.menu-item h3 { font-size: 13px; }
.menu-item p { color: var(--muted); font-size: 10px; margin-top: 2px; }
@media (max-width: 980px) {
    .menu-grid { grid-template-columns: repeat(2, 1fr); }
    .user-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
    .user-hero { padding: 18px; }
    .user-balance { text-align: left; }
    .user-stats { grid-template-columns: 1fr 1fr; }
    .menu-grid { grid-template-columns: 1fr; }
}
