/* 壹树游戏厅 · 共用样式：配色变量、顶部栏、语言菜单、按钮、遮罩层 */
:root {
  --bg: #f4f2ee;
  --bg-glow: rgba(120, 104, 214, .16);
  --bg-glow2: rgba(64, 170, 160, .12);
  --surface: #fbfaf7;
  --surface2: #ecebe6;
  --fill: rgba(40, 38, 60, .06);
  --line: rgba(40, 38, 60, .10);
  --text: #23222e;
  --text2: #5d5b6c;
  --text3: #8a8898;
  --primary: #6656c8;
  --primary2: #8a6fd6;
  --primary-strong: #4f41ad;
  --on-primary: #fbfaff;
  --teal: #2f9a8f;
  --gold: #c99a3e;
  --danger: #c4544f;
  --shadow-1: 0 1px 2px rgba(30, 28, 50, .06), 0 2px 8px rgba(30, 28, 50, .06);
  --shadow-2: 0 4px 12px rgba(30, 28, 50, .10), 0 16px 40px rgba(30, 28, 50, .10);
  --r-card: 18px;
  --r-pill: 999px;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "PingFang TC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14141c;
    --bg-glow: rgba(124, 104, 230, .22);
    --bg-glow2: rgba(52, 170, 156, .10);
    --surface: #1d1d28;
    --surface2: #191922;
    --fill: rgba(230, 228, 255, .07);
    --line: rgba(230, 228, 255, .10);
    --text: #ecebf4;
    --text2: #a9a7bb;
    --text3: #7c7a8e;
    --primary: #8676e6;
    --primary2: #a68cf0;
    --primary-strong: #b3a6ff;
    --on-primary: #fbfaff;
    --teal: #4fc0b2;
    --gold: #e0b45c;
    --danger: #e0716b;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .3), 0 2px 8px rgba(0, 0, 0, .25);
    --shadow-2: 0 4px 12px rgba(0, 0, 0, .35), 0 16px 40px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 520px at 15% -10%, var(--bg-glow), transparent 70%),
    radial-gradient(900px 480px at 100% 0%, var(--bg-glow2), transparent 70%),
    linear-gradient(180deg, var(--surface) 0%, var(--bg) 380px);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* 顶部栏 */
.top-bar {
  position: sticky; top: 0; z-index: 60;
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  border-bottom: 1px solid var(--line);
}
.top-bar .inner {
  max-width: 1120px; margin: 0 auto; padding: 0 16px;
  min-height: 56px; display: flex; align-items: center; gap: 12px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; letter-spacing: .2px; min-width: 0; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 10px; flex: none;
  display: grid; place-items: center; color: var(--on-primary);
  background: linear-gradient(135deg, var(--primary2), var(--primary));
  box-shadow: 0 4px 12px color-mix(in srgb, var(--primary) 35%, transparent);
}
.brand-mark .ic { width: 18px; height: 18px; }
.brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 语言菜单：地球 + 当前语言 + 下拉箭头 */
.lang-menu { position: relative; margin-left: auto; flex: none; }
.lang-menu summary {
  list-style: none; cursor: pointer; user-select: none;
  display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 10px 0 9px;
  border-radius: var(--r-pill); background: var(--fill); font-size: 13px; font-weight: 600; white-space: nowrap;
}
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary:hover, .lang-menu[open] summary { background: var(--surface); box-shadow: var(--shadow-1); }
.lang-menu summary:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.lang-menu summary .ic { width: 16px; height: 16px; color: var(--text2); }
.lang-menu summary .chev { width: 14px; height: 14px; stroke-width: 2.4; transition: transform .15s ease; }
.lang-menu[open] summary .chev { transform: rotate(180deg); }
.lang-menu .panel {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 168px;
  display: grid; padding: 6px; border-radius: 14px;
  background: var(--surface); box-shadow: var(--shadow-2); border: 1px solid var(--line);
}
.lang-menu .lang {
  display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px 0 8px;
  border: 0; background: none; cursor: pointer; text-align: left;
  border-radius: 8px; font-size: 14px; font-weight: 600; white-space: nowrap;
}
.lang-menu .lang:hover, .lang-menu .lang:focus-visible { background: var(--fill); outline: none; }
.lang-menu .lang.current { color: var(--primary-strong); font-weight: 700; }
.lang-menu .tick { display: inline-grid; place-items: center; width: 18px; height: 18px; }
.lang-menu .tick .ic { width: 16px; height: 16px; stroke-width: 2.6; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 22px; border: 0; border-radius: var(--r-pill);
  font-weight: 700; font-size: 15px; cursor: pointer; user-select: none;
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}
.btn:active { transform: scale(.97); }
.btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.btn-primary {
  color: var(--on-primary);
  background: linear-gradient(135deg, var(--primary2), var(--primary));
  box-shadow: 0 6px 18px color-mix(in srgb, var(--primary) 38%, transparent);
}
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { background: var(--fill); color: var(--text); }
.btn-ghost:hover { background: var(--surface); box-shadow: var(--shadow-1); }
.icon-btn {
  width: 38px; height: 38px; border-radius: 12px; border: 0; cursor: pointer;
  display: inline-grid; place-items: center; background: var(--fill); color: var(--text); flex: none;
}
.icon-btn:hover { background: var(--surface); box-shadow: var(--shadow-1); }
.icon-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
