/* ========== CSS VARIABLES ========== */
:root {
  /* Primary palette */
  --pink: #F48FB1;
  --pink-light: #FCE4EC;
  --pink-dark: #EC407A;
  --cream: #FFF8E1;
  --cream-dark: #FFF3CD;
  --choco: #6D4C41;
  --choco-light: #8D6E63;
  --choco-dark: #4E342E;
  --mint: #81C784;
  --mint-light: #C8E6C9;
  --mint-dark: #66BB6A;
  
  /* Neutral */
  --white: #FFFFFF;
  --bg: #FFFDF7;
  --bg-warm: #FFF8E1;
  --bg-card: #FFFFFF;
  --text: #4E342E;
  --text-soft: #8D6E63;
  --text-muted: #A1887F;
  --border: #EFEBE9;
  --border-soft: #F5F0EC;
  
  /* Shadow */
  --shadow-sm: 0 2px 8px rgba(109, 76, 65, 0.08);
  --shadow-md: 0 4px 16px rgba(109, 76, 65, 0.12);
  --shadow-lg: 0 8px 32px rgba(109, 76, 65, 0.16);
  
  /* Radius */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  
  /* Fonts */
  --font-serif: 'Noto Serif SC', 'STSong', 'SimSun', 'Songti SC', serif;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  
  /* 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: var(--bg);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

/* ========== TYPOGRAPHY ========== */
h1, h2, h3, h4 { font-family: var(--font-serif); }
h1 { font-size: 2.4rem; font-weight: 700; color: var(--choco-dark); }
h2 { font-size: 1.8rem; font-weight: 600; color: var(--choco); margin-bottom: 12px; }
h3 { font-size: 1.3rem; font-weight: 600; color: var(--choco); margin-bottom: 8px; }
p { margin-bottom: 14px; color: var(--text-soft); }

a { color: var(--pink-dark); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--pink); }

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

/* ========== HEADER ========== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(135deg, var(--choco-dark), var(--choco));
  border-bottom: 3px solid var(--pink);
  box-shadow: var(--shadow-md);
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--cream);
  text-decoration: none;
}
.site-logo:hover { color: var(--pink-light); }
.logo-paw { font-size: 1.5rem; }

.nav-list {
  display: flex;
  list-style: none;
  gap: 8px;
  align-items: center;
}
.nav-list a {
  color: var(--cream-dark);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  transition: all 0.2s;
}
.nav-list a:hover, .nav-list a.active {
  background: rgba(255,255,255,0.12);
  color: var(--white);
}

.nav-cta {
  background: linear-gradient(135deg, var(--pink), var(--pink-dark)) !important;
  color: var(--white) !important;
  font-weight: 600;
  padding: 8px 20px !important;
  border-radius: 50px !important;
  box-shadow: 0 2px 8px rgba(244, 143, 177, 0.4);
  transition: all 0.3s !important;
}
.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(244, 143, 177, 0.5);
  background: linear-gradient(135deg, var(--pink-dark), var(--pink)) !important;
}

/* Mobile nav */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--cream);
  border-radius: 2px;
  transition: all 0.3s;
}
.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;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 500px;
}
.hero-subpage { min-height: 280px; padding: 40px 24px 48px; }
.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(180deg, rgba(78,52,46,0.75) 0%, rgba(109,76,65,0.6) 100%);
}
.hero-overlay {
  position: relative;
  z-index: 1;
  padding: 80px 24px 60px;
  max-width: 700px;
}
.hero-subpage .hero-overlay { padding: 20px 24px; }

.hero-tag {
  display: inline-block;
  background: rgba(244, 143, 177, 0.3);
  color: var(--cream);
  border: 1px solid rgba(244, 143, 177, 0.5);
  padding: 4px 16px;
  border-radius: 50px;
  font-size: 0.85rem;
  margin-bottom: 20px;
  backdrop-filter: blur(4px);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}
.hero-title-main {
  font-family: var(--font-serif);
  font-size: 3rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 14px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.3);
  line-height: 1.3;
}
.hero-subtitle {
  font-size: 1.15rem;
  color: var(--cream-dark);
  margin-bottom: 10px;
  opacity: 0.9;
}
.hero-tagline {
  font-size: 1rem;
  color: var(--pink-light);
  opacity: 0.85;
  line-height: 1.6;
}
.hero-subpage-title {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--white);
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* Hero page-specific backgrounds */
.hero-home .hero-bg { background-image: url('../img/header.jpg'); }
.hero-story .hero-bg { background-image: url('../img/screenshot-03.jpg'); }
.hero-characters .hero-bg { background-image: url('../img/screenshot-01.jpg'); }
.hero-guide .hero-bg { background-image: url('../img/screenshot-04.jpg'); }
.hero-faq .hero-bg { background-image: url('../img/header.jpg'); }

