/* ===== 刀剑江湖路 - Wuxia Martial Arts Theme ===== */
/* Ink black, sword-steel silver, bamboo green on rice paper */

:root {
  --ink: #1a1410;
  --ink-soft: #3a322c;
  --ink-fade: #6b5e53;
  --steel: #7a7a8a;
  --steel-light: #b0b0c0;
  --steel-pale: #d8d5e0;
  --bamboo: #4a7c59;
  --bamboo-dark: #356644;
  --bamboo-light: #8cba9a;
  --bamboo-pale: #e0efe4;
  --rice: #faf5eb;
  --rice-dark: #e8e0d2;
  --rice-warm: #f5efe4;
  --gold: #b8860b;
  --gold-light: #c9a030;
  --red-accent: #8b2500;
  --white: #fefefe;
  --font-heading: 'Noto Serif SC', 'STSong', 'Songti SC', 'SimSun', 'KaiTi', serif;
  --font-body: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;
  --shadow-sm: 0 1px 3px rgba(26, 20, 16, 0.08);
  --shadow-md: 0 2px 8px rgba(26, 20, 16, 0.12);
  --shadow-lg: 0 4px 20px rgba(26, 20, 16, 0.15);
  --radius-sm: 3px;
  --radius-md: 6px;
  --max-width: 1100px;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  background: var(--rice);
  color: var(--ink);
  line-height: 1.8;
  background-image:
    radial-gradient(ellipse at 20% 20%, rgba(74, 124, 89, 0.03) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 60%, rgba(26, 20, 16, 0.02) 0%, transparent 50%);
}

/* ===== Header ===== */
.site-header {
  background: var(--ink);
  border-bottom: 2px solid var(--bamboo);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-md);
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 60px;
}
.logo {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--white);
  text-decoration: none;
  letter-spacing: 2px;
}
.logo span {
  color: var(--bamboo-light);
}

/* Main nav */
.main-nav { display: flex; align-items: center; gap: 2px; }
.main-nav a {
  color: var(--steel-light);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  font-family: var(--font-heading);
  letter-spacing: 1px;
}
.main-nav a:hover,
.main-nav a.active {
  color: var(--white);
  background: rgba(255,255,255,0.08);
}
.nav-cta {
  background: var(--bamboo) !important;
  color: var(--white) !important;
  font-weight: 600 !important;
  padding: 8px 18px !important;
  margin-left: 8px;
  border-radius: var(--radius-sm) !important;
  transition: all 0.2s;
}
.nav-cta:hover {
  background: var(--bamboo-dark) !important;
  box-shadow: 0 2px 8px rgba(74, 124, 89, 0.3);
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--steel-light);
  margin: 5px 0;
  transition: 0.2s;
}

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, var(--ink) 0%, #2a2018 50%, #1a2a1e 100%);
  color: var(--white);
  padding: 60px 20px 50px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(74,124,89,0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 70%, rgba(184,134,11,0.1) 0%, transparent 50%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--bamboo), var(--gold-light), var(--bamboo), transparent);
}
.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.hero h1 {
  font-family: var(--font-heading);
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: 4px;
  margin-bottom: 8px;
  background: linear-gradient(180deg, var(--white) 0%, var(--steel-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-subtitle {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--steel-light);
  letter-spacing: 2px;
  margin-bottom: 10px;
}
.hero-tags {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 15px 0;
}
.tag { display: inline-block; padding: 4px 14px; border: 1px solid; border-radius: 20px; font-size: 0.8rem; letter-spacing: 1px; }
.tag-bamboo { color: var(--bamboo-light); border-color: var(--bamboo-light); background: rgba(74,124,89,0.1); }
.tag-steel { color: var(--steel-light); border-color: var(--steel-light); background: rgba(176,176,192,0.08); }
.tag-gold { color: var(--gold-light); border-color: var(--gold-light); background: rgba(201,160,48,0.1); }
.tag-red { color: #e07050; border-color: #e07050; background: rgba(224,112,80,0.08); }
.hero-desc {
  max-width: 700px;
  margin: 20px auto 25px;
  font-size: 1rem;
  color: var(--steel-pale);
  line-height: 1.9;
}
.hero-buttons { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block;
  padding: 10px 28px;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}
.btn-primary {
  background: var(--bamboo);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(74,124,89,0.25);
}
.btn-primary:hover { background: var(--bamboo-dark); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(74,124,89,0.35); }
.btn-outline {
  background: transparent;
  color: var(--steel-light);
  border: 1px solid var(--steel-light);
}
.btn-outline:hover { color: var(--white); border-color: var(--white); background: rgba(255,255,255,0.05); }

/* ===== Page Hero (sub pages) ===== */
.page-hero {
  background: linear-gradient(135deg, var(--ink) 0%, #252018 100%);
  border-bottom: 2px solid var(--bamboo);
  text-align: center;
  padding: 40px 20px;
  position: relative;
}
.page-hero::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-light), transparent);
}
.page-hero-inner { max-width: var(--max-width); margin: 0 auto; }
.page-hero h1 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 3px;
}
.page-hero p {
  color: var(--steel-light);
  margin-top: 6px;
  font-size: 0.9rem;
  letter-spacing: 1px;
}

