/* ===== 全局变量 ===== */
:root {
  --bg-base:    #060404;
  --bg-card:    #110b0b;
  --bg-nav:     rgba(6,4,4,0.96);
  --red-dark:   #5a0000;
  --red-main:   #8b0000;
  --red-light:  #c0392b;
  --gold-dark:  #8b6914;
  --gold-main:  #c8a02a;
  --gold-light: #f0c040;
  --gold-shine: #ffe680;
  --text-hi:    #f0e8d8;
  --text-lo:    #907060;
  --border:     rgba(200,160,42,0.25);
  --border-hi:  rgba(200,160,42,0.6);
  --shadow-red: 0 0 24px rgba(139,0,0,0.5);
  --shadow-gold:0 0 16px rgba(200,160,42,0.4);
  --radius:     6px;
  --nav-h:      64px;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: "Microsoft YaHei", "微软雅黑", "PingFang SC", sans-serif;
  background: var(--bg-base);
  color: var(--text-hi);
  line-height: 1.6;
  overflow-x: hidden;
}
a { color: var(--gold-main); text-decoration: none; }
a:hover { color: var(--gold-light); }

/* ===== 键盘可访问性：焦点可见 ===== */
a:focus-visible, button:focus-visible, .nav-toggle:focus-visible, .equip-tab:focus-visible {
  outline: 2px solid var(--gold-main);
  outline-offset: 3px;
}
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ===== 导航 ===== */
#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--nav-h);
  background: var(--bg-nav);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
  display: flex; align-items: center;
  transition: background 0.3s;
}
#nav.scrolled { background: rgba(6,4,4,0.99); box-shadow: 0 2px 20px rgba(0,0,0,0.8); }
.nav-inner {
  max-width: 1200px; width: 100%; margin: 0 auto;
  padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.2rem; font-weight: 700;
  color: var(--gold-main);
  text-shadow: 0 0 12px rgba(200,160,42,0.6);
  letter-spacing: 2px;
}
.nav-logo span { color: var(--text-hi); }
.nav-links {
  display: flex; align-items: center; gap: 0;
}
.nav-links li a {
  display: block; padding: 0 16px; height: var(--nav-h); line-height: var(--nav-h);
  color: var(--text-hi); font-size: 0.9rem; letter-spacing: 1px;
  position: relative; transition: color 0.2s;
}
.nav-links li a::after {
  content: ''; position: absolute; bottom: 0; left: 50%; right: 50%;
  height: 2px; background: var(--gold-main);
  transition: left 0.2s, right 0.2s;
}
.nav-links li a:hover, .nav-links li a.active {
  color: var(--gold-light);
}
.nav-links li a:hover::after, .nav-links li a.active::after {
  left: 16px; right: 16px;
}
.nav-btn {
  background: linear-gradient(135deg, var(--red-main), var(--red-dark));
  color: var(--gold-light) !important;
  border: 1px solid var(--gold-dark);
  border-radius: var(--radius);
  padding: 0 18px !important; height: 36px !important; line-height: 36px !important;
  margin-left: 12px; font-size: 0.85rem !important;
  transition: box-shadow 0.2s, background 0.2s !important;
}
.nav-btn:hover { box-shadow: var(--shadow-gold); background: linear-gradient(135deg, var(--red-light), var(--red-main)) !important; }
.nav-btn::after { display: none !important; }
.nav-toggle { display: none; cursor: pointer; flex-direction: column; gap: 5px; padding: 8px; background: none; border: none; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--gold-main); border-radius: 2px; transition: 0.3s; }

/* ===== 通用内容区 ===== */
.page-wrap { padding-top: var(--nav-h); min-height: 100vh; }
.section { padding: 70px 20px; }
.section-inner { max-width: 1200px; margin: 0 auto; }

