/* ============================================================
   群青的魔女 - Ultramarine Witch Crystal Theme
   Design: Deep ultramarine blues + magical-crystal teals
           Crescent moon motifs on light mystical background
   ============================================================ */

/* --- Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;600;700;900&family=Noto+Sans+SC:wght@300;400;500;700&display=swap');

/* --- CSS Variables --- */
:root {
  --bg: #f9f6f0;
  --bg-alt: #f0ece3;
  --bg-card: #ffffff;
  --text: #1a1a2e;
  --text-muted: #5a5a7a;
  --text-light: #8888aa;
  --primary: #1a237e;
  --primary-dark: #0d1257;
  --primary-light: #283593;
  --accent: #0097a7;
  --accent-light: #4fc3f7;
  --accent-teal: #26c6da;
  --magical: #7c4dff;
  --magical-light: #b388ff;
  --magical-pale: #e8d5ff;
  --moon: #c5cae9;
  --moon-glow: #e8eaf6;
  --gold: #c9a84c;
  --gold-light: #e8d48b;
  --danger: #e53935;
  --success: #2e7d32;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 2px 12px rgba(26, 35, 126, 0.08);
  --shadow-lg: 0 4px 24px rgba(26, 35, 126, 0.12);
  --header-h: 64px;
  --max-width: 1100px;
  --font-serif: 'Noto Serif SC', 'SimSun', serif;
  --font-sans: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  font-size: 16px;
  min-height: 100vh;
}

/* --- Body background pattern (crescent moon subtle) --- */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background:
    radial-gradient(ellipse at 15% 20%, rgba(179, 136, 255, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 60%, rgba(0, 151, 167, 0.05) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 85%, rgba(26, 35, 126, 0.04) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

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

/* --- Header --- */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
  border-bottom: 3px solid var(--accent-light);
  height: var(--header-h);
  display: flex; align-items: center;
  box-shadow: 0 2px 16px rgba(26, 35, 126, 0.3);
}
.header-inner {
  width: 100%; max-width: var(--max-width); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px;
}
.header-logo {
  font-family: var(--font-serif);
  font-size: 1.25rem; font-weight: 700;
  color: var(--moon-glow);
  letter-spacing: 0.05em;
}
.header-logo:hover { color: var(--accent-light); }
.header-logo::before {
  content: '☽ '; font-size: 1.1em; color: var(--accent-light);
}

.header-nav { display: flex; gap: 4px; align-items: center; }
.header-nav a {
  color: rgba(232, 234, 246, 0.85);
  font-size: 0.9rem; font-weight: 500;
  padding: 6px 14px; border-radius: 6px;
  transition: all 0.2s;
}
.header-nav a:hover,
.header-nav a.active {
  color: #fff; background: rgba(255,255,255,0.12);
}
.header-cta {
  background: linear-gradient(135deg, var(--accent-light), var(--accent)) !important;
  color: #fff !important;
  font-weight: 700 !important;
  padding: 8px 20px !important;
  border-radius: 20px !important;
  box-shadow: 0 0 16px rgba(79, 195, 247, 0.4);
  transition: all 0.3s !important;
}
.header-cta:hover {
  background: linear-gradient(135deg, var(--accent-teal), var(--accent-light)) !important;
  box-shadow: 0 0 24px rgba(79, 195, 247, 0.6) !important;
  transform: translateY(-1px);
}

/* --- Main Layout --- */
main {
  max-width: var(--max-width); margin: 0 auto; padding: 32px 20px 60px;
}

/* --- Hero Section --- */
.hero {
  position: relative;
  background: linear-gradient(170deg, var(--primary-dark) 0%, var(--primary) 40%, #1a237e 100%);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 40px;
  box-shadow: var(--shadow-lg);
  min-height: 360px;
  display: flex; align-items: center;
}
.hero-overlay {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 30% 40%, rgba(79, 195, 247, 0.15) 0%, transparent 60%),
    radial-gradient(circle at 70% 50%, rgba(179, 136, 255, 0.12) 0%, transparent 60%);
}
.hero::after {
  content: '☽';
  position: absolute; top: 24px; right: 48px;
  font-size: 80px; color: rgba(232, 234, 246, 0.1);
  line-height: 1;
}
.hero-content {
  position: relative; z-index: 2;
  padding: 48px; color: #fff; max-width: 600px;
}
.hero-content h1 {
  font-family: var(--font-serif);
  font-size: 2.2rem; font-weight: 900;
  margin-bottom: 12px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.hero-subtitle {
  font-size: 1.05rem; color: var(--accent-light);
  margin-bottom: 8px; font-weight: 500;
}
.hero-desc {
  font-size: 0.95rem; color: rgba(255,255,255,0.8); line-height: 1.7;
  margin-bottom: 24px;
}
.hero-tagline {
  font-family: var(--font-serif); font-size: 1.15rem;
  color: #fff; font-weight: 600; margin-bottom: 8px;
}
.hero-tags {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.hero-tag {
  background: rgba(255,255,255,0.15);
  color: var(--accent-light);
  padding: 4px 14px; border-radius: 14px;
  font-size: 0.82rem; font-weight: 500;
  border: 1px solid rgba(79, 195, 247, 0.3);
}

/* --- Section Headings --- */
.section-title {
  font-family: var(--font-serif);
  font-size: 1.6rem; font-weight: 700; color: var(--primary);
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--moon);
  position: relative;
}
.section-title::after {
  content: '';
  position: absolute; bottom: -2px; left: 0;
  width: 60px; height: 2px;
  background: linear-gradient(90deg, var(--accent-light), var(--magical-light));
}

/* --- Info Cards Grid --- */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px; margin-bottom: 40px;
}
.info-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border-left: 3px solid var(--accent-light);
  transition: transform 0.2s, box-shadow 0.2s;
}
.info-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.info-card h3 {
  font-family: var(--font-serif);
  font-size: 1rem; color: var(--primary);
  margin-bottom: 6px;
}
.info-card p {
  color: var(--text-muted); font-size: 0.9rem;
}

