/* ============================================================
   Spooky Milk Life 中文官网 — CSS Theme
   Color Scheme: 诡异甜蜜 — 南瓜橙 / 幽灵紫 / 奶白 / 暗绿
   ============================================================ */

/* ========== CSS Variables ========== */
:root {
  /* Core palette */
  --bg: #FFFDE7;
  --bg-warm: #FFF8E1;
  --bg-card: #FFFFFF;
  --text: #2D1B4E;
  --text-soft: #5D4E6D;
  --text-muted: #8E7F9E;
  --accent: #E65100;
  --accent-dk: #BF360C;
  --accent-purple: #7E57C2;
  --accent-green: #33691E;
  --accent-gold: #E65100;
  --danger-red: #D32F2F;
  --pink-fierce: #E65100;
  --uniform-navy: #2D1B4E;

  /* Header */
  --header-bg: #2D1B4E;
  --header-text: #FFFDE7;
  --header-border: #E65100;

  /* Text */
  --font-body: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-serif: 'Noto Serif SC', 'SimSun', 'STSong', serif;
  --font-display: 'Georgia', 'Times New Roman', serif;

  /* Shadows & borders */
  --shadow-card: 0 2px 12px rgba(45,27,78,0.08);
  --shadow-hover: 0 4px 20px rgba(126,87,194,0.15);
  --border-soft: 1px solid rgba(126,87,194,0.12);
  --radius: 12px;
  --radius-sm: 8px;

  /* Spacing */
  --max-width: 1100px;
  --section-pad: 64px 24px;
}

/* ========== Reset ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

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

/* ========== Header ========== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--header-bg);
  border-bottom: 3px solid var(--header-border);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 24px;
  gap: 16px;
}
.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--header-text);
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  white-space: nowrap;
}
.header-logo img {
  height: 36px;
  width: auto;
}
.header-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.header-nav a {
  color: var(--header-text);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.92rem;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}
.header-nav a:hover,
.header-nav a.active {
  background: rgba(255,253,231,0.12);
  color: #FFB74D;
}
.header-cta {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 8px 22px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
  white-space: nowrap;
}
.header-cta:hover {
  background: var(--accent-dk);
  transform: translateY(-1px);
}

/* ========== Hero Section ========== */
.hero {
  background: linear-gradient(135deg, #2D1B4E 0%, #4A2D7A 40%, #7E57C2 70%, #5D3A1A 100%);
  padding: 60px 24px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(255,253,231,0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(230,81,0,0.06) 0%, transparent 50%);
  pointer-events: none;
}
.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.hero-title-main {
  font-family: var(--font-serif);
  font-size: 2.8rem;
  font-weight: 900;
  color: #FFFDE7;
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
  margin-bottom: 12px;
  line-height: 1.3;
}
.hero-tagline {
  font-size: 1.1rem;
  color: rgba(255,253,231,0.8);
  margin-bottom: 8px;
  line-height: 1.6;
}
.hero-img {
  margin-top: 28px;
  max-width: 500px;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 6px 16px rgba(0,0,0,0.5));
}

/* Sub-page hero */
.hero-subpage {
  padding: 40px 24px 48px;
}
.hero-subpage-title {
  font-size: 2rem;
  font-weight: 700;
}

/* ========== Content Sections ========== */
.content-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--section-pad);
}
.section-alt {
  background: var(--bg-warm);
}
.section-no-padding {
  padding: 0;
}

/* ========== Section Headings ========== */
.section-heading {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  color: var(--accent-dk);
  margin-bottom: 8px;
}
.section-subtext {
  text-align: center;
  color: var(--text-soft);
  margin-bottom: 24px;
  font-size: 0.95rem;
}
.section-heading-alt {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  color: var(--accent-dk);
  margin-bottom: 20px;
}

/* Sub-page content h2 styled like h1 */
.content-section h2 {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

/* ========== Section Title Group ========== */
.section-title-group {
  margin-bottom: 36px;
}
.section-title-group-spaced {
  margin-top: 48px;
}

/* ========== Centered Prose ========== */
.prose-centered {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 32px;
  color: var(--text-soft);
  line-height: 1.85;
  font-size: 0.95rem;
}
.prose-centered:last-of-type {
  margin-bottom: 40px;
}

/* ========== Game Info Cards (index) ========== */
.game-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin: 32px 0 8px;
}
.game-info-card {
  background: var(--bg-card);
  border: var(--border-soft);
  border-left: 5px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 18px 14px;
  text-align: center;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.2s;
}
.game-info-card:hover {
  box-shadow: var(--shadow-hover);
}
.game-info-card .info-num {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent-purple);
  display: block;
}
.game-info-card .info-label {
  font-size: 0.85rem;
  color: var(--text-soft);
  margin-top: 4px;
}
.game-info-desc {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0;
}

