/* ==========================================================================
   传奇盒子 · 全站浅色主题（PC 门户风）
   首页 / 栏目 / 榜单 / 详情 共用
   ========================================================================== */

:root {
  --red: #b01d22;
  --red-d: #8f1519;
  --red-l: #d8342f;
  --gold: #c9a227;
  --ink: #241f1a;
  --ink-2: #5b5347;
  --ink-3: #8b8175;
  --bg: #f6f3ec;
  --card: #ffffff;
  --line: #eee7da;
  --line-2: #f2ede3;
  --wrap: 1200px;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; border: 0; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p, dl, dd { margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: var(--wrap);
  max-width: 100%;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- 顶部细条 ---------- */
.topstrip {
  background: var(--red-d);
  color: rgba(255, 255, 255, .82);
  font-size: 12px;
  letter-spacing: .3px;
}
.topstrip-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 34px;
}
.topstrip-note { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.topstrip-links { display: flex; gap: 18px; flex: none; }
.topstrip-links a:hover { color: #ffd9a0; }

/* ---------- 主导航 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, .97);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 12px rgba(80, 60, 30, .04);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 34px;
  height: 84px;
}

.logo { display: flex; align-items: center; gap: 10px; flex: none; }

.logo-mark {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 11px;
  background: linear-gradient(145deg, #d8342f, #a3161b);
  color: #fff;
  font-size: 21px;
  font-weight: 800;
  box-shadow: 0 6px 16px rgba(176, 29, 34, .25);
}

.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-text strong { font-size: 22px; font-weight: 800; letter-spacing: 1px; color: var(--red); }
.logo-text small { font-size: 10px; letter-spacing: 2.4px; color: var(--ink-3); }

.mainnav { display: flex; gap: 6px; flex: 1; }
.mainnav a {
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 16px;
  color: #3b342b;
  transition: color .18s, background .18s;
}
.mainnav a:hover { color: var(--red); background: #fbf5ef; }
.mainnav a.on { color: var(--red); font-weight: 700; position: relative; }
.mainnav a.on::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--red);
}

.search { display: flex; flex: none; height: 38px; }
.search input {
  width: 220px;
  padding: 0 14px;
  border: 1px solid #e6ddce;
  border-right: 0;
  border-radius: 999px 0 0 999px;
  background: #fbf8f2;
  font-size: 13px;
  color: var(--ink);
  outline: none;
}
.search input:focus { border-color: #e0c9a8; background: #fff; }
.search button {
  width: 74px;
  border: 0;
  border-radius: 0 999px 999px 0;
  background: linear-gradient(135deg, var(--red-l), var(--red-d));
  color: #fff;
  font-size: 13px;
  cursor: pointer;
}

/* ---------- 首屏 ---------- */
.hero { padding: 22px 0 0; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  align-items: stretch;
}

.slider {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: #e9e2d6;
  box-shadow: 0 10px 30px rgba(80, 60, 30, .10);
}

.slides {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.slides::-webkit-scrollbar { display: none; }

.slide {
  position: relative;
  flex: 0 0 100%;
  scroll-snap-align: start;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slide-mask {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(20, 12, 8, 0) 40%, rgba(20, 12, 8, .78) 100%),
    linear-gradient(90deg, rgba(20, 12, 8, .30) 0%, rgba(20, 12, 8, 0) 45%);
}

.slide-copy {
  position: absolute;
  left: 22px; right: 22px; bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
}
.slide-tag {
  flex: none;
  padding: 2px 9px;
  border-radius: 4px;
  background: rgba(201, 162, 39, .9);
  font-size: 11px;
  font-style: normal;
  letter-spacing: .5px;
}
.slide-copy strong {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: .5px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .5);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.slide-copy .discount {
  flex: none;
  padding: 2px 9px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--red-l), var(--red-d));
  font-size: 12px;
  font-weight: 700;
}
.slide-btn {
  flex: none;
  margin-left: auto;
  padding: 9px 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, #e6c05a, #c9a227);
  color: #2a1e06;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(201, 162, 39, .35);
}

.slider-dots {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
}
.dot {
  width: 8px; height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .45);
  cursor: pointer;
  transition: width .2s, background .2s;
}
.dot.is-on { width: 18px; background: #fff; }

/* ---------- 开服盒子 ---------- */
.serverbox {
  display: flex;
  flex-direction: column;
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(80, 60, 30, .06);
}

.serverbox-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-2);
}
.serverbox-head h2 {
  position: relative;
  padding-left: 12px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .4px;
}
.serverbox-head h2::before {
  content: "";
  position: absolute;
  left: 0; top: 3px; bottom: 3px;
  width: 4px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--red-l), var(--red-d));
}
.serverbox-head a { font-size: 12px; color: var(--ink-3); }
.serverbox-head a:hover { color: var(--red); }

