/*
Theme Name: 八部 · BaBu Wuxia
Theme URI: https://yourdomain.com
Author: Your Name
Description: 八部武侠游戏门户主题。水墨丹青风格，内置 SEO 关键词优化、客服 QQ 弹窗系统、站长验证。轻量主题，响应式设计，兼容主流 SEO 插件。
Version: 1.3.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: babu-wuxia
Tags: gaming, wuxia, chinese-style, seo, responsive, custom-logo, custom-menu
*/

/* ============================================================
   设计系统 — 水墨武侠
   ============================================================ */
:root {
  --ink-900:   #0d0a07;
  --ink-800:   #1a1510;
  --ink-700:   #2a2318;
  --ink-600:   #3d3324;
  --ink-500:   #5c4f3a;
  --ink-400:   #8a7a60;

  --paper:      #f5f0e8;
  --paper-dim:  #e8e0d2;
  --paper-deep: #d9cdb8;

  --cinnabar:      #c23a2b;
  --cinnabar-dim:  #a12e22;
  --cinnabar-glow: 0 0 30px rgba(194, 58, 43, 0.4);

  --gold:       #c9a45c;
  --gold-dim:   #a88a45;
  --gold-light: #e0c88a;

  --text-primary:   #f5f0e8;
  --text-secondary: #b8a88e;
  --text-muted:     #7a6b54;
  --text-dark:      #1a1510;

  --border:        rgba(201, 164, 92, 0.18);
  --border-strong: rgba(201, 164, 92, 0.35);

  --radius-sm: 6px;
  --radius:    12px;
  --radius-lg: 20px;

  --font-serif: "STKaiti", "KaiTi", "楷体", "Noto Serif SC", "Source Han Serif SC", serif;
  --font-sans:  -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

/* ============================================================
   Reset
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--ink-900);
  color: var(--text-primary);
  line-height: 1.8;
  font-size: 16px;
  overflow-x: hidden;
}

/* 水墨纹理背景 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(ellipse 60% 40% at 20% 10%, rgba(194,58,43,0.06), transparent 60%),
    radial-gradient(ellipse 50% 50% at 80% 80%, rgba(201,164,92,0.05), transparent 60%),
    url("data:image/svg+xml,%3Csvg width='200' height='200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='0.65' numOctaves='3'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

a { color: var(--gold); text-decoration: none; transition: color .2s; }
a:hover { color: var(--cinnabar); }
img { max-width: 100%; height: auto; display: block; }

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--ink-900); }
::-webkit-scrollbar-thumb { background: var(--ink-600); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--cinnabar); }

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}
main { position: relative; z-index: 1; }

/* 章节标题 */
.section-title {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--gold);
  margin: 0 0 32px;
  text-align: center;
  position: relative;
  letter-spacing: 4px;
}
.section-title::before,
.section-title::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 80px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
}
.section-title::before { left: calc(50% - 160px); }
.section-title::after  { right: calc(50% - 160px); }

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: .92rem;
  margin: -20px 0 40px;
  letter-spacing: 2px;
}

/* 通用按钮 */
.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--cinnabar), var(--cinnabar-dim));
  color: #fff;
  border: none;
  cursor: pointer;
  transition: transform .25s, box-shadow .25s;
  font-family: var(--font-serif);
  letter-spacing: 2px;
  position: relative;
  overflow: hidden;
}
.cta-btn::after {
  content: "";
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transition: left .5s;
}
.cta-btn:hover::after { left: 100%; }
.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--cinnabar-glow);
  color: #fff;
  text-decoration: none;
}
.cta-btn.gold { background: linear-gradient(135deg, var(--gold), var(--gold-dim)); color: var(--ink-900); }
.cta-btn.gold:hover { box-shadow: 0 0 30px rgba(201,164,92,.5); }
.cta-btn.outline { background: transparent; border: 1px solid var(--border-strong); color: var(--gold); }
.cta-btn.outline:hover { border-color: var(--cinnabar); color: var(--cinnabar); box-shadow: none; }

@media (max-width: 768px) {
  .container { padding: 0 16px; }
  .section-title { font-size: 1.4rem; letter-spacing: 2px; }
  .section-title::before, .section-title::after { width: 40px; }
  .section-title::before { left: calc(50% - 110px); }
  .section-title::after  { right: calc(50% - 110px); }
  .cta-btn { padding: 12px 24px; font-size: .92rem; }
}
