/* ============================================
   Dragon Xianxia / Eastern Dragon Fantasy Theme
   Jade greens + dragon-scale golds on misty whites
   Classical Chinese brush-stroke + dragon motifs
   ============================================
   Game: 我和龙女妈妈的玄幻之旅
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
  --parchment: #faf5eb;
  --parchment-dark: #f0e8d8;
  --parchment-darker: #e8dcc8;
  --jade: #2d8a6e;
  --jade-dark: #1a5c47;
  --jade-light: #45b08c;
  --jade-glow: rgba(45, 138, 110, 0.12);
  --jade-deep: #0f3d2e;
  --gold: #b8860b;
  --gold-light: #d4a843;
  --gold-dark: #8a5e19;
  --gold-glow: rgba(184, 134, 11, 0.12);
  --mist: #f8f4ee;
  --mist-dark: #ede6d9;
  --mountain: #8a9b9e;
  --mountain-light: #b8c5c7;
  --ink: #2c2416;
  --ink-light: #5a4e3a;
  --ink-muted: #8a7e6a;
  --white: #fefcf8;
  --black: #1a1008;
  --shadow-sm: 0 1px 3px rgba(44, 36, 22, 0.08);
  --shadow-md: 0 4px 12px rgba(44, 36, 22, 0.10);
  --shadow-lg: 0 8px 30px rgba(44, 36, 22, 0.12);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --font-body: "Noto Serif SC", "Source Han Serif SC", "SimSun", "STSong", serif;
  --font-heading: "Noto Serif SC", "Source Han Serif SC", "STZhongsong", "SimSun", serif;
  --max-width: 1100px;
  --header-height: 64px;
}

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

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

body {
  font-family: var(--font-body);
  background-color: var(--parchment);
  color: var(--ink);
  line-height: 1.75;
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse at 20% 10%, var(--jade-glow) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 90%, var(--gold-glow) 0%, transparent 50%),
    radial-gradient(ellipse at 60% 40%, rgba(138,155,158,0.06) 0%, transparent 40%);
  background-attachment: fixed;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}

h1 { font-size: 2.4rem; letter-spacing: 0.04em; }
h2 { font-size: 1.8rem; letter-spacing: 0.02em; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.1rem; }

p { margin-bottom: 1rem; }
a { color: var(--jade); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--jade-dark); }

/* --- Decorative dragon-scale divider --- */
.dragon-divider {
  display: block;
  width: 200px;
  height: 4px;
  margin: 1.5rem auto;
  background: linear-gradient(90deg, transparent, var(--jade), var(--gold), var(--jade), transparent);
  border: none;
  border-radius: 2px;
  position: relative;
}

.dragon-divider::before {
  content: "◆";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.5rem;
  color: var(--gold);
  background: var(--parchment);
  padding: 0 0.5rem;
}

.dragon-divider-left {
  margin-left: 0;
  margin-right: auto;
}

.dragon-divider-left::before {
  left: 1.2rem;
  transform: translate(0, -50%);
}

/* --- Header / Navigation --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(180deg, rgba(250,245,235,0.97) 0%, rgba(250,245,235,0.92) 100%);
  backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--parchment-darker);
  box-shadow: 0 1px 8px rgba(44, 36, 22, 0.06);
}

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

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--jade-dark);
  text-decoration: none;
  letter-spacing: 0.05em;
}

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

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

/* Main nav */
.main-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.main-nav a {
  display: inline-block;
  padding: 0.4rem 1rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-light);
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--jade-dark);
  background: var(--jade-glow);
}

/* Nav CTA button */
.nav-cta {
  display: inline-flex !important;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1.3rem !important;
  background: linear-gradient(135deg, var(--jade), var(--jade-dark)) !important;
  color: var(--white) !important;
  font-weight: 600 !important;
  border-radius: var(--radius-sm);
  margin-left: 0.5rem;
  transition: all 0.25s !important;
  box-shadow: 0 2px 8px var(--jade-glow);
}

.nav-cta:hover {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark)) !important;
  color: var(--white) !important;
  box-shadow: 0 4px 14px var(--gold-glow);
  transform: translateY(-1px);
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--ink);
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink);
  margin: 5px 0;
  border-radius: 2px;
  transition: all 0.3s;
}

/* --- Hero Section --- */
.hero {
  position: relative;
  text-align: center;
  padding: 4rem 1.5rem 3rem;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(45,138,110,0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 50% 100%, rgba(184,134,11,0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 30% 70%, rgba(138,155,158,0.05) 0%, transparent 50%);
  pointer-events: none;
}

.hero-badge {
  display: inline-block;
  padding: 0.3rem 1.2rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold);
  background: var(--gold-glow);
  border: 1px solid rgba(184,134,11,0.25);
  border-radius: 20px;
  margin-bottom: 1.5rem;
  letter-spacing: 0.08em;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, var(--jade-dark), var(--jade), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.06em;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--ink-muted);
  max-width: 600px;
  margin: 0 auto 2rem;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 2.4rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  background: linear-gradient(135deg, var(--jade), var(--jade-dark));
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all 0.25s;
  box-shadow: 0 4px 16px var(--jade-glow);
  letter-spacing: 0.04em;
}

