/* ========== PERSONA - CSS VARIABLES ========== */
:root {
  --red: #E53935;
  --red-dark: #C62828;
  --red-light: #EF5350;
  --blue: #1565C0;
  --blue-dark: #0D47A1;
  --blue-light: #42A5F5;
  --gray: #9E9E9E;
  --gray-dark: #616161;
  --gray-light: #E0E0E0;
  --white: #FDFDFD;
  --bg: #FDFDFD;
  --bg-warm: #F5F3F0;
  --text: #212121;
  --text-secondary: #616161;
  --text-soft: #757575;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --font-sans: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', system-ui, sans-serif;
  --font-serif: 'Georgia', 'Noto Serif SC', 'STSong', 'SimSun', serif;
  --radius: 8px;
  --radius-lg: 16px;
  --max-width: 1200px;
  --header-height: 64px;
}

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

/* ========== HEADER & NAV ========== */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #1a1a2e;
  border-bottom: 3px solid var(--red);
  height: var(--header-height);
  display: flex;
  align-items: center;
}
.header-inner {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--white);
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 1px;
}
.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--red);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  position: relative;
}
.logo-icon::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  background: var(--blue);
  border-radius: 50%;
  top: -4px;
  right: -4px;
}
nav { display: flex; align-items: center; gap: 8px; }
nav a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  transition: all 0.2s;
}
nav a:hover, nav a.active { color: var(--white); background: rgba(229,57,53,0.2); }
.nav-cta {
  background: var(--red) !important;
  color: var(--white) !important;
  font-weight: 600;
  padding: 8px 20px !important;
  border-radius: 24px !important;
  transition: all 0.3s !important;
}
.nav-cta:hover { background: var(--red-dark) !important; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.hamburger { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--white); margin: 5px 0; transition: 0.3s; }

/* ========== HERO ========== */
.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
  min-height: 480px;
}
.hero-home { min-height: 560px; }
.hero-subpage { min-height: 300px; padding: 40px 24px 48px; }
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
}
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(21,101,192,0.85) 0%, rgba(229,57,53,0.75) 50%, rgba(26,26,46,0.9) 100%);
}
.hero-home .hero-bg { background-image: url('../img/header.jpg'); }
.hero-story .hero-bg { background-image: url('../img/screenshot-01.jpg'); }
.hero-guide .hero-bg { background-image: url('../img/screenshot-02.jpg'); }
.hero-characters .hero-bg { background-image: url('../img/screenshot-03.jpg'); }
.hero-faq .hero-bg { background-image: url('../img/screenshot-04.jpg'); }
.hero-content { position: relative; z-index: 1; max-width: 800px; padding: 0 24px; }
.hero-tag {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
  padding: 6px 20px;
  border-radius: 20px;
  font-size: 0.85rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 20px;
  border: 1px solid rgba(255,255,255,0.2);
}
.hero-content h1, .hero-title-main {
  font-family: var(--font-serif);
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 16px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.3);
  letter-spacing: 2px;
}
.hero-subpage-title {
  font-size: 2rem;
  font-weight: 700;
}
.hero-subtitle {
  font-size: 1.15rem;
  opacity: 0.9;
  margin-bottom: 30px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
.hero-tagline {
  font-size: 1rem;
  opacity: 0.85;
  max-width: 600px;
  margin: 0 auto 8px;
}
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}
.hero-stat { text-align: center; }
.hero-stat-num {
  font-size: 2rem;
  font-weight: 700;
  font-family: var(--font-serif);
}
.hero-stat-label { font-size: 0.85rem; opacity: 0.8; }

/* ========== SR-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;
}

/* ========== SECTIONS ========== */
section { padding: 80px 24px; }
.section-inner { max-width: var(--max-width); margin: 0 auto; }
.section-alt { background: var(--bg-warm); padding-top: 0; }
.section-accent { background: linear-gradient(135deg, var(--blue-dark), var(--blue)); color: var(--white); }
.section-title {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 12px;
  color: var(--text);
}
.section-accent .section-title { color: var(--white); }
.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 48px;
  font-size: 1.05rem;
}

