/* =====================================================
   名扬海外·传奇官网 样式 —— 暗黑史诗游戏风
   ===================================================== */

:root {
  /* 色板 */
  --bg-0: #08080d;
  --bg-1: #0e0e16;
  --bg-2: #14141f;
  --bg-3: #1b1b28;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(232, 185, 90, 0.35);

  --gold: #e8b95a;
  --gold-light: #f7d998;
  --gold-dark: #a8792a;
  --red: #e8483c;
  --red-light: #ff6b5e;

  --text: #ece7db;
  --text-dim: #9a94a6;
  --text-faint: #6f6a7c;

  /* 字体 */
  --font: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", system-ui, sans-serif;

  /* 阴影 */
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  --shadow-gold: 0 6px 22px rgba(232, 185, 90, 0.25);

  /* 圆角 */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg-0);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* 金色渐变文字 */
.gold-text {
  background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold) 55%, var(--gold-dark) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ============ 顶部导航 ============ */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(8, 8, 13, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  transition: background 0.3s, box-shadow 0.3s;
}
.topbar.scrolled {
  background: rgba(8, 8, 13, 0.96);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}
.topbar-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
  height: 68px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.brand-logo {
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(145deg, var(--gold-light), var(--gold) 55%, var(--gold-dark));
  color: #1a1206;
  font-size: 22px;
  font-weight: 800;
  border-radius: 8px;
  box-shadow: var(--shadow-gold);
  font-family: "STKaiti", "KaiTi", serif;
  overflow: hidden;
}
.brand-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong {
  font-size: 20px;
  letter-spacing: 1px;
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.brand-text em {
  font-size: 11px; color: var(--text-dim); font-style: normal; letter-spacing: 2px;
}

.nav {
  display: flex;
  gap: 6px;
  margin-left: auto;
}
.nav-link {
  position: relative;
  padding: 8px 16px;
  font-size: 15px;
  color: var(--text-dim);
  border-radius: 6px;
  transition: color 0.2s;
  letter-spacing: 1px;
}
.nav-link:hover { color: var(--text); }
.nav-link.active { color: var(--gold); }
.nav-link.active::after {
  content: "";
  position: absolute;
  left: 16px; right: 16px; bottom: 2px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.official-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 6px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: border-color 0.2s, transform 0.2s;
}
.official-chip:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.official-avatar {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: linear-gradient(145deg, #3a3f5c, #23263a);
  color: var(--gold);
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}
.official-meta { display: flex; flex-direction: column; line-height: 1.1; }
.official-name { font-size: 12px; color: var(--text); }
.official-badge {
  font-size: 10px;
  color: #fff;
  background: linear-gradient(135deg, var(--red), #c9302a);
  padding: 1px 6px;
  border-radius: 4px;
  width: fit-content;
  letter-spacing: 1px;
}

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--gold-light), var(--gold) 45%, var(--gold-dark));
  color: #241604;
  font-weight: 700;
  font-size: 14px;
  border-radius: 8px;
  letter-spacing: 1px;
  box-shadow: var(--shadow-gold);
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn-download:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(232, 185, 90, 0.4); }

.btn-recharge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--red-light), var(--red) 50%, #c9302a);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  border-radius: 8px;
  letter-spacing: 1px;
  cursor: pointer;
  border: none;
  box-shadow: 0 6px 20px rgba(232, 72, 60, 0.3);
  transition: transform 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}
.btn-recharge:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(232, 72, 60, 0.45); }

/* ============ 用户登录 / 注册 ============ */
.btn-login {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  background: rgba(232, 185, 90, 0.08);
  border: 1px solid var(--line-strong);
  color: var(--gold-light);
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  letter-spacing: 1px;
  transition: 0.2s;
  white-space: nowrap;
}
.btn-login:hover { background: rgba(232, 185, 90, 0.18); transform: translateY(-1px); }

