/* =============================================
   巨龙征服者 Dragon Conqueror - Theme CSS
   Fire-breath orange + Dragon-scale emerald
   + Conquest-banner crimson on light parchment
   ============================================= */

/* --- CSS Variables --- */
:root {
  --fire: #e05a1f;
  --fire-bright: #f47b3a;
  --fire-glow: #ffb380;
  --fire-dim: #c44d1a;
  --emerald: #2d8a56;
  --emerald-dark: #1a5c34;
  --emerald-light: #4aad72;
  --conquest: #8b1a2b;
  --conquest-dark: #5c101c;
  --conquest-light: #b8404a;
  --gold: #b8860b;
  --bg: #faf6f0;
  --bg-card: #fefcf8;
  --bg-header: #1a1410;
  --text: #2d2418;
  --text-muted: #6b5e4f;
  --text-light: #8a7d6e;
  --border: #d4c8b0;
  --border-light: #e8dcc8;
  --shadow: rgba(26, 20, 16, 0.12);
  --shadow-strong: rgba(26, 20, 16, 0.22);
  --radius: 6px;
  --radius-lg: 12px;
  --font-heading: 'Cinzel', 'Noto Serif SC', 'STSong', 'SimSun', 'Songti SC', serif;
  --font-body: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;
  --max-w: 1100px;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Dragon-scale body background pattern */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.06;
  background:
    radial-gradient(circle 40px at 15% 20%, var(--emerald) 0%, transparent 70%),
    radial-gradient(circle 35px at 85% 15%, var(--fire) 0%, transparent 70%),
    radial-gradient(circle 30px at 75% 60%, var(--emerald) 0%, transparent 70%),
    radial-gradient(circle 38px at 25% 70%, var(--fire) 0%, transparent 70%),
    radial-gradient(circle 32px at 50% 85%, var(--conquest) 0%, transparent 70%),
    radial-gradient(circle 36px at 90% 40%, var(--emerald) 0%, transparent 70%),
    radial-gradient(circle 28px at 10% 45%, var(--conquest) 0%, transparent 70%),
    radial-gradient(circle 34px at 60% 30%, var(--fire) 0%, transparent 70%),
    radial-gradient(circle 1px at 5% 5%, var(--text) 0%, transparent 1px),
    radial-gradient(circle 1px at 95% 8%, var(--text) 0%, transparent 1px),
    radial-gradient(circle 1px at 92% 92%, var(--text) 0%, transparent 1px),
    radial-gradient(circle 1px at 8% 88%, var(--text) 0%, transparent 1px),
    radial-gradient(circle 1px at 48% 47%, var(--text) 0%, transparent 1px),
    radial-gradient(circle 1px at 72% 22%, var(--text) 0%, transparent 1px),
    repeating-linear-gradient(135deg, var(--emerald) 0px, var(--emerald) 1px, transparent 1px, transparent 18px),
    repeating-linear-gradient(45deg, var(--fire-dim) 0px, var(--fire-dim) 1px, transparent 1px, transparent 18px);
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); line-height: 1.3; color: var(--bg-header); }
h1 { font-size: 2.4rem; font-weight: 700; }
h2 { font-size: 1.8rem; font-weight: 600; margin-bottom: 1.2rem; }
h3 { font-size: 1.3rem; font-weight: 600; }
p { margin-bottom: 1rem; }
a { color: var(--fire); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--fire-bright); }
img { max-width: 100%; height: auto; display: block; }

/* --- Layout --- */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; position: relative; z-index: 1; }
.section { padding: 3.5rem 0; }
.section-alt { background: rgba(224, 90, 31, 0.04); }
.section-title { font-family: var(--font-heading); font-size: 1.8rem; color: var(--bg-header); margin-bottom: 0.3rem; text-align: center; }
.section-subtitle { color: var(--text-muted); text-align: center; margin-bottom: 2rem; font-size: 0.95rem; }
.accent-line {
  width: 60px; height: 3px; margin: 0 auto 1.5rem;
  background: linear-gradient(90deg, var(--fire), var(--emerald), var(--conquest));
  border-radius: 2px;
}

