/* ============================================================
   纳迪亚之宝 — Treasure Hunt / Ancient Gold & Jungle Theme
   Light parchment background, gold accents, jungle greens
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;600;700;900&family=Noto+Sans+SC:wght@300;400;500;600;700&display=swap');

/* ========== CSS VARIABLES ========== */
:root {
  --font-serif: 'Noto Serif SC', 'SimSun', serif;
  --font-sans: 'Noto Sans SC', 'Microsoft YaHei', sans-serif;

  /* parchment background */
  --bg: #faf5eb;
  --bg-warm: #f5efe1;
  --bg-card: #fffdf7;
  --bg-card-alt: #fdf8ee;

  /* text */
  --text: #3b2f1f;
  --text-soft: #6b5d4b;
  --text-muted: #8b7b65;
  --text-heading: #2a1f10;

  /* gold accents */
  --gold: #c9a94e;
  --gold-light: #e0c97f;
  --gold-dark: #a07d2a;
  --gold-bright: #d4af37;

  /* jungle greens */
  --jungle: #2d5a27;
  --jungle-light: #4a7c3f;
  --jungle-dark: #1a3a18;
  --jungle-deep: #0f2a0e;

  /* accent */
  --green-accent: #3b6b35;
  --parchment-border: #d4c5a9;
  --danger-red: #a83232;
  --pink-fierce: #c0392b;

  /* layout */
  --max-width: 1100px;
  --header-height: 64px;
}

/* ========== 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-color: var(--bg);
  line-height: 1.8;
  background-image:
    radial-gradient(ellipse at 15% 10%, rgba(201, 169, 78, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 90%, rgba(45, 90, 39, 0.04) 0%, transparent 50%);
}

/* parchment texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(180, 160, 120, 0.03) 2px,
      rgba(180, 160, 120, 0.03) 4px
    );
  pointer-events: none;
  z-index: 0;
}

/* ========== ACCESSIBILITY ========== */
.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 ========== */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(180deg, var(--jungle-dark) 0%, var(--jungle-deep) 100%);
  border-bottom: 3px solid var(--gold);
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}

header::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gold-light);
}

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

.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--gold-light);
}

.header-logo img {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  border: 1px solid var(--gold-dark);
}

.header-logo span {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

nav a {
  text-decoration: none;
  color: #c0b89a;
  padding: 8px 14px;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
  position: relative;
}

nav a:hover,
nav a.active {
  color: var(--gold-light);
  background: rgba(201, 169, 78, 0.1);
}

.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--gold-dark) 0%, var(--gold) 100%);
  color: #1a1a0a;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 8px 18px;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(160, 125, 42, 0.3);
}

.header-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(160, 125, 42, 0.5);
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
}

/* ========== HERO SECTION ========== */
.hero {
  position: relative;
  padding: 60px 24px 80px;
  text-align: center;
  background: linear-gradient(170deg, var(--jungle-dark) 0%, #24501e 40%, var(--jungle-deep) 100%);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(201, 169, 78, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 80%, rgba(74, 124, 63, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

/* treasure map decorative lines */
.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 5%;
  right: 5%;
  bottom: 0;
  background-image:
    repeating-linear-gradient(90deg,
      transparent, transparent 60px,
      rgba(201, 169, 78, 0.04) 60px, rgba(201, 169, 78, 0.04) 61px),
    repeating-linear-gradient(0deg,
      transparent, transparent 80px,
      rgba(201, 169, 78, 0.03) 80px, rgba(201, 169, 78, 0.03) 81px);
  pointer-events: none;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}

.hero-img {
  max-width: 650px;
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 2px solid var(--gold-dark);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  margin-bottom: 24px;
}

.hero-tagline {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--gold-light);
  margin-top: 8px;
  letter-spacing: 0.08em;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

/* ========== HERO SUB-PAGE ========== */
.hero-subpage {
  padding: 40px 24px 48px;
}

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

/* ========== MAIN CONTENT ========== */
main {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 24px;
}

/* ========== SECTION HEADINGS ========== */
.section-title {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 8px;
  position: relative;
  padding-bottom: 12px;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--jungle-light));
  border-radius: 2px;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 32px;
  max-width: 650px;
}

