/* ═══════════════════════════════════════════════════════════
   罪恶尖塔 SIN SPIRE — Crimson Parchment
   Warm parchment light theme · Clean modern layout
   Crimson accents · Gold highlights · Stone details
   ═══════════════════════════════════════════════════════════ */

/* ── CSS Custom Properties ── */
:root {
  /* Background palette */
  --bg:            #fefaf3;
  --bg-alt:        #f8f1e4;
  --bg-card:       #fffdf9;
  --bg-header:     #1c1814;
  --bg-footer:     #1c1814;
  --bg-cta:        #1c1814;

  /* Crimson family */
  --crimson:       #9b1d2e;
  --crimson-dark:  #731520;
  --crimson-light: #c44d5e;
  --crimson-bg:    rgba(155, 29, 46, 0.06);

  /* Gold */
  --gold:          #9b870c;
  --gold-bright:   #c4a830;
  --gold-dark:     #6b5c08;
  --gold-bg:       rgba(155, 135, 12, 0.08);

  /* Stone */
  --stone:         #5c5247;
  --stone-light:   #8a7d6f;
  --stone-dark:    #383028;

  /* Borders & dividers */
  --border:        #e0d6c8;
  --border-light:  #ece4d6;

  /* Text */
  --text:          #2a2219;
  --text-light:    #6b5f52;
  --text-muted:    #978a7c;
  --text-on-dark:  #e8dcc8;

  /* Header */
  --nav-text:      #c4b898;
  --nav-hover:     #e8d8a8;

  /* Radius */
  --radius:        6px;
  --radius-sm:     4px;
  --radius-lg:     10px;

  /* Shadows */
  --shadow:        0 1px 6px rgba(28, 24, 20, 0.06);
  --shadow-hover:  0 4px 18px rgba(28, 24, 20, 0.10);
  --shadow-card:   0 2px 12px rgba(28, 24, 20, 0.05);

  /* Typography */
  --font-heading:  'Georgia', 'Noto Serif SC', 'Songti SC', 'STSong', 'SimSun', serif;
  --font-body:     'Segoe UI', 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;

  /* Layout */
  --max-width:     1060px;
  --header-h:      56px;
  --transition:    0.22s ease;
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  min-height: 100vh;
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
}
h1 { font-size: 2.2rem; }
h2 { font-size: 1.7rem; margin-bottom: 0.5rem; }
h3 { font-size: 1.2rem; margin-bottom: 0.35rem; }
h4 { font-size: 1.05rem; }
p { margin-bottom: 0.75rem; }
a { color: var(--crimson); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--crimson-dark); }
img { max-width: 100%; height: auto; display: block; }

/* ── Layout Helpers ── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.section { padding: 3.5rem 0; }
.section-alt { background: var(--bg-alt); }
.section-title {
  text-align: center;
  margin-bottom: 2.5rem;
  position: relative;
  padding-bottom: 0.9rem;
  font-family: var(--font-heading);
}
.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 64px;
  height: 3px;
  background: linear-gradient(90deg, var(--crimson), var(--gold-bright));
  border-radius: 2px;
}

/* ── Divider ── */
.section-divider {
  width: 100%;
  max-width: 200px;
  height: 1px;
  margin: 0 auto;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

/* ═════════ HEADER ═════════ */
header {
  background: var(--bg-header);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 2px solid var(--crimson);
}
header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}
header .logo {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}
header .logo a {
  color: var(--nav-text);
  transition: color var(--transition);
}
header .logo a:hover { color: var(--nav-hover); }

/* Nav */
header nav { display: flex; align-items: center; gap: 1.4rem; }
header nav a {
  color: var(--nav-text);
  font-size: 0.875rem;
  padding: 0.2rem 0;
  position: relative;
  transition: color var(--transition);
}
header nav a:hover { color: var(--nav-hover); }
header nav a::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0; right: 0;
  height: 1px;
  background: var(--crimson);
  transform: scaleX(0);
  transition: transform var(--transition);
}
header nav a:hover::after { transform: scaleX(1); }
header nav a.active-nav { color: var(--gold-bright); }
header nav a.active-nav::after { transform: scaleX(1); background: var(--gold-bright); }

