/* ============================================
   Lost Life 迷失的生命 — 中文官网
   Pixel Retro Light Theme
   Color: 复古绿 #4CAF50 | 琥珀橙 #FF9800 | 暗蓝 #303F9F | 米灰 #F5F0E8
   ============================================ */

/* --- CSS Variables --- */
:root {
  --green: #4CAF50;
  --green-dark: #388E3C;
  --green-light: #C8E6C9;
  --amber: #FF9800;
  --amber-dark: #F57C00;
  --amber-light: #FFE0B2;
  --navy: #303F9F;
  --navy-dark: #1A237E;
  --navy-light: #C5CAE9;
  --bg: #F5F0E8;
  --bg-card: #FFFFFF;
  --bg-header: #1B1B2F;
  --text: #2E2E2E;
  --text-soft: #666666;
  --text-light: #999999;
  --border: #E0D8CC;
  --shadow: rgba(0,0,0,0.08);
  --shadow-md: rgba(0,0,0,0.12);
  --radius: 8px;
  --radius-sm: 4px;
  --font-sans: 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --font-serif: 'Noto Serif SC', 'STSong', 'SimSun', serif;
  --font-mono: 'Courier New', 'Source Code Pro', 'Consolas', monospace;
  --max-width: 1200px;
  --header-height: 64px;
}

/* --- Reset --- */
*, *::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;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--amber-dark); }
ul, ol { list-style-position: inside; }

/* --- Utility Classes --- */
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

