/* ============ AI创造 全局样式（亮色默认，支持暗色主题） ============ */
:root {
  --bg: #f4f7fc;
  --bg-soft: #ffffff;
  --card: rgba(255, 255, 255, 0.8);
  --card-solid: #ffffff;
  --border: rgba(15, 23, 42, 0.09);
  --text: #172033;
  --dim: #64748b;
  --accent: #06b6d4;
  --accent-2: #8b5cf6;
  --accent-3: #ec4899;
  --hl: #f59e0b;
  --ok: #10b981;
  --danger: #f43f5e;
  --on-accent: #ffffff;
  --nav-bg: rgba(255, 255, 255, 0.86);
  --input-bg: rgba(15, 23, 42, 0.045);
  --hover-bg: rgba(15, 23, 42, 0.055);
  --chip-bg: rgba(15, 23, 42, 0.04);
  --grid-line: rgba(15, 23, 42, 0.045);
  --glow-color-1: #7dd3fc;
  --glow-color-2: #c4b5fd;
  --glow-opacity: 0.22;
  --skel-a: rgba(15, 23, 42, 0.05);
  --skel-b: rgba(15, 23, 42, 0.12);
  --scanlines-op: 0;
  --shadow-lg: 0 22px 50px rgba(30, 41, 59, 0.14);
  --shadow-pop: 0 14px 34px rgba(30, 41, 59, 0.16);
  --mask-bg: rgba(15, 23, 42, 0.38);
  --stat-grad: linear-gradient(90deg, #0f172a, #0891b2);
  --card-hover-border: rgba(6, 182, 212, 0.45);
  --menu-bg: rgba(255, 255, 255, 0.98);
  --stage-bg: #05070c;
  --stage-border: rgba(6, 182, 212, 0.4);
  --cover-ic: rgba(15, 23, 42, 0.3);
  --logo-glow: 0 4px 18px rgba(6, 182, 212, 0.3);
  --focus-border: rgba(6, 182, 212, 0.55);
  --focus-ring: 0 0 0 4px rgba(6, 182, 212, 0.12);
  --accent-soft: rgba(6, 182, 212, 0.1);
  --accent-soft-sm: rgba(6, 182, 212, 0.05);
  --accent-border: rgba(6, 182, 212, 0.5);
  --btn-primary-bg: linear-gradient(135deg, #06b6d4, #45d8f0);
  --btn-primary-shadow: 0 6px 24px rgba(6, 182, 212, 0.32);
  --btn-primary-shadow-h: 0 10px 32px rgba(6, 182, 212, 0.48);
  --accent-line: rgba(6, 182, 212, 0.7);
  --ring: 0 0 0 4px rgba(6, 182, 212, 0.05);
  --stage-cover-radial: rgba(6, 182, 212, 0.12);
  --footer-line: linear-gradient(90deg, transparent, rgba(6, 182, 212, 0.5), rgba(139, 92, 246, 0.5), transparent);
  --radius: 16px;
  --pixel: "Press Start 2P", "Courier New", monospace;
  font-size: 16px;
}

[data-theme="dark"] {
  --bg: #07090f;
  --bg-soft: #0b0f17;
  --card: rgba(255, 255, 255, 0.035);
  --card-solid: #0d111b;
  --border: rgba(255, 255, 255, 0.09);
  --text: #e9edf5;
  --dim: #98a2b8;
  --accent: #22d3ee;
  --accent-2: #a78bfa;
  --accent-3: #f472b6;
  --hl: #facc15;
  --ok: #34d399;
  --danger: #fb7185;
  --on-accent: #06121a;
  --nav-bg: rgba(7, 9, 15, 0.82);
  --input-bg: rgba(255, 255, 255, 0.05);
  --hover-bg: rgba(255, 255, 255, 0.06);
  --chip-bg: rgba(255, 255, 255, 0.04);
  --grid-line: rgba(255, 255, 255, 0.03);
  --glow-color-1: #22d3ee;
  --glow-color-2: #a78bfa;
  --glow-opacity: 0.12;
  --skel-a: rgba(255, 255, 255, 0.04);
  --skel-b: rgba(255, 255, 255, 0.1);
  --scanlines-op: 1;
  --shadow-lg: 0 20px 46px rgba(0, 0, 0, 0.45);
  --shadow-pop: 0 16px 44px rgba(0, 0, 0, 0.5);
  --mask-bg: rgba(4, 6, 10, 0.72);
  --stat-grad: linear-gradient(90deg, #fff, #99f0ff);
  --card-hover-border: rgba(34, 211, 238, 0.45);
  --menu-bg: rgba(13, 17, 27, 0.97);
  --stage-bg: #05070c;
  --stage-border: rgba(34, 211, 238, 0.35);
  --cover-ic: rgba(255, 255, 255, 0.4);
  --logo-glow: 0 4px 18px rgba(34, 211, 238, 0.28);
  --focus-border: rgba(34, 211, 238, 0.55);
  --focus-ring: 0 0 0 4px rgba(34, 211, 238, 0.12);
  --accent-soft: rgba(34, 211, 238, 0.1);
  --accent-soft-sm: rgba(34, 211, 238, 0.05);
  --accent-border: rgba(34, 211, 238, 0.5);
  --btn-primary-bg: linear-gradient(135deg, #22d3ee, #7ce7f7);
  --btn-primary-shadow: 0 6px 24px rgba(34, 211, 238, 0.32);
  --btn-primary-shadow-h: 0 10px 32px rgba(34, 211, 238, 0.48);
  --accent-line: rgba(34, 211, 238, 0.7);
  --ring: 0 0 0 4px rgba(34, 211, 238, 0.05);
  --stage-cover-radial: rgba(34, 211, 238, 0.12);
  --footer-line: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.5), rgba(167, 139, 250, 0.5), transparent);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", -apple-system, sans-serif;
  background:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px),
    radial-gradient(1200px 600px at 50% -10%, var(--glow-color-1), transparent 62%),
    var(--bg);
  background-size: 42px 42px, 42px 42px, auto, auto;
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s, color 0.3s;
}

::selection { background: rgba(6, 182, 212, 0.28); }
[data-theme="dark"] ::selection { background: rgba(34, 211, 238, 0.35); }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  border-radius: 8px;
  border: 3px solid var(--bg);
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
input, textarea, select { font-family: inherit; color: var(--text); }

a:focus-visible, button:focus-visible, input:focus-visible, label:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.glow {
  position: fixed;
  width: 58vw; height: 58vw;
  border-radius: 50%;
  filter: blur(130px);
  opacity: var(--glow-opacity);
  z-index: 0;
  pointer-events: none;
}
.glow-1 { top: -24vw; left: -18vw; background: var(--glow-color-1); }
.glow-2 { bottom: -28vw; right: -18vw; background: var(--glow-color-2); }

.scanlines {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: var(--scanlines-op);
  background: repeating-linear-gradient(0deg, rgba(255,255,255,0.02) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay;
}

.ic { width: 18px; height: 18px; flex: none; display: block; }

/* ============ 顶栏 ============ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 14px 4vw;
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav .logo {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 700;
  font-size: 1rem;
  flex: none;
}
.logo-mark {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(var(--bg-soft), var(--bg-soft)) padding-box,
              linear-gradient(135deg, var(--accent), var(--accent-2)) border-box;
  border: 1px solid transparent;
  box-shadow: var(--logo-glow);
}
.logo-mark .ic { width: 21px; height: 21px; }
.logo-text small {
  font-family: var(--pixel);
  font-size: 0.52rem;
  letter-spacing: 2px;
  color: var(--accent);
  display: block;
  margin-bottom: 4px;
}

.nav-search {
  flex: 1;
  max-width: 460px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  height: 42px;
  border-radius: 999px;
  background: var(--input-bg);
  border: 1px solid var(--border);
  transition: border-color 0.25s, box-shadow 0.25s;
}
.nav-search:focus-within {
  border-color: var(--focus-border);
  box-shadow: var(--focus-ring);
}
.nav-search .ic { color: var(--dim); width: 17px; height: 17px; }
.nav-search input {
  flex: 1;
  min-width: 0;
  background: none;
  border: none;
  outline: none;
  font-size: 0.92rem;
}
.nav-search input::placeholder { color: var(--dim); opacity: 0.8; }
.nav-search kbd {
  font-family: var(--pixel);
  font-size: 0.5rem;
  color: var(--dim);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 6px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
.nav-links a.nlink {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  border-radius: 10px;
  font-size: 0.9rem;
  color: var(--dim);
  transition: color 0.2s, background 0.2s;
}
.nav-links a.nlink:hover { color: var(--text); background: var(--hover-bg); }
.nav-links a.nlink.active {
  color: var(--accent);
  background: var(--accent-soft);
}
.nav-links a.nlink .ic { width: 16px; height: 16px; }

.theme-btn {
  width: 40px; height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--dim);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: color 0.2s, border-color 0.2s, transform 0.2s;
}
.theme-btn:hover { color: var(--accent); border-color: var(--accent-border); transform: rotate(12deg); }
.theme-btn .ic { width: 18px; height: 18px; }

.user-chip {
  position: relative;
  margin-left: 6px;
}
.user-chip > button {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 14px 6px 7px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--text);
  font-size: 0.88rem;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.user-chip > button:hover { border-color: var(--accent-border); background: var(--hover-bg); }
.avatar-dot {
  width: 27px; height: 27px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--on-accent);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.user-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  min-width: 208px;
  padding: 8px;
  border-radius: 14px;
  background: var(--menu-bg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-pop);
  display: none;
  z-index: 110;
}
.user-menu.open { display: block; animation: pop 0.18s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(-6px); } }
.user-menu .um-head {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
}
.user-menu .um-head b { display: block; font-size: 0.92rem; }
.user-menu .um-head span { font-size: 0.78rem; color: var(--dim); word-break: break-all; }
.user-menu a, .user-menu button.um-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  background: none;
  border-radius: 9px;
  color: var(--text);
  font-size: 0.88rem;
  cursor: pointer;
  text-align: left;
}
.user-menu a:hover, .user-menu button.um-item:hover { background: var(--hover-bg); }
.user-menu .ic { width: 16px; height: 16px; color: var(--dim); }
.user-menu .danger { color: var(--danger); }
.user-menu .danger .ic { color: var(--danger); }

/* ============ 按钮 ============ */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 22px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  overflow: hidden;
  white-space: nowrap;
  transition: transform 0.25s, box-shadow 0.25s, background 0.25s, border-color 0.25s, opacity 0.2s;
}
.btn .ic { width: 16px; height: 16px; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none !important; }
.btn-primary {
  color: var(--on-accent);
  background: var(--btn-primary-bg);
  box-shadow: var(--btn-primary-shadow);
}
.btn-primary::after {
  content: "";
  position: absolute;
  top: 0; left: -80%;
  width: 50%; height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,0.55), transparent);
  transform: skewX(-20deg);
  transition: left 0.55s ease;
}
.btn-primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: var(--btn-primary-shadow-h); }
.btn-primary:hover:not(:disabled)::after { left: 130%; }
.btn-ghost {
  color: var(--text);
  background: var(--input-bg);
  border: 1px solid var(--border);
}
.btn-ghost:hover:not(:disabled) {
  background: var(--hover-bg);
  border-color: var(--accent-border);
  transform: translateY(-2px);
}
.btn-danger {
  color: #fff;
  background: linear-gradient(135deg, #fb7185, #f43f5e);
  box-shadow: 0 6px 22px rgba(244, 63, 94, 0.3);
}
.btn-danger:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(244,63,94,0.45); }
.btn-ok {
  color: #05221a;
  background: linear-gradient(135deg, #34d399, #6ee7b7);
  box-shadow: 0 6px 22px rgba(52, 211, 153, 0.28);
}
.btn-ok:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(52,211,153,0.4); }
.btn-sm { padding: 8px 15px; font-size: 0.84rem; gap: 7px; }
.btn-sm .ic { width: 14px; height: 14px; }
.btn-block { width: 100%; }

