/* ============================================================
   ProjectR 中文官网 — 未来实验室主题
   色彩方案：冷灰(#ECEFF1)、科技蓝(#0277BD)、警示黄(#FDD835)、暗红(#C62828)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;600;700;900&family=Noto+Serif+SC:wght@600;700;900&display=swap');

/* ========== CSS CUSTOM PROPERTIES ========== */
:root {
  --bg: #ECEFF1;
  --bg-card: #FFFFFF;
  --bg-alt: #F5F7FA;
  --bg-dark: #0D1B2A;
  --bg-dark-alt: #102A3A;
  --text: #263238;
  --text-soft: #546E7A;
  --text-muted: #90A4AE;
  --text-light: #B0BEC5;
  --accent: #0277BD;
  --accent-light: #039BE5;
  --accent-dark: #01579B;
  --warning: #FDD835;
  --warning-dark: #F9A825;
  --danger: #C62828;
  --danger-light: #E53935;
  --border: #CFD8DC;
  --border-light: #E0E0E0;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --font-sans: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Noto Serif SC', 'STSong', 'SimSun', serif;
  --radius: 8px;
  --radius-lg: 12px;
  --transition: 0.25s ease;
  --max-width: 1200px;
  --header-height: 64px;
}

/* ========== RESET ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-light); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }

/* ========== UTILITY: 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;
}

/* ========== LAYOUT ========== */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.section { padding: 64px 24px; }
.section-alt { background: var(--bg-alt); }
.section-dark { background: var(--bg-dark); color: #ECEFF1; }
.section-no-padding { padding: 0; }
.section-title-group { text-align: center; margin-bottom: 48px; }
.section-title-group-spaced { margin-top: 48px; }
.section-title {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}
.section-subtitle {
  font-size: 1rem;
  color: var(--text-soft);
  max-width: 600px;
  margin: 0 auto;
}

/* ========== HEADER / NAVIGATION ========== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg-dark);
  border-bottom: 3px solid var(--accent);
  height: var(--header-height);
  display: flex;
  align-items: center;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 700;
  color: #ECEFF1;
  text-decoration: none;
}
.site-logo img { width: 32px; height: 32px; border-radius: 4px; }
.site-logo:hover { color: var(--warning); }
.nav-links { display: flex; gap: 8px; align-items: center; }
.nav-links a {
  color: var(--text-light);
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition);
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--warning);
  background: rgba(255,255,255,0.08);
}
.nav-cta {
  background: var(--danger) !important;
  color: #fff !important;
  font-weight: 600 !important;
  padding: 8px 20px !important;
  border-radius: var(--radius) !important;
  transition: all var(--transition);
}
.nav-cta:hover {
  background: var(--danger-light) !important;
  color: #fff !important;
}

/* Mobile nav toggle */
.nav-toggle { display: none; background: none; border: none; color: #ECEFF1; font-size: 1.5rem; cursor: pointer; padding: 4px; }

/* ========== HERO SECTION ========== */
.hero {
  background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-dark-alt) 50%, #0D1B2A 100%);
  padding: 60px 24px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 40%, rgba(2,119,189,0.15) 0%, transparent 60%),
              radial-gradient(circle at 70% 60%, rgba(253,216,53,0.08) 0%, transparent 50%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--warning), var(--accent), transparent);
}
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}
.hero-bg-img {
  max-width: 600px;
  margin: 0 auto 32px;
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 24px rgba(2,119,189,0.3);
  border: 2px solid rgba(2,119,189,0.2);
}
.hero-title-main {
  font-family: var(--font-serif);
  font-size: 2.8rem;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
  margin-bottom: 12px;
  line-height: 1.3;
}
.hero-title-main .en-subtitle {
  display: block;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-light);
  margin-top: 4px;
  letter-spacing: 0.08em;
}
.hero-tagline {
  font-size: 1.05rem;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.8;
}

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

