/* === 仙帝再临 — Urban Immortal Theme === */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;600;700;900&display=swap');

:root {
  --font-serif: 'Noto Serif SC', 'Source Han Serif SC', 'SimSun', serif;
  --font-sans: 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;

  --bg: #faf8f5;
  --bg-card: #ffffff;
  --bg-section: #f3f0ea;

  --header-bg: #1a1a2e;
  --header-border: #c9a84c;

  --accent-gold: #c9a84c;
  --accent-purple: #6b3fa0;
  --accent-rose: #c4566a;
  --accent-navy: #2d3a6e;

  --text: #2c2c2c;
  --text-soft: #666666;
  --text-light: #999999;
  --text-white: #f5f0e8;

  --border: #e8e4dc;
  --border-light: #f0ede6;

  --shadow-card: 0 2px 12px rgba(0,0,0,0.06);
  --shadow-elevated: 0 4px 24px rgba(0,0,0,0.10);

  --radius: 10px;
  --radius-sm: 6px;

  --max-width: 1100px;
}

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

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

body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }

/* === Screen Reader Only === */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* === Header === */
.site-header {
  background: var(--header-bg);
  border-bottom: 3px solid var(--header-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 16px rgba(0,0,0,0.15);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 60px;
}

.header-logo {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--accent-gold);
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.header-nav a {
  color: rgba(245, 240, 232, 0.8);
  font-size: 0.925rem;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  white-space: nowrap;
}

.header-nav a:hover,
.header-nav a.active {
  color: var(--accent-gold);
  background: rgba(201, 168, 76, 0.12);
}

.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, var(--accent-gold), #d4a84a);
  color: #1a1a2e !important;
  font-weight: 700;
  padding: 8px 20px !important;
  border-radius: var(--radius-sm);
  transition: all 0.25s !important;
}

.header-cta:hover {
  background: linear-gradient(135deg, #d4a84a, var(--accent-gold));
  color: #1a1a2e !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(201, 168, 76, 0.4);
}

/* === Hero === */
.hero {
  background: linear-gradient(160deg, #1a1a2e 0%, #2d3a6e 50%, #4a3f6b 100%);
  padding: 72px 24px 88px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(201, 168, 76, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(107, 63, 160, 0.12) 0%, transparent 50%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-gold), var(--accent-purple), var(--accent-rose));
}

.hero-title-main {
  font-family: var(--font-serif);
  font-size: 3.2rem;
  font-weight: 900;
  color: var(--accent-gold);
  text-shadow: 0 2px 20px rgba(201, 168, 76, 0.3);
  letter-spacing: 0.12em;
  position: relative;
  z-index: 1;
}

.hero-subtitle {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: rgba(245, 240, 232, 0.75);
  margin-top: 12px;
  position: relative;
  z-index: 1;
  letter-spacing: 0.05em;
}

.hero-tagline {
  font-size: 0.95rem;
  color: rgba(245, 240, 232, 0.55);
  margin-top: 16px;
  position: relative;
  z-index: 1;
  line-height: 1.6;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* === Sub-page Hero (compact) === */
.hero-subpage {
  padding: 40px 24px 48px;
}

.hero-subpage-title {
  font-size: 2.2rem;
  font-weight: 700;
}

/* === Content === */
.content-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 24px;
}

.content-section h2 {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent-gold);
  display: inline-block;
}

.content-section h3 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--accent-navy);
  margin: 32px 0 12px;
}

.content-section p {
  color: var(--text-soft);
  margin-bottom: 14px;
  font-size: 1rem;
}

/* === Game Info Cards (Index) === */
.info-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.info-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  border-left: 4px solid var(--accent-gold);
  box-shadow: var(--shadow-card);
  transition: transform 0.2s, box-shadow 0.2s;
}

.info-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-elevated);
}

.info-card-label {
  font-size: 0.8rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.info-card-value {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}

/* === Feature Cards (Index) === */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.feature-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 28px 22px;
  box-shadow: var(--shadow-card);
  border-left: 4px solid var(--accent-purple);
  transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:nth-child(even) {
  border-left-color: var(--accent-rose);
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-elevated);
}