.user-area { position: relative; }
.user-chip {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 10px 4px 4px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  transition: 0.2s;
}
.user-chip:hover { border-color: var(--line-strong); }
.user-chip .user-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(145deg, #4a4f6e, #23263a);
  color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; flex-shrink: 0; overflow: hidden;
}
.user-chip .user-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.user-chip .user-name { font-size: 13px; color: var(--text); max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-dropdown {
  position: absolute; top: 44px; right: 0;
  min-width: 150px;
  background: var(--bg-1);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 6px;
  display: none;
  z-index: 110;
}
.user-dropdown.show { display: block; }
.user-dropdown a, .user-dropdown button {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 10px 12px;
  background: none; border: none; color: var(--text);
  font-size: 13px; cursor: pointer; border-radius: 6px; text-align: left;
  font-family: var(--font);
}
.user-dropdown a:hover, .user-dropdown button:hover { background: var(--bg-2); color: var(--gold); }

/* 认证表单 */
.auth-tabs { display: flex; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.auth-tab {
  flex: 1; text-align: center; padding: 12px;
  background: none; border: none; color: var(--text-dim);
  font-size: 15px; cursor: pointer; letter-spacing: 2px;
  border-bottom: 2px solid transparent;
  font-family: var(--font);
}
.auth-tab.active { color: var(--gold); border-bottom-color: var(--gold); font-weight: 700; }
.auth-switch { text-align: center; margin-top: 14px; font-size: 13px; color: var(--text-dim); }
.auth-switch a { color: var(--gold); cursor: pointer; }
.auth-err { color: var(--red); font-size: 13px; margin-top: 8px; min-height: 18px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 24px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: 0.3s;
}

/* ============ Hero Banner ============ */
.hero {
  position: relative;
  height: 100vh;
  min-height: 560px;
  max-height: 820px;
  overflow: hidden;
  background: var(--bg-0);
}
.hero-slider { position: absolute; inset: 0; }
.hero-slide {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 0.9s ease, transform 6s ease;
}
.hero-slide.active { opacity: 1; transform: scale(1); }
.hero-slide::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(8,8,13,0.32) 0%, rgba(8,8,13,0.08) 40%, rgba(8,8,13,0.42) 75%, var(--bg-0) 100%);
}
.hero-slide::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0) 42%, rgba(8,8,13,0.38) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 24px;
}
.hero-title {
  font-size: clamp(44px, 8vw, 96px);
  font-weight: 900;
  letter-spacing: 6px;
  line-height: 1.1;
  background: linear-gradient(180deg, #fff6e0 0%, var(--gold-light) 40%, var(--gold) 70%, var(--gold-dark) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 20px rgba(232, 185, 90, 0.35));
  font-family: "STKaiti", "KaiTi", "Microsoft YaHei", serif;
}
.hero-subtitle {
  margin-top: 16px;
  font-size: clamp(15px, 2.4vw, 22px);
  color: var(--text);
  letter-spacing: 5px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}
.hero-btns { margin-top: 40px; display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; }

.btn-gold {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 15px 40px;
  background: linear-gradient(135deg, var(--gold-light), var(--gold) 45%, var(--gold-dark));
  color: #241604;
  font-weight: 800;
  font-size: 16px;
  border-radius: 10px;
  letter-spacing: 2px;
  box-shadow: var(--shadow-gold);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  border: none;
}
.btn-gold:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(232, 185, 90, 0.45); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 15px 40px;
  border: 1px solid var(--line-strong);
  color: var(--gold-light);
  font-weight: 700;
  font-size: 16px;
  border-radius: 10px;
  letter-spacing: 2px;
  background: rgba(232, 185, 90, 0.06);
  backdrop-filter: blur(4px);
  transition: 0.2s;
}
.btn-ghost:hover { background: rgba(232, 185, 90, 0.16); transform: translateY(-3px); }

.hero-dots {
  position: absolute;
  bottom: 26px;
  left: 0; right: 0;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 10px;
}
.hero-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: 0.3s;
}
.hero-dot.active { background: var(--gold); width: 28px; border-radius: 6px; }

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  color: #fff;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
  transition: 0.2s;
  user-select: none;
}
.hero-arrow:hover { background: rgba(232, 185, 90, 0.25); border-color: var(--line-strong); }
.hero-arrow-left { left: 20px; }
.hero-arrow-right { right: 20px; }