.hero-cta:hover {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px var(--gold-glow);
}

.hero-img {
  margin: 2rem auto 1rem;
  max-width: 700px;
}

.hero-img img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  border: 3px solid var(--parchment-darker);
  box-shadow: var(--shadow-lg);
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.hero-tags span {
  padding: 0.25rem 0.9rem;
  font-size: 0.82rem;
  color: var(--ink-muted);
  background: var(--parchment-dark);
  border: 1px solid var(--parchment-darker);
  border-radius: 20px;
}

/* --- Page Hero (inner pages, smaller) --- */
.page-hero {
  text-align: center;
  padding: 3rem 1.5rem 2rem;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(45,138,110,0.06) 0%, transparent 60%);
}

.page-hero h1 {
  font-size: 2.2rem;
  background: linear-gradient(135deg, var(--jade-dark), var(--jade));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.05em;
}

.page-hero p {
  color: var(--ink-muted);
  font-size: 1.05rem;
  margin-top: 0.5rem;
}

/* --- Container --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- Section --- */
.section {
  padding: 3rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-title h2 {
  font-size: 1.8rem;
  color: var(--jade-dark);
  letter-spacing: 0.04em;
}

.section-title p {
  color: var(--ink-muted);
  font-size: 0.95rem;
  margin-top: 0.3rem;
}

/* --- Info Grid (cards) --- */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.info-card {
  background: var(--white);
  border: 1px solid var(--parchment-darker);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
  transition: all 0.25s;
  box-shadow: var(--shadow-sm);
}

.info-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--gold-light);
}

.info-card-icon {
  font-size: 1.8rem;
  margin-bottom: 0.6rem;
  color: var(--jade);
}

.info-card h3 {
  font-size: 0.9rem;
  color: var(--ink-muted);
  font-weight: 600;
  margin-bottom: 0.3rem;
  letter-spacing: 0.05em;
}

.info-card p {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}

/* --- Feature Cards --- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: var(--white);
  border: 1px solid var(--parchment-darker);
  border-radius: var(--radius-md);
  padding: 1.8rem;
  transition: all 0.25s;
  box-shadow: var(--shadow-sm);
  border-top: 3px solid transparent;
}

.feature-card:hover {
  box-shadow: var(--shadow-md);
  border-top-color: var(--jade);
}

.feature-card h3 {
  font-size: 1.15rem;
  color: var(--jade-dark);
  margin-bottom: 0.6rem;
  letter-spacing: 0.03em;
}

.feature-card p {
  font-size: 0.93rem;
  color: var(--ink-light);
  line-height: 1.7;
  margin: 0;
}

.feature-icon {
  display: inline-block;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--jade-glow);
  color: var(--jade);
  font-size: 1.2rem;
  line-height: 44px;
  text-align: center;
  margin-bottom: 1rem;
}

/* --- Screenshot Gallery --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
}

.gallery-item {
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid var(--parchment-darker);
  transition: all 0.25s;
  box-shadow: var(--shadow-sm);
}

.gallery-item:hover {
  border-color: var(--jade);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
}

/* --- Story / Lore Section --- */
.story-block {
  background: var(--white);
  border: 1px solid var(--parchment-darker);
  border-radius: var(--radius-md);
  padding: 2rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--jade);
}

.story-block h3 {
  color: var(--jade-dark);
  margin-bottom: 0.8rem;
  font-size: 1.2rem;
}

.story-block p,
.story-block li {
  color: var(--ink-light);
  font-size: 0.95rem;
  line-height: 1.8;
}

.story-block ul {
  padding-left: 1.5rem;
  margin-bottom: 0.5rem;
}

.story-block li {
  margin-bottom: 0.3rem;
}

/* --- Character Cards --- */
.character-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.character-card {
  background: var(--white);
  border: 1px solid var(--parchment-darker);
  border-radius: var(--radius-md);
  padding: 1.8rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s;
}

.character-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--jade);
}

.character-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  margin: 0 auto 1rem;
  background: linear-gradient(135deg, var(--jade-glow), var(--gold-glow));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: var(--jade);
  border: 2px solid var(--parchment-darker);
}

.character-card h3 {
  font-size: 1.15rem;
  color: var(--jade-dark);
  margin-bottom: 0.2rem;
}

.character-role {
  font-size: 0.82rem;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 0.8rem;
  letter-spacing: 0.05em;
}

.character-card p {
  font-size: 0.9rem;
  color: var(--ink-light);
  line-height: 1.7;
  margin: 0;
}

/* --- Guide Steps --- */
.guide-steps {
  counter-reset: step;
  max-width: 800px;
  margin: 0 auto;
}