/* --- Content Lists --- */
.content-list { list-style: disc; padding-left: 24px; color: var(--text-soft); }
.content-list-num { list-style: decimal; padding-left: 24px; color: var(--text-soft); }
.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-green { color: var(--green-dark); }
.strong-amber { color: var(--amber-dark); }
.strong-navy { color: var(--navy); }
.strong-muted { color: var(--text-soft); }
.strong-red { color: #D32F2F; }
.strong-gold { color: #F9A825; }

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

/* --- Header / Navigation --- */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: var(--bg-header);
  border-bottom: 3px solid var(--green);
  height: var(--header-height);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 100%;
}
.site-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-serif); font-size: 1.2rem; font-weight: 700;
  color: #FFFFFF; text-decoration: none;
}
.site-logo img { width: 36px; height: 36px; border-radius: var(--radius-sm); }
.site-logo:hover { color: var(--green-light); }
.site-nav { display: flex; align-items: center; gap: 6px; }
.site-nav a {
  color: #CCCCCC; text-decoration: none; font-size: 0.9rem;
  padding: 8px 14px; border-radius: var(--radius-sm);
  transition: background 0.2s, color 0.2s;
}
.site-nav a:hover, .site-nav a.active { background: rgba(255,255,255,0.1); color: #FFFFFF; }
.header-cta {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--amber); color: #FFFFFF; font-weight: 700;
  padding: 8px 20px; border-radius: var(--radius-sm);
  text-decoration: none; font-size: 0.9rem;
  transition: background 0.2s, transform 0.15s;
}
.header-cta:hover { background: var(--amber-dark); color: #FFFFFF; transform: translateY(-1px); }
.header-cta::before { content: '⬇'; font-size: 0.85rem; }

/* --- Mobile Nav Toggle --- */
.nav-toggle {
  display: none; background: none; border: none; cursor: pointer; padding: 8px;
}
.nav-toggle span {
  display: block; width: 24px; height: 2px; background: #FFFFFF; margin: 5px 0;
  transition: transform 0.3s, opacity 0.3s;
}

/* --- Hero Section --- */
.hero {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 50%, #1B1B2F 100%);
  color: #FFFFFF; text-align: center; padding: 80px 24px 72px;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: repeating-linear-gradient(
    0deg, transparent, transparent 2px, rgba(255,255,255,0.03) 2px, rgba(255,255,255,0.03) 4px
  );
  pointer-events: none;
}
.hero::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--green), var(--amber), var(--navy));
}
.hero > * { position: relative; z-index: 1; }
.hero-subpage { padding: 40px 24px 48px; }
.hero-title-main {
  font-family: var(--font-serif); font-size: 3.2rem; font-weight: 900;
  letter-spacing: 0.05em; margin-bottom: 12px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
  color: #FFFFFF;
}
.hero-subtitle {
  font-size: 1.15rem; color: rgba(255,255,255,0.8);
  font-family: var(--font-mono); letter-spacing: 0.08em; margin-bottom: 8px;
}
.hero-tagline {
  font-size: 1rem; color: var(--amber-light); font-family: var(--font-mono);
  letter-spacing: 0.05em; margin-bottom: 24px; max-width: 600px; margin-left: auto; margin-right: auto;
}
.hero-subpage-title {
  font-family: var(--font-serif); font-size: 2rem; font-weight: 700; color: #FFFFFF;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* --- Content Section --- */
.content-section {
  padding: 48px 24px;
}
.content-section h2 {
  font-family: var(--font-serif); font-size: 2.2rem; font-weight: 700;
  color: var(--text); margin-bottom: 12px;
  position: relative; padding-bottom: 12px;
}
.content-section h2::after {
  content: ''; position: absolute; bottom: 0; left: 0;
  width: 60px; height: 3px; background: var(--green);
}
.content-section h2.text-center::after { left: 50%; transform: translateX(-50%); }
.content-section h3 {
  font-family: var(--font-serif); font-size: 1.4rem; font-weight: 600;
  color: var(--navy); margin: 28px 0 12px;
}
.content-section p {
  margin-bottom: 14px; color: var(--text-soft); max-width: 800px;
}

/* --- Chapter Title (smaller h2 in story page) --- */
.chapter-title {
  font-family: var(--font-mono); font-size: 1.1rem; font-weight: 600;
  color: var(--green-dark); margin: 28px 0 10px; letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* --- Route Sub-headings (guide page) --- */
.route-heading {
  font-family: var(--font-serif); font-size: 1.25rem; font-weight: 600;
  color: var(--amber-dark); margin: 24px 0 8px;
  padding-left: 16px; border-left: 3px solid var(--amber);
}
.route-desc {
  color: var(--text-soft); font-size: 0.95rem; line-height: 1.8; margin-bottom: 16px;
}

/* --- Guide Intro --- */
.guide-intro {
  color: var(--text-soft); font-size: 1.05rem; line-height: 1.9; margin-bottom: 20px;
}
.intro-text {
  max-width: 700px; margin: 0 auto 8px; color: var(--text-soft);
}

/* --- Section Sub-heading (characters page) --- */
.section-subheading {
  text-align: center; margin: 40px 0 24px;
  font-family: var(--font-serif); font-size: 1.3rem; font-weight: 600;
  color: var(--navy);
}

/* --- System Requirements h3 --- */
.sys-reqs-h3 {
  font-family: var(--font-serif); font-size: 1.2rem; font-weight: 600;
  color: var(--navy); margin: 24px 0 12px;
  padding-bottom: 6px; border-bottom: 2px solid var(--border);
}
.sys-reqs-h3:first-of-type { margin-top: 0; }

/* --- Table Scroll Wrapper --- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 16px 0 24px; }
.table-scroll table { min-width: 600px; }

/* --- Feature Cards Grid (index) --- */
.features-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
  margin-top: 32px;
}
.feature-card {
  background: var(--bg-card); border-radius: var(--radius);
  padding: 28px 24px; text-align: center;
  box-shadow: 0 2px 8px var(--shadow);
  border-left: 4px solid var(--green);
  transition: transform 0.2s, box-shadow 0.2s;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: 0 6px 20px var(--shadow-md); }
.feature-card:nth-child(2) { border-left-color: var(--amber); }
.feature-card:nth-child(3) { border-left-color: var(--navy); }
.feature-card:nth-child(4) { border-left-color: var(--navy); }
.feature-card:nth-child(5) { border-left-color: var(--amber); }
.feature-card:nth-child(6) { border-left-color: var(--green); }
.feature-card-icon {
  font-size: 2.5rem; margin-bottom: 12px; display: block;
}
.feature-card h3 {
  font-family: var(--font-serif); font-size: 1.15rem; font-weight: 700;
  color: var(--text); margin-bottom: 8px;
}
.feature-card p {
  font-size: 0.9rem; color: var(--text-soft); line-height: 1.6;
}

/* --- Game Info Cards (index) --- */
.info-cards {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  margin-top: 32px;
}
.info-card {
  background: var(--bg-card); border-radius: var(--radius);
  padding: 20px 16px; text-align: center;
  box-shadow: 0 2px 6px var(--shadow);
  border-top: 3px solid var(--green);
}
.info-card:nth-child(2) { border-top-color: var(--amber); }
.info-card:nth-child(3) { border-top-color: var(--navy); }
.info-card:nth-child(4) { border-top-color: var(--green); }
.info-card-label {
  font-size: 0.8rem; color: var(--text-light); text-transform: uppercase;
  letter-spacing: 0.06em; margin-bottom: 4px;
}
.info-card-value {
  font-size: 1rem; font-weight: 700; color: var(--text);
  font-family: var(--font-mono);
}

/* --- Screenshot Gallery (index) --- */
.gallery-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
  margin-top: 24px;
}
.gallery-item {
  border-radius: var(--radius); overflow: hidden;
  cursor: pointer; position: relative;
  box-shadow: 0 2px 8px var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}
.gallery-item:hover { transform: scale(1.03); box-shadow: 0 6px 20px var(--shadow-md); }
.gallery-item img { width: 100%; height: 200px; object-fit: cover; }

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