.serverbox-list { flex: 1; }
.serverbox-list li {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line-2);
  font-size: 13px;
}
.serverbox-list li:last-child { border-bottom: 0; }
.serverbox-time { flex: none; width: 42px; color: var(--red); font-weight: 700; font-variant-numeric: tabular-nums; }
.serverbox-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink);
}
.serverbox-name:hover { color: var(--red); }
.serverbox-tag { flex: none; font-size: 11px; color: var(--ink-3); }

.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--red-l), var(--red-d));
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .5px;
  box-shadow: 0 6px 16px rgba(176, 29, 34, .22);
}
.btn-primary:hover { filter: brightness(1.06); }
.btn-block { margin-top: 12px; }

/* ---------- 区块 ---------- */
.section { padding: 34px 0; }
.section--alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section--text { padding: 40px 0 48px; }

.section-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.section-head h2 {
  position: relative;
  padding-left: 13px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: .5px;
}
.section-head h2::before {
  content: "";
  position: absolute;
  left: 0; top: 4px; bottom: 4px;
  width: 4px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--red-l), var(--red-d));
}
.head-sub { font-size: 12px; color: var(--ink-3); }
.more { margin-left: auto; font-size: 13px; color: var(--ink-3); }
.more:hover { color: var(--red); }

.edition-tabs { display: flex; gap: 6px; margin-left: 6px; }
.edition-tabs a {
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 13px;
  color: var(--ink-2);
  transition: all .18s;
}
.edition-tabs a:hover { border-color: #e3c9b6; color: var(--red); }
.edition-tabs a.on {
  background: linear-gradient(135deg, var(--red-l), var(--red-d));
  border-color: transparent;
  color: #fff;
  font-weight: 600;
}

/* ---------- 游戏网格 ---------- */
.game-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}
.game-grid--6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

.game-card {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  transition: transform .18s, box-shadow .18s, border-color .18s;
  height: 100%;
}
.game-card:hover {
  transform: translateY(-3px);
  border-color: #efd9c8;
  box-shadow: 0 12px 26px rgba(80, 60, 30, .12);
}

.card-thumb {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: #f1ece1;
}
.card-thumb img { width: 100%; height: 100%; object-fit: cover; }

.discount {
  position: absolute;
  left: 6px; top: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--red-l), var(--red-d));
  color: #fff;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  box-shadow: 0 3px 8px rgba(176, 29, 34, .28);
}

.discount--static {
  position: static;
  margin: 0;
  align-self: flex-start;
}

.card-name {
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card-meta { font-size: 11px; color: var(--ink-3); }
.card-btn {
  margin-top: 2px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: #fdf2f1;
  color: var(--red);
  font-size: 12px;
  font-weight: 600;
  transition: background .18s, color .18s;
}
.game-card:hover .card-btn { background: var(--red); color: #fff; }

/* ---------- 人气榜 + 预告 ---------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 22px;
  align-items: start;
}

.ranklist {
  padding: 4px 16px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--line);
}

.rankrow {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 11px 0;
  border-bottom: 1px dashed var(--line-2);
}
.rankrow:last-child { border-bottom: 0; }
.rankrow > img {
  width: 52px; height: 52px;
  border-radius: 9px;
  object-fit: cover;
  background: #f1ece1;
  flex: none;
}

.ranknum {
  flex: none;
  width: 26px;
  text-align: center;
  font-size: 16px;
  font-weight: 800;
  color: #c0b6a3;
  font-variant-numeric: tabular-nums;
}
.ranknum.top { color: var(--red); font-size: 19px; }

.rankinfo { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.rankinfo strong {
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rankinfo small { font-size: 11px; color: var(--ink-3); }

.rank-dl {
  margin-left: auto;
  font-size: 12px;
  color: var(--ink-3);
  white-space: nowrap;
}
.rank-enter {
  flex: none;
  padding: 4px 12px;
  border-radius: 6px;
  border: 1px solid #f0c9c6;
  color: var(--red);
  font-size: 12px;
  transition: all .18s;
}
.rankrow:hover .rank-enter { background: var(--red); border-color: var(--red); color: #fff; }

.preview-list {
  padding: 6px 16px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--line);
}
.preview-list li { border-bottom: 1px dashed var(--line-2); }
.preview-list li:last-child { border-bottom: 0; }
.preview-list a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 0;
}
.preview-list img {
  width: 56px; height: 56px;
  border-radius: 9px;
  object-fit: cover;
  background: #f1ece1;
  flex: none;
}
.preview-list span { display: flex; flex-direction: column; min-width: 0; }
.preview-list strong {
  font-size: 13.5px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.preview-list small { font-size: 11px; color: var(--ink-3); }
.preview-list a:hover strong { color: var(--red); }

.side-note {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #fdf8ec;
  border: 1px solid #f2e4c8;
}
.side-note h3 { font-size: 15px; font-weight: 700; color: #8a6a12; margin-bottom: 6px; }
.side-note p { font-size: 12.5px; line-height: 1.8; color: #6b5f45; }

/* ---------- 文本区 ---------- */
.text-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px;
}
.text-grid h2 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
  padding-left: 10px;
  border-left: 3px solid var(--red);
}
.text-grid p {
  font-size: 13.5px;
  line-height: 1.95;
  color: var(--ink-2);
  margin-bottom: 8px;
}