.feature-card h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  margin-top: 0;
}

.feature-card p {
  color: var(--text-soft);
  font-size: 0.925rem;
  line-height: 1.65;
}

/* === Screenshot Gallery (Index) === */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.gallery-grid img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
  transition: transform 0.25s;
  cursor: pointer;
}

.gallery-grid img:hover {
  transform: scale(1.03);
}

/* === CTA Banner (Index only) === */
.cta-banner {
  background: linear-gradient(135deg, var(--accent-navy) 0%, #1a1a2e 100%);
  padding: 56px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(201, 168, 76, 0.18) 0%, transparent 70%);
  pointer-events: none;
}

.cta-banner h2 {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-gold);
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}

.cta-banner p {
  color: rgba(245, 240, 232, 0.7);
  margin-bottom: 28px;
  position: relative;
  z-index: 1;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--accent-gold), #d4a84a);
  color: #1a1a2e;
  font-weight: 700;
  font-size: 1.1rem;
  padding: 14px 42px;
  border-radius: var(--radius);
  transition: all 0.25s;
  position: relative;
  z-index: 1;
  letter-spacing: 0.04em;
}

.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(201, 168, 76, 0.45);
}

/* === Characters Page === */
.char-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.char-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s, box-shadow 0.25s;
}

.char-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-elevated);
}

.char-card-img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: linear-gradient(135deg, var(--accent-navy), var(--accent-purple));
}

.char-card-body {
  padding: 18px 16px 22px;
}

.char-card-body h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 4px;
}

.char-role {
  font-size: 0.85rem;
  color: var(--accent-purple);
  font-weight: 600;
  margin-bottom: 10px;
}

.char-card-body p {
  color: var(--text-soft);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 0;
}

.char-traits {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.char-trait {
  font-size: 0.78rem;
  background: #f3f0ea;
  color: var(--accent-navy);
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 500;
}

.section-subheading {
  text-align: center;
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--accent-navy);
  margin: 40px 0 24px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
}

/* === Story Page === */
.story-block {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-card);
  border-left: 4px solid var(--accent-gold);
}

.story-block:nth-child(even) {
  border-left-color: var(--accent-purple);
}

.chapter-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent-navy);
  margin-bottom: 10px;
}

.story-block p {
  color: var(--text-soft);
  line-height: 1.7;
}

/* === Guide Page === */
.guide-step {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-card);
  border-left: 4px solid var(--accent-purple);
  position: relative;
}

.guide-step:nth-child(odd) {
  border-left-color: var(--accent-gold);
}

.guide-step h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent-navy);
  margin: 0 0 10px;
}

.guide-step p {
  color: var(--text-soft);
  line-height: 1.7;
}

.guide-intro {
  font-size: 1.05rem;
  color: var(--text-soft);
  margin-bottom: 24px;
}

.route-heading {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--accent-rose);
  margin: 28px 0 12px;
  padding-left: 12px;
  border-left: 3px solid var(--accent-rose);
}

.route-desc {
  color: var(--text-soft);
  margin-bottom: 12px;
  line-height: 1.7;
}

.tip-box {
  background: #fefcf3;
  border: 1px solid #e8dca0;
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin: 16px 0;
}

.tip-box strong {
  color: var(--accent-gold);
}

.tip-box p {
  color: var(--text-soft);
  font-size: 0.925rem;
  margin-bottom: 4px;
}

/* === FAQ Page === */
.faq-list {
  margin-top: 24px;
}

