/* ============================================================
   Violated Princess 中文官网 — 浅色古典公主风格
   王室紫(#7B1FA2) | 玫瑰粉(#E91E63) | 象牙白(#FFFFF0) | 暗金(#FFC107)
   Theme: Princess / Kingdom / Fall / Resistance
   ============================================================ */

/* ========== CSS VARIABLES ========== */
:root {
  /* Primary palette */
  --royal-purple: #7B1FA2;
  --purple-dark: #5E1370;
  --purple-light: #9C27B0;
  --purple-soft: #CE93D8;
  --rose-pink: #E91E63;
  --pink-dark: #C2185B;
  --pink-light: #F48FB1;
  --ivory: #FFFFF0;
  --ivory-warm: #FFF8E1;
  --gold: #FFC107;
  --gold-dark: #FF8F00;
  --gold-light: #FFECB3;

  /* Semantic */
  --bg: #FFFFF0;
  --bg-warm: #FFF8E7;
  --bg-card: #FFFDF5;
  --text: #2D1B3E;
  --text-soft: #5C4A6B;
  --text-muted: #8B7D9B;
  --accent: var(--royal-purple);
  --accent-dk: var(--purple-dark);
  --accent-lt: var(--purple-soft);
  --pink-fierce: var(--rose-pink);
  --danger-red: #D32F2F;
  --accent-gold: var(--gold-dark);
  --steel-light: #E8E0F0;
  --uniform-navy: #3E1A5E;
  --border-light: #E8DCF0;
  --border-card: #EDE4F0;
  --shadow-card: 0 2px 12px rgba(123, 31, 162, 0.08);

  /* Typography */
  --font-serif: "Noto Serif SC", "Songti SC", "SimSun", "STSong", "AR PL UMing CN", Georgia, serif;
  --font-sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;

  /* Spacing */
  --header-h: 64px;
  --max-width: 1080px;
}

/* ========== 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;
  -webkit-font-smoothing: antialiased;
}

/* ========== ACCESSIBILITY ========== */
.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 ========== */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(135deg, var(--purple-dark), var(--royal-purple));
  border-bottom: 3px solid var(--gold);
  box-shadow: 0 2px 16px rgba(123, 31, 162, 0.25);
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: var(--header-h);
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  border: 2px solid var(--gold);
}
.logo-text {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
}
nav { display: flex; align-items: center; gap: 8px; }
nav a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 6px 14px;
  border-radius: 6px;
  transition: all 0.2s;
  font-weight: 500;
}
nav a:hover, nav a.active {
  background: rgba(255,255,255,0.15);
  color: #fff;
}
.nav-btn {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--purple-dark) !important;
  font-weight: 700 !important;
  padding: 8px 18px !important;
  border-radius: 20px !important;
  margin-left: 4px;
  box-shadow: 0 2px 8px rgba(255, 193, 7, 0.35);
  transition: all 0.2s;
}
.nav-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(255, 193, 7, 0.45);
  background: linear-gradient(135deg, var(--gold-light), var(--gold)) !important;
}

/* Hamburger */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.3s;
}

/* ========== HERO SECTION ========== */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 420px;
  padding: 80px 24px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--purple-dark) 0%, var(--royal-purple) 40%, var(--purple-light) 100%);
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.35;
  z-index: 0;
}
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(94,19,112,0.6) 0%, rgba(123,31,162,0.7) 100%);
}
.hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
}
.hero-title-main {
  font-family: var(--font-serif);
  font-size: 3.2rem;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0,0,0,0.5), 0 0 40px rgba(255,193,7,0.3);
  margin-bottom: 16px;
  line-height: 1.3;
  letter-spacing: 0.04em;
}
.hero-title-main .jp-subtitle {
  display: block;
  font-size: 1rem;
  font-weight: 400;
  color: var(--gold-light);
  margin-top: 8px;
  letter-spacing: 0.08em;
  opacity: 0.9;
}
.hero-tagline {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: 8px;
}

/* Hero decorative motif — crown/scepter pseudo-elements */
.hero-inner::before {
  content: '♛';
  display: block;
  font-size: 2.5rem;
  color: var(--gold);
  margin-bottom: 16px;
  opacity: 0.8;
  text-shadow: 0 0 20px rgba(255,193,7,0.5);
}

/* Sub-page hero */
.hero-subpage {
  padding: 40px 24px 48px;
  min-height: 220px;
}
.hero-subpage-title {
  font-size: 2.2rem;
  font-weight: 700;
}

/* Page-specific hero backgrounds */
.hero-home .hero-bg { background-image: url('../img/hero-bg.jpg'); }
.hero-guide .hero-bg { background-image: url('../img/hero-bg-dark.jpg'); }
.hero-story .hero-bg { background-image: url('../img/screenshot-01.jpg'); }
.hero-characters .hero-bg { background-image: url('../img/screenshot-02.jpg'); }
.hero-faq .hero-bg { background-image: url('../img/hero-bg-dark.jpg'); }

