/* ============================================================
   魔女的侵袭库洛的房间 (Under The Witch: Kuro's Room)
   Witch Chamber Mystical Theme
   Spellbook leather browns & potion-glow greens
   ============================================================ */

/* ========== 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 {
  /* Backgrounds */
  --bg: #fdf8f0;
  --bg-warm: #f5efe0;
  --bg-card: #faf5eb;
  --bg-mystical: #f7f1e6;

  /* Text */
  --text: #2c1810;
  --text-soft: #5c4a3a;
  --text-muted: #8b7355;

  /* Potion Greens (primary accent) */
  --accent: #2d6a4f;
  --accent-light: #52b788;
  --accent-glow: #40916c;
  --accent-pale: #d8f3dc;
  --accent-dark: #1b4332;

  /* Leather Browns */
  --leather: #5c3a21;
  --leather-light: #8b6914;
  --leather-dark: #3e2723;
  --leather-pale: #d4b896;

  /* Accent Colors */
  --gold: #b8860b;
  --gold-light: #daa520;
  --potion-purple: #6b3a5b;
  --danger-red: #c0392b;
  --star-gold: #daa520;

  /* Header / Footer */
  --header-bg: #1a0d08;
  --header-border: #2d6a4f;
  --footer-bg: #1a0d08;
  --footer-text: #8b7355;

  /* Cards & UI */
  --card-shadow: 0 2px 12px rgba(44, 24, 16, 0.08);
  --card-hover-shadow: 0 6px 24px rgba(45, 106, 79, 0.12);
  --border-light: #e8ddd0;
  --border-accent: #2d6a4f;

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

  /* Spacing */
  --max-width: 1100px;
}

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

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

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

/* Mystical background pattern */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  opacity: 0.04;
  background:
    radial-gradient(circle at 20% 30%, var(--accent) 1px, transparent 1px),
    radial-gradient(circle at 60% 70%, var(--leather) 1px, transparent 1px),
    radial-gradient(circle at 80% 20%, var(--potion-purple) 1px, transparent 1px),
    radial-gradient(circle at 40% 85%, var(--gold) 1px, transparent 1px);
  background-size: 80px 80px;
}

/* ========== 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: 1000;
  background: var(--header-bg);
  border-bottom: 3px solid var(--header-border);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.3);
}

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

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fdf8f0;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.site-logo:hover {
  color: var(--accent-light);
}

.site-logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 4px;
}

/* Navigation */
.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.main-nav a {
  color: #c4b998;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  position: relative;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--accent-light);
  background: rgba(45, 106, 79, 0.12);
}

/* Header CTA Button */
.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: #fff !important;
  padding: 8px 20px !important;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.25s ease;
  border: 1px solid var(--accent-light);
  box-shadow: 0 0 12px rgba(45, 106, 79, 0.3);
}

.header-cta:hover {
  background: var(--accent-light);
  box-shadow: 0 0 20px rgba(82, 183, 136, 0.5);
  color: #fff !important;
  transform: translateY(-1px);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #c4b998;
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* ========== HERO ========== */
.hero {
  position: relative;
  overflow: hidden;
  padding: 80px 24px 100px;
  text-align: center;
  color: #fdf8f0;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(26, 13, 8, 0.75) 0%,
    rgba(26, 13, 8, 0.6) 50%,
    rgba(26, 13, 8, 0.85) 100%
  );
  z-index: 1;
}

.hero > * {
  position: relative;
  z-index: 2;
}

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

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

.hero-title-main {
  font-family: var(--font-serif);
  font-size: 3rem;
  font-weight: 700;
  color: #fdf8f0;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5), 0 0 40px rgba(45, 106, 79, 0.3);
  margin-bottom: 12px;
  letter-spacing: 2px;
}

.hero-subpage-title {
  font-size: 2rem;
  font-weight: 700;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
  font-size: 1.15rem;
  color: #d4b896;
  margin-bottom: 8px;
  font-family: var(--font-serif);
  letter-spacing: 1px;
}

.hero-tagline {
  font-size: 1rem;
  color: #b8a088;
  max-width: 600px;
  margin: 0 auto 16px;
  line-height: 1.6;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
}

.hero-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: #c4b998;
  background: rgba(0, 0, 0, 0.3);
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid rgba(196, 185, 152, 0.2);
}

