/* ============================================
   夜幕之花 — Night Bloom Flower Theme
   Light background with deep purple & midnight
   blue accents, moon and flower motifs,
   elegant mysterious aesthetic.
   ============================================ */

:root {
  --accent: #6b3fa0;
  --accent-hover: #553180;
  --accent-light: rgba(107, 63, 160, 0.08);
  --accent-glow: rgba(107, 63, 160, 0.25);
  --accent-strong: #4a1d7a;
  --midnight: #1a1836;
  --midnight-light: #2a2850;
  --bg: #faf8fb;
  --bg-card: #ffffff;
  --bg-hero: linear-gradient(160deg, #f5f0fa 0%, #e8def5 30%, #faf8fb 60%, #ede4f8 100%);
  --text: #2d2844;
  --text-muted: #6e6888;
  --text-heading: #1a1836;
  --border: #e0d8ee;
  --border-accent: #b49fd4;
  --shadow: 0 4px 24px rgba(26, 24, 54, 0.08);
  --shadow-glow: 0 0 30px rgba(107, 63, 160, 0.12);
  --shadow-card: 0 2px 16px rgba(26, 24, 54, 0.06);
  --radius: 10px;
  --radius-lg: 16px;
  --font-body: 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', 'Segoe UI', sans-serif;
  --font-heading: 'PingFang SC', 'Microsoft YaHei', 'Noto Serif SC', 'STSong', serif;
  --max-width: 1200px;
  --nav-height: 72px;
}

/* --- Reset & Base --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-heading);
  line-height: 1.35;
}
h1 { font-size: 2.5rem; margin-bottom: 1rem; }
h2 { font-size: 1.875rem; margin-bottom: 0.75rem; }
h3 { font-size: 1.375rem; margin-bottom: 0.5rem; color: var(--accent-strong); }
p { margin-bottom: 1rem; }

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-hover); }
ul, ol { padding-left: 1.5rem; margin-bottom: 1rem; }
li { margin-bottom: 0.4rem; }
img { max-width: 100%; height: auto; display: block; }

/* --- Header & Navigation --- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250, 248, 251, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--nav-height);
  box-shadow: 0 1px 8px rgba(26, 24, 54, 0.04);
}
.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%;
}
.site-logo {
  display: flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-heading); font-weight: 700;
  font-size: 1.2rem; color: var(--text-heading);
  text-decoration: none; white-space: nowrap;
}
.site-logo .logo-icon {
  font-size: 1.6rem;
}
.site-logo:hover { color: var(--accent); }

.nav-links {
  display: flex; align-items: center; gap: 2rem;
  list-style: none; padding: 0; margin: 0;
}
.nav-links a { color: var(--text-muted); font-size: 0.95rem; font-weight: 500; transition: color 0.2s; text-decoration: none; }
.nav-links a:hover, .nav-links a.active { color: var(--accent); }

/* CTA in nav */
.nav-cta {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #fff !important;
  padding: 0.5rem 1.35rem; border-radius: 50px;
  font-weight: 600; font-size: 0.9rem;
  transition: background 0.25s, box-shadow 0.25s, transform 0.2s;
  box-shadow: 0 2px 12px rgba(107, 63, 160, 0.25);
}
.nav-cta:hover {
  background: linear-gradient(135deg, var(--accent-hover) 0%, var(--accent-strong) 100%);
  box-shadow: 0 4px 20px rgba(107, 63, 160, 0.35);
  transform: translateY(-1px);
  color: #fff !important;
}

/* Mobile toggle */
.menu-toggle {
  display: none; background: none; border: none;
  cursor: pointer; padding: 0.5rem;
  flex-direction: column; gap: 5px;
}
.menu-toggle span { display: block; width: 24px; height: 2px; background: var(--text-heading); border-radius: 2px; transition: transform 0.3s, opacity 0.3s; }

/* --- Moon Motif Decor --- */
.moon-decor {
  position: absolute; pointer-events: none; opacity: 0.06;
  font-size: 8rem; color: var(--midnight);
  user-select: none;
}
.flower-decor {
  position: absolute; pointer-events: none; opacity: 0.05;
  font-size: 6rem; color: var(--accent);
  user-select: none;
}

/* --- Hero --- */
.hero {
  position: relative; background: var(--bg-hero);
  padding: 5rem 1.5rem; text-align: center;
  border-bottom: 1px solid var(--border); overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%); width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(107, 63, 160, 0.04) 0%, transparent 70%);
  pointer-events: none;
}
/* Moon accent in hero */
.hero::after {
  content: '☾'; position: absolute; top: 1.5rem; right: 3rem;
  font-size: 5rem; color: var(--accent); opacity: 0.06;
  pointer-events: none; line-height: 1;
}
.hero-content { position: relative; max-width: 800px; margin: 0 auto; }
.hero h1 {
  font-size: 3rem; margin-bottom: 0.75rem;
  background: linear-gradient(135deg, var(--accent-strong) 0%, #8b5cc9 50%, var(--midnight) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-tagline { font-size: 1.2rem; color: var(--text-muted); margin-bottom: 2rem; font-style: italic; }
.hero-meta { display: flex; justify-content: center; gap: 2rem; flex-wrap: wrap; margin-bottom: 2rem; }
.hero-meta-item { display: flex; align-items: center; gap: 0.4rem; color: var(--text-muted); font-size: 0.9rem; }
.hero-meta-item strong { color: var(--text); }

.hero-cta {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #fff;
  padding: 0.85rem 2.5rem; border-radius: 50px;
  font-size: 1.1rem; font-weight: 700; text-decoration: none;
  transition: background 0.25s, box-shadow 0.25s, transform 0.2s;
  box-shadow: 0 4px 20px rgba(107, 63, 160, 0.3);
}
.hero-cta:hover { box-shadow: 0 6px 28px rgba(107, 63, 160, 0.4); transform: translateY(-2px); color: #fff; }

.hero-dark h1 {
  background: none; -webkit-text-fill-color: #fff; color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.hero-dark .hero-tagline,
.hero-dark .hero-meta-item,
.hero-dark .hero-meta-item strong { color: rgba(255,255,255,0.9); text-shadow: 0 1px 4px rgba(0,0,0,0.4); }

/* --- Tag Bar --- */
.tag-bar {
  display: flex; justify-content: center; gap: 0.6rem; flex-wrap: wrap;
  padding: 1.5rem 1rem; max-width: var(--max-width); margin: 0 auto;
}
.tag {
  display: inline-block; padding: 0.35rem 1rem;
  background: var(--accent-light); color: var(--accent);
  border: 1px solid var(--border-accent); border-radius: 50px;
  font-size: 0.85rem; font-weight: 500;
}

/* --- Sections --- */
.section { padding: 5rem 1.5rem; max-width: var(--max-width); margin: 0 auto; }
.section-alt { background: var(--accent-light); }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-header h2 { font-size: 2rem; margin-bottom: 0.5rem; color: var(--text-heading); }
.section-header p { color: var(--text-muted); font-size: 1.05rem; max-width: 600px; margin: 0 auto; }
/* Section divider with flower */
.section-header::after {
  content: '✿'; display: block; text-align: center; font-size: 1.2rem;
  color: var(--border-accent); margin-top: 0.75rem; opacity: 0.7;
}

/* --- Cards --- */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }
.cards-grid-3 { grid-template-columns: repeat(3, 1fr); }
.cards-grid-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 2rem 1.5rem;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.2s;
  box-shadow: var(--shadow-card);
}
.card:hover { border-color: var(--border-accent); box-shadow: var(--shadow-glow); transform: translateY(-2px); }
.card-icon { font-size: 2.2rem; margin-bottom: 1rem; }
.card h3 { margin-bottom: 0.75rem; }
.card p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 0; }

/* --- Feature List --- */
.feature-list { list-style: none; padding: 0; }
.feature-list li { padding: 0.5rem 0; padding-left: 1.75rem; position: relative; color: var(--text-muted); }
.feature-list li::before { content: '✿'; position: absolute; left: 0; color: var(--accent); font-size: 0.8rem; }

/* --- Gallery --- */
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; }
.gallery-item {
  cursor: pointer; border-radius: var(--radius); overflow: hidden;
  border: 2px solid transparent; transition: border-color 0.25s, transform 0.2s, box-shadow 0.25s;
  position: relative; background: var(--bg-card);
}
.gallery-item:hover { border-color: var(--accent); transform: scale(1.02); box-shadow: var(--shadow-glow); }
.gallery-item img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; }
.gallery-placeholder {
  width: 100%; aspect-ratio: 16/9; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--accent-light) 0%, rgba(26, 24, 54, 0.04) 100%);
  color: var(--border-accent); font-size: 3rem;
}

