/* ================================================================
   甜心选择 | Sweetheart Choice
   Theme: Candy-wrapper pinks + chocolate-browns with gift-box bow motifs
   ================================================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Color palette — candy wrapper pinks */
  --bg: #fefcf5;
  --bg-card: #ffffff;
  --pink-light: #fce4ec;
  --pink-soft: #f8bbd0;
  --pink: #ec407a;
  --pink-fierce: #d81b60;
  --pink-dark: #ad1457;
  --pink-glow: #ff80ab;

  /* Chocolate browns */
  --chocolate-light: #8d6e63;
  --chocolate: #5d4037;
  --chocolate-dark: #3e2723;
  --chocolate-bg: #4e342e;

  /* Accent */
  --accent-gold: #f9a825;
  --accent-gold-light: #ffd54f;
  --danger-red: #c62828;
  --white: #ffffff;

  /* Text */
  --text: #3e2723;
  --text-soft: #6d4c41;
  --text-muted: #8d6e63;
  --text-on-dark: #f5f0eb;

  /* Fonts */
  --font-sans: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, -apple-system, sans-serif;
  --font-serif: 'Noto Serif SC', 'SimSun', 'STSong', 'Songti SC', serif;

  /* Spacing / layout */
  --max-width: 1200px;
  --header-height: 64px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 2px 16px rgba(62, 39, 35, 0.08);
  --shadow-lg: 0 8px 32px rgba(62, 39, 35, 0.12);
  --transition: 0.25s ease;
}

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

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

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* ---------- Confection background pattern ---------- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse at 20% 80%, rgba(248, 187, 208, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(141, 110, 99, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(255, 213, 79, 0.04) 0%, transparent 60%);
  pointer-events: none;
}

/* ================================================================
   HEADER
   ================================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(135deg, var(--chocolate-dark), var(--chocolate));
  border-bottom: 3px solid var(--pink-fierce);
  box-shadow: 0 2px 12px rgba(62, 39, 35, 0.2);
}

.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;
}

/* Logo — gift-box bow motif */
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  position: relative;
}

.logo-icon {
  width: 40px;
  height: 40px;
  position: relative;
}

/* Ribbon bow SVG-like via pseudo-elements */
.logo-icon::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 14px;
  top: 2px;
  left: 10px;
  background: var(--pink-fierce);
  border-radius: 50% 50% 4px 4px;
  transform: rotate(-30deg);
}

.logo-icon::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 14px;
  top: 2px;
  right: 10px;
  background: var(--pink-fierce);
  border-radius: 50% 50% 4px 4px;
  transform: rotate(30deg);
}

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

/* Nav */
.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  color: var(--text-on-dark);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  transition: background var(--transition), color var(--transition);
}

.nav-link:hover,
.nav-link.active {
  background: rgba(255, 255, 255, 0.12);
  color: var(--pink-soft);
}

/* Header CTA button — candy-wrapper pink */
.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--pink-fierce), var(--pink));
  color: var(--white);
  text-decoration: none;
  padding: 10px 22px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 12px rgba(216, 27, 96, 0.35);
  transition: transform var(--transition), box-shadow var(--transition);
}

.header-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(216, 27, 96, 0.45);
}

/* Gift-box bow on CTA */
.header-cta::before {
  content: '🎀';
  font-size: 1rem;
}

/* ================================================================
   HERO SECTION
   ================================================================ */
.hero {
  position: relative;
  background: linear-gradient(160deg, var(--chocolate-dark) 0%, #5d2e46 40%, var(--pink-dark) 100%);
  padding: 80px 24px 70px;
  text-align: center;
  overflow: hidden;
}

/* Gift-box ribbon overlays */
.hero::before {
  content: '';
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 40px solid transparent;
  border-right: 40px solid transparent;
  border-top: 50px solid var(--pink);
  opacity: 0.7;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 25% 30%, rgba(248, 187, 208, 0.15) 0%, transparent 30%),
    radial-gradient(circle at 75% 70%, rgba(255, 213, 79, 0.08) 0%, transparent 30%);
  pointer-events: none;
}

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