/* ========== CTA BANNER (index only) ========== */
.cta-banner {
  background: linear-gradient(135deg, var(--bg-dark) 0%, #0D2030 100%);
  padding: 48px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(253,216,53,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.cta-title {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}
.cta-subtitle {
  font-size: 1rem;
  color: var(--text-light);
  margin-bottom: 28px;
}
.cta-btn {
  display: inline-block;
  background: var(--danger);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  padding: 14px 48px;
  border-radius: var(--radius);
  transition: all var(--transition);
  text-decoration: none;
  position: relative;
  z-index: 1;
  box-shadow: 0 4px 16px rgba(198,40,40,0.4);
}
.cta-btn:hover {
  background: var(--danger-light);
  color: #fff;
  box-shadow: 0 6px 24px rgba(198,40,40,0.55);
  transform: translateY(-2px);
}

/* ========== GAME INFO CARDS ========== */
.info-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.info-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px 16px;
  text-align: center;
  box-shadow: var(--shadow);
  border-left: 3px solid var(--accent);
  transition: transform var(--transition), box-shadow var(--transition);
}
.info-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.info-card .info-icon { font-size: 2rem; margin-bottom: 8px; }
.info-card .info-value {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
}
.info-card .info-label {
  font-size: 0.85rem;
  color: var(--text-soft);
  margin-top: 4px;
}
.game-info-desc {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0;
}

/* ========== FEATURE CARDS ========== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.feature-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 32px 24px;
  box-shadow: var(--shadow);
  border-left: 3px solid var(--accent);
  transition: transform var(--transition), box-shadow var(--transition);
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.feature-card .feature-icon { font-size: 2.2rem; margin-bottom: 16px; }
.feature-card h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}
.feature-card p { font-size: 0.92rem; color: var(--text-soft); line-height: 1.7; }

/* ========== SCREENSHOT GALLERY ========== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}
.gallery-grid img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}
.gallery-grid img:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-lg);
}

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

/* ========== REVIEWS / QUOTES ========== */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.review-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
  border-left: 3px solid var(--warning);
}
.review-card .review-stars { color: var(--warning); font-size: 1.1rem; margin-bottom: 12px; }
.review-card .review-text {
  font-size: 0.95rem;
  color: var(--text-soft);
  line-height: 1.75;
  font-style: italic;
}
.review-card .review-author {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 12px;
  font-weight: 500;
}

/* ========== CHARACTER CARDS ========== */
.character-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}
.character-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}
.character-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.character-card img {
  width: 100%;
  height: 280px;
  object-fit: cover;
}
.character-card .char-info { padding: 20px; }
.character-card h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text);
}
.character-card .char-role {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 10px;
}
.character-card .char-traits {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.character-card .char-trait {
  font-size: 0.78rem;
  background: var(--bg-alt);
  color: var(--text-soft);
  padding: 3px 10px;
  border-radius: 12px;
  border: 1px solid var(--border-light);
}
.character-card .char-desc {
  font-size: 0.88rem;
  color: var(--text-soft);
  line-height: 1.65;
}

/* ========== GUIDE STEPS ========== */
.guide-steps-wrapper { counter-reset: guide-step; }
.guide-step {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 28px 28px 28px 64px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
  position: relative;
  border-left: 3px solid var(--accent);
}
.guide-step::before {
  counter-increment: guide-step;
  content: '#' counter(guide-step);
  position: absolute;
  left: 16px;
  top: 28px;
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent);
}
.guide-step h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}
.guide-step p { font-size: 0.92rem; color: var(--text-soft); line-height: 1.7; }
.guide-intro { font-size: 0.95rem; color: var(--text-soft); line-height: 1.8; margin-bottom: 24px; }
.route-desc { font-size: 0.95rem; color: var(--text-soft); line-height: 1.8; margin-bottom: 16px; }
.route-heading {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent);
  margin: 28px 0 12px;
  padding-left: 12px;
  border-left: 3px solid var(--warning);
}

/* Tips box */
.tip-box {
  background: linear-gradient(135deg, rgba(2,119,189,0.08) 0%, rgba(2,119,189,0.03) 100%);
  border: 1px solid rgba(2,119,189,0.2);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 24px 0;
}
.tip-box .tip-title {
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 8px;
  font-size: 0.95rem;
}
.tip-box p { font-size: 0.9rem; color: var(--text-soft); line-height: 1.7; }

/* Warning box */
.warn-box {
  background: linear-gradient(135deg, rgba(253,216,53,0.12) 0%, rgba(253,216,53,0.04) 100%);
  border: 1px solid rgba(253,216,53,0.3);
  border-left: 4px solid var(--warning-dark);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 24px 0;
}
.warn-box .warn-title {
  font-weight: 700;
  color: var(--warning-dark);
  margin-bottom: 8px;
  font-size: 0.95rem;
}
.warn-box p { font-size: 0.9rem; color: var(--text-soft); line-height: 1.7; }