.guide-step {
  position: relative;
  background: var(--white);
  border: 1px solid var(--parchment-darker);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.5rem 1.5rem 5rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.guide-step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 1.5rem;
  top: 1.5rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--jade), var(--jade-dark));
  color: var(--white);
  font-weight: 700;
  font-size: 1rem;
  line-height: 36px;
  text-align: center;
}

.guide-step h3 {
  font-size: 1.1rem;
  color: var(--jade-dark);
  margin-bottom: 0.4rem;
}

.guide-step p {
  font-size: 0.93rem;
  color: var(--ink-light);
  line-height: 1.7;
  margin: 0;
}

/* Guide tips */
.guide-tip {
  background: var(--gold-glow);
  border: 1px solid rgba(184,134,11,0.2);
  border-radius: var(--radius-md);
  padding: 1.2rem 1.5rem;
  margin-top: 1.5rem;
  font-size: 0.93rem;
  color: var(--ink-light);
}

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

/* --- FAQ Accordion --- */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: var(--white);
  border: 1px solid var(--parchment-darker);
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  text-align: left;
  transition: background 0.2s;
}

.faq-question:hover {
  background: var(--parchment-dark);
}

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

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

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

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

.faq-answer-inner {
  padding: 0 1.5rem 1.2rem;
  font-size: 0.93rem;
  color: var(--ink-light);
  line-height: 1.8;
}

/* --- CTA Banner --- */
.cta-banner {
  text-align: center;
  padding: 3rem 1.5rem;
  background:
    radial-gradient(ellipse at 50% 50%, var(--jade-glow) 0%, transparent 70%);
  border-top: 2px solid var(--parchment-darker);
  border-bottom: 2px solid var(--parchment-darker);
  margin: 3rem 0;
}

.cta-banner h2 {
  font-size: 1.6rem;
  color: var(--jade-dark);
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
}

.cta-banner p {
  color: var(--ink-muted);
  margin-bottom: 1.5rem;
}

/* --- Footer --- */
.site-footer {
  text-align: center;
  padding: 2rem 1.5rem;
  color: var(--ink-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--parchment-darker);
}

.site-footer p {
  margin: 0;
}

/* --- Breadcrumbs --- */
.breadcrumbs {
  font-size: 0.85rem;
  color: var(--ink-muted);
  padding: 1rem 0 0;
}

.breadcrumbs a {
  color: var(--ink-muted);
}

.breadcrumbs a:hover {
  color: var(--jade);
}

.breadcrumbs span {
  margin: 0 0.4rem;
  color: var(--parchment-darker);
}

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

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: var(--radius-md);
  border: 2px solid var(--parchment-darker);
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  font-size: 2.5rem;
  color: var(--mist-dark);
  cursor: pointer;
  background: none;
  border: none;
  line-height: 1;
}

/* --- Version History Table --- */
.version-table {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  border-collapse: collapse;
}

.version-table th,
.version-table td {
  padding: 0.9rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--parchment-darker);
}

.version-table th {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-muted);
  letter-spacing: 0.05em;
  background: var(--parchment-dark);
}

.version-table td {
  font-size: 0.93rem;
  color: var(--ink-light);
}

.version-table .version-num {
  font-weight: 700;
  color: var(--jade);
}

/* --- Stats Row --- */
.stats-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3rem;
  margin: 2rem 0;
  text-align: center;
}

.stat-item {
  padding: 0.5rem;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--jade);
  line-height: 1;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--ink-muted);
  margin-top: 0.3rem;
}

/* --- Tag List --- */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.5rem 0;
}

.tag {
  font-size: 0.78rem;
  padding: 0.2rem 0.7rem;
  border-radius: 20px;
  background: var(--parchment-dark);
  color: var(--ink-muted);
  border: 1px solid var(--parchment-darker);
}

.tag-jade {
  background: var(--jade-glow);
  color: var(--jade-dark);
  border-color: rgba(45,138,110,0.2);
}

.tag-gold {
  background: var(--gold-glow);
  color: var(--gold-dark);
  border-color: rgba(184,134,11,0.2);
}

/* --- Side-by-side columns --- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 768px) {
  .two-col {
    grid-template-columns: 1fr;
  }
}

/* --- Utility --- */
.img-full { max-width: 100%; border-radius: var(--radius-md); }
.text-center { text-align: center; }
.text-muted { color: var(--ink-muted); }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mx-auto { max-width: 800px; margin-left: auto; margin-right: auto; }

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

  .main-nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(250,245,235,0.98);
    backdrop-filter: blur(12px);
    border-bottom: 2px solid var(--parchment-darker);
    padding: 0.75rem 1rem;
    box-shadow: var(--shadow-md);
  }

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

  .main-nav a {
    padding: 0.6rem 1rem;
    width: 100%;
  }

  .nav-cta {
    margin-left: 0;
    justify-content: center;
  }

  .hero h1 {
    font-size: 2rem;
  }

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

  .page-hero h1 {
    font-size: 1.7rem;
  }

  .guide-step {
    padding: 1.2rem 1.2rem 1.2rem 4rem;
  }

  .stats-row {
    gap: 1.5rem;
  }

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