/* ===== 按钮 ===== */
.btn {
  display: inline-block; padding: 14px 36px;
  border-radius: var(--radius); font-size: 1rem; font-weight: 700;
  letter-spacing: 2px; cursor: pointer; transition: all 0.2s;
  border: none; text-decoration: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--red-light), var(--red-dark));
  color: var(--gold-light);
  border: 1px solid var(--gold-dark);
  box-shadow: var(--shadow-red);
}
.btn-primary:hover {
  box-shadow: 0 0 30px rgba(139,0,0,0.8), var(--shadow-gold);
  transform: translateY(-2px);
  color: var(--gold-shine);
}
.btn-secondary {
  background: transparent;
  color: var(--gold-main);
  border: 1px solid var(--gold-dark);
}
.btn-secondary:hover {
  background: rgba(200,160,42,0.1);
  box-shadow: var(--shadow-gold);
  transform: translateY(-2px);
  color: var(--gold-light);
}

/* ===== 装备选项卡（资料页） ===== */
.equip-tabs { display: flex; gap: 0; margin-bottom: 24px; border-bottom: 1px solid var(--border); }
.equip-tab {
  padding: 10px 24px; cursor: pointer; font-size: 0.9rem;
  color: var(--text-lo); border-bottom: 2px solid transparent;
  transition: all 0.2s; margin-bottom: -1px;
}
.equip-tab.active { color: var(--gold-main); border-bottom-color: var(--gold-main); }
.equip-tab:hover { color: var(--gold-light); }
.equip-panel { display: none; }
.equip-panel.active { display: block; }

/* ===== 沙巴克区块（攻略页锚点） ===== */
#shabak {
  background: linear-gradient(135deg, #0a0000 0%, #1a0505 50%, #0a0000 100%);
  position: relative; overflow: hidden;
}
#shabak::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(139,0,0,0.15), transparent 70%);
}