/* --- Feature Cards --- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px; margin-bottom: 40px;
}
.feature-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
  border-top: 3px solid var(--magical-light);
  transition: transform 0.2s, box-shadow 0.2s;
}
.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.feature-icon {
  font-size: 2rem; margin-bottom: 12px;
}
.feature-card h3 {
  font-family: var(--font-serif);
  font-size: 1.1rem; color: var(--primary);
  margin-bottom: 10px;
}
.feature-card p {
  color: var(--text-muted); font-size: 0.92rem;
}

/* --- Screenshot Gallery --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px; margin-bottom: 40px;
}
.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 0.3s;
}
.gallery-item:hover { transform: scale(1.03); }
.gallery-item img {
  width: 100%; height: auto; display: block;
}

/* --- Lightbox --- */
.lightbox { display: none; }
.lightbox.active {
  display: flex;
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(13, 18, 87, 0.9);
  align-items: center; justify-content: center;
  cursor: pointer;
}
.lightbox img {
  max-width: 90vw; max-height: 85vh;
  border-radius: 4px;
  box-shadow: 0 4px 32px rgba(0,0,0,0.5);
}

/* --- Character Cards --- */
.char-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px; margin-bottom: 40px;
}
.char-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s;
}
.char-card:hover { transform: translateY(-3px); }
.char-card img {
  width: 100%; height: 320px; object-fit: cover;
}
.char-info {
  padding: 18px;
}
.char-info h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem; color: var(--primary);
  margin-bottom: 6px;
}
.char-role {
  font-size: 0.82rem; color: var(--accent); font-weight: 600;
  margin-bottom: 8px;
}
.char-tags {
  display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px;
}
.char-tag {
  background: var(--magical-pale);
  color: var(--magical);
  padding: 2px 10px; border-radius: 10px;
  font-size: 0.75rem; font-weight: 500;
}
.char-desc {
  font-size: 0.85rem; color: var(--text-muted);
  line-height: 1.6;
}

/* --- Guide Steps --- */
.guide-nav {
  background: var(--bg-card); border-radius: var(--radius);
  padding: 20px 24px; margin-bottom: 32px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--accent-light);
}
.guide-nav h3 {
  font-family: var(--font-serif);
  color: var(--primary); margin-bottom: 10px;
  font-size: 1rem;
}
.guide-nav ol { padding-left: 20px; }
.guide-nav li { margin-bottom: 4px; font-size: 0.9rem; }
.guide-nav a { color: var(--accent); }

.guide-section {
  background: var(--bg-card); border-radius: var(--radius-lg);
  padding: 28px 32px; margin-bottom: 24px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--magical-light);
}
.guide-section h2 {
  font-family: var(--font-serif);
  font-size: 1.3rem; color: var(--primary);
  margin-bottom: 16px;
}
.guide-section h3 {
  font-family: var(--font-serif);
  font-size: 1.05rem; color: var(--primary-light);
  margin: 16px 0 8px;
}
.guide-section p {
  margin-bottom: 12px; color: var(--text-muted);
}
.guide-section ul, .guide-section ol {
  padding-left: 24px; margin-bottom: 12px; color: var(--text-muted);
}
.guide-section li { margin-bottom: 6px; }