/* Nav CTA */
.nav-cta {
  background: var(--crimson) !important;
  color: #fefaf3 !important;
  padding: 0.4rem 1.1rem !important;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.85rem !important;
  letter-spacing: 0.03em;
  transition: background var(--transition), box-shadow var(--transition) !important;
}
.nav-cta:hover {
  background: var(--crimson-dark) !important;
  color: #fefaf3 !important;
  box-shadow: 0 0 12px rgba(155, 29, 46, 0.4);
}
.nav-cta::after { display: none !important; }

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--nav-text);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 0.3rem;
  line-height: 1;
}

/* ═════════ HERO (Index) ═════════ */
.hero {
  background: var(--bg-header);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 420px;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 25% 50%, rgba(155, 29, 46, 0.25) 0%, transparent 55%),
    radial-gradient(ellipse at 75% 40%, rgba(155, 135, 12, 0.12) 0%, transparent 55%),
    radial-gradient(ellipse at 50% 70%, rgba(155, 29, 46, 0.08) 0%, transparent 45%);
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  padding: 2.5rem 1.5rem;
  max-width: 680px;
}
.hero-subtitle {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--gold-bright);
  margin-bottom: 0.4rem;
  letter-spacing: 0.12em;
}
.hero h1 {
  font-size: 2.8rem;
  color: #fefaf3;
  margin-bottom: 0.8rem;
  letter-spacing: 0.05em;
}
.hero-desc {
  color: #b0a090;
  font-size: 0.95rem;
  margin-bottom: 1.8rem;
  line-height: 1.7;
}
.hero-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.hero-tags span {
  border: 1px solid rgba(196, 168, 48, 0.3);
  color: var(--gold-bright);
  padding: 0.2rem 0.75rem;
  border-radius: 20px;
  font-size: 0.78rem;
  font-family: var(--font-heading);
}
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1.8rem;
  flex-wrap: wrap;
}
.hero-stat { text-align: center; }
.hero-stat .stat-value {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--gold-bright);
}
.hero-stat .stat-label {
  font-size: 0.72rem;
  color: #8a7d6f;
  letter-spacing: 0.05em;
}
.hero .btn-hero {
  display: inline-block;
  background: var(--crimson);
  color: #fefaf3;
  padding: 0.7rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius);
  letter-spacing: 0.05em;
  transition: background var(--transition), box-shadow var(--transition);
}
.hero .btn-hero:hover {
  background: var(--crimson-dark);
  box-shadow: 0 0 20px rgba(155, 29, 46, 0.5);
  color: #fefaf3;
}

/* ═════════ PAGE HERO (Sub-pages) ═════════ */
.page-hero {
  background: var(--bg-header);
  text-align: center;
  padding: 2.8rem 1.5rem;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(155, 29, 46, 0.15), transparent 60%);
  z-index: 1;
}
.page-hero .container { position: relative; z-index: 2; }
.page-hero h1 {
  color: #fefaf3;
  font-size: 1.9rem;
}
.page-hero .breadcrumbs {
  font-size: 0.82rem;
  color: var(--stone-light);
  margin-bottom: 0.4rem;
}
.page-hero .breadcrumbs a { color: var(--gold-bright); }
.page-hero .breadcrumbs a:hover { color: var(--nav-hover); }

/* ═════════ INFO GRID (Index) ═════════ */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}
.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem;
  border-left: 3px solid var(--crimson);
  transition: box-shadow var(--transition), border-color var(--transition);
}
.info-card:hover {
  box-shadow: var(--shadow-hover);
  border-left-color: var(--gold);
}
.info-card .info-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  margin-bottom: 0.25rem;
}
.info-card .info-value {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  color: var(--text);
  font-weight: 600;
}

/* ═════════ FEATURE CARDS (Index) ═════════ */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.4rem;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: box-shadow var(--transition);
  position: relative;
}
.feature-card:hover { box-shadow: var(--shadow-hover); }
.feature-card .feature-icon {
  display: block;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--crimson-bg);
  color: var(--crimson);
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.9rem;
  font-family: var(--font-heading);
}
.feature-card h3 { font-size: 1.05rem; margin-bottom: 0.4rem; color: var(--crimson-dark); }
.feature-card p { font-size: 0.88rem; color: var(--text-light); line-height: 1.6; margin-bottom: 0; }