/* --- CTA Banner (index only) --- */
.cta-banner {
  background: linear-gradient(135deg, var(--navy-dark), var(--navy));
  color: #FFFFFF; text-align: center; padding: 56px 24px;
  margin-top: 48px;
}
.cta-banner h2 {
  font-family: var(--font-serif); font-size: 2rem; font-weight: 700;
  margin-bottom: 10px;
}
.cta-banner h2::after { display: none; }
.cta-banner p {
  color: rgba(255,255,255,0.8); max-width: 600px; margin: 0 auto 24px;
  font-size: 1rem;
}
.cta-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--amber); color: #FFFFFF; font-weight: 700;
  padding: 14px 36px; border-radius: var(--radius);
  text-decoration: none; font-size: 1.1rem;
  transition: background 0.2s, transform 0.15s;
}
.cta-btn:hover { background: var(--amber-dark); color: #FFFFFF; transform: translateY(-2px); }
.cta-btn::after { content: '→'; font-size: 1.2rem; }

/* --- Review / Quote Cards (index) --- */
.reviews-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px;
  margin-top: 32px;
}
.review-card {
  background: var(--bg-card); border-radius: var(--radius);
  padding: 24px; box-shadow: 0 2px 8px var(--shadow);
  border-left: 4px solid var(--amber);
}
.review-card blockquote {
  font-family: var(--font-serif); font-size: 1rem; color: var(--text-soft);
  font-style: italic; line-height: 1.8; margin-bottom: 12px;
}
.review-card cite {
  font-size: 0.85rem; color: var(--text-light); font-style: normal;
  font-weight: 600;
}

/* --- Character Cards (characters) --- */
.characters-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px;
  margin-top: 24px;
}
.character-card {
  background: var(--bg-card); border-radius: var(--radius);
  padding: 24px; box-shadow: 0 2px 8px var(--shadow);
  display: flex; gap: 20px; align-items: flex-start;
}
.character-card img {
  width: 120px; height: 120px; object-fit: cover; border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.character-info h3 {
  font-family: var(--font-serif); font-size: 1.2rem; font-weight: 700;
  color: var(--text); margin: 0 0 6px;
}
.character-role {
  font-size: 0.85rem; color: var(--amber-dark); font-weight: 600;
  margin-bottom: 8px; letter-spacing: 0.04em;
}
.character-info p {
  font-size: 0.9rem; color: var(--text-soft); line-height: 1.7;
}

/* --- Trait Tags --- */
.trait-tags {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px;
}
.trait-tag {
  font-size: 0.75rem; padding: 3px 10px; border-radius: 12px;
  font-weight: 600; letter-spacing: 0.03em;
}
.trait-tag.green { background: var(--green-light); color: var(--green-dark); }
.trait-tag.amber { background: var(--amber-light); color: var(--amber-dark); }
.trait-tag.navy { background: var(--navy-light); color: var(--navy-dark); }

/* --- Accordion (FAQ) --- */
.accordion { margin-top: 24px; }
.accordion-item {
  background: var(--bg-card); border-radius: var(--radius);
  margin-bottom: 12px; box-shadow: 0 2px 6px var(--shadow);
  overflow: hidden;
}
.accordion-header {
  width: 100%; padding: 18px 24px; cursor: pointer;
  background: none; border: none; text-align: left;
  font-family: var(--font-serif); font-size: 1.05rem; font-weight: 600;
  color: var(--text); display: flex; align-items: center; justify-content: space-between;
  transition: background 0.2s;
}
.accordion-header:hover { background: rgba(76,175,80,0.05); }
.accordion-header::after {
  content: '+'; font-size: 1.3rem; color: var(--green); font-weight: 700;
  transition: transform 0.2s;
}
.accordion-item.active .accordion-header::after {
  content: '−'; color: var(--amber);
}
.accordion-body {
  max-height: 0; overflow: hidden; transition: max-height 0.35s ease, padding 0.35s ease;
  padding: 0 24px;
}
.accordion-item.active .accordion-body {
  max-height: 500px; padding: 0 24px 20px;
}
.accordion-body p {
  font-size: 0.95rem; color: var(--text-soft); line-height: 1.8;
}

/* --- System Requirements Table --- */
.sys-table {
  width: 100%; border-collapse: collapse;
  font-size: 0.95rem; margin: 12px 0 20px;
}
.sys-table th, .sys-table td {
  padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border);
}
.sys-table th {
  background: var(--bg); font-weight: 600; color: var(--navy);
  font-family: var(--font-mono); font-size: 0.85rem; letter-spacing: 0.04em;
}
.sys-table td { color: var(--text-soft); }
.sys-table tr:last-child th, .sys-table tr:last-child td { border-bottom: none; }
.sys-note {
  font-size: 0.85rem; color: var(--text-light); margin-top: 8px;
  font-style: italic;
}