/* ========== CONTENT SECTIONS ========== */
.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;
}
.section-header {
  text-align: center;
  margin-bottom: 48px;
}
.section-header-features { padding-top: 20px; }
.section-header h2 { margin-bottom: 8px; }
.section-header p { color: var(--text-muted); font-size: 1.05rem; max-width: 600px; margin: 0 auto; }

.section-divider {
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--pink), var(--mint));
  border-radius: 2px;
  margin: 8px auto 16px;
}

/* ========== FEATURE CARDS ========== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 0 24px 60px;
  max-width: var(--max-width);
  margin: 0 auto;
}
.feature-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-soft);
  transition: all 0.3s;
  border-left: 4px solid var(--pink);
}
.feature-card:nth-child(3n+2) { border-left-color: var(--mint); }
.feature-card:nth-child(3n) { border-left-color: var(--choco-light); }
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
}
.feature-card h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
  color: var(--choco);
}
.feature-card p {
  font-size: 0.93rem;
  color: var(--text-muted);
  margin: 0;
}

/* ========== SCREENSHOT GALLERY ========== */
.gallery-section {
  background: linear-gradient(180deg, var(--bg-warm), var(--bg));
  padding: 60px 24px;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: var(--max-width);
  margin: 0 auto;
}
.gallery-item {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all 0.3s;
  aspect-ratio: 16/9;
}
.gallery-item:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-md);
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ========== REVIEWS ========== */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}
.review-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-soft);
}
.review-stars {
  color: var(--pink-dark);
  font-size: 1.1rem;
  margin-bottom: 12px;
}
.review-text {
  font-style: italic;
  color: var(--text-soft);
  font-size: 0.95rem;
  margin-bottom: 16px;
}
.review-author {
  font-weight: 600;
  color: var(--choco);
  font-size: 0.9rem;
}

/* ========== CTA BANNER (index-only) ========== */
.cta-banner {
  background: linear-gradient(135deg, var(--pink), var(--pink-dark));
  padding: 60px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: '🐾';
  position: absolute;
  font-size: 8rem;
  opacity: 0.08;
  top: -20px;
  right: 10%;
  transform: rotate(15deg);
}
.cta-banner h2 {
  color: var(--white);
  font-size: 2rem;
  margin-bottom: 12px;
}
.cta-banner p {
  color: var(--cream);
  opacity: 0.9;
  font-size: 1.05rem;
  max-width: 500px;
  margin: 0 auto 28px;
}
.cta-btn {
  display: inline-block;
  background: var(--white);
  color: var(--pink-dark);
  padding: 14px 48px;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  transition: all 0.3s;
}
.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(0,0,0,0.2);
  color: var(--pink-dark);
}

/* ========== STORY PAGE ========== */
.story-chapter {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 28px 28px 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--pink);
  border: 1px solid var(--border-soft);
}
.story-chapter:nth-child(odd) { border-left-color: var(--pink); }
.story-chapter:nth-child(even) { border-left-color: var(--mint); }
.chapter-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--choco);
  margin-bottom: 8px;
}
.chapter-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

/* ========== CHARACTER CARDS ========== */
.char-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.char-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-soft);
  transition: all 0.3s;
}
.char-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.char-card-img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  background: linear-gradient(135deg, var(--pink-light), var(--mint-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
}
.char-card-body {
  padding: 20px;
}
.char-card-body h3 {
  font-size: 1.2rem;
  margin-bottom: 4px;
}
.char-role {
  font-size: 0.85rem;
  color: var(--pink-dark);
  font-weight: 600;
  margin-bottom: 10px;
}
.char-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.6;
}
.char-traits {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.char-trait {
  background: var(--mint-light);
  color: var(--choco);
  padding: 3px 12px;
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 500;
}
.char-trait:nth-child(odd) { background: var(--pink-light); }

.section-subheading {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--choco);
  text-align: center;
  margin: 40px 0 24px;
}