/* ========== CONTENT SECTIONS ========== */
.content-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 64px 24px;
}
.section-alt {
  background: var(--bg-warm);
}
.section-no-padding {
  padding: 0;
}

/* Section headings */
.section-heading {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  color: var(--accent-dk);
  margin-bottom: 8px;
}
.section-heading-alt {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  color: var(--accent-dk);
  margin-bottom: 20px;
}
.section-subtext {
  text-align: center;
  color: var(--text-soft);
  margin-bottom: 32px;
  font-size: 0.95rem;
}

/* Content section h2 (for sub-pages: styled like H1 but uses h2 tag) */
.content-section h2 {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

/* Sub-headings */
.section-subheading {
  text-align: center;
  margin: 40px 0 24px;
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent-dk);
}
.section-title-group-spaced {
  margin-top: 48px;
}

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

.chapter-title {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--royal-purple);
  margin: 28px 0 12px;
}
.route-heading {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--purple-dark);
  margin: 24px 0 10px;
}
.route-desc {
  margin-bottom: 16px;
  color: var(--text-soft);
  line-height: 1.8;
}
.guide-intro {
  margin-bottom: 20px;
  color: var(--text-soft);
  line-height: 1.8;
}
.guide-intro-top {
  margin-bottom: 20px;
  color: var(--text-soft);
  line-height: 1.8;
  margin-top: 8px;
}

/* ========== GAME INFO CARDS ========== */
.game-info-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 40px 0 8px;
}
.game-info-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-left: 4px solid var(--royal-purple);
  border-radius: 8px;
  padding: 20px 16px;
  text-align: center;
  transition: all 0.2s;
}
.game-info-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
  border-left-color: var(--rose-pink);
}
.game-info-card .info-icon {
  font-size: 1.8rem;
  margin-bottom: 6px;
}
.game-info-card .info-value {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent-dk);
  margin-bottom: 2px;
}
.game-info-card .info-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.game-info-desc {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0;
  margin-bottom: 0;
}

/* ========== FEATURE CARDS ========== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 8px;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: 28px 20px;
  text-align: center;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
}
.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--royal-purple), var(--rose-pink), var(--gold));
}
.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(123, 31, 162, 0.12);
}
.feature-icon {
  font-size: 2.2rem;
  margin-bottom: 12px;
  display: block;
}
.feature-card h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent-dk);
  margin-bottom: 8px;
}
.feature-card p {
  font-size: 0.88rem;
  color: var(--text-soft);
  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: 8px;
  border: 2px solid var(--border-light);
  cursor: pointer;
  transition: all 0.25s;
}
.gallery-grid img:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 20px rgba(123, 31, 162, 0.18);
  border-color: var(--purple-soft);
}

/* ========== REVIEWS ========== */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.review-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: 24px 20px;
  position: relative;
}
.review-card::before {
  content: '"';
  position: absolute;
  top: 8px;
  left: 16px;
  font-family: var(--font-serif);
  font-size: 3rem;
  color: var(--purple-soft);
  opacity: 0.3;
  line-height: 1;
}
.review-card .review-text {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.75;
  font-style: italic;
  margin-bottom: 12px;
  padding-top: 8px;
}
.review-card .review-author {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}
.review-card .review-stars {
  color: var(--gold-dark);
  font-size: 0.9rem;
  margin-bottom: 4px;
}

/* ========== CTA BANNER (index only) ========== */
.cta-banner {
  background: linear-gradient(135deg, var(--purple-dark), var(--royal-purple));
  text-align: center;
  padding: 56px 24px;
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(255,193,7,0.1) 0%, transparent 70%);
}
.cta-banner-inner {
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin: 0 auto;
}
.cta-banner h2 {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
}
.cta-banner p {
  color: rgba(255,255,255,0.8);
  font-size: 1rem;
  margin-bottom: 24px;
}
.btn-cta {
  display: inline-block;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--purple-dark);
  font-weight: 700;
  font-size: 1.1rem;
  padding: 14px 40px;
  border-radius: 30px;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(255, 193, 7, 0.4);
  transition: all 0.25s;
  letter-spacing: 0.04em;
}
.btn-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(255, 193, 7, 0.5);
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
}

