/* ============================================================
   Starmaker Story 造星者物语 — 中文推广站
   Design: 璀璨星光舞台主题
   Colors: 紫罗兰 #7B1FA2, 金色 #FFC107, 星光银 #E0E0E0, 深邃蓝 #1A237E
   ============================================================ */

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

/* ========== CSS VARIABLES ========== */
:root {
  --purple: #7B1FA2;
  --purple-light: #9C27B0;
  --purple-dark: #4A148C;
  --gold: #FFC107;
  --gold-light: #FFD54F;
  --gold-dark: #FF8F00;
  --silver: #E0E0E0;
  --silver-light: #F5F5F5;
  --navy: #1A237E;
  --navy-light: #283593;
  --navy-dark: #0D1642;

  --bg: #faf8f5;
  --bg-warm: #f5f0eb;
  --bg-card: #ffffff;
  --text: #1a1a2e;
  --text-soft: #555566;
  --text-muted: #888899;
  --text-light: #aaaabb;

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

  --shadow-sm: 0 2px 8px rgba(26, 35, 126, 0.08);
  --shadow-md: 0 4px 16px rgba(26, 35, 126, 0.12);
  --shadow-lg: 0 8px 32px rgba(26, 35, 126, 0.16);
  --radius: 12px;
  --radius-sm: 8px;
}

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

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

body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

a:hover {
  color: var(--purple-light);
}

/* ========== UTILITY: Screen Reader Only ========== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -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: linear-gradient(135deg, var(--navy-dark), var(--navy));
  border-bottom: 3px solid var(--gold);
  padding: 0 24px;
  box-shadow: var(--shadow-md);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-logo-img {
  width: 32px;
  height: 32px;
  border-radius: 4px;
}

.header-logo-text {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
}

.header-nav a {
  display: block;
  padding: 8px 16px;
  color: var(--silver);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.header-nav a:hover,
.header-nav a.active {
  color: var(--gold);
  background: rgba(255, 193, 7, 0.1);
}

.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--navy-dark);
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: 24px;
  white-space: nowrap;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
}

.header-cta:hover {
  color: var(--navy-dark);
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 193, 7, 0.4);
}

.header-mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 8px;
}

/* ========== HERO SECTION (index) ========== */
.hero {
  position: relative;
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--purple-dark) 50%, var(--navy) 100%);
  padding: 60px 24px 80px;
  text-align: center;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 193, 7, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(123, 31, 162, 0.12) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.03) 0%, transparent 70%);
  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-inner {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 0 auto;
}

.hero-title-main {
  font-family: var(--font-serif);
  font-size: 2.8rem;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0,0,0,0.4), 0 0 40px rgba(255,193,7,0.15);
  margin-bottom: 12px;
  line-height: 1.3;
}

.hero-title-main .en-subtitle {
  display: block;
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--silver);
  margin-top: 6px;
  letter-spacing: 0.05em;
}

.hero-tagline {
  font-size: 1.05rem;
  color: var(--silver);
  margin-bottom: 8px;
  font-weight: 300;
}

.hero-stars {
  font-size: 1.2rem;
  color: var(--gold);
  letter-spacing: 4px;
  margin-bottom: 16px;
}

/* ========== SUB PAGE HERO ========== */
.hero-subpage {
  padding: 40px 24px 48px;
}

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

/* ========== SECTIONS ========== */
.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 60px 24px;
}

.section-alt {
  background: var(--bg-warm);
  border-top: 1px solid rgba(26,35,126,0.05);
  border-bottom: 1px solid rgba(26,35,126,0.05);
}

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

.section-title-group {
  text-align: center;
  margin-bottom: 40px;
}

.section-title-group-spaced {
  margin-top: 48px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* ========== GAME INFO CARDS (index) ========== */
.game-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.game-info-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--purple);
  transition: transform 0.2s, box-shadow 0.2s;
}

.game-info-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.game-info-card-icon {
  font-size: 2rem;
  margin-bottom: 8px;
}

.game-info-card-value {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--purple);
}

.game-info-card-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.game-info-desc {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0;
}

/* ========== FEATURE CARDS (index) ========== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--gold);
  transition: transform 0.2s, box-shadow 0.2s;
}

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

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

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

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

/* ========== PROSE (index overview) ========== */
.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;
}

/* ========== SCREENSHOT GALLERY (index) ========== */
.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.screenshot-item {
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.screenshot-item:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-md);
}

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

/* ========== REVIEWS (index) ========== */
.review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.review-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--purple-light);
}

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

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

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

/* ========== CTA BANNER (index only) ========== */
.cta-banner {
  background: linear-gradient(135deg, var(--purple-dark), var(--navy));
  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(255,193,7,0.1) 0%, transparent 50%),
              radial-gradient(circle at 70% 50%, rgba(255,193,7,0.05) 0%, transparent 50%);
  pointer-events: none;
}

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

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

.cta-banner p {
  font-size: 1rem;
  color: var(--silver-light);
  margin-bottom: 24px;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 36px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--navy-dark);
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: 30px;
  transition: all 0.25s;
  box-shadow: 0 4px 20px rgba(255,193,7,0.35);
}

