/* ============================================================
 * 游戏大厅 · 样式（亮/暗双主题 + 响应式）
 * ============================================================ */
:root {
  --bg: #eef2ff;
  --panel: #ffffff;
  --text: #1e293b;
  --muted: #64748b;
  --accent: #4f46e5;
  --line: #e2e8f0;
  --card: #f8fafc;
  --shadow: 0 10px 30px rgba(30, 41, 59, 0.12);
}
body.theme-dark {
  --bg: #0f172a;
  --panel: #1e293b;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #818cf8;
  --line: #334155;
  --card: #273449;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  transition: background 0.25s, color 0.25s;
  -webkit-tap-highlight-color: transparent;
}
.hub {
  max-width: 1080px;
  margin: 0 auto;
  padding: 28px 20px 40px;
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

/* ---------- 头部 ---------- */
.hub-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  background: var(--panel);
  border-radius: 20px;
  padding: 24px 26px;
  box-shadow: var(--shadow);
  position: relative;
  z-index: 1;
}
.hub-title {
  font-size: 34px;
  background: linear-gradient(135deg, #4f46e5, #ec4899);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hub-sub { color: var(--muted); margin-top: 6px; line-height: 1.6; }
.hub-count {
  display: inline-block;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  background: rgba(79, 70, 229, 0.1);
  border-radius: 999px;
  padding: 4px 12px;
}
body.theme-dark .hub-count { background: rgba(129, 140, 248, 0.16); }

/* ---------- 按钮 ---------- */
.btn {
  border: none;
  border-radius: 12px;
  padding: 10px 18px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.12s, box-shadow 0.12s, opacity 0.12s;
}
.btn:active { transform: scale(0.96); }
.btn-icon {
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--text);
  width: 40px; height: 40px;
  padding: 0;
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

/* ---------- 游戏卡片网格 ---------- */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
  margin-top: 20px;
}
.game-card {
  background: var(--panel);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  transition: transform 0.16s, box-shadow 0.16s;
  border: none;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}
.game-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 40px rgba(79, 70, 229, 0.22);
}
.gc-cover {
  height: 118px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.gc-icon { font-size: 54px; filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.25)); }
.gc-badge {
  position: absolute;
  top: 10px; right: 10px;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(4px);
}
.gc-badge.ok { background: rgba(22, 163, 74, 0.9); }
.gc-badge.dev { background: rgba(217, 119, 6, 0.92); }
.gc-body { padding: 14px 16px 10px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.gc-body h3 { font-size: 17px; }
.gc-sub { font-size: 12.5px; color: var(--accent); font-weight: 700; }
.gc-desc { font-size: 13px; color: var(--muted); line-height: 1.65; }
.gc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.gc-tags span {
  font-size: 11px;
  color: var(--muted);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 9px;
}
.gc-foot {
  padding: 10px 16px 14px;
  font-size: 13.5px;
  font-weight: 800;
  color: var(--accent);
}
.game-card.dev { cursor: default; opacity: 0.85; }
.game-card.dev:hover { transform: none; box-shadow: var(--shadow); }
.game-card.dev .gc-foot { color: var(--muted); }

/* 占位卡（开发中提示） */
.game-card.placeholder {
  border: 2px dashed var(--line);
  background: transparent;
  box-shadow: none;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 240px;
  cursor: default;
  gap: 6px;
  padding: 20px;
}
.game-card.placeholder:hover { transform: none; box-shadow: none; }
.gc-ph-icon {
  font-size: 34px;
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--card);
  border: 2px dashed var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}
.game-card.placeholder p { font-weight: 800; font-size: 15px; }
.game-card.placeholder small { color: var(--muted); font-size: 12px; line-height: 1.6; }

/* ---------- 家长工具行 ----------
   刻意做得「不起眼」：小字号、无卡片、无彩色封面。
   目的：家长随时能进，但不跟游戏抢孩子的注意力。 */
.tool-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 22px;
  padding: 11px 16px;
  background: transparent;
  border: 1px dashed var(--line);
  border-radius: 10px;
  font-size: 12.5px;
  color: var(--muted);
}
.tool-label {
  font-weight: 600;
  color: var(--muted);
  flex-shrink: 0;
  letter-spacing: .3px;
}
.tool-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.tool-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  text-decoration: none;
  padding: 3px 8px;
  border-radius: 6px;
  transition: color .15s, background .15s;
}
.tool-link:hover {
  color: var(--accent);
  background: var(--card);
}
.tl-ico { font-size: 12px; opacity: .9; }
.tool-dot { color: var(--line); }
.tool-note {
  margin-left: auto;
  font-size: 11px;
  opacity: .68;
  flex-shrink: 0;
}
@media (max-width: 640px) {
  .tool-row { padding: 10px 12px; gap: 7px; }
  .tool-note { margin-left: 0; width: 100%; font-size: 10.5px; }
}

/* ---------- 页脚 ---------- */
.hub-footer {
  margin-top: auto;
  padding-top: 26px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}
.hub-footer code {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 7px;
  font-size: 12px;
  color: var(--accent);
}

/* ---------- 背景漂浮符号 ---------- */
.float-symbols { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.float-symbols span {
  position: absolute;
  font-size: 44px;
  opacity: 0.14;
  animation: floaty 7s ease-in-out infinite;
}
.float-symbols span:nth-child(1) { left: 5%; top: 16%; animation-delay: 0s; }
.float-symbols span:nth-child(2) { left: 11%; top: 68%; animation-delay: 1.2s; }
.float-symbols span:nth-child(3) { left: 84%; top: 20%; animation-delay: 2.1s; }
.float-symbols span:nth-child(4) { left: 90%; top: 64%; animation-delay: 0.6s; }
.float-symbols span:nth-child(5) { left: 46%; top: 7%; animation-delay: 3s; }
.float-symbols span:nth-child(6) { left: 72%; top: 84%; animation-delay: 1.8s; }
@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(-6deg); }
  50% { transform: translateY(-22px) rotate(8deg); }
}

/* ---------- 响应式 ---------- */
@media (max-width: 640px) {
  .hub { padding: 16px 12px 28px; }
  .hub-header { padding: 18px; }
  .hub-title { font-size: 26px; }
  .game-grid { grid-template-columns: 1fr; }
}