/* ============ 公告滚动条 ============ */
.notice-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-1);
  border-bottom: 1px solid var(--line);
  padding: 0 20px;
  height: 44px;
  overflow: hidden;
}
.notice-tag {
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--red), #c9302a);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 5px;
  letter-spacing: 2px;
}
.notice-marquee { flex: 1; overflow: hidden; }
.notice-track {
  display: inline-block;
  white-space: nowrap;
  animation: marquee 22s linear infinite;
  color: var(--gold-light);
  font-size: 14px;
}
.notice-track span { margin-right: 48px; }
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ============ 页面主体 ============ */
.page { max-width: 1240px; margin: 0 auto; padding: 0 20px; }

.section { padding: 78px 0 10px; }
.section-head { text-align: center; margin-bottom: 44px; }
.section-title {
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 800;
  letter-spacing: 4px;
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  position: relative;
  display: inline-block;
  padding-bottom: 14px;
}
.section-title::after {
  content: "";
  position: absolute;
  left: 50%; bottom: 0;
  transform: translateX(-50%);
  width: 60px; height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  border-radius: 2px;
}
.section-sub { margin-top: 12px; color: var(--text-dim); letter-spacing: 3px; font-size: 14px; }

/* ============ 游戏特色 ============ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.feature-card {
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 34px 22px;
  text-align: center;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.feature-card:hover {
  transform: translateY(-6px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}
.feature-icon {
  width: 64px; height: 64px;
  margin: 0 auto 18px;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px;
  background: radial-gradient(circle, rgba(232,185,90,0.18), rgba(232,185,90,0.04));
  border: 1px solid var(--line-strong);
  border-radius: 16px;
}
.feature-card h3 { font-size: 18px; letter-spacing: 2px; color: var(--gold-light); margin-bottom: 8px; }
.feature-card p { font-size: 13px; color: var(--text-dim); }

/* ============ 新闻 / 攻略卡片 ============ */
.news-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.guides-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.news-card, .guide-card {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.news-card:hover, .guide-card:hover {
  transform: translateY(-6px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}
.news-cover, .guide-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-3);
}
.news-cover img, .guide-cover img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}
.news-card:hover .news-cover img, .guide-card:hover .guide-cover img { transform: scale(1.08); }
.badge-tag {
  position: absolute;
  top: 12px; left: 12px;
  background: linear-gradient(135deg, var(--red), #c9302a);
  color: #fff;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 5px;
  letter-spacing: 1px;
}
.news-body, .guide-body { padding: 16px 18px 20px; }
.news-body h3, .guide-body h3 {
  font-size: 16px;
  line-height: 1.45;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--text);
}
.news-summary, .guide-summary {
  font-size: 13px;
  color: var(--text-dim);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  font-size: 12px;
  color: var(--text-faint);
}

/* ============ 论坛 ============ */
.forum-section { background: transparent; }
.forum-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 24px;
  align-items: start;
}

.forum-side { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 88px; }

.official-card {
  background: linear-gradient(180deg, #1d1a12, var(--bg-2));
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  padding: 22px;
}
.official-card-head { display: flex; align-items: center; gap: 14px; }
.official-avatar-lg {
  width: 56px; height: 56px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(145deg, #4a4f6e, #23263a);
  color: var(--gold);
  font-size: 22px;
  font-weight: 800;
  border: 2px solid var(--line-strong);
  flex-shrink: 0;
}
.official-info { display: flex; flex-direction: column; gap: 4px; }
.official-name-row { display: flex; align-items: center; gap: 8px; }
.official-name-row strong { font-size: 17px; letter-spacing: 1px; }
.official-id { font-size: 12px; color: var(--text-faint); }
.official-intro { margin: 16px 0; font-size: 13px; color: var(--text-dim); line-height: 1.7; }
.btn-block { width: 100%; justify-content: center; padding: 13px; }

.category-card {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 18px;
}
.category-title { font-size: 15px; letter-spacing: 2px; color: var(--gold-light); margin-bottom: 12px; }
.category-list { display: flex; flex-direction: column; gap: 4px; }
.category-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-dim);
  transition: 0.2s;
}
.category-item:hover { background: var(--bg-2); color: var(--text); }
.category-item.active { background: rgba(232, 185, 90, 0.12); color: var(--gold); }
.category-item .cat-name { display: flex; align-items: center; gap: 8px; }
.category-item .cat-count { font-size: 12px; color: var(--text-faint); }