/* ═════════ STORY BLOCKS ═════════ */
.story-block {
  padding: 1.4rem;
  border-left: 3px solid var(--crimson);
  background: var(--bg-card);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 1.2rem;
  transition: border-color var(--transition);
}
.story-block:hover { border-left-color: var(--gold); }
.story-block .story-chapter {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  color: var(--gold-dark);
  letter-spacing: 0.08em;
  margin-bottom: 0.3rem;
}
.story-block h3 { font-size: 1.1rem; margin-bottom: 0.4rem; }
.story-block p { font-size: 0.9rem; color: var(--text-light); line-height: 1.7; margin-bottom: 0; }

/* ═════════ CHARACTER CARDS ═════════ */
.char-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.3rem;
}
.char-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow var(--transition);
}
.char-card:hover { box-shadow: var(--shadow-hover); }
.char-card .char-header {
  background: var(--bg-header);
  color: #fefaf3;
  padding: 1.1rem;
  text-align: center;
}
.char-card .char-header h3 {
  color: #fefaf3;
  font-size: 1.15rem;
  margin-bottom: 0.15rem;
}
.char-card .char-header .char-role {
  font-size: 0.72rem;
  color: var(--gold-bright);
  letter-spacing: 0.05em;
}
.char-card .char-body {
  padding: 1.1rem;
}
.char-card .char-body p {
  font-size: 0.85rem;
  color: var(--text-light);
  line-height: 1.65;
  margin-bottom: 0;
}

/* ═════════ MONSTER CARDS ═════════ */
.monster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}
.monster-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow var(--transition);
}
.monster-card:hover { box-shadow: var(--shadow-hover); }
.monster-card .monster-header {
  background: var(--crimson-dark);
  color: #fefaf3;
  padding: 0.9rem 1rem;
}
.monster-card .monster-header h4 {
  color: #fefaf3;
  font-size: 1rem;
  margin-bottom: 0.1rem;
}
.monster-card .monster-header .monster-type {
  font-size: 0.7rem;
  color: var(--gold-bright);
  letter-spacing: 0.04em;
}
.monster-card .monster-body {
  padding: 0.9rem 1rem;
}
.monster-card .monster-body p {
  font-size: 0.82rem;
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 0;
}

/* ═════════ GUIDE STEPS ═════════ */
.guide-step {
  display: flex;
  gap: 1.2rem;
  align-items: flex-start;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--border-light);
}
.guide-step:last-child { border-bottom: none; }
.guide-step .step-num {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--crimson);
  color: #fefaf3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
}
.guide-step .step-content h3 { font-size: 1.05rem; margin-bottom: 0.25rem; }
.guide-step .step-content p {
  font-size: 0.88rem;
  color: var(--text-light);
  line-height: 1.65;
  margin-bottom: 0;
}

/* ═════════ TIP BOX ═════════ */
.tip-box {
  background: var(--gold-bg);
  border-left: 3px solid var(--gold);
  padding: 1rem 1.2rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.88rem;
  color: var(--text-light);
  margin: 1rem 0;
}
.tip-box-danger {
  background: var(--crimson-bg);
  border-left: 3px solid var(--crimson);
  padding: 1rem 1.2rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.88rem;
  color: var(--text-light);
  margin: 1rem 0;
}

/* ═════════ FAQ ACCORDION ═════════ */
.faq-list { max-width: 740px; margin: 0 auto; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
  overflow: hidden;
  background: var(--bg-card);
}
.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: 1rem 1.2rem;
  text-align: left;
  font-family: var(--font-body);
  font-size: 0.93rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: color var(--transition);
}
.faq-question:hover { color: var(--crimson); }
.faq-question .faq-icon {
  font-size: 1.2rem;
  color: var(--crimson);
  transition: transform var(--transition);
  flex-shrink: 0;
  margin-left: 0.5rem;
  line-height: 1;
}
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
}
.faq-item.open .faq-answer { max-height: 500px; padding: 0 1.2rem 1rem; }
.faq-answer p {
  font-size: 0.88rem;
  color: var(--text-light);
  line-height: 1.65;
  margin-bottom: 0;
}

/* ═════════ TABLE ═════════ */
.req-table {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.req-table th {
  background: var(--bg-header);
  color: #fefaf3;
  padding: 0.55rem 1rem;
  text-align: left;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.85rem;
}
.req-table td {
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-light);
}
.req-table tr:nth-child(even) td { background: var(--bg-card); }