.faq dt { font-size: 13.5px; font-weight: 600; margin-top: 10px; color: #3b342b; }
.faq dd { font-size: 13px; line-height: 1.85; color: var(--ink-2); margin-top: 3px; }

/* ---------- 页脚 ---------- */
.footer {
  background: #efece4;
  border-top: 1px solid #e5dfd1;
  padding: 30px 0 24px;
  color: var(--ink-3);
  font-size: 12px;
}
.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e2dbcb;
}
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand .logo-mark { width: 38px; height: 38px; font-size: 18px; border-radius: 9px; }
.footer-brand strong { display: block; font-size: 16px; color: var(--red); letter-spacing: .5px; }
.footer-brand p { font-size: 11px; color: var(--ink-3); }

.footer-nav { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-nav a { color: var(--ink-2); font-size: 13px; }
.footer-nav a:hover { color: var(--red); }

.footer-note { margin: 14px 0 12px; line-height: 1.9; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  align-items: center;
  justify-content: space-between;
}
.footer-icp a { color: var(--ink-2); }
.footer-icp a:hover { color: var(--red); }
.footer-icp .sep { margin: 0 8px; color: #c9c0ad; }

/* ---------- 响应式 ---------- */
@media (max-width: 1180px) {
  .game-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .game-grid--6 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .serverbox { padding: 14px 16px; }
  .serverbox-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 20px; }
  .split { grid-template-columns: minmax(0, 1fr); }
  .text-grid { gap: 26px; }
}

@media (max-width: 860px) {
  .topbar-inner {
    flex-wrap: wrap;
    height: auto;
    padding: 10px 0 0;
    gap: 10px;
  }
  .logo-text strong { font-size: 19px; }
  .search { margin-left: auto; }
  .search input { width: 150px; }
  .mainnav {
    order: 3;
    width: 100%;
    gap: 2px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: none;
  }
  .mainnav::-webkit-scrollbar { display: none; }
  .mainnav a { padding: 6px 10px; font-size: 14px; white-space: nowrap; }
  .game-grid, .game-grid--6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .slide-copy strong { font-size: 20px; }
}

@media (max-width: 640px) {
  .topstrip-links { display: none; }
  .search { display: none; }
  .container { padding: 0 12px; }
  .game-grid, .game-grid--6 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .slide { aspect-ratio: 4 / 3; }
  .slide-copy { left: 14px; right: 14px; bottom: 14px; gap: 8px; }
  .slide-copy strong { font-size: 16px; }
  .slide-btn { padding: 7px 14px; font-size: 12px; }
  .slide-tag { display: none; }
  .serverbox-list { grid-template-columns: minmax(0, 1fr); }
  .text-grid { grid-template-columns: minmax(0, 1fr); }
  .section { padding: 24px 0; }
  .section-head h2 { font-size: 19px; }
  .footer-top { flex-direction: column; align-items: flex-start; }
}

/* ==========================================================================
   内页：栏目 / 榜单 / 详情 / 错误页
   ========================================================================== */

.page { padding: 22px 0 46px; }

/* ---------- 面包屑 ---------- */
.crumb { font-size: 12px; color: var(--ink-3); margin-bottom: 14px; }
.crumb ol { display: flex; flex-wrap: wrap; gap: 6px; }
.crumb li + li::before { content: "/"; margin-right: 6px; color: #cfc6b5; }
.crumb a:hover { color: var(--red); }

/* ---------- 页头 ---------- */
.pagehead { margin-bottom: 16px; }
.pagehead h1 { font-size: 28px; font-weight: 800; letter-spacing: .5px; }
.pagehead p { margin-top: 8px; font-size: 13.5px; line-height: 1.9; color: var(--ink-2); max-width: 900px; }

/* ---------- 栏目 Tabs ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.tab {
  padding: 8px 18px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-2);
  font-size: 14px;
  transition: all .18s;
}
.tab:hover { border-color: #e3c9b6; color: var(--red); }
.tab.on {
  background: linear-gradient(135deg, var(--red-l), var(--red-d));
  border-color: transparent;
  color: #fff;
  font-weight: 600;
}

/* ---------- 筛选条 ---------- */
.filterbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  margin-bottom: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 13px;
  color: var(--ink-3);
}
.filterbar label { display: flex; align-items: center; gap: 8px; }
.filterbar select,
.filterbar input[type="search"] {
  height: 36px;
  padding: 0 12px;
  border: 1px solid #e6ddce;
  border-radius: 7px;
  background: #fbf8f2;
  color: var(--ink);
  font-size: 13px;
  min-width: 120px;
  outline: none;
}
.filterbar select:focus,
.filterbar input[type="search"]:focus { border-color: #dcbfa6; background: #fff; }
.filterbar-search { flex: 1; min-width: 200px; }
.filterbar-search input[type="search"] { width: 100%; }
.btn-search {
  height: 36px;
  padding: 0 22px;
  border: 0;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--red-l), var(--red-d));
  color: #fff;
  font-size: 13px;
  cursor: pointer;
}
.filter-note { margin: -4px 0 14px; font-size: 12px; color: var(--ink-3); }
.filter-note a { color: var(--red); }