/* ===== Content Sections ===== */
.content-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 50px 20px;
}
.section-header {
  text-align: center;
  margin-bottom: 35px;
}
.section-header h2 {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  color: var(--ink);
  letter-spacing: 2px;
  position: relative;
  display: inline-block;
  padding-bottom: 12px;
}
.section-header h2::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 2px;
  background: var(--bamboo);
}
.section-header p {
  color: var(--ink-fade);
  font-size: 0.9rem;
  margin-top: 8px;
  letter-spacing: 1px;
}

/* ===== Info Cards ===== */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.info-card {
  background: var(--white);
  border: 1px solid var(--rice-dark);
  border-left: 3px solid var(--bamboo);
  padding: 18px 20px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}
.info-card .info-label {
  font-size: 0.75rem;
  color: var(--ink-fade);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.info-card .info-value {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--ink);
  margin-top: 4px;
  font-weight: 600;
}

/* ===== Feature Cards ===== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.feature-card {
  background: var(--white);
  border: 1px solid var(--rice-dark);
  border-radius: var(--radius-sm);
  padding: 24px 20px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
  border-left: 3px solid var(--steel-pale);
}
.feature-card:hover {
  border-left-color: var(--bamboo);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.feature-card .feature-icon {
  font-size: 1.8rem;
  margin-bottom: 10px;
}
.feature-card h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--ink);
  margin-bottom: 8px;
  letter-spacing: 1px;
}
.feature-card p {
  font-size: 0.9rem;
  color: var(--ink-soft);
  line-height: 1.7;
}

/* ===== Guide Steps ===== */
.guide-steps { display: flex; flex-direction: column; gap: 24px; }
.guide-step {
  display: flex;
  gap: 20px;
  background: var(--white);
  border: 1px solid var(--rice-dark);
  border-radius: var(--radius-sm);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  align-items: flex-start;
}
.step-num {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bamboo-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  border: 2px solid var(--bamboo);
}
.step-content h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--ink);
  margin-bottom: 6px;
  letter-spacing: 1px;
}
.step-content p {
  font-size: 0.9rem;
  color: var(--ink-soft);
  line-height: 1.7;
}

/* ===== Story Blocks ===== */
.story-block {
  background: var(--white);
  border: 1px solid var(--rice-dark);
  border-left: 4px solid var(--ink);
  padding: 24px 20px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.story-block .story-chapter {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  color: var(--bamboo);
  letter-spacing: 2px;
  font-weight: 600;
  margin-bottom: 4px;
}
.story-block h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--ink);
  margin-bottom: 8px;
  letter-spacing: 1px;
}
.story-block p {
  font-size: 0.9rem;
  color: var(--ink-soft);
  line-height: 1.8;
}

