/* ============================================================
   奴隶少女希尔薇 — Healing Scar Theme
   Bandage-cream whites, healing-bruise lavenders, gentle recovery
   ============================================================ */

/* ---------- Design Tokens ---------- */
:root {
  --cream:          #FDF8F2;
  --bandage-white:  #FFF5EC;
  --warm-cream:     #F9F0E5;
  --lavender:       #B8A0C8;
  --light-lavender: #E8DFF0;
  --pale-lavender:  #F2EDF6;
  --deep-lavender:  #4A3F5C;
  --mid-lavender:   #7D6B8A;
  --border-lavender:#D4C5E0;
  --scar-pink:      #E8C5C5;
  --text-dark:      #3D3148;
  --text-mid:       #5A4E66;
  --text-light:     #8A7E99;
  --white:          #FFFFFF;
  --shadow-sm:      0 2px 8px rgba(74,63,92,0.08);
  --shadow-md:      0 4px 16px rgba(74,63,92,0.10);
  --shadow-lg:      0 8px 32px rgba(74,63,92,0.12);
  --radius-sm:      6px;
  --radius-md:      10px;
  --radius-lg:      16px;
  --radius-xl:      20px;
  --font-heading:   'Noto Serif SC', 'SimSun', 'STSong', 'Songti SC', serif;
  --font-body:      'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;
  --max-width:      1100px;
  --header-height:  64px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--text-dark);
  background-color: var(--cream);
  line-height: 1.75;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Subtle body pattern - gentle gauze texture */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(184,160,200,0.03) 2px,
      rgba(184,160,200,0.03) 4px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 60px,
      rgba(184,160,200,0.02) 60px,
      rgba(184,160,200,0.02) 61px
    );
}

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

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

ul, ol { padding-left: 1.5em; }

/* ---------- 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 ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--deep-lavender);
  border-bottom: 3px solid var(--lavender);
  box-shadow: var(--shadow-sm);
}

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

.logo {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--bandage-white);
  letter-spacing: 0.03em;
}

.logo::before {
  content: '✦ ';
  color: var(--lavender);
  font-size: 0.9rem;
}

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

nav a {
  color: var(--pale-lavender);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  position: relative;
  padding: 4px 0;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--bandage-white);
  transition: width 0.25s ease;
}

nav a:hover { color: var(--bandage-white); }
nav a:hover::after { width: 100%; }

/* Header CTA */
.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  background: var(--lavender);
  color: var(--deep-lavender);
  font-size: 0.88rem;
  font-weight: 700;
  border-radius: var(--radius-xl);
  letter-spacing: 0.03em;
  transition: all 0.25s;
  border: 2px solid transparent;
}

.btn-download:hover {
  background: var(--bandage-white);
  color: var(--deep-lavender);
  border-color: var(--lavender);
  transform: translateY(-1px);
}

.btn-download::before { content: '↓'; font-size: 1rem; }

/* ---------- Main ---------- */
main {
  flex: 1;
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: 40px 24px 60px;
}

/* ---------- Hero Section ---------- */
.hero {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 48px;
  box-shadow: var(--shadow-lg);
}

.hero-img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(74,63,92,0.65) 0%,
    rgba(74,63,92,0.35) 40%,
    rgba(184,160,200,0.20) 70%,
    rgba(255,245,236,0.10) 100%
  );
}

.hero-content {
  position: absolute;
  bottom: 40px;
  left: 40px;
  right: 40px;
}

.hero-content h1 {
  font-family: var(--font-heading);
  font-size: 2.4rem;
  color: var(--bandage-white);
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
  margin-bottom: 8px;
}

.hero-content .subtitle {
  font-size: 1.05rem;
  color: var(--pale-lavender);
  font-weight: 400;
}

/* ---------- About Text ---------- */
.about-text {
  font-size: 1.05rem;
  color: var(--text-mid);
  line-height: 1.85;
  max-width: 800px;
}

/* ---------- Section Headings ---------- */
section { margin-bottom: 52px; }