/* ---------- 游戏列表行 ---------- */
.game-list { display: flex; flex-direction: column; gap: 12px; }

.game-row-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.game-row-card:hover {
  transform: translateY(-1px);
  border-color: #efd9c8;
  box-shadow: 0 10px 24px rgba(80, 60, 30, .10);
}

.row-thumb {
  width: 78px; height: 78px;
  border-radius: 10px;
  object-fit: cover;
  flex: none;
  background: #f1ece1;
}
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.row-name {
  font-size: 16px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.game-row-card:hover .row-name { color: var(--red); }
.row-meta { font-size: 12px; color: var(--ink-3); }
.row-welfare {
  font-size: 12.5px;
  color: #a8471b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-side { display: flex; align-items: center; gap: 12px; flex: none; }
.row-enter {
  padding: 8px 20px;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--red-l), var(--red-d));
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}

/* ---------- 分页 ---------- */
.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 26px 0 8px; }
.pager a,
.pager span {
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 13px;
  color: var(--ink-2);
}
.pager a:hover { border-color: #e3c9b6; color: var(--red); }
.pager .on {
  background: linear-gradient(135deg, var(--red-l), var(--red-d));
  border-color: transparent;
  color: #fff;
  font-weight: 700;
}
.pager .off { color: #c8bfae; }
.pager-info { text-align: center; font-size: 12px; color: var(--ink-3); }

/* ---------- 空态 / 错误页 ---------- */
.empty {
  padding: 56px 20px;
  text-align: center;
  background: #fff;
  border: 1px dashed #e2d8c6;
  border-radius: 12px;
}
.empty-code { font-size: 54px; font-weight: 800; line-height: 1; color: #efe7d8; }
.empty h1, .empty .empty-title { margin-top: 6px; font-size: 20px; font-weight: 700; }
.empty p { margin-top: 8px; font-size: 13.5px; color: var(--ink-3); }
.empty a { color: var(--red); }

/* ---------- 详情页 ---------- */
.detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
}

.detail-head {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(80, 60, 30, .06);
}
.detail-icon {
  width: 104px; height: 104px;
  border-radius: 14px;
  object-fit: cover;
  flex: none;
  background: #f1ece1;
  border: 1px solid #f4efe5;
}
.detail-title { min-width: 0; }
.detail-title h1 { font-size: 24px; font-weight: 800; line-height: 1.35; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; font-size: 12px; color: var(--ink-2); }
.detail-meta span {
  padding: 2px 10px;
  border-radius: 999px;
  background: #f8f3e9;
  border: 1px solid #efe6d4;
}
.detail-tag { margin-top: 6px; font-size: 13px; color: #a8471b; }

.detail-welfare {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #fdf8ec;
  border: 1px solid #f2e4c8;
  font-size: 13px;
  color: #7a5f16;
}
.detail-welfare .label {
  flex: none;
  padding: 2px 8px;
  border-radius: 5px;
  background: #f6e7c6;
  font-size: 11px;
}

.btn-download {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  height: 56px;
  margin-top: 14px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--red-l), var(--red-d));
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .5px;
  box-shadow: 0 10px 24px rgba(176, 29, 34, .22);
}
.btn-download:hover { filter: brightness(1.05); }
.btn-download small { font-size: 11px; font-weight: 400; opacity: .88; letter-spacing: 0; }
.btn-download--off {
  background: #e9e2d6;
  color: #8b8175;
  box-shadow: none;
  font-weight: 500;
}
.cta-note { margin-top: 8px; text-align: center; font-size: 11.5px; color: var(--ink-3); }

.detail-sec { margin-top: 26px; }
.detail-sec h2 {
  margin-bottom: 12px;
  padding-left: 10px;
  font-size: 18px;
  font-weight: 700;
  border-left: 3px solid var(--red);
}

.shots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; align-items: start; }
.shots a { display: block; }
.shots img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #f1ece1;
}