/* ============ 主体布局 ============ */
main { flex: 1; position: relative; z-index: 1; width: 100%; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 4vw; }

.page-head { padding: 46px 0 10px; }
.page-head .crumb {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--dim);
  font-size: 0.86rem;
  margin-bottom: 18px;
}
.page-head .crumb .ic { width: 15px; height: 15px; }
.page-head .crumb a:hover { color: var(--accent); }
.section-tag {
  font-family: var(--pixel);
  color: var(--accent);
  font-size: 0.62rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-tag::before {
  content: "";
  width: 26px; height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
}
h1.page-title {
  margin-top: 14px;
  font-size: clamp(1.7rem, 3.6vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.5px;
}
.page-desc { margin-top: 12px; color: var(--dim); line-height: 1.95; max-width: 640px; }

/* ============ 首页大厅（紧凑布局） ============ */
.lobby-head {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 30px 0 4px;
}
.lobby-head .lobby-title-wrap { display: flex; align-items: baseline; gap: 14px; }
.lobby-head h1 {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.3px;
}
.lobby-head .result-info { color: var(--dim); font-size: 0.86rem; }
.lobby-head .right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ============ 工具条 / 排序 ============ */
.seg {
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  background: var(--input-bg);
  border: 1px solid var(--border);
  gap: 4px;
}
.seg button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: none;
  background: none;
  color: var(--dim);
  font-size: 0.86rem;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.seg button .ic { width: 14px; height: 14px; }
.seg button.active {
  color: var(--on-accent);
  font-weight: 700;
  background: var(--btn-primary-bg);
}

/* ============ 游戏卡片 ============ */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(252px, 1fr));
  gap: 22px;
  padding: 22px 0 10px;
  transition: opacity 0.15s;
}
.grid.loading { opacity: 0.55; pointer-events: none; }
.gcard {
  position: relative;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--border);
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(30, 41, 59, 0.04);
  transition: transform 0.32s, border-color 0.32s, box-shadow 0.32s;
}
[data-theme="dark"] .gcard { box-shadow: none; }
.gcard:hover {
  transform: translateY(-6px);
  border-color: var(--card-hover-border);
  box-shadow: var(--shadow-lg);
}
.gcover {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  /* 静态柔光占位：封面加载完成前不是死白，也不会闪烁 */
  background: linear-gradient(135deg, var(--skel-a), var(--card-solid));
}
.gcover img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
}
.gcard:hover .gcover img { transform: scale(1.06); }