/* --- Tips Box --- */
.tips-box {
  background: linear-gradient(135deg, var(--amber-light), rgba(255,152,0,0.08));
  border-left: 4px solid var(--amber);
  border-radius: var(--radius); padding: 20px 24px; margin: 20px 0;
}
.tips-box h4 {
  font-family: var(--font-mono); font-size: 0.95rem; font-weight: 700;
  color: var(--amber-dark); margin-bottom: 8px; text-transform: uppercase;
  letter-spacing: 0.04em;
}
.tips-box p { margin-bottom: 6px; color: var(--text-soft); font-size: 0.95rem; }

/* --- Warning Box --- */
.warning-box {
  background: linear-gradient(135deg, #FFEBEE, rgba(211,47,47,0.05));
  border-left: 4px solid #D32F2F;
  border-radius: var(--radius); padding: 20px 24px; margin: 20px 0;
}
.warning-box h4 {
  font-family: var(--font-mono); font-size: 0.95rem; font-weight: 700;
  color: #D32F2F; margin-bottom: 8px; text-transform: uppercase;
  letter-spacing: 0.04em;
}
.warning-box p { margin-bottom: 6px; color: var(--text-soft); font-size: 0.95rem; }

/* --- Step Number --- */
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--green); color: #FFFFFF; font-weight: 700;
  font-family: var(--font-mono); font-size: 0.9rem; margin-right: 10px;
  flex-shrink: 0;
}

/* --- Ending Card --- */
.ending-card {
  background: var(--bg-card); border-radius: var(--radius);
  padding: 20px 24px; box-shadow: 0 2px 6px var(--shadow);
  margin-bottom: 16px; border-left: 4px solid var(--green);
}
.ending-card.bad { border-left-color: #D32F2F; }
.ending-card.neutral { border-left-color: var(--navy); }
.ending-card.secret { border-left-color: var(--amber); }
.ending-card h4 {
  font-family: var(--font-mono); font-size: 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;
}

/* --- Footer --- */
.site-footer {
  background: var(--bg-header); color: rgba(255,255,255,0.6);
  text-align: center; padding: 24px; font-size: 0.85rem;
  border-top: 3px solid var(--green);
}
.site-footer p { margin: 0; }

/* --- Step Flow (guide) --- */
.step-flow { margin-top: 24px; }
.step-item {
  display: flex; gap: 16px; align-items: flex-start; margin-bottom: 28px;
}
.step-item-content { flex: 1; }
.step-item-content h3 {
  font-family: var(--font-serif); font-size: 1.1rem; font-weight: 700;
  color: var(--text); margin: 0 0 6px;
}
.step-item-content p {
  font-size: 0.95rem; color: var(--text-soft); line-height: 1.8;
}

/* --- Responsive: 768px --- */
@media (max-width: 768px) {
  .hero-title-main { font-size: 2.4rem; }
  .hero-subpage-title { font-size: 1.6rem; }
  .hero { padding: 60px 20px 52px; }
  .hero-subpage { padding: 32px 20px 36px; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .info-cards { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .reviews-grid { grid-template-columns: 1fr; }
  .characters-grid { grid-template-columns: 1fr; }
  .content-section { padding: 36px 20px; }
  .content-section h2 { font-size: 1.8rem; }
  .site-nav { position: fixed; top: var(--header-height); left: 0; right: 0;
    background: var(--bg-header); flex-direction: column; padding: 12px 0;
    display: none; border-bottom: 2px solid var(--green);
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 24px; width: 100%; border-radius: 0; }
  .nav-toggle { display: block; }
  .header-cta { padding: 6px 14px; font-size: 0.85rem; }
  .character-card { flex-direction: column; }
  .character-card img { width: 100%; height: 200px; }
  .cta-banner h2 { font-size: 1.5rem; }
}

/* --- Responsive: 480px --- */
@media (max-width: 480px) {
  .hero-title-main { font-size: 1.8rem; }
  .hero-subpage-title { font-size: 1.3rem; }
  .hero { padding: 48px 16px 40px; }
  .hero-subpage { padding: 28px 16px 32px; }
  .hero-subtitle { font-size: 0.95rem; }
  .features-grid { grid-template-columns: 1fr; }
  .info-cards { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
  .content-section { padding: 28px 16px; }
  .content-section h2 { font-size: 1.5rem; }
  .content-section h3 { font-size: 1.15rem; }
  .container { padding: 0 16px; }
  .character-card { flex-direction: column; }
  .character-card img { height: 180px; }
  .cta-btn { padding: 12px 28px; font-size: 1rem; }
  .accordion-header { font-size: 0.95rem; padding: 14px 18px; }
  .accordion-body { padding: 0 18px; }
  .accordion-item.active .accordion-body { padding: 0 18px 16px; }
  .step-item { flex-direction: column; gap: 8px; }
}