.section-title {
  font-family: var(--font-heading);
  font-size: 1.7rem;
  color: var(--deep-lavender);
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border-lavender);
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background: var(--lavender);
}

/* ---------- Info Cards ---------- */
.info-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.info-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border-left: 3px solid var(--lavender);
  transition: transform 0.2s, box-shadow 0.2s;
}

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

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

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

.info-card .card-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-dark);
}

/* ---------- Feature Cards ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

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

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

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

.feature-card h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: var(--deep-lavender);
  margin-bottom: 8px;
}

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

/* ---------- Screenshot Gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.gallery-grid a {
  border-radius: var(--radius-md);
  overflow: hidden;
  display: block;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.gallery-grid a:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-md);
}

.gallery-grid img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

/* ---------- Player Reviews ---------- */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.review-card {
  background: var(--pale-lavender);
  border-radius: var(--radius-md);
  padding: 24px;
  position: relative;
  border-left: 4px solid var(--lavender);
}

.review-card::before {
  content: '"';
  position: absolute;
  top: 8px;
  right: 20px;
  font-size: 3rem;
  color: var(--border-lavender);
  font-family: var(--font-heading);
  line-height: 1;
}

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

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

/* ---------- CTA Banner ---------- */
.cta-banner {
  background: linear-gradient(135deg, var(--deep-lavender), #5D4E72);
  border-radius: var(--radius-lg);
  padding: 44px 40px;
  text-align: center;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(184,160,200,0.15), transparent 70%);
  border-radius: 50%;
}

.cta-banner h2 {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  color: var(--bandage-white);
  margin-bottom: 10px;
  position: relative;
}

.cta-banner p {
  color: var(--pale-lavender);
  font-size: 0.95rem;
  margin-bottom: 24px;
  position: relative;
}

.cta-banner .btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 40px;
  background: var(--bandage-white);
  color: var(--deep-lavender);
  font-size: 1.05rem;
  font-weight: 700;
  border-radius: var(--radius-xl);
  letter-spacing: 0.03em;
  transition: all 0.25s;
  position: relative;
}

.cta-banner .btn-cta:hover {
  background: var(--lavender);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.cta-banner .btn-cta::after { content: '→'; font-size: 1.2rem; }

/* ---------- Lightbox ---------- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(30,25,38,0.92);
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

.lightbox.active { display: flex; }

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

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 32px;
  font-size: 2rem;
  color: var(--bandage-white);
  cursor: pointer;
  z-index: 1000;
  transition: color 0.2s;
}

.lightbox-close:hover { color: var(--lavender); }

/* ---------- Guide Page ---------- */
.guide-intro {
  font-size: 1.05rem;
  color: var(--text-mid);
  margin-bottom: 32px;
  line-height: 1.8;
}

.guide-section {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 28px 28px 20px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--lavender);
}

.guide-section h2 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--deep-lavender);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-lavender);
}

.guide-section ol { margin-bottom: 12px; }
.guide-section li {
  margin-bottom: 10px;
  color: var(--text-mid);
  font-size: 0.95rem;
  line-height: 1.7;
}

.guide-section li strong { color: var(--deep-lavender); }

.tip-box {
  background: var(--pale-lavender);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-top: 16px;
  font-size: 0.9rem;
  color: var(--text-mid);
}

.tip-box::before {
  content: '💡 提示：';
  font-weight: 700;
  color: var(--deep-lavender);
}

/* ---------- Story Page ---------- */
.story-overview {
  font-size: 1.05rem;
  color: var(--text-mid);
  line-height: 1.85;
  margin-bottom: 36px;
}

.story-chapter {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--lavender);
}

.chapter-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: var(--deep-lavender);
  margin-bottom: 10px;
}

.story-chapter p {
  font-size: 0.95rem;
  color: var(--text-mid);
  line-height: 1.75;
}

.theme-analysis {
  background: var(--pale-lavender);
  border-radius: var(--radius-md);
  padding: 28px;
  margin-top: 32px;
}

.theme-analysis h2 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--deep-lavender);
  margin-bottom: 16px;
}

