/* ============================================================
   我是椅子 (I Am Chair) — Chair Absurdist Comedy Theme
   Furniture wood browns, upholstery fabric patterns, 
   absurdist-minimal motifs on light home background.
   ============================================================ */

/* ========== FONTS ========== */
@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');

/* ========== CSS VARIABLES ========== */
:root {
  /* Furniture wood palette */
  --wood-darkest: #3D2B1F;
  --wood-dark: #6B3A2A;
  --wood: #8B5E3C;
  --wood-mid: #A67B5B;
  --wood-light: #C49A6C;

  /* Upholstery & fabric */
  --fabric-linen: #C4A882;
  --fabric-leather: #D4A76A;
  --fabric-cream: #E8D5B7;
  --fabric-warm: #F0E0C8;

  /* Backgrounds */
  --bg: #FDFAF5;
  --bg-card: #FFFDF9;
  --bg-section: #F9F3EA;

  /* Accent colors */
  --accent-green: #4A7C59;
  --accent-green-light: #6B9E7A;
  --accent-terracotta: #B85C38;
  --accent-terracotta-light: #D47858;
  --accent-gold: #C4963A;
  --accent-navy: #2C4A52;

  /* Text */
  --text: #3D2B1F;
  --text-soft: #6B5544;
  --text-muted: #9B8574;
  --text-light: #C4B5A5;

  /* Utility */
  --border: #E0D5C5;
  --shadow: 0 2px 12px rgba(61, 43, 31, 0.08);
  --shadow-lg: 0 4px 24px rgba(61, 43, 31, 0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --transition: 0.25s ease;

  /* Fonts */
  --font-serif: 'Noto Serif SC', 'SimSun', 'STSong', serif;
  --font-sans: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

/* ========== 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-color: var(--bg);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  /* Subtle upholstery fabric texture via CSS */
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(139, 94, 60, 0.015) 2px,
      rgba(139, 94, 60, 0.015) 4px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 2px,
      rgba(139, 94, 60, 0.015) 2px,
      rgba(139, 94, 60, 0.015) 4px
    );
}

a {
  color: var(--accent-green);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--accent-terracotta); }

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

/* ========== UTILITY CLASSES ========== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

/* ========== HEADER ========== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--wood-darkest);
  border-bottom: 3px solid var(--accent-terracotta);
  box-shadow: 0 2px 16px rgba(61, 43, 31, 0.2);
}

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

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

.header-logo-img {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.header-logo-text {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--fabric-cream);
  letter-spacing: 0.05em;
}

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

.header-nav a {
  color: var(--fabric-linen);
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
  padding: 4px 0;
}
.header-nav a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-terracotta-light);
  transition: width var(--transition);
}
.header-nav a:hover { color: #fff; }
.header-nav a:hover::after { width: 100%; }

.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-terracotta);
  color: #fff;
  padding: 8px 20px;
  border-radius: 24px;
  font-weight: 700;
  font-size: 0.95rem;
  transition: all var(--transition);
  text-decoration: none;
}
.header-cta:hover {
  background: var(--accent-terracotta-light);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(184, 92, 56, 0.35);
}

/* ========== HERO ========== */
.hero {
  padding: 60px 24px 80px;
  background: linear-gradient(135deg, var(--wood-darkest) 0%, var(--wood-dark) 50%, var(--wood-mid) 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Chair-leg decorative lines in hero */
.hero::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 4px;
  background: repeating-linear-gradient(
    90deg,
    var(--fabric-cream) 0px,
    var(--fabric-cream) 60px,
    transparent 60px,
    transparent 80px
  );
}

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

.hero-img {
  width: 200px;
  height: 200px;
  margin: 0 auto 28px;
  border-radius: 50%;
  border: 4px solid var(--fabric-cream);
  box-shadow: 0 0 40px rgba(232, 213, 183, 0.3);
  object-fit: cover;
}

.hero-tagline {
  font-family: var(--font-serif);
  font-size: 3rem;
  font-weight: 900;
  color: var(--fabric-cream);
  margin-bottom: 12px;
  letter-spacing: 0.08em;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--fabric-linen);
  font-weight: 400;
  max-width: 600px;
  margin: 0 auto 8px;
}