/* ===== 新闻标签 ===== */
.news-tag {
  flex-shrink: 0; padding: 2px 10px; border-radius: 12px;
  font-size: 0.75rem;
}
.tag-announce { background: rgba(139,0,0,0.3); border: 1px solid var(--red-dark); color: var(--red-light); }
.tag-update   { background: rgba(200,160,42,0.15); border: 1px solid var(--gold-dark); color: var(--gold-main); }
.tag-event    { background: rgba(0,100,0,0.2); border: 1px solid #004000; color: #60c060; }
.tag-maintain { background: rgba(0,60,120,0.2); border: 1px solid #004080; color: #6090d0; }

/* ===== 页脚 ===== */
footer {
  background: #040202; border-top: 1px solid var(--border);
  padding: 40px 20px 20px;
  text-align: center;
}
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-logo { font-size: 1.3rem; color: var(--gold-main); letter-spacing: 4px; margin-bottom: 12px; font-weight: 700; }
.footer-links { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; margin-bottom: 16px; }
.footer-links a { color: var(--text-lo); font-size: 0.85rem; }
.footer-links a:hover { color: var(--gold-main); }
.footer-notice { color: var(--text-lo); font-size: 0.78rem; line-height: 1.8; max-width: 700px; margin: 0 auto 20px; }
.footer-copy { color: #403030; font-size: 0.75rem; border-top: 1px solid rgba(255,255,255,0.05); padding-top: 16px; margin-top: 16px; }

/* ===== 内页通用 ===== */
.page-hero {
  padding: 80px 20px 40px;
  background: linear-gradient(135deg, #0a0000, #1a0505);
  border-bottom: 1px solid var(--border);
  text-align: center;
}
.page-hero h1 { font-size: 2rem; color: var(--gold-main); letter-spacing: 4px; margin-bottom: 8px; }
.page-hero p { color: var(--text-lo); font-size: 0.9rem; }
.breadcrumb { color: var(--text-lo); font-size: 0.8rem; margin-bottom: 8px; }
.breadcrumb a { color: var(--gold-dark); }

/* ===== 攻略页 ===== */
.guide-nav { display: flex; flex-direction: column; gap: 6px; }
.guide-nav a {
  display: block; padding: 10px 14px; border-radius: var(--radius);
  color: var(--text-lo); font-size: 0.9rem;
  border: 1px solid transparent; transition: all 0.2s;
}
.guide-nav a:hover, .guide-nav a.active {
  border-color: var(--border); background: var(--bg-card);
  color: var(--gold-main);
}
.guide-layout { display: grid; grid-template-columns: 200px 1fr; gap: 30px; }
.guide-body h2 { color: var(--gold-main); font-size: 1.3rem; margin-bottom: 16px; border-left: 3px solid var(--red-main); padding-left: 12px; }
.guide-body h3 { color: var(--text-hi); font-size: 1rem; margin: 20px 0 8px; }
.guide-body p { color: var(--text-lo); line-height: 1.8; margin-bottom: 12px; }
.guide-body ul li { color: var(--text-lo); line-height: 2; padding-left: 16px; position: relative; }
.guide-body ul li::before { content: '▸'; color: var(--red-main); position: absolute; left: 0; }
.tip-box {
  background: rgba(200,160,42,0.05); border: 1px solid var(--gold-dark);
  border-radius: var(--radius); padding: 14px 16px; margin: 16px 0;
  color: var(--gold-main); font-size: 0.9rem; line-height: 1.7;
}
.warn-box {
  background: rgba(139,0,0,0.08); border: 1px solid var(--red-dark);
  border-radius: var(--radius); padding: 14px 16px; margin: 16px 0;
  color: var(--red-light); font-size: 0.9rem; line-height: 1.7;
}

/* ===== 数据表格 ===== */
.data-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.data-table th {
  background: rgba(139,0,0,0.3); color: var(--gold-main);
  padding: 10px 14px; text-align: left; font-weight: 700;
  border-bottom: 1px solid var(--border-hi);
}
.data-table td { padding: 9px 14px; border-bottom: 1px solid var(--border); color: var(--text-lo); }
.data-table tr:hover td { background: rgba(200,160,42,0.04); color: var(--text-hi); }
.rate-rare { color: var(--gold-main); }
.rate-epic { color: #c060ff; }
.rate-legend { color: var(--red-light); }

/* ===== 下载页 ===== */
.dl-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
  display: flex; gap: 24px; align-items: center;
  transition: all 0.2s; margin-bottom: 20px;
}
.dl-card:hover { border-color: var(--border-hi); }
.dl-icon { font-size: 3.5rem; flex-shrink: 0; }
.dl-info { flex: 1; }
.dl-info h3 { color: var(--text-hi); font-size: 1.1rem; margin-bottom: 6px; }
.dl-meta { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.dl-meta span { color: var(--text-lo); font-size: 0.82rem; }
.dl-meta strong { color: var(--gold-main); }
.dl-sha { color: var(--text-lo); font-size: 0.75rem; font-family: monospace; word-break: break-all; }
.dl-btn-wrap { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.btn-sm { padding: 8px 20px; font-size: 0.85rem; }

/* ===== 充值 / 授权 ===== */
.recharge-notice {
  max-width: 700px; margin: 0 auto;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 36px; text-align: center;
}
.recharge-notice h2 { color: var(--gold-main); font-size: 1.4rem; margin-bottom: 16px; }
.recharge-notice p { color: var(--text-lo); line-height: 1.8; margin-bottom: 12px; }
.license-box {
  max-width: 760px; margin: 0 auto;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px;
}
.license-box h2 { color: var(--gold-main); margin-bottom: 20px; }
.license-img-placeholder {
  width: 100%; height: 300px; background: #0e0808;
  border: 2px dashed var(--border); border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 8px; color: var(--text-lo);
  margin: 20px 0;
}
.license-status {
  display: inline-block; padding: 4px 16px; border-radius: 20px;
  background: rgba(200,160,42,0.1); border: 1px solid var(--gold-dark);
  color: var(--gold-main); font-size: 0.85rem;
}

/* ===== 分隔线 ===== */
.divider {
  height: 1px; background: linear-gradient(90deg, transparent, var(--border-hi), transparent);
  margin: 0;
}

/* ===== 响应式 ===== */
@media (max-width: 900px) {
  .guide-layout { grid-template-columns: 1fr; }
  .guide-nav { flex-direction: row; flex-wrap: wrap; gap: 4px; }
}
@media (max-width: 768px) {
  .nav-links { display: none; flex-direction: column; position: absolute; top: var(--nav-h); left: 0; right: 0; background: var(--bg-nav); border-bottom: 1px solid var(--border); padding: 10px 0; }
  .nav-links.open { display: flex; }
  .nav-links li a { height: auto; line-height: 1; padding: 12px 20px; }
  .nav-links li a::after { display: none; }
  .nav-toggle { display: flex; }
  .dl-card { flex-direction: column; }
}

/* ===== 减少动态效果偏好 ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
