/* 星矿寻宝 玩家端样式 */
:root {
    --game-bg: #0b1020;
    --game-panel: rgba(22, 30, 56, 0.92);
    --game-panel-2: rgba(31, 42, 76, 0.9);
    --game-line: rgba(255, 255, 255, 0.08);
    --game-text: #e9eefc;
    --game-muted: #9aa8c7;
    --game-gold: #ffc857;
    --game-red: #ff5d6c;
    --game-blue: #5b8cff;
    --game-green: #3ddc97;
}

* { box-sizing: border-box; }
body.game-body {
    margin: 0;
    min-height: 100vh;
    font-family: "Segoe UI", "Microsoft YaHei", "Noto Sans TH", Arial, sans-serif;
    color: var(--game-text);
    background:
        radial-gradient(circle at 12% 8%, rgba(91, 140, 255, .22), transparent 32%),
        radial-gradient(circle at 88% 0%, rgba(255, 200, 87, .15), transparent 28%),
        linear-gradient(160deg, #0b1020 0%, #111a36 55%, #0b1020 100%);
    background-attachment: fixed;
}
body.game-body a { color: inherit; text-decoration: none; }
.game-shell { max-width: 1180px; margin: 0 auto; padding: 0 18px 48px; }

/* 顶部工具条：语言选择固定在这里 */
.game-topbar {
    position: sticky; top: 0; z-index: 30;
    border-bottom: 1px solid var(--game-line);
    background: rgba(11, 16, 32, .86);
    backdrop-filter: blur(12px);
}
.game-topbar-inner {
    max-width: 1180px; margin: 0 auto; padding: 7px 18px;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.game-topbar-text { font-size: 12px; color: var(--game-muted); letter-spacing: .3px; }
.game-topbar-right { display: flex; align-items: center; gap: 8px; }
.game-topbar-label { font-size: 12px; color: var(--game-muted); }
.game-topbar-lang { padding: 5px 10px; font-size: 12px; border-radius: 8px; }

/* 导航 */
.game-nav {
    display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
    padding: 16px 0; border-bottom: 1px solid var(--game-line); margin-bottom: 26px;
}
.game-brand { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.game-logo {
    width: 42px; height: 42px; border-radius: 13px;
    background: linear-gradient(135deg, var(--game-gold), #ff7a59);
    display: grid; place-items: center; color: #231400; font-size: 20px;
    box-shadow: 0 8px 24px rgba(255, 200, 87, .28);
}
.game-brand strong { display: block; font-size: 18px; letter-spacing: .4px; }
.game-brand small { display: block; font-size: 11px; color: var(--game-muted); margin-top: 2px; }
.game-menu { display: flex; gap: 6px; flex-wrap: wrap; }
.game-menu a {
    padding: 8px 13px; border-radius: 10px; font-size: 14px; color: var(--game-muted);
    transition: .2s;
}
.game-menu a:hover, .game-menu a.active { color: #fff; background: rgba(255,255,255,.09); }
.game-nav-right { display: flex; align-items: center; gap: 10px; }
.game-lang, .game-btn, .game-input {
    border: 1px solid var(--game-line); background: rgba(255,255,255,.06);
    color: var(--game-text); border-radius: 10px; padding: 9px 12px; font-size: 14px;
    outline: none;
}
.game-lang option { color: #111; }
.game-input:focus { border-color: var(--game-blue); }
.game-btn { cursor: pointer; background: linear-gradient(135deg, #5b8cff, #7c5bff); border: none; font-weight: 600; }
.game-btn:hover { filter: brightness(1.1); }
.game-btn.gold { background: linear-gradient(135deg, var(--game-gold), #ff8a4c); color: #2a1600; }
.game-btn.red { background: linear-gradient(135deg, #ff5d6c, #ff3d81); }
.game-btn.ghost { background: rgba(255,255,255,.06); border: 1px solid var(--game-line); }
.game-btn.sm { padding: 6px 11px; font-size: 12px; border-radius: 8px; }
.game-btn:disabled { opacity: .55; cursor: not-allowed; }

/* 卡片与网格 */
.game-card {
    background: var(--game-panel); border: 1px solid var(--game-line);
    border-radius: 18px; padding: 22px; box-shadow: 0 18px 50px rgba(0,0,0,.22);
}
.game-card + .game-card { margin-top: 18px; }
.game-card h2, .game-card h3 { margin: 0 0 6px; }
.game-card h2 { font-size: 24px; }
.game-card h3 { font-size: 17px; }
.game-muted { color: var(--game-muted); font-size: 13px; }
.game-grid { display: grid; gap: 18px; }
.game-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.game-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.game-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 860px) {
    .game-grid.cols-2, .game-grid.cols-3, .game-grid.cols-4 { grid-template-columns: 1fr; }
    .game-menu { order: 3; width: 100%; }
}

/* 首页 */
.game-hero {
    position: relative; overflow: hidden; border-radius: 22px; padding: 42px 38px;
    background: linear-gradient(120deg, rgba(91,140,255,.28), rgba(255,93,108,.18)), var(--game-panel);
    border: 1px solid rgba(255,255,255,.1); margin-bottom: 20px;
}
.game-hero:after {
    content: ""; position: absolute; right: -80px; top: -100px; width: 320px; height: 320px;
    border-radius: 50%; background: radial-gradient(circle, rgba(255,200,87,.35), transparent 65%);
}
.game-hero h1 { font-size: 34px; margin: 0 0 12px; line-height: 1.25; }
.game-hero p { color: var(--game-muted); max-width: 680px; line-height: 1.8; margin-bottom: 22px; }
.game-stat { text-align: center; padding: 18px 10px; }
.game-stat b { display: block; font-size: 28px; color: var(--game-gold); }
.game-stat span { font-size: 12px; color: var(--game-muted); }
.game-wallet { display: flex; gap: 10px; flex-wrap: wrap; }
.game-pill {
    background: rgba(255,255,255,.06); border: 1px solid var(--game-line);
    border-radius: 999px; padding: 7px 14px; font-size: 13px;
}
.game-pill b { color: var(--game-gold); margin-left: 5px; }

/* 转盘 */
.game-wheel-wrap { display: grid; place-items: center; padding: 12px 0 24px; }
.game-wheel {
    position: relative; width: 320px; height: 320px; border-radius: 50%;
    border: 10px solid rgba(255,200,87,.75); background: #121a33;
    box-shadow: 0 0 0 6px rgba(255,200,87,.12), 0 18px 50px rgba(0,0,0,.45);
    transition: transform 4.2s cubic-bezier(.16,.84,.28,1);
}
.game-wheel:after {
    content: ""; position: absolute; inset: 16px; border-radius: 50%;
    border: 2px dashed rgba(255,255,255,.12);
}
.game-wheel-label {
    position: absolute; left: 50%; top: 50%; width: 300px; height: 300px;
    transform: translate(-50%, -50%);
}
.game-wheel-label span {
    position: absolute; left: 50%; top: 50%; width: 120px; margin-left: -60px; margin-top: -12px;
    text-align: center; font-size: 12px; font-weight: 700; color: #fff;
    text-shadow: 0 1px 4px rgba(0,0,0,.8); transform-origin: 50% 12px;
}
.game-wheel-pointer {
    position: absolute; top: -24px; left: 50%; transform: translateX(-50%);
    width: 0; height: 0; border-left: 14px solid transparent; border-right: 14px solid transparent;
    border-top: 28px solid var(--game-gold); z-index: 3;
}
.game-result {
    margin-top: 14px; min-height: 46px; text-align: center; font-size: 17px;
    color: var(--game-gold); font-weight: 700;
}
.game-prize-list { display: grid; gap: 8px; }
.game-prize-row {
    display: flex; align-items: center; gap: 10px; padding: 9px 12px;
    background: rgba(255,255,255,.04); border-radius: 10px; font-size: 13px;
}
.game-prize-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.game-prize-row .grow { flex: 1; }
.game-badge {
    display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 11px;
    background: rgba(91,140,255,.2); color: #bcd0ff;
}

/* 列表 */
.game-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.game-table th, .game-table td { padding: 11px 10px; text-align: left; border-bottom: 1px solid var(--game-line); }
.game-table th { color: var(--game-muted); font-weight: 600; font-size: 12px; }
.game-table tbody tr:hover { background: rgba(255,255,255,.035); }
.game-rank-no { font-weight: 800; color: var(--game-gold); }
.game-progress { height: 8px; background: rgba(255,255,255,.08); border-radius: 999px; overflow: hidden; }
.game-progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--game-blue), var(--game-green)); }
.game-avatar {
    width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
    background: linear-gradient(135deg, rgba(91,140,255,.5), rgba(255,93,108,.4)); font-weight: 800;
}
.game-avatar-label { display: flex; align-items: center; gap: 10px; }
.game-shop-item { display: flex; flex-direction: column; height: 100%; }
.game-shop-icon {
    height: 76px; border-radius: 12px; display: grid; place-items: center; font-size: 30px;
    background: linear-gradient(135deg, rgba(255,200,87,.16), rgba(91,140,255,.16)); margin-bottom: 12px;
}
.game-shop-item .price { color: var(--game-gold); font-weight: 700; margin: 8px 0 12px; }

/* 登录注册 */
.game-auth { max-width: 430px; margin: 70px auto; }
.game-auth .game-card { padding: 32px; }
.game-auth h1 { margin: 0 0 4px; font-size: 28px; }
.game-auth .field { margin-top: 16px; }
.game-auth label { display: block; font-size: 13px; color: var(--game-muted); margin-bottom: 7px; }
.game-auth .game-input { width: 100%; padding: 12px 14px; }
.game-auth .game-btn { width: 100%; margin-top: 22px; padding: 12px; }
.game-auth .links { margin-top: 18px; text-align: center; font-size: 13px; color: var(--game-muted); }
.game-auth .links a { color: var(--game-gold); }
.game-auth-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }

/* 提示 */
.game-toast {
    position: fixed; top: 22px; left: 50%; transform: translateX(-50%) translateY(-20px);
    background: #182449; border: 1px solid var(--game-line); color: var(--game-text);
    padding: 12px 20px; border-radius: 12px; box-shadow: 0 12px 40px rgba(0,0,0,.4);
    opacity: 0; pointer-events: none; transition: .25s; z-index: 99; font-size: 14px;
}
.game-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.game-toast.error { border-color: var(--game-red); }
.game-footer { text-align: center; color: var(--game-muted); font-size: 12px; padding: 26px 0 8px; }

/* 游戏中心与新增小游戏 */
.game-btn.blue { background: linear-gradient(135deg, #5b8cff, #7c5bff); }
.game-btn.green { background: linear-gradient(135deg, #3ddc97, #20b486); }
.game-btn.orange { background: linear-gradient(135deg, #ff9f43, #ff6b35); }
.game-btn.purple { background: linear-gradient(135deg, #9b7bff, #6f5bd8); }
.game-num-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin: 18px 0; }
.game-num {
    padding: 14px 0; border-radius: 12px; border: 1px solid var(--game-line);
    background: rgba(255,255,255,.05); color: var(--game-text); font-size: 18px;
    font-weight: 700; cursor: pointer; transition: .15s;
}
.game-num:hover { border-color: #5b8cff; transform: translateY(-2px); }
.game-num.active { background: linear-gradient(135deg, #5b8cff, #7c5bff); border-color: transparent; color: #fff; }
.game-card-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 18px 0; }
.game-flip {
    height: 86px; border-radius: 12px; border: 1px solid var(--game-line);
    background: linear-gradient(135deg, rgba(91,140,255,.18), rgba(155,123,255,.18));
    color: var(--game-muted); font-size: 26px; font-weight: 700; cursor: pointer;
    display: flex; align-items: center; justify-content: center; transition: .15s;
}
.game-flip:hover { transform: translateY(-2px); border-color: #5b8cff; }
.game-flip.active { border-color: #ffc857; box-shadow: 0 0 0 2px rgba(255,200,87,.35); color: var(--game-text); }
.game-flip.opened { background: rgba(255,255,255,.09); color: var(--game-text); }
.game-dice-grid { display: flex; gap: 18px; justify-content: center; margin: 24px 0; }
.game-dice {
    width: 92px; height: 92px; border-radius: 18px; border: 1px solid var(--game-line);
    background: linear-gradient(135deg, #fff, #dfe6f5); color: #1b2550;
    display: flex; align-items: center; justify-content: center;
    font-size: 42px; font-weight: 800; box-shadow: 0 10px 24px rgba(0,0,0,.18);
}
.game-big-result { text-align: center; font-size: 18px; font-weight: 700; min-height: 30px; margin: 10px 0; }
.game-center { text-align: center; }