.hero-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  color: var(--accent-gold-light);
  padding: 6px 20px;
  border-radius: 999px;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  margin-bottom: 24px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.hero-title {
  font-family: var(--font-serif);
  font-size: 3.2rem;
  font-weight: 900;
  color: var(--white);
  line-height: 1.25;
  margin-bottom: 16px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--pink-soft);
  margin-bottom: 12px;
  font-weight: 400;
}

.hero-tagline {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.65);
  max-width: 600px;
  margin: 0 auto 32px;
}

.hero-meta {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.hero-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.9rem;
}

.hero-meta-item .meta-icon {
  font-size: 1.1rem;
}

/* ================================================================
   COMMON LAYOUT
   ================================================================ */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 64px 24px;
}

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

.section-header h2,
.content-section h2 {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--chocolate-dark);
  margin-bottom: 12px;
  position: relative;
  display: inline-block;
}

/* Gift-box bow under section titles */
.section-header h2::after,
.content-section h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--pink-fierce), var(--pink));
  border-radius: 2px;
  margin: 12px auto 0;
}

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

.content-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 64px 24px;
}

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

.feature-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 32px 24px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--pink);
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 60px;
  height: 60px;
  background: radial-gradient(circle, var(--pink-light) 0%, transparent 70%);
  opacity: 0.3;
  pointer-events: none;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

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

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

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

/* ================================================================
   SCREENSHOT GALLERY (index)
   ================================================================ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.gallery-grid.span-3 {
  grid-template-columns: repeat(3, 1fr);
}

.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
}

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

.gallery-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.gallery-item::after {
  content: '🔍';
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 1.2rem;
  opacity: 0;
  transition: opacity var(--transition);
}

.gallery-item:hover::after {
  opacity: 0.9;
}

/* Lightbox */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(30, 20, 18, 0.92);
  justify-content: center;
  align-items: center;
}

.lightbox-overlay.active {
  display: flex;
}

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

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 32px;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: var(--white);
  font-size: 1.8rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}

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

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

.review-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
  position: relative;
  border-top: 3px solid var(--accent-gold);
}

.review-card::before {
  content: '"';
  position: absolute;
  top: 12px;
  right: 20px;
  font-family: var(--font-serif);
  font-size: 3rem;
  color: var(--pink-light);
  line-height: 1;
}

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

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

.review-author {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* ================================================================
   CTA BANNER (index only)
   ================================================================ */
.cta-banner {
  background: linear-gradient(135deg, var(--chocolate-bg), var(--chocolate-dark));
  padding: 64px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 50%, rgba(236, 64, 122, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 70% 50%, rgba(249, 168, 37, 0.1) 0%, transparent 40%);
  pointer-events: none;
}

.cta-banner-inner {
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin: 0 auto;
}

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

.cta-banner p {
  color: var(--text-on-dark);
  font-size: 1.05rem;
  margin-bottom: 28px;
  opacity: 0.85;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--pink-fierce), var(--pink));
  color: var(--white);
  text-decoration: none;
  padding: 14px 40px;
  border-radius: 999px;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  box-shadow: 0 6px 24px rgba(216, 27, 96, 0.4);
  transition: transform var(--transition), box-shadow var(--transition);
}

.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(216, 27, 96, 0.55);
}

.cta-btn::before {
  content: '🎀';
}

/* ================================================================
   GUIDE PAGE
   ================================================================ */
.guide-section {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--chocolate-light);
}

.guide-section h3 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: var(--chocolate-dark);
  margin-bottom: 16px;
}

.guide-section h3 .step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--pink-fierce);
  color: var(--white);
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 700;
  margin-right: 10px;
  font-family: var(--font-sans);
}

.guide-intro {
  font-size: 1rem;
  color: var(--text-soft);
  line-height: 1.8;
  margin-bottom: 16px;
}