.theme-analysis ul {
  list-style: none;
  padding: 0;
}

.theme-analysis li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-lavender);
  font-size: 0.95rem;
  color: var(--text-mid);
}

.theme-analysis li::before {
  content: '✦ ';
  color: var(--lavender);
}

.theme-analysis li:last-child { border-bottom: none; }

/* ---------- Characters Page ---------- */
.char-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

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

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

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

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

.char-card-body h2 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--deep-lavender);
  margin-bottom: 4px;
}

.char-card-body .char-role {
  font-size: 0.82rem;
  color: var(--lavender);
  font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: 0.04em;
}

.char-traits {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.char-trait {
  background: var(--pale-lavender);
  color: var(--deep-lavender);
  font-size: 0.78rem;
  padding: 4px 12px;
  border-radius: var(--radius-xl);
  font-weight: 500;
}

.char-desc {
  font-size: 0.9rem;
  color: var(--text-mid);
  line-height: 1.7;
}

.char-relationship {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border-lavender);
  font-size: 0.85rem;
  color: var(--text-light);
}

.char-relationship strong { color: var(--deep-lavender); }

/* ---------- FAQ Page ---------- */
.faq-list { margin-bottom: 40px; }

.faq-item {
  background: var(--white);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: 18px 24px;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--deep-lavender);
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-body);
}

.faq-question::after {
  content: '+';
  font-size: 1.3rem;
  color: var(--lavender);
  font-weight: 400;
  transition: transform 0.3s;
}

.faq-item.open .faq-question::after {
  content: '−';
  transform: rotate(180deg);
}

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

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

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

/* System Requirements */
.sysreq-section { margin-top: 40px; }

.table-scroll {
  overflow-x: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.sysreq-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  min-width: 500px;
}

.sysreq-table thead th {
  background: var(--deep-lavender);
  color: var(--bandage-white);
  padding: 14px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: left;
}

.sysreq-table thead th:first-child { border-radius: var(--radius-md) 0 0 0; }
.sysreq-table thead th:last-child { border-radius: 0 var(--radius-md) 0 0; }

.sysreq-table tbody td {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-lavender);
  font-size: 0.9rem;
  color: var(--text-mid);
}

.sysreq-table tbody tr:nth-child(even) { background: var(--pale-lavender); }
.sysreq-table tbody tr:last-child td:first-child { border-radius: 0 0 0 var(--radius-md); }
.sysreq-table tbody tr:last-child td:last-child { border-radius: 0 0 var(--radius-md) 0; }

/* ---------- Page Hero Banner ---------- */
.page-hero {
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 40px;
  box-shadow: var(--shadow-md);
  position: relative;
}

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

.page-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(74,63,92,0.5), transparent 60%);
}

.page-hero h1 {
  position: absolute;
  bottom: 28px;
  left: 32px;
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--bandage-white);
  text-shadow: 0 2px 6px rgba(0,0,0,0.35);
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 28px;
}

.breadcrumb a { color: var(--lavender); }
.breadcrumb a:hover { color: var(--deep-lavender); }

/* ---------- Footer ---------- */
footer {
  background: var(--deep-lavender);
  padding: 24px;
  text-align: center;
  margin-top: auto;
}

footer p {
  color: var(--border-lavender);
  font-size: 0.82rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  :root { --header-height: 56px; }

  .header-inner { padding: 0 16px; }

  nav { gap: 16px; }
  nav a { font-size: 0.82rem; }

  .btn-download { padding: 6px 14px; font-size: 0.8rem; }

  .info-cards { 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; }

  .hero-content { left: 24px; right: 24px; bottom: 24px; }
  .hero-content h1 { font-size: 1.6rem; }

  .page-hero h1 { font-size: 1.5rem; bottom: 20px; left: 20px; }

  main { padding: 24px 16px 48px; }

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

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

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

  nav { gap: 10px; }
  nav a { font-size: 0.75rem; }

  .btn-download { padding: 5px 10px; font-size: 0.72rem; }

  .hero-content h1 { font-size: 1.3rem; }
}
