/* ============================================================
   ReturnAtis 中文官网 — 远古遗迹主题样式
   Color: Amber Gold #FFB300 | Stone Gray #757575
          Deep Red #C62828 | Ivory White #FFFFF0
   ============================================================ */

/* ---------- CSS Variables ---------- */
:root {
  --font-sans: 'Noto Sans SC', 'Microsoft YaHei', 'PingFang SC', sans-serif;
  --font-serif: 'Noto Serif SC', 'SimSun', 'STSong', serif;
  --bg: #FFFFF0;
  --bg-warm: #FFF8E7;
  --bg-card: #FFFFFF;
  --text: #2C1810;
  --text-soft: #5D4037;
  --text-muted: #8D6E63;
  --gold: #FFB300;
  --gold-dark: #E6A100;
  --gold-light: #FFD54F;
  --stone: #757575;
  --stone-light: #BDBDBD;
  --stone-dark: #424242;
  --red: #C62828;
  --red-light: #EF5350;
  --red-dark: #B71C1C;
  --header-bg: #2C1810;
  --header-border: #FFB300;
  --shadow: 0 2px 12px rgba(44, 24, 16, 0.08);
  --shadow-hover: 0 6px 24px rgba(44, 24, 16, 0.14);
  --radius: 8px;
  --radius-lg: 12px;
  --max-width: 1200px;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Accessibility ---------- */
.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;
}

/* ---------- Sticky Header ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--header-bg);
  border-bottom: 3px solid var(--header-border);
  box-shadow: 0 2px 8px 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: 12px 24px;
}
.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--gold);
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.header-logo img { width: 32px; height: 32px; }
nav { display: flex; gap: 6px; align-items: center; }
nav a {
  color: #E0D5C1;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.95rem;
  transition: all 0.2s;
}
nav a:hover,
nav a.active {
  color: var(--gold);
  background: rgba(255,179,0,0.1);
}
nav a.active { font-weight: 600; }
.header-cta {
  background: var(--red);
  color: #fff !important;
  font-weight: 700;
  padding: 8px 20px !important;
  border-radius: 6px;
  transition: all 0.2s;
}
.header-cta:hover {
  background: var(--red-dark) !important;
  color: #fff !important;
  transform: translateY(-1px);
}

/* ---------- Hero Section ---------- */
.hero {
  background: linear-gradient(135deg, #2C1810 0%, #3E2723 40%, #5D4037 100%);
  padding: 60px 24px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse at center, rgba(255,179,0,0.08) 0%, transparent 70%);
}
.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.hero-title-main {
  font-family: var(--font-serif);
  font-size: 3rem;
  font-weight: 900;
  color: var(--gold);
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
  margin-bottom: 8px;
  line-height: 1.3;
}
.hero-tagline {
  color: #E0D5C1;
  font-size: 1.15rem;
  font-weight: 300;
  margin-bottom: 0;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Section Styles ---------- */
.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 24px;
}
.section-alt {
  background: var(--bg-warm);
  border-top: 1px solid #EDE0C8;
  border-bottom: 1px solid #EDE0C8;
}
.section-no-padding { padding: 0; }
.section-title-group {
  text-align: center;
  margin-bottom: 32px;
}
.section-title-group-spaced { margin-top: 48px; }
.section-title {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.section-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
}

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

/* ---------- Hero Sub-Page Variant ---------- */
.hero-subpage { padding: 40px 24px 48px; }
.hero-subpage-title { font-size: 2rem; font-weight: 700; }

/* ---------- Cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  border-left: 4px solid var(--gold);
  transition: all 0.3s;
}
.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}
.card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}
.card-body { padding: 20px; }
.card-body h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.card-body p {
  color: var(--text-soft);
  font-size: 0.92rem;
  line-height: 1.6;
}

/* ---------- Game Info Cards (index) ---------- */
.info-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin: 24px 0 8px;
}
.info-card {
  background: var(--bg-card);
  border: 1px solid #EDE0C8;
  border-radius: var(--radius);
  padding: 16px 24px;
  text-align: center;
  min-width: 120px;
  box-shadow: var(--shadow);
}
.info-card .info-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--red);
  display: block;
}
.info-card .info-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
}
.game-info-desc {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0;
}

/* ---------- Screenshot Gallery ---------- */
.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.screenshot-grid a {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.3s;
}
.screenshot-grid a:hover {
  box-shadow: var(--shadow-hover);
  transform: scale(1.02);
}
.screenshot-grid img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

