/* ===== 人间残渣 - Elegant Sakura Light Theme ===== */
/* Color Palette: 薄樱 #E8A0B4, 深绯 #7B2D3B, 和纸 #F9F6F0, 墨色 #3D2C2E */

@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 {
  /* Primary palette */
  --sakura: #E8A0B4;
  --sakura-light: #F5D0DA;
  --sakura-dark: #C8708A;
  --crimson: #7B2D3B;
  --crimson-light: #A04555;
  --crimson-dark: #5A1F2A;

  /* Background & text */
  --bg: #F9F6F0;
  --bg-card: #FFFFFF;
  --bg-header: #3D2C2E;
  --text: #3D2C2E;
  --text-soft: #6B5E60;
  --text-light: #9B8E90;
  --text-inverse: #F9F6F0;

  /* Accent */
  --accent-border: #E8A0B4;
  --accent-shadow: rgba(123, 45, 59, 0.1);
  --card-border: #E8D5D8;

  /* Typography */
  --font-serif: 'Noto Serif SC', 'STSong', 'SimSun', 'Songti SC', serif;
  --font-sans: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;

  /* Layout */
  --max-width: 1200px;
  --header-height: 64px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
}

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

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

body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.8;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image:
    radial-gradient(ellipse at 80% 20%, rgba(232, 160, 180, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 20% 80%, rgba(123, 45, 59, 0.04) 0%, transparent 50%);
}

/* ===== Header ===== */
header {
  background: var(--bg-header);
  border-bottom: 3px solid var(--accent-border);
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}

header .header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

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

header .logo img {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
}

header .logo span {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--sakura);
  letter-spacing: 1px;
}

nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

nav a {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  color: #C8C0C1;
  text-decoration: none;
  position: relative;
  transition: color 0.2s;
  padding: 4px 0;
}

nav a:hover,
nav a.active {
  color: var(--sakura);
}

nav a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--sakura);
  transform: scaleX(0);
  transition: transform 0.2s;
}

nav a:hover::after,
nav a.active::after {
  transform: scaleX(1);
}

/* Header CTA Button */
.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--crimson), var(--crimson-light));
  color: #fff !important;
  padding: 8px 20px !important;
  border-radius: var(--radius-md);
  font-weight: 700 !important;
  font-size: 0.9rem !important;
  text-decoration: none;
  transition: all 0.25s;
  box-shadow: 0 2px 8px rgba(123, 45, 59, 0.3);
}

.cta-btn:hover {
  background: linear-gradient(135deg, var(--sakura-dark), var(--sakura));
  color: #fff !important;
  box-shadow: 0 4px 16px rgba(232, 160, 180, 0.4);
  transform: translateY(-1px);
}

.cta-btn::after {
  display: none;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #C8C0C1;
  font-size: 1.6rem;
  cursor: pointer;
  padding: 4px;
}

/* ===== Hero Section ===== */
.hero {
  position: relative;
  background: linear-gradient(135deg, #3D2C2E 0%, #5A3A3E 40%, #7B2D3B 100%);
  padding: 80px 24px 100px;
  text-align: center;
  overflow: hidden;
  border-bottom: 3px solid var(--accent-border);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 40%, rgba(232, 160, 180, 0.1) 0%, transparent 60%),
    radial-gradient(circle at 70% 60%, rgba(123, 45, 59, 0.15) 0%, transparent 50%);
  pointer-events: none;
}

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

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}

.hero-title-main {
  font-family: var(--font-serif);
  font-size: 3.5rem;
  font-weight: 900;
  color: var(--sakura);
  text-shadow: 0 2px 12px rgba(232, 160, 180, 0.3), 0 0 40px rgba(232, 160, 180, 0.1);
  letter-spacing: 4px;
  margin-bottom: 16px;
  line-height: 1.3;
}

.hero-subtitle {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 400;
  color: #D8C8CA;
  margin-bottom: 12px;
}