/* content section h2 (was h1 on sub-pages) */
.content-section h2 {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

/* ========== CARDS ========== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin: 32px 0;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--parchment-border);
  border-radius: 8px;
  padding: 28px 24px;
  border-left: 4px solid var(--gold);
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-dark), var(--jungle-light), transparent);
  opacity: 0;
  transition: opacity 0.25s;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  border-color: var(--gold);
}

.card:hover::before {
  opacity: 1;
}

.card-icon {
  font-size: 2rem;
  margin-bottom: 12px;
  display: block;
}

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

.card p {
  color: var(--text-soft);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ========== FEATURE CARDS (index) ========== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 24px;
  margin: 32px 0;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--parchment-border);
  border-radius: 8px;
  padding: 28px 24px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  transition: all 0.25s;
}

.feature-card:hover {
  border-color: var(--gold);
  box-shadow: 0 4px 16px rgba(0,0,0,0.07);
}

.feature-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--jungle-light), var(--green-accent));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--gold-light);
}

.feature-text h3 {
  font-family: var(--font-serif);
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 4px;
}

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

/* ========== SCREENSHOT GALLERY ========== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.gallery-grid img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  border: 1px solid var(--parchment-border);
  cursor: pointer;
  transition: all 0.25s;
}

.gallery-grid img:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  border-color: var(--gold);
}

/* ========== LIGHTBOX ========== */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(15, 10, 5, 0.94);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 6px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 2.5rem;
  color: #fff;
  cursor: pointer;
  z-index: 1;
}

/* ========== CTA BANNER (index) ========== */
.cta-banner {
  background: linear-gradient(135deg, var(--jungle-dark) 0%, #1e4a1a 100%);
  border-radius: 10px;
  padding: 48px 32px;
  text-align: center;
  margin: 48px 0 16px;
  position: relative;
  overflow: hidden;
  border: 2px solid var(--gold-dark);
}

.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(201, 169, 78, 0.12) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(74, 124, 63, 0.08) 0%, transparent 50%);
  pointer-events: none;
}

/* compass rose decoration */
.cta-banner::after {
  content: '✦';
  position: absolute;
  top: 16px;
  right: 28px;
  font-size: 2.5rem;
  color: rgba(201, 169, 78, 0.2);
  pointer-events: none;
}

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

.cta-banner p {
  color: #b8a880;
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
  font-size: 1.02rem;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--gold-dark) 0%, var(--gold-bright) 100%);
  color: #1a1a0a;
  font-weight: 700;
  font-size: 1.1rem;
  padding: 14px 36px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.25s;
  box-shadow: 0 4px 16px rgba(160, 125, 42, 0.4);
  position: relative;
  z-index: 1;
}

.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(160, 125, 42, 0.6);
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
}

/* ========== REVIEWS (index) ========== */
.review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin: 24px 0;
}

.review-card {
  background: var(--bg-card);
  border: 1px solid var(--parchment-border);
  border-radius: 8px;
  padding: 24px;
  position: relative;
}

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

.review-card blockquote {
  font-style: italic;
  color: var(--text-soft);
  margin-bottom: 12px;
  line-height: 1.7;
  font-size: 0.95rem;
}

.review-card footer {
  font-weight: 600;
  color: var(--jungle);
  font-size: 0.88rem;
}

/* ========== ACCORDION (faq) ========== */
.accordion {
  margin: 24px 0;
}

.accordion-item {
  border: 1px solid var(--parchment-border);
  border-radius: 6px;
  margin-bottom: 10px;
  overflow: hidden;
}

.accordion-header {
  width: 100%;
  background: var(--bg-card);
  border: none;
  padding: 16px 20px;
  text-align: left;
  font-family: var(--font-sans);
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--text-heading);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s;
}

.accordion-header:hover {
  background: var(--bg-card-alt);
}

.accordion-header::after {
  content: '+';
  font-size: 1.3rem;
  font-weight: 300;
  color: var(--gold);
  transition: transform 0.25s;
}

.accordion-item.open .accordion-header::after {
  content: '−';
}

.accordion-body {
  display: none;
  padding: 0 20px 18px;
  background: var(--bg-card);
  color: var(--text-soft);
  font-size: 0.95rem;
  line-height: 1.75;
}

.accordion-item.open .accordion-body {
  display: block;
}

/* ========== TABLE ========== */
.table-scroll {
  overflow-x: auto;
  margin: 20px 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.93rem;
}

thead th {
  background: var(--jungle-dark);
  color: var(--gold-light);
  font-weight: 600;
  padding: 12px 16px;
  text-align: left;
}

tbody td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--parchment-border);
  color: var(--text-soft);
}

tbody tr:nth-child(even) {
  background: var(--bg-card-alt);
}

tbody tr:hover {
  background: rgba(201, 169, 78, 0.06);
}

