/* ============================================
   农民的追求 (Farmer's Quest) — Rustic Farm/Fantasy Theme
   Warm earth tones, harvest gold, field greens, barn red accents
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
  --bg: #faf5eb;
  --bg-card: #fff9f2;
  --bg-alt: #f3ede3;
  --bg-header: #3e2723;
  --bg-hero: linear-gradient(135deg, #3e2723 0%, #4e3422 35%, #5c3d2e 100%);
  --text: #4a3728;
  --text-muted: #8b7355;
  --text-light: #b8a088;
  --accent: #c43a31;
  --accent-hover: #a8322a;
  --accent-light: rgba(196, 58, 49, 0.1);
  --gold: #b8860b;
  --gold-light: #d4a843;
  --gold-bg: rgba(184, 134, 11, 0.1);
  --green: #6b8f3b;
  --green-light: #8aad5a;
  --green-bg: rgba(107, 143, 59, 0.1);
  --brown: #5c3d2e;
  --brown-light: #8b6914;
  --border: #d4c5b2;
  --border-light: #e8dcc8;
  --shadow: 0 2px 12px rgba(92, 61, 46, 0.08);
  --shadow-lg: 0 8px 32px rgba(92, 61, 46, 0.12);
  --radius: 8px;
  --radius-lg: 12px;
  --font-main: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-display: 'Noto Serif SC', 'SimSun', 'STSong', serif;
  --max-width: 1100px;
  --header-height: 64px;
  --transition: 0.2s ease;
}

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

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

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

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 { font-family: var(--font-display); color: var(--brown); line-height: 1.35; }
h1 { font-size: 2.4rem; margin-bottom: 0.5rem; }
h2 { font-size: 1.8rem; margin: 2.5rem 0 1rem; padding-bottom: 0.5rem; border-bottom: 2px solid var(--border); }
h3 { font-size: 1.3rem; margin: 1.5rem 0 0.75rem; color: var(--accent); }
h4 { font-size: 1.1rem; margin: 1rem 0 0.5rem; }

p { margin-bottom: 1rem; }

/* --- Header --- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg-header);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  height: var(--header-height);
}

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

.header-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: #f5e6d3;
  text-decoration: none;
}
.header-logo:hover { color: var(--gold-light); }

.header-logo-img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold);
}

.header-nav { display: flex; align-items: center; gap: 1.75rem; }

.header-nav a {
  color: #d4c5b2;
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
  padding: 0.25rem 0;
}
.header-nav a:hover,
.header-nav a.active { color: var(--gold-light); }
.header-nav a.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gold);
  border-radius: 1px;
}

/* CTA button in header */
.nav-cta {
  background: var(--accent) !important;
  color: #fff !important;
  padding: 0.45rem 1.25rem !important;
  border-radius: var(--radius) !important;
  font-weight: 600 !important;
  transition: background var(--transition) !important;
}
.nav-cta:hover { background: var(--accent-hover) !important; color: #fff !important; }
.nav-cta::after { display: none !important; }

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #d4c5b2;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
}

/* --- Hero Section --- */
.hero {
  background: var(--bg-hero);
  color: #f5e6d3;
  padding: 4rem 1.5rem 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 80%, rgba(184, 134, 11, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(196, 58, 49, 0.12) 0%, transparent 50%);
  pointer-events: none;
}

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

.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 20px;
  padding: 0.3rem 1rem;
  font-size: 0.8rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  color: var(--gold-light);
}

.hero h1 {
  color: #f5e6d3;
  font-size: 2.8rem;
  margin-bottom: 1rem;
  border: none;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.hero-subtitle {
  font-size: 1.1rem;
  color: #d4c5b2;
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.hero-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.75rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); color: #fff; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(196, 58, 49, 0.3); }

.btn-secondary {
  background: transparent;
  color: #f5e6d3;
  border: 1.5px solid rgba(245, 230, 211, 0.4);
}
.btn-secondary:hover { border-color: var(--gold-light); color: var(--gold-light); }

.hero-visual {
  margin-top: 2.5rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Layout --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section { padding: 3rem 0; }
.section-alt { background: var(--bg-alt); }

/* --- Info Grid --- */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
}

.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
  transition: all var(--transition);
}
.info-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }

.info-card-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.25rem;
}
.info-card-value { font-weight: 600; color: var(--brown); font-size: 1rem; }

/* --- 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-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: all var(--transition);
}
.feature-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }

.feature-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
  background: var(--accent-light);
  color: var(--accent);
}

.feature-card h3 { margin-top: 0; font-size: 1.15rem; }
.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(280px, 1fr));
  gap: 1.25rem;
}

.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  background: var(--bg-card);
}
.gallery-item:hover { border-color: var(--accent); box-shadow: var(--shadow-lg); transform: scale(1.02); }

.gallery-item img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  display: block;
}

.gallery-caption {
  padding: 0.6rem 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}

/* --- Guide Steps --- */
.guide-steps { counter-reset: step; list-style: none; }

.guide-step {
  counter-increment: step;
  display: flex;
  gap: 1.25rem;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  transition: all var(--transition);
}
.guide-step:hover { box-shadow: var(--shadow); }

.guide-step-num {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
}

.guide-step-content h4 { margin: 0 0 0.35rem; font-size: 1.05rem; }
.guide-step-content p { margin: 0; color: var(--text-muted); font-size: 0.92rem; }