.forum-main { min-width: 0; }
.forum-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}
.forum-tabs { display: flex; gap: 6px; }
.forum-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0 14px;
  flex: 1;
  min-width: 200px;
  max-width: 360px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.forum-search:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(232, 185, 90, 0.15);
}
.forum-search svg { color: var(--gold); flex-shrink: 0; }
.forum-search input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 14px;
  padding: 10px 0;
}
.forum-search input::placeholder { color: var(--text-faint); }
.forum-search-clear {
  background: none;
  border: none;
  color: var(--text-faint);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 2px;
  flex-shrink: 0;
  display: none;
}
.forum-search-clear:hover { color: var(--gold); }
.forum-tab {
  padding: 8px 18px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-dim);
  background: var(--bg-1);
  border: 1px solid var(--line);
  transition: 0.2s;
}
.forum-tab.active { color: #241604; background: linear-gradient(135deg, var(--gold-light), var(--gold)); font-weight: 700; border-color: transparent; }
.btn-sm { padding: 9px 20px; font-size: 14px; border-radius: 8px; }

.post-list { display: flex; flex-direction: column; gap: 12px; }
.post-item {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 16px 18px;
  cursor: pointer;
  transition: 0.2s;
}
.post-item:hover { border-color: var(--line-strong); background: var(--bg-2); }
.post-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-3);
  color: var(--text-dim);
  font-size: 18px;
  flex-shrink: 0;
}
.post-avatar.official { background: linear-gradient(145deg, #4a4f6e, #23263a); color: var(--gold); }
.post-main { flex: 1; min-width: 0; }
.post-title-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.post-title { font-size: 15px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.post-tag {
  font-size: 10px;
  padding: 1px 7px;
  border-radius: 4px;
  flex-shrink: 0;
}
.post-tag.official { background: linear-gradient(135deg, var(--red), #c9302a); color: #fff; letter-spacing: 1px; }
.post-tag.top { background: rgba(232, 185, 90, 0.18); color: var(--gold); border: 1px solid var(--line-strong); }
.post-tag.essence { background: rgba(232, 185, 90, 0.18); color: var(--gold-light); }
.post-meta { margin-top: 6px; font-size: 12px; color: var(--text-faint); display: flex; gap: 16px; }
.post-stats { text-align: right; flex-shrink: 0; }
.post-stats .views { font-size: 12px; color: var(--text-faint); }
.post-stats .replies {
  display: inline-block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--gold);
  background: rgba(232, 185, 90, 0.12);
  padding: 2px 10px;
  border-radius: 999px;
}
.post-empty { text-align: center; padding: 60px 20px; color: var(--text-faint); }

/* ============ 下载中心 ============ */
.download-section { padding-bottom: 60px; }
.download-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.download-card {
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 30px 26px;
  text-align: center;
  position: relative;
  transition: 0.25s;
  overflow: hidden;
}
.download-card:hover { border-color: var(--line-strong); transform: translateY(-5px); box-shadow: var(--shadow); }
.download-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.dl-platform { font-size: 13px; color: var(--text-faint); letter-spacing: 2px; }
.dl-name { font-size: 22px; font-weight: 800; letter-spacing: 2px; margin: 10px 0 4px; }
.dl-version { font-size: 13px; color: var(--gold); }
.dl-size { font-size: 13px; color: var(--text-dim); margin-top: 2px; }
.dl-desc { font-size: 13px; color: var(--text-dim); margin: 16px 0 22px; min-height: 40px; }
.dl-count { font-size: 12px; color: var(--text-faint); margin-top: 12px; }
.download-tip { text-align: center; margin-top: 30px; font-size: 12px; color: var(--text-faint); }

/* ============ 页脚 ============ */
.footer {
  margin-top: 40px;
  background: var(--bg-1);
  border-top: 1px solid var(--line);
}
.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 44px 20px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 30px;
}
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand strong { font-size: 20px; letter-spacing: 2px; color: var(--gold); }
.footer-info p { font-size: 13px; color: var(--text-dim); margin-bottom: 6px; }
.footer-icp { color: var(--text-faint) !important; }
.footer-warning {
  font-size: 12px;
  color: var(--text-faint);
  line-height: 1.9;
  border-left: 1px solid var(--line);
  padding-left: 20px;
}

/* ============ 弹窗 ============ */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
}
.modal-mask.show { display: flex; }
.modal {
  background: var(--bg-1);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  width: 100%;
  max-width: 720px;
  max-height: 86vh;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow);
  animation: modalIn 0.25s ease;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(20px) scale(0.98); } to { opacity: 1; transform: none; } }
