/* ============================================================
   Eternum 永恒世界 - 中文官网 CSS
   Theme: 数字永恒 — 虚拟科幻风格
   Palette: 电子蓝 #1565C0, 赛博紫 #7B1FA2, 银灰 #CFD8DC, 纯白 #FFFFFF
   ============================================================ */

/* ---------- CSS Variables ---------- */
:root {
  --e-blue: #1565C0;
  --e-blue-dark: #0D47A1;
  --e-blue-light: #42A5F5;
  --e-purple: #7B1FA2;
  --e-purple-dark: #4A148C;
  --e-purple-light: #AB47BC;
  --e-silver: #CFD8DC;
  --e-silver-dark: #90A4AE;
  --e-white: #FFFFFF;
  --e-off-white: #F5F7FA;
  --bg: #FFFFFF;
  --bg-warm: #F0F4F8;
  --bg-card: #FAFBFC;
  --text: #1A1A2E;
  --text-soft: #546E7A;
  --text-light: #78909C;
  --accent-gradient: linear-gradient(135deg, var(--e-blue) 0%, var(--e-purple) 100%);
  --accent-gradient-light: linear-gradient(135deg, var(--e-blue-light) 0%, var(--e-purple-light) 100%);
  --shadow-sm: 0 2px 8px rgba(21, 101, 192, 0.08);
  --shadow-md: 0 4px 20px rgba(21, 101, 192, 0.12);
  --shadow-lg: 0 8px 40px rgba(123, 31, 162, 0.15);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --font-sans: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;
  --font-serif: 'Noto Serif SC', 'SimSun', 'STSong', serif;
  --max-width: 1200px;
  --header-height: 68px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: var(--e-blue);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--e-purple);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

.prose {
  max-width: 800px;
  margin: 0 auto;
}

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

.hero-subpage {
  padding: 40px 24px 48px;
}

.hero-subpage-title {
  font-size: 2rem;
  font-weight: 700;
}

.hero-tagline {
  font-size: 1.15rem;
  color: var(--e-silver);
  margin-top: 8px;
  font-weight: 300;
}

.hero-title-main {
  font-family: var(--font-serif);
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--e-white);
  text-shadow: 0 2px 12px rgba(123, 31, 162, 0.4), 0 0 60px rgba(21, 101, 192, 0.3);
  letter-spacing: 2px;
  line-height: 1.2;
}

.chapter-title {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--e-blue);
  margin-top: 32px;
  margin-bottom: 10px;
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.content-list {
  list-style: disc;
  padding-left: 20px;
}

.content-list-num {
  list-style: decimal;
  padding-left: 24px;
}

.content-li {
  color: var(--text-soft);
  margin-bottom: 5px;
}

.content-li-sm {
  color: var(--text-soft);
  margin-bottom: 4px;
}

.content-li-md {
  color: var(--text-soft);
  margin-bottom: 8px;
}

.content-li-lg {
  color: var(--text-soft);
  margin-bottom: 10px;
}

.guide-intro {
  font-size: 1.05rem;
  color: var(--text-soft);
  margin-bottom: 24px;
  line-height: 1.9;
}

.route-desc {
  font-size: 0.98rem;
  color: var(--text-soft);
  margin-bottom: 16px;
  padding-left: 16px;
  border-left: 3px solid var(--e-blue-light);
}

.route-heading {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--e-purple);
  margin-top: 28px;
  margin-bottom: 12px;
}

.strong-blue { color: var(--e-blue); }
.strong-purple { color: var(--e-purple); }
.strong-gold { color: #F57F17; }
.strong-muted { color: var(--text-soft); }

.td-highlight {
  color: var(--e-purple);
  font-weight: 700;
}

.sys-reqs-h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--e-blue);
  margin-top: 24px;
  margin-bottom: 12px;
}

.sys-reqs-h3:first-of-type {
  margin-top: 0;
}

.overview-text {
  font-size: 1.05rem;
  color: var(--text-soft);
  line-height: 2;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 32px;
}

.section-subheading {
  text-align: center;
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: var(--e-purple-dark);
  margin: 40px 0 24px;
}

