/* ============================================================
   公主协同效应 (Princess Synergy) — 浅色科幻卡牌RPG主题
   配色：皇室紫 + 协同粉 + 科技青 + 深靛底
   ============================================================ */

@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');

:root {
  --font-serif: 'Noto Serif SC', 'SimSun', 'STSong', serif;
  --font-sans: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;

  /* 主题色系 */
  --royal-purple: #7c3aed;
  --royal-purple-dark: #5b21b6;
  --synergy-pink: #ec4899;
  --synergy-pink-dark: #be185d;
  --tech-cyan: #06b6d4;
  --tech-cyan-dark: #0891b2;
  --deep-indigo: #1e1b4b;
  --deep-indigo-light: #312e81;

  /* 浅色背景层 */
  --bg: #faf8f5;
  --bg-card: #ffffff;
  --bg-alt: #f3f0ff;

  /* 文字色 */
  --text: #1e1b4b;
  --text-soft: #4a4575;
  --text-muted: #8b87a8;

  /* 功能色 */
  --border: #e2dff0;
  --shadow: rgba(30, 27, 75, 0.06);
  --shadow-md: rgba(30, 27, 75, 0.10);

  /* 半径与间距 */
  --radius: 12px;
  --radius-lg: 16px;
  --max-width: 1200px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
  letter-spacing: 0.02em;
}

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

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

/* ========== 头部导航 ========== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(135deg, var(--deep-indigo) 0%, var(--deep-indigo-light) 100%);
  border-bottom: 3px solid var(--royal-purple);
  box-shadow: 0 2px 16px var(--shadow-md);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  padding-bottom: 10px;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
}

.header-logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--royal-purple), var(--synergy-pink));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 900;
  color: #fff;
}

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

.header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.header-nav a {
  color: rgba(255,255,255,0.82);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 500;
  transition: all 0.2s;
}

.header-nav a:hover,
.header-nav a.active {
  color: #fff;
  background: rgba(255,255,255,0.12);
}

.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 24px;
  background: linear-gradient(135deg, var(--synergy-pink), var(--royal-purple));
  color: #fff !important;
  border-radius: 24px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.3s;
  box-shadow: 0 4px 12px rgba(236, 72, 153, 0.35);
}

.header-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(236, 72, 153, 0.45);
  background: linear-gradient(135deg, var(--synergy-pink-dark), var(--royal-purple-dark));
}

/* ========== 英雄区 ========== */
.hero {
  position: relative;
  background: linear-gradient(170deg, var(--deep-indigo) 0%, #2d2968 40%, #4c3f8f 100%);
  padding: 72px 24px 80px;
  text-align: center;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(124, 58, 237, 0.18) 0%, transparent 50%),
    radial-gradient(circle at 80% 30%, rgba(6, 182, 212, 0.12) 0%, transparent 50%),
    radial-gradient(circle at 50% 80%, rgba(236, 72, 153, 0.10) 0%, transparent 50%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(to top, var(--bg), transparent);
  pointer-events: none;
}

.hero > * { position: relative; z-index: 1; }

.hero-title-main {
  font-family: var(--font-serif);
  font-size: 3rem;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 2px 12px rgba(124, 58, 237, 0.4);
  margin-bottom: 12px;
  letter-spacing: 0.06em;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.78);
  font-weight: 400;
  max-width: 640px;
  margin: 0 auto 8px;
}

.hero-tagline {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.6);
  font-weight: 300;
  margin-bottom: 24px;
}

.hero-badge-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.hero-badge {
  display: inline-block;
  padding: 5px 16px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 20px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.8);
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(4px);
}

/* ========== 子页英雄 ========== */
.hero-subpage {
  padding: 40px 24px 48px;
}

.hero-subpage-title {
  font-size: 2rem;
  font-weight: 700;
}

/* ========== 内容区 ========== */
.content-section {
  padding: 60px 24px;
}

.content-section-no-top {
  padding-top: 0;
}