/* ===== Character Cards ===== */
.char-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.char-card {
  background: var(--white);
  border: 1px solid var(--rice-dark);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}
.char-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.char-card-header {
  background: var(--ink);
  padding: 16px 20px;
  border-bottom: 2px solid var(--bamboo);
}
.char-card-header h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--white);
  letter-spacing: 2px;
}
.char-role {
  font-size: 0.8rem;
  color: var(--bamboo-light);
  letter-spacing: 1px;
}
.char-card-body { padding: 16px 20px; }
.char-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ink), var(--ink-soft));
  border: 2px solid var(--bamboo);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 10px;
}
.char-card-body p {
  font-size: 0.9rem;
  color: var(--ink-soft);
  line-height: 1.7;
}
.char-traits { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.char-traits .tag { font-size: 0.7rem; padding: 2px 10px; }

/* ===== Screenshot Gallery ===== */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 14px;
}
.gallery-item {
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--rice-dark);
  transition: all 0.2s;
  background: var(--ink);
}
.gallery-item:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-md);
  border-color: var(--bamboo);
}
.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
}

/* ===== FAQ Accordion ===== */
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item {
  background: var(--white);
  border: 1px solid var(--rice-dark);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.faq-q {
  width: 100%;
  background: none;
  border: none;
  padding: 16px 20px;
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  letter-spacing: 1px;
  transition: background 0.2s;
}
.faq-q:hover { background: var(--bamboo-pale); }
.faq-toggle {
  flex-shrink: 0;
  font-size: 1.2rem;
  color: var(--bamboo);
  transition: transform 0.3s;
}
.faq-item.open .faq-toggle { transform: rotate(45deg); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s;
}
.faq-item.open .faq-a {
  max-height: 500px;
  padding: 0 20px 16px;
}
.faq-a p { font-size: 0.9rem; color: var(--ink-soft); line-height: 1.8; }

/* ===== CTA Banner ===== */
.cta-banner {
  background: linear-gradient(135deg, var(--ink) 0%, #1a2a1e 100%);
  text-align: center;
  padding: 50px 20px;
  border-top: 2px solid var(--bamboo);
  border-bottom: 2px solid var(--bamboo);
  position: relative;
}
.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(74,124,89,0.1) 0%, transparent 70%);
  pointer-events: none;
}
.cta-banner-inner { max-width: 600px; margin: 0 auto; position: relative; z-index: 1; }
.cta-banner h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--white);
  letter-spacing: 3px;
  margin-bottom: 10px;
}
.cta-banner p { color: var(--steel-light); margin-bottom: 20px; font-size: 0.95rem; }
.cta-banner .btn { font-size: 1rem; padding: 12px 36px; }

/* ===== Breadcrumbs ===== */
.breadcrumbs {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px 20px 0;
  font-size: 0.8rem;
  color: var(--ink-fade);
}
.breadcrumbs a {
  color: var(--bamboo);
  text-decoration: none;
}
.breadcrumbs a:hover { text-decoration: underline; }

/* ===== Stats Row ===== */
.stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: center;
  padding: 20px 0;
}
.stat-item { text-align: center; }
.stat-value {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--bamboo);
  letter-spacing: 2px;
}
.stat-label {
  font-size: 0.8rem;
  color: var(--ink-fade);
  letter-spacing: 1px;
}

/* ===== Info Table ===== */
.info-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border: 1px solid var(--rice-dark);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.info-table th,
.info-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--rice-dark);
  font-size: 0.9rem;
}
.info-table th {
  background: var(--ink);
  color: var(--white);
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: 1px;
  font-size: 0.85rem;
}
.info-table td { color: var(--ink-soft); }
.info-table tr:last-child td { border-bottom: none; }

/* ===== Tip Box ===== */
.tip-box {
  background: var(--bamboo-pale);
  border: 1px solid var(--bamboo-light);
  border-left: 4px solid var(--bamboo);
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  margin: 16px 0;
}
.tip-box strong { color: var(--bamboo-dark); font-family: var(--font-heading); letter-spacing: 1px; }
.tip-box p { color: var(--ink-soft); font-size: 0.9rem; margin-top: 4px; }