.hero-tagline {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  color: #B8A8AA;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* Sub-page hero (smaller) */
.hero-subpage {
  padding: 40px 24px 48px;
}

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

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

/* ===== Main Content ===== */
main {
  flex: 1;
}

.content-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 24px 64px;
}

.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);
  margin-bottom: 36px;
  line-height: 1.8;
}

/* ===== Card Grids ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin: 32px 0;
}

.card-grid-3 {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: all 0.25s;
  border-left: 4px solid var(--crimson);
}

.card:hover {
  box-shadow: 0 6px 20px var(--accent-shadow);
  transform: translateY(-2px);
}

.card.feature {
  border-left-color: var(--sakura);
}

.card h3 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}

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

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

/* ===== Info Cards on Index ===== */
.game-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin: 32px 0;
}

.game-info-card {
  background: var(--bg-card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  border-top: 3px solid var(--sakura);
}

.game-info-card .info-label {
  font-size: 0.8rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

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

/* ===== CTA Banner (index only) ===== */
.cta-banner {
  background: linear-gradient(135deg, #3D2C2E, #5A3A3E);
  border: 2px solid var(--sakura);
  border-radius: var(--radius-lg);
  padding: 48px 32px;
  text-align: center;
  margin: 48px 0 24px;
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(232, 160, 180, 0.06) 0%, transparent 60%);
  pointer-events: none;
}

.cta-banner h2 {
  color: var(--sakura) !important;
  margin-bottom: 12px;
}

.cta-banner p {
  color: #D8C8CA;
  margin-bottom: 24px;
  font-size: 1.05rem;
}

.cta-banner-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--crimson), var(--crimson-light));
  color: #fff;
  padding: 14px 40px;
  border-radius: var(--radius-md);
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s;
  box-shadow: 0 4px 16px rgba(123, 45, 59, 0.3);
  position: relative;
  z-index: 1;
}

.cta-banner-btn:hover {
  background: linear-gradient(135deg, var(--sakura-dark), var(--sakura));
  color: #fff;
  box-shadow: 0 6px 24px rgba(232, 160, 180, 0.4);
  transform: translateY(-2px);
}

/* ===== Reviews Section ===== */
.reviews-section {
  margin: 48px 0;
}

.review-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
  margin: 24px 0;
}

.review-card {
  background: var(--bg-card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
  border-left: 4px solid var(--sakura);
}

.review-card::before {
  content: '"';
  position: absolute;
  top: 8px;
  left: 16px;
  font-family: var(--font-serif);
  font-size: 3rem;
  color: var(--sakura);
  opacity: 0.3;
  line-height: 1;
}

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

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

/* ===== Guide Page ===== */
.guide-intro {
  font-size: 1.05rem;
  color: var(--text-soft);
  line-height: 1.9;
  margin-bottom: 28px;
}

.guide-section {
  margin-bottom: 36px;
}

.guide-section h3 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--crimson);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--card-border);
}

.guide-step {
  background: var(--bg-card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-bottom: 16px;
  border-left: 4px solid var(--sakura);
  counter-increment: step;
  position: relative;
}

.guide-step::before {
  content: counter(step);
  position: absolute;
  top: 16px;
  left: -18px;
  width: 32px;
  height: 32px;
  background: var(--sakura);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}

.guide-steps {
  counter-reset: step;
}

.tip-box {
  background: linear-gradient(135deg, rgba(232, 160, 180, 0.08), rgba(232, 160, 180, 0.03));
  border: 1px solid rgba(232, 160, 180, 0.25);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin: 20px 0;
  border-left: 4px solid var(--sakura);
}

.tip-box strong {
  color: var(--crimson);
}

/* ===== Story Page ===== */
.chapter-section {
  margin-bottom: 32px;
}

.chapter-title {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--crimson);
  margin-bottom: 8px;
}

.chapter-desc {
  font-size: 0.95rem;
  color: var(--text-soft);
  line-height: 1.8;
  margin-bottom: 16px;
}

/* ===== Characters Page ===== */
.character-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin: 32px 0;
}

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