.detail-video {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #000;
}

.prose {
  padding: 16px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.95;
  word-break: break-word;
}
.prose img { border-radius: 8px; margin: 8px 0; }
.prose p { margin-bottom: 8px; }

.gift-list { display: flex; flex-direction: column; gap: 10px; }
.gift-item {
  padding: 14px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--line);
}
.gift-head { display: flex; align-items: center; gap: 10px; }
.gift-head strong { font-size: 14px; }
.gift-remain { margin-left: auto; font-size: 11.5px; color: var(--ink-3); }
.gift-desc { margin-top: 6px; font-size: 12.5px; color: var(--ink-2); }
.gift-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; }
.gift-code {
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px dashed #e0c9a8;
  background: #fdf8ec;
  color: #a8471b;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  letter-spacing: 1px;
}
.btn-copy {
  padding: 5px 14px;
  border: 1px solid #e6ddce;
  border-radius: 6px;
  background: #fff;
  font-size: 12px;
  cursor: pointer;
  transition: all .18s;
}
.btn-copy:hover { background: var(--red); border-color: var(--red); color: #fff; }
.gift-time { font-size: 11.5px; color: var(--ink-3); }

.info-list {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
}
.info-list li {
  display: flex;
  gap: 10px;
  padding: 11px 14px;
  font-size: 13px;
  border-bottom: 1px solid #f5f0e7;
}
.info-list li:last-child { border-bottom: 0; }
.info-label { flex: none; width: 80px; color: var(--ink-3); }
.info-value { color: var(--ink); word-break: break-word; }

.detail-side { display: flex; flex-direction: column; gap: 18px; }
.detail-side .detail-sec { margin-top: 0; }
.detail-note { font-size: 12px; line-height: 1.8; color: var(--ink-3); }
.data-note { margin-top: 18px; font-size: 12px; color: var(--ink-3); }

/* ---------- 复制提示 ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 40px;
  transform: translate(-50%, 12px);
  z-index: 90;
  padding: 9px 18px;
  border-radius: 999px;
  background: rgba(36, 31, 26, .92);
  color: #fff;
  font-size: 13px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .18);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.toast--show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1024px) {
  .detail { grid-template-columns: minmax(0, 1fr); }
  .shots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .page { padding: 16px 0 34px; }
  .pagehead h1 { font-size: 22px; }
  .game-row-card { gap: 12px; padding: 12px; }
  .row-thumb { width: 62px; height: 62px; }
  .row-name { font-size: 14.5px; }
  .row-side .row-enter { padding: 7px 12px; font-size: 12px; }
  .detail-head { gap: 12px; padding: 14px; }
  .detail-icon { width: 76px; height: 76px; }
  .detail-title h1 { font-size: 18px; }
  .shots { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
}

@media (min-width: 1100px) {
  .ranklist--page {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 26px;
  }
}

.row-date {
  font-size: 12px;
  color: var(--ink-3);
  white-space: nowrap;
}

@media (max-width: 640px) {
  .row-date { display: none; }
}

/* ==========================================================================
   首页：模块化布局（四个模块统一卡片框架）
   ========================================================================== */

/* ---------- 首屏 ---------- */
.hero-band {
  padding: 22px 0 26px;
  background: linear-gradient(180deg, #fdf7ee 0%, #f6f3ec 100%);
  border-bottom: 1px solid #efe6d4;
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 20px;
  align-items: stretch;
}
.hero-layout .slider { display: flex; min-height: 440px; }
.hero-layout .slides { flex: 1; height: 100%; }
.hero-layout .slide { height: 100%; aspect-ratio: auto; }

.open-panel {
  display: flex;
  flex-direction: column;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(80, 60, 30, .07);
}
.open-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px solid #f5f0e7;
}
.open-head h2 {
  position: relative;
  padding-left: 10px;
  font-size: 18px;
  font-weight: 800;
}
.open-head h2::before {
  content: "";
  position: absolute;
  left: 0; top: 3px; bottom: 3px;
  width: 4px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--red-l), var(--red-d));
}
.open-head a { font-size: 12px; color: var(--ink-3); }
.open-head a:hover { color: var(--red); }