/* ═════════ CTA BANNER ═════════ */
.cta-banner {
  background: var(--bg-cta);
  text-align: center;
  padding: 3rem 1.5rem;
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 50%, rgba(155, 29, 46, 0.2), transparent 55%),
    radial-gradient(ellipse at 70% 50%, rgba(155, 135, 12, 0.1), transparent 55%);
  z-index: 1;
}
.cta-banner .container { position: relative; z-index: 2; }
.cta-banner h2 { color: #fefaf3; margin-bottom: 0.6rem; }
.cta-banner p { color: #b0a090; margin-bottom: 1.5rem; }
.cta-banner .btn-hero {
  display: inline-block;
  background: var(--crimson);
  color: #fefaf3;
  padding: 0.7rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius);
  letter-spacing: 0.05em;
  transition: background var(--transition), box-shadow var(--transition);
}
.cta-banner .btn-hero:hover {
  background: var(--crimson-dark);
  color: #fefaf3;
  box-shadow: 0 0 20px rgba(155, 29, 46, 0.5);
}

/* ═════════ TAGS ═════════ */
.tag {
  display: inline-block;
  padding: 0.12rem 0.55rem;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.03em;
}
.tag-crimson { background: rgba(155, 29, 46, 0.08); color: var(--crimson); border: 1px solid rgba(155, 29, 46, 0.2); }
.tag-gold { background: rgba(155, 135, 12, 0.08); color: var(--gold-dark); border: 1px solid rgba(155, 135, 12, 0.2); }
.tag-stone { background: rgba(92, 82, 71, 0.06); color: var(--stone); border: 1px solid rgba(92, 82, 71, 0.15); }

/* ═════════ WEAPON RANK TABLE ═════════ */
.weapon-table {
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.weapon-table th {
  background: var(--crimson-dark);
  color: #fefaf3;
  padding: 0.5rem 0.8rem;
  text-align: left;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.82rem;
}
.weapon-table td {
  padding: 0.45rem 0.8rem;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-light);
}
.weapon-table tr:nth-child(even) td { background: var(--bg-card); }
.rank-s { color: var(--crimson); font-weight: 700; }
.rank-a { color: var(--gold-dark); font-weight: 700; }
.rank-b { color: var(--stone); font-weight: 700; }

/* ═════════ FOOTER ═════════ */
footer {
  background: var(--bg-footer);
  text-align: center;
  padding: 1.8rem 1.5rem;
  font-size: 0.82rem;
}
footer p { color: #6b5d50; margin-bottom: 0; }

/* ═════════ SCREENSHOT GALLERY ═════════ */
.screenshot-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}
.screenshot-gallery img,
.screenshot-img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--transition), transform var(--transition);
  object-fit: cover;
  aspect-ratio: 16/10;
}
.screenshot-gallery img:hover,
.screenshot-img:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

/* Hero image background */
.hero-img-wrap {
  position: relative;
  margin-bottom: 2rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-hover);
  border: 1px solid var(--border);
}
.hero-img-wrap img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  max-height: 420px;
}

/* Section banner image */
.section-banner {
  margin: 1.5rem 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border);
}
.section-banner img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  max-height: 360px;
}

/* Inline image in content areas */
.content-img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border);
  margin: 1rem 0;
}

/* ═════════ UTILITY ═════════ */
.text-center { text-align: center; }
.text-light { color: var(--text-light); }
.max-w-700 { max-width: 700px; margin-left: auto; margin-right: auto; }
.max-w-800 { max-width: 800px; margin-left: auto; margin-right: auto; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }

/* ═════════ RESPONSIVE ═════════ */
@media (max-width: 768px) {
  header nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    background: var(--bg-header);
    flex-direction: column;
    padding: 1rem 1.5rem;
    gap: 0.7rem;
    border-bottom: 2px solid var(--crimson);
  }
  header nav.active { display: flex; }
  .menu-toggle { display: block; }

  .hero { min-height: 320px; }
  .hero h1 { font-size: 2rem; }
  .hero .hero-desc { font-size: 0.88rem; }
  .hero-stats { gap: 1.25rem; }
  .page-hero h1 { font-size: 1.5rem; }

  .section { padding: 2.5rem 0; }
  h2 { font-size: 1.45rem; }
  h1 { font-size: 1.7rem; }

  .info-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: 1fr; }
  .char-grid { grid-template-columns: 1fr; }
  .monster-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .info-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.5rem; }
  .hero { min-height: 260px; }
  .page-hero { padding: 2rem 1rem; }
}