/* 首次渲染时卡片轻微淡入（只播一次，不循环） */
.grid.enter > * { animation: cardIn 0.42s cubic-bezier(0.22, 1, 0.36, 1) backwards; }
.grid.enter > *:nth-child(2) { animation-delay: 0.03s; }
.grid.enter > *:nth-child(3) { animation-delay: 0.06s; }
.grid.enter > *:nth-child(4) { animation-delay: 0.09s; }
.grid.enter > *:nth-child(5) { animation-delay: 0.12s; }
.grid.enter > *:nth-child(6) { animation-delay: 0.15s; }
.grid.enter > *:nth-child(n+7) { animation-delay: 0.18s; }
@keyframes cardIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.cover-ph {
  --ph-a: var(--ph-a-l);
  --ph-b: var(--ph-b-l);
  --ph-ta: var(--ph-ta-l);
  --ph-tb: var(--ph-tb-l);
  width: 100%; height: 100%;
  display: grid;
  place-items: center;
  position: relative;
  background:
    radial-gradient(120% 100% at 15% 0%, rgba(255,255,255,0.55), transparent 58%),
    radial-gradient(120% 110% at 85% 100%, rgba(255,255,255,0.38), transparent 58%),
    linear-gradient(135deg, var(--ph-a), var(--ph-b));
}
[data-theme="dark"] .cover-ph {
  --ph-a: var(--ph-a-d);
  --ph-b: var(--ph-b-d);
  --ph-ta: var(--ph-ta-d);
  --ph-tb: var(--ph-tb-d);
  background:
    radial-gradient(120% 100% at 15% 0%, rgba(255,255,255,0.1), transparent 58%),
    radial-gradient(120% 110% at 85% 100%, rgba(255,255,255,0.06), transparent 58%),
    linear-gradient(135deg, var(--ph-a), var(--ph-b));
}
.cover-ph b {
  font-family: var(--pixel);
  font-size: 2rem;
  background: linear-gradient(120deg, var(--ph-ta), var(--ph-tb));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.cover-ph .ic {
  position: absolute;
  right: 12px; bottom: 10px;
  width: 26px; height: 26px;
  color: var(--cover-ic);
}
.gcover .play-hover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(5, 8, 14, 0.45);
  opacity: 0;
  transition: opacity 0.3s;
}
.gcard:hover .play-hover { opacity: 1; }
.play-hover .pbtn {
  width: 54px; height: 54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #06121a;
  background: linear-gradient(135deg, var(--accent), #7ce7f7);
  box-shadow: 0 10px 30px rgba(34,211,238,0.5);
  transform: scale(0.8);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.gcard:hover .pbtn { transform: scale(1); }
.play-hover .pbtn .ic { width: 22px; height: 22px; margin-left: 3px; }
.gbody { padding: 15px 16px 16px; }
.gbody h3 {
  font-size: 1rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gmeta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 9px;
  color: var(--dim);
  font-size: 0.8rem;
  flex-wrap: wrap;
}
.gmeta .ic { width: 13px; height: 13px; }
.gmeta .m { display: inline-flex; align-items: center; gap: 5px; }
.gmeta .sep { opacity: 0.4; }

/* 状态徽章 */
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  border: 1px solid;
}
.status-chip .ic { width: 13px; height: 13px; }
.st-pending { color: #b45309; background: rgba(245, 158, 11, 0.1); border-color: rgba(245, 158, 11, 0.35); }
.st-approved { color: #047857; background: rgba(16, 185, 129, 0.1); border-color: rgba(16, 185, 129, 0.35); }
.st-rejected { color: #be123c; background: rgba(244, 63, 94, 0.09); border-color: rgba(244, 63, 94, 0.35); }
[data-theme="dark"] .st-pending { color: #fde68a; background: rgba(250, 204, 21, 0.09); border-color: rgba(250, 204, 21, 0.35); }
[data-theme="dark"] .st-approved { color: #a7f3d0; background: rgba(52, 211, 153, 0.09); border-color: rgba(52, 211, 153, 0.35); }
[data-theme="dark"] .st-rejected { color: #fecdd3; background: rgba(251, 113, 133, 0.09); border-color: rgba(251, 113, 133, 0.35); }

/* ============ 空状态 / 骨架 ============ */
.empty {
  text-align: center;
  padding: 70px 20px 80px;
  color: var(--dim);
}
.empty .ic { width: 64px; height: 64px; margin: 0 auto 20px; color: var(--dim); opacity: 0.6; }
.empty h3 { color: var(--text); font-size: 1.1rem; margin-bottom: 10px; }
.empty p { font-size: 0.9rem; line-height: 1.9; }
.empty .btn { margin-top: 22px; }

.skeleton {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--card);
}
.skeleton .sk-cover { aspect-ratio: 16/9; }
.skeleton .sk-line { height: 14px; border-radius: 6px; margin: 14px 16px; }
.skeleton .sk-line.short { width: 55%; margin-top: 0; }
.sk-anim {
  background: linear-gradient(100deg, var(--skel-a) 40%, var(--skel-b) 60%);
  /* 静态占位，不做循环闪烁动画（刷新时不闪） */
}

.load-more-wrap { text-align: center; padding: 16px 0 40px; }

/* ============ 表单 ============ */
.auth-shell {
  min-height: calc(100vh - 71px);
  display: grid;
  place-items: center;
  padding: 46px 4vw;
}
.auth-card {
  width: min(430px, 100%);
  padding: 38px 36px 34px;
  border-radius: 20px;
  background: var(--card-solid);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg), inset 0 1px 0 var(--border);
  backdrop-filter: blur(14px);
  position: relative;
  overflow: hidden;
}
.auth-card::before {
  content: "";
  position: absolute;
  top: 0; left: 15%; right: 15%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-line), transparent);
}
.auth-head { text-align: center; margin-bottom: 30px; }
.auth-head .logo-mark { margin: 0 auto 16px; width: 52px; height: 52px; border-radius: 14px; }
.auth-head .logo-mark .ic { width: 28px; height: 28px; }
.auth-head h1 { font-size: 1.4rem; font-weight: 800; }
.auth-head p { color: var(--dim); font-size: 0.88rem; margin-top: 8px; }

.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 0.84rem;
  color: var(--dim);
  margin-bottom: 8px;
  font-weight: 600;
}
.field label b { color: var(--accent-3); font-weight: 600; }
.input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border-radius: 12px;
  background: var(--input-bg);
  border: 1px solid var(--border);
  transition: border-color 0.25s, box-shadow 0.25s;
}
.input-wrap:focus-within {
  border-color: var(--focus-border);
  box-shadow: var(--focus-ring);
}
.input-wrap .ic { color: var(--dim); width: 16px; height: 16px; }
.input-wrap input, .input-wrap select {
  flex: 1;
  min-width: 0;
  height: 46px;
  background: none;
  border: none;
  outline: none;
  font-size: 0.94rem;
}
.input-wrap select { cursor: pointer; }
.input-wrap select option { background: var(--card-solid); }
.input-wrap .toggle-eye {
  border: none;
  background: none;
  color: var(--dim);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.input-wrap .toggle-eye:hover { color: var(--text); }
textarea.area {
  width: 100%;
  min-height: 110px;
  resize: vertical;
  padding: 13px 14px;
  border-radius: 12px;
  background: var(--input-bg);
  border: 1px solid var(--border);
  outline: none;
  font-size: 0.94rem;
  line-height: 1.8;
  transition: border-color 0.25s, box-shadow 0.25s;
}
textarea.area:focus {
  border-color: var(--focus-border);
  box-shadow: var(--focus-ring);
}
.field .hint-row {
  display: flex;
  justify-content: space-between;
  margin-top: 7px;
  font-size: 0.76rem;
  color: var(--dim);
}
.form-err {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  margin-bottom: 18px;
  border-radius: 10px;
  font-size: 0.86rem;
  color: #be123c;
  background: rgba(244, 63, 94, 0.08);
  border: 1px solid rgba(244, 63, 94, 0.32);
}
[data-theme="dark"] .form-err { color: #fecdd3; background: rgba(251, 113, 133, 0.09); }
.form-err.show { display: flex; }
.form-err .ic { width: 15px; height: 15px; }
.auth-foot { text-align: center; margin-top: 22px; color: var(--dim); font-size: 0.88rem; }
.auth-foot a { color: var(--accent); }
.auth-foot a:hover { text-decoration: underline; }

/* ============ 上传页 ============ */
.upload-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr);
  gap: 26px;
  padding: 30px 0 60px;
  align-items: start;
}
.panel {
  padding: 26px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
}
.panel h2 {
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.panel h2 .ic { color: var(--accent); width: 19px; height: 19px; }

.dropzone {
  position: relative;
  border: 1.5px dashed var(--dim);
  border-radius: 14px;
  padding: 40px 20px;
  text-align: center;
  color: var(--dim);
  transition: border-color 0.25s, background 0.25s;
  cursor: pointer;
}
.dropzone:hover, .dropzone.drag {
  border-color: var(--accent);
  background: var(--accent-soft-sm);
}
.dropzone .ic { width: 44px; height: 44px; margin: 0 auto 14px; color: var(--accent); }
.dropzone b { color: var(--text); }
.dropzone p { font-size: 0.85rem; line-height: 1.9; margin-top: 6px; }
.dz-actions { display: flex; gap: 10px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }

.file-list {
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  max-height: 260px;
  overflow: auto;
  display: none;
  background: var(--bg-soft);
}
.file-list.show { display: block; }
.file-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  font-size: 0.84rem;
  border-bottom: 1px solid var(--border);
}
.file-row:last-child { border-bottom: none; }
.file-row .ic { width: 15px; height: 15px; color: var(--dim); }
.file-row .fname { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-row .fsize { color: var(--dim); font-size: 0.78rem; }
.file-row.entry-row .fname { color: var(--accent); }
.file-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  font-size: 0.84rem;
  color: var(--dim);
}
.file-summary button {
  border: none;
  background: none;
  color: var(--danger);
  cursor: pointer;
  font-size: 0.84rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cover-pick {
  display: flex;
  gap: 16px;
  align-items: center;
}
.cover-preview {
  width: 148px;
  aspect-ratio: 16/9;
  border-radius: 10px;
  border: 1px dashed var(--dim);
  display: grid;
  place-items: center;
  color: var(--dim);
  overflow: hidden;
  cursor: pointer;
  flex: none;
  transition: border-color 0.25s;
}
.cover-preview:hover { border-color: var(--accent); }
.cover-preview img { width: 100%; height: 100%; object-fit: cover; }
.cover-preview .ic { width: 22px; height: 22px; }
.cover-tip { font-size: 0.8rem; color: var(--dim); line-height: 1.8; }

.progress-wrap { display: none; margin-top: 18px; }
.progress-wrap.show { display: block; }
.progress-bar {
  height: 10px;
  border-radius: 999px;
  background: var(--input-bg);
  overflow: hidden;
}
.progress-bar i {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.2s;
}
.progress-text { margin-top: 8px; font-size: 0.8rem; color: var(--dim); text-align: right; }

.tip-list { list-style: none; }
.tip-list li {
  display: flex;
  gap: 10px;
  padding: 9px 0;
  color: var(--dim);
  font-size: 0.86rem;
  line-height: 1.75;
  border-bottom: 1px dashed var(--border);
}
.tip-list li:last-child { border-bottom: none; }
.tip-list .ic { width: 16px; height: 16px; color: var(--accent); margin-top: 3px; }

/* ============ 试玩页 ============ */
.player-shell { padding: 26px 0 60px; }
.player-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.player-top h1 { font-size: clamp(1.3rem, 2.6vw, 1.8rem); font-weight: 800; }
.player-top .meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  color: var(--dim);
  font-size: 0.86rem;
  flex-wrap: wrap;
}
.player-top .meta-row .ic { width: 14px; height: 14px; }
.player-top .meta-row .m { display: inline-flex; align-items: center; gap: 6px; }
.player-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.game-frame {
  border-radius: var(--radius);
  background: var(--stage-bg);
  border: 1px solid var(--stage-border);
  box-shadow: var(--ring), 0 24px 60px rgba(0,0,0,0.3);
  overflow: hidden;
}
.game-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.09);
  font-family: var(--pixel);
  font-size: 0.56rem;
  letter-spacing: 2px;
  color: var(--accent);
  background: var(--stage-bg);
}
.game-titlebar .tb-left { display: inline-flex; align-items: center; gap: 10px; text-transform: uppercase; }
.game-titlebar .tb-left .ic { width: 15px; height: 15px; }
.game-titlebar .dots { display: flex; gap: 6px; }
.game-titlebar .dots i { width: 10px; height: 10px; border-radius: 50%; display: block; }
.stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--stage-bg);
}
.stage iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}
.stage .stage-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(600px 300px at 50% 30%, var(--stage-cover-radial), transparent 70%), var(--stage-bg);
  z-index: 2;
}
.stage-cover .inner { text-align: center; }
.stage-cover .inner .big-play {
  width: 84px; height: 84px;
  border-radius: 50%;
  border: none;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  cursor: pointer;
  color: #06121a;
  background: linear-gradient(135deg, var(--accent), #7ce7f7);
  box-shadow: 0 14px 44px rgba(34,211,238,0.5);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s;
}
.stage-cover .inner .big-play:hover { transform: scale(1.08); box-shadow: 0 18px 54px rgba(34,211,238,0.65); }
.stage-cover .inner .big-play .ic { width: 34px; height: 34px; margin-left: 4px; }
.stage-cover .inner p { color: var(--dim); font-size: 0.86rem; }

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr);
  gap: 24px;
  margin-top: 24px;
  align-items: start;
}
.desc-panel p { color: var(--dim); line-height: 2; font-size: 0.94rem; white-space: pre-wrap; word-break: break-word; }
.side-info .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 0.88rem;
}
.side-info .row:last-child { border-bottom: none; }
.side-info .row span { color: var(--dim); display: inline-flex; align-items: center; gap: 8px; }
.side-info .row span .ic { width: 15px; height: 15px; }
.side-info .row b { font-weight: 600; text-align: right; word-break: break-all; }

