/* ============ 游戏账号租赁网站 · 全站样式 ============ */
:root {
  --bg: #0b0e14;
  --bg-soft: #10141d;
  --card: #161b26;
  --card-hover: #1d2433;
  --border: #242d40;
  --text: #e9edf5;
  --muted: #8b95a8;
  --accent: #7c5cff;
  --accent2: #22d3ee;
  --grad: linear-gradient(135deg, #7c5cff 0%, #4f46e5 55%, #22d3ee 130%);
  --red: #ff4d6d;
  --gold: #fbbf24;
  --green: #34d399;
  --radius: 14px;
  --shadow: 0 8px 30px rgba(0, 0, 0, .35);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}
body::before {
  content: '';
  position: fixed; inset: 0;
  background:
    radial-gradient(600px 300px at 85% -50px, rgba(124, 92, 255, .18), transparent 70%),
    radial-gradient(500px 260px at 0% 20%, rgba(34, 211, 238, .10), transparent 70%);
  pointer-events: none;
  z-index: 0;
}
main, header, footer { position: relative; z-index: 1; }
a { color: var(--accent2); text-decoration: none; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ---------- 顶栏 ---------- */
.topbar {
  background: rgba(11, 14, 20, .85);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 50;
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 58px; }
.logo { font-size: 17px; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 8px; }
.logo b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.topbar-tip { font-size: 12px; color: var(--muted); }

/* ---------- 首页 hero ---------- */
.hero {
  margin-top: 28px;
  padding: 34px 28px 30px;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(124, 92, 255, .10), rgba(22, 27, 38, .6)), var(--card);
  box-shadow: var(--shadow);
}
.hero h1 { font-size: 26px; letter-spacing: .5px; }
.hero .sub { color: var(--muted); margin-top: 8px; font-size: 14.5px; }
.search-box { display: flex; gap: 10px; margin-top: 20px; }
.search-box input {
  flex: 1; min-width: 0;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 15px;
  padding: 12px 16px;
  outline: none;
  transition: border-color .2s;
}
.search-box input:focus { border-color: var(--accent); }
.search-box input::placeholder { color: #5b647a; }

/* ---------- 按钮 ---------- */
.btn {
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 14.5px;
  cursor: pointer;
  transition: all .18s;
  white-space: nowrap;
  font-family: inherit;
}
.btn:hover { background: var(--card-hover); border-color: #32405e; }
.btn-primary { background: var(--grad); border: none; color: #fff; font-weight: 600; padding: 12px 24px; }
.btn-primary:hover { filter: brightness(1.12); background: var(--grad); }
.btn-danger { color: var(--red); border-color: rgba(255, 77, 109, .35); }
.btn-danger:hover { background: rgba(255, 77, 109, .12); border-color: var(--red); }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--text); background: var(--card); }

/* ---------- 搜索结果 ---------- */
.search-results {
  margin-top: 18px;
  text-align: left;
  border-top: 1px dashed var(--border);
  padding-top: 16px;
}
.sr-head { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.sr-item {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  padding: 12px 14px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 8px;
}
.sr-name { font-weight: 600; font-size: 15px; }
.sr-tiers { display: flex; flex-wrap: wrap; gap: 6px; }
.sr-tier-chip {
  font-size: 12.5px;
  padding: 3px 12px;
  border-radius: 999px;
  border: 1px solid rgba(124, 92, 255, .5);
  background: rgba(124, 92, 255, .12);
  color: #c9bcff;
  transition: all .15s;
}
.sr-tier-chip:hover { background: rgba(124, 92, 255, .28); }
.sr-empty { color: var(--muted); font-size: 14px; padding: 6px 2px; }

/* ---------- NEW 角标 ---------- */
.badge-new {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #fff;
  background: linear-gradient(135deg, #ff4d6d, #ff7a45);
  border-radius: 6px;
  padding: 1px 7px;
  vertical-align: 2px;
  box-shadow: 0 2px 10px rgba(255, 77, 109, .4);
}
/* 预购角标（后台档位表格） */
.badge-pre {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #3d8bfd, #4dc3ff);
  border-radius: 6px;
  padding: 1px 7px;
  vertical-align: 2px;
  box-shadow: 0 2px 10px rgba(77, 166, 255, .35);
}

/* ---------- 会员档位卡片 ---------- */
.section { margin-top: 34px; padding-bottom: 10px; }
.section-title { font-size: 19px; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }
.section-title::before { content: ''; width: 4px; height: 18px; border-radius: 2px; background: var(--grad); }
.tiers {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.tier-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 22px 18px;
  color: var(--text);
  position: relative;
  overflow: hidden;
  transition: transform .18s, border-color .18s, background .18s;
}
.tier-card::after {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--grad);
}
.tier-card:hover { transform: translateY(-3px); border-color: #3d4a6b; background: var(--card-hover); }
.tier-card h3 { font-size: 18px; margin-bottom: 6px; }
.tier-card .desc { color: var(--muted); font-size: 13.5px; min-height: 22px; }
.tier-card .meta {
  margin-top: 14px;
  display: flex; align-items: center; justify-content: space-between;
  border-top: 1px dashed var(--border); padding-top: 12px;
}
.tier-card .count { font-size: 13px; color: var(--muted); }
.tier-card .count b { color: var(--accent2); font-size: 16px; }
.tier-card .go { font-size: 13.5px; color: var(--accent2); font-weight: 600; }
.tier-card:hover .go { text-decoration: underline; }

/* ---------- 游戏目录页 ---------- */
.tier-head { margin-top: 26px; }
.back-link { font-size: 13.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }
.back-link:hover { color: var(--text); }
.tier-title-box {
  margin-top: 12px;
  padding: 24px 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(124, 92, 255, .10), transparent), var(--card);
}
.tier-title-box h1 { font-size: 23px; }
.tier-title-box .desc { color: var(--muted); font-size: 14px; margin-top: 6px; }
.tier-title-box .count { margin-top: 10px; font-size: 13.5px; color: var(--accent2); }
.catalog-tools { display: flex; gap: 10px; margin: 20px 0 6px; }
.catalog-tools input {
  flex: 1; min-width: 0;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 15px;
  padding: 11px 16px;
  outline: none;
}
.catalog-tools input:focus { border-color: var(--accent); }
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 7px;
  margin-top: 10px;
}
.game-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 7px 10px;
  font-size: 13px;
  font-weight: 500;
  display: flex; align-items: center; gap: 5px;
  transition: border-color .15s, background .15s;
  word-break: break-all;
}
.game-item:hover { border-color: #3d4a6b; background: var(--card-hover); }
.game-item .idx { color: #4d5872; font-size: 11px; font-weight: 400; min-width: 21px; }
.catalog-empty { color: var(--muted); text-align: center; padding: 40px 0; }

/* ---------- 页脚 ---------- */
.footer {
  margin-top: 46px;
  border-top: 1px solid var(--border);
  padding: 22px 0 30px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.footer .icp-link {
  display: inline-block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  text-decoration: none;
  letter-spacing: .5px;
  border-bottom: 1px dashed #3d4a6b;
  padding-bottom: 1px;
}
.footer .icp-link:hover { color: #cdd6f4; border-bottom-color: #cdd6f4; }

/* ---------- 后台管理 ---------- */
.admin-login-wrap { max-width: 380px; margin: 90px auto 0; padding: 0 20px; }
.admin-login {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 28px;
  box-shadow: var(--shadow);
}
.admin-login h1 { font-size: 20px; text-align: center; margin-bottom: 4px; }
.admin-login .sub { text-align: center; color: var(--muted); font-size: 13px; margin-bottom: 20px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--text);
  font-size: 14.5px;
  padding: 10px 13px;
  outline: none;
  font-family: inherit;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); }
.field textarea { resize: vertical; min-height: 90px; }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }

.admin-tabs { display: flex; gap: 8px; margin: 24px 0 18px; flex-wrap: wrap; }
.admin-tab {
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 20px;
  font-size: 14px;
  cursor: pointer;
  transition: all .15s;
  font-family: inherit;
}
.admin-tab.active { background: var(--grad); color: #fff; border-color: transparent; font-weight: 600; }
.panel { display: none; }
.panel.active { display: block; }

.admin-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 18px;
}
.admin-card h3 { font-size: 16px; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.admin-card h3 .cnt { font-size: 12.5px; color: var(--muted); font-weight: 400; }
/* 可折叠卡片标题（后台各栏目通用） */
.collapse-toggle { cursor: pointer; user-select: none; }
.collapse-toggle .collapse-arrow { display: inline-block; font-size: 11px; color: var(--muted); transition: transform .18s; }
.collapse-toggle[aria-expanded="true"] .collapse-arrow { transform: rotate(90deg); }
.collapse-toggle .collapse-tip { margin-left: auto; font-size: 11.5px; color: var(--muted); font-weight: 400; opacity: 0; transition: opacity .15s; }
.collapse-toggle:hover .collapse-tip { opacity: 1; }
.collapse-toggle:hover { color: #cdd6f4; }

.form-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.form-row .field { flex: 1; min-width: 160px; margin-bottom: 0; }

table.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th {
  text-align: left; color: var(--muted); font-weight: 500; font-size: 12.5px;
  padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.admin-table td { padding: 10px; border-bottom: 1px solid rgba(36, 45, 64, .5); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table .ops { white-space: nowrap; }
.admin-table .ops .btn { margin-right: 6px; }
.admin-table input[type=checkbox] { cursor: pointer; width: 16px; height: 16px; accent-color: var(--accent); }
.t-name { font-weight: 600; }
.t-desc { color: var(--muted); font-size: 13px; }
.t-count { color: var(--accent2); font-weight: 600; }
.t-time { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.order-btns { display: inline-flex; gap: 4px; }

/* 批量操作工具栏 */
.batch-toolbar {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  padding: 10px 12px; margin-bottom: 10px;
  background: rgba(124, 92, 255, .06);
  border: 1px dashed var(--border); border-radius: 10px;
  font-size: 13px;
}
.batch-check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; user-select: none; }
.batch-info { color: var(--accent2); font-weight: 600; margin-right: auto; }

/* 按关键词删除 */
.filter-preview-list {
  display: flex; flex-wrap: wrap; gap: 6px;
  max-height: 180px; overflow-y: auto;
  padding: 10px 12px; margin-bottom: 12px;
  background: rgba(255, 77, 109, .05);
  border: 1px solid rgba(255, 77, 109, .25);
  border-radius: 10px; font-size: 13px;
}
.filter-preview-list span {
  background: rgba(255, 77, 109, .12); color: #ff8aa1;
  padding: 3px 10px; border-radius: 12px;
}
.filter-preview-list:empty { display: none; }
.filter-confirm {
  padding: 12px 14px; margin-top: 8px;
  background: rgba(255, 77, 109, .06);
  border: 1px solid rgba(255, 77, 109, .3);
  border-radius: 10px;
}
.filter-confirm input { font-family: inherit; }
.btn-danger { background: var(--red); color: #fff; border-color: var(--red); }
.btn-danger:hover:not(:disabled) { background: #ff2d54; border-color: #ff2d54; }
.btn-danger:disabled { background: rgba(255, 77, 109, .25); border-color: rgba(255, 77, 109, .25); color: rgba(255, 255, 255, .5); cursor: not-allowed; }

dialog {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 26px;
  width: min(420px, 92vw);
  box-shadow: var(--shadow);
}
dialog::backdrop { background: rgba(5, 8, 14, .72); backdrop-filter: blur(3px); }
dialog h3 { margin-bottom: 16px; font-size: 16px; }
dialog .dlg-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

/* ---------- 公告 / 热门游戏 / 留言 ---------- */
.announcement {
  border: 1px solid rgba(251, 191, 36, .35);
  background: linear-gradient(180deg, rgba(251, 191, 36, .10), rgba(22, 27, 38, .7));
  border-radius: var(--radius);
  padding: 16px 20px;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 14.5px;
  line-height: 1.85;
  color: #fde6a8;
  margin: 18px 0 0;
  max-height: 420px;
  overflow-y: auto;
}
.announcement::before {
  content: '📢 店主公示';
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--gold);
  margin-bottom: 8px;
}
/* 预购游戏专区（显示在热门专区上方） */
.preorder-section {
  background: linear-gradient(180deg, rgba(77, 166, 255, .10), rgba(22, 27, 38, .6));
  border: 1px solid rgba(77, 166, 255, .35);
  border-radius: var(--radius);
  padding: 18px 22px 22px;
  margin-top: 20px;
}
.preorder-section h2 {
  font-size: 16px;
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 12px;
}
.preorder-section h2::before {
  content: '🎁';
  font-size: 18px;
}
.preorder-section .hint {
  font-size: 12px;
  color: #8ab8e8;
  background: rgba(77, 166, 255, .08);
  border-left: 2px solid rgba(77, 166, 255, .5);
  border-radius: 4px;
  padding: 6px 10px;
  margin-bottom: 12px;
}
.preorder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  gap: 8px;
}
.preorder-item {
  background: var(--card);
  border: 1px solid rgba(77, 166, 255, .3);
  border-radius: 7px;
  padding: 7px 11px;
  font-size: 13px;
  font-weight: 600;
  display: flex; align-items: center; gap: 6px;
  word-break: break-all;
}
.preorder-item::before {
  content: '🎁';
  font-size: 12px;
  opacity: .85;
  flex: 0 0 auto;
}

.hot-section {
  background: linear-gradient(180deg, rgba(255, 77, 109, .10), rgba(22, 27, 38, .6));
  border: 1px solid rgba(255, 77, 109, .35);
  border-radius: var(--radius);
  padding: 18px 22px 22px;
  margin-top: 20px;
}
.hot-section h2 {
  font-size: 16px;
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 12px;
}
.hot-section h2::before {
  content: '🔥';
  font-size: 18px;
}
.hot-section .hint { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.hot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  gap: 8px;
}
.hot-item {
  background: var(--card);
  border: 1px solid rgba(255, 77, 109, .3);
  border-radius: 7px;
  padding: 7px 11px;
  font-size: 13px;
  font-weight: 600;
  display: flex; align-items: center; gap: 6px;
  word-break: break-all;
}
.hot-empty { color: var(--muted); font-size: 13.5px; padding: 6px 2px; }

/* 留言区（贴吧风格） */
.comment-section {
  margin-top: 30px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
}
.comment-section h2 { font-size: 17px; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.comment-section h2 .cnt { color: var(--muted); font-size: 13px; font-weight: 400; }
.comment-form { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.comment-form .field { margin: 0; }
.comment-form input { width: 150px; }
.comment-form textarea { flex: 1; min-width: 200px; min-height: 50px; }
.comment-list { border-top: 1px dashed var(--border); padding-top: 16px; }
.comment-empty { color: var(--muted); padding: 20px 0; text-align: center; }
.comment {
  border-left: 2px solid var(--border);
  padding: 10px 0 10px 14px;
  margin-bottom: 4px;
}
.comment .head {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--muted);
  margin: 0 0 8px;
  background: linear-gradient(90deg, rgba(124, 92, 255, .22), rgba(34, 211, 238, .06));
  border: 1px solid rgba(124, 92, 255, .3);
  border-radius: 8px;
  padding: 6px 12px;
}
.comment .head .nick { font-weight: 700; color: #dcd4ff; font-size: 14px; }
.comment .head .floor {
  background: linear-gradient(135deg, #7c5cff, #4f46e5);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .5px;
  border-radius: 6px;
  padding: 2px 9px;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(124, 92, 255, .35);
}
.comment[data-depth="1"] > .head { background: linear-gradient(90deg, rgba(34, 211, 238, .2), rgba(34, 211, 238, .04)); border-color: rgba(34, 211, 238, .3); }
.comment[data-depth="1"] > .head .floor { background: linear-gradient(135deg, #22d3ee, #0e9aae); box-shadow: 0 2px 8px rgba(34, 211, 238, .3); }
.comment[data-depth="1"] > .head .nick { color: #b5f0f9; }
.comment .content { font-size: 14.5px; line-height: 1.7; word-break: break-word; white-space: pre-wrap; }
.comment .actions { margin-top: 6px; font-size: 12.5px; }
.comment .actions button { background: none; border: none; color: var(--muted); cursor: pointer; padding: 0 8px 0 0; font-size: 12.5px; font-family: inherit; }
.comment .actions button:hover { color: var(--accent2); }
.comment-children { margin-left: 22px; margin-top: 6px; border-left: 1px dashed var(--border); padding-left: 8px; }
.comment-reply-form { margin-top: 10px; display: none; }
.comment-reply-form.open { display: flex; gap: 8px; flex-wrap: wrap; }
.comment-reply-form input { width: 130px; }
.comment-reply-form textarea { flex: 1; min-width: 180px; min-height: 44px; }
.comment-reply-form button { align-self: flex-end; }

/* 后台多选热门游戏 */
.hot-pick-list {
  max-height: 360px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 8px 12px;
  background: var(--bg-soft);
}
.hot-pick-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 4px;
  font-size: 14px;
  border-bottom: 1px dashed rgba(36, 45, 64, .5);
}
.hot-pick-item:last-child { border-bottom: none; }
.hot-pick-item input { accent-color: var(--accent); }
.hot-pick-item .ord { color: var(--muted); font-size: 12px; min-width: 30px; }
.hot-pick-toolbar { display: flex; gap: 8px; margin-bottom: 8px; }

/* ---------- 管理员身份标识 ---------- */
.whoami {
  margin-left: auto;
  margin-right: 12px;
  font-size: 12.5px;
  color: var(--muted);
  display: flex; align-items: center; gap: 6px;
  white-space: nowrap;
}
.role-tag {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 20px;
  border: 1px solid var(--border);
  vertical-align: middle;
}
.role-tag.role-super { color: #ffd166; border-color: rgba(255, 209, 102, .45); background: rgba(255, 209, 102, .12); }
.role-tag.role-normal { color: #8ab4ff; border-color: rgba(138, 180, 255, .45); background: rgba(138, 180, 255, .12); }
.role-tag.role-me { color: #6ee7b7; border-color: rgba(110, 231, 183, .45); background: rgba(110, 231, 183, .12); }
.state-on { color: #6ee7b7; font-size: 12.5px; }
.state-off { color: var(--muted); font-size: 12.5px; text-decoration: line-through; }
/* 隐藏的标签按钮（普通管理员看不到「管理员管理」） */
.admin-tab[hidden] { display: none !important; }

/* ---------- 后台访问统计 ---------- */.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}
.stat-card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
}
.stat-card .stat-label { font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.stat-card .stat-value { font-size: 24px; font-weight: 700; color: var(--text); line-height: 1.2; }
.stat-card .stat-sub { font-size: 11.5px; color: var(--muted); margin-top: 4px; }

.stat-chart-box { margin-top: 18px; }
.stat-chart-head { font-size: 13.5px; color: var(--text); font-weight: 600; margin-bottom: 10px; display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.stat-chart-head .muted { font-weight: 400; font-size: 11.5px; }
.stat-chart {
  display: flex; align-items: flex-end; gap: 6px;
  height: 150px;
  padding: 8px 10px 0;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.stat-bar-item {
  flex: 1 1 0; min-width: 12px; height: 100%;
  display: flex; flex-direction: column; justify-content: flex-end; align-items: center;
  position: relative;
  padding-bottom: 18px;
  cursor: default;
}
.stat-bar-pv {
  width: 100%; background: rgba(255, 77, 109, .28);
  border-radius: 4px 4px 0 0;
  position: absolute; bottom: 18px; left: 0;
}
.stat-bar-uv {
  width: 58%; background: linear-gradient(180deg, #ff5c7c, #ff2d55);
  border-radius: 3px 3px 0 0;
  position: absolute; bottom: 18px;
  display: flex; justify-content: center;
}
.stat-bar-uv span { font-size: 9.5px; color: #fff; transform: translateY(-13px); }
.stat-bar-date { position: absolute; bottom: 0; font-size: 9.5px; color: var(--muted); white-space: nowrap; }
.stat-bar-item:hover .stat-bar-pv { background: rgba(255, 77, 109, .45); }

.stat-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 18px; }
.stat-col h4 { font-size: 13.5px; margin: 0 0 10px; color: var(--text); }
.stat-rank { display: flex; flex-direction: column; gap: 6px; }
.stat-rank-row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.stat-rank-no { color: var(--muted); min-width: 16px; font-size: 11.5px; }
.stat-rank-name {
  flex: 0 1 auto; max-width: 58%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.stat-rank-bar { flex: 1 1 auto; height: 6px; background: rgba(255,255,255,.07); border-radius: 3px; overflow: hidden; min-width: 30px; }
.stat-rank-bar i { display: block; height: 100%; background: linear-gradient(90deg, #4f7cff, #7aa2ff); border-radius: 3px; }
.stat-rank-count { color: var(--muted); font-size: 12px; min-width: 32px; text-align: right; }

.dialog-textarea {
  width: 100%; min-height: 130px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--text);
  font-size: 14.5px;
  padding: 10px 13px;
  outline: none;
  font-family: inherit;
  resize: vertical;
}

.toast {
  position: fixed;
  left: 50%; bottom: 34px;
  transform: translateX(-50%) translateY(20px);
  background: #1f2937;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 11px 22px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: all .25s;
  z-index: 999;
  box-shadow: var(--shadow);
  max-width: 86vw;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.ok { border-color: rgba(52, 211, 153, .5); }
.toast.err { border-color: rgba(255, 77, 109, .55); }

.loading { color: var(--muted); text-align: center; padding: 30px 0; }
.muted { color: var(--muted); }

/* ---------- 悬浮快捷导航（回到顶部 / 直达留言区） ---------- */
.float-nav {
  position: fixed;
  right: 18px;
  bottom: 26px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 500;
}
.float-btn {
  width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(22, 27, 38, .92);
  color: var(--text);
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
  backdrop-filter: blur(6px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .38);
  transition: transform .15s, border-color .15s, background .15s, opacity .2s;
}
.float-btn:hover { border-color: var(--accent); background: var(--card-hover); transform: translateY(-2px); }
.float-btn:active { transform: translateY(0); }
.float-btn.hidden { opacity: 0; pointer-events: none; }

/* ---------- 手机端适配 ---------- */
@media (max-width: 640px) {
  .wrap { padding: 0 14px; }
  .hero { margin-top: 16px; padding: 24px 18px 22px; }
  .hero h1 { font-size: 20px; }
  .hero .sub { font-size: 13px; }
  .search-box { flex-direction: column; }
  .search-box .btn-primary { width: 100%; }
  .section { margin-top: 24px; }
  .section-title { font-size: 17px; }
  .tiers { grid-template-columns: 1fr; gap: 12px; }
  .tier-card { padding: 18px; }
  .tier-card h3 { font-size: 16.5px; }
  .game-grid { grid-template-columns: 1fr 1fr; gap: 6px; }
  .game-item { font-size: 12px; padding: 7px 9px; flex-direction: column; align-items: flex-start; gap: 3px; border-radius: 6px; }
  .game-item .idx { display: none; }
  .catalog-tools { margin-top: 16px; }
  .tier-title-box { padding: 18px; }
  .tier-title-box h1 { font-size: 19px; }
  .topbar-inner { height: 52px; }
  .logo { font-size: 15px; }
  /* 后台表格在小屏横向滚动 */
  .admin-card { padding: 16px 14px; }
  .table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .admin-table th, .admin-table td { padding: 9px 8px; }
  .admin-login-wrap { margin-top: 50px; }
  /* 公告/热门/留言 */
  .announcement { font-size: 13px; padding: 13px 15px; line-height: 1.8; }
  .hot-section { padding: 16px 16px 18px; }
  .hot-grid { grid-template-columns: 1fr 1fr; gap: 7px; }
  .hot-item { font-size: 12px; padding: 7px 9px; border-radius: 6px; }
  .preorder-section { padding: 16px 16px 18px; }
  .preorder-section .hint { font-size: 11.5px; padding: 6px 9px; }
  .preorder-grid { grid-template-columns: 1fr 1fr; gap: 7px; }
  .preorder-item { font-size: 12px; padding: 7px 9px; border-radius: 6px; }
  .comment-section { padding: 18px 16px; }
  .comment-form input { width: 100%; }
  .comment-form textarea { width: 100%; }
  .comment-children { margin-left: 10px; }
  .comment-reply-form input { width: 100%; }
  .comment-reply-form textarea { width: 100%; }
  .comment .head { font-size: 11.5px; padding: 5px 9px; gap: 6px; }
  .comment .head .nick { font-size: 13px; }
  .comment .head .floor { font-size: 11px; padding: 2px 7px; }
  .comment .content { font-size: 13.5px; }
  /* 悬浮快捷导航 */
  .float-nav { right: 12px; bottom: 16px; gap: 8px; }
  .float-btn { width: 42px; height: 42px; font-size: 17px; }
  /* 后台折叠卡片：手机端常显提示 */
  .collapse-toggle .collapse-tip { opacity: 1; font-size: 11px; }
  /* 访问统计 */
  .stat-cols { grid-template-columns: 1fr; gap: 14px; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stat-card { padding: 10px 11px; }
  .stat-card .stat-value { font-size: 20px; }
  .stat-chart { height: 120px; gap: 3px; padding: 8px 6px 0; }
  .stat-bar-date { font-size: 8px; }
}
@media (max-width: 400px) {
  .game-grid { grid-template-columns: 1fr; }
}