/* --- Lightbox --- */
.lightbox { display: none; position: fixed; z-index: 1000; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15, 10, 30, 0.94); justify-content: center; align-items: center; flex-direction: column; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 80vh; border-radius: var(--radius); box-shadow: var(--shadow); }
.lightbox-caption { color: var(--text-muted); margin-top: 1rem; font-size: 0.9rem; }
.lightbox-close { position: absolute; top: 1.5rem; right: 2rem; background: none; border: none; color: #fff; font-size: 2rem; cursor: pointer; transition: color 0.2s; line-height: 1; }
.lightbox-close:hover { color: var(--accent); }

/* --- CTA Banner --- */
.cta-section { text-align: center; padding: 4rem 1.5rem; background: linear-gradient(135deg, var(--accent-light) 0%, rgba(26, 24, 54, 0.03) 100%); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.cta-section h2 { margin-bottom: 0.5rem; color: var(--text-heading); }
.cta-section p { color: var(--text-muted); margin-bottom: 1.5rem; }
.cta-btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #fff;
  padding: 0.85rem 2.5rem; border-radius: 50px;
  font-size: 1.1rem; font-weight: 700; text-decoration: none;
  transition: box-shadow 0.25s, transform 0.2s;
  box-shadow: 0 4px 20px rgba(107, 63, 160, 0.3);
}
.cta-btn:hover { box-shadow: 0 6px 28px rgba(107, 63, 160, 0.4); transform: translateY(-2px); color: #fff; }

/* --- Footer --- */
.site-footer {
  background: var(--midnight); color: rgba(255,255,255,0.5);
  padding: 2rem 1.5rem; text-align: center; font-size: 0.85rem;
  border-top: 3px solid var(--accent);
  margin-top: auto;
}
.site-footer p { margin-bottom: 0; }

/* --- Subpage Hero --- */
.page-hero {
  background: var(--bg-hero); padding: 3.5rem 1.5rem; text-align: center;
  border-bottom: 1px solid var(--border); position: relative; overflow: hidden;
}
.page-hero::before { content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 400px; height: 400px; background: radial-gradient(circle, rgba(107, 63, 160, 0.04) 0%, transparent 70%); pointer-events: none; }
.page-hero h1 { margin-bottom: 0.5rem; color: var(--text-heading); }
.page-hero p { color: var(--text-muted); font-size: 1.05rem; max-width: 600px; margin: 0 auto; }
.page-hero-dark h1,
.page-hero-dark p { color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,0.5); }

/* --- Breadcrumbs --- */
.breadcrumb { padding: 1rem 1.5rem; max-width: var(--max-width); margin: 0 auto; font-size: 0.85rem; color: var(--text-muted); }
.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { margin: 0 0.5rem; color: var(--border-accent); }

/* --- Info Grid --- */
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin: 2rem 0; }
.info-item { background: var(--accent-light); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; text-align: center; }
.info-item-label { font-size: 0.8rem; color: var(--text-muted); letter-spacing: 0.05em; margin-bottom: 0.25rem; }
.info-item-value { font-size: 1rem; font-weight: 600; color: var(--text-heading); }