/* ========== FAQ ACCORDION ========== */
.faq-intro {
  color: var(--text-soft);
  margin-bottom: 32px;
}
.faq-accordion { max-width: 800px; margin: 0 auto; }
.faq-item {
  background: var(--bg-card);
  border-radius: var(--radius);
  margin-bottom: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  transition: background var(--transition);
}
.faq-question:hover { background: rgba(2,119,189,0.04); }
.faq-question .faq-icon {
  font-size: 1.2rem;
  color: var(--accent);
  transition: transform var(--transition);
}
.faq-item.open .faq-question .faq-icon { transform: rotate(45deg); }
.faq-answer {
  display: none;
  padding: 0 24px 24px;
  font-size: 0.92rem;
  color: var(--text-soft);
  line-height: 1.75;
}
.faq-item.open .faq-answer { display: block; }
.faq-note { margin-top: 16px; }
.faq-note-sm { margin-top: 12px; color: var(--text-muted); font-size: 0.85rem; }

/* ========== SYSTEM REQUIREMENTS TABLE ========== */
.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; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.sys-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin-bottom: 8px;
}
.sys-table th {
  background: var(--bg-dark);
  color: #ECEFF1;
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.85rem;
}
.sys-table td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-soft);
}
.sys-table tr:nth-child(even) { background: var(--bg-alt); }
.sys-table .td-highlight { color: var(--danger); font-weight: 700; }
.sys-note {
  margin-top: 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

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

/* ========== STORY CHAPTER CLASSES ========== */
.chapter-title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent);
  margin: 24px 0 8px;
  padding-left: 12px;
  border-left: 3px solid var(--warning);
}

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

/* ========== PROSE CENTERED (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; }

/* ========== PAGE HEADING (sub-page content) ========== */
.content-section h2 {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

/* ========== STORY PAGE ========== */
.story-content { max-width: 800px; margin: 0 auto; }
.story-content h3 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin: 28px 0 12px;
}
.story-content p {
  font-size: 0.95rem;
  color: var(--text-soft);
  line-height: 1.85;
  margin-bottom: 16px;
}
.story-content .lore-box {
  background: var(--bg-alt);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 24px 0;
  border-left: 3px solid var(--warning);
}

/* ========== FOOTER ========== */
.site-footer {
  background: var(--bg-dark);
  padding: 24px 24px;
  text-align: center;
  border-top: 2px solid var(--accent);
}
.site-footer p {
  font-size: 0.85rem;
  color: var(--text-light);
}

/* ========== RESPONSIVE: 768px ========== */
@media (max-width: 768px) {
  .hero { padding: 48px 24px 60px; }
  .hero-title-main { font-size: 2rem; }
  .hero-subpage-title { font-size: 1.6rem; }
  .hero-subpage { padding: 32px 24px 40px; }
  .section { padding: 48px 20px; }
  .section-title { font-size: 1.6rem; }
  .content-section h2 { font-size: 1.8rem; }
  .gallery-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
  .character-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
  .info-cards { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: 1fr; }
  .reviews-grid { grid-template-columns: 1fr; }
  .cta-title { font-size: 1.4rem; }
  .nav-links { gap: 2px; }
  .nav-links a { padding: 6px 10px; font-size: 0.82rem; }
}

/* ========== RESPONSIVE: 480px ========== */
@media (max-width: 480px) {
  .hero-title-main { font-size: 1.6rem; }
  .hero-subpage-title { font-size: 1.3rem; }
  .hero-subpage { padding: 28px 16px 36px; }
  .hero-tagline { font-size: 0.9rem; }
  .section { padding: 36px 16px; }
  .section-title { font-size: 1.4rem; }
  .content-section h2 { font-size: 1.5rem; }
  .info-cards { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .info-card { padding: 16px 10px; }
  .info-card .info-value { font-size: 1.2rem; }
  .gallery-grid { grid-template-columns: 1fr; }
  .character-grid { grid-template-columns: 1fr; }
  .cta-btn { padding: 12px 32px; font-size: 1rem; }
  .guide-step { padding: 20px 20px 20px 48px; }
  .guide-step::before { left: 10px; font-size: 1.1rem; }
  .sys-table { font-size: 0.8rem; }
  .sys-table th, .sys-table td { padding: 8px 10px; }
  .site-logo { font-size: 1.1rem; }
  .nav-links a { padding: 6px 8px; font-size: 0.78rem; }
}