/* --- Character Cards --- */
.char-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 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 var(--transition);
}
.char-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }

.char-card-header {
  background: var(--bg-alt);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid var(--border-light);
}

.char-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.char-name { font-weight: 700; color: var(--brown); font-size: 1.05rem; }
.char-role { font-size: 0.8rem; color: var(--accent); font-weight: 500; }

.char-card-body { padding: 1.25rem; }
.char-card-body p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 0; }

/* --- Story Blocks --- */
.story-block {
  background: var(--bg-card);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: all var(--transition);
}
.story-block:hover { box-shadow: var(--shadow); }

.story-block h3 { margin-top: 0; color: var(--brown); border-bottom: none; padding-bottom: 0; }
.story-block p { color: var(--text-muted); margin-bottom: 0; }

.story-chapter { color: var(--gold); font-weight: 700; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 0.25rem; }

/* --- Tags --- */
.tag-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.tag {
  display: inline-block;
  padding: 0.25rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  background: var(--accent-light);
  color: var(--accent);
}
.tag-gold { background: var(--gold-bg); color: var(--gold); }
.tag-green { background: var(--green-bg); color: var(--green); }

/* --- FAQ Accordion --- */
.faq-list { max-width: 800px; margin: 0 auto; }

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  padding: 1rem 1.25rem;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  color: var(--brown);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-main);
  line-height: 1.5;
}

.faq-question:hover { color: var(--accent); }

.faq-icon {
  flex-shrink: 0;
  font-size: 1.2rem;
  transition: transform var(--transition);
  color: var(--text-muted);
}
.faq-item.open .faq-icon { transform: rotate(45deg); color: var(--accent); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}
.faq-item.open .faq-answer { max-height: 400px; }

.faq-answer-inner {
  padding: 0 1.25rem 1.25rem;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.7;
}
.faq-answer-inner ul,
.faq-answer-inner ol {
  margin-top: 0.5rem;
  padding-left: 1.25rem;
  color: var(--text-muted);
}
.faq-answer-inner .faq-note {
  margin-top: 0.5rem;
}

/* --- CTA Banner --- */
.cta-banner {
  background: var(--bg-hero);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  text-align: center;
  color: #f5e6d3;
  margin: 2rem 0;
}

.cta-banner h2 {
  color: #f5e6d3;
  border: none;
  margin-top: 0;
  font-size: 1.6rem;
}
.cta-banner p { color: #d4c5b2; max-width: 500px; margin: 0.5rem auto 1.5rem; }

/* --- Breadcrumbs --- */
.breadcrumbs {
  padding: 1rem 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs span { color: var(--brown); font-weight: 500; }

/* --- Blockquote --- */
blockquote {
  background: var(--bg-alt);
  border-left: 4px solid var(--gold);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-muted);
  font-style: italic;
}

/* --- Table (for version info) --- */
.table-wrap { overflow-x: auto; margin: 1.5rem 0; }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid var(--border-light); }
th { background: var(--bg-alt); color: var(--brown); font-weight: 600; }
tr:hover td { background: var(--bg-card); }

/* --- Supply Checklist --- */
.checklist { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0.5rem; }
.checklist li {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  color: var(--brown);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.checklist-icon { color: var(--green); font-weight: 700; }

/* --- Tip Box --- */
.tip-box {
  background: var(--gold-bg);
  border: 1px solid rgba(184, 134, 11, 0.25);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}
.tip-box-title { font-weight: 700; color: var(--gold); margin-bottom: 0.25rem; font-size: 0.9rem; }
.tip-box p { margin: 0; color: var(--text-muted); font-size: 0.9rem; }

/* --- Update Timeline --- */
.update-item {
  display: flex;
  gap: 1.25rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border-light);
}
.update-item:last-child { border-bottom: none; }

.update-version {
  flex-shrink: 0;
  background: var(--accent);
  color: #fff;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.85rem;
  height: fit-content;
}

.update-content h4 { margin: 0 0 0.35rem; font-size: 1rem; }
.update-content p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 0; }

/* --- Lightbox --- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.lightbox.show { display: flex; }

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  color: #fff;
  font-size: 2rem;
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
  opacity: 0.7;
  transition: opacity var(--transition);
}
.lightbox-close:hover { opacity: 1; }

/* --- Footer --- */
.site-footer {
  background: var(--bg-header);
  color: #b8a088;
  padding: 2rem 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  margin-top: 3rem;
}
.site-footer p { margin-bottom: 0.25rem; }

.justify-center { justify-content: center; }

/* --- Utility --- */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mx-auto { max-width: 800px; margin-left: auto; margin-right: auto; }

/* --- Responsive --- */
@media (max-width: 768px) {
  :root { --header-height: 56px; }
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.4rem; }
  h3 { font-size: 1.15rem; }

  .header-nav { display: none; }
  .header-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--bg-header);
    padding: 1rem 1.5rem;
    gap: 0.75rem;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  }
  .menu-toggle { display: block; }

  .hero h1 { font-size: 2rem; }
  .hero-subtitle { font-size: 0.95rem; }

  .guide-step { flex-direction: column; gap: 0.75rem; }

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

@media (max-width: 480px) {
  .hero { padding: 2.5rem 1rem 2rem; }
  .hero h1 { font-size: 1.6rem; }
  .hero-buttons { flex-direction: column; align-items: center; }
  .info-grid { grid-template-columns: 1fr; }
  .checklist { grid-template-columns: 1fr; }
}
