/* ==========================================
   我的乡村日常生活 - Rural Pastoral Theme
   Warm afternoon-sun golds, barley-field ambers,
   rustic farmhouse simplicity, peaceful rhythm
   ========================================== */

:root {
  /* Base */
  --bg-cream: #FFF8F0;
  --bg-warm: #FEF5E7;
  --bg-card: #FFF3E0;
  --bg-header: rgba(92, 61, 46, 0.92);

  /* Colors */
  --gold: #D4A047;
  --gold-light: #E8C880;
  --amber: #C4883C;
  --amber-deep: #A0682C;
  --brown: #5C3D2E;
  --brown-dark: #3E2723;
  --rust: #8B5E3C;
  --rust-light: #A67B5B;
  --green-pastoral: #7A9D54;
  --green-soft: #8DB85C;
  --green-faded: #A8C97A;

  /* Text */
  --text-primary: #3E2723;
  --text-secondary: #6D4C2E;
  --text-muted: #8D7B6E;
  --text-light: #F5E6D3;
  --text-white: #FFFAF5;

  /* Accents */
  --accent-wheat: #E8D5A3;
  --accent-barley: #D4B87A;
  --accent-straw: #C9A852;
  --border-soft: #E0D0B8;
  --border-warm: #C4A882;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(92, 61, 46, 0.08);
  --shadow-md: 0 4px 16px rgba(92, 61, 46, 0.12);
  --shadow-lg: 0 8px 32px rgba(92, 61, 46, 0.15);

  /* Layout */
  --max-width: 1200px;
  --nav-height: 64px;
  --section-gap: 80px;
}

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

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

body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  background: var(--bg-cream);
  color: var(--text-primary);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

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

/* ========== HEADER / NAV ========== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: var(--bg-header);
  backdrop-filter: blur(12px);
  z-index: 1000;
  border-bottom: 1px solid rgba(212, 160, 71, 0.2);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-white);
  letter-spacing: 0.5px;
}

.logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  overflow: hidden;
}

.logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.main-nav { display: flex; align-items: center; gap: 8px; }

.main-nav a {
  padding: 8px 18px;
  border-radius: 20px;
  color: var(--text-light);
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.25s ease;
  position: relative;
}

.main-nav a:hover,
.main-nav a.active {
  background: rgba(212, 160, 71, 0.2);
  color: var(--gold-light);
}

.nav-cta {
  margin-left: 12px;
  padding: 8px 24px !important;
  background: linear-gradient(135deg, var(--gold), var(--amber)) !important;
  border-radius: 24px !important;
  color: var(--text-white) !important;
  font-weight: 600 !important;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 12px rgba(212, 160, 71, 0.3);
  transition: all 0.3s ease !important;
}

.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(212, 160, 71, 0.4);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  cursor: pointer;
  background: none;
  border: none;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-light);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ========== HERO ========== */
.hero {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-top: var(--nav-height);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 0;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(62, 39, 35, 0.35) 0%, rgba(92, 61, 46, 0.65) 100%);
}

.hero-overlay {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 60px 24px;
  max-width: 800px;
}

.hero-overlay h1 {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--text-white);
  margin-bottom: 12px;
  letter-spacing: 2px;
  text-shadow: 0 2px 16px rgba(0,0,0,0.3);
}

.hero-overlay .subtitle {
  font-size: 1.15rem;
  color: var(--accent-wheat);
  margin-bottom: 8px;
  font-weight: 400;
  letter-spacing: 1px;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 28px;
}

.hero-tags span {
  padding: 5px 16px;
  background: rgba(255, 248, 240, 0.15);
  border: 1px solid rgba(212, 160, 71, 0.4);
  border-radius: 20px;
  font-size: 0.9rem;
  color: var(--accent-wheat);
  backdrop-filter: blur(4px);
}

.hero-btn {
  display: inline-block;
  padding: 14px 48px;
  background: linear-gradient(135deg, var(--gold), var(--amber));
  border-radius: 30px;
  color: var(--text-white);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 1px;
  box-shadow: 0 4px 24px rgba(212, 160, 71, 0.4);
  transition: all 0.3s ease;
}