.tip-box {
  background: linear-gradient(135deg, rgba(0, 151, 167, 0.08), rgba(79, 195, 247, 0.06));
  border: 1px solid rgba(0, 151, 167, 0.2);
  border-radius: var(--radius);
  padding: 16px 20px; margin: 16px 0;
}
.tip-box::before {
  content: '💡 提示：';
  font-weight: 700; color: var(--accent);
  display: block; margin-bottom: 4px;
}
.tip-box p { margin-bottom: 4px; }

.warning-box {
  background: linear-gradient(135deg, rgba(229, 57, 53, 0.06), rgba(229, 57, 53, 0.03));
  border: 1px solid rgba(229, 57, 53, 0.25);
  border-radius: var(--radius);
  padding: 16px 20px; margin: 16px 0;
}
.warning-box::before {
  content: '⚠️ 注意：';
  font-weight: 700; color: var(--danger);
  display: block; margin-bottom: 4px;
}

/* --- Story Page --- */
.story-hero {
  background: linear-gradient(160deg, var(--primary-dark), var(--primary), #1b2a7a);
  border-radius: var(--radius-lg); padding: 40px;
  margin-bottom: 32px; color: #fff;
  position: relative; overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.story-hero::after {
  content: '☽'; position: absolute;
  bottom: -20px; right: 30px;
  font-size: 120px; color: rgba(232, 234, 246, 0.06);
  line-height: 1;
}
.story-hero h2 {
  font-family: var(--font-serif); font-size: 1.5rem; margin-bottom: 12px;
}
.story-hero p { color: rgba(255,255,255,0.85); line-height: 1.8; }

.chapter-title {
  font-family: var(--font-serif);
  font-size: 1.1rem; color: var(--primary);
  margin: 16px 0 8px;
  padding-left: 12px;
  border-left: 3px solid var(--accent-light);
}

.story-block {
  background: var(--bg-card); border-radius: var(--radius-lg);
  padding: 28px 32px; margin-bottom: 24px;
  box-shadow: var(--shadow);
}
.story-block h3 {
  font-family: var(--font-serif); font-size: 1.15rem;
  color: var(--primary); margin-bottom: 12px;
}
.story-block p { color: var(--text-muted); margin-bottom: 12px; }
.story-block ul { padding-left: 24px; margin-bottom: 12px; color: var(--text-muted); }
.story-block li { margin-bottom: 6px; }

.ending-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px; margin: 16px 0;
}
.ending-card {
  background: var(--bg-alt); border-radius: var(--radius);
  padding: 20px; border-left: 4px solid var(--magical);
}
.ending-card h4 {
  font-family: var(--font-serif);
  color: var(--magical); margin-bottom: 6px;
  font-size: 1rem;
}
.ending-card p { font-size: 0.88rem; color: var(--text-muted); }

/* --- FAQ Page --- */
.faq-list { margin-bottom: 32px; }
.faq-item {
  background: var(--bg-card); border-radius: var(--radius);
  margin-bottom: 8px; box-shadow: var(--shadow);
  overflow: hidden;
}
.faq-question {
  width: 100%; background: none; border: none;
  padding: 18px 24px; font-size: 1rem;
  font-weight: 600; color: var(--primary);
  text-align: left; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--font-sans);
  transition: background 0.2s;
}
.faq-question:hover { background: var(--bg-alt); }
.faq-question::after {
  content: '+'; font-size: 1.4rem; color: var(--accent);
  transition: transform 0.3s;
}
.faq-item.open .faq-question::after {
  content: '−'; transform: rotate(180deg);
}
.faq-answer {
  max-height: 0; overflow: hidden;
  padding: 0 24px;
  transition: max-height 0.3s ease, padding 0.3s;
}
.faq-item.open .faq-answer {
  max-height: 600px; padding: 0 24px 18px;
}
.faq-answer p { color: var(--text-muted); line-height: 1.8; }
.faq-answer ul { padding-left: 24px; color: var(--text-muted); }

/* --- System Requirements Table --- */
.specs-table {
  width: 100%; border-collapse: collapse;
  margin: 20px 0; font-size: 0.92rem;
}
.specs-table thead { background: var(--primary); color: #fff; }
.specs-table th {
  padding: 12px 16px; text-align: left;
  font-weight: 600; font-family: var(--font-serif);
}
.specs-table td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--moon);
}
.specs-table tbody tr:nth-child(even) { background: var(--bg-alt); }
.specs-table tbody tr:hover { background: rgba(0, 151, 167, 0.05); }