.open-list { flex: 1; margin: 2px 0 10px; }
.open-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px dashed #f6f1e8;
  font-size: 13px;
}
.open-list li:last-child { border-bottom: 0; }
.open-time {
  flex: none;
  width: 40px;
  color: var(--red);
  font-weight: 700;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}
.open-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.open-name:hover { color: var(--red); }
.open-tag { flex: none; font-size: 11px; color: var(--ink-3); }

.open-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--red-l), var(--red-d));
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: .5px;
  box-shadow: 0 6px 16px rgba(176, 29, 34, .2);
}
.open-btn:hover { filter: brightness(1.06); }

/* ---------- 统一模块框架 ---------- */
.mod {
  margin-top: 22px;
  padding: 22px 24px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(80, 60, 30, .05);
}
.mod--last { margin-bottom: 46px; }

.mod-head {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  padding-bottom: 14px;
  margin-bottom: 6px;
  border-bottom: 1px solid #f3ede2;
}
.mod-title { display: flex; flex-direction: column; gap: 1px; }
.kicker {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 3px;
  color: #c0954f;
}
.mod-head h2 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: .5px;
  line-height: 1.25;
}
.mod-head .more { margin-left: auto; margin-bottom: 4px; }
.mod-head .head-sub { margin-bottom: 5px; }
.mod-head .edition-tabs { margin-left: 6px; margin-bottom: 2px; }

/* ---------- 统一卡片条目（精品 / 精选） ---------- */
.g-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2px 16px;
}