.notice-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 18px;
  border-radius: 12px;
  margin-bottom: 18px;
  font-size: 0.88rem;
}
.notice-bar .ic { width: 17px; height: 17px; flex: none; }
.notice-warn { color: #b45309; background: rgba(245, 158, 11, 0.09); border: 1px solid rgba(245, 158, 11, 0.3); }
.notice-danger { color: #be123c; background: rgba(244, 63, 94, 0.08); border: 1px solid rgba(244, 63, 94, 0.3); }
[data-theme="dark"] .notice-warn { color: #fde68a; background: rgba(250, 204, 21, 0.08); }
[data-theme="dark"] .notice-danger { color: #fecdd3; background: rgba(251, 113, 133, 0.08); }

/* ============ 我的作品 / 列表行 ============ */
.mygame-list { display: flex; flex-direction: column; gap: 16px; padding: 26px 0 60px; }
.grow {
  display: flex;
  gap: 18px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--border);
  align-items: center;
  flex-wrap: wrap;
  transition: border-color 0.25s;
}
.grow:hover { border-color: var(--card-hover-border); }
.grow .thumb {
  width: 168px;
  aspect-ratio: 16/9;
  border-radius: 10px;
  overflow: hidden;
  flex: none;
  background: var(--bg-soft);
}
.grow .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.grow .info { flex: 1; min-width: 220px; }
.grow .info h3 { font-size: 1.02rem; margin-bottom: 8px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.grow .info .sub { color: var(--dim); font-size: 0.82rem; display: flex; gap: 12px; flex-wrap: wrap; }
.grow .info .sub .m { display: inline-flex; align-items: center; gap: 5px; }
.grow .info .sub .ic { width: 13px; height: 13px; }
.grow .reason {
  margin-top: 8px;
  font-size: 0.8rem;
  color: #be123c;
  background: rgba(244, 63, 94, 0.07);
  border: 1px solid rgba(244, 63, 94, 0.25);
  padding: 7px 11px;
  border-radius: 8px;
  line-height: 1.7;
}
[data-theme="dark"] .grow .reason { color: #fecdd3; background: rgba(251,113,133,0.07); }
.grow .acts { display: flex; gap: 9px; flex-wrap: wrap; }

/* ============ 管理后台 ============ */
.admin-layout {
  display: grid;
  grid-template-columns: 218px minmax(0, 1fr);
  gap: 26px;
  padding: 30px 0 60px;
  align-items: start;
}
.admin-side {
  position: sticky;
  top: 86px;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--border);
}
.admin-side .as-title {
  font-family: var(--pixel);
  font-size: 0.55rem;
  letter-spacing: 2px;
  color: var(--dim);
  padding: 8px 12px 12px;
  text-transform: uppercase;
}
.admin-side button {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 11px 13px;
  margin-bottom: 4px;
  border: none;
  border-radius: 10px;
  background: none;
  color: var(--dim);
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  text-align: left;
}
.admin-side button .ic { width: 17px; height: 17px; }
.admin-side button:hover { background: var(--hover-bg); color: var(--text); }
.admin-side button.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}
.admin-side button .cnt {
  margin-left: auto;
  font-size: 0.72rem;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.15);
  color: var(--hl);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
}
.stat-card {
  position: relative;
  padding: 24px 22px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--border);
  overflow: hidden;
}
.stat-card::before {
  content: "";
  position: absolute;
  top: 0; left: 20%; right: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-line), transparent);
}
.stat-card .ic { width: 22px; height: 22px; color: var(--accent); margin-bottom: 14px; }
.stat-card b {
  display: block;
  font-family: var(--pixel);
  font-size: 1.25rem;
  margin-bottom: 8px;
  background: var(--stat-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-card span { color: var(--dim); font-size: 0.82rem; }

.admin-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.admin-toolbar .nav-search { max-width: 320px; height: 40px; }
.filter-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-chips button {
  padding: 7px 15px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--chip-bg);
  color: var(--dim);
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s;
}
.filter-chips button.active {
  color: var(--accent);
  border-color: var(--accent-border);
  background: var(--accent-soft);
}

.table-wrap {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: auto;
  background: var(--card);
}
table.tbl { width: 100%; border-collapse: collapse; font-size: 0.87rem; min-width: 680px; }
.tbl th {
  text-align: left;
  padding: 13px 16px;
  color: var(--dim);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 1px;
  border-bottom: 1px solid var(--border);
  background: var(--chip-bg);
  white-space: nowrap;
}
.tbl td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.tbl tr:last-child td { border-bottom: none; }
.tbl tr:hover td { background: var(--hover-bg); }
.tbl .cell-main { font-weight: 600; }
.tbl .cell-sub { color: var(--dim); font-size: 0.78rem; margin-top: 3px; word-break: break-all; }
.tbl .acts { display: flex; gap: 7px; flex-wrap: wrap; }
.role-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.76rem;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid;
}
.role-chip .ic { width: 12px; height: 12px; }
.role-admin { color: #6d28d9; background: rgba(139, 92, 246, 0.1); border-color: rgba(139, 92, 246, 0.4); }
.role-user { color: var(--dim); background: var(--chip-bg); border-color: var(--border); }
[data-theme="dark"] .role-admin { color: #c4b5fd; background: rgba(167,139,250,0.1); }

/* ============ 弹窗 / Toast ============ */
.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 20px;
  background: var(--mask-bg);
  backdrop-filter: blur(6px);
  animation: fade 0.2s ease;
}
@keyframes fade { from { opacity: 0; } }
.modal {
  width: min(440px, 100%);
  padding: 28px 26px 24px;
  border-radius: 18px;
  background: var(--card-solid);
  border: 1px solid var(--border);
  box-shadow: 0 30px 90px rgba(0,0,0,0.25);
  animation: pop 0.22s cubic-bezier(0.34, 1.4, 0.64, 1);
}
.modal h3 {
  font-size: 1.08rem;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.modal h3 .ic { width: 20px; height: 20px; color: var(--accent); }
.modal h3.danger .ic { color: var(--danger); }
.modal .modal-body { color: var(--dim); font-size: 0.92rem; line-height: 1.9; word-break: break-word; }
.modal .modal-body textarea { margin-top: 12px; }
.modal .modal-acts {
  display: flex;
  gap: 11px;
  justify-content: flex-end;
  margin-top: 24px;
}

.toast-wrap {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 240px;
  max-width: 360px;
  padding: 13px 17px;
  border-radius: 12px;
  font-size: 0.88rem;
  background: var(--card-solid);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-pop);
  animation: toast-in 0.3s cubic-bezier(0.34, 1.4, 0.64, 1);
  pointer-events: auto;
}
@keyframes toast-in { from { opacity: 0; transform: translateY(14px) scale(0.96); } }
.toast.out { animation: toast-out 0.25s ease forwards; }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); } }
.toast .ic { width: 17px; height: 17px; flex: none; }
.toast.ok .ic { color: var(--ok); }
.toast.err .ic { color: var(--danger); }
.toast.info .ic { color: var(--accent); }