.hero-desc {
  font-size: 1rem;
  color: var(--wood-light);
  margin-bottom: 0;
}

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

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

/* ========== CONTENT SECTIONS ========== */
.content-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 24px;
}

.content-section h2 {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

.content-section h3 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--wood-dark);
  margin-top: 32px;
  margin-bottom: 12px;
}

.section-title-group {
  text-align: center;
  margin-bottom: 40px;
}

.section-title-group h2 {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--wood-darkest);
  margin-bottom: 8px;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-soft);
  max-width: 600px;
  margin: 0 auto;
}

.section-title-group-spaced {
  margin-top: 48px;
}

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

.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: all var(--transition);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent-green);
}

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

.card-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.card-body {
  padding: 20px;
}

.card-body h3 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--wood-darkest);
  margin-top: 0;
  margin-bottom: 8px;
}

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

/* Feature cards on index */
.feature-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.feature-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent-terracotta);
  transition: all var(--transition);
}

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

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

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

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

/* ========== GAME INFO TABLE ========== */
.game-info {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin: 32px 0;
}

.game-info-item {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent-green);
}

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

.game-info-item .value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

/* ========== SCREENSHOT GALLERY ========== */
.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.screenshot-grid img {
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

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

/* ========== REVIEWS / QUOTES ========== */
.review-card {
  background: var(--bg-section);
  border-radius: var(--radius);
  padding: 24px;
  border-left: 4px solid var(--accent-gold);
  margin-bottom: 20px;
}

.review-card .review-text {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-style: italic;
  color: var(--text);
  line-height: 1.8;
  margin-bottom: 12px;
}

.review-card .review-author {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ========== ACCORDION (FAQ) ========== */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: all var(--transition);
}

.faq-item summary {
  padding: 18px 24px;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--wood-darkest);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: '▾';
  font-size: 1.2rem;
  color: var(--accent-green);
  transition: transform var(--transition);
}

.faq-item[open] summary::after {
  transform: rotate(180deg);
}

.faq-item[open] summary {
  background: var(--bg-section);
  border-bottom: 1px solid var(--border);
}

.faq-answer {
  padding: 18px 24px;
  color: var(--text-soft);
  line-height: 1.9;
}

.faq-note {
  margin-top: 16px;
}

/* ========== SYSTEM REQUIREMENTS TABLE ========== */
.sys-reqs-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 0.95rem;
}

.sys-reqs-table th {
  background: var(--wood-darkest);
  color: var(--fabric-cream);
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.9rem;
}

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

.sys-reqs-table tr:nth-child(even) td {
  background: var(--bg-section);
}

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

/* System requirements sub-headings */
.sys-reqs-h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent-navy);
  margin-top: 24px;
  margin-bottom: 12px;
}

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

/* ========== CTA BANNER (index only) ========== */
.cta-banner {
  background: linear-gradient(135deg, var(--wood-dark) 0%, var(--accent-terracotta) 100%);
  padding: 48px 24px;
  text-align: center;
  border-radius: var(--radius-lg);
  margin: 40px 0 0;
}

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

.cta-banner p {
  color: rgba(255,255,255,0.8);
  margin-bottom: 24px;
  font-size: 1.05rem;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: var(--accent-terracotta);
  padding: 14px 36px;
  border-radius: 28px;
  font-size: 1.1rem;
  font-weight: 700;
  transition: all var(--transition);
  text-decoration: none;
}

.cta-button:hover {
  background: var(--fabric-cream);
  color: var(--wood-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

/* ========== GUIDE PAGE ========== */
.guide-steps {
  counter-reset: step;
}

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

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

.guide-step h3 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--wood-darkest);
  margin: 0 0 12px;
}

.guide-step p {
  color: var(--text-soft);
  line-height: 1.8;
  margin-bottom: 8px;
}

.guide-tip {
  background: var(--bg-section);
  border: 1px solid var(--fabric-linen);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin: 16px 0;
}