/* --- Header --- */
header {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg-header);
  border-bottom: 3px solid;
  border-image: linear-gradient(90deg, var(--fire), var(--emerald), var(--conquest)) 1;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 0.7rem 1.5rem; max-width: var(--max-w); margin: 0 auto; }
.logo { display: flex; align-items: center; gap: 0.6rem; }
.logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--fire), var(--conquest));
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; color: #fff;
}
.logo-text { font-family: var(--font-heading); font-size: 1.15rem; color: #f5e6d0; font-weight: 600; letter-spacing: 0.04em; }

nav { display: flex; align-items: center; gap: 1.8rem; }
nav a { color: #b8a890; font-size: 0.92rem; font-weight: 500; transition: color 0.2s; position: relative; }
nav a:hover, nav a.active { color: var(--fire-bright); }
nav a.active::after {
  content: ''; position: absolute; bottom: -4px; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--fire), var(--emerald));
  border-radius: 1px;
}

.nav-cta {
  background: linear-gradient(135deg, var(--conquest), var(--conquest-dark));
  color: #fff !important;
  padding: 0.45rem 1.2rem;
  border-radius: var(--radius);
  font-weight: 600;
  transition: all 0.25s;
  border: 1px solid var(--conquest-light);
}
.nav-cta:hover {
  background: linear-gradient(135deg, var(--conquest-light), var(--conquest));
  box-shadow: 0 0 15px rgba(139, 26, 43, 0.4);
  color: #fff !important;
  transform: translateY(-1px);
}

/* Mobile menu */
.menu-toggle {
  display: none; background: none; border: none; color: #d4c8b0;
  font-size: 1.6rem; cursor: pointer; padding: 0.3rem;
}

/* --- Hero --- */
.hero {
  position: relative;
  padding: 5rem 0 4rem;
  overflow: hidden;
  z-index: 1;
}
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse 600px 400px at 30% 20%, rgba(224, 90, 31, 0.15), transparent),
    radial-gradient(ellipse 500px 350px at 70% 60%, rgba(45, 138, 86, 0.12), transparent),
    radial-gradient(ellipse 400px 300px at 50% 80%, rgba(139, 26, 43, 0.08), transparent);
}
.hero-inner {
  display: flex; gap: 2.5rem; align-items: center;
  max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem;
  position: relative; z-index: 1;
}
.hero-content { flex: 1; }
.hero-content h1 {
  font-family: var(--font-heading);
  font-size: 2.8rem;
  background: linear-gradient(135deg, var(--fire-bright) 0%, var(--conquest) 40%, var(--emerald-dark) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
  line-height: 1.25;
}
.hero-subtitle {
  font-size: 1.1rem; color: var(--text-muted); margin-bottom: 1rem;
}
.hero-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; }
.tag { display: inline-block; padding: 0.2rem 0.8rem; border-radius: 20px; font-size: 0.8rem; font-weight: 600; }
.tag-fire { background: rgba(224, 90, 31, 0.12); color: var(--fire); border: 1px solid rgba(224, 90, 31, 0.3); }
.tag-emerald { background: rgba(45, 138, 86, 0.12); color: var(--emerald); border: 1px solid rgba(45, 138, 86, 0.3); }
.tag-conquest { background: rgba(139, 26, 43, 0.1); color: var(--conquest); border: 1px solid rgba(139, 26, 43, 0.25); }
.tag-gold { background: rgba(184, 134, 11, 0.1); color: var(--gold); border: 1px solid rgba(184, 134, 11, 0.25); }

.hero-desc { font-size: 1.05rem; color: var(--text); line-height: 1.8; margin-bottom: 1.5rem; }

.btn-primary {
  display: inline-block;
  background: linear-gradient(135deg, var(--conquest), var(--conquest-dark));
  color: #fff;
  padding: 0.7rem 2rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 1rem;
  transition: all 0.25s;
  border: 1px solid var(--conquest-light);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--conquest-light), var(--conquest));
  box-shadow: 0 4px 20px rgba(139, 26, 43, 0.35);
  color: #fff;
  transform: translateY(-2px);
}