/* --- Guide Steps --- */
.guide-steps { list-style: none; padding: 0; counter-reset: step; }
.guide-steps li {
  counter-increment: step; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.5rem 2rem; margin-bottom: 1rem;
  position: relative; padding-left: 4.5rem; box-shadow: var(--shadow-card);
  transition: border-color 0.2s;
}
.guide-steps li:hover { border-color: var(--border-accent); }
.guide-steps li::before {
  content: counter(step); position: absolute; left: 1.25rem; top: 1.5rem;
  width: 2.2rem; height: 2.2rem;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.95rem;
}
.guide-steps li h3 { margin-bottom: 0.5rem; color: var(--text-heading); }
.guide-steps li p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 0; }

/* --- Tips Box --- */
.tips-box {
  background: linear-gradient(135deg, var(--accent-light) 0%, rgba(26, 24, 54, 0.02) 100%);
  border: 1px solid var(--border-accent); border-radius: var(--radius-lg);
  padding: 1.5rem 2rem; margin: 2rem 0;
}
.tips-box-title { color: var(--accent); font-weight: 700; margin-bottom: 0.75rem; font-size: 1.1rem; }
.tips-box ul { margin-bottom: 0; }
.tips-box li { color: var(--text-muted); }

/* --- Story Content --- */
.story-content { max-width: 800px; margin: 0 auto; }
.story-content p { font-size: 1.05rem; }
.story-content blockquote {
  border-left: 3px solid var(--accent); padding: 1rem 1.5rem; margin: 2rem 0;
  background: var(--accent-light); border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-muted); font-style: italic;
}
.story-chapter {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.5rem 2rem; margin-bottom: 1.5rem;
  border-left: 4px solid var(--accent); box-shadow: var(--shadow-card);
}
.story-chapter h3 { color: var(--accent-strong); margin-bottom: 0.75rem; }
.story-chapter p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 0; }