.content-section h2 {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

.section-intro {
  font-size: 1.05rem;
  color: var(--text-soft);
  max-width: 720px;
  margin-bottom: 36px;
  line-height: 1.9;
}

/* ========== 特性卡片（首页） ========== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  border-left: 4px solid var(--royal-purple);
  box-shadow: 0 2px 12px var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 24px var(--shadow-md);
}

.feature-card:nth-child(2) { border-left-color: var(--synergy-pink); }
.feature-card:nth-child(3) { border-left-color: var(--tech-cyan); }
.feature-card:nth-child(4) { border-left-color: var(--royal-purple); }
.feature-card:nth-child(5) { border-left-color: var(--synergy-pink); }
.feature-card:nth-child(6) { border-left-color: var(--tech-cyan); }

.feature-card-icon {
  font-size: 1.8rem;
  margin-bottom: 12px;
}

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

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

/* ========== 游戏信息卡（首页） ========== */
.info-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 48px;
}

.info-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 2px 8px var(--shadow);
  text-align: center;
}

.info-card-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.info-card-value {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--deep-indigo);
}

/* ========== 截图画廊 ========== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.gallery-grid img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px var(--shadow);
}

.gallery-grid img:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 20px var(--shadow-md);
}

/* ========== 灯箱 ========== */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(30, 27, 75, 0.94);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.lightbox.active {
  display: flex;
}

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

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 32px;
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.lightbox-close:hover { opacity: 1; }

/* ========== CTA横幅（仅首页） ========== */
.cta-banner {
  background: linear-gradient(135deg, var(--deep-indigo) 0%, #3b2f7e 100%);
  padding: 48px 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, 72, 153, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 70% 30%, rgba(124, 58, 237, 0.12) 0%, transparent 50%);
  pointer-events: none;
}

.cta-banner > * { position: relative; z-index: 1; }

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

.cta-banner p {
  color: rgba(255,255,255,0.7);
  font-size: 1.05rem;
  margin-bottom: 28px;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 40px;
  background: linear-gradient(135deg, var(--synergy-pink), var(--royal-purple));
  color: #fff;
  border-radius: 28px;
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s;
  box-shadow: 0 6px 20px rgba(236, 72, 153, 0.35);
}

.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(236, 72, 153, 0.5);
}

/* ========== 页脚 ========== */
.site-footer {
  background: var(--deep-indigo);
  color: rgba(255,255,255,0.6);
  text-align: center;
  padding: 28px 24px;
  font-size: 0.9rem;
}

/* ========== 角色卡片（characters.html） ========== */
.char-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.char-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 2px 12px var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}

.char-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 24px var(--shadow-md);
}

.char-card-img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  background: var(--bg-alt);
}

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

.char-card-body h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--deep-indigo);
  margin-bottom: 4px;
}

.char-card-subtitle {
  font-size: 0.85rem;
  color: var(--synergy-pink);
  font-weight: 600;
  margin-bottom: 12px;
}

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

.char-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.char-tag {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 14px;
  font-size: 0.78rem;
  font-weight: 500;
  background: var(--bg-alt);
  color: var(--royal-purple);
}

/* ========== 剧情板块（story.html） ========== */
.story-block {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 28px;
  box-shadow: 0 2px 12px var(--shadow);
  border-left: 4px solid var(--royal-purple);
}

.story-block:nth-child(odd) { border-left-color: var(--synergy-pink); }

.story-block h3 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--deep-indigo);
  margin-bottom: 12px;
}

.story-block p {
  color: var(--text-soft);
  line-height: 1.85;
  font-size: 0.97rem;
}

.chapter-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--royal-purple);
  margin-bottom: 6px;
}

/* ========== 攻略板块（guide.html） ========== */
.guide-step {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 28px 24px 28px 80px;
  margin-bottom: 20px;
  box-shadow: 0 2px 12px var(--shadow);
  position: relative;
}

