/* ========== CSS VARIABLES ========== */
:root {
  /* Magical Forest Palette */
  --forest-green: #2E7D32;
  --forest-dark: #1B5E20;
  --forest-light: #66BB6A;
  --flower-pink: #E91E63;
  --pink-soft: #F48FB1;
  --sunshine-gold: #FFD54F;
  --gold-deep: #F9A825;
  --forest-bg: #F1F8E9;
  --bg-white: #FFFFFF;
  --bg-warm: #FFFDE7;
  --text: #1B1B1B;
  --text-soft: #5D6D5D;
  --text-muted: #8A9A8A;
  --border: #C8E6C9;
  --shadow: rgba(46, 125, 50, 0.12);
  --shadow-lg: rgba(46, 125, 50, 0.20);

  --font-sans: 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
  --font-serif: 'Noto Serif SC', 'SimSun', 'STSong', serif;
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.25s ease;
  --max-width: 1200px;
}

/* ========== 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(--forest-bg);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--forest-green); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--flower-pink); }
ul, ol { list-style: none; }

/* ========== UTILITY CLASSES ========== */
.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;
}
.prose { max-width: 800px; margin: 0 auto; }
.section-alt { background: var(--bg-warm); padding: 60px 24px; }
.section-default { padding: 60px 24px; }
.content-section { max-width: var(--max-width); margin: 0 auto; padding: 60px 24px; }
.content-section h2 { font-family: var(--font-serif); font-size: 2.2rem; font-weight: 700; color: var(--text); margin-bottom: 12px; }
.content-section h3 { font-family: var(--font-serif); font-size: 1.5rem; color: var(--forest-green); margin: 32px 0 12px; }
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* Content list utilities */
.content-list { list-style: disc; padding-left: 24px; }
.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); }

/* Strong highlight colors */
.strong-pink { color: var(--flower-pink); }
.strong-gold { color: var(--gold-deep); }
.strong-green { color: var(--forest-green); }
.strong-muted { color: var(--text-muted); }

/* Chapter sub-headings */
.chapter-title { font-family: var(--font-serif); font-size: 1.35rem; font-weight: 600; color: var(--forest-dark); margin: 28px 0 8px; }

/* Guide page utilities */
.guide-intro { color: var(--text-soft); font-size: 1.05rem; margin-bottom: 24px; line-height: 1.85; }
.route-desc { color: var(--text-soft); margin-bottom: 16px; }
.route-heading { font-family: var(--font-serif); font-size: 1.3rem; color: var(--flower-pink); margin: 20px 0 8px; }

/* System requirements */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.sys-reqs-h3 { font-family: var(--font-serif); font-size: 1.2rem; color: var(--forest-dark); margin: 24px 0 12px; }
.sys-reqs-h3:first-of-type { margin-top: 0; }

/* Table highlight */
.td-highlight { color: var(--flower-pink); font-weight: 700; }

/* Section subheading */
.section-subheading { text-align: center; margin: 40px 0 24px; font-family: var(--font-serif); font-size: 1.6rem; color: var(--forest-dark); }

/* Section heading + subtext (for centered h2 + p pairs) */
.section-heading { text-align: center; font-family: var(--font-serif); font-size: 2rem; color: var(--forest-dark); margin-bottom: 8px; }
.section-subtext { text-align: center; color: var(--text-soft); margin-bottom: 24px; }
.section-heading-alt { text-align: center; font-family: var(--font-serif); font-size: 2rem; color: var(--forest-dark); margin-bottom: 20px; }
.guide-intro-top { margin-top: 16px; }

/* ========== HEADER ========== */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: var(--forest-dark);
  border-bottom: 3px solid var(--sunshine-gold);
  box-shadow: 0 2px 12px var(--shadow);
}
.header-inner {
  max-width: var(--max-width); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; height: 64px;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo img { width: 36px; height: 36px; border-radius: 6px; }
.logo span { font-family: var(--font-serif); font-size: 1.25rem; font-weight: 700; color: var(--sunshine-gold); }
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-links a {
  color: #C8E6C9; padding: 8px 16px; border-radius: var(--radius-sm);
  font-size: 0.95rem; font-weight: 500; white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active { color: var(--sunshine-gold); background: rgba(255,255,255,0.08); }
.nav-cta {
  background: var(--sunshine-gold) !important; color: var(--forest-dark) !important;
  font-weight: 700 !important; border-radius: var(--radius-sm) !important;
  padding: 8px 20px !important;
}
.nav-cta:hover { background: var(--gold-deep) !important; color: var(--forest-dark) !important; }
.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--sunshine-gold); border-radius: 2px; transition: var(--transition); }