.hero-visual { flex: 0 0 420px; position: relative; }
.hero-visual img { border-radius: var(--radius-lg); box-shadow: 0 8px 30px var(--shadow-strong); border: 3px solid var(--border-light); }
.hero-visual::after {
  content: ''; position: absolute; inset: -8px; border-radius: calc(var(--radius-lg) + 8px);
  border: 2px solid rgba(224, 90, 31, 0.25);
  pointer-events: none;
}

/* Page hero (sub-pages) */
.page-hero { padding: 3rem 0 2rem; text-align: center; position: relative; overflow: hidden; z-index: 1; }
.page-hero::before {
  content: ''; position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse 400px 200px at 50% 50%, rgba(224, 90, 31, 0.1), transparent),
    radial-gradient(ellipse 350px 180px at 30% 70%, rgba(45, 138, 86, 0.08), transparent);
}
.page-hero h1 { position: relative; z-index: 1; }
.page-hero .hero-subtitle { position: relative; z-index: 1; }

/* --- Info Cards Grid --- */
.info-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem;
  margin-bottom: 1.5rem;
}
.info-card {
  background: var(--bg-card); border: 1px solid var(--border-light);
  border-radius: var(--radius-lg); padding: 1.2rem; text-align: center;
  transition: all 0.25s;
}
.info-card:hover {
  border-color: var(--fire);
  box-shadow: 0 4px 16px rgba(224, 90, 31, 0.12);
  transform: translateY(-2px);
}
.info-card .info-icon { font-size: 1.8rem; margin-bottom: 0.5rem; }
.info-card .info-label { font-size: 0.78rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.2rem; }
.info-card .info-value { font-family: var(--font-heading); font-size: 1.05rem; color: var(--bg-header); font-weight: 600; }

/* --- Feature Cards --- */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.feature-card {
  background: var(--bg-card); border: 1px solid var(--border-light);
  border-radius: var(--radius-lg); padding: 1.5rem;
  border-left: 4px solid var(--fire);
  transition: all 0.3s;
}
.feature-card:hover {
  border-left-color: var(--emerald);
  box-shadow: 0 6px 20px rgba(45, 138, 86, 0.1);
  transform: translateY(-3px);
}
.feature-card:nth-child(even) { border-left-color: var(--emerald); }
.feature-card:nth-child(even):hover { border-left-color: var(--fire); }
.feature-card .feature-icon { font-size: 2rem; margin-bottom: 0.5rem; }
.feature-card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; color: var(--bg-header); }
.feature-card p { color: var(--text-muted); font-size: 0.92rem; margin-bottom: 0; }

/* --- Screenshot Gallery --- */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.gallery-grid img {
  border-radius: var(--radius); cursor: pointer;
  border: 2px solid var(--border-light);
  transition: all 0.25s;
}
.gallery-grid img:hover {
  border-color: var(--fire-bright);
  box-shadow: 0 4px 16px rgba(224, 90, 31, 0.25);
  transform: scale(1.03);
}

/* --- Story Blocks --- */
.story-block {
  background: var(--bg-card); border: 1px solid var(--border-light);
  border-radius: var(--radius-lg); padding: 1.5rem; margin-bottom: 1.5rem;
  border-left: 4px solid var(--emerald);
}
.story-block:nth-child(odd) { border-left-color: var(--conquest); }
.story-block .story-chapter { font-family: var(--font-heading); font-size: 0.85rem; color: var(--fire); margin-bottom: 0.3rem; text-transform: uppercase; letter-spacing: 0.06em; }
.story-block h3 { margin-bottom: 0.5rem; }
.story-block p { color: var(--text-muted); margin-bottom: 0; }

/* --- Character Cards --- */
.char-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem; }
.char-card {
  background: var(--bg-card); border: 1px solid var(--border-light);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: all 0.3s;
}
.char-card:hover { box-shadow: 0 6px 24px var(--shadow); transform: translateY(-3px); }
.char-card-header {
  background: linear-gradient(135deg, var(--bg-header), #2d1a10);
  padding: 1rem; display: flex; align-items: center; gap: 0.8rem;
}
.char-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, var(--fire), var(--conquest));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; color: #fff; flex-shrink: 0;
  border: 2px solid rgba(255,255,255,0.2);
}
.char-name { font-family: var(--font-heading); color: #f5e6d0; font-size: 1rem; font-weight: 600; }
.char-role { color: var(--fire-bright); font-size: 0.78rem; }
.char-body { padding: 1rem; }
.char-body p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 0; }
.char-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.8rem; }