.hero-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(212, 160, 71, 0.5);
}

/* Page-specific hero backgrounds */
.hero-home .hero-bg { background-image: url('../img/screenshot-01.webp'); }
.hero-story .hero-bg { background-image: url('../img/screenshot-02.webp'); }
.hero-characters .hero-bg { background-image: url('../img/screenshot-01.webp'); }
.hero-guide .hero-bg { background-image: url('../img/screenshot-03.webp'); }
.hero-faq .hero-bg { background-image: url('../img/screenshot-02.webp'); }

/* ========== SECTIONS ========== */
main { margin-top: 0; }

.section {
  padding: var(--section-gap) 24px;
}

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--brown);
  margin-bottom: 8px;
  position: relative;
  display: inline-block;
}

.section-header h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--amber));
  margin: 12px auto 0;
  border-radius: 2px;
}

.section-header p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 12px auto 0;
}

/* ========== INTRO ========== */
.intro { background: var(--bg-warm); }

.intro-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.intro-text h3 {
  font-size: 1.5rem;
  color: var(--brown);
  margin-bottom: 16px;
}

.intro-text p {
  color: var(--text-secondary);
  margin-bottom: 12px;
  font-size: 1.02rem;
}

.intro-image {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.intro-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 16/10;
}

/* ========== FEATURE CARDS ========== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 32px 24px;
  text-align: center;
  transition: all 0.35s ease;
  box-shadow: var(--shadow-sm);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--gold);
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
  display: block;
}

.feature-card h3 {
  font-size: 1.15rem;
  color: var(--brown);
  margin-bottom: 8px;
}

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

/* ========== SCREENSHOTS GALLERY ========== */
.gallery { background: var(--bg-warm); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.gallery-item {
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.35s ease;
  aspect-ratio: 16/10;
}

.gallery-item:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-md);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-item:hover img {
  transform: scale(1.08);
}

/* ========== REVIEWS ========== */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.review-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.review-stars {
  color: var(--gold);
  font-size: 1.1rem;
  margin-bottom: 12px;
  letter-spacing: 2px;
}

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

.review-author {
  font-size: 0.9rem;
  color: var(--amber-deep);
  font-weight: 600;
}

/* ========== CTA SECTION ========== */
.cta-section {
  text-align: center;
  padding: 80px 24px;
  background: linear-gradient(135deg, var(--brown), var(--brown-dark));
}

.cta-section h2 {
  font-size: 2rem;
  color: var(--text-white);
  margin-bottom: 12px;
}

.cta-section p {
  color: var(--accent-wheat);
  margin-bottom: 32px;
  font-size: 1.05rem;
}

.cta-btn {
  display: inline-block;
  padding: 16px 56px;
  background: linear-gradient(135deg, var(--gold), var(--amber));
  border-radius: 32px;
  color: var(--text-white);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 1px;
  box-shadow: 0 4px 24px rgba(212, 160, 71, 0.5);
  transition: all 0.3s ease;
}

.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 36px rgba(212, 160, 71, 0.6);
}

/* ========== STORY PAGE ========== */
.story-timeline {
  position: relative;
  padding: 0;
}

.story-timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--gold), var(--amber), var(--rust));
  transform: translateX(-50%);
  border-radius: 1px;
}

.story-chapter {
  display: flex;
  align-items: flex-start;
  margin-bottom: 48px;
  position: relative;
}

.story-chapter:nth-child(odd) {
  flex-direction: row;
}

.story-chapter:nth-child(even) {
  flex-direction: row-reverse;
}

.chapter-marker {
  position: absolute;
  left: 50%;
  top: 24px;
  transform: translateX(-50%);
  width: 16px;
  height: 16px;
  background: var(--gold);
  border-radius: 50%;
  border: 3px solid var(--bg-cream);
  box-shadow: 0 0 0 3px var(--gold);
  z-index: 2;
}

.chapter-content {
  width: 45%;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.chapter-content:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--gold);
}

.chapter-content h3 {
  font-size: 1.2rem;
  color: var(--brown);
  margin-bottom: 6px;
}

