/* ============================================================
   幸福宅女的养成方法 — Cozy Indoor Hikikomori Theme
   Palette: kotatsu-orange #e07b3c + room-slipper pink #e8a0b4
   ============================================================ */

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

/* --- CSS Variables --- */
:root {
  --font-serif: 'Noto Serif SC', 'Source Han Serif SC', 'SimSun', serif;
  --font-sans: 'Noto Sans SC', 'Source Han Sans SC', 'PingFang SC', sans-serif;

  --bg: #fefaf5;
  --bg-warm: #fdf5ed;
  --bg-card: #fffbf7;
  --bg-card-alt: #fef7f0;

  --header-bg: #2d1f1b;
  --header-border: #e07b3c;

  --text: #3d2c26;
  --text-soft: #6b5950;
  --text-light: #8c7870;
  --text-on-dark: #f0e4d8;

  --accent: #e07b3c;
  --accent-soft: #f4a460;
  --accent-dark: #c4662a;
  --accent-bg: #fdf0e6;

  --pink: #e8a0b4;
  --pink-soft: #f5d0db;
  --pink-dark: #d4859b;
  --pink-bg: #fdf5f7;

  --warm-beige: #f5ebe0;
  --warm-taupe: #d4c4b7;

  --shadow-sm: 0 1px 3px rgba(61,44,38,0.08);
  --shadow-md: 0 4px 12px rgba(61,44,38,0.10);
  --shadow-lg: 0 8px 30px rgba(61,44,38,0.12);

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --max-width: 1100px;
  --header-height: 64px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(232,160,180,0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(224,123,60,0.05) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(245,235,224,0.4) 0%, transparent 40%);
  background-attachment: fixed;
}

/* --- 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: 100;
  background: var(--header-bg);
  border-bottom: 3px solid var(--header-border);
  box-shadow: var(--shadow-md);
}

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

.header-logo {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-on-dark);
  text-decoration: none;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-logo img {
  height: 36px;
  width: auto;
}

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

.header-nav a {
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 500;
  color: #c4b5a8;
  text-decoration: none;
  position: relative;
  padding: 4px 0;
  transition: color 0.25s;
}

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

.header-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s;
}

.header-nav a:hover::after,
.header-nav a.active::after {
  width: 100%;
}

.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 24px;
  transition: all 0.3s;
  box-shadow: 0 2px 8px rgba(224,123,60,0.35);
}

.header-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(224,123,60,0.5);
}

.header-mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-on-dark);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 4px;
}

/* --- Hero Section --- */
.hero {
  position: relative;
  background: linear-gradient(170deg, #3a2820 0%, #5a3d2e 40%, #7a5240 100%);
  overflow: hidden;
  min-height: 420px;
  display: flex;
  align-items: center;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 60%, rgba(224,123,60,0.15) 0%, transparent 50%),
    radial-gradient(circle at 70% 30%, rgba(232,160,180,0.12) 0%, transparent 40%);
  z-index: 1;
}

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

.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 60px 24px 100px;
  display: flex;
  align-items: center;
  gap: 48px;
  position: relative;
  z-index: 3;
  width: 100%;
}

.hero-image {
  flex: 0 0 380px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 3px solid rgba(255,255,255,0.12);
}

.hero-image img {
  width: 100%;
  height: auto;
  display: block;
}

.hero-content {
  flex: 1;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.hero-tag {
  display: inline-block;
  padding: 4px 14px;
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.85);
  font-size: 0.78rem;
  font-weight: 500;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.15);
}

.hero-title {
  font-family: var(--font-serif);
  font-size: 2.6rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 10px;
}

.hero-subtitle {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  color: rgba(255,255,255,0.7);
  margin-bottom: 4px;
  font-weight: 400;
}

.hero-tagline {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: #fff;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero-desc {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.7;
  max-width: 540px;
}

/* --- Content Section --- */
.content-section {
  max-width: var(--max-width);
  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;
}

.section-lead {
  font-size: 1.05rem;
  color: var(--text-soft);
  margin-bottom: 32px;
  max-width: 720px;
  line-height: 1.8;
}

/* --- Game Info Cards --- */
.game-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 48px;
}

.game-info-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--accent);
  transition: transform 0.25s, box-shadow 0.25s;
}

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

.game-info-card:nth-child(even) {
  border-left-color: var(--pink);
}

.game-info-label {
  font-size: 0.78rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
  font-weight: 500;
}

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

/* --- Feature Cards --- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 48px;
}

.feature-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s, box-shadow 0.25s;
  border-top: 3px solid var(--accent);
}

.feature-card:nth-child(2n) {
  border-top-color: var(--pink);
}

.feature-card:nth-child(3n) {
  border-top-color: var(--accent-soft);
}

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

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

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

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

/* --- Screenshot Gallery --- */
.screenshot-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 48px;
}

.screenshot-item {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
  aspect-ratio: 16/9;
}

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

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

/* --- CTA Banner --- */
.cta-banner {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
  margin-bottom: 48px;
}