/* ---------- Content Section H2 (sub-page body title) ---------- */
.content-section h2 {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

/* ---------- Header ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(13, 71, 161, 0.97);
  backdrop-filter: blur(12px);
  border-bottom: 3px solid var(--e-purple);
  height: var(--header-height);
}

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

.logo {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--e-white);
  letter-spacing: 1px;
  white-space: nowrap;
}

.logo small {
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--e-silver);
  letter-spacing: 0;
}

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

nav a {
  color: var(--e-silver);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 500;
  transition: all var(--transition);
}

nav a:hover,
nav a.active {
  color: var(--e-white);
  background: rgba(255, 255, 255, 0.12);
}

.nav-cta {
  background: var(--accent-gradient);
  color: var(--e-white) !important;
  padding: 8px 20px !important;
  border-radius: 24px !important;
  font-weight: 600 !important;
  margin-left: 8px;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 12px rgba(123, 31, 162, 0.3);
  transition: all var(--transition) !important;
}

.nav-cta:hover {
  box-shadow: 0 4px 20px rgba(123, 31, 162, 0.5);
  transform: translateY(-1px);
  color: var(--e-white) !important;
  background: var(--accent-gradient-light);
}

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

.hamburger span {
  display: block;
  width: 26px;
  height: 2.5px;
  background: var(--e-white);
  border-radius: 2px;
  transition: all var(--transition);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 520px;
  overflow: hidden;
}

.hero-home {
  min-height: 600px;
}

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

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(13, 71, 161, 0.82) 0%, rgba(74, 20, 140, 0.75) 60%, rgba(0, 0, 0, 0.4) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  padding: 0 24px;
}

.hero-subtitle {
  font-size: 1.3rem;
  color: var(--e-silver);
  margin-top: 16px;
  font-weight: 300;
  letter-spacing: 1px;
}

/* Per-page hero backgrounds */
.hero-home .hero-bg { background-image: url('../img/header.png'); }
.hero-story .hero-bg { background-image: url('../img/header.png'); }
.hero-guide .hero-bg { background-image: url('../img/header.png'); }
.hero-characters .hero-bg { background-image: url('../img/header.png'); }
.hero-faq .hero-bg { background-image: url('../img/header.png'); }

/* ---------- Sections ---------- */
section {
  padding: 80px 24px;
}

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

.section-title {
  text-align: center;
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--e-blue-dark);
  margin-bottom: 8px;
}

.section-sub {
  text-align: center;
  font-size: 1.05rem;
  color: var(--text-soft);
  margin-bottom: 48px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Feature Cards ---------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--e-blue);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

.feature-card:hover {
  box-shadow: var(--shadow-md);
  border-left-color: var(--e-purple);
  transform: translateY(-2px);
}

.feature-card:nth-child(even) {
  border-left-color: var(--e-purple);
}

.feature-card:nth-child(even):hover {
  border-left-color: var(--e-blue);
}

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

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

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

/* ---------- Screenshot Gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.gallery-item {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all var(--transition);
}

.gallery-item:hover {
  box-shadow: var(--shadow-lg);
  transform: scale(1.02);
}

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

/* ---------- Reviews ---------- */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.review-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.review-card::before {
  content: '"';
  position: absolute;
  top: 8px;
  left: 16px;
  font-family: var(--font-serif);
  font-size: 3rem;
  color: var(--e-blue-light);
  opacity: 0.3;
  line-height: 1;
}

.review-text {
  font-size: 0.95rem;
  color: var(--text);
  font-style: italic;
  margin-bottom: 16px;
  padding-top: 12px;
  line-height: 1.8;
}

.review-author {
  font-size: 0.85rem;
  color: var(--e-purple);
  font-weight: 600;
}

/* ---------- CTA Banner (index only) ---------- */
.cta-banner {
  background: var(--accent-gradient);
  text-align: center;
  padding: 64px 24px;
}

.cta-banner h2 {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--e-white);
  margin-bottom: 12px;
}

.cta-banner p {
  font-size: 1.1rem;
  color: var(--e-silver);
  margin-bottom: 28px;
}

.btn-cta {
  display: inline-block;
  background: var(--e-white);
  color: var(--e-purple);
  padding: 14px 48px;
  border-radius: 28px;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 1px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  transition: all var(--transition);
}

.btn-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  color: var(--e-blue-dark);
}

/* ---------- Character Cards ---------- */
.char-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.char-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

.char-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.char-img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--e-white);
  font-size: 3rem;
}