.modal-close {
  position: absolute;
  top: 12px; right: 14px;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--bg-3);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 20px;
  cursor: pointer;
  z-index: 3;
  line-height: 1;
}
.modal-close:hover { background: var(--red); border-color: transparent; color: #fff; }
.modal-body { padding: 30px; overflow-y: auto; max-height: 86vh; }

.article h1 { font-size: 24px; line-height: 1.4; margin-bottom: 12px; color: var(--gold-light); }
.article .article-meta { font-size: 13px; color: var(--text-faint); margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.article .article-content { font-size: 15px; line-height: 1.9; color: var(--text); }
.article .article-content p { margin-bottom: 14px; }

/* 发帖/回复表单 */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; color: var(--text-dim); margin-bottom: 6px; }
.form-input, .form-textarea, .form-select {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  padding: 11px 14px;
  font-size: 14px;
  font-family: var(--font);
  transition: border-color 0.2s;
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none;
  border-color: var(--line-strong);
}
.form-textarea { min-height: 140px; resize: vertical; }
.form-select option { background: var(--bg-2); }

/* 帖子详情回复 */
.post-detail h2 { font-size: 20px; line-height: 1.5; margin-bottom: 10px; color: var(--gold-light); }
.post-detail .pd-meta { font-size: 13px; color: var(--text-faint); margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.post-detail .pd-content { font-size: 15px; line-height: 1.9; white-space: pre-wrap; word-break: break-word; }
.reply-list { margin-top: 22px; }
.reply-list h4 { font-size: 15px; color: var(--gold-light); margin-bottom: 14px; }
.reply-item { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.reply-item .post-avatar { width: 38px; height: 38px; font-size: 15px; }
.reply-body { flex: 1; min-width: 0; }
.reply-head { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-dim); margin-bottom: 6px; }
.reply-content { font-size: 14px; line-height: 1.8; white-space: pre-wrap; word-break: break-word; }
.reply-time { font-size: 12px; color: var(--text-faint); margin-left: auto; }

/* ============ 响应式 ============ */
@media (max-width: 1024px) {
  .features-grid, .news-grid { grid-template-columns: repeat(2, 1fr); }
  .guides-grid, .download-grid { grid-template-columns: repeat(2, 1fr); }
  .forum-layout { grid-template-columns: 1fr; }
  .forum-side { position: static; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .topbar-inner { height: 60px; gap: 12px; }
  .nav {
    position: fixed;
    top: 60px; left: 0; right: 0;
    flex-direction: column;
    background: rgba(8, 8, 13, 0.98);
    padding: 10px 20px 20px;
    border-bottom: 1px solid var(--line);
    display: none;
    gap: 2px;
  }
  .nav.open { display: flex; }
  .nav-link { padding: 14px 8px; font-size: 16px; border-bottom: 1px solid var(--line); }
  .nav-toggle { display: flex; }
  .official-chip { display: none; }
  .btn-download { padding: 8px 14px; font-size: 13px; }
  .btn-recharge { padding: 8px 14px; font-size: 13px; }
  .btn-login { padding: 8px 12px; font-size: 13px; }
  .user-chip .user-name { display: none; }

  .hero { min-height: 460px; max-height: 600px; }
  .hero-btns { margin-top: 28px; gap: 12px; }
  .btn-gold, .btn-ghost { padding: 12px 26px; font-size: 14px; }
  .hero-arrow { display: none; }

  .features-grid, .news-grid, .guides-grid, .download-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .section { padding: 56px 0 4px; }
  .section-head { margin-bottom: 30px; }

  .footer-inner { grid-template-columns: 1fr; gap: 20px; }
  .footer-warning { border-left: none; padding-left: 0; }

  .modal-body { padding: 22px; }
  .forum-toolbar { flex-direction: column; align-items: stretch; }
  .forum-tabs { overflow-x: auto; }
  .forum-search { max-width: none; }
}

@media (max-width: 480px) {
  .features-grid, .news-grid, .guides-grid, .download-grid { grid-template-columns: 1fr; }
  .brand-text em { display: none; }
  .brand-text strong { font-size: 15px; letter-spacing: 0; }
  .hero-title { letter-spacing: 3px; }
  .topbar-actions { gap: 6px; }
  .topbar-inner { gap: 8px; padding: 0 12px; }
  .btn-recharge span, .btn-download span { display: none; }
  .btn-recharge, .btn-download { padding: 9px 11px; }
  .btn-login { padding: 8px 11px; font-size: 12px; }
}

/* ============ 首页论坛精华推荐 ============ */
.section-head-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  gap: 20px;
}
.section-head-between .section-title { text-align: left; }
.section-head-between .section-sub { text-align: left; }
.forum-preview { padding-bottom: 40px; }

.essence-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}
.essence-card {
  position: relative;
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
  overflow: hidden;
}
.essence-card:hover { border-color: var(--line-strong); transform: translateY(-5px); box-shadow: var(--shadow); }
.essence-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.essence-badge {
  align-self: flex-start;
  font-size: 12px;
  color: #241604;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  padding: 3px 12px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 14px;
}
.essence-card h3 {
  font-size: 17px;
  letter-spacing: 1px;
  margin-bottom: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.essence-summary {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.7;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 16px;
}
.essence-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-faint);
  border-top: 1px solid var(--line);
  padding-top: 14px;
  flex-wrap: wrap;
  gap: 8px;
}
.essence-author { display: flex; align-items: center; gap: 6px; color: var(--text-dim); }