/* ========== CARDS ========== */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; }
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--red);
  transition: all 0.3s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card:nth-child(2n) { border-left-color: var(--blue); }
.card:nth-child(3n) { border-left-color: var(--gray); }
.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 16px;
}
.card-icon-red { background: rgba(229,57,53,0.1); color: var(--red); }
.card-icon-blue { background: rgba(21,101,192,0.1); color: var(--blue); }
.card-icon-gray { background: rgba(158,158,158,0.1); color: var(--gray-dark); }
.card h3 { font-family: var(--font-serif); font-size: 1.2rem; margin-bottom: 8px; }
.card p { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.7; }

/* ========== SCREENSHOT GALLERY ========== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.gallery-grid img {
  width: 100%;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: var(--shadow-sm);
}
.gallery-grid img:hover { transform: scale(1.03); box-shadow: var(--shadow-lg); }

/* ========== REVIEWS ========== */
.reviews-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.review-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  position: relative;
}
.review-card::before {
  content: '\201C';
  position: absolute;
  top: 8px;
  left: 16px;
  font-size: 4rem;
  font-family: var(--font-serif);
  color: rgba(229,57,53,0.1);
  line-height: 1;
}
.review-text { color: var(--text-secondary); font-style: italic; margin-bottom: 16px; position: relative; z-index: 1; }
.review-author { font-weight: 600; color: var(--text); }
.review-stars { color: var(--red); letter-spacing: 2px; }

/* ========== CTA BANNER ========== */
.cta-banner {
  background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
  color: var(--white);
  text-align: center;
  padding: 64px 24px;
}
.cta-banner h2 {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 12px;
}
.cta-banner p { opacity: 0.9; margin-bottom: 28px; font-size: 1.05rem; }
.cta-btn {
  display: inline-block;
  background: var(--white);
  color: var(--red);
  padding: 14px 40px;
  border-radius: 28px;
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.cta-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(0,0,0,0.3); }

/* ========== CONTENT PAGES ========== */
.content-section { padding: 60px 24px; }
.content-section h2 {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}
.content-section p {
  color: var(--text-secondary);
  margin-bottom: 20px;
  font-size: 1rem;
  line-height: 1.8;
}

/* Chapter / story styles */
.chapter { margin-bottom: 32px; }
.chapter-title {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--red);
  margin-bottom: 8px;
}
.chapter-desc { color: var(--text-secondary); line-height: 1.8; }

/* Character cards */
.char-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.char-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s;
}
.char-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.char-card img {
  width: 100%;
  height: 320px;
  object-fit: cover;
}
.char-card-body { padding: 20px; }
.char-card-body h3 { font-family: var(--font-serif); font-size: 1.2rem; margin-bottom: 6px; }
.char-role {
  display: inline-block;
  background: rgba(229,57,53,0.1);
  color: var(--red);
  font-size: 0.8rem;
  padding: 3px 12px;
  border-radius: 12px;
  margin-bottom: 10px;
}
.char-card-body p { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.6; }
.char-traits { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.char-trait {
  background: rgba(21,101,192,0.08);
  color: var(--blue);
  font-size: 0.78rem;
  padding: 3px 10px;
  border-radius: 10px;
}

/* Guide styles */
.guide-step { margin-bottom: 36px; }
.guide-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--red);
  color: var(--white);
  border-radius: 50%;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 12px;
}
.guide-step h3 { font-family: var(--font-serif); font-size: 1.2rem; margin-bottom: 8px; }
.guide-step p { color: var(--text-secondary); line-height: 1.8; }
.guide-intro { color: var(--text-secondary); font-size: 1.05rem; line-height: 1.8; margin-bottom: 32px; }
.route-heading {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--blue);
  margin: 32px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--gray-light);
}
.route-desc { color: var(--text-secondary); line-height: 1.8; margin-bottom: 16px; }
.tip-box {
  background: rgba(21,101,192,0.06);
  border-left: 4px solid var(--blue);
  padding: 16px 20px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 20px 0;
}
.tip-box p { margin-bottom: 0; color: var(--blue-dark); font-size: 0.95rem; }