.chapter-num {
  font-size: 0.85rem;
  color: var(--amber);
  font-weight: 600;
  margin-bottom: 10px;
  display: block;
}

.chapter-content p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ========== CHARACTERS PAGE ========== */
.chars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.char-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.35s ease;
}

.char-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--gold);
}

.char-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-wheat), var(--accent-barley));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 28px auto 16px;
  color: var(--brown);
}

.char-info {
  padding: 0 24px 24px;
  text-align: center;
}

.char-info h3 {
  font-size: 1.1rem;
  color: var(--brown);
  margin-bottom: 4px;
}

.char-role {
  font-size: 0.85rem;
  color: var(--amber);
  font-weight: 600;
  margin-bottom: 12px;
  display: block;
}

.char-info p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ========== GUIDE PAGE ========== */
.guide-section {
  margin-bottom: 48px;
}

.guide-section h3 {
  font-size: 1.4rem;
  color: var(--brown);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent-wheat);
}

.guide-section p {
  color: var(--text-secondary);
  margin-bottom: 12px;
  font-size: 1rem;
  line-height: 1.8;
}

.guide-tips {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 20px;
}

.guide-tip {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 20px;
}

.guide-tip h4 {
  font-size: 1rem;
  color: var(--brown);
  margin-bottom: 6px;
}

.guide-tip p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0;
}

.guide-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.guide-table th {
  background: var(--brown);
  color: var(--text-light);
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.95rem;
}

.guide-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text-secondary);
  font-size: 0.95rem;
  background: var(--bg-card);
}

.guide-table tr:last-child td {
  border-bottom: none;
}

.guide-table tr:hover td {
  background: var(--bg-warm);
}

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

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

.faq-question {
  width: 100%;
  padding: 20px 24px;
  text-align: left;
  background: none;
  border: none;
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--brown);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: inherit;
  gap: 16px;
}

.faq-question::after {
  content: '+';
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--gold);
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.faq-item.active .faq-question::after {
  content: '−';
  color: var(--amber);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
}

.faq-item.active .faq-answer {
  max-height: 400px;
}

.faq-answer-inner {
  padding: 0 24px 20px;
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 0.95rem;
}

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

.site-footer p {
  margin: 0;
  color: rgba(245, 230, 211, 0.5);
}

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

.lightbox.active {
  display: flex;
}

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

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 32px;
  font-size: 2rem;
  color: var(--text-white);
  cursor: pointer;
  background: none;
  border: none;
  z-index: 2001;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s;
}

.lightbox-close:hover {
  background: rgba(255,255,255,0.1);
}

/* ========== UTILITY CLASSES ========== */
.section-alt {
  background: var(--bg-warm);
  padding-top: 0;
}

.prose {
  max-width: 800px;
  margin: 0 auto;
}

.prose p {
  color: var(--text-secondary);
  margin-bottom: 20px;
  font-size: 1.02rem;
  line-height: 2;
}

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

  .hamburger { display: flex; }

  .main-nav {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--bg-header);
    flex-direction: column;
    padding: 16px 24px 24px;
    gap: 4px;
    transform: translateY(-120%);
    transition: transform 0.35s ease;
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(212, 160, 71, 0.2);
  }

  .main-nav.active { transform: translateY(0); }

  .main-nav a {
    display: block;
    text-align: center;
    padding: 12px 18px;
  }

  .nav-cta { margin-left: 0; margin-top: 8px; }

  .hero { min-height: 380px; }

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

  .intro-content { grid-template-columns: 1fr; gap: 32px; }

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

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

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

  .story-timeline::before { left: 24px; }

  .story-chapter,
  .story-chapter:nth-child(even) {
    flex-direction: column;
    padding-left: 56px;
  }

  .chapter-marker {
    left: 24px;
    transform: translateX(-50%);
  }

  .chapter-content { width: 100%; }

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

  .guide-tips { grid-template-columns: 1fr; }
}

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

  .hero-overlay h1 { font-size: 1.6rem; }

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

  .section-header h2 { font-size: 1.5rem; }

  .guide-table { font-size: 0.85rem; }

  .guide-table th,
  .guide-table td { padding: 10px 12px; }
}