.g-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px;
  border-radius: 10px;
  transition: background .18s;
  min-width: 0;
}
.g-item:hover { background: #fdf7f0; }

.g-icon {
  width: 56px; height: 56px;
  border-radius: 9px;
  object-fit: cover;
  background: #f1ece1;
  border: 1px solid #f4eee3;
  flex: none;
}

.g-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.g-body strong {
  font-size: 13.5px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.g-item:hover .g-body strong,
.rank-row:hover .g-body strong,
.preview-row:hover .g-body strong { color: var(--red); }
.g-body small {
  font-size: 11px;
  color: var(--ink-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.g-go { flex: none; font-size: 17px; color: #cfc4b0; }

.discount--sm {
  position: static;
  margin: 0;
  flex: none;
  padding: 2px 7px;
  font-size: 10.5px;
}

/* ---------- 人气榜：一行一个 ---------- */
.rank-rows li { border-bottom: 1px dashed #f4efe5; }
.rank-rows li:last-child { border-bottom: 0; }

.rank-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 9px;
  border-radius: 10px;
  transition: background .18s;
}
.rank-row:hover { background: #fdf7f0; }

.rank-no {
  flex: none;
  width: 26px;
  text-align: center;
  font-size: 15px;
  font-weight: 800;
  color: #c0b6a3;
  font-variant-numeric: tabular-nums;
}
.rank-no.top { color: var(--red); font-size: 18px; }

.rank-dl { margin-left: auto; flex: none; font-size: 12px; color: var(--ink-3); }

/* ---------- 新服预告：一行一个 ---------- */
.preview-rows li { border-bottom: 1px dashed #f4efe5; }
.preview-rows li:last-child { border-bottom: 0; }

.preview-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 9px;
  border-radius: 10px;
  transition: background .18s;
}
.preview-row:hover { background: #fdf7f0; }
.preview-date { margin-left: auto; flex: none; font-size: 12px; color: #a8471b; }

@media (max-width: 1180px) {
  .g-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .g-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1024px) {
  .hero-layout { grid-template-columns: minmax(0, 1fr); }
  .hero-layout .slider { min-height: 0; }
  .hero-layout .slides { height: auto; aspect-ratio: 16 / 9; }
}

@media (max-width: 860px) {
  .mod { padding: 18px 16px 14px; }
  .mod-head { flex-wrap: wrap; gap: 8px 12px; }
  .mod-head .edition-tabs {
    order: 3;
    width: 100%;
    margin-left: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .mod-head .edition-tabs::-webkit-scrollbar { display: none; }
  .mod-head .head-sub { display: none; }
  .mod-head h2 { font-size: 20px; }
}

@media (max-width: 640px) {
  .hero-band { padding: 14px 0 18px; }
  .mod { margin-top: 16px; border-radius: 12px; padding: 16px 12px 10px; }
  .g-grid { gap: 0 8px; }
  .g-icon { width: 48px; height: 48px; border-radius: 8px; }
  .g-item { gap: 8px; padding: 8px 6px; }
  .g-body strong { font-size: 12.5px; }
  .rank-dl { display: none; }
  .preview-date { font-size: 11px; }
}

/* ---------- 图标卡片（精品 / 精选） ---------- */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px 14px;
}

.tile {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 9px;
  background: #fff;
  border: 1px solid #f1eadf;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(80, 60, 30, .05);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  height: 100%;
}
.tile:hover {
  transform: translateY(-4px);
  border-color: #eed9c7;
  box-shadow: 0 14px 28px rgba(80, 60, 30, .13);
}

.tile-cover {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  border-radius: 9px;
  overflow: hidden;
  background: #f1ece1;
}
.tile-cover img { width: 100%; height: 100%; object-fit: cover; }
.tile-cover .discount { position: absolute; left: 6px; top: 6px; }

.tile-name {
  font-size: 13.5px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tile:hover .tile-name { color: var(--red); }
.tile-meta {
  font-size: 11px;
  color: var(--ink-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tile-btn {
  margin-top: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  border-radius: 7px;
  background: #fdeeee;
  color: var(--red);
  font-size: 12px;
  font-weight: 600;
  transition: background .18s, color .18s;
}
.tile:hover .tile-btn { background: var(--red); color: #fff; }

/* ---------- 行内「进入」按钮 ---------- */
.enter {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  padding: 0 14px;
  border-radius: 7px;
  border: 1px solid #f3d3cf;
  background: #fff;
  color: var(--red);
  font-size: 12px;
  font-weight: 600;
  transition: background .18s, color .18s, border-color .18s;
}
.rank-row:hover .enter,
.preview-row:hover .enter,
.open-list li:hover .enter {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}
.enter--sm { height: 24px; padding: 0 9px; font-size: 11px; }

/* ---------- 今日开服序号 ---------- */
.open-no {
  flex: none;
  width: 16px;
  text-align: center;
  font-size: 11.5px;
  font-weight: 700;
  color: #c0b6a3;
  font-variant-numeric: tabular-nums;
}
.open-no.top { color: var(--red); }
.open-list li { gap: 7px; }
.open-time { width: 36px; font-size: 12px; }

@media (max-width: 1180px) {
  .tile-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .tile-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .tile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 10px; }
  .tile { padding: 7px; }
  .tile-name { font-size: 12.5px; }
  .enter { height: 26px; padding: 0 10px; }
  .enter--sm { height: 22px; padding: 0 7px; font-size: 10.5px; }
}

/* 人气榜 / 新服预告：图标放大 + 统一序号 */
.rank-row .g-icon,
.preview-row .g-icon { width: 64px; height: 64px; border-radius: 10px; }

.rank-row,
.preview-row { gap: 13px; padding: 11px 9px; }

.preview-no { width: 26px; }

@media (max-width: 640px) {
  .rank-row .g-icon,
  .preview-row .g-icon { width: 52px; height: 52px; border-radius: 8px; }
  .preview-no { width: 20px; }
}