.cta-button:hover {
  color: var(--navy-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(255,193,7,0.5);
}

/* ========== CONTENT SECTION (sub pages) ========== */
.content-section {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 24px 60px;
}

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

.content-section h3 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--navy);
  margin-top: 32px;
  margin-bottom: 12px;
}

.content-section p {
  font-size: 0.95rem;
  color: var(--text-soft);
  line-height: 1.85;
  margin-bottom: 16px;
}

.content-section blockquote {
  border-left: 4px solid var(--gold);
  padding: 12px 20px;
  margin: 20px 0;
  background: rgba(255, 193, 7, 0.08);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.9rem;
  color: var(--text-soft);
  font-style: italic;
}

/* ========== CHAPTER (story.html) ========== */
.chapter-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--purple);
  margin-top: 28px;
  margin-bottom: 10px;
}

/* ========== GUIDE (guide.html) ========== */
.guide-steps-wrapper {
  counter-reset: guide-step;
}

.guide-step {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--purple);
  position: relative;
}

.guide-step h3::before {
  counter-increment: guide-step;
  content: '#' counter(guide-step) ' ';
  color: var(--gold);
  font-weight: 900;
}

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

.guide-step p {
  font-size: 0.9rem;
  color: var(--text-soft);
  line-height: 1.8;
  margin-bottom: 4px;
}

.guide-intro {
  font-size: 0.95rem;
  color: var(--text-soft);
  line-height: 1.85;
  margin-bottom: 24px;
}

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

.route-heading {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--purple);
  margin-top: 24px;
  margin-bottom: 8px;
}

/* ========== CHARACTER CARDS (characters.html) ========== */
.section-subheading {
  text-align: center;
  margin: 40px 0 24px;
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy);
}

.character-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

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

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

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

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

.character-card-body h3 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
}

.character-card-en {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

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

.character-tag {
  display: inline-block;
  padding: 3px 10px;
  background: rgba(123, 31, 162, 0.1);
  color: var(--purple);
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 12px;
}

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

/* ========== FAQ (faq.html) ========== */
.faq-intro {
  color: var(--text-soft);
  margin-bottom: 32px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  border-left: 4px solid var(--gold);
}

.faq-question {
  width: 100%;
  text-align: left;
  padding: 18px 20px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--navy);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  transition: background 0.2s;
}

.faq-question:hover {
  background: rgba(255, 193, 7, 0.05);
}

.faq-icon {
  font-size: 1.2rem;
  color: var(--gold);
  transition: transform 0.3s;
  flex-shrink: 0;
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
}

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

.faq-item.active .faq-answer {
  display: block;
}

.faq-note {
  margin-top: 16px;
}

/* ========== TABLE (faq system reqs) ========== */
.table-scroll {
  overflow-x: auto;
  margin: 16px 0;
}

.sys-reqs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.sys-reqs-table th,
.sys-reqs-table td {
  padding: 10px 14px;
  border: 1px solid rgba(26,35,126,0.1);
  text-align: left;
}

.sys-reqs-table th {
  background: var(--navy);
  color: #fff;
  font-weight: 600;
  font-size: 0.8rem;
}

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

.sys-reqs-h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--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;
}

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

/* ========== 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-gold { color: var(--gold-dark); }
.strong-purple { color: var(--purple); }
.strong-muted { color: var(--text-muted); }
.strong-navy { color: var(--navy); }

/* ========== LIGHTBOX ========== */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(13, 22, 66, 0.95);
  align-items: center;
  justify-content: center;
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
}

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

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

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  transition: background 0.2s;
}

.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255,255,255,0.2);
}

/* ========== FOOTER ========== */
.site-footer {
  background: var(--navy-dark);
  text-align: center;
  padding: 24px;
  border-top: 3px solid var(--gold);
}

.site-footer p {
  color: var(--silver);
  font-size: 0.85rem;
  opacity: 0.8;
}

/* ========== RESPONSIVE: 768px ========== */
@media (max-width: 768px) {
  .hero-title-main {
    font-size: 2rem;
  }

  .hero-title-main .en-subtitle {
    font-size: 0.9rem;
  }

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

  .section-title {
    font-size: 1.7rem;
  }

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

  .section {
    padding: 40px 20px;
  }

  .content-section {
    padding: 32px 20px 48px;
  }

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

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

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

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

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

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

  .header-mobile-toggle {
    display: block;
  }

  .header-nav {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--navy-dark);
    flex-direction: column;
    padding: 8px 0;
    box-shadow: var(--shadow-md);
  }

  .header-nav.open {
    display: flex;
  }

  .header-nav a {
    padding: 12px 24px;
    border-radius: 0;
  }
}

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

  .hero-title-main .en-subtitle {
    font-size: 0.8rem;
  }

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

  .section-title {
    font-size: 1.4rem;
  }

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

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

  .section {
    padding: 32px 16px;
  }

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

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

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

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

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

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

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

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

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

  .header-cta {
    padding: 6px 14px;
    font-size: 0.8rem;
  }

  .character-card-img {
    height: 220px;
  }
}