.faq-item {
  background: var(--bg-card);
  border-radius: var(--radius);
  margin-bottom: 12px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.faq-q {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  padding: 18px 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  transition: background 0.2s;
}

.faq-q:hover {
  background: #faf8f5;
}

.faq-q::after {
  content: '+';
  font-size: 1.4rem;
  color: var(--accent-gold);
  font-weight: 400;
  transition: transform 0.3s;
}

.faq-item.open .faq-q::after {
  content: '−';
}

.faq-a {
  padding: 0 24px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  color: var(--text-soft);
  line-height: 1.7;
}

.faq-item.open .faq-a {
  max-height: 500px;
  padding: 0 24px 20px;
}

/* === System Requirements Table === */
.sys-reqs {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.sys-reqs thead {
  background: var(--accent-navy);
}

.sys-reqs th {
  color: var(--accent-gold);
  font-family: var(--font-serif);
  font-weight: 600;
  padding: 14px 18px;
  text-align: left;
  font-size: 0.95rem;
}

.sys-reqs td {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-soft);
  font-size: 0.925rem;
}

.sys-reqs tr:last-child td {
  border-bottom: none;
}

.sys-reqs-h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--accent-navy);
  margin: 28px 0 12px;
}

.table-scroll {
  overflow-x: auto;
}

/* === Content Lists === */
.content-list {
  list-style: disc;
  padding-left: 24px;
  margin: 10px 0 16px;
  color: var(--text-soft);
}

.content-list-num {
  list-style: decimal;
  padding-left: 24px;
  margin: 10px 0 16px;
  color: var(--text-soft);
}

.content-li {
  margin-bottom: 5px;
  color: var(--text-soft);
  line-height: 1.7;
}

.content-li-sm {
  margin-bottom: 4px;
  color: var(--text-soft);
  font-size: 0.9rem;
  line-height: 1.6;
}

.content-li-md {
  margin-bottom: 8px;
  color: var(--text-soft);
  line-height: 1.7;
}

.content-li-lg {
  margin-bottom: 10px;
  color: var(--text-soft);
  line-height: 1.7;
}

/* === Colored Strong Tags === */
.strong-gold { color: var(--accent-gold); }
.strong-purple { color: var(--accent-purple); }
.strong-rose { color: var(--accent-rose); }
.strong-muted { color: var(--text-soft); }
.strong-navy { color: var(--accent-navy); }

.td-highlight {
  color: var(--accent-rose);
  font-weight: 700;
}

/* === Reviews / Quotes === */
.reviews {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.review-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-card);
  position: relative;
}

.review-card::before {
  content: '"';
  font-family: var(--font-serif);
  font-size: 3rem;
  color: var(--accent-gold);
  opacity: 0.25;
  position: absolute;
  top: 8px;
  left: 14px;
  line-height: 1;
}

.review-card p {
  color: var(--text-soft);
  font-style: italic;
  line-height: 1.7;
  margin-bottom: 0;
}

.review-author {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 10px;
  font-style: normal;
}

/* === Footer === */
.site-footer {
  background: var(--header-bg);
  padding: 28px 24px;
  text-align: center;
  border-top: 3px solid var(--header-border);
}

.site-footer p {
  color: rgba(245, 240, 232, 0.55);
  font-size: 0.875rem;
}

/* === Responsive === */
@media (max-width: 768px) {
  .header-inner {
    flex-wrap: wrap;
    height: auto;
    padding: 10px 16px;
    gap: 8px;
  }

  .header-nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 2px;
  }

  .header-nav a {
    font-size: 0.85rem;
    padding: 5px 10px;
  }

  .hero {
    padding: 48px 20px 64px;
  }

  .hero-title-main {
    font-size: 2.2rem;
  }

  .hero-subpage-title {
    font-size: 1.7rem;
  }

  .content-section {
    padding: 32px 20px;
  }

  .content-section h2 {
    font-size: 1.6rem;
  }

  .features-grid,
  .char-grid,
  .reviews {
    grid-template-columns: 1fr;
  }

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

  .gallery-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 36px 16px 48px;
  }

  .hero-title-main {
    font-size: 1.7rem;
  }

  .hero-subpage-title {
    font-size: 1.4rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .content-section {
    padding: 24px 16px;
  }

  .content-section h2 {
    font-size: 1.4rem;
  }

  .info-cards {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .cta-banner h2 {
    font-size: 1.5rem;
  }

  .cta-btn {
    padding: 12px 30px;
    font-size: 1rem;
  }
}