/* --- Guide Steps --- */
.guide-steps { counter-reset: step; list-style: none; padding: 0; }
.guide-step {
  position: relative; padding-left: 3.5rem; margin-bottom: 2rem;
  counter-increment: step;
}
.guide-step::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 2.4rem; height: 2.4rem;
  background: linear-gradient(135deg, var(--fire), var(--fire-dim));
  color: #fff; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading); font-size: 1rem; font-weight: 700;
  box-shadow: 0 2px 10px rgba(224, 90, 31, 0.3);
}
.guide-step:nth-child(even)::before {
  background: linear-gradient(135deg, var(--emerald), var(--emerald-dark));
  box-shadow: 0 2px 10px rgba(45, 138, 86, 0.3);
}
.guide-step h3 { margin-bottom: 0.3rem; }
.guide-step p { color: var(--text-muted); }

.tip-box {
  background: rgba(45, 138, 86, 0.06);
  border-left: 4px solid var(--emerald);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1rem 1.2rem; margin: 1.5rem 0;
}
.tip-box .tip-label { font-weight: 700; color: var(--emerald-dark); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.3rem; }
.tip-box p { color: var(--text-muted); margin-bottom: 0; font-size: 0.92rem; }
.tip-box.warning { background: rgba(224, 90, 31, 0.06); border-left-color: var(--fire); }
.tip-box.warning .tip-label { color: var(--fire); }

/* --- FAQ Accordion --- */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item { border: 1px solid var(--border-light); border-radius: var(--radius); margin-bottom: 0.6rem; background: var(--bg-card); }
.faq-question {
  width: 100%; background: none; border: none; padding: 1rem 1.2rem;
  text-align: left; font-size: 1rem; font-weight: 600; color: var(--bg-header);
  cursor: pointer; display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-body);
  transition: color 0.2s;
}
.faq-question:hover { color: var(--fire); }
.faq-question::after { content: '+'; font-size: 1.3rem; color: var(--fire); transition: transform 0.25s; font-weight: 300; }
.faq-item.open .faq-question::after { content: '×'; transform: rotate(180deg); color: var(--conquest); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.35s ease; }
.faq-item.open .faq-answer { max-height: 500px; }
.faq-answer-inner { padding: 0 1.2rem 1.2rem; color: var(--text-muted); font-size: 0.95rem; line-height: 1.7; }

/* --- CTA Banner --- */
.cta-banner {
  background: linear-gradient(135deg, var(--bg-header), #2d1a10);
  color: #f5e6d0;
  padding: 3rem 0; text-align: center;
  position: relative; overflow: hidden;
}
.cta-banner::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(circle 300px at 20% 50%, rgba(224, 90, 31, 0.2), transparent),
    radial-gradient(circle 250px at 80% 50%, rgba(45, 138, 86, 0.15), transparent);
}
.cta-banner-inner { position: relative; z-index: 1; }
.cta-banner h2 { color: #f5e6d0; font-family: var(--font-heading); margin-bottom: 0.8rem; }
.cta-banner p { color: #a89480; margin-bottom: 1.5rem; }
.cta-banner .btn-primary { font-size: 1.1rem; padding: 0.8rem 2.5rem; }

/* --- Stats Row --- */
.stats-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 2rem; margin: 1.5rem 0; }
.stat-item { text-align: center; }
.stat-value { font-family: var(--font-heading); font-size: 1.8rem; color: var(--fire); font-weight: 700; }
.stat-label { font-size: 0.82rem; color: var(--text-muted); }

/* --- Download Card --- */
.download-card {
  background: var(--bg-card); border: 2px solid var(--conquest);
  border-radius: var(--radius-lg); padding: 2rem; text-align: center;
  max-width: 500px; margin: 0 auto;
}
.download-card h3 { color: var(--conquest); margin-bottom: 0.5rem; }
.download-card .file-size { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1rem; }

/* --- Info Table --- */
.info-table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; }
.info-table th, .info-table td { padding: 0.7rem 1rem; text-align: left; border-bottom: 1px solid var(--border-light); }
.info-table th { background: rgba(224, 90, 31, 0.06); color: var(--bg-header); font-weight: 600; width: 30%; font-size: 0.9rem; }
.info-table td { color: var(--text-muted); font-size: 0.9rem; }