/* ========== CONTENT SECTIONS ========== */
.section {
  padding: 60px 24px;
}

.section-alt {
  background: var(--bg-warm);
}

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  margin-bottom: 12px;
  position: relative;
  padding-bottom: 16px;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

.section-desc {
  text-align: center;
  color: var(--text-soft);
  max-width: 700px;
  margin: 0 auto 40px;
  font-size: 1.05rem;
  line-height: 1.8;
}

/* Content section (sub-pages) */
.content-section {
  padding: 50px 24px 60px;
  max-width: 900px;
  margin: 0 auto;
}

.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(--accent-dark);
  margin: 32px 0 12px;
  padding-left: 14px;
  border-left: 3px solid var(--accent);
}

.content-section h4 {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--leather);
  margin: 20px 0 8px;
}

.content-section p {
  margin-bottom: 16px;
  color: var(--text-soft);
  line-height: 1.85;
  font-size: 1rem;
}

/* ========== SYS REQS H3 ========== */
.sys-reqs-h3 {
  font-family: var(--font-sans) !important;
  font-size: 1.2rem !important;
  font-weight: 700 !important;
  color: var(--leather-dark) !important;
  margin: 28px 0 10px !important;
  padding-left: 0 !important;
  border-left: none !important;
}

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

/* ========== FEATURE CARDS ========== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 20px;
}

.feature-card {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 28px 22px;
  border-left: 4px solid var(--accent);
  box-shadow: var(--card-shadow);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 80px;
  height: 80px;
  background: radial-gradient(circle, rgba(45, 106, 79, 0.06) 0%, transparent 70%);
  border-radius: 0 0 0 80px;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-hover-shadow);
  border-left-color: var(--accent-light);
}

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

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

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

/* ========== GAME INFO CARDS ========== */
.info-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  box-shadow: var(--card-shadow);
}

.info-card-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

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

/* ========== SCREENSHOT GALLERY ========== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.gallery-item {
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  box-shadow: var(--card-shadow);
  transition: all 0.3s ease;
  aspect-ratio: 16/9;
  border: 2px solid var(--border-light);
}

.gallery-item:hover {
  transform: scale(1.03);
  box-shadow: var(--card-hover-shadow);
  border-color: var(--accent);
}

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

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(26, 13, 8, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  font-size: 2rem;
  color: #fff;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

/* ========== LIGHTBOX ========== */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.92);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.lightbox.active {
  display: flex;
}

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

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 2.5rem;
  color: #fff;
  cursor: pointer;
  z-index: 2001;
  background: none;
  border: none;
  line-height: 1;
}

/* ========== REVIEWS ========== */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 24px;
}

.review-card {
  background: var(--bg-card);
  border-radius: 10px;
  padding: 24px;
  box-shadow: var(--card-shadow);
  border-top: 3px solid var(--accent);
}

.review-stars {
  color: var(--star-gold);
  font-size: 1rem;
  margin-bottom: 10px;
}

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

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

/* ========== CTA BANNER (index only) ========== */
.cta-banner {
  background: linear-gradient(135deg, var(--leather-dark) 0%, var(--leather) 50%, var(--accent-dark) 100%);
  color: #fdf8f0;
  text-align: center;
  padding: 50px 24px;
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.08;
  background:
    repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255,255,255,0.5) 2px, rgba(255,255,255,0.5) 4px);
}

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

.cta-banner p {
  font-size: 1rem;
  color: #d4b896;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-light);
  color: #fff;
  text-decoration: none;
  padding: 14px 36px;
  border-radius: 10px;
  font-size: 1.1rem;
  font-weight: 700;
  transition: all 0.25s ease;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 20px rgba(82, 183, 136, 0.4);
  border: 1px solid var(--accent-light);
}

.cta-button:hover {
  background: #5ddb98;
  box-shadow: 0 0 30px rgba(82, 183, 136, 0.6);
  transform: translateY(-2px);
}

/* ========== TABLE SCROLL ========== */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 16px 0 24px;
  border-radius: 8px;
  border: 1px solid var(--border-light);
}

.table-scroll table {
  width: 100%;
  border-collapse: collapse;
  min-width: 500px;
  font-size: 0.93rem;
}