/* ========== Feature Cards (index) ========== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 28px;
}
.feature-card {
  background: var(--bg-card);
  border: var(--border-soft);
  border-left: 5px solid var(--accent-purple);
  border-radius: var(--radius);
  padding: 28px 22px;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s, box-shadow 0.2s;
}
.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}
.feature-card h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent-purple);
  margin-bottom: 8px;
}
.feature-card p {
  font-size: 0.92rem;
  color: var(--text-soft);
  line-height: 1.7;
}

/* ========== Screenshot Gallery ========== */
.screenshots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 24px;
}
.screenshots-grid img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: var(--border-soft);
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: var(--shadow-card);
}
.screenshots-grid img:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-hover);
}

/* ========== Lightbox ========== */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}
.lightbox.active {
  display: flex;
}
.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}

/* ========== Reviews / Quotes (index) ========== */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 24px;
}
.review-card {
  background: var(--bg-card);
  border: var(--border-soft);
  border-left: 5px solid var(--accent-green);
  border-radius: var(--radius);
  padding: 24px 20px;
  box-shadow: var(--shadow-card);
  position: relative;
}
.review-card::before {
  content: '"';
  position: absolute;
  top: 8px;
  left: 14px;
  font-family: var(--font-display);
  font-size: 3rem;
  color: var(--accent-purple);
  opacity: 0.2;
  line-height: 1;
}
.review-card p {
  font-size: 0.93rem;
  color: var(--text-soft);
  line-height: 1.75;
  font-style: italic;
}
.review-card .reviewer {
  display: block;
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--accent-dk);
  font-weight: 600;
  font-style: normal;
}

/* ========== CTA Banner (index only) ========== */
.cta-banner {
  background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-dk) 100%);
  text-align: center;
  padding: 48px 24px;
  margin-top: 24px;
}
.cta-banner h2 {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  color: #FFFDE7;
  margin-bottom: 8px;
}
.cta-banner p {
  color: rgba(255,253,231,0.8);
  margin-bottom: 24px;
  font-size: 1rem;
}
.cta-btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 14px 40px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}
.cta-btn:hover {
  background: #FF6D00;
  transform: translateY(-2px);
}

/* ========== Character Cards (characters) ========== */
.char-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 24px;
}
.char-card {
  background: var(--bg-card);
  border: var(--border-soft);
  border-left: 5px solid var(--accent-purple);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s;
}
.char-card:hover {
  transform: translateY(-3px);
}
.char-card-img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  background: linear-gradient(135deg, #2D1B4E, #7E57C2);
}
.char-card-body {
  padding: 20px;
}
.char-card-body h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent-purple);
  margin-bottom: 6px;
}
.char-card-body .char-role {
  display: inline-block;
  background: rgba(230,81,0,0.1);
  color: var(--accent);
  font-size: 0.8rem;
  padding: 3px 10px;
  border-radius: 12px;
  margin-bottom: 10px;
}
.char-card-body p {
  font-size: 0.9rem;
  color: var(--text-soft);
  line-height: 1.7;
}
.char-traits {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.char-trait {
  background: rgba(126,87,194,0.08);
  color: var(--accent-purple);
  font-size: 0.78rem;
  padding: 3px 10px;
  border-radius: 12px;
  border: 1px solid rgba(126,87,194,0.15);
}

/* ========== FAQ Accordion ========== */
.faq-intro {
  color: var(--text-soft);
  margin-bottom: 32px;
}
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.faq-item {
  background: var(--bg-card);
  border: var(--border-soft);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: 18px 48px 18px 20px;
  text-align: left;
  font-family: var(--font-body);
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  position: relative;
  transition: color 0.2s;
}
.faq-question:hover {
  color: var(--accent-purple);
}
.faq-question::after {
  content: '+';
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  color: var(--accent-purple);
  transition: transform 0.3s;
}
.faq-item.open .faq-question::after {
  content: '−';
  transform: translateY(-50%);
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  padding: 0 20px;
}
.faq-item.open .faq-answer {
  max-height: 600px;
  padding: 0 20px 20px;
}
.faq-answer p,
.faq-answer ul,
.faq-answer ol {
  font-size: 0.92rem;
  color: var(--text-soft);
  line-height: 1.75;
}

/* ========== System Requirements Table ========== */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 16px 0;
}
.sys-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.sys-table th {
  background: var(--accent-purple);
  color: #FFFDE7;
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
}
.sys-table td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(126,87,194,0.1);
}
.sys-table tr:nth-child(even) td {
  background: rgba(126,87,194,0.03);
}
.td-highlight {
  color: var(--accent);
  font-weight: 700;
}
.sys-reqs-h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--uniform-navy);
  margin-top: 24px;
  margin-bottom: 12px;
}
.sys-reqs-h3:first-of-type {
  margin-top: 8px;
}
.sys-note {
  margin-top: 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.faq-note {
  margin-top: 16px;
}

/* ========== Guide Page ========== */
.guide-intro {
  font-size: 1rem;
  color: var(--text-soft);
  line-height: 1.85;
  margin-bottom: 24px;
}
.route-heading {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent-purple);
  margin-top: 28px;
  margin-bottom: 12px;
}
.route-desc {
  font-size: 0.93rem;
  color: var(--text-soft);
  line-height: 1.8;
  margin-bottom: 16px;
}
.chapter-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent-dk);
  margin-top: 20px;
  margin-bottom: 8px;
}
.guide-steps-wrapper {
  counter-reset: guide-step;
}
.guide-step {
  background: var(--bg-card);
  border: var(--border-soft);
  border-left: 5px solid var(--accent-green);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-card);
}
.guide-step h3::before {
  counter-increment: guide-step;
  content: '#' counter(guide-step) ' ';
  color: var(--accent-green);
  font-weight: 800;
}
.guide-step h3 {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: 6px;
}
.guide-step p {
  font-size: 0.9rem;
  color: var(--text-soft);
  line-height: 1.75;
}