/* --- Breadcrumbs --- */
.breadcrumbs { padding: 1rem 0; font-size: 0.85rem; color: var(--text-light); }
.breadcrumbs a { color: var(--fire); }
.breadcrumbs span { color: var(--text-muted); }

/* --- Blockquote --- */
blockquote {
  background: rgba(139, 26, 43, 0.04);
  border-left: 4px solid var(--conquest);
  padding: 1rem 1.2rem; margin: 1.5rem 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic; color: var(--text-muted);
}

/* --- Review Quote --- */
.review-quote { font-style: italic; color: var(--text); font-size: 1.05rem; margin-bottom: 0.3rem; }
.review-author { color: var(--fire); font-weight: 600; font-size: 0.9rem; }

/* --- Ending Cards --- */
.ending-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.ending-card {
  background: var(--bg-card); border: 1px solid var(--border-light);
  border-radius: var(--radius-lg); padding: 1.2rem; text-align: center;
  transition: all 0.25s;
}
.ending-card:hover { border-color: var(--gold); box-shadow: 0 4px 16px rgba(184, 134, 11, 0.15); }
.ending-card .ending-type { font-size: 0.75rem; color: var(--gold); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.3rem; }
.ending-card h4 { margin-bottom: 0.3rem; }
.ending-card p { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 0; }

/* --- Divider --- */
.dragon-divider {
  text-align: center; margin: 2rem 0; font-size: 1.5rem;
  background: linear-gradient(90deg, transparent, var(--fire-dim), var(--emerald), var(--conquest), transparent);
  height: 2px;
  position: relative;
}
.dragon-divider::after {
  content: '🔥 ⚔️ 🐉';
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  background: var(--bg); padding: 0 1rem; font-size: 0.9rem;
}

/* --- Footer --- */
footer {
  background: var(--bg-header); color: #6b5e4f;
  text-align: center; padding: 1.5rem; font-size: 0.85rem;
  position: relative; z-index: 1;
}

/* --- Lightbox --- */
.lightbox { display: none; position: fixed; inset: 0; z-index: 999; background: rgba(0,0,0,0.9); cursor: pointer; align-items: center; justify-content: center; }
.lightbox.active { display: flex; }
.lightbox img { max-width: 90vw; max-height: 90vh; border-radius: var(--radius); }
.lightbox-close { position: absolute; top: 1.5rem; right: 2rem; color: #fff; font-size: 2rem; cursor: pointer; background: none; border: none; }

/* --- Table Header Variants --- */
.th-fire { text-align: center; background: rgba(224, 90, 31, 0.12); }
.th-emerald { text-align: center; background: rgba(45, 138, 86, 0.12); }

/* --- Utilities --- */
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 2rem; }
.pb-0 { padding-bottom: 0 !important; }
.pt-0 { padding-top: 0 !important; }
.max-w-800 { max-width: 800px; margin-left: auto; margin-right: auto; }

/* --- Responsive --- */
@media (max-width: 768px) {
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.4rem; }
  .hero-inner { flex-direction: column-reverse; }
  .hero-visual { flex: 0 0 auto; max-width: 320px; margin: 0 auto; }
  .hero-content h1 { font-size: 2rem; }
  .menu-toggle { display: block; }
  nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--bg-header); flex-direction: column; padding: 1rem 1.5rem 1.5rem; border-bottom: 2px solid var(--fire); }
  nav.open { display: flex; }
  .info-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-row { gap: 1.5rem; }
}

@media (max-width: 480px) {
  .section { padding: 2.5rem 0; }
  .info-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
  .feature-grid, .char-grid { grid-template-columns: 1fr; }
  .hero-content h1 { font-size: 1.6rem; }
}