/* ============ 页脚 ============ */
footer.site-foot {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 34px 4vw;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  color: var(--dim);
  font-size: 0.84rem;
  margin-top: 50px;
}
footer.site-foot::before {
  content: "";
  position: absolute;
  top: -1px; left: 0; right: 0;
  height: 1px;
  background: var(--footer-line);
}
footer.site-foot .pixel {
  font-family: var(--pixel);
  font-size: 0.55rem;
  letter-spacing: 2px;
  color: var(--accent);
}
footer.site-foot .made { display: inline-flex; align-items: center; gap: 7px; }
footer.site-foot .made .ic { width: 13px; height: 13px; color: var(--accent-3); }
footer.site-foot nav { display: flex; gap: 20px; }
footer.site-foot nav a:hover { color: var(--text); }

/* ============ 404 ============ */
.err-shell {
  min-height: calc(100vh - 71px);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 40px;
}
.err-shell .code {
  font-family: var(--pixel);
  font-size: clamp(3rem, 10vw, 5.5rem);
  background: linear-gradient(92deg, var(--accent), var(--accent-2), var(--accent-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.err-shell .ic { width: 70px; height: 70px; margin: 26px auto 20px; color: var(--dim); }
.err-shell p { color: var(--dim); margin-bottom: 26px; }

/* ============ 响应式 ============ */
@media (max-width: 920px) {
  .upload-grid, .detail-grid { grid-template-columns: 1fr; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-side { position: static; display: flex; overflow-x: auto; gap: 6px; padding: 10px; }
  .admin-side .as-title { display: none; }
  .admin-side button { width: auto; white-space: nowrap; margin-bottom: 0; }
}
@media (max-width: 720px) {
  .nav { flex-wrap: wrap; gap: 12px; padding: 12px 4vw; }
  .nav-search { order: 3; max-width: 100%; flex-basis: 100%; }
  .nav-links a.nlink span.lbl { display: none; }
  .nav-links a.nlink { padding: 9px 11px; }
  .grow .thumb { width: 100%; }
  .lobby-head .right { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   精致化升级 v2 —— 霓虹街机厅
   ============================================================ */

/* ---------- 环境氛围：双色光雾 ---------- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 520px at 10% -4%, color-mix(in srgb, var(--accent) 11%, transparent), transparent 62%),
    radial-gradient(760px 480px at 92% 4%, color-mix(in srgb, var(--accent-2) 10%, transparent), transparent 64%);
}
main, footer.site-foot { position: relative; z-index: 1; }

/* ---------- 顶栏：玻璃拟态 ---------- */
nav.nav {
  backdrop-filter: blur(20px) saturate(1.7);
  -webkit-backdrop-filter: blur(20px) saturate(1.7);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 10px 34px rgba(2, 6, 23, 0.06);
}
.logo-mark { position: relative; }
.logo-mark::after {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 16px;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 70%, transparent), transparent 70%);
  filter: blur(9px);
  opacity: 0.55;
  z-index: -1;
}
.nav-links a.nlink { position: relative; }
.nav-links a.nlink::after {
  content: "";
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: 4px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.nav-links a.nlink:hover::after,
.nav-links a.nlink.active::after { transform: scaleX(1); }

/* ---------- 游戏卡片 v2 ---------- */
.grid { gap: 24px; }
.gcard {
  border-radius: 20px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.3s, box-shadow 0.38s;
}
.gcard::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg,
    color-mix(in srgb, var(--accent) 60%, transparent),
    transparent 42%,
    color-mix(in srgb, var(--accent-2) 50%, transparent));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.38s;
  pointer-events: none;
  z-index: 5;
}
.gcard:hover::after { opacity: 1; }
.gcard:hover {
  transform: translateY(-9px);
  box-shadow: var(--shadow-lg), 0 0 0 1px color-mix(in srgb, var(--accent) 14%, transparent);
}
.gcover::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 58%;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(3, 7, 18, 0.66));
  opacity: 0;
  transition: opacity 0.3s;
}
.gcard:hover .gcover::after,
.gcard:focus-within .gcover::after { opacity: 1; }
.gcover .play-hover { z-index: 2; backdrop-filter: blur(2px); }
.gcover .gdetail { z-index: 3; }
.gengine, .gplays {
  position: absolute;
  bottom: 10px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  white-space: nowrap;
  /* 与「详情」按钮一致：默认隐藏，悬停淡入 */
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.28s, transform 0.28s;
  pointer-events: none;
}
.gcard:hover .gengine, .gcard:hover .gplays,
.gcard:focus-within .gengine, .gcard:focus-within .gplays {
  opacity: 1;
  transform: none;
}
/* 触屏设备没有 hover，徽章常显 */
@media (hover: none) {
  .gengine, .gplays, .gcover::after { opacity: 1; transform: none; }
}
.gengine {
  left: 10px;
  background: rgba(6, 182, 212, 0.3);
  border: 1px solid rgba(125, 211, 252, 0.45);
  letter-spacing: 0.3px;
}
.gengine .ic, .gplays .ic { width: 12px; height: 12px; }
.gplays {
  right: 10px;
  background: rgba(8, 12, 22, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.16);
}
.gbody { padding: 16px 17px 18px; }
.gbody h3 { font-weight: 800; letter-spacing: -0.2px; }
.gmeta { margin-top: 9px; }
.gmeta .avatar {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.68rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 3px 10px color-mix(in srgb, var(--accent) 35%, transparent);
}

/* ---------- 通用组件精修 ---------- */
.panel {
  border-radius: 20px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 12px 34px rgba(2, 6, 23, 0.05);
}
[data-theme="dark"] .panel { box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 18px 44px rgba(0, 0, 0, 0.34); }
.seg { box-shadow: inset 0 1px 2px rgba(2, 6, 23, 0.05); }
.seg button.active { box-shadow: var(--btn-primary-shadow); }
.btn { border-radius: 12px; }
.btn-primary { position: relative; overflow: hidden; }
.load-more-wrap .btn { border-radius: 999px; padding: 13px 30px; }
.empty .ic { width: 76px; height: 76px; }
.skeleton { border-radius: 20px; overflow: hidden; }
footer.site-foot {
  margin-top: auto;
  border-top: 1px solid var(--border);
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* ---------- 详情弹窗精修 ---------- */
.gd-cover { border-radius: 16px; box-shadow: var(--shadow-pop); }
.gdetail-body { gap: 22px; }
.gd-info h3 { font-size: 1.22rem; font-weight: 800; letter-spacing: -0.3px; }

@media (max-width: 720px) {
}

/* ---------- 内页标题 / 弹窗 / 提示条精修 ---------- */
.page-head { padding: 42px 0 6px; }
h1.page-title {
  position: relative;
  display: inline-block;
  letter-spacing: -0.8px;
}
h1.page-title::after {
  content: "";
  display: block;
  width: 54px; height: 4px;
  margin-top: 14px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}
.section-tag { font-size: 0.66rem; }

.modal {
  border-radius: 22px;
  border: 1px solid var(--border);
  background: var(--menu-bg);
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  box-shadow: 0 30px 80px rgba(2, 6, 23, 0.32);
  animation: modalIn 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
.modal h3 { font-weight: 800; letter-spacing: -0.2px; }
.modal-mask { backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }

.toast {
  border-radius: 14px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-pop);
}

.notice-bar { border-radius: 14px; }

/* 后台 / 作品列表行卡片化 */
.grow {
  border-radius: 18px;
  transition: transform 0.28s, border-color 0.28s, box-shadow 0.28s;
}
.grow:hover {
  transform: translateY(-3px);
  border-color: var(--card-hover-border);
  box-shadow: var(--shadow-pop);
}

/* ============ 沉浸式试玩页（点击卡片直接全屏开玩） ============ */
body.play-body {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  background: var(--stage-bg);
}
body.play-body .nav,
body.play-body footer.site-foot { display: none; }
body.play-body main {
  min-height: 0;
  flex: 1;
  display: flex;
}
body.play-body .player-shell {
  max-width: none;
  width: 100%;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  position: relative;
}
body.play-body .player-shell > .empty { margin: auto; }

.game-frame.stage-fill {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-radius: 0;
  border: none;
  box-shadow: none;
}
.stage-fill .stage { aspect-ratio: auto; height: auto; flex: 1; min-height: 0; }

/* 悬浮控制（无操作自动淡出） */
.float-back,
.float-ctl {
  position: fixed;
  z-index: 40;
  display: flex;
  gap: 8px;
  transition: opacity 0.4s ease;
}
.float-back { top: 14px; left: 14px; }
.float-ctl { top: 14px; right: 14px; }
.float-back,
.fbtn {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(10, 16, 24, 0.55);
  color: #e2e8f0;
  backdrop-filter: blur(8px);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.25s, transform 0.25s;
}
.float-back .ic,
.fbtn .ic { width: 18px; height: 18px; }
.float-back:hover,
.fbtn:hover { background: rgba(10, 16, 24, 0.88); transform: scale(1.06); }
body.play-body.idle .float-back,
body.play-body.idle .float-ctl { opacity: 0.12; }
body.play-body.idle .float-back:hover,
body.play-body.idle .float-ctl:hover { opacity: 1; }

.float-notice {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  max-width: min(92vw, 720px);
  border-radius: 12px;
  transition: opacity 0.4s ease;
}
body.play-body.idle .float-notice { opacity: 0.35; }

/* ============ 卡片详情按钮与弹窗 ============ */
.gcover .gdetail {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(10, 16, 24, 0.6);
  color: #e2e8f0;
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.3s, transform 0.3s, background 0.25s;
}
.gcard:hover .gdetail,
.gcard:focus-within .gdetail { opacity: 1; transform: none; }
.gdetail:hover { background: rgba(10, 16, 24, 0.9); }
.gdetail .ic { width: 16px; height: 16px; }

.gdetail-body {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 20px;
  text-align: left;
}
.gd-cover {
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--bg-soft);
}
.gd-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gd-cover .cover-ph { height: 100%; }
.gd-info h3 { font-size: 1.15rem; margin-bottom: 10px; }
.gd-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  color: var(--dim);
  font-size: 0.84rem;
  margin-bottom: 14px;
}
.gd-meta .ic { width: 14px; height: 14px; }
.gd-meta .m { display: inline-flex; align-items: center; gap: 6px; }
.gd-engine {
  padding: 2px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
  font-weight: 600;
}
.gd-manage { margin-top: 16px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.dl-pick { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.dl-name {
  color: var(--dim);
  font-size: 0.88rem;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gd-desc {
  color: var(--dim);
  line-height: 1.9;
  font-size: 0.92rem;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 240px;
  overflow: auto;
}
@media (max-width: 720px) {
  .gdetail-body { grid-template-columns: 1fr; }
}