.preview-latest {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.preview-latest-head {
  padding: 16px 22px;
  font-size: 15px;
  letter-spacing: 2px;
  color: var(--gold-light);
  border-bottom: 1px solid var(--line);
}
.preview-latest-list { list-style: none; }
.preview-latest-list li { border-bottom: 1px solid var(--line); }
.preview-latest-list li:last-child { border-bottom: none; }
.preview-latest-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 22px;
  text-decoration: none;
  color: inherit;
  transition: 0.2s;
  flex-wrap: wrap;
}
.preview-latest-list a:hover { background: var(--bg-2); }
.pl-title { font-size: 14px; color: var(--text); flex: 1; min-width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-meta { font-size: 12px; color: var(--text-faint); flex-shrink: 0; }

/* ============ 论坛大页面 ============ */
.forum-hero {
  padding: 70px 20px 50px;
  text-align: center;
  background:
    radial-gradient(ellipse at 50% -20%, rgba(232,185,90,0.18), transparent 60%),
    linear-gradient(180deg, var(--bg-1), var(--bg-0));
  border-bottom: 1px solid var(--line);
}
.forum-hero-title {
  font-size: clamp(32px, 6vw, 52px);
  font-weight: 900;
  letter-spacing: 8px;
  background: linear-gradient(180deg, #fff6e0, var(--gold-light) 40%, var(--gold) 70%, var(--gold-dark));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 18px rgba(232,185,90,0.3));
}
.forum-hero-sub { margin-top: 14px; color: var(--text-dim); letter-spacing: 3px; font-size: 15px; }

.forum-page-body {
  max-width: 1240px;
  margin: 0 auto;
  padding: 32px 20px 60px;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 24px;
  align-items: start;
}
.forum-page-side { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 88px; }
.forum-page-main { min-width: 0; }

.post-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 18px 20px;
  text-decoration: none;
  color: inherit;
  transition: 0.2s;
}
.post-card:hover { border-color: var(--line-strong); background: var(--bg-2); }
.post-card-main { flex: 1; min-width: 0; }
.post-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.5px;
  line-height: 1.5;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.post-card-summary {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card-meta {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-faint);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.post-card-author { color: var(--gold-light); }
.post-card-stats { margin-left: auto; color: var(--text-dim); }
.dot { color: var(--text-faint); }

/* 发帖表单（论坛页内） */
.post-form-panel {
  background: var(--bg-1);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  padding: 24px;
  margin-bottom: 16px;
}
.post-form-title { font-size: 17px; letter-spacing: 2px; color: var(--gold-light); margin-bottom: 18px; }
.post-form-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 8px; }

/* ============ 帖子详情大页面 ============ */
.post-page { padding: 32px 0 60px; background: var(--bg-0); min-height: 60vh; }
.container-narrow { max-width: 860px; margin: 0 auto; padding: 0 20px; }
.post-page-loading { text-align: center; padding: 80px 0; color: var(--text-faint); }

.back-link {
  display: inline-flex;
  align-items: center;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 20px;
  transition: 0.2s;
}
.back-link:hover { color: var(--gold); }

.post-detail-card {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 32px;
}
.post-detail-head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.post-detail-title { font-size: clamp(20px, 3.4vw, 28px); font-weight: 800; letter-spacing: 1px; line-height: 1.4; }
.post-detail-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.post-detail-author {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}
.post-detail-author .post-avatar { width: 52px; height: 52px; font-size: 20px; }
.post-detail-author-info { flex: 1; min-width: 0; }
.post-detail-author-name { font-size: 15px; font-weight: 700; }
.post-detail-author-meta { font-size: 12px; color: var(--text-faint); margin-top: 4px; }
.post-detail-stats { display: flex; gap: 16px; font-size: 13px; color: var(--text-dim); flex-shrink: 0; }
.post-detail-content {
  font-size: 15px;
  line-height: 2;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

.reply-section { margin-top: 28px; }
.reply-section-head {
  font-size: 16px;
  letter-spacing: 1px;
  color: var(--gold-light);
  margin-bottom: 16px;
  padding-left: 12px;
  border-left: 3px solid var(--gold);
}
.reply-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.reply-item {
  display: flex;
  gap: 14px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 16px 18px;
}
.reply-item .post-avatar { width: 42px; height: 42px; font-size: 16px; }
.reply-body { flex: 1; min-width: 0; }
.reply-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.reply-head strong { font-size: 14px; color: var(--text); }
.reply-floor { font-size: 12px; color: var(--text-faint); }
.reply-time { font-size: 12px; color: var(--text-faint); margin-left: auto; }
.reply-content { margin-top: 8px; font-size: 14px; line-height: 1.8; color: var(--text-dim); white-space: pre-wrap; word-break: break-word; }

.reply-form {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 20px;
}
.reply-form-title { font-size: 14px; color: var(--text-dim); margin-bottom: 12px; }
.reply-form .form-textarea { margin-bottom: 12px; }
.reply-form-actions { display: flex; justify-content: flex-end; }
.reply-login-tip {
  background: var(--bg-1);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-md);
  padding: 32px 20px;
  text-align: center;
}
.reply-login-tip p { color: var(--text-dim); margin-bottom: 16px; font-size: 14px; }

/* ============ 论坛大页面响应式 ============ */
@media (max-width: 1024px) {
  .forum-page-body { grid-template-columns: 1fr; }
  .forum-page-side { position: static; }
  .essence-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .essence-grid { grid-template-columns: 1fr; }
  .forum-hero { padding: 48px 20px 34px; }
  .post-detail-card { padding: 20px; }
  .post-detail-stats { flex-direction: column; gap: 6px; }
  .section-head-between { flex-direction: column; text-align: center; align-items: stretch; }
  .section-head-between .section-title, .section-head-between .section-sub { text-align: center; }
  .post-card-title { font-size: 15px; }
}

/* ============ 图片上传组件 ============ */
.img-uploader { display: flex; align-items: flex-start; gap: 8px; flex-wrap: wrap; }
.img-list { display: flex; gap: 8px; flex-wrap: wrap; }
.img-item { position: relative; width: 80px; height: 80px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.img-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-del {
  position: absolute; top: 3px; right: 3px; width: 20px; height: 20px;
  border-radius: 50%; background: rgba(0,0,0,0.72); color: #fff;
  border: none; cursor: pointer; font-size: 14px; line-height: 20px; padding: 0;
}
.img-add {
  width: 80px; height: 80px; border: 1px dashed var(--line-strong); border-radius: 8px;
  background: none; color: var(--text-dim); cursor: pointer; font-size: 13px; transition: 0.2s;
}
.img-add:hover { color: var(--gold); border-color: var(--gold); }

/* 帖子/回复图片展示 */
.content-imgs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.content-imgs a { display: block; }
.content-imgs img { width: 100px; height: 100px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); display: block; }