/* ========== CHARACTER CARDS ========== */
.char-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin: 24px 0;
}

.char-card {
  background: var(--bg-card);
  border: 1px solid var(--parchment-border);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.25s;
  text-align: center;
}

.char-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
  border-color: var(--gold);
}

.char-card img {
  width: 100%;
  height: auto;
  display: block;
}

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

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

.char-card-body .char-role {
  font-size: 0.82rem;
  color: var(--gold-dark);
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

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

/* ========== GUIDE CONTENT ========== */
.guide-step {
  background: var(--bg-card);
  border: 1px solid var(--parchment-border);
  border-left: 4px solid var(--jungle-light);
  border-radius: 6px;
  padding: 24px;
  margin-bottom: 24px;
}

.guide-step h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--jungle-dark), var(--jungle-light));
  color: var(--gold-light);
  border-radius: 50%;
  font-size: 0.9rem;
  font-weight: 700;
}

.tip-box {
  background: rgba(201, 169, 78, 0.08);
  border-left: 3px solid var(--gold);
  border-radius: 4px;
  padding: 14px 18px;
  margin: 16px 0;
}

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

.tip-box-mt {
  margin-top: 20px;
}

/* ========== STORY CHAPTERS ========== */
.chapter-card {
  background: var(--bg-card);
  border: 1px solid var(--parchment-border);
  border-radius: 8px;
  padding: 28px 24px;
  margin-bottom: 20px;
  position: relative;
}

.chapter-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--gold), var(--jungle-light));
  border-radius: 8px 0 0 8px;
}

.chapter-title {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 10px;
}

.chapter-card p {
  color: var(--text-soft);
  line-height: 1.75;
}

/* ========== CONTENT LIST CLASSES ========== */
.content-list {
  list-style: disc;
  padding-left: 20px;
}

.content-list-num {
  list-style: decimal;
  padding-left: 24px;
}

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

.content-li-sm {
  margin-bottom: 4px;
  color: var(--text-soft);
}

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

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

/* ========== COLORED STRONG TAGS ========== */
.strong-pink { color: var(--pink-fierce); }
.strong-red { color: var(--danger-red); }
.strong-gold { color: var(--gold-dark); }
.strong-muted { color: var(--text-muted); }
.strong-navy { color: var(--jungle-dark); }

/* ========== TABLE HIGHLIGHT ========== */
.td-highlight {
  color: var(--pink-fierce);
  font-weight: 700;
}

/* ========== SYSTEM REQUIREMENTS H3 ========== */
.sys-reqs-h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--jungle-dark);
  margin-top: 24px;
  margin-bottom: 12px;
}

.sys-reqs-h3:first-of-type {
  margin-top: 8px;
}

/* ========== SECTION SUBHEADING ========== */
.section-subheading {
  text-align: center;
  margin: 40px 0 24px;
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-heading);
}

/* ========== GUIDE INTRO / ROUTE DESC ========== */
.guide-intro {
  font-size: 1.05rem;
  color: var(--text-soft);
  line-height: 1.8;
  margin-bottom: 24px;
}

.route-desc {
  font-size: 0.98rem;
  color: var(--text-soft);
  line-height: 1.75;
  margin-bottom: 16px;
}

.route-heading {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-heading);
  margin: 28px 0 12px;
}

/* ========== FOOTER ========== */
footer {
  text-align: center;
  padding: 32px 24px;
  border-top: 1px solid var(--parchment-border);
  color: var(--text-muted);
  font-size: 0.88rem;
  background: var(--bg-warm);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  :root {
    --header-height: 56px;
  }

  .header-inner {
    flex-wrap: wrap;
    height: auto;
    padding: 10px 16px;
    gap: 8px;
    justify-content: center;
  }

  .header-logo span {
    font-size: 1rem;
  }

  nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  nav a {
    padding: 6px 10px;
    font-size: 0.82rem;
  }

  .header-cta {
    font-size: 0.82rem;
    padding: 6px 14px;
  }

  .hero {
    padding: 36px 16px 48px;
  }

  .hero-subpage {
    padding: 28px 16px 36px;
  }

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

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

  main {
    padding: 32px 16px;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .card-grid,
  .feature-grid,
  .review-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }

  .char-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }

  .cta-banner {
    padding: 32px 20px;
  }

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

@media (max-width: 480px) {
  .card-grid,
  .feature-grid {
    grid-template-columns: 1fr;
  }

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

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

  .hero-img {
    max-width: 100%;
  }

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