/* ---------- Feature Cards ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.feature-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-align: center;
  box-shadow: var(--shadow);
  border-top: 3px solid var(--gold);
  transition: all 0.3s;
}
.feature-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}
.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
  display: block;
}
.feature-card h3 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.feature-card p {
  color: var(--text-soft);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ---------- Reviews / Quotes ---------- */
.review-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.review-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--red);
  position: relative;
}
.review-card::before {
  content: '\201C';
  font-family: var(--font-serif);
  font-size: 3rem;
  color: var(--gold);
  position: absolute;
  top: 8px;
  left: 16px;
  line-height: 1;
  opacity: 0.5;
}
.review-card blockquote {
  margin: 0;
  padding: 0;
}
.review-card p {
  color: var(--text-soft);
  font-size: 0.92rem;
  line-height: 1.6;
  font-style: italic;
}
.review-card cite {
  display: block;
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: normal;
  font-weight: 600;
}

/* ---------- CTA Banner ---------- */
.cta-banner {
  background: linear-gradient(135deg, var(--red-dark), var(--red));
  text-align: center;
  padding: 48px 24px;
  color: #fff;
}
.cta-banner h2 {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.cta-banner p {
  font-size: 1rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: 24px;
}
.cta-btn {
  display: inline-block;
  background: var(--gold);
  color: var(--header-bg);
  font-weight: 700;
  font-size: 1.1rem;
  padding: 14px 40px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
.cta-btn:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.4);
}

/* ---------- Character Card (characters page) ---------- */
.char-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}
.char-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.3s;
}
.char-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}
.char-card img {
  width: 100%;
  height: 320px;
  object-fit: cover;
}
.char-card-body { padding: 20px; }
.char-card-body h3 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.char-role {
  color: var(--gold-dark);
  font-size: 0.85rem;
  font-weight: 600;
  display: block;
  margin-bottom: 8px;
}
.char-card-body p {
  color: var(--text-soft);
  font-size: 0.9rem;
  line-height: 1.6;
}
.char-traits {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.char-trait {
  background: var(--bg-warm);
  border: 1px solid #EDE0C8;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.78rem;
  color: var(--text-soft);
}

/* ---------- Relation Chart ---------- */
.relation-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 0.92rem;
}
.relation-table th,
.relation-table td {
  padding: 12px 16px;
  border: 1px solid #EDE0C8;
  text-align: left;
}
.relation-table th {
  background: var(--header-bg);
  color: var(--gold);
  font-weight: 700;
}
.relation-table tr:nth-child(even) { background: var(--bg-warm); }

/* ---------- FAQ Accordion ---------- */
.faq-intro {
  color: var(--text-soft);
  margin-bottom: 32px;
}
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid #EDE0C8;
}
.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: 18px 24px;
  text-align: left;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.2s;
}
.faq-question:hover { background: var(--bg-warm); }
.faq-question::after {
  content: '+';
  font-size: 1.3rem;
  color: var(--gold-dark);
  font-weight: 700;
  transition: transform 0.3s;
}
.faq-item.open .faq-question::after {
  content: '\2212';
  transform: rotate(180deg);
}
.faq-answer {
  padding: 0 24px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
}
.faq-item.open .faq-answer {
  max-height: 600px;
  padding: 0 24px 20px;
}
.faq-answer p {
  color: var(--text-soft);
  font-size: 0.92rem;
  line-height: 1.7;
}
.faq-note { margin-top: 16px; }

/* ---------- System Requirements Table ---------- */
.table-scroll { overflow-x: auto; }
.sys-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 16px;
  font-size: 0.9rem;
}
.sys-table th,
.sys-table td {
  padding: 10px 16px;
  border: 1px solid #EDE0C8;
  text-align: left;
}
.sys-table th {
  background: var(--stone-dark);
  color: #fff;
  font-weight: 600;
  white-space: nowrap;
}
.sys-table tr:nth-child(even) { background: var(--bg-warm); }
.sys-reqs-h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin-top: 24px;
  margin-bottom: 12px;
}
.sys-reqs-h3:first-of-type { margin-top: 8px; }
.sys-note {
  margin-top: 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ---------- Guide Steps ---------- */
.guide-steps-wrapper { counter-reset: guide-step; }
.guide-step {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--gold);
}
.guide-step h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.guide-step h3::before {
  counter-increment: guide-step;
  content: '#' counter(guide-step) ' ';
  color: var(--gold-dark);
}
.guide-step p {
  color: var(--text-soft);
  font-size: 0.92rem;
  line-height: 1.7;
}
.guide-step ul,
.guide-step ol {
  margin-left: 20px;
  margin-top: 8px;
}
.guide-step li {
  color: var(--text-soft);
  font-size: 0.9rem;
  margin-bottom: 4px;
}
.guide-intro {
  color: var(--text-soft);
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 20px;
}
.route-heading {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--red);
  margin-top: 32px;
  margin-bottom: 12px;
}
.route-desc {
  color: var(--text-soft);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 16px;
}