.guide-tip::before {
  content: '💡 提示：';
  font-weight: 700;
  color: var(--accent-gold);
}

.guide-tip p {
  display: inline;
  color: var(--text-soft);
}

/* Guide intro & route classes */
.guide-intro {
  font-size: 1.05rem;
  color: var(--text-soft);
  line-height: 1.9;
  margin-bottom: 16px;
  max-width: 800px;
}

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

.route-heading {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent-navy);
  margin: 28px 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px dashed var(--fabric-linen);
}

/* ========== CHAPTER TITLES (story page) ========== */
.chapter-title {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--wood-dark);
  margin: 24px 0 10px;
  padding-left: 16px;
  border-left: 3px solid var(--accent-green);
}

/* ========== SECTION SUBHEADING (characters page) ========== */
.section-subheading {
  text-align: center;
  margin: 40px 0 24px;
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent-navy);
}

/* ========== 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-terracotta { color: var(--accent-terracotta); }
.strong-green { color: var(--accent-green); }
.strong-gold { color: var(--accent-gold); }
.strong-muted { color: var(--text-muted); }
.strong-navy { color: var(--accent-navy); }
.strong-wood { color: var(--wood); }

/* ========== TABLE HIGHLIGHT ========== */
.td-highlight {
  color: var(--accent-terracotta);
  font-weight: 700;
}

/* ========== CHARACTER CARDS ========== */
.char-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  border-top: 4px solid var(--wood);
  transition: all var(--transition);
}

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

.char-card-img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
}

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

.char-card-body h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--wood-darkest);
  margin: 0 0 6px;
}

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

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

.char-traits {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.char-tag {
  font-size: 0.78rem;
  padding: 3px 10px;
  border-radius: 12px;
  background: var(--bg-section);
  color: var(--wood-dark);
  border: 1px solid var(--fabric-linen);
}

/* ========== ARCHETYPE CARDS (sandbox/creation games) ========== */
.archetype-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.archetype-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  border-left: 4px solid var(--wood);
  transition: all var(--transition);
}

.archetype-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.archetype-card h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--wood-darkest);
  margin: 0 0 10px;
}

.archetype-card p {
  font-size: 0.92rem;
  color: var(--text-soft);
  line-height: 1.7;
  margin-bottom: 12px;
}

/* ========== CUSTOMIZATION TABLE ========== */
.custom-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}

.custom-table th {
  background: var(--wood-darkest);
  color: var(--fabric-cream);
  padding: 10px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.9rem;
}

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

.custom-table tr:nth-child(even) td {
  background: var(--bg-section);
}

/* ========== FOOTER ========== */
.site-footer {
  background: var(--wood-darkest);
  padding: 24px;
  text-align: center;
  border-top: 3px solid var(--accent-terracotta);
}

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

/* ========== LIGHTBOX ========== */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(61, 43, 31, 0.92);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 32px;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  transition: color var(--transition);
}

.lightbox-close:hover {
  color: var(--accent-terracotta-light);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .hero-tagline { font-size: 2rem; }
  .hero-subtitle { font-size: 1rem; }
  .hero-img { width: 140px; height: 140px; }

  .header-nav {
    gap: 16px;
  }

  .header-nav a {
    font-size: 0.85rem;
  }

  .header-logo-text {
    font-size: 1.1rem;
  }

  .card-grid,
  .feature-cards,
  .archetype-grid {
    grid-template-columns: 1fr;
  }

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

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

  .content-section {
    padding: 32px 16px;
  }

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

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

@media (max-width: 480px) {
  .header-inner {
    flex-direction: column;
    gap: 10px;
    padding: 10px 16px;
  }

  .header-nav {
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero {
    padding: 36px 16px 48px;
  }

  .hero-tagline {
    font-size: 1.5rem;
  }

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

  .cta-button {
    padding: 12px 28px;
    font-size: 1rem;
  }

  .guide-step::before {
    top: -12px;
    left: -12px;
    width: 28px;
    height: 28px;
    font-size: 0.85rem;
  }
}