/* ========== CHARACTER CARDS ========== */
.char-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 8px;
}
.char-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.25s;
}
.char-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(123, 31, 162, 0.12);
}
.char-card img {
  width: 100%;
  height: 320px;
  object-fit: cover;
}
.char-card-body {
  padding: 18px 16px;
}
.char-card-body h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent-dk);
  margin-bottom: 4px;
}
.char-card-body .char-title {
  font-size: 0.82rem;
  color: var(--rose-pink);
  font-weight: 600;
  margin-bottom: 8px;
}
.char-card-body p {
  font-size: 0.86rem;
  color: var(--text-soft);
  line-height: 1.65;
}
.char-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.char-tag {
  background: var(--purple-soft);
  color: var(--purple-dark);
  font-size: 0.75rem;
  padding: 2px 10px;
  border-radius: 12px;
  font-weight: 600;
}

/* ========== GUIDE STEPS ========== */
.guide-step {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-left: 4px solid var(--royal-purple);
  border-radius: 8px;
  padding: 20px 20px 20px 48px;
  margin-bottom: 16px;
  position: relative;
}
.guide-step::before {
  content: '♛';
  position: absolute;
  left: 12px;
  top: 18px;
  font-size: 1.3rem;
  color: var(--royal-purple);
  opacity: 0.6;
}
.guide-step h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-dk);
  margin-bottom: 6px;
}
.guide-step p {
  font-size: 0.9rem;
  color: var(--text-soft);
  line-height: 1.7;
}
.guide-tip {
  background: linear-gradient(135deg, #FFF8E1, #FFFDE7);
  border: 1px solid var(--gold-light);
  border-left: 4px solid var(--gold-dark);
  border-radius: 8px;
  padding: 16px 20px;
  margin: 16px 0;
}
.guide-tip strong {
  color: var(--gold-dark);
}
.guide-steps-wrapper {
  counter-reset: guide-step-num;
}

/* ========== FAQ ACCORDION ========== */
.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: 1px solid var(--border-card);
  border-radius: 10px;
  overflow: hidden;
  transition: all 0.2s;
}
.faq-question {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 18px 44px 18px 20px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  position: relative;
  line-height: 1.5;
}
.faq-question::after {
  content: '+';
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.3rem;
  color: var(--royal-purple);
  font-weight: 700;
  transition: transform 0.25s;
}
.faq-item.active .faq-question::after {
  content: '−';
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.faq-item.active .faq-answer {
  max-height: 800px;
}
.faq-answer-inner {
  padding: 0 20px 20px;
  font-size: 0.9rem;
  color: var(--text-soft);
  line-height: 1.75;
}

/* FAQ note */
.faq-note {
  margin-top: 16px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* System requirements */
.sys-reqs-h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--uniform-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;
}
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ========== TABLES ========== */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
th, td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
}
th {
  background: var(--purple-dark);
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
}
tr:nth-child(even) td {
  background: rgba(255,255,240,0.6);
}
.td-highlight {
  color: var(--pink-fierce);
  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-pink { color: var(--pink-fierce); }
.strong-red { color: var(--danger-red); }
.strong-gold { color: var(--accent-gold); }
.strong-muted { color: var(--text-muted); }
.strong-navy { color: var(--uniform-navy); }
.strong-purple { color: var(--royal-purple); }

/* ========== LIGHTBOX ========== */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  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: 8px;
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 2.5rem;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
}

/* ========== FOOTER ========== */
footer {
  background: linear-gradient(135deg, var(--purple-dark), var(--royal-purple));
  border-top: 3px solid var(--gold);
  text-align: center;
  padding: 32px 24px;
}
footer p {
  color: rgba(255,255,255,0.7);
  font-size: 0.85rem;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .header-inner { padding: 0 16px; }
  .hamburger { display: flex; }
  nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--purple-dark);
    flex-direction: column;
    padding: 12px;
    gap: 4px;
    border-bottom: 2px solid var(--gold);
  }
  nav.open { display: flex; }
  nav a { width: 100%; text-align: center; padding: 10px; }
  .nav-btn { margin-left: 0; }
  .hero { min-height: 320px; padding: 60px 16px; }
  .hero-title-main { font-size: 2rem; }
  .hero-subpage-title { font-size: 1.6rem; }
  .game-info-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .reviews-grid { grid-template-columns: 1fr; }
  .char-grid { grid-template-columns: 1fr; }
  .content-section { padding: 40px 16px; }
  .section-heading { font-size: 1.6rem; }
  .content-section h2 { font-size: 1.7rem; }
}

@media (max-width: 480px) {
  .hero-title-main { font-size: 1.6rem; }
  .hero-subpage-title { font-size: 1.35rem; }
  .hero { min-height: 260px; padding: 48px 16px; }
  .game-info-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .gallery-grid { grid-template-columns: 1fr; }
  .btn-cta { font-size: 0.95rem; padding: 12px 28px; }
  .cta-banner h2 { font-size: 1.5rem; }
  .section-heading { font-size: 1.4rem; }
  .content-section h2 { font-size: 1.4rem; }
}