/* ---------- Story Page ---------- */
.chapter-block {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--red);
}
.chapter-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--red);
  margin-bottom: 8px;
}
.chapter-block p {
  color: var(--text-soft);
  font-size: 0.92rem;
  line-height: 1.8;
}
.story-ending {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
  border-top: 3px solid var(--gold);
}
.story-ending h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.story-ending p {
  color: var(--text-soft);
  font-size: 0.92rem;
  line-height: 1.7;
}

/* ---------- 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-gold { color: var(--gold-dark); }
.strong-red { color: var(--red); }
.strong-muted { color: var(--text-muted); }

/* ---------- Table Highlight ---------- */
.td-highlight { color: var(--red); font-weight: 700; }

/* ---------- Section Subheading (characters) ---------- */
.section-subheading { text-align: center; margin: 40px 0 24px; }

/* ---------- Prose (index) ---------- */
.prose-centered {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 32px;
  color: var(--text-soft);
  line-height: 1.85;
  font-size: 0.95rem;
}
.prose-centered:last-of-type { margin-bottom: 40px; }

/* ---------- Tip Box (guide) ---------- */
.tip-box {
  background: linear-gradient(135deg, #FFF8E1, #FFF3CD);
  border: 1px solid var(--gold-light);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 16px 0;
}
.tip-box strong { color: var(--gold-dark); }

/* ---------- Footer ---------- */
footer {
  background: var(--header-bg);
  color: var(--stone-light);
  text-align: center;
  padding: 20px 24px;
  font-size: 0.85rem;
  border-top: 3px solid var(--gold);
}

/* ---------- Lightbox ---------- */
.lightbox-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.9);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}
.lightbox-overlay.active {
  display: flex;
}
.lightbox-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: var(--radius);
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 2rem;
  background: none;
  border: none;
  cursor: pointer;
}

/* ---------- Responsive: 768px ---------- */
@media (max-width: 768px) {
  html { font-size: 15px; }
  .header-inner { flex-wrap: wrap; gap: 8px; justify-content: center; }
  nav { flex-wrap: wrap; justify-content: center; }
  .hero { padding: 48px 20px 60px; }
  .hero-title-main { font-size: 2rem; }
  .hero-tagline { font-size: 1rem; }
  .hero-subpage-title { font-size: 1.6rem; }
  .section { padding: 36px 20px; }
  .content-section { padding: 36px 20px; }
  .card-grid { grid-template-columns: 1fr 1fr; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .screenshot-grid { grid-template-columns: 1fr 1fr; }
  .review-grid { grid-template-columns: 1fr; }
  .char-grid { grid-template-columns: 1fr 1fr; }
  .cta-banner h2 { font-size: 1.6rem; }
  .section-title { font-size: 1.8rem; }
  .content-section h2 { font-size: 1.8rem; }
}

/* ---------- Responsive: 480px ---------- */
@media (max-width: 480px) {
  html { font-size: 14px; }
  .header-logo { font-size: 1.2rem; }
  nav a { padding: 6px 10px; font-size: 0.85rem; }
  .hero { padding: 36px 16px 48px; }
  .hero-title-main { font-size: 1.6rem; }
  .hero-subpage-title { font-size: 1.4rem; }
  .card-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .screenshot-grid { grid-template-columns: 1fr; }
  .char-grid { grid-template-columns: 1fr; }
  .info-cards { gap: 10px; }
  .info-card { min-width: 90px; padding: 12px 16px; }
  .cta-btn { padding: 12px 28px; font-size: 1rem; }
  .section { padding: 28px 16px; }
  .content-section { padding: 28px 16px; }
}