/* ===== Blockquote ===== */
blockquote {
  background: var(--white);
  border-left: 4px solid var(--gold-light);
  padding: 16px 20px;
  margin: 16px 0;
  font-style: italic;
  color: var(--ink-soft);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}

/* ===== Brush Divider ===== */
.brush-divider {
  text-align: center;
  padding: 20px 0;
  color: var(--steel);
  font-size: 1.2rem;
  letter-spacing: 8px;
}

/* ===== Download Card ===== */
.download-card {
  background: var(--white);
  border: 2px solid var(--bamboo);
  border-radius: var(--radius-sm);
  padding: 30px;
  text-align: center;
  max-width: 500px;
  margin: 0 auto;
  box-shadow: var(--shadow-md);
}
.download-card h3 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--ink);
  letter-spacing: 2px;
  margin-bottom: 8px;
}
.download-card .version {
  color: var(--bamboo);
  font-size: 0.85rem;
  letter-spacing: 1px;
  margin-bottom: 16px;
}
.download-card p { color: var(--ink-soft); font-size: 0.85rem; margin-top: 12px; }

/* ===== Requirement Table ===== */
.req-table {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.req-table .req-col {
  background: var(--white);
  border: 1px solid var(--rice-dark);
  border-radius: var(--radius-sm);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.req-col h4 {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--ink);
  margin-bottom: 10px;
  letter-spacing: 1px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rice-dark);
}
.req-col dl { font-size: 0.85rem; }
.req-col dt {
  font-weight: 600;
  color: var(--ink-soft);
  margin-top: 8px;
}
.req-col dd {
  color: var(--ink-fade);
  margin-left: 0;
  margin-bottom: 4px;
}

/* ===== Lightbox ===== */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(26,20,16,0.92);
  z-index: 999;
  align-items: center;
  justify-content: center;
}
.lightbox.active { display: flex; }
.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  border: 2px solid var(--steel-light);
  border-radius: var(--radius-sm);
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: var(--white);
  font-size: 2rem;
  cursor: pointer;
  background: none;
  border: none;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--ink);
  color: var(--steel);
  text-align: center;
  padding: 20px;
  font-size: 0.8rem;
  letter-spacing: 1px;
  border-top: 2px solid var(--bamboo);
}

/* ===== Utility ===== */
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.accent-text { color: var(--bamboo); }
.text-muted { color: var(--ink-fade); }
.text-steel { color: var(--steel); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ===== Section Alt Background ===== */
.section-alt { background: var(--rice-warm); }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .menu-toggle { display: block; }
  .main-nav {
    display: none;
    position: absolute;
    top: 60px;
    left: 0; right: 0;
    background: var(--ink);
    flex-direction: column;
    padding: 10px 0;
    border-bottom: 2px solid var(--bamboo);
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 20px; border-radius: 0; }
  .nav-cta { margin-left: 0; text-align: center; border-radius: 0 !important; }

  .hero h1 { font-size: 1.6rem; letter-spacing: 2px; }
  .hero-subtitle { font-size: 0.9rem; }
  .hero-desc { font-size: 0.9rem; }
  .btn { padding: 8px 20px; font-size: 0.85rem; }

  .content-section { padding: 30px 16px; }
  .section-header h2 { font-size: 1.3rem; }

  .info-grid { grid-template-columns: 1fr 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .char-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr 1fr; }
  .req-table { grid-template-columns: 1fr; }

  .guide-step { flex-direction: column; gap: 12px; }
  .stats-row { gap: 16px; }

  .page-hero h1 { font-size: 1.4rem; }
}

@media (max-width: 480px) {
  .info-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; }
  .hero { padding: 40px 14px 30px; }
  .hero h1 { font-size: 1.3rem; }
  .hero-tags { gap: 6px; }
  .download-card { padding: 20px; }
}