/* FAQ Accordion */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item {
  background: var(--white);
  border-radius: var(--radius);
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.faq-q {
  padding: 18px 24px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 1.02rem;
  transition: background 0.2s;
}
.faq-q:hover { background: rgba(229,57,53,0.03); }
.faq-q::after {
  content: '+';
  font-size: 1.4rem;
  color: var(--red);
  transition: transform 0.3s;
}
.faq-item.open .faq-q::after { content: '\2212'; }
.faq-a {
  padding: 0 24px;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s;
  color: var(--text-secondary);
  line-height: 1.8;
}
.faq-item.open .faq-a { padding: 0 24px 18px; max-height: 500px; }

/* System requirements table */
.sys-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.sys-table th {
  background: var(--blue);
  color: var(--white);
  padding: 14px 20px;
  text-align: left;
  font-weight: 600;
}
.sys-table td {
  padding: 12px 20px;
  border-bottom: 1px solid var(--gray-light);
  color: var(--text-secondary);
}
.sys-table tr:last-child td { border-bottom: none; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.sys-reqs-h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--blue);
  margin: 24px 0 12px;
}
.sys-reqs-h3:first-of-type { margin-top: 0; }

/* Section subheading */
.section-subheading {
  text-align: center;
  margin: 40px 0 24px;
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--text);
}
.prose { max-width: 800px; margin: 0 auto; }

/* List utility classes */
.content-list { list-style: disc; padding-left: 24px; margin-bottom: 20px; }
.content-list-num { list-style: decimal; padding-left: 24px; margin-bottom: 20px; }
.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-red { color: var(--red); }
.strong-blue { color: var(--blue); }
.strong-gold { color: #F9A825; }
.strong-muted { color: var(--gray-dark); }
.strong-navy { color: var(--blue-dark); }

/* Table highlight */
.td-highlight { color: var(--red); font-weight: 700; }

/* ========== FOOTER ========== */
footer {
  background: #1a1a2e;
  color: rgba(255,255,255,0.6);
  text-align: center;
  padding: 24px;
  font-size: 0.85rem;
}
footer p { margin: 0; }

/* ========== LIGHTBOX ========== */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(0,0,0,0.9);
  align-items: center;
  justify-content: center;
}
.lightbox.active { display: flex; }
.lightbox img { max-width: 90vw; max-height: 90vh; border-radius: var(--radius); }
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: var(--white);
  font-size: 2rem;
  cursor: pointer;
  background: none;
  border: none;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .hamburger { display: block; }
  nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: #1a1a2e;
    flex-direction: column;
    padding: 16px;
    gap: 4px;
  }
  nav.open { display: flex; }
  nav a { width: 100%; text-align: center; }
  .hero-content h1, .hero-title-main { font-size: 2rem; }
  .hero-subpage-title { font-size: 1.6rem; }
  .hero-stats { gap: 20px; }
  .hero-stat-num { font-size: 1.5rem; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .card-grid { grid-template-columns: 1fr; }
  .char-grid { grid-template-columns: repeat(2, 1fr); }
  .section-title { font-size: 1.8rem; }
  section { padding: 50px 16px; }
}

@media (max-width: 480px) {
  .hero-content h1, .hero-title-main { font-size: 1.6rem; }
  .hero-subpage-title { font-size: 1.3rem; }
  .gallery-grid { grid-template-columns: 1fr; }
  .char-grid { grid-template-columns: 1fr; }
  .reviews-grid { grid-template-columns: 1fr; }
  .hero-stats { flex-direction: column; gap: 12px; }
  section { padding: 40px 12px; }
}