/* ========== GUIDE PAGE ========== */
.guide-section {
  margin-bottom: 40px;
}
.guide-intro {
  font-size: 1.05rem;
  color: var(--text-soft);
  margin-bottom: 24px;
  line-height: 1.8;
}
.guide-step {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 24px 24px 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-soft);
  position: relative;
  padding-left: 64px;
}
.guide-step-num {
  position: absolute;
  left: 20px;
  top: 22px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pink), var(--pink-dark));
  color: var(--white);
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.guide-step h3 { margin-bottom: 6px; }
.guide-step p { margin-bottom: 0; color: var(--text-muted); }
.route-desc { font-size: 0.95rem; color: var(--text-soft); margin-bottom: 16px; }
.faq-answer p { font-size: 0.95rem; color: var(--text-muted); margin-bottom: 0; }
.sys-note { margin-top: 20px; color: var(--text-muted); font-size: 0.9rem; }
.route-heading {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--pink-dark);
  margin: 20px 0 8px;
}
.tip-box {
  background: var(--mint-light);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin: 16px 0;
  border-left: 4px solid var(--mint);
}
.tip-box strong { color: var(--choco); }
.tip-box p { margin-bottom: 0; color: var(--choco-light); }

/* ========== FAQ ACCORDION ========== */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-soft);
  overflow: hidden;
}
.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 20px 24px;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  color: var(--choco);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.faq-question::after {
  content: '+';
  font-size: 1.4rem;
  color: var(--pink);
  transition: transform 0.3s;
  flex-shrink: 0;
}
.faq-item.active .faq-question::after {
  content: '−';
  transform: rotate(0);
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  padding: 0 24px;
}
.faq-item.active .faq-answer {
  max-height: 400px;
  padding: 0 24px 20px;
}
.faq-answer p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 0;
}
.table-scroll { width: 100%; overflow-x: auto; margin: 20px 0; }
.specs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.93rem;
}
.specs-table th, .specs-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.specs-table th {
  background: var(--bg-warm);
  color: var(--choco);
  font-weight: 600;
}
.specs-table td { color: var(--text-soft); }
.specs-table tr:last-child td { border-bottom: none; }
.sys-reqs-h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--choco);
  margin: 28px 0 12px;
}
.sys-reqs-h3:first-of-type { margin-top: 0; }

/* ========== UTILITY CLASSES ========== */
.content-list { list-style: disc; padding-left: 20px; color: var(--text-soft); margin-bottom: 16px; }
.content-list-num { list-style: decimal; padding-left: 24px; color: var(--text-soft); margin-bottom: 16px; }
.content-li { margin-bottom: 5px; color: var(--text-soft); }
.content-li-sm { margin-bottom: 4px; color: var(--text-soft); font-size: 0.9rem; }
.content-li-md { margin-bottom: 8px; color: var(--text-soft); }
.content-li-lg { margin-bottom: 10px; color: var(--text-soft); font-size: 1.05rem; }
.strong-pink { color: var(--pink-dark); }
.strong-mint { color: var(--mint-dark); }
.strong-gold { color: #FF8F00; }
.strong-choco { color: var(--choco); }
.td-highlight { color: var(--pink-dark); font-weight: 700; }
.prose { max-width: 800px; margin: 0 auto; }
.section-alt { background: var(--bg-warm); }

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

/* ========== FOOTER ========== */
.site-footer {
  background: var(--choco-dark);
  padding: 32px 24px;
  text-align: center;
}
.site-footer p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 0;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .hamburger { display: flex; }
  .nav-list {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--choco-dark);
    padding: 16px 24px;
    gap: 4px;
    box-shadow: var(--shadow-md);
  }
  .nav-list.open { display: flex; }
  
  .hero-title-main { font-size: 2rem; }
  .hero { min-height: 360px; }
  .hero-subpage { min-height: 200px; }
  .hero-subpage-title { font-size: 1.5rem; }
  
  .features-grid, .reviews-grid, .char-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .content-section { padding: 40px 20px; }
  
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.5rem; }
  .content-section h2 { font-size: 1.5rem; }
  
  .cta-banner h2 { font-size: 1.5rem; }
}

@media (max-width: 480px) {
  .hero-title-main { font-size: 1.6rem; }
  .hero { min-height: 300px; }
  .hero-subpage { min-height: 160px; }
  .gallery-grid { grid-template-columns: 1fr; }
  .content-section { padding: 32px 16px; }
  .cta-btn { padding: 12px 36px; font-size: 1rem; }
}