/* --- Story/Content Images --- */
.story-image-wrap { max-width: 800px; margin-left: auto; margin-right: auto; }
.story-image { width: 100%; border-radius: var(--radius-lg); display: block; border: 1px solid var(--border); box-shadow: var(--shadow); }

/* --- Character Cards --- */
.character-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.2s;
  box-shadow: var(--shadow-card);
}
.character-card:hover { border-color: var(--border-accent); box-shadow: var(--shadow-glow); transform: translateY(-3px); }
.character-card-image { width: 100%; aspect-ratio: 3/4; object-fit: cover; display: block; }
.character-placeholder {
  width: 100%; aspect-ratio: 3/4; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, var(--accent-light) 0%, rgba(26, 24, 54, 0.05) 100%);
  font-size: 4rem; color: var(--border-accent);
}
.character-card-body { padding: 1.5rem; }
.character-card-body h3 { margin-bottom: 0.25rem; font-size: 1.2rem; }
.character-role { display: inline-block; font-size: 0.8rem; color: var(--accent); font-weight: 600; margin-bottom: 0.75rem; }
.character-card-body p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 0; }

/* --- FAQ Accordion --- */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 0.75rem; overflow: hidden; background: var(--bg-card); transition: border-color 0.2s; }
.faq-item:hover { border-color: var(--border-accent); }
.faq-question {
  width: 100%; text-align: left; background: none; border: none;
  padding: 1.25rem 1.5rem; font-size: 1rem; font-weight: 600;
  color: var(--text-heading); cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  font-family: var(--font-body); transition: color 0.2s;
}
.faq-question:hover { color: var(--accent); }
.faq-question .arrow { font-size: 1.2rem; color: var(--accent); transition: transform 0.3s; flex-shrink: 0; }
.faq-item.open .faq-question .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 1.5rem 1.25rem; color: var(--text-muted); font-size: 0.95rem; line-height: 1.75; }

/* --- Version / Stats Row --- */
.stats-row { display: flex; justify-content: center; gap: 3rem; flex-wrap: wrap; padding: 2rem 0; }
.stat-item { text-align: center; }
.stat-num { font-size: 2rem; font-weight: 700; color: var(--accent); font-family: var(--font-heading); }
.stat-label { font-size: 0.85rem; color: var(--text-muted); }

/* --- Divider --- */
.section-divider { border: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--border-accent), transparent); margin: 0 auto; max-width: 200px; }
.section-divider-full { border: 0; height: 1px; background: var(--border); margin: 0; }

/* --- Utility --- */
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent); }
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mx-auto { max-width: var(--max-width); margin-left: auto; margin-right: auto; }
.pt-sm { padding-top: 2rem; }
.pb-sm { padding-bottom: 2rem; }

/* --- Loading fade for lazy images --- */
img[loading="lazy"] { opacity: 0; transition: opacity 0.5s ease; }
img[loading="lazy"].loaded { opacity: 1; }

/* --- Responsive --- */
@media (max-width: 768px) {
  :root { --nav-height: 64px; }
  h1 { font-size: 1.875rem; }
  h2 { font-size: 1.5rem; }
  .hero h1 { font-size: 2.2rem; }
  .site-logo { font-size: 1rem; }
  .nav-links { display: none; position: fixed; top: var(--nav-height); left: 0; right: 0; background: rgba(250, 248, 251, 0.98); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); flex-direction: column; padding: 1.5rem; gap: 1rem; box-shadow: var(--shadow); }
  .nav-links.open { display: flex; }
  .menu-toggle { display: flex; }
  .section { padding: 3rem 1rem; }
  .gallery { grid-template-columns: 1fr; }
  .cards-grid { grid-template-columns: 1fr; }
  .cards-grid-2, .cards-grid-3 { grid-template-columns: 1fr; }
  .guide-steps li { padding-left: 3.5rem; }
  .guide-steps li::before { left: 0.75rem; top: 1.25rem; width: 1.8rem; height: 1.8rem; font-size: 0.85rem; }
  .hero-meta { gap: 1rem; }
  .stats-row { gap: 1.5rem; }
  .info-grid { grid-template-columns: repeat(2, 1fr); }
}