/* ========== Story Page ========== */
.story-chapter {
  margin-bottom: 32px;
}
.story-chapter h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent-purple);
  margin-bottom: 8px;
}
.story-chapter p {
  font-size: 0.93rem;
  color: var(--text-soft);
  line-height: 1.8;
  margin-bottom: 10px;
}

/* ========== Content List Classes ========== */
.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(--uniform-navy); }

/* ========== Section Subheading (characters page) ========== */
.section-subheading {
  text-align: center;
  margin: 40px 0 24px;
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent-purple);
}

/* ========== Guide Intro Top ========== */
.guide-intro-top {
  margin-top: 4px;
}

/* ========== Section Description Text ========== */
.section-desc {
  font-size: 0.93rem;
  color: var(--text-soft);
  line-height: 1.8;
  margin-bottom: 20px;
}

/* ========== Footer ========== */
.site-footer {
  background: var(--header-bg);
  color: var(--header-text);
  text-align: center;
  padding: 20px 24px;
  font-size: 0.85rem;
  border-top: 3px solid var(--header-border);
}

/* ========== Responsive: 768px ========== */
@media (max-width: 768px) {
  .hero-title-main { font-size: 2rem; }
  .hero-subpage-title { font-size: 1.6rem; }
  .hero-tagline { font-size: 1rem; }
  .hero { padding: 48px 24px 60px; }
  .hero-subpage { padding: 32px 24px 40px; }
  .content-section { padding: 48px 20px; }
  .header-inner { flex-wrap: wrap; gap: 10px; }
  .header-nav { gap: 4px; }
  .header-nav a { padding: 5px 10px; font-size: 0.85rem; }
  .header-cta { padding: 7px 16px; font-size: 0.88rem; }
  .section-heading { font-size: 1.6rem; }
  .content-section h2 { font-size: 1.8rem; }
  .cta-banner h2 { font-size: 1.5rem; }
  .features-grid { grid-template-columns: 1fr; }
  .char-grid { grid-template-columns: 1fr; }
  .reviews-grid { grid-template-columns: 1fr; }
  .screenshots-grid { grid-template-columns: 1fr; }
  .game-info-grid { grid-template-columns: repeat(2, 1fr); }
  .header-logo { font-size: 1rem; }
}

/* ========== Responsive: 480px ========== */
@media (max-width: 480px) {
  .hero-title-main { font-size: 1.6rem; }
  .hero-subpage-title { font-size: 1.4rem; }
  .hero-tagline { font-size: 0.9rem; }
  .hero { padding: 36px 16px 48px; }
  .hero-subpage { padding: 28px 16px 32px; }
  .content-section { padding: 36px 16px; }
  .section-heading { font-size: 1.4rem; }
  .content-section h2 { font-size: 1.5rem; }
  .cta-banner { padding: 36px 16px; }
  .cta-banner h2 { font-size: 1.3rem; }
  .cta-btn { padding: 12px 28px; font-size: 1rem; }
  .header-inner { padding: 6px 12px; }
  .header-nav a { padding: 4px 8px; font-size: 0.8rem; }
  .header-cta { padding: 6px 14px; font-size: 0.82rem; }
  .game-info-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .game-info-card { padding: 12px 10px; }
  .game-info-card .info-num { font-size: 1.3rem; }
  .game-info-card .info-label { font-size: 0.75rem; }
  .header-logo span { display: none; }
}