/* ========== HERO ========== */
.hero {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  text-align: center; min-height: 420px;
}
.hero-home { min-height: 560px; }
.hero-subpage { padding: 40px 24px 48px; min-height: 240px; }
.hero-bg {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  z-index: 0;
}
.hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(27,94,32,0.82) 0%, rgba(46,125,50,0.65) 50%, rgba(233,30,99,0.25) 100%);
}
.hero-content { position: relative; z-index: 1; color: #fff; max-width: 800px; padding: 0 24px; }
.hero-title-main {
  font-family: var(--font-serif); font-size: 3.6rem; font-weight: 700;
  color: #fff; text-shadow: 0 2px 16px rgba(0,0,0,0.4); margin-bottom: 8px;
  line-height: 1.2;
}
.hero-subtitle { font-size: 1.3rem; opacity: 0.92; margin-bottom: 12px; }
.hero-tagline { color: var(--sunshine-gold); font-size: 1.1rem; font-weight: 500; margin-bottom: 4px; letter-spacing: 0.5px; }
.hero-subpage-title { font-size: 2rem; font-weight: 700; }

/* ========== CARDS ========== */
.card-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px; margin-top: 40px;
}
.card {
  background: #fff; border-radius: var(--radius);
  border-left: 4px solid var(--forest-green);
  box-shadow: 0 2px 12px var(--shadow);
  padding: 28px; transition: var(--transition);
}
.card:hover { transform: translateY(-3px); box-shadow: 0 6px 24px var(--shadow-lg); }
.card-icon { font-size: 2.2rem; margin-bottom: 12px; }
.card h3 { font-family: var(--font-serif); font-size: 1.25rem; color: var(--forest-dark); margin-bottom: 8px; }
.card p { color: var(--text-soft); font-size: 0.95rem; line-height: 1.7; }

/* ========== SCREENSHOT GALLERY ========== */
.gallery-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px; margin-top: 32px;
}
.gallery-grid img {
  border-radius: var(--radius-sm); cursor: pointer;
  transition: transform 0.2s ease; box-shadow: 0 2px 8px var(--shadow);
  width: 100%; aspect-ratio: 16/9; object-fit: cover;
}
.gallery-grid img:hover { transform: scale(1.03); }

/* ========== REVIEWS ========== */
.reviews-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px; margin-top: 32px;
}
.review-card {
  background: #fff; border-radius: var(--radius);
  padding: 24px; box-shadow: 0 2px 8px var(--shadow);
  position: relative;
}
.review-card::before { content: '\201C'; font-family: var(--font-serif); font-size: 3rem; color: var(--forest-light); position: absolute; top: 8px; left: 16px; line-height: 1; }
.review-text { color: var(--text-soft); font-size: 0.95rem; line-height: 1.75; padding-top: 16px; margin-bottom: 12px; }
.review-author { color: var(--forest-green); font-weight: 600; font-size: 0.9rem; }

/* ========== CTA BANNER (index only) ========== */
.cta-banner {
  background: linear-gradient(135deg, var(--forest-dark) 0%, var(--forest-green) 100%);
  padding: 60px 24px; text-align: center; color: #fff;
}
.cta-banner h2 { font-family: var(--font-serif); font-size: 2rem; margin-bottom: 12px; }
.cta-banner p { font-size: 1.1rem; opacity: 0.88; margin-bottom: 24px; max-width: 600px; margin-left: auto; margin-right: auto; }
.btn-primary {
  display: inline-block; background: var(--sunshine-gold); color: var(--forest-dark);
  font-weight: 700; font-size: 1.15rem; padding: 14px 40px; border-radius: 50px;
  box-shadow: 0 4px 16px rgba(255,213,79,0.4); transition: var(--transition);
}
.btn-primary:hover { background: var(--gold-deep); color: var(--forest-dark); transform: translateY(-2px); box-shadow: 0 6px 24px rgba(255,213,79,0.5); }