.table-scroll { overflow-x: auto; }

/* --- CTA Banner --- */
.cta-banner {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 50%, var(--magical) 100%);
  border-radius: var(--radius-lg); padding: 40px;
  text-align: center; margin: 40px 0;
  box-shadow: var(--shadow-lg);
  position: relative; overflow: hidden;
}
.cta-banner::before {
  content: '☽';
  position: absolute; top: 10px; left: 20px;
  font-size: 60px; color: rgba(232, 234, 246, 0.1);
}
.cta-banner h2 {
  font-family: var(--font-serif); font-size: 1.5rem;
  color: #fff; margin-bottom: 8px;
}
.cta-banner p {
  color: rgba(255,255,255,0.8); margin-bottom: 20px;
}
.cta-btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent-light), var(--accent));
  color: #fff; font-weight: 700;
  padding: 14px 40px; border-radius: 28px;
  font-size: 1.1rem;
  box-shadow: 0 4px 20px rgba(79, 195, 247, 0.5);
  transition: all 0.3s;
  text-decoration: none;
}
.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(79, 195, 247, 0.7);
  color: #fff;
}

/* --- Breadcrumb --- */
.breadcrumb {
  padding: 0 0 12px; font-size: 0.85rem;
  color: var(--text-light);
}
.breadcrumb a { color: var(--accent); }
.breadcrumb span { color: var(--text-muted); }

/* --- Reviews / Quotes --- */
.review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px; margin: 24px 0;
}
.review-card {
  background: var(--bg-card); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
  border-top: 3px solid var(--accent-light);
  position: relative;
}
.review-card::before {
  content: '"'; position: absolute; top: 8px; right: 16px;
  font-size: 3rem; color: var(--moon);
  font-family: var(--font-serif); line-height: 1;
}
.review-text { font-size: 0.92rem; color: var(--text-muted); margin-bottom: 10px; }
.review-author { font-size: 0.82rem; color: var(--accent); font-weight: 600; }

/* --- Page Header (non-index pages) --- */
.page-header {
  background: linear-gradient(160deg, var(--primary-dark), var(--primary), #1a2a7a);
  border-radius: var(--radius-lg); padding: 32px 40px;
  margin-bottom: 32px; color: #fff;
  position: relative; overflow: hidden;
  box-shadow: var(--shadow);
}
.page-header::after {
  content: '☽'; position: absolute;
  top: -10px; right: 20px;
  font-size: 80px; color: rgba(232, 234, 246, 0.08);
  line-height: 1;
}
.page-header h1 {
  font-family: var(--font-serif); font-size: 1.8rem;
  font-weight: 900; margin-bottom: 6px;
}
.page-header p { color: rgba(255,255,255,0.8); font-size: 0.95rem; }

/* --- Footer --- */
.site-footer {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  text-align: center; padding: 24px 20px;
  margin-top: 60px;
  border-top: 2px solid var(--accent-light);
}
.site-footer p {
  color: rgba(232, 234, 246, 0.7); font-size: 0.85rem;
}

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

/* --- WeChat-style decorative divider --- */
.moon-divider {
  text-align: center; margin: 32px 0;
  color: var(--moon); font-size: 1.4rem;
  letter-spacing: 12px;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .header-inner { padding: 0 12px; }
  .header-nav { gap: 0; }
  .header-nav a { font-size: 0.8rem; padding: 6px 8px; }
  .header-logo { font-size: 1.05rem; }
  .header-cta { padding: 6px 14px !important; font-size: 0.82rem !important; }
  .hero-content { padding: 32px 24px; }
  .hero-content h1 { font-size: 1.6rem; }
  .hero::after { font-size: 50px; top: 16px; right: 20px; }
  main { padding: 20px 12px 40px; }
  .feature-grid { grid-template-columns: 1fr; }
  .char-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .gallery-grid { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
  .section-title { font-size: 1.3rem; }
  .page-header { padding: 24px; }
  .page-header h1 { font-size: 1.4rem; }
  .cta-banner { padding: 28px 20px; }
  .guide-section { padding: 20px; }
  .story-block { padding: 20px; }
  .review-grid { grid-template-columns: 1fr; }
  .ending-list { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .header-nav a { font-size: 0.75rem; padding: 4px 6px; }
  .hero-content { padding: 24px 16px; }
  .hero-content h1 { font-size: 1.3rem; }
  .char-grid { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr 1fr; }
  .cta-btn { padding: 12px 28px; font-size: 0.95rem; }
}