.table-scroll th {
  background: var(--leather-dark);
  color: #fdf8f0;
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.9rem;
}

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

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

.td-highlight {
  color: var(--accent-light) !important;
  font-weight: 700 !important;
}

/* ========== CHAPTER TITLE ========== */
.chapter-title {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--leather-dark);
  margin: 24px 0 8px;
}

/* ========== GUIDE INTRO & ROUTE DESC ========== */
.guide-intro {
  font-size: 1.05rem;
  color: var(--text-soft);
  line-height: 1.8;
  margin-bottom: 20px;
}

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

.route-heading {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--leather);
  margin: 24px 0 8px;
  padding-left: 12px;
  border-left: 3px solid var(--leather-light);
}

/* ========== CONTENT LISTS (NO INLINE STYLES) ========== */
.content-list {
  list-style: disc;
  padding-left: 24px;
  margin: 12px 0 20px;
}

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

.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 CLASSES ========== */
.strong-pink {
  color: var(--potion-purple);
}

.strong-red {
  color: var(--danger-red);
}

.strong-gold {
  color: var(--gold);
}

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

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

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

/* ========== CHARACTER CARDS ========== */
.characters-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 24px;
}

.character-card {
  background: var(--bg-card);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border-light);
  transition: all 0.3s ease;
}

.character-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-hover-shadow);
  border-color: var(--accent);
}

.char-header {
  padding: 20px 20px 12px;
  border-bottom: 2px solid var(--border-light);
}

.char-header h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--leather-dark);
  margin-bottom: 4px;
}

.char-role {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 500;
}

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

.char-body p {
  font-size: 0.9rem;
  color: var(--text-soft);
  line-height: 1.65;
  margin-bottom: 12px;
}

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

.char-trait {
  font-size: 0.78rem;
  padding: 3px 10px;
  border-radius: 12px;
  background: var(--accent-pale);
  color: var(--accent-dark);
  font-weight: 500;
}

/* ========== FAQ ACCORDION ========== */
.faq-list {
  margin-top: 24px;
}

.faq-item {
  margin-bottom: 10px;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-card);
  box-shadow: var(--card-shadow);
}

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

.faq-question:hover {
  background: rgba(45, 106, 79, 0.04);
}

.faq-question span {
  flex: 1;
}

.faq-icon {
  font-size: 1.3rem;
  color: var(--accent);
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

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

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

.faq-item.open .faq-answer {
  max-height: 500px;
  padding: 0 20px 16px;
}

.faq-answer p {
  font-size: 0.93rem;
  color: var(--text-soft);
  line-height: 1.75;
}

/* ========== TIPS BOX ========== */
.tips-box {
  background: linear-gradient(135deg, var(--accent-pale) 0%, rgba(45, 106, 79, 0.06) 100%);
  border-left: 4px solid var(--accent);
  border-radius: 0 10px 10px 0;
  padding: 16px 20px;
  margin: 20px 0;
}

.tips-box h4 {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--accent-dark);
  margin-bottom: 6px;
}

.tips-box p {
  font-size: 0.93rem;
  color: var(--text-soft);
  line-height: 1.7;
}

/* ========== PROSE (wrapping article text) ========== */
.prose {
  max-width: 800px;
  margin: 0 auto;
}

/* ========== FOOTER ========== */
.site-footer {
  background: var(--footer-bg);
  text-align: center;
  padding: 24px;
  margin-top: auto;
  border-top: 2px solid var(--header-border);
}

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

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .hero-title-main {
    font-size: 2rem;
  }

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

  .section-title {
    font-size: 1.7rem;
  }

  .features-grid,
  .reviews-grid,
  .characters-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

  /* Mobile nav */
  .main-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--header-bg);
    flex-direction: column;
    padding: 12px 0;
    border-bottom: 2px solid var(--header-border);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
  }

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

  .main-nav a {
    padding: 12px 24px;
    border-radius: 0;
    width: 100%;
  }

  .hamburger {
    display: flex;
  }
}

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

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

  .hero {
    padding: 50px 16px 60px;
  }

  .section-title {
    font-size: 1.4rem;
  }

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

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

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

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

  .section {
    padding: 40px 16px;
  }

  .content-section {
    padding: 30px 16px 40px;
  }
}
