/* =========================================================
 * 小王桌游站 · 主页皮肤系统
 * 通过 <html data-skin="..."> 切换主题，配合 public/skins.js
 * 内置：aurora / luxury / hud / cosmos / rosegold（特效款）
 *      classic / night / neon / wood / ink / paper（基础款）
 * ========================================================= */

/* ---------- 特效皮肤通用：动态背景层 / 噪点 / 动画 ---------- */

#skin-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  display: none;
}
#skin-bg > div { position: absolute; inset: 0; }
.skin-bg-grad,
.skin-bg-orbs,
.skin-bg-stars,
.skin-bg-grid,
.skin-bg-sheen { opacity: 0; }
.skin-bg-orbs { display: none; }
.skin-bg-orbs i {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  will-change: transform, opacity;
}

#skin-noise {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  pointer-events: none;
  opacity: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

@keyframes skin-bg-move {
  0% { background-position: 0% 0%; }
  50% { background-position: 100% 100%; }
  100% { background-position: 0% 0%; }
}
@keyframes skin-orb-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(42px, -30px) scale(1.08); }
  66% { transform: translate(-30px, 24px) scale(.94); }
}
@keyframes skin-star-twinkle {
  0%, 100% { opacity: .22; }
  50% { opacity: 1; }
}
@keyframes skin-grid-scroll {
  from { background-position: 0 0, 0 0; }
  to { background-position: 0 46px, 46px 0; }
}
@keyframes skin-scan {
  0% { top: -140px; opacity: 0; }
  8% { opacity: 1; }
  92% { opacity: 1; }
  100% { top: 110%; opacity: 0; }
}
@keyframes skin-sheen-sweep {
  0% { background-position: 130% 0; }
  100% { background-position: -130% 0; }
}
@keyframes skin-shimmer {
  to { background-position: 200% center; }
}
@keyframes skin-shoot {
  0% { transform: translate(-42vw, -12vh) rotate(-32deg); opacity: 0; }
  5% { opacity: 1; }
  16% { transform: translate(34vw, 14vh) rotate(-32deg); opacity: 0; }
  100% { transform: translate(34vw, 14vh) rotate(-32deg); opacity: 0; }
}
@keyframes skin-rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes skin-hero-in {
  from { opacity: 0; transform: translateY(22px) scale(.985); }
  to { opacity: 1; transform: none; }
}
@keyframes skin-pulse {
  0%, 100% { text-shadow: 0 0 0 rgba(74, 222, 128, 0); }
  50% { text-shadow: 0 0 12px rgba(74, 222, 128, .6); }
}

/* 分类专属色（仅特效皮肤消费） */
#groups .group:nth-child(1) { --cat-accent: #f87171; }
#groups .group:nth-child(2) { --cat-accent: #fb923c; }
#groups .group:nth-child(3) { --cat-accent: #facc15; }
#groups .group:nth-child(4) { --cat-accent: #4ade80; }
#groups .group:nth-child(5) { --cat-accent: #2dd4bf; }
#groups .group:nth-child(6) { --cat-accent: #38bdf8; }
#groups .group:nth-child(7) { --cat-accent: #818cf8; }
#groups .group:nth-child(8) { --cat-accent: #c084fc; }
#groups .group:nth-child(9) { --cat-accent: #f472b6; }
#groups .group:nth-child(10) { --cat-accent: #fbbf24; }

/* 首次加载入场动画（约 2.6 秒后自动关闭，避免刷新闪动） */
html.skin-anim-on .hero { animation: skin-hero-in .7s cubic-bezier(.22, 1, .36, 1) both; }
html.skin-anim-on .group { animation: skin-rise .5s ease-out both; }
html.skin-anim-on .group:nth-child(2) { animation-delay: .05s; }
html.skin-anim-on .group:nth-child(3) { animation-delay: .1s; }
html.skin-anim-on .group:nth-child(4) { animation-delay: .15s; }
html.skin-anim-on .group:nth-child(5) { animation-delay: .2s; }
html.skin-anim-on .group:nth-child(n + 6) { animation-delay: .24s; }
html.skin-anim-on .game-card { animation: skin-rise .55s ease-out both; }
html.skin-anim-on .game-card:nth-child(2) { animation-delay: .04s; }
html.skin-anim-on .game-card:nth-child(3) { animation-delay: .08s; }
html.skin-anim-on .game-card:nth-child(4) { animation-delay: .12s; }
html.skin-anim-on .game-card:nth-child(5) { animation-delay: .16s; }
html.skin-anim-on .game-card:nth-child(6) { animation-delay: .2s; }
html.skin-anim-on .game-card:nth-child(n + 7) { animation-delay: .24s; }
html.skin-anim-on .fav-card { animation: skin-rise .45s ease-out both; }

@media (prefers-reduced-motion: reduce) {
  .skin-bg-grad, .skin-bg-orbs i, .skin-bg-stars, .skin-bg-grid, .skin-bg-sheen,
  .hero-title, .conn-status.ok, .group-title::after {
    animation: none !important;
  }
  html.skin-anim-on .hero,
  html.skin-anim-on .group,
  html.skin-anim-on .game-card,
  html.skin-anim-on .fav-card {
    animation: none !important;
  }
}

@media (max-width: 640px) {
  .skin-bg-orbs i { filter: blur(48px); }
}

/* ---------- 站长工具 · 站点皮肤 ---------- */

.skin-admin {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px 12px;
  background: var(--brand-soft2);
}
/* 站点皮肤面板：与「游戏数据」一样整块展开 */
.skin-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 4px 14px 14px;
  margin-bottom: 14px;
  box-shadow: 0 2px 8px var(--shadow-tint);
  width: 100%;
}
.skin-panel .skin-admin {
  margin-top: 0;
  border: none;
  background: transparent;
  padding: 0;
}
.skin-admin-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.skin-admin-title { font-size: 13px; font-weight: 700; color: var(--brand-dark); }
.skin-admin-hint { font-size: 11px; color: var(--muted); }
.skin-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 8px;
}
.skin-admin-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.skin-save-status { font-size: 12px; color: var(--muted); }
.skin-save-status.preview { color: var(--gold); font-weight: 600; }
.skin-save-status.ok { color: var(--green); font-weight: 600; }
.skin-save-status.err { color: var(--red); font-weight: 600; }
.skin-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 12px;
  padding: 8px 10px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: border-color .12s ease, background .12s ease;
}
.skin-opt:hover { border-color: var(--brand); background: var(--brand-soft); }
.skin-opt.on { border-color: var(--brand); background: var(--brand-soft); }
.skin-swatch {
  width: 44px;
  height: 34px;
  border-radius: 8px;
  flex: none;
  border: 1px solid rgba(0, 0, 0, .14);
}
.skin-meta { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.skin-name { font-size: 13px; font-weight: 700; color: var(--ink); }
.skin-desc { font-size: 11px; color: var(--muted); }
.skin-check { color: var(--brand); font-size: 14px; flex: none; visibility: hidden; }
.skin-opt.on .skin-check { visibility: visible; }

/* ---------- 站长工具 · 动态背景选择（只换背景，不换配色） ---------- */

.bg-admin {
  margin-top: 14px;
  border-top: 1px dashed var(--line);
  padding-top: 12px;
}
.bg-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}
.bg-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 12px;
  padding: 8px 10px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: border-color .12s ease, background .12s ease;
}
.bg-opt:hover { border-color: var(--brand); background: var(--brand-soft); }
.bg-opt.on { border-color: var(--brand); background: var(--brand-soft); }
.bg-swatch {
  width: 34px;
  height: 30px;
  border-radius: 8px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  background: linear-gradient(135deg, var(--brand-soft), var(--soft-neutral2));
  border: 1px solid var(--line);
}
.bg-name { font-size: 13px; font-weight: 700; color: var(--ink); flex: 1; min-width: 0; }

/* =========================================================
 * classic · 原版浅紫（默认，变量即 style.css 默认值）
 * ========================================================= */

/* =========================================================
 * night · 深空暗夜
 * ========================================================= */