.guide-step::before {
  content: attr(data-step);
  position: absolute;
  left: 20px;
  top: 24px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--royal-purple), var(--synergy-pink));
  color: #fff;
  font-size: 1.1rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}

.guide-step h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--deep-indigo);
  margin-bottom: 8px;
}

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

.guide-intro {
  font-size: 1.05rem;
  color: var(--text-soft);
  line-height: 1.9;
  margin-bottom: 32px;
}

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

.route-heading {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--synergy-pink);
  margin: 20px 0 8px;
}

.tip-box {
  background: var(--bg-alt);
  border-left: 4px solid var(--tech-cyan);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 20px 0;
}

.tip-box strong {
  color: var(--tech-cyan-dark);
}

/* ========== 列表类 ========== */
.content-list {
  list-style: disc;
  padding-left: 24px;
  margin: 12px 0;
}

.content-list-num {
  list-style: decimal;
  padding-left: 24px;
  margin: 12px 0;
}

.content-li {
  color: var(--text-soft);
  margin-bottom: 5px;
  line-height: 1.7;
}

.content-li-sm { margin-bottom: 4px; }
.content-li-md { margin-bottom: 8px; }
.content-li-lg { margin-bottom: 10px; }

.strong-pink { color: var(--synergy-pink); }
.strong-red { color: #dc2626; }
.strong-gold { color: #d97706; }
.strong-muted { color: var(--text-muted); }
.strong-navy { color: var(--deep-indigo); }

/* ========== FAQ手风琴 ========== */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

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

.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  cursor: pointer;
  font-weight: 600;
  color: var(--deep-indigo);
  user-select: none;
  transition: background 0.2s;
}

.faq-q:hover { background: var(--bg-alt); }

.faq-q::after {
  content: '+';
  font-size: 1.5rem;
  color: var(--royal-purple);
  transition: transform 0.3s;
}

.faq-item.open .faq-q::after {
  content: '−';
  transform: rotate(0);
}

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
  padding: 0 24px;
}

.faq-item.open .faq-a {
  max-height: 600px;
  padding: 0 24px 20px;
}

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

/* ========== 系统需求表 ========== */
.sys-reqs-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 0.93rem;
}

.sys-reqs-table th,
.sys-reqs-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.sys-reqs-table th {
  background: var(--bg-alt);
  font-weight: 700;
  color: var(--deep-indigo);
  font-family: var(--font-serif);
  font-size: 0.95rem;
}

.sys-reqs-table tr:hover td {
  background: var(--bg-alt);
}

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

.sys-reqs-h3 {
  font-family: var(--font-serif) !important;
  font-size: 1.2rem !important;
  font-weight: 700 !important;
  color: var(--deep-indigo);
  margin: 28px 0 12px;
}

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

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

/* ========== 章节子标题 ========== */
.chapter-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--royal-purple);
  margin-bottom: 6px;
}

/* ========== 章节分隔标题 ========== */
.section-subheading {
  text-align: center;
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--deep-indigo);
  margin: 40px 0 24px;
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
  html { font-size: 15px; }

  .site-header .container {
    flex-wrap: wrap;
    gap: 8px;
  }

  .header-nav {
    order: 3;
    width: 100%;
    justify-content: center;
    gap: 2px;
  }

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

  .hero-title-main {
    font-size: 2rem;
  }

  .hero-subpage-title {
    font-size: 1.5rem;
  }

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

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

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

  .content-section h2 {
    font-size: 1.6rem;
  }

  .guide-step {
    padding: 20px 16px 20px 56px;
  }

  .guide-step::before {
    left: 10px;
    top: 18px;
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
  }
}

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

  .hero-tagline { font-size: 0.85rem; }

  .hero-badge-row { gap: 6px; }

  .hero-badge {
    font-size: 0.75rem;
    padding: 4px 10px;
  }

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

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

  .cta-btn {
    padding: 12px 28px;
    font-size: 1rem;
  }

  .story-block {
    padding: 20px;
  }

  .info-cards {
    grid-template-columns: 1fr;
  }
}