.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(255,255,255,0.08) 0%, transparent 40%),
    radial-gradient(circle at 80% 50%, rgba(232,160,180,0.15) 0%, transparent 40%);
}

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

.cta-banner p {
  position: relative;
  font-size: 1rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: 24px;
}

.cta-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 40px;
  background: #fff;
  color: var(--accent);
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 30px;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.3);
}

/* --- Reviews / Quotes --- */
.reviews-section {
  margin-bottom: 48px;
}

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.review-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.review-card::before {
  content: '"';
  font-family: var(--font-serif);
  font-size: 4rem;
  color: var(--pink-soft);
  position: absolute;
  top: -8px;
  left: 16px;
  line-height: 1;
  pointer-events: none;
}

.review-text {
  font-size: 0.92rem;
  color: var(--text-soft);
  line-height: 1.8;
  font-style: italic;
  margin-bottom: 12px;
  padding-left: 4px;
}

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

/* --- Guide Page --- */
.guide-steps {
  counter-reset: step;
  margin-bottom: 40px;
}

.guide-step {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 28px 32px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  position: relative;
  padding-left: 80px;
}

.guide-step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 20px;
  top: 28px;
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.guide-step:nth-child(even)::before {
  background: linear-gradient(135deg, var(--pink), var(--pink-dark));
}

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

.guide-step p {
  font-size: 0.92rem;
  color: var(--text-soft);
  line-height: 1.8;
}

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

.guide-tip {
  background: var(--accent-bg);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin: 16px 0;
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.7;
}

.guide-tip strong {
  color: var(--accent-dark);
}

.route-heading {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent-dark);
  margin: 28px 0 12px;
  padding-left: 12px;
  border-left: 3px solid var(--accent);
}

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

.chapter-title {
  font-family: var(--font-serif);
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--text);
  margin: 20px 0 8px;
  padding-left: 8px;
  border-left: 3px solid var(--pink);
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* --- Story Page --- */
.story-block {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--accent);
}

.story-block:nth-child(even) {
  border-left-color: var(--pink);
}

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

.story-block p {
  font-size: 0.95rem;
  color: var(--text-soft);
  line-height: 1.9;
}

.ending-card {
  background: var(--bg-card-alt);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
  border-left: 4px solid var(--pink);
}

.ending-card h4 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

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

/* --- Characters Page --- */
.character-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 48px;
}

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

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

.character-image {
  height: 240px;
  background: linear-gradient(135deg, var(--warm-beige), var(--pink-soft));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: var(--accent);
}

.character-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.character-info {
  padding: 24px;
}

.character-info h3 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.character-role {
  font-size: 0.82rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 8px;
}

.character-traits {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.character-trait {
  display: inline-block;
  padding: 2px 10px;
  background: var(--accent-bg);
  color: var(--accent-dark);
  font-size: 0.75rem;
  border-radius: 12px;
  font-weight: 500;
}

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

.character-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
  padding: 12px;
  background: var(--bg-card-alt);
  border-radius: var(--radius-sm);
}

.char-stat-label {
  font-size: 0.75rem;
  color: var(--text-light);
}

.char-stat-value {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  text-align: right;
}

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

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

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

.faq-question:hover {
  background: var(--bg-card-alt);
}

.faq-question::after {
  content: '+';
  font-size: 1.3rem;
  font-weight: 300;
  color: var(--accent);
  transition: transform 0.3s;
  flex-shrink: 0;
}

.faq-item.open .faq-question::after {
  content: '−';
}

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

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

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

/* --- System Requirements Table --- */
.sysreq-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 40px;
}

.sysreq-table thead th {
  background: var(--header-bg);
  color: var(--text-on-dark);
  font-family: var(--font-serif);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 14px 20px;
  text-align: left;
}

.sysreq-table tbody td {
  padding: 12px 20px;
  font-size: 0.9rem;
  color: var(--text-soft);
  border-bottom: 1px solid var(--warm-beige);
}

.sysreq-table tbody tr:last-child td {
  border-bottom: none;
}

.sysreq-table tbody td:first-child {
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

/* --- Lightbox --- */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.88);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.lightbox-overlay.active {
  display: flex;
}

.lightbox-overlay img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  border: 2px solid rgba(255,255,255,0.1);
}

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

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

/* --- Footer --- */
.site-footer {
  text-align: center;
  padding: 32px 24px;
  border-top: 1px solid var(--warm-beige);
}

.site-footer p {
  font-size: 0.82rem;
  color: var(--text-light);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .hero-inner {
    flex-direction: column;
    padding: 40px 20px 80px;
    gap: 28px;
  }

  .hero-image {
    flex: 0 0 auto;
    max-width: 320px;
    width: 100%;
  }

  .hero-title {
    font-size: 1.8rem;
  }

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

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

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

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

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

  .content-section {
    padding: 36px 16px 48px;
  }

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

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

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

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

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

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

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

  .guide-step {
    padding-left: 24px;
    padding-top: 60px;
  }

  .guide-step::before {
    left: 24px;
    top: 16px;
  }

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

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.5rem;
  }

  .hero-image {
    max-width: 260px;
  }

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

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

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