html[data-skin="night"] {
  --bg-a: #0b1020;
  --bg-b: #141c38;
  --panel: rgba(255, 255, 255, .055);
  --panel-soft: rgba(255, 255, 255, .04);
  --ink: #e7ecfa;
  --muted: #93a0bf;
  --brand: #7aa2ff;
  --brand-dark: #b9cdfc;
  --green: #4ade80;
  --red: #fb7185;
  --gold: #f7c948;
  --line: rgba(255, 255, 255, .14);
  --line-soft: rgba(255, 255, 255, .07);
  --brand-soft: rgba(122, 162, 255, .12);
  --brand-soft-hover: rgba(122, 162, 255, .2);
  --brand-soft2: rgba(255, 255, 255, .05);
  --brand-line: rgba(122, 162, 255, .38);
  --soft-neutral: rgba(255, 255, 255, .08);
  --soft-neutral2: rgba(255, 255, 255, .06);
  --green-soft: rgba(74, 222, 128, .16);
  --green-ink: #6ee7a0;
  --red-soft: rgba(251, 113, 133, .16);
  --gold-soft: rgba(247, 201, 72, .16);
  --toast-bg: #232c44;
  --shadow-tint: rgba(8, 12, 30, .5);
  --shadow-hero: rgba(0, 0, 0, .35);
  --shadow-flash: rgba(122, 162, 255, .6);
  --shadow-focus: rgba(122, 162, 255, .28);
  --shadow-ctrl: rgba(122, 162, 255, .35);
  --modal-scrim: rgba(4, 7, 18, .62);
  --skin-panel: var(--panel);
  --skin-panel-soft: var(--panel-soft);
  --skin-line: var(--line);
  --skin-ink: var(--ink);
  --skin-muted: var(--muted);
  --skin-blur: blur(10px);
}
html[data-skin="night"] body {
  background:
    radial-gradient(1200px 520px at 85% -120px, rgba(122, 162, 255, .16), transparent 60%),
    radial-gradient(900px 480px at 8% -60px, rgba(140, 90, 255, .12), transparent 60%),
    linear-gradient(160deg, var(--bg-a) 0%, var(--bg-b) 100%);
}
html[data-skin="night"] .panel,
html[data-skin="night"] .search-panel,
html[data-skin="night"] .active-tables,
html[data-skin="night"] .game-card,
html[data-skin="night"] .stats-table-wrap {
  backdrop-filter: blur(10px);
}
html[data-skin="night"] .hero {
  border-color: rgba(122, 162, 255, .28);
  box-shadow: 0 8px 24px var(--shadow-hero);
}
html[data-skin="night"] .hero-title { text-shadow: 0 0 22px rgba(122, 162, 255, .45); }
html[data-skin="night"] .resume-bar {
  background: linear-gradient(120deg, rgba(122, 162, 255, .16), rgba(122, 162, 255, .07));
  border-color: rgba(122, 162, 255, .38);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
}
html[data-skin="night"] .resume-bar.off {
  background: rgba(255, 255, 255, .05);
  border-color: var(--line);
  box-shadow: none;
}
html[data-skin="night"] .gc-link { color: #c6d7ff; }
html[data-skin="night"] .hub-link-box { background: rgba(122, 162, 255, .1); }
html[data-skin="night"] .fav-check.on { background: var(--gold-soft); color: var(--gold); }

/* =========================================================
 * neon · 霓虹街机
 * ========================================================= */

html[data-skin="neon"] {
  --bg-a: #170a26;
  --bg-b: #0b0614;
  --panel: rgba(24, 11, 44, .72);
  --panel-soft: rgba(255, 255, 255, .04);
  --ink: #f2eaff;
  --muted: #a99ac2;
  --brand: #ff2ea6;
  --brand-dark: #ff8ad0;
  --green: #2dffc4;
  --red: #ff5f7e;
  --gold: #ffe14d;
  --line: rgba(255, 255, 255, .16);
  --line-soft: rgba(255, 255, 255, .08);
  --brand-soft: rgba(255, 46, 166, .12);
  --brand-soft-hover: rgba(255, 46, 166, .2);
  --brand-soft2: rgba(255, 255, 255, .05);
  --brand-line: rgba(255, 46, 166, .42);
  --soft-neutral: rgba(255, 255, 255, .09);
  --soft-neutral2: rgba(255, 255, 255, .06);
  --green-soft: rgba(45, 255, 196, .14);
  --green-ink: #7dffdd;
  --red-soft: rgba(255, 95, 126, .15);
  --gold-soft: rgba(255, 225, 77, .16);
  --toast-bg: #2b1236;
  --shadow-tint: rgba(120, 0, 90, .28);
  --shadow-hero: rgba(255, 46, 166, .25);
  --shadow-flash: rgba(255, 46, 166, .65);
  --shadow-focus: rgba(38, 224, 255, .35);
  --shadow-ctrl: rgba(255, 46, 166, .5);
  --modal-scrim: rgba(5, 0, 15, .66);
  --skin-panel: var(--panel);
  --skin-panel-soft: var(--panel-soft);
  --skin-line: var(--line);
  --skin-ink: var(--ink);
  --skin-muted: var(--muted);
  --skin-blur: blur(8px);
}
html[data-skin="neon"] body {
  background:
    radial-gradient(1100px 500px at 90% -140px, rgba(255, 46, 166, .22), transparent 62%),
    radial-gradient(900px 520px at 6% -80px, rgba(38, 224, 255, .14), transparent 62%),
    linear-gradient(160deg, var(--bg-a) 0%, var(--bg-b) 100%);
}
html[data-skin="neon"] .hero {
  border: 1px solid rgba(255, 46, 166, .45);
  background: linear-gradient(180deg, rgba(60, 10, 70, .5), rgba(20, 8, 40, .62));
  box-shadow: 0 0 34px rgba(255, 46, 166, .22);
}
html[data-skin="neon"] .hero-title {
  background: linear-gradient(90deg, #ff2ea6, #ff8ad0 45%, #26e0ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
}
html[data-skin="neon"] .hero-sub { color: #cfb7e8; }
html[data-skin="neon"] .panel,
html[data-skin="neon"] .search-panel,
html[data-skin="neon"] .active-tables,
html[data-skin="neon"] .game-card,
html[data-skin="neon"] .stats-table-wrap {
  backdrop-filter: blur(8px);
}
html[data-skin="neon"] .game-card { border-color: rgba(255, 46, 166, .22); }
html[data-skin="neon"] .game-card:hover {
  border-color: rgba(38, 224, 255, .55);
  box-shadow: 0 0 20px rgba(38, 224, 255, .18);
}
html[data-skin="neon"] .group-title { color: #ff8ad0; }
html[data-skin="neon"] .btn.primary {
  background: linear-gradient(90deg, #ff2ea6, #b44dff);
  border-color: #ff6fc2;
  box-shadow: 0 4px 18px rgba(255, 46, 166, .35);
}
html[data-skin="neon"] .resume-bar {
  background: linear-gradient(120deg, rgba(255, 46, 166, .16), rgba(38, 224, 255, .1));
  border-color: rgba(255, 46, 166, .4);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .3);
}
html[data-skin="neon"] .resume-bar.off {
  background: rgba(255, 255, 255, .05);
  border-color: var(--line);
  box-shadow: none;
}
html[data-skin="neon"] .hub-link-box { background: rgba(255, 46, 166, .1); border-color: rgba(255, 46, 166, .35); }
html[data-skin="neon"] .gc-link { color: #e9c1ff; }
html[data-skin="neon"] .fav-check.on { background: var(--gold-soft); color: var(--gold); }

/* =========================================================
 * wood · 暖木茶室
 * ========================================================= */

html[data-skin="wood"] {
  --bg-a: #f2e7d0;
  --bg-b: #e2d0ab;
  --panel: #fdf7e8;
  --panel-soft: #f8f0de;
  --ink: #3f2f1c;
  --muted: #8a765b;
  --brand: #a85c26;
  --brand-dark: #7c421a;
  --green: #3d7a46;
  --red: #b3442f;
  --gold: #b8860b;
  --line: #e3d2ae;
  --line-soft: #ecdfc3;
  --brand-soft: #f2e3c8;
  --brand-soft-hover: #ead7b4;
  --brand-soft2: #faf3e2;
  --brand-line: #d4b78c;
  --soft-neutral: #efe5d0;
  --soft-neutral2: #ece1cb;
  --green-soft: #e2efdc;
  --green-ink: #2f6a38;
  --red-soft: #f6e0da;
  --gold-soft: #f8ecd0;
  --toast-bg: #4a3620;
  --shadow-tint: rgba(120, 84, 40, .10);
  --shadow-hero: rgba(120, 84, 40, .16);
  --shadow-flash: rgba(168, 92, 38, .55);
  --shadow-focus: rgba(168, 92, 38, .18);
  --shadow-ctrl: rgba(168, 92, 38, .25);
  --modal-scrim: rgba(60, 35, 10, .42);
  --skin-panel: var(--panel);
  --skin-panel-soft: var(--panel-soft);
  --skin-line: var(--line);
  --skin-ink: var(--ink);
  --skin-muted: var(--muted);
  --skin-blur: none;
}
html[data-skin="wood"] body {
  background:
    radial-gradient(900px 420px at 50% -120px, rgba(255, 255, 255, .35), transparent 60%),
    linear-gradient(160deg, var(--bg-a) 0%, var(--bg-b) 100%);
}
html[data-skin="wood"] .hero {
  background: linear-gradient(180deg, #8a5a33, #6f4526);
  border: 1px solid #b98a55;
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, .08), 0 8px 24px rgba(120, 84, 40, .25);
}
html[data-skin="wood"] .hero-title { color: #f6e4bd; text-shadow: 0 2px 0 rgba(60, 30, 10, .35); }
html[data-skin="wood"] .hero-sub { color: #e9d4a7; }
html[data-skin="wood"] .hero-meta .conn-status.ok { color: #b8e6a8; }
html[data-skin="wood"] .hero-meta .last-updated { color: #e2cba0; }
html[data-skin="wood"] .hero .btn {
  background: rgba(255, 255, 255, .14);
  border-color: rgba(255, 255, 255, .3);
  color: #fbeed3;
}
html[data-skin="wood"] .hero .btn.primary {
  background: linear-gradient(180deg, #d9a441, #b57e22);
  border-color: #e6bd68;
  color: #3c2808;
  font-weight: 700;
}
html[data-skin="wood"] .game-card { border-color: #e0cca6; }
html[data-skin="wood"] .group-title { color: #7c421a; }
html[data-skin="wood"] .gc-link { color: #8a5a2a; }
html[data-skin="wood"] .resume-bar {
  background: linear-gradient(120deg, #fdf6e2, #f7ead0);
  border-color: #d8b876;
}
html[data-skin="wood"] .hub-link-box { background: #f3e6cd; border-color: #d4b78c; }

/* =========================================================
 * ink · 墨玉青绿（国风）
 * ========================================================= */

html[data-skin="ink"] {
  --bg-a: #0d211b;
  --bg-b: #07130f;
  --panel: rgba(255, 255, 255, .05);
  --panel-soft: rgba(255, 255, 255, .04);
  --ink: #e9f2ec;
  --muted: #93b4a4;
  --brand: #3ecf9e;
  --brand-dark: #9be8cc;
  --green: #4ade80;
  --red: #ef6f6f;
  --gold: #d4af6a;
  --line: rgba(212, 175, 106, .22);
  --line-soft: rgba(255, 255, 255, .08);
  --brand-soft: rgba(62, 207, 158, .12);
  --brand-soft-hover: rgba(62, 207, 158, .2);
  --brand-soft2: rgba(255, 255, 255, .05);
  --brand-line: rgba(212, 175, 106, .4);
  --soft-neutral: rgba(255, 255, 255, .08);
  --soft-neutral2: rgba(255, 255, 255, .06);
  --green-soft: rgba(74, 222, 128, .16);
  --green-ink: #6ee7a0;
  --red-soft: rgba(239, 111, 111, .16);
  --gold-soft: rgba(212, 175, 106, .16);
  --toast-bg: #173a2e;
  --shadow-tint: rgba(0, 0, 0, .4);
  --shadow-hero: rgba(0, 0, 0, .4);
  --shadow-flash: rgba(62, 207, 158, .6);
  --shadow-focus: rgba(62, 207, 158, .3);
  --shadow-ctrl: rgba(62, 207, 158, .35);
  --modal-scrim: rgba(2, 10, 7, .6);
  --skin-panel: var(--panel);
  --skin-panel-soft: var(--panel-soft);
  --skin-line: var(--line);
  --skin-ink: var(--ink);
  --skin-muted: var(--muted);
  --skin-blur: blur(8px);
}
html[data-skin="ink"] body {
  background:
    radial-gradient(1000px 460px at 85% -120px, rgba(62, 207, 158, .12), transparent 62%),
    radial-gradient(800px 420px at 6% -60px, rgba(212, 175, 106, .07), transparent 60%),
    linear-gradient(160deg, var(--bg-a) 0%, var(--bg-b) 100%);
}
html[data-skin="ink"] .hero {
  position: relative;
  background: linear-gradient(180deg, rgba(20, 52, 42, .55), rgba(9, 28, 22, .6));
  border: 1px solid rgba(212, 175, 106, .38);
}
html[data-skin="ink"] .hero::before {
  content: "";
  position: absolute;
  inset: 6px;
  pointer-events: none;
  border: 1px solid rgba(212, 175, 106, .22);
  border-radius: 10px;
}
html[data-skin="ink"] .hero-title {
  font-family: "STKaiti", "KaiTi", "楷体", "Microsoft YaHei", serif;
  color: #f3e2bb;
  letter-spacing: 4px;
  text-shadow: 0 0 18px rgba(212, 175, 106, .25);
}
html[data-skin="ink"] .hero-sub { color: #b8cdbf; letter-spacing: 1px; }
html[data-skin="ink"] .panel,
html[data-skin="ink"] .search-panel,
html[data-skin="ink"] .active-tables,
html[data-skin="ink"] .game-card,
html[data-skin="ink"] .stats-table-wrap {
  backdrop-filter: blur(8px);
}
html[data-skin="ink"] .game-card { border-color: rgba(212, 175, 106, .16); }
html[data-skin="ink"] .group-title {
  font-family: "STKaiti", "KaiTi", "楷体", "Microsoft YaHei", serif;
  color: #d4af6a;
  letter-spacing: 2px;
}
html[data-skin="ink"] .gc-link { color: #8fdcc0; }
html[data-skin="ink"] .resume-bar {
  background: linear-gradient(120deg, rgba(212, 175, 106, .16), rgba(62, 207, 158, .1));
  border-color: rgba(212, 175, 106, .4);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .3);
}
html[data-skin="ink"] .resume-bar.off {
  background: rgba(255, 255, 255, .05);
  border-color: var(--line);
  box-shadow: none;
}
html[data-skin="ink"] .hub-link-box { background: rgba(212, 175, 106, .1); border-color: rgba(212, 175, 106, .32); }
html[data-skin="ink"] .fav-check.on { background: var(--gold-soft); color: var(--gold); }

/* =========================================================
 * paper · 极简纸白（紧凑左对齐布局）
 * ========================================================= */

html[data-skin="paper"] {
  --bg-a: #fbfbf7;
  --bg-b: #f3f3ec;
  --panel: #ffffff;
  --panel-soft: #fafaf6;
  --ink: #17181a;
  --muted: #71747c;
  --brand: #111214;
  --brand-dark: #111214;
  --green: #157a4e;
  --red: #b3362b;
  --gold: #a16207;
  --line: #e3e3dc;
  --line-soft: #ecece6;
  --brand-soft: #f0f0ea;
  --brand-soft-hover: #e7e7df;
  --brand-soft2: #fafaf6;
  --brand-line: #d6d6cc;
  --soft-neutral: #f1f1ec;
  --soft-neutral2: #f4f4ef;
  --green-soft: #e2f1e9;
  --green-ink: #11613c;
  --red-soft: #f8e6e3;
  --gold-soft: #f7edd6;
  --toast-bg: #202124;
  --shadow-tint: rgba(0, 0, 0, .03);
  --shadow-hero: rgba(0, 0, 0, .04);
  --shadow-flash: rgba(0, 0, 0, .35);
  --shadow-focus: rgba(0, 0, 0, .10);
  --shadow-ctrl: rgba(0, 0, 0, .16);
  --modal-scrim: rgba(20, 20, 20, .38);
  --skin-panel: var(--panel);
  --skin-panel-soft: var(--panel-soft);
  --skin-line: var(--line);
  --skin-ink: var(--ink);
  --skin-muted: var(--muted);
  --skin-blur: none;
}
html[data-skin="paper"] #app { max-width: 1000px; padding-top: 14px; }
html[data-skin="paper"] .hero {
  text-align: left;
  border-radius: 10px;
  box-shadow: none;
  padding: 16px 18px 12px;
}
html[data-skin="paper"] .hero-title { font-size: 24px; }
html[data-skin="paper"] .hero-sub { margin: 4px 0 10px; font-size: 13px; }
html[data-skin="paper"] .hero-meta { justify-content: flex-start; margin-bottom: 10px; }
html[data-skin="paper"] .toolbar { justify-content: flex-start; gap: 10px; }
html[data-skin="paper"] .panel,
html[data-skin="paper"] .search-panel,
html[data-skin="paper"] .active-tables,
html[data-skin="paper"] .game-card,
html[data-skin="paper"] .stats-table-wrap {
  border-radius: 10px;
  box-shadow: none;
}
html[data-skin="paper"] .game-card:hover { box-shadow: 0 2px 10px rgba(0, 0, 0, .05); }
html[data-skin="paper"] .group-title { font-size: 15px; letter-spacing: .5px; }
html[data-skin="paper"] .btn { border-radius: 8px; }
html[data-skin="paper"] .search-input { border-radius: 8px; }
html[data-skin="paper"] .made-by { font-size: 12px; }
html[data-skin="paper"] .resume-bar { box-shadow: none; }
html[data-skin="paper"] .fav-card { border-radius: 8px; }
html[data-skin="paper"] .fav-check { border-radius: 8px; }

/* =========================================================
 * aurora · 极光幻境（动态极光 + 玻璃拟态）
 * ========================================================= */

html[data-skin="aurora"] {
  --bg-a: #050816;
  --bg-b: #0a1226;
  --panel: rgba(255, 255, 255, .06);
  --panel-soft: rgba(255, 255, 255, .05);
  --ink: #eef4ff;
  --muted: #9fb3d4;
  --brand: #38bdf8;
  --brand-dark: #7ef0c2;
  --green: #4ade80;
  --red: #fb7185;
  --gold: #f5d06a;
  --line: rgba(255, 255, 255, .14);
  --line-soft: rgba(255, 255, 255, .08);
  --brand-soft: rgba(56, 189, 248, .14);
  --brand-soft-hover: rgba(56, 189, 248, .22);
  --brand-soft2: rgba(255, 255, 255, .06);
  --brand-line: rgba(126, 240, 194, .4);
  --soft-neutral: rgba(255, 255, 255, .09);
  --soft-neutral2: rgba(255, 255, 255, .06);
  --green-soft: rgba(74, 222, 128, .16);
  --green-ink: #86efac;
  --red-soft: rgba(251, 113, 133, .16);
  --gold-soft: rgba(245, 208, 106, .16);
  --toast-bg: #0d1b2e;
  --shadow-tint: rgba(0, 0, 0, .45);
  --shadow-hero: rgba(56, 189, 248, .18);
  --shadow-flash: rgba(56, 189, 248, .6);
  --shadow-focus: rgba(56, 189, 248, .3);
  --shadow-ctrl: rgba(56, 189, 248, .4);
  --modal-scrim: rgba(2, 6, 16, .62);
  --skin-panel: var(--panel);
  --skin-panel-soft: var(--panel-soft);
  --skin-line: var(--line);
  --skin-ink: var(--ink);
  --skin-muted: var(--muted);
  --skin-blur: blur(16px) saturate(140%);
}
html[data-skin="aurora"] #skin-bg { display: block; }
html[data-skin="aurora"] #skin-noise { opacity: .05; mix-blend-mode: overlay; }
html[data-skin="aurora"] body { background: #050816; }
html[data-skin="aurora"] .skin-bg-grad {
  opacity: 1;
  background: linear-gradient(120deg, #050816, #0d2b4a 25%, #123f33 50%, #1b1140 75%, #050816);
  background-size: 300% 300%;
  animation: skin-bg-move 22s ease-in-out infinite;
}
html[data-skin="aurora"] .skin-bg-orbs { display: block; opacity: 1; }
html[data-skin="aurora"] .skin-bg-orbs i { animation: skin-orb-float 16s ease-in-out infinite; }
html[data-skin="aurora"] .skin-bg-orbs i:nth-child(1) { width: 460px; height: 460px; left: -8%; top: -12%; background: rgba(56, 189, 248, .30); }
html[data-skin="aurora"] .skin-bg-orbs i:nth-child(2) { width: 520px; height: 520px; right: -10%; top: 8%; background: rgba(139, 92, 246, .28); animation-delay: -4s; }
html[data-skin="aurora"] .skin-bg-orbs i:nth-child(3) { width: 420px; height: 420px; left: 22%; bottom: -16%; background: rgba(52, 245, 197, .22); animation-delay: -8s; }
html[data-skin="aurora"] .skin-bg-orbs i:nth-child(4) { width: 300px; height: 300px; right: 22%; top: 44%; background: rgba(255, 255, 255, .08); animation-delay: -6s; }
html[data-skin="aurora"] .skin-bg-orbs i:nth-child(5) { width: 340px; height: 340px; left: -4%; top: 46%; background: rgba(59, 130, 246, .18); animation-delay: -11s; }
html[data-skin="aurora"] .panel,
html[data-skin="aurora"] .search-panel,
html[data-skin="aurora"] .active-tables,
html[data-skin="aurora"] .game-card,
html[data-skin="aurora"] .stats-table-wrap,
html[data-skin="aurora"] .hero {
  background: rgba(255, 255, 255, .055);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-color: rgba(255, 255, 255, .13);
  box-shadow: 0 10px 32px rgba(2, 8, 22, .35), inset 0 1px 0 rgba(255, 255, 255, .10);
}
html[data-skin="aurora"] .hero { padding: 26px 24px 20px; }
html[data-skin="aurora"] .hero-title {
  font-size: 34px;
  background: linear-gradient(90deg, #7ef0c2, #38bdf8 45%, #a78bfa);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: skin-shimmer 6s linear infinite;
  text-shadow: none;
}
html[data-skin="aurora"] .hero-sub { color: #b9c9e8; }
html[data-skin="aurora"] .group-title {
  background: linear-gradient(90deg, #7ef0c2, #38bdf8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
html[data-skin="aurora"] .group-title::after {
  content: "";
  display: block;
  height: 2px;
  margin-top: 5px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--cat-accent, #38bdf8), transparent);
  opacity: .75;
}
html[data-skin="aurora"] .game-card {
  border-top: 3px solid var(--cat-accent, rgba(56, 189, 248, .45));
  transition: transform .18s ease, box-shadow .22s ease, border-color .22s ease;
}
html[data-skin="aurora"] .game-card:hover {
  transform: translateY(-4px);
  border-color: rgba(126, 240, 194, .5);
  box-shadow: 0 18px 40px rgba(2, 8, 22, .5), 0 0 24px rgba(56, 189, 248, .18);
}
html[data-skin="aurora"] .btn.primary {
  background: linear-gradient(90deg, #0891b2, #38bdf8);
  border-color: #7dd3fc;
  box-shadow: 0 4px 18px rgba(56, 189, 248, .32);
}
html[data-skin="aurora"] .conn-status.ok { animation: skin-pulse 2.6s ease-in-out infinite; }
html[data-skin="aurora"] .resume-bar {
  background: linear-gradient(120deg, rgba(56, 189, 248, .16), rgba(52, 245, 197, .08));
  border-color: rgba(56, 189, 248, .4);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .3);
}
html[data-skin="aurora"] .resume-bar.off {
  background: rgba(255, 255, 255, .05);
  border-color: var(--line);
  box-shadow: none;
}
html[data-skin="aurora"] .gc-link { color: #bfe8ff; }
html[data-skin="aurora"] .hub-link-box { background: rgba(56, 189, 248, .1); border-color: rgba(56, 189, 248, .35); }
html[data-skin="aurora"] .fav-check.on { background: var(--gold-soft); color: var(--gold); }
@media (max-width: 640px) {
  html[data-skin="aurora"] .hero-title { font-size: 24px; }
}

/* =========================================================
 * luxury · 鎏金奢华（暗夜鎏金 + 流光描边）
 * ========================================================= */

html[data-skin="luxury"] {
  --bg-a: #0b0a08;
  --bg-b: #12100b;
  --panel: rgba(24, 21, 15, .9);
  --panel-soft: rgba(30, 26, 18, .9);
  --ink: #f0e6cd;
  --muted: #a99c80;
  --brand: #d4af37;
  --brand-dark: #f0cf74;
  --green: #8fce6b;
  --red: #e0655a;
  --gold: #d4af37;
  --line: rgba(212, 175, 55, .24);
  --line-soft: rgba(212, 175, 55, .12);
  --brand-soft: rgba(212, 175, 55, .12);
  --brand-soft-hover: rgba(212, 175, 55, .2);
  --brand-soft2: rgba(255, 255, 255, .04);
  --brand-line: rgba(212, 175, 55, .4);
  --soft-neutral: rgba(255, 255, 255, .07);
  --soft-neutral2: rgba(255, 255, 255, .05);
  --green-soft: rgba(143, 206, 107, .15);
  --green-ink: #b5e394;
  --red-soft: rgba(224, 101, 90, .16);
  --gold-soft: rgba(212, 175, 55, .16);
  --toast-bg: #241d0e;
  --shadow-tint: rgba(0, 0, 0, .5);
  --shadow-hero: rgba(0, 0, 0, .55);
  --shadow-flash: rgba(212, 175, 55, .6);
  --shadow-focus: rgba(212, 175, 55, .3);
  --shadow-ctrl: rgba(212, 175, 55, .35);
  --modal-scrim: rgba(5, 4, 1, .66);
  --skin-panel: var(--panel);
  --skin-panel-soft: var(--panel-soft);
  --skin-line: var(--line);
  --skin-ink: var(--ink);
  --skin-muted: var(--muted);
  --skin-blur: none;
}
html[data-skin="luxury"] #skin-bg { display: block; }
html[data-skin="luxury"] #skin-noise { opacity: .06; mix-blend-mode: overlay; }
html[data-skin="luxury"] body { background: #0b0a08; }
html[data-skin="luxury"] .skin-bg-grad {
  opacity: 1;
  background: radial-gradient(900px 520px at 50% -140px, rgba(212, 175, 55, .16), transparent 62%),
    linear-gradient(180deg, #151209, #0b0a08 55%);
  animation: skin-bg-move 16s ease-in-out infinite alternate;
}
html[data-skin="luxury"] .skin-bg-sheen {
  opacity: .9;
  background: linear-gradient(115deg, transparent 42%, rgba(245, 214, 123, .07) 50%, transparent 58%);
  background-size: 300% 100%;
  animation: skin-sheen-sweep 9s linear infinite;
}
html[data-skin="luxury"] .skin-bg-stars {
  opacity: 1;
  background-image:
    radial-gradient(1.5px 1.5px at 14% 22%, rgba(245, 214, 123, .7), transparent),
    radial-gradient(1px 1px at 38% 12%, rgba(255, 255, 255, .6), transparent),
    radial-gradient(1.5px 1.5px at 62% 26%, rgba(245, 214, 123, .6), transparent),
    radial-gradient(1px 1px at 82% 16%, rgba(255, 255, 255, .5), transparent),
    radial-gradient(1px 1px at 24% 42%, rgba(245, 214, 123, .45), transparent),
    radial-gradient(1.5px 1.5px at 52% 38%, rgba(255, 255, 255, .55), transparent),
    radial-gradient(1px 1px at 74% 48%, rgba(245, 214, 123, .5), transparent),
    radial-gradient(1px 1px at 10% 62%, rgba(255, 255, 255, .4), transparent),
    radial-gradient(1.5px 1.5px at 42% 58%, rgba(245, 214, 123, .5), transparent),
    radial-gradient(1px 1px at 68% 70%, rgba(255, 255, 255, .45), transparent),
    radial-gradient(1px 1px at 88% 64%, rgba(245, 214, 123, .4), transparent);
  background-repeat: no-repeat;
  animation: skin-star-twinkle 4.2s ease-in-out infinite;
}
html[data-skin="luxury"] .panel,
html[data-skin="luxury"] .search-panel,
html[data-skin="luxury"] .active-tables,
html[data-skin="luxury"] .game-card,
html[data-skin="luxury"] .stats-table-wrap,
html[data-skin="luxury"] .hero {
  background: linear-gradient(180deg, rgba(26, 22, 15, .92), rgba(16, 14, 9, .95));
  border: 1px solid rgba(212, 175, 55, .26);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(245, 214, 123, .08);
}
html[data-skin="luxury"] .hero {
  position: relative;
  padding: 26px 24px 20px;
}
html[data-skin="luxury"] .hero::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 10px;
  width: 26px;
  height: 26px;
  border-left: 2px solid rgba(212, 175, 55, .75);
  border-top: 2px solid rgba(212, 175, 55, .75);
}
html[data-skin="luxury"] .hero::after {
  content: "";
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 26px;
  height: 26px;
  border-right: 2px solid rgba(212, 175, 55, .75);
  border-bottom: 2px solid rgba(212, 175, 55, .75);
}
html[data-skin="luxury"] .hero-title {
  font-size: 34px;
  background: linear-gradient(90deg, #b78a1f, #f5d67b 35%, #fff3c4 50%, #f5d67b 65%, #b78a1f);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: skin-shimmer 7s linear infinite;
  text-shadow: none;
}
html[data-skin="luxury"] .hero-sub { color: #c9b98f; }
html[data-skin="luxury"] .group-title { color: #ecd27a; font-weight: 800; }
html[data-skin="luxury"] .group-title::after {
  content: "";
  display: block;
  height: 1px;
  margin-top: 6px;
  background: linear-gradient(90deg, var(--cat-accent, #d4af37), rgba(212, 175, 55, .05));
}
html[data-skin="luxury"] .game-card {
  border-top: 3px solid var(--cat-accent, rgba(212, 175, 55, .45));
  transition: transform .18s ease, box-shadow .22s ease, border-color .22s ease;
}
html[data-skin="luxury"] .game-card:hover {
  transform: translateY(-3px);
  border-color: rgba(245, 214, 123, .55);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .55), 0 0 22px rgba(212, 175, 55, .15);
}
html[data-skin="luxury"] .btn.primary {
  background: linear-gradient(180deg, #e2b84b, #a97f1e);
  border-color: #ecd27a;
  color: #241b05;
  box-shadow: 0 4px 18px rgba(212, 175, 55, .3);
}
html[data-skin="luxury"] .conn-status.ok { animation: skin-pulse 2.8s ease-in-out infinite; }
html[data-skin="luxury"] .resume-bar {
  background: linear-gradient(120deg, rgba(212, 175, 55, .14), rgba(212, 175, 55, .06));
  border-color: rgba(212, 175, 55, .4);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .4);
}
html[data-skin="luxury"] .resume-bar.off {
  background: rgba(255, 255, 255, .04);
  border-color: var(--line);
  box-shadow: none;
}
html[data-skin="luxury"] .gc-link { color: #e8d19a; }
html[data-skin="luxury"] .hub-link-box { background: rgba(212, 175, 55, .08); border-color: rgba(212, 175, 55, .3); }
html[data-skin="luxury"] .fav-check.on { background: var(--gold-soft); color: var(--gold); }
@media (max-width: 640px) {
  html[data-skin="luxury"] .hero-title { font-size: 24px; }
}

/* =========================================================
 * hud · 未来科技（HUD 界面 + 网格扫描）
 * ========================================================= */

html[data-skin="hud"] {
  --bg-a: #030609;
  --bg-b: #04131a;
  --panel: rgba(5, 16, 22, .88);
  --panel-soft: rgba(8, 20, 27, .9);
  --ink: #d9f6ff;
  --muted: #7ea9b8;
  --brand: #22d3ee;
  --brand-dark: #7defff;
  --green: #34e6a8;
  --red: #fb7185;
  --gold: #facc15;
  --line: rgba(34, 211, 238, .22);
  --line-soft: rgba(34, 211, 238, .1);
  --brand-soft: rgba(34, 211, 238, .12);
  --brand-soft-hover: rgba(34, 211, 238, .2);
  --brand-soft2: rgba(34, 211, 238, .05);
  --brand-line: rgba(34, 211, 238, .4);
  --soft-neutral: rgba(34, 211, 238, .09);
  --soft-neutral2: rgba(34, 211, 238, .06);
  --green-soft: rgba(52, 230, 168, .15);
  --green-ink: #6df5c3;
  --red-soft: rgba(251, 113, 133, .15);
  --gold-soft: rgba(250, 204, 21, .16);
  --toast-bg: #06232c;
  --shadow-tint: rgba(0, 0, 0, .5);
  --shadow-hero: rgba(0, 0, 0, .45);
  --shadow-flash: rgba(34, 211, 238, .65);
  --shadow-focus: rgba(34, 211, 238, .3);
  --shadow-ctrl: rgba(34, 211, 238, .4);
  --modal-scrim: rgba(1, 8, 12, .7);
  --skin-panel: var(--panel);
  --skin-panel-soft: var(--panel-soft);
  --skin-line: var(--line);
  --skin-ink: var(--ink);
  --skin-muted: var(--muted);
  --skin-blur: none;
}
html[data-skin="hud"] #skin-bg { display: block; }
html[data-skin="hud"] #skin-noise { opacity: .05; mix-blend-mode: overlay; }
html[data-skin="hud"] body { background: #030609; }
html[data-skin="hud"] .skin-bg-grad {
  opacity: 1;
  background: radial-gradient(800px 460px at 80% -120px, rgba(34, 211, 238, .12), transparent 62%),
    linear-gradient(180deg, #04141b, #030609 55%);
}
html[data-skin="hud"] .skin-bg-grid {
  opacity: .8;
  background-image:
    linear-gradient(rgba(34, 211, 238, .13) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, .13) 1px, transparent 1px);
  background-size: 46px 46px;
  transform: perspective(420px) rotateX(58deg) scale(1.8);
  transform-origin: 50% 0;
  animation: skin-grid-scroll 3.2s linear infinite;
}
html[data-skin="hud"] #skin-bg::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(180deg, transparent, rgba(34, 211, 238, .09), transparent);
  animation: skin-scan 5s linear infinite;
}
html[data-skin="hud"] .panel,
html[data-skin="hud"] .search-panel,
html[data-skin="hud"] .active-tables,
html[data-skin="hud"] .game-card,
html[data-skin="hud"] .stats-table-wrap,
html[data-skin="hud"] .hero {
  background: rgba(5, 16, 22, .88);
  border: 1px solid rgba(34, 211, 238, .24);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, .06), 0 12px 30px rgba(0, 0, 0, .5);
}
html[data-skin="hud"] .hero { padding: 26px 24px 20px; }
html[data-skin="hud"] .hero-title {
  font-size: 34px;
  color: #e2faff;
  letter-spacing: 3px;
  text-shadow: 0 0 18px rgba(34, 211, 238, .65);
}
html[data-skin="hud"] .hero-sub { color: #8fc4d2; letter-spacing: 1px; }
html[data-skin="hud"] .group-title { color: #67e8f9; letter-spacing: 2px; }
html[data-skin="hud"] .group-title::before { content: "▸ "; color: #22d3ee; }
html[data-skin="hud"] .group-title::after {
  content: "";
  display: block;
  height: 1px;
  margin-top: 6px;
  background: linear-gradient(90deg, var(--cat-accent, #22d3ee), transparent);
}
html[data-skin="hud"] .game-card {
  position: relative;
  border-top: 3px solid var(--cat-accent, rgba(34, 211, 238, .45));
  transition: transform .18s ease, box-shadow .22s ease, border-color .22s ease;
}
html[data-skin="hud"] .game-card::before,
html[data-skin="hud"] .game-card::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  pointer-events: none;
  opacity: .85;
}
html[data-skin="hud"] .game-card::before { left: -1px; top: -1px; border-left: 2px solid rgba(34, 211, 238, .75); border-top: 2px solid rgba(34, 211, 238, .75); }
html[data-skin="hud"] .game-card::after { right: -1px; bottom: -1px; border-right: 2px solid rgba(34, 211, 238, .75); border-bottom: 2px solid rgba(34, 211, 238, .75); }
html[data-skin="hud"] .game-card:hover {
  transform: translateY(-3px);
  border-color: rgba(34, 211, 238, .6);
  box-shadow: 0 0 26px rgba(34, 211, 238, .22);
}
html[data-skin="hud"] .btn.primary {
  background: linear-gradient(90deg, #0891b2, #22d3ee);
  border-color: #67e8f9;
  box-shadow: 0 0 14px rgba(34, 211, 238, .35);
}
html[data-skin="hud"] .conn-status.ok { animation: skin-pulse 2.4s ease-in-out infinite; }
html[data-skin="hud"] .resume-bar {
  background: linear-gradient(120deg, rgba(34, 211, 238, .13), rgba(34, 211, 238, .05));
  border-color: rgba(34, 211, 238, .38);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .4);
}
html[data-skin="hud"] .resume-bar.off {
  background: rgba(255, 255, 255, .04);
  border-color: var(--line);
  box-shadow: none;
}
html[data-skin="hud"] .gc-link { color: #9be9ff; }
html[data-skin="hud"] .hub-link-box { background: rgba(34, 211, 238, .08); border-color: rgba(34, 211, 238, .3); }
html[data-skin="hud"] .fav-check.on { background: var(--gold-soft); color: var(--gold); }
@media (max-width: 640px) {
  html[data-skin="hud"] .hero-title { font-size: 24px; }
}

/* =========================================================
 * cosmos · 星河宇宙（星尘闪烁 + 深空星云）
 * ========================================================= */

html[data-skin="cosmos"] {
  --bg-a: #070312;
  --bg-b: #0d0620;
  --panel: rgba(16, 10, 34, .5);
  --panel-soft: rgba(20, 12, 42, .55);
  --ink: #f0e9ff;
  --muted: #a795c9;
  --brand: #c084fc;
  --brand-dark: #e9d5ff;
  --green: #4ade80;
  --red: #fb7185;
  --gold: #f5d06a;
  --line: rgba(192, 132, 252, .22);
  --line-soft: rgba(192, 132, 252, .1);
  --brand-soft: rgba(192, 132, 252, .14);
  --brand-soft-hover: rgba(192, 132, 252, .22);
  --brand-soft2: rgba(255, 255, 255, .05);
  --brand-line: rgba(192, 132, 252, .4);
  --soft-neutral: rgba(255, 255, 255, .08);
  --soft-neutral2: rgba(255, 255, 255, .06);
  --green-soft: rgba(74, 222, 128, .16);
  --green-ink: #86efac;
  --red-soft: rgba(251, 113, 133, .16);
  --gold-soft: rgba(245, 208, 106, .16);
  --toast-bg: #1b0f33;
  --shadow-tint: rgba(0, 0, 0, .5);
  --shadow-hero: rgba(0, 0, 0, .45);
  --shadow-flash: rgba(192, 132, 252, .6);
  --shadow-focus: rgba(192, 132, 252, .3);
  --shadow-ctrl: rgba(192, 132, 252, .4);
  --modal-scrim: rgba(5, 2, 14, .66);
  --skin-panel: var(--panel);
  --skin-panel-soft: var(--panel-soft);
  --skin-line: var(--line);
  --skin-ink: var(--ink);
  --skin-muted: var(--muted);
  --skin-blur: blur(14px) saturate(130%);
}
html[data-skin="cosmos"] #skin-bg { display: block; }
html[data-skin="cosmos"] #skin-noise { opacity: .05; mix-blend-mode: overlay; }
html[data-skin="cosmos"] body { background: #070312; }
html[data-skin="cosmos"] .skin-bg-grad {
  opacity: 1;
  background:
    radial-gradient(900px 520px at 75% -130px, rgba(168, 85, 247, .2), transparent 62%),
    radial-gradient(700px 460px at 10% 15%, rgba(236, 72, 153, .1), transparent 60%),
    radial-gradient(800px 500px at 50% 110%, rgba(59, 130, 246, .12), transparent 60%),
    linear-gradient(180deg, #0a0518, #070312 60%);
  animation: skin-bg-move 26s ease-in-out infinite alternate;
}
html[data-skin="cosmos"] .skin-bg-orbs { display: block; opacity: 1; }
html[data-skin="cosmos"] .skin-bg-orbs i { animation: skin-orb-float 20s ease-in-out infinite; }
html[data-skin="cosmos"] .skin-bg-orbs i:nth-child(1) { width: 520px; height: 520px; right: -12%; top: -8%; background: rgba(168, 85, 247, .25); }
html[data-skin="cosmos"] .skin-bg-orbs i:nth-child(2) { width: 460px; height: 460px; left: -10%; top: 22%; background: rgba(236, 72, 153, .16); animation-delay: -6s; }
html[data-skin="cosmos"] .skin-bg-orbs i:nth-child(3) { width: 420px; height: 420px; left: 34%; bottom: -14%; background: rgba(59, 130, 246, .18); animation-delay: -12s; }
html[data-skin="cosmos"] .skin-bg-orbs i:nth-child(4) { width: 260px; height: 260px; right: 20%; top: 46%; background: rgba(255, 255, 255, .07); animation-delay: -9s; }
html[data-skin="cosmos"] .skin-bg-orbs i:nth-child(5) { width: 300px; height: 300px; left: 6%; top: 58%; background: rgba(168, 85, 247, .14); animation-delay: -15s; }
html[data-skin="cosmos"] .skin-bg-stars {
  opacity: 1;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, rgba(255, 255, 255, .9), transparent),
    radial-gradient(1px 1px at 26% 8%, rgba(233, 213, 255, .8), transparent),
    radial-gradient(1.5px 1.5px at 44% 26%, rgba(255, 255, 255, .7), transparent),
    radial-gradient(1px 1px at 58% 12%, rgba(192, 132, 252, .8), transparent),
    radial-gradient(1px 1px at 72% 32%, rgba(255, 255, 255, .75), transparent),
    radial-gradient(1.5px 1.5px at 86% 18%, rgba(233, 213, 255, .7), transparent),
    radial-gradient(1px 1px at 18% 42%, rgba(255, 255, 255, .6), transparent),
    radial-gradient(1px 1px at 34% 56%, rgba(192, 132, 252, .7), transparent),
    radial-gradient(1.5px 1.5px at 50% 46%, rgba(255, 255, 255, .8), transparent),
    radial-gradient(1px 1px at 66% 58%, rgba(255, 255, 255, .6), transparent),
    radial-gradient(1px 1px at 80% 46%, rgba(233, 213, 255, .65), transparent),
    radial-gradient(1.5px 1.5px at 92% 62%, rgba(255, 255, 255, .7), transparent),
    radial-gradient(1px 1px at 8% 72%, rgba(255, 255, 255, .55), transparent),
    radial-gradient(1px 1px at 28% 78%, rgba(192, 132, 252, .6), transparent),
    radial-gradient(1.5px 1.5px at 46% 68%, rgba(255, 255, 255, .75), transparent),
    radial-gradient(1px 1px at 62% 80%, rgba(255, 255, 255, .55), transparent),
    radial-gradient(1px 1px at 76% 88%, rgba(233, 213, 255, .6), transparent),
    radial-gradient(1.5px 1.5px at 90% 78%, rgba(255, 255, 255, .65), transparent);
  background-repeat: no-repeat;
  animation: skin-star-twinkle 3.6s ease-in-out infinite;
}
html[data-skin="cosmos"] .skin-bg-sheen {
  opacity: 1;
  width: 190px;
  height: 2px;
  left: 62%;
  top: 10%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .95));
  filter: drop-shadow(0 0 7px rgba(255, 255, 255, .8));
  animation: skin-shoot 9s linear infinite;
}
html[data-skin="cosmos"] .panel,
html[data-skin="cosmos"] .search-panel,
html[data-skin="cosmos"] .active-tables,
html[data-skin="cosmos"] .game-card,
html[data-skin="cosmos"] .stats-table-wrap,
html[data-skin="cosmos"] .hero {
  background: rgba(16, 10, 34, .5);
  backdrop-filter: blur(14px) saturate(130%);
  -webkit-backdrop-filter: blur(14px) saturate(130%);
  border-color: rgba(192, 132, 252, .22);
  box-shadow: 0 10px 32px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .08);
}
html[data-skin="cosmos"] .hero { padding: 26px 24px 20px; }
html[data-skin="cosmos"] .hero-title {
  font-size: 34px;
  color: #fff;
  text-shadow: 0 0 20px rgba(192, 132, 252, .75), 0 0 44px rgba(168, 85, 247, .45);
}
html[data-skin="cosmos"] .hero-sub { color: #c9b4ea; letter-spacing: 1px; }
html[data-skin="cosmos"] .group-title {
  background: linear-gradient(90deg, #e9d5ff, #c084fc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
html[data-skin="cosmos"] .group-title::after {
  content: "";
  display: block;
  height: 2px;
  margin-top: 5px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--cat-accent, #c084fc), transparent);
  opacity: .75;
}
html[data-skin="cosmos"] .game-card {
  border-top: 3px solid var(--cat-accent, rgba(192, 132, 252, .45));
  transition: transform .18s ease, box-shadow .22s ease, border-color .22s ease;
}
html[data-skin="cosmos"] .game-card:hover {
  transform: translateY(-4px);
  border-color: rgba(233, 213, 255, .5);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .5), 0 0 26px rgba(168, 85, 247, .24);
}
html[data-skin="cosmos"] .btn.primary {
  background: linear-gradient(90deg, #9333ea, #c084fc);
  border-color: #d8b4fe;
  box-shadow: 0 4px 18px rgba(168, 85, 247, .35);
}
html[data-skin="cosmos"] .conn-status.ok { animation: skin-pulse 2.6s ease-in-out infinite; }
html[data-skin="cosmos"] .resume-bar {
  background: linear-gradient(120deg, rgba(192, 132, 252, .16), rgba(59, 130, 246, .08));
  border-color: rgba(192, 132, 252, .4);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .4);
}
html[data-skin="cosmos"] .resume-bar.off {
  background: rgba(255, 255, 255, .05);
  border-color: var(--line);
  box-shadow: none;
}
html[data-skin="cosmos"] .gc-link { color: #d9c4ff; }
html[data-skin="cosmos"] .hub-link-box { background: rgba(192, 132, 252, .1); border-color: rgba(192, 132, 252, .3); }
html[data-skin="cosmos"] .fav-check.on { background: var(--gold-soft); color: var(--gold); }
@media (max-width: 640px) {
  html[data-skin="cosmos"] .hero-title { font-size: 24px; }
}

/* =========================================================
 * rosegold · 玫瑰金轻奢（香槟粉金 + 珠光）
 * ========================================================= */

html[data-skin="rosegold"] {
  --bg-a: #fbf4f2;
  --bg-b: #f6e7e2;
  --panel: rgba(255, 255, 255, .72);
  --panel-soft: rgba(255, 255, 255, .6);
  --ink: #4a3330;
  --muted: #9c7f78;
  --brand: #c98a5e;
  --brand-dark: #b06a48;
  --green: #3d7a5a;
  --red: #c95c52;
  --gold: #b8860b;
  --line: #efdcd4;
  --line-soft: #f3e6e0;
  --brand-soft: #f9e9e2;
  --brand-soft-hover: #f5dcd2;
  --brand-soft2: #fdf7f4;
  --brand-line: #e7b7a3;
  --soft-neutral: #f4ebe7;
  --soft-neutral2: #f6efeb;
  --green-soft: #e2f0e8;
  --green-ink: #2f6a4b;
  --red-soft: #f9e4e1;
  --gold-soft: #f7ecd8;
  --toast-bg: #5c3a30;
  --shadow-tint: rgba(201, 138, 94, .10);
  --shadow-hero: rgba(201, 138, 94, .16);
  --shadow-flash: rgba(201, 138, 94, .5);
  --shadow-focus: rgba(201, 138, 94, .2);
  --shadow-ctrl: rgba(201, 138, 94, .28);
  --modal-scrim: rgba(80, 40, 30, .36);
  --skin-panel: var(--panel);
  --skin-panel-soft: var(--panel-soft);
  --skin-line: var(--line);
  --skin-ink: var(--ink);
  --skin-muted: var(--muted);
  --skin-blur: blur(14px) saturate(120%);
}
html[data-skin="rosegold"] #skin-bg { display: block; }
html[data-skin="rosegold"] #skin-noise { opacity: .035; mix-blend-mode: multiply; }
html[data-skin="rosegold"] body { background: #fbf4f2; }
html[data-skin="rosegold"] .skin-bg-grad {
  opacity: 1;
  background: linear-gradient(120deg, #fbf4f2, #f6e2dc 30%, #f9ede2 55%, #f3e6ec 80%, #fbf4f2);
  background-size: 260% 260%;
  animation: skin-bg-move 20s ease-in-out infinite;
}
html[data-skin="rosegold"] .skin-bg-sheen {
  opacity: .7;
  background: linear-gradient(115deg, transparent 42%, rgba(255, 255, 255, .6) 50%, transparent 58%);
  background-size: 280% 100%;
  animation: skin-sheen-sweep 10s linear infinite;
}
html[data-skin="rosegold"] .skin-bg-orbs { display: block; opacity: .8; }
html[data-skin="rosegold"] .skin-bg-orbs i { animation: skin-orb-float 18s ease-in-out infinite; }
html[data-skin="rosegold"] .skin-bg-orbs i:nth-child(1) { width: 420px; height: 420px; right: -8%; top: -10%; background: rgba(255, 182, 193, .35); }
html[data-skin="rosegold"] .skin-bg-orbs i:nth-child(2) { width: 380px; height: 380px; left: -8%; top: 30%; background: rgba(240, 200, 160, .3); animation-delay: -7s; }
html[data-skin="rosegold"] .skin-bg-orbs i:nth-child(3) { width: 340px; height: 340px; left: 30%; bottom: -12%; background: rgba(255, 214, 224, .32); animation-delay: -12s; }
html[data-skin="rosegold"] .skin-bg-orbs i:nth-child(4) { width: 240px; height: 240px; right: 22%; top: 44%; background: rgba(255, 255, 255, .45); animation-delay: -5s; }
html[data-skin="rosegold"] .skin-bg-orbs i:nth-child(5) { width: 280px; height: 280px; left: 12%; top: 8%; background: rgba(255, 205, 190, .28); animation-delay: -15s; }
html[data-skin="rosegold"] .skin-bg-stars {
  opacity: 1;
  background-image:
    radial-gradient(1.5px 1.5px at 16% 24%, rgba(201, 138, 94, .55), transparent),
    radial-gradient(1px 1px at 36% 12%, rgba(217, 111, 122, .4), transparent),
    radial-gradient(1.5px 1.5px at 58% 30%, rgba(255, 255, 255, .9), transparent),
    radial-gradient(1px 1px at 78% 18%, rgba(201, 138, 94, .45), transparent),
    radial-gradient(1px 1px at 28% 48%, rgba(255, 255, 255, .75), transparent),
    radial-gradient(1.5px 1.5px at 48% 40%, rgba(217, 111, 122, .4), transparent),
    radial-gradient(1px 1px at 70% 54%, rgba(255, 255, 255, .7), transparent),
    radial-gradient(1px 1px at 12% 64%, rgba(201, 138, 94, .4), transparent),
    radial-gradient(1.5px 1.5px at 42% 70%, rgba(255, 255, 255, .8), transparent),
    radial-gradient(1px 1px at 84% 72%, rgba(255, 255, 255, .65), transparent);
  background-repeat: no-repeat;
  animation: skin-star-twinkle 4.4s ease-in-out infinite;
}
html[data-skin="rosegold"] .panel,
html[data-skin="rosegold"] .search-panel,
html[data-skin="rosegold"] .active-tables,
html[data-skin="rosegold"] .game-card,
html[data-skin="rosegold"] .stats-table-wrap,
html[data-skin="rosegold"] .hero {
  background: rgba(255, 255, 255, .72);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  border-color: #efdcd4;
  box-shadow: 0 10px 30px rgba(201, 138, 94, .12), inset 0 1px 0 rgba(255, 255, 255, .8);
}
html[data-skin="rosegold"] .hero { padding: 26px 24px 20px; }
html[data-skin="rosegold"] .hero-title {
  font-size: 34px;
  background: linear-gradient(90deg, #c98a5e, #e0a08a 45%, #d96f7a);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: skin-shimmer 6s linear infinite;
  text-shadow: none;
}
html[data-skin="rosegold"] .hero-sub { color: #a98c84; }
html[data-skin="rosegold"] .group-title {
  background: linear-gradient(90deg, #b06a48, #d96f7a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
html[data-skin="rosegold"] .group-title::after {
  content: "";
  display: block;
  height: 2px;
  margin-top: 5px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--cat-accent, #d96f7a), transparent);
  opacity: .65;
}
html[data-skin="rosegold"] .game-card {
  border-top: 3px solid var(--cat-accent, rgba(217, 111, 122, .4));
  transition: transform .18s ease, box-shadow .22s ease, border-color .22s ease;
}
html[data-skin="rosegold"] .game-card:hover {
  transform: translateY(-4px);
  border-color: #e7b7a3;
  box-shadow: 0 16px 36px rgba(201, 138, 94, .18), 0 0 20px rgba(217, 111, 122, .12);
}
html[data-skin="rosegold"] .btn.primary {
  background: linear-gradient(135deg, #d96f7a, #c98a5e);
  border-color: #e8a99a;
  color: #fff;
  box-shadow: 0 4px 16px rgba(217, 111, 122, .28);
}
html[data-skin="rosegold"] .resume-bar {
  background: linear-gradient(120deg, #fdf0ea, #fbe7e2);
  border-color: #eac4b6;
  box-shadow: 0 4px 14px rgba(201, 138, 94, .14);
}
html[data-skin="rosegold"] .resume-bar.off {
  background: rgba(255, 255, 255, .55);
  border-color: var(--line);
  box-shadow: none;
}
html[data-skin="rosegold"] .gc-link { color: #a65d3d; }
html[data-skin="rosegold"] .hub-link-box { background: #f9e9e2; border-color: #e7b7a3; }
html[data-skin="rosegold"] .fav-check.on { background: var(--gold-soft); color: var(--gold); }
@media (max-width: 640px) {
  html[data-skin="rosegold"] .hero-title { font-size: 24px; }
}

/* =========================================================
 * wizard 魔法夜空 · 巫师飞塔同款动态背景（纯 CSS）
 * 极光光晕 + 三层星光 + 月亮 + 漂浮巫师塔 + 金色尘粒
 * ========================================================= */

#bg-scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  display: none;
}
#bg-scene > * { position: absolute; }
html[data-skin="wizard"] #bg-scene { display: block; }
html[data-skin="wizard"] #app { position: relative; z-index: 1; }

/* 极光微光：紫色与金色巨晕缓慢呼吸、轻移 */
.bg-glow { border-radius: 50%; will-change: transform, opacity; }
.bg-glow-1 {
  width: 54vw; height: 54vw; left: -14vw; top: -16vw;
  background: radial-gradient(circle, rgba(126, 90, 220, 0.4), transparent 66%);
  animation: bg-glow-breathe 26s ease-in-out infinite alternate;
}
.bg-glow-2 {
  width: 42vw; height: 42vw; right: -12vw; bottom: -10vw;
  background: radial-gradient(circle, rgba(217, 154, 43, 0.18), transparent 66%);
  animation: bg-glow-breathe 34s ease-in-out infinite alternate-reverse;
}
.bg-glow-3 {
  width: 58vw; height: 44vw; left: 16vw; bottom: -20vw;
  background: radial-gradient(circle, rgba(90, 40, 150, 0.48), transparent 64%);
  animation: bg-glow-breathe 30s ease-in-out infinite alternate;
  animation-delay: -8s;
}
@keyframes bg-glow-breathe {
  from { transform: translate3d(0, 0, 0) scale(1); opacity: 0.55; }
  to   { transform: translate3d(2.5vw, 1.6vh, 0) scale(1.14); opacity: 0.85; }
}

/* 星尘：三层大小不同的星星，各自缓慢呼吸闪烁 */
.bg-stars { inset: 0; background-repeat: repeat; }
.bg-stars-1 {
  --tw-min: 0.3; --tw-max: 0.62;
  background-image:
    radial-gradient(1px 1px at 18px 40px, rgba(228,220,245,.9), transparent 55%),
    radial-gradient(1px 1px at 90px 120px, rgba(228,220,245,.7), transparent 55%),
    radial-gradient(1.2px 1.2px at 150px 60px, rgba(203,185,238,.8), transparent 55%),
    radial-gradient(1px 1px at 210px 160px, rgba(228,220,245,.6), transparent 55%),
    radial-gradient(1px 1px at 60px 210px, rgba(203,185,238,.7), transparent 55%),
    radial-gradient(1.2px 1.2px at 240px 30px, rgba(228,220,245,.65), transparent 55%);
  background-size: 260px 260px;
  animation: bg-stars-twinkle 5.2s ease-in-out infinite;
}
.bg-stars-2 {
  --tw-min: 0.34; --tw-max: 0.78;
  background-image:
    radial-gradient(1.4px 1.4px at 40px 60px, rgba(255,255,255,.85), transparent 55%),
    radial-gradient(1.2px 1.2px at 140px 30px, rgba(203,185,238,.8), transparent 55%),
    radial-gradient(1.4px 1.4px at 220px 130px, rgba(255,255,255,.75), transparent 55%),
    radial-gradient(1.2px 1.2px at 90px 190px, rgba(203,185,238,.75), transparent 55%);
  background-size: 320px 260px;
  animation: bg-stars-twinkle 7.4s ease-in-out infinite;
  animation-delay: 1.3s;
}
.bg-stars-3 {
  --tw-min: 0.42; --tw-max: 1;
  background-image:
    radial-gradient(1.8px 1.8px at 60px 40px, rgba(242,193,78,.9), transparent 55%),
    radial-gradient(1.6px 1.6px at 260px 100px, rgba(255,255,255,.85), transparent 55%),
    radial-gradient(1.8px 1.8px at 160px 220px, rgba(203,185,238,.85), transparent 55%),
    radial-gradient(1.6px 1.6px at 300px 190px, rgba(242,193,78,.75), transparent 55%);
  background-size: 360px 280px;
  animation: bg-stars-twinkle 9.8s ease-in-out infinite;
  animation-delay: 2.6s;
}
@keyframes bg-stars-twinkle {
  0%, 100% { opacity: var(--tw-min, 0.35); }
  50%      { opacity: var(--tw-max, 0.9); }
}

/* 月亮：右上一轮朦胧的淡紫月光 */
.bg-moon {
  width: 92px; height: 92px;
  right: 9vw; top: 8vh;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 35%, #f3ecff, #d8c8f5 55%, rgba(216,200,245,0) 72%);
  box-shadow: 0 0 44px 12px rgba(203,185,238,.32);
  animation: bg-moon-breathe 18s ease-in-out infinite;
}
@keyframes bg-moon-breathe {
  0%, 100% { opacity: 0.5; }
  50%      { opacity: 0.68; }
}

/* 远方飞塔剪影：会飞的塔缓缓飘过夜空，窗户透出金色暖光 */
.bg-towers { inset: 0; }
.bg-tower {
  position: absolute;
  left: 0;
  bottom: var(--b, 7vh);
  width: 48px;
  height: 132px;
  animation: bg-tower-drift var(--dur, 300s) linear infinite;
  animation-direction: var(--dir, normal);
  animation-delay: var(--delay, 0s);
  will-change: transform;
}
.bt-inner {
  position: absolute;
  inset: 0;
  transform-origin: 50% 100%;
  animation: bg-tower-bob var(--bob, 10s) ease-in-out infinite;
  animation-delay: var(--bob-delay, 0s);
}
.bt-body {
  position: absolute;
  left: 50%; bottom: 0;
  width: 34px; height: 78px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #2b1c55 0%, #1a1036 68%, #120a26 100%);
  clip-path: polygon(10% 0, 90% 0, 100% 100%, 0 100%);
}
.bt-roof {
  position: absolute;
  left: 50%; bottom: 72px;
  width: 0; height: 0;
  transform: translateX(-50%);
  border-left: 22px solid transparent;
  border-right: 22px solid transparent;
  border-bottom: 32px solid #251744;
}
.bt-spire {
  position: absolute;
  left: 50%; bottom: 101px;
  width: 2px; height: 13px;
  transform: translateX(-50%);
  background: #1a1036;
  border-radius: 1px;
}
.bt-flag {
  position: absolute;
  left: 50%; bottom: 109px;
  width: 11px; height: 8px;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #d99a2b, #a9710f);
  clip-path: polygon(0 0, 100% 45%, 0 100%);
}
.bt-win {
  position: absolute;
  left: 50%; bottom: 34px;
  width: 5px; height: 8px;
  transform: translateX(-50%);
  background: #f2c14e;
  border-radius: 2px;
  box-shadow: 0 0 9px 2px rgba(242, 193, 78, 0.7);
  animation: bg-win-flicker 5.4s ease-in-out infinite;
}
@keyframes bg-tower-drift {
  from { transform: translateX(-18vw); }
  to   { transform: translateX(120vw); }
}
@keyframes bg-tower-bob {
  0%, 100% { transform: translateY(0) scale(var(--scale, 1)); }
  50%      { transform: translateY(-7px) scale(var(--scale, 1)); }
}
@keyframes bg-win-flicker {
  0%, 100% { opacity: 0.65; }
  50%      { opacity: 1; }
}

/* 魔法光尘：金色与淡紫的微尘缓缓上升、轻轻摇曳 */
.bg-motes { inset: 0; }
.bg-mote {
  position: absolute;
  left: var(--x, 5%);
  bottom: -14px;
  width: var(--s, 3px);
  height: var(--s, 3px);
  border-radius: 50%;
  background: rgb(var(--c, 217, 154, 43));
  box-shadow: 0 0 calc(var(--s, 3px) * 2.4) rgba(var(--c, 217, 154, 43), 0.8);
  opacity: 0;
  animation: bg-mote-rise var(--d, 60s) linear infinite;
  animation-delay: var(--delay, 0s);
  will-change: transform, opacity;
}
@keyframes bg-mote-rise {
  0%   { transform: translate3d(0, 0, 0) scale(0.5); opacity: 0; }
  10%  { opacity: 0.85; }
  55%  { transform: translate3d(var(--sway, 16px), -52vh, 0) scale(1); opacity: 0.75; }
  90%  { opacity: 0.4; }
  100% { transform: translate3d(calc(var(--sway, 16px) * -0.9), -106vh, 0) scale(0.6); opacity: 0; }
}

/* 系统开启「减少动态效果」时：静止并调暗，保证耐看与低干扰 */
@media (prefers-reduced-motion: reduce) {
  #bg-scene .bg-glow, #bg-scene .bg-stars, #bg-scene .bg-mote,
  #bg-scene .bg-tower, #bg-scene .bt-inner, #bg-scene .bt-win,
  #bg-scene .bg-moon {
    animation: none !important;
  }
  #bg-scene .bg-mote { display: none; }
  #bg-scene .bg-stars { opacity: 0.6; }
  #bg-scene .bg-glow, #bg-scene .bg-moon { opacity: 0.6; }
}

/* wizard 皮肤：夜空打底，白色面板浮在上层，正文外文字提亮 */
html[data-skin="wizard"] body {
  background:
    radial-gradient(1200px 700px at 15% -10%, rgba(126, 90, 220, 0.55), transparent 60%),
    radial-gradient(1000px 600px at 110% 15%, rgba(90, 40, 150, 0.45), transparent 55%),
    linear-gradient(160deg, #191344 0%, #2b1b5e 55%, #4b2a83 100%);
  background-attachment: fixed;
  color: #d9cff2;
}
html[data-skin="wizard"] .hero,
html[data-skin="wizard"] .panel,
html[data-skin="wizard"] .search-panel,
html[data-skin="wizard"] .active-tables,
html[data-skin="wizard"] .game-card,
html[data-skin="wizard"] .stats-table-wrap,
html[data-skin="wizard"] .skin-panel {
  box-shadow: 0 10px 28px rgba(8, 4, 36, 0.34);
}
html[data-skin="wizard"] .hero { box-shadow: 0 14px 34px rgba(8, 4, 36, 0.4); }
html[data-skin="wizard"] .group-title,
html[data-skin="wizard"] .fav-section .group-title,
html[data-skin="wizard"] .report-panel .panel-title,
html[data-skin="wizard"] .report-panel .sub-title {
  color: #d8c8f5;
}
html[data-skin="wizard"] .mail-status,
html[data-skin="wizard"] .fav-edit-hint,
html[data-skin="wizard"] .made-by {
  color: #a99bc9;
}