.char-img-gradient { background: var(--accent-gradient); }
.char-img-blue { background: linear-gradient(135deg, #1565C0, #42A5F5); }
.char-img-purple { background: linear-gradient(135deg, #7B1FA2, #AB47BC); }
.char-img-red { background: linear-gradient(135deg, #C62828, #EF5350); }
.char-img-deep-purple { background: linear-gradient(135deg, #4A148C, #7B1FA2); }
.char-img-teal { background: linear-gradient(135deg, #1565C0, #7B1FA2); }
.char-img-orange { background: linear-gradient(135deg, #E65100, #FF9800); }
.char-img-pink { background: linear-gradient(135deg, #6A1B9A, #E040FB); }
.char-img-gray { background: linear-gradient(135deg, #546E7A, #90A4AE); }
.char-img-dark { background: linear-gradient(135deg, #37474F, #78909C); }
.char-img-indigo { background: linear-gradient(135deg, #1A237E, #3949AB); }

.char-info {
  padding: 20px;
}

.char-info h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--e-blue-dark);
  margin-bottom: 4px;
}

.char-info .char-role {
  font-size: 0.82rem;
  color: var(--e-purple);
  font-weight: 600;
  margin-bottom: 8px;
}

.char-info p {
  font-size: 0.88rem;
  color: var(--text-soft);
  line-height: 1.65;
}

/* ---------- Story Content ---------- */
.story-intro {
  font-size: 1.1rem;
  color: var(--text);
  line-height: 2;
  margin-bottom: 40px;
}

.world-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 28px;
  margin-bottom: 24px;
  border-left: 4px solid var(--e-purple);
  box-shadow: var(--shadow-sm);
}

.world-card h3 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--e-purple-dark);
  margin-bottom: 10px;
}

.world-card p {
  font-size: 0.95rem;
  color: var(--text-soft);
  line-height: 1.85;
}

/* ---------- Guide Content ---------- */
.guide-step {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--e-blue);
}

.guide-step:nth-child(even) {
  border-left-color: var(--e-purple);
}

.guide-step h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--e-blue-dark);
  margin-bottom: 8px;
}

.guide-step h3 .step-num {
  display: inline-block;
  background: var(--accent-gradient);
  color: var(--e-white);
  width: 32px;
  height: 32px;
  line-height: 32px;
  text-align: center;
  border-radius: 50%;
  font-size: 0.85rem;
  margin-right: 10px;
}

.guide-step p {
  font-size: 0.93rem;
  color: var(--text-soft);
  line-height: 1.8;
}

.tip-box {
  background: linear-gradient(135deg, rgba(21,101,192,0.06) 0%, rgba(123,31,162,0.06) 100%);
  border: 1px solid var(--e-blue-light);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin: 24px 0;
}

.tip-box h4 {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--e-purple);
  margin-bottom: 8px;
}

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

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

.faq-item {
  border: 1px solid var(--e-silver);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  overflow: hidden;
  background: var(--bg-card);
  transition: all var(--transition);
}

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

.faq-question:hover {
  color: var(--e-blue);
}

.faq-arrow {
  font-size: 1.2rem;
  color: var(--e-blue);
  transition: transform var(--transition);
  flex-shrink: 0;
  margin-left: 12px;
}

.faq-item.active .faq-arrow {
  transform: rotate(180deg);
  color: var(--e-purple);
}

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

.faq-item.active .faq-answer {
  max-height: 600px;
}

.faq-answer-inner {
  padding: 0 24px 20px;
  font-size: 0.93rem;
  color: var(--text-soft);
  line-height: 1.8;
}

/* ---------- System Reqs Table ---------- */
.sys-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 0.93rem;
}

.sys-table th,
.sys-table td {
  padding: 12px 16px;
  border: 1px solid var(--e-silver);
  text-align: left;
}

.sys-table th {
  background: var(--accent-gradient);
  color: var(--e-white);
  font-weight: 600;
}

.sys-table tr:nth-child(even) {
  background: var(--bg-warm);
}

/* ---------- Footer ---------- */
footer {
  background: var(--e-blue-dark);
  color: var(--e-silver);
  text-align: center;
  padding: 28px 24px;
  font-size: 0.88rem;
}

/* ---------- Info Cards (index) ---------- */
.info-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 32px;
}

.info-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.info-card .info-value {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 4px;
}

.info-card .info-label {
  font-size: 0.82rem;
  color: var(--text-soft);
}

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

.lightbox.active {
  display: flex;
}

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

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 32px;
  background: none;
  border: none;
  color: var(--e-white);
  font-size: 2rem;
  cursor: pointer;
  z-index: 1;
}

/* ---------- Responsive: 768px ---------- */
@media (max-width: 768px) {
  .features-grid,
  .reviews-grid {
    grid-template-columns: 1fr;
  }

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

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

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

  .hero-title-main {
    font-size: 2.4rem;
  }

  .hero-home {
    min-height: 420px;
  }

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

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

  section {
    padding: 56px 20px;
  }

  .hamburger {
    display: flex;
  }

  nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: rgba(13, 71, 161, 0.98);
    flex-direction: column;
    padding: 12px 0;
    gap: 0;
  }

  nav.open {
    display: flex;
  }

  nav a {
    padding: 14px 24px;
    border-radius: 0;
  }

  .nav-cta {
    margin: 8px 20px;
    text-align: center;
    border-radius: 24px !important;
  }
}

/* ---------- Responsive: 480px ---------- */
@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }

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

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

  .hero-title-main {
    font-size: 1.8rem;
  }

  .hero-home {
    min-height: 340px;
  }

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

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

  section {
    padding: 40px 16px;
  }

  .cta-banner {
    padding: 40px 16px;
  }

  .cta-banner h2 {
    font-size: 1.5rem;
  }
}