.character-card {
  background: var(--bg-card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: all 0.25s;
  border-bottom: 4px solid var(--crimson);
}

.character-card:hover {
  box-shadow: 0 6px 20px var(--accent-shadow);
  transform: translateY(-3px);
}

.character-card .char-img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  background: #F0E8EA;
}

.character-card .char-info {
  padding: 20px;
}

.character-card .char-name {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.character-card .char-role {
  font-size: 0.85rem;
  color: var(--crimson);
  font-weight: 600;
  margin-bottom: 10px;
}

.character-card .char-desc {
  font-size: 0.9rem;
  color: var(--text-soft);
  line-height: 1.7;
  margin-bottom: 12px;
}

.character-card .char-traits {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.char-tag {
  display: inline-block;
  padding: 3px 10px;
  background: rgba(232, 160, 180, 0.12);
  border: 1px solid rgba(232, 160, 180, 0.25);
  border-radius: 20px;
  font-size: 0.78rem;
  color: var(--crimson);
  font-weight: 500;
}

.section-subheading {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  margin: 40px 0 24px;
}

/* ===== FAQ Page ===== */
.faq-list {
  margin: 32px 0;
}

.faq-item {
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  overflow: hidden;
  background: var(--bg-card);
}

.faq-question {
  padding: 18px 24px;
  cursor: pointer;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.faq-question:hover {
  background: rgba(232, 160, 180, 0.05);
}

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

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

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
}

.faq-item.open .faq-answer {
  max-height: 600px;
}

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

/* ===== System Requirements Table ===== */
.sys-reqs {
  margin: 32px 0;
}

.sys-reqs-h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--crimson);
  margin-bottom: 12px;
  margin-top: 24px;
}

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

.sys-note {
  font-size: 0.9rem;
  color: var(--text-light);
}

.table-scroll {
  overflow-x: auto;
  margin-bottom: 24px;
}

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

.sys-table th {
  background: var(--bg-header);
  color: var(--sakura);
  padding: 12px 16px;
  text-align: left;
  font-weight: 700;
  font-family: var(--font-sans);
}

.sys-table td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--card-border);
  color: var(--text-soft);
}

.sys-table tr:nth-child(even) td {
  background: rgba(232, 160, 180, 0.06);
}

/* ===== Content Lists ===== */
.content-list {
  list-style: disc;
  padding-left: 24px;
  margin: 16px 0;
}

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

.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);
}

/* Strong color utilities */
.strong-red {
  color: var(--crimson);
}

.strong-muted {
  color: var(--text-light);
}

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

/* Guide route headings */
.route-heading {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--crimson-dark);
  margin: 20px 0 10px;
}

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

/* ===== Footer ===== */
footer {
  background: var(--bg-header);
  color: var(--text-light);
  text-align: center;
  padding: 24px;
  font-size: 0.85rem;
  border-top: 2px solid var(--accent-border);
  margin-top: auto;
}

footer p {
  color: var(--text-light);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--bg-header);
    flex-direction: column;
    padding: 16px 24px;
    gap: 12px;
    border-bottom: 2px solid var(--accent-border);
  }

  nav.open {
    display: flex;
  }

  .hero-title-main {
    font-size: 2.2rem;
    letter-spacing: 2px;
  }

  .hero {
    padding: 48px 20px 64px;
  }

  .hero-subpage {
    padding: 28px 20px 36px;
  }

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

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

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

  .card-grid,
  .character-grid,
  .review-cards {
    grid-template-columns: 1fr;
  }

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

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

  .cta-banner {
    padding: 32px 24px;
  }

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

  .faq-question {
    padding: 14px 18px;
    font-size: 0.95rem;
  }

  .faq-answer-inner {
    padding: 0 18px 16px;
  }
}

@media (max-width: 480px) {
  .game-info-grid {
    grid-template-columns: 1fr;
  }

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

  .hero-subtitle {
    font-size: 1.05rem;
  }
}