/* ========== FAQ ACCORDION ========== */
.faq-list { margin-top: 24px; }
.faq-item {
  background: #fff; border-radius: var(--radius-sm);
  margin-bottom: 12px; box-shadow: 0 1px 6px var(--shadow);
  overflow: hidden;
}
.faq-question {
  width: 100%; background: none; border: none; text-align: left;
  padding: 18px 24px; font-size: 1.05rem; font-weight: 600;
  color: var(--forest-dark); cursor: pointer; display: flex;
  align-items: center; justify-content: space-between;
  font-family: var(--font-sans);
}
.faq-question:hover { background: var(--forest-bg); }
.faq-question::after { content: '+'; font-size: 1.5rem; color: var(--forest-green); font-weight: 300; transition: var(--transition); }
.faq-item.open .faq-question::after { content: '\2212'; }
.faq-answer {
  max-height: 0; overflow: hidden; transition: max-height 0.35s ease;
  padding: 0 24px; color: var(--text-soft); line-height: 1.75;
}
.faq-item.open .faq-answer { max-height: 500px; padding: 0 24px 18px; }

/* ========== CHARACTER CARDS ========== */
.char-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px; margin-top: 32px;
}
.char-card {
  background: #fff; border-radius: var(--radius);
  overflow: hidden; box-shadow: 0 2px 12px var(--shadow);
  transition: var(--transition);
}
.char-card:hover { transform: translateY(-3px); box-shadow: 0 6px 24px var(--shadow-lg); }
.char-card img { width: 100%; height: 280px; object-fit: cover; }
.char-card-body { padding: 20px; }
.char-card-body h3 { font-family: var(--font-serif); font-size: 1.2rem; color: var(--forest-dark); margin-bottom: 4px; }
.char-role { color: var(--flower-pink); font-size: 0.85rem; font-weight: 600; margin-bottom: 8px; }
.char-card-body p { color: var(--text-soft); font-size: 0.9rem; line-height: 1.7; }

/* ========== STATS TABLE ========== */
.stats-table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 0.95rem; }
.stats-table th { background: var(--forest-dark); color: #fff; padding: 12px 16px; text-align: left; font-weight: 600; }
.stats-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.stats-table tr:nth-child(even) td { background: var(--forest-bg); }

/* ========== TIPS BOX ========== */
.tip-box {
  background: linear-gradient(135deg, var(--bg-warm), #FFF8E1);
  border-left: 4px solid var(--sunshine-gold);
  border-radius: var(--radius-sm); padding: 20px 24px;
  margin: 20px 0; color: var(--forest-dark);
}
.tip-box strong { color: var(--gold-deep); }

/* ========== FOOTER ========== */
.site-footer {
  background: var(--forest-dark); color: #A5D6A7;
  text-align: center; padding: 24px;
  font-size: 0.9rem;
}

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

/* ========== HERO BG PER PAGE ========== */
.hero-home .hero-bg { background-image: url('../img/header.jpg'); }
.hero-guide .hero-bg { background-image: url('../img/screenshot-03.jpg'); }
.hero-story .hero-bg { background-image: url('../img/screenshot-01.jpg'); }
.hero-characters .hero-bg { background-image: url('../img/screenshot-02.jpg'); }
.hero-faq .hero-bg { background-image: url('../img/header.jpg'); }

/* ========== RESPONSIVE: 768px ========== */
@media (max-width: 768px) {
  .hamburger { display: flex; }
  .nav-links {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; background: var(--forest-dark);
    padding: 8px 24px 16px; gap: 4px;
    border-top: 1px solid rgba(255,255,255,0.1);
  }
  .nav-links.open { display: flex; }
  .hero-title-main { font-size: 2.4rem; }
  .hero-subtitle { font-size: 1.1rem; }
  .hero-home { min-height: 400px; }
  .hero-subpage { padding: 28px 16px 32px; min-height: 200px; }
  .hero-subpage-title { font-size: 1.6rem; }
  .card-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .reviews-grid { grid-template-columns: 1fr; }
  .char-grid { grid-template-columns: 1fr 1fr; }
  .content-section { padding: 40px 16px; }
  .content-section h2 { font-size: 1.8rem; }
  .cta-banner { padding: 40px 16px; }
  .cta-banner h2 { font-size: 1.5rem; }
  .section-alt { padding: 40px 16px; }
  .section-default { padding: 40px 16px; }
}

/* ========== RESPONSIVE: 480px ========== */
@media (max-width: 480px) {
  .hero-title-main { font-size: 1.8rem; }
  .hero-subtitle { font-size: 1rem; }
  .hero-home { min-height: 320px; }
  .hero-subpage-title { font-size: 1.35rem; }
  .gallery-grid { grid-template-columns: 1fr; }
  .char-grid { grid-template-columns: 1fr; }
  .btn-primary { font-size: 1rem; padding: 12px 28px; }
  .card { padding: 20px; }
  .logo span { font-size: 1rem; }
}