.tip-box {
  background: linear-gradient(135deg, #fff8e1, #fff3e0);
  border-left: 4px solid var(--accent-gold);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin: 16px 0;
}

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

.tip-box.pink-tip {
  background: linear-gradient(135deg, #fce4ec, #f8bbd0);
  border-left-color: var(--pink);
}

.route-heading {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--pink-dark);
  margin-top: 20px;
  margin-bottom: 8px;
}

.route-desc {
  font-size: 0.95rem;
  color: var(--text-soft);
  line-height: 1.8;
  margin-bottom: 12px;
}

/* ================================================================
   STORY PAGE
   ================================================================ */
.story-header-img {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 32px;
  box-shadow: var(--shadow-lg);
}

.chapter-title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--pink-fierce);
  margin-top: 28px;
  margin-bottom: 10px;
}

.story-block {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 28px 32px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--pink);
}

.story-block h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--chocolate-dark);
  margin-bottom: 10px;
}

.story-block p {
  color: var(--text-soft);
  line-height: 1.8;
}

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

.character-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

.character-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.character-card-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.character-card-body {
  padding: 20px;
}

.character-card-body h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--chocolate-dark);
  margin-bottom: 4px;
}

.character-card-body .char-role {
  font-size: 0.85rem;
  color: var(--pink-fierce);
  font-weight: 600;
  margin-bottom: 10px;
}

.character-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.char-tag {
  display: inline-block;
  background: var(--pink-light);
  color: var(--pink-dark);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
}

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

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

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

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

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

.faq-question:hover {
  background: var(--pink-light);
}

.faq-question .faq-arrow {
  font-size: 0.7rem;
  transition: transform var(--transition);
  color: var(--pink-fierce);
}

.faq-item.open .faq-question .faq-arrow {
  transform: rotate(180deg);
}

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

.faq-item.open .faq-answer {
  max-height: 500px;
}

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

/* System requirements table */
.sys-reqs-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  font-size: 0.9rem;
}

.sys-reqs-table th,
.sys-reqs-table td {
  padding: 10px 14px;
  border: 1px solid var(--pink-light);
  text-align: left;
}

.sys-reqs-table th {
  background: var(--pink-light);
  color: var(--chocolate-dark);
  font-weight: 700;
  font-size: 0.85rem;
}

.sys-reqs-table td {
  color: var(--text-soft);
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 16px 0;
}

.sys-reqs-h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--chocolate-dark);
  margin-top: 24px;
  margin-bottom: 12px;
}

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

.td-highlight {
  color: var(--pink-fierce);
  font-weight: 700;
}

/* ================================================================
   CONTENT UTILITY CLASSES (anti-inline)
   ================================================================ */
.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(--accent-gold); }
.strong-muted { color: var(--text-muted); }
.strong-navy { color: var(--chocolate-dark); }

/* Screen-reader-only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ================================================================
   FOOTER
   ================================================================ */
.site-footer {
  background: var(--chocolate-dark);
  padding: 24px;
  text-align: center;
}

.site-footer p {
  color: var(--text-on-dark);
  font-size: 0.85rem;
  opacity: 0.7;
}

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

  .header-inner {
    padding: 0 16px;
  }

  .site-nav {
    gap: 2px;
  }

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

  .header-cta {
    padding: 8px 16px;
    font-size: 0.82rem;
  }

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

  .hero-title {
    font-size: 2.2rem;
  }

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

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

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

  .section {
    padding: 48px 16px;
  }

  .content-section {
    padding: 48px 16px;
  }

  .section-header h2,
  .content-section h2 {
    font-size: 1.7rem;
  }

  .guide-section {
    padding: 24px 20px;
  }

  .cta-banner {
    padding: 48px 16px;
  }

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

  .logo-text {
    font-size: 1.05rem;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.8rem;
  }

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

  .hero-meta {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .site-nav {
    gap: 0;
  }

  .nav-link {
    padding: 6px 8px;
    font-size: 0.75rem;
  }
}
