
/* ... existing code ... */

.home-hero {
  background:
    linear-gradient(90deg, rgba(5, 7, 9, 0) 0%, rgba(5, 7, 9, 0.30) 40%, rgba(5, 7, 9, 0.50) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.3) 50%, rgba(0, 0, 0, 0.8) 100%),
    url("image/ComfyUI_00137_.png") center / cover no-repeat;
  background-position: center 70%;
  min-height: 500px;
}

:root {/* ... existing code ... */

/* ... existing code ... */

.site-nav {
  display: flex;
  gap: 38px;
  color: var(--white);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* ... existing code ... */

.site-nav a {
  position: relative;
  padding: 10px 0;
  transition: all 0.3s ease;
}

.site-nav a::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  content: "";
  background: var(--red-bright);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--blue-bright);
}

.site-nav a:hover::after,
.site-nav a.active::after {
  transform: scaleX(1);
}

/* ... existing code ... *//* ... existing code ... */

.hero-content {
  position: relative;
  z-index: 1;
  width: min(610px, 85%);
  padding: 80px 40px;
}

/* ... existing code ... */:root {
  --black: #0a0c10;
  --deep-black: #060808;
  --panel: #12171d;
  --panel-light: #1a232d;
  --blue: #8faab8;
  --blue-bright: #b8d4e3;
  --muted: #7a8890;
  --white: #e0e6ea;
  --red: #7a2830;
  --red-bright: #b04850;
  --line: rgba(140, 170, 190, 0.15);
}/* ... existing code ... */

.hero-subtitle {
  max-width: 490px;
  color: var(--white);
  font-size: 21px;
  line-height: 1.8;
  font-weight: 700;
}

.hero h1,
.page-heading h1 {
  margin: 16px 0;
  background: linear-gradient(180deg, #e8f4f8 0%, #b8d4e3 50%, #8faab8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: clamp(70px, 11vw, 148px);
  font-weight: 900;
  letter-spacing: 12px;
  line-height: 1;
  text-shadow: 
    0 0 20px rgba(184, 212, 227, 0.5),
    0 0 40px rgba(143, 170, 184, 0.3),
    0 4px 8px rgba(0, 0, 0, 0.5);
  position: relative;
  animation: ice-glow 3s ease-in-out infinite alternate;
}

@keyframes ice-glow {
  from {
    text-shadow: 
      0 0 20px rgba(184, 212, 227, 0.5),
      0 0 40px rgba(143, 170, 184, 0.3),
      0 4px 8px rgba(0, 0, 0, 0.5);
  }
  to {
    text-shadow: 
      0 0 30px rgba(184, 212, 227, 0.8),
      0 0 60px rgba(143, 170, 184, 0.5),
      0 4px 12px rgba(0, 0, 0, 0.6);
  }
}

/* ... existing code ... */

.faction-note {
  margin-bottom: 120px;
  padding: 30px;
  border-left: 2px solid var(--red);
  background: rgba(140, 48, 55, 0.08);
}

.faction-note p:last-child {
  margin: 0;
  color: var(--blue);
  font-size: 16px;
}

.timeline-interactive {
  padding: 80px 0 100px;
}

.timeline-wrapper {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

.timeline-line {
  position: absolute;
  left: 50px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(157, 187, 202, 0.2);
  transform: translateX(-50%);
}

.timeline-progress {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0%;
  background: linear-gradient(180deg, var(--red-bright) 0%, var(--blue-bright) 100%);
  transition: height 0.3s ease;
}

.timeline-items {
  position: relative;
  padding-left: 100px;
}

.timeline-item {
  position: relative;
  margin-bottom: 40px;
}


.timeline-interactive {
  padding: 80px 0 100px;
}

.timeline-wrapper {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.timeline-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, 
    transparent 0%, 
    var(--blue) 10%, 
    var(--blue) 90%, 
    transparent 100%);
  transform: translateX(-50%);
}

.timeline-progress {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0%;
  background: linear-gradient(180deg, var(--red-bright) 0%, var(--blue-bright) 100%);
  transition: height 0.3s ease;
}

.timeline-items {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 60px;
  padding: 40px 0;
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 80px 1fr;
  gap: 0;
  align-items: start;
  opacity: 1;
}

.timeline-item:nth-child(odd) .timeline-card {
  grid-column: 1;
  margin-right: 40px;
}

.timeline-item:nth-child(odd) .timeline-node {
  grid-column: 2;
}

.timeline-item:nth-child(odd) .timeline-spacer {
  grid-column: 3;
}

.timeline-item:nth-child(even) .timeline-spacer {
  grid-column: 1;
}

.timeline-item:nth-child(even) .timeline-node {
  grid-column: 2;
}

.timeline-item:nth-child(even) .timeline-card {
  grid-column: 3;
  margin-left: 40px;
}

.timeline-node {
  position: relative;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.node-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--panel);
  border: 3px solid var(--blue);
  transition: all 0.3s ease;
  cursor: pointer;
  z-index: 2;
  position: relative;
}

.node-pulse {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: var(--blue-bright);
  opacity: 0;
  animation: pulse-ring 2s ease-out infinite;
}

.timeline-item.active .node-dot {
  background: var(--blue-bright);
  border-color: var(--blue-bright);
  box-shadow: 0 0 30px rgba(184, 212, 227, 0.8);
  transform: scale(1.2);
}

.timeline-current .node-dot {
  background: var(--red-bright);
  border-color: var(--red-bright);
  box-shadow: 0 0 30px rgba(193, 89, 96, 0.8);
}

.timeline-current .node-pulse {
  animation: pulse-ring-current 2s ease-out infinite;
}

@keyframes pulse-ring {
  0% {
    transform: scale(1);
    opacity: 0.6;
  }
  100% {
    transform: scale(2.5);
    opacity: 0;
  }
}

@keyframes pulse-ring-current {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  100% {
    transform: scale(3);
    opacity: 0;
  }
}

.timeline-card {
  border: 1px solid var(--line);
  background: var(--panel);
  transition: all 0.3s ease;
  overflow: hidden;
  cursor: pointer;
}

.timeline-card:hover {
  border-color: var(--blue);
  box-shadow: 0 4px 30px rgba(120, 192, 218, 0.2);
  transform: translateY(-3px);
}

.timeline-item.active .timeline-card {
  border-color: var(--blue-bright);
  box-shadow: 0 8px 40px rgba(184, 212, 227, 0.3);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}

.card-year {
  color: var(--red-bright);
  font-family: Arial, sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
}

.card-season {
  color: var(--muted);
  font-size: 12px;
  padding: 2px 8px;
  border: 1px solid var(--line);
  font-family: Arial, sans-serif;
}

.card-toggle {
  margin-left: auto;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--blue);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.3s ease;
}

.card-toggle:hover {
  border-color: var(--blue-bright);
  color: var(--blue-bright);
}

.timeline-item.active .card-toggle {
  background: var(--blue-bright);
  border-color: var(--blue-bright);
  color: var(--black);
}

.toggle-icon {
  font-family: Arial, sans-serif;
  font-size: 18px;
  font-weight: 300;
  transition: transform 0.3s ease;
}

.timeline-item.active .toggle-icon {
  transform: rotate(45deg);
}

.card-title {
  margin: 0;
  padding: 20px 24px 12px;
  color: var(--blue-bright);
  font-size: 22px;
  font-weight: 600;
}

.card-summary {
  margin: 0;
  padding: 0 24px 20px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.card-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease, padding 0.5s ease;
  padding: 0 24px;
  border-top: 1px solid var(--line);
}

.timeline-item.active .card-content {
  max-height: 800px;
  padding: 20px 24px 24px;
}

.card-content p {
  margin: 0 0 16px;
  color: var(--white);
  font-size: 14px;
  line-height: 1.9;
}

.card-content p:last-child {
  margin-bottom: 0;
}

.card-content strong {
  color: var(--blue-bright);
  font-weight: 600;
}

.card-note {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--blue);
  font-style: italic;
  font-size: 13px;
}

.timeline-spacer {
  display: block;
}

.timeline-note {
  margin: 80px auto 120px;
  max-width: 800px;
  padding: 30px;
  border-left: 2px solid var(--red);
  background: rgba(140, 48, 55, 0.08);
}

.timeline-note p:last-child {
  margin: 0;
  color: var(--blue);
  font-size: 16px;
}

@media (max-width: 900px) {
  .timeline-line {
    left: 40px;
  }
  
  .timeline-item {
    grid-template-columns: 80px 1fr;
  }
  
  .timeline-item:nth-child(odd) .timeline-card,
  .timeline-item:nth-child(even) .timeline-card {
    grid-column: 2;
    margin-left: 0;
    margin-right: 0;
  }
  
  .timeline-item:nth-child(odd) .timeline-node,
  .timeline-item:nth-child(even) .timeline-node {
    grid-column: 1;
  }
  
  .timeline-spacer {
    display: none;
  }
}

/* ... existing code ... */

.timeline-node {
  position: absolute;
  left: -50px;
  top: 20px;
  width: 20px;
  height: 20px;
  z-index: 2;
}

.node-dot {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--panel);
  border: 2px solid var(--blue);
  transition: all 0.3s ease;
  cursor: pointer;
  z-index: 2;
}

.node-pulse {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: var(--blue-bright);
  opacity: 0;
  animation: pulse-ring 2s ease-out infinite;
}

.timeline-item.active .node-dot {
  background: var(--blue-bright);
  border-color: var(--blue-bright);
  box-shadow: 0 0 20px rgba(184, 212, 227, 0.6);
}

.timeline-current .node-dot {
  background: var(--red-bright);
  border-color: var(--red-bright);
  box-shadow: 0 0 20px rgba(193, 89, 96, 0.6);
}

.timeline-current .node-pulse {
  animation: pulse-ring-current 2s ease-out infinite;
}

@keyframes pulse-ring {
  0% {
    transform: scale(1);
    opacity: 0.6;
  }
  100% {
    transform: scale(2);
    opacity: 0;
  }
}

@keyframes pulse-ring-current {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  100% {
    transform: scale(2.5);
    opacity: 0;
  }
}

.timeline-card {
  border: 1px solid var(--line);
  background: var(--panel);
  transition: all 0.3s ease;
  overflow: hidden;
}

.timeline-card:hover {
  border-color: var(--blue);
  box-shadow: 0 4px 20px rgba(120, 192, 218, 0.15);
}

.timeline-item.active .timeline-card {
  border-color: var(--blue-bright);
  box-shadow: 0 4px 30px rgba(184, 212, 227, 0.2);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 24px;
  cursor: pointer;
  user-select: none;
}

.card-year {
  color: var(--red-bright);
  font-family: Arial, sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
}

.card-season {
  color: var(--muted);
  font-size: 12px;
  padding: 2px 8px;
  border: 1px solid var(--line);
  font-family: Arial, sans-serif;
}

.card-toggle {
  margin-left: auto;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--blue);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.3s ease;
}

.card-toggle:hover {
  border-color: var(--blue-bright);
  color: var(--blue-bright);
}

.timeline-item.active .card-toggle {
  background: var(--blue-bright);
  border-color: var(--blue-bright);
  color: var(--black);
}

.toggle-icon {
  font-family: Arial, sans-serif;
  font-size: 18px;
  font-weight: 300;
  transition: transform 0.3s ease;
}

.timeline-item.active .toggle-icon {
  transform: rotate(45deg);
}

.card-title {
  margin: 0 24px 12px;
  color: var(--blue-bright);
  font-size: 24px;
  font-weight: 600;
}

.card-summary {
  margin: 0 24px 20px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.card-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
  padding: 0 24px;
}

.timeline-item.active .card-content {
  max-height: 600px;
  padding: 0 24px 24px;
}

.card-content p {
  margin: 0 0 16px;
  color: var(--white);
  font-size: 15px;
  line-height: 1.9;
}

.card-content p:last-child {
  margin-bottom: 0;
}

.card-image {
  margin-bottom: 20px;
  border: 1px solid var(--line);
  overflow: hidden;
}

.card-image img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  filter: saturate(0.6) contrast(1.1);
  transition: filter 0.3s ease;
}

.timeline-card:hover .card-image img {
  filter: saturate(0.8) contrast(1.1);
}

.card-note {
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--blue);
  font-style: italic;
}

.timeline-note {
  margin-bottom: 120px;
  padding: 30px;
  border-left: 2px solid var(--red);
  background: rgba(140, 48, 55, 0.08);
}

.timeline-note p:last-child {
  margin: 0;
  color: var(--blue);
  font-size: 16px;
}

/* ... existing code ... */

.story-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
  padding: 30px 0 50px;
}

.story-card {
  border: 1px solid var(--line);
  background: var(--panel);
  transition: all 0.3s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.story-card:hover {
  border-color: var(--blue);
  box-shadow: 0 0 30px rgba(120, 192, 218, 0.2);
  transform: translateY(-5px);
}

.story-featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 0;
}

.story-image {
  position: relative;
  overflow: hidden;
}

.story-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 16 / 10;
  filter: saturate(0.6) contrast(1.1);
  transition: filter 0.3s ease;
}

.story-card:hover .story-image img {
  filter: saturate(0.8) contrast(1.1);
}

.story-badge {
  position: absolute;
  top: 20px;
  left: 20px;
  padding: 6px 16px;
  background: var(--red);
  color: var(--white);
  font-family: Arial, sans-serif;
  font-size: 11px;
  letter-spacing: 2px;
  z-index: 1;
}

.side-badge {
  background: var(--blue);
}

.story-content {
  padding: 40px;
}

.story-intro {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.9;
  margin: 20px 0;
}

.story-meta {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
  color: var(--muted);
  font-family: Arial, sans-serif;
  font-size: 11px;
  letter-spacing: 1px;
}

.story-meta span {
  padding: 4px 12px;
  border: 1px solid var(--line);
}

/* ... existing code ... *//* ... existing code ... */

.story-meta span {
  padding: 4px 12px;
  border: 1px solid var(--line);
}

.story-reader {
  max-width: 800px;
  margin: 0 auto;
  padding: 80px 24px 130px;
}

.reader-header {
  text-align: center;
  margin-bottom: 80px;
}

.reader-header h1 {
  font-size: clamp(36px, 6vw, 56px);
  margin: 20px 0;
}

.reader-meta {
  display: flex;
  justify-content: center;
  gap: 15px;
  color: var(--muted);
  font-family: Arial, sans-serif;
  font-size: 12px;
  letter-spacing: 1px;
}

/* ... existing code ... */

.reader-content {
  color: var(--white);
  font-size: 18px;
  line-height: 2.2;
}

.reader-content p {
  margin-bottom: 28px;
  text-indent: 2em;
}

.reader-content img {
  width: 90%; 
  max-width: 100%; /* 防止图片超出文章排版宽度 */
  margin: 28px auto; /* 保持图片居中及垂直间距 */
}

/* ... existing code ... */

/* 话冰人独白样式 */
.huabing-monologue {
  margin: 40px 0;
  padding: 0;
  text-align: center;
}

/* ... existing code ... */

.speaker-title {
  border-left: 3px solid #7EE8E4; 
  background: rgba(200, 232, 126, 0.1); 
  padding-left: 15px;
  display: block;            /* inline-block → block */
  text-align: center;        /* 内容居中 */
  width: fit-content;        /* 保持包裹内容的宽度 */
  margin: 0 auto 16px;       /* 水平居中 + 保留底部间距 */
  padding: 4px 8px;
  color: var(--blue-bright);
  font-family: Arial, sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
  border: 1px solid var(--line);
  border-radius: 4px;
}

/* ... existing code ... */

/* 独白内容 - 普通样式 */
.monologue-content {
  color: var(--white);
  font-size: 18px;
  line-height: 2.2;
}

.monologue-content br {
  display: block;
  margin: 8px 0;
}

/* 分隔线样式 */
.reader-content hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 40px 0;
}

/* ... existing code ... */

.reader-illustration {
  margin: 60px 0;
  text-align: center;
}

.reader-illustration img {
  max-width: 100%;
  border: 1px solid var(--line);
  filter: saturate(0.7) contrast(1.05);
}

.illustration-caption {
  margin-top: 16px;
  color: var(--muted);
  font-size: 13px;
  font-style: italic;
}

.reader-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 80px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
}

/* ... existing code ... */
  --black: #080a0d;
  --deep-black: #050608;
  --panel: #10151b;
  --panel-light: #151d25;
  --blue: #9dbbca;
  --blue-bright: #c9e4ed;
  --muted: #83919a;
  --white: #e8edf0;
  --red: #8c3037;
  --red-bright: #c15960;
  --line: rgba(157, 187, 202, 0.19);
  --serif: "Noto Serif SC", "Source Han Serif SC", serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  position: relative;
  margin: 0;
  min-width: 320px;
  color: var(--white);
  background:
    radial-gradient(circle at 80% 18%, rgba(24, 52, 67, 0.2), transparent 30rem),
    linear-gradient(135deg, #07090c 0%, #0d1217 48%, #090b0e 100%);
  font-family: var(--serif);
  line-height: 1.8;
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  content: "";
  opacity: 0.17;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.2'/%3E%3C/svg%3E");
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  width: 100%;
}

.content-width {
  width: min(1120px, calc(100% - 48px));
  margin-inline: auto;
}

/* ... existing code ... */

.site-header {
  position: relative;
  z-index: 5;
  display: flex;
  width: min(1280px, calc(100% - 48px));
  min-height: 96px;
  margin-inline: auto;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.site-header::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    var(--red-bright) 20%, 
    var(--blue-bright) 50%, 
    var(--red-bright) 80%, 
    transparent 100%);
  opacity: 0.6;
}

/* ... existing code ... */

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: var(--blue-bright);
  border: 1px solid var(--blue);
  font-size: 19px;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  color: var(--white);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 5px;
}

.brand small {
  margin-top: -4px;
  color: var(--muted);
  font-family: Arial, sans-serif;
  font-size: 8px;
  letter-spacing: 2px;
}

.site-nav {
  display: flex;
  gap: 38px;
  color: var(--muted);
  font-size: 14px;
}

.site-nav a {
  position: relative;
  padding: 10px 0;
  transition: color 0.25s ease;
}

.site-nav a::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  content: "";
  background: var(--red-bright);
  transform: scaleX(0);
  transition: transform 0.25s ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--white);
}

.site-nav a:hover::after,
.site-nav a.active::after {
  transform: scaleX(1);
}

.menu-toggle {
  display: none;
  padding: 8px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 1px;
  margin: 5px 0;
  background: var(--blue);
}

/* ... existing code ... */

.hero {
  position: relative;
  display: flex;
  /* 建议把高度写死，或者用 aspect-ratio 保持宽高比 */
  min-height: 500px;
  height: auto; /* 让高度自适应，或者写 600px */
  aspect-ratio: 16 / 5; /* 强行锁死宽屏电影比例！ */
  
  width: 100%; /* 如果想让画面铺满，可以用 100% */
  max-width: 1280px; /* 限制最大宽度 */
  margin: auto;
  margin-top: 10px;
  align-items: center;
  overflow: hidden;
}

/* ... existing code ... */

.hero-content {
  position: relative;
  z-index: 2;
  width: min(610px, 80%);
  padding: 40px 0;
}

/* ... existing code ... */

.hero-bg-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 2s ease-in-out;
}

.hero-bg-slide.active {
  opacity: 1;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(5, 7, 9, 0) 0%, rgba(5, 7, 9, 0.5) 45%, rgba(5, 7, 9, 0.8) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.3) 50%, rgba(0, 0, 0, 0.8) 100%);
}

.home-hero {
  background: transparent;
}

/* ... existing code ... */
.eyebrow,
.section-label {
  color: var(--red-bright);
  font-family: Arial, sans-serif;
  font-size: 10px;
  letter-spacing: 3px;
  line-height: 1.5;
}

.hero h1,
.page-heading h1 {
  margin: 16px 0;
  color: var(--blue-bright);
  font-size: clamp(70px, 11vw, 148px);
  font-weight: 400;
  letter-spacing: 12px;
  line-height: 1;
  text-shadow: 0 0 34px rgba(157, 205, 225, 0.14);
}

.hero-subtitle {
  max-width: 490px;
  color: var(--white);
  font-size: 21px;
  line-height: 1.8;
}

/* ... existing code ... */

.hero-description {
  max-width: 500px;
  color: var(--white);
  font-size: 18px;
  line-height: 2;
  font-weight: 500;
  letter-spacing: 1px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

/* ... existing code ... */

.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 36px;
}

.button {
  display: inline-block;
  padding: 11px 28px;
  font-size: 13px;
  transition: all 0.25s ease;
}

.button-primary {
  background: var(--red);
  color: #fff;
}

.button-primary:hover {
  background: var(--red-bright);
  box-shadow: 0 0 22px rgba(193, 89, 96, 0.28);
}

.button-outline {
  border: 1px solid var(--line);
  color: var(--blue);
}

.button-outline:hover {
  border-color: var(--blue);
  color: var(--white);
}

.hero-symbol {
  position: absolute;
  right: 10%;
  bottom: 17%;
  color: rgba(201, 228, 237, 0.45);
  font-family: Arial, sans-serif;
  font-size: 9px;
  letter-spacing: 4px;
  line-height: 1.8;
  text-align: center;
}

.symbol-line {
  display: block;
  width: 1px;
  height: 110px;
  margin: auto auto 18px;
  background: linear-gradient(transparent, var(--blue), transparent);
}

.quote-section {
  padding: 130px 0 120px;
  text-align: center;
}

.quote-section blockquote {
  max-width: 770px;
  margin: 30px auto;
  /* 把原来的深蓝色换成极浅的冰霜色，甚至纯白 */
  color: #EAF6FF; 
  font-size: clamp(22px, 3vw, 36px);
  font-weight: 400;
  line-height: 1.9;
  
  /* ===== 新增的质感魔法 ===== */
  /* 增加一点点字间距，显得更优雅 */
  letter-spacing: 0.05em; 
  /* 加上一层极弱的冰蓝色发光阴影，模拟屏幕散发的微光 */
  text-shadow: 0px 0px 20px rgba(126, 232, 228, 0.4); 
  /* 文字居中对齐，如果是两行，排版更稳 */
  text-align: center; 
}

.quote-line {
  width: 70px;
  height: 1px;
  margin: auto;
  background: var(--red-bright);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  padding-bottom: 130px;
}

.feature-card {
  display: flex;
  flex-direction: column;
  position: relative;
  min-height: 270px;
  padding: 28px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(13, 19, 25, 0.72);
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.feature-card:hover {
  border-color: rgba(157, 187, 202, 0.55);
  box-shadow: 0 0 30px rgba(75, 127, 148, 0.12);
  transform: translateY(-5px);
}

.card-number {
  color: var(--red-bright);
  font-family: Arial, sans-serif;
  font-size: 20px;
  letter-spacing: 2px;
}

.feature-icon {
  position: absolute;
  top: 20px;
  right: 28px;
  color: rgba(157, 187, 202, 0.35);
  font-size: 40px;
}

.feature-card h2 {
  margin: 50px 0 8px;
  color: var(--blue-bright);
  font-size: 27px;
  font-weight: 500;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.card-link {
  margin-top: auto; /* 这招能让它自动把上面的内容顶上去 */
  display: inline-bloc
  position: relative;
  bottom: 0px;
  color: var(--blue);
  font-size: 12px;
}

.page-heading {
  padding: 40px 0 40px;
  border-bottom: 1px solid var(--line);
}

.page-heading h1 {
  margin-top: 22px;
  font-size: clamp(56px, 9vw, 104px);
}

.page-heading > p:last-child {
  max-width: 590px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.world-intro {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 80px;
  align-items: center;
  padding: 110px 0;
}

.world-image {
  position: relative;
}

.world-image::after {
  position: absolute;
  inset: 16px -16px -16px 16px;
  z-index: -1;
  border: 1px solid var(--line);
  content: "";
}

.world-image img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  filter: saturate(0.55) contrast(1.1);
}

.world-copy h2,
.section-heading h2 {
  margin: 18px 0;
  color: var(--blue-bright);
  font-size: 34px;
  font-weight: 500;
  line-height: 1.5;
}

.world-copy p:not(.section-label) {
  color: var(--muted);
  font-size: 14px;
}

.timeline-section {
  padding-bottom: 120px;
}

.section-heading {
  margin-bottom: 42px;
}

.timeline {
  border-top: 1px solid var(--line);
}

.timeline-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 26px;
  padding: 29px 0;
  border-bottom: 1px solid var(--line);
}

.timeline-year {
  color: var(--red-bright);
  font-family: Arial, sans-serif;
  font-size: 13px;
  letter-spacing: 2px;
}

.timeline-item h3 {
  margin: 0 0 5px;
  color: var(--white);
  font-size: 20px;
  font-weight: 500;
}

.timeline-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.mystery-band {
  padding: 110px 0;
  background: #0c141a;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.mystery-band h2 {
  margin: 24px 0 0;
  color: var(--blue-bright);
  font-size: clamp(28px, 5vw, 58px);
  font-weight: 400;
  line-height: 1.65;
}

.faction-list {
  padding: 80px 0 100px;
}

.faction-row {
  display: grid;
  grid-template-columns: 1fr 1fr; /* 左右各占一半页面 */
  gap: 60px; /* 增大图文间距，提升呼吸感 */
  padding: 45px 0;
  border-bottom: 1px solid var(--line);
  align-items: center; /* 垂直居中对齐 */
}

.faction-symbol {
  /* 原本独立占一列，现在让它回到文字区内部 */
  color: var(--blue);
  font-family: Arial, sans-serif;
  font-size: 12px;
  letter-spacing: 2px;
  margin-bottom: 12px; /* 与下方标题拉开距离 */
}

.faction-main > p:not(.section-label) {
  max-width: 480px; /* 缩小文字最大宽度，保持阅读舒适度 */
  color: var(--muted);
  font-size: 14px;
}

.faction-side {
  align-self: stretch; /* 让图片列占满整行高度 */
  display: flex;
  align-items: center;
  justify-content: center;
}

.faction-side img {
  width: 100%; /* 图片撑满右半边 */
  height: 100%;
  min-height: 320px; /* 设定最小高度，防止图片过于扁平 */
  aspect-ratio: 4 / 3; /* 横向比例，更适合半屏展示 */
  object-fit: cover;
  filter: saturate(0.6) contrast(1.1);
  border: 1px solid var(--line);
}

.red-symbol {
  color: var(--red-bright);
}

.white-symbol {
  color: var(--white);
}

.faction-note {
  margin-bottom: 120px;
  padding: 30px;
  border-left: 2px solid var(--red);
  background: rgba(140, 48, 55, 0.08);
}

.faction-note p:last-child {
  margin: 0;
  color: var(--blue);
  font-size: 16px;
}

.character-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  padding: 80px 0 130px;
}

.character-card {
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--panel);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.character-card:hover {
  border-color: var(--blue);
  box-shadow: 0 0 28px rgba(120, 192, 218, 0.22);
  transform: translateY(-7px);
}

.character-image {
  position: relative;
  overflow: hidden;
  background: #101820;
}

.character-image::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, transparent 50%, rgba(5, 8, 11, 0.82));
}

.character-image img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
  filter: grayscale(0) saturate(0.7) contrast(1);
  transition: transform 0.5s ease, filter 0.5s ease;
}

.character-card:hover img {
  filter: grayscale(0) saturate(1) contrast(1);
  transform: scale(1.05);
}

.character-index,
.view-label {
  position: absolute;
  z-index: 1;
  font-family: Arial, sans-serif;
  font-size: 10px;
  letter-spacing: 2px;
}

.character-index {
  top: 14px;
  left: 14px;
  color: var(--blue-bright);
}

.view-label {
  right: 14px;
  bottom: 14px;
  color: var(--white);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.character-card:hover .view-label {
  opacity: 1;
}

.character-info {
  padding: 20px 18px 23px;
}

.character-info p,
.character-info span {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.character-info h2 {
  margin: 4px 0 1px;
  color: var(--blue-bright);
  font-size: 25px;
  font-weight: 500;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  padding: 30px;
  place-items: center;
  background: rgba(3, 5, 7, 0.9);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.lightbox.open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-content {
  display: grid;
  flex-direction: column;
  gap: 1.5rem;
  grid-template-columns: minmax(300px, 1fr) minmax(220px, 360px);
  max-width: 1100px;
  max-height: 85vh; /* 限制最大高度为视口的85%，留出呼吸空间 */
  overflow-y: auto; /* 如果内容仍然超高，允许内部滚动 */
  border: 1px solid var(--line);
  background: var(--panel);
  transform: translateY(10px);
  transition: transform 0.25s ease;
}

@media (min-width: 768px) {
  .lightbox-content {
    flex-direction: row;
    align-items: flex-start;
  }
}

/* 图片轮播容器 */
.lightbox-gallery {
  position: relative;
  flex: 1;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 768px) {
  .lightbox-gallery {
    max-width: none; /* 桌面端图片占一半宽度 */
  }
}

.lightbox-image {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  max-height: 70vh; /* 缩减图片最大高度，使其适配弹窗整体高度 */
}

/* 轮播控制按钮 */
.gallery-prev, .gallery-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 10;
  transition: background 0.3s;
}

.gallery-prev:hover, .gallery-next:hover {
  background: rgba(0, 0, 0, 0.8);
}

.gallery-prev { left: 10px; }
.gallery-next { right: 10px; }

/* 图片指示器 (1/3) */
.gallery-indicator {
  position: absolute;
  bottom: 10px;
  right: 15px;
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
}

/* 文本信息区域 */
.lightbox-copy {
  flex: 1;
}


.lightbox.open .lightbox-content {
  transform: translateY(0);
}

.lightbox-copy {
  align-self: center;
  padding: 40px;
}


.story-grid-horizontal {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 1.5rem;
  padding-bottom: 1rem;
  scroll-snap-type: x mandatory;
}

.story-grid-horizontal .story-card {
  flex: 0 0 auto;
  width: 300px;
  height: 400px;
  scroll-snap-align: start;
}

.story-grid-horizontal::-webkit-scrollbar {
  height: 8px;
}

.story-grid-horizontal::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}

.story-grid-horizontal::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 4px;
}

.main-story-card .story-cover img {
  width: 100%;
  aspect-ratio: 21 / 6;
  object-fit: cover;
}

.side-story-card .story-cover img {
  width: 100%;
  aspect-ratio: 16 / 9;
  img {
    display: block;
    width: 100%;
  }
}

.read-more {
  margin-top: auto; /* 核心：把元素推到 flex 容器的最底部 */
  align-self: flex-end; /* 靠右对齐 */
  
  /* 增加一点顶部内边距，让“阅读全文”和上面的正文稍微隔开一点，有呼吸感 */
  padding-top: 15px; 
  
  color: var(--blue);
  font-size: 15px; /* 建议稍微缩小一点，不要抢了标题的风头 */
  letter-spacing: 1px;
  transition: all 0.3s ease; /* 所有属性都平滑过渡 */
  
  /* 确保它是块级元素，方便点击 */
  display: inline-block;
}

/* 鼠标悬停时的效果（极度提升高级感） */
.read-more:hover {
  color: #ffffff; /* 悬停变纯白 */
  text-shadow: 0 0 10px var(--blue); /* 散发冰蓝色光芒 */
  transform: translateX(5px); /* 向右微微移动，像是指引方向 */
}

.story-info {
  padding: 10px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.main-story-card .chapter-links {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chapter-link {
  padding: 0.25rem 0.75rem;
  border: 6px solid transparent; /* 预留边框位置，防止悬停时布局抖动 */
  border-radius: 2rem; /* 大圆角实现胶囊效果 */
  background: rgba(255, 255, 255, 0.08); /* 深灰半透明背景 */
  font-size: 0.875rem;
  text-decoration: none;
  color: var(--white); /* 白色文字 */
  transition: all 0.3s ease;
}

.chapter-link:hover {
  background: transparent; /* 悬停时背景变透明 */
  border-color: var(--blue-bright); /* 边框变为冰蓝色 */
  color: var(--blue-bright); /* 文字变为冰蓝色 */
  box-shadow: 0 0 12px rgba(184, 212, 227, 0.6), inset 0 0 8px rgba(184, 212, 227, 0.2); /* 外部和内部冰蓝色发光 */
  transform: translateY(-2px); /* 添加轻微上浮效果，增强交互感 */
}

.chapter-link.active {
  background: transparent;
  border-color: var(--blue-bright);
  color: var(--blue-bright);
  box-shadow: 0 0 12px rgba(184, 212, 227, 0.6);
}

/* 包裹人物网格和侧边栏的容器 */
.content-wrapper {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

/* 侧边栏固定在右侧 */
.faction-sidebar {
  width: 220px;
  height: fit-content;
  flex-shrink: 0;
  order: 2;
  background: rgba(255, 255, 255, 0.05);
  padding: 1.5rem; 
  
  /* ===== 修改这里 ===== */
  padding-top: 1.5rem; /* 恢复一点内部上边距，让文字不贴边 */
  margin-top: 2rem;    /* 核心：让整个盒子往下沉，留出与 Header 的距离 */
  /* ==================== */

  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.faction-sidebar h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.faction-sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.faction-btn {
  display: block;
  width: 100%;
  padding: 0.6rem 1rem;
  margin-bottom: 0.5rem;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: inherit;
  cursor: pointer;
  text-align: left;
  transition: all 0.3s ease;
}

.faction-btn:hover,
.faction-btn.active {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
}

/* 确保人物网格占据剩余空间并在左侧 */
.character-grid {
  flex: 1;
  order: 1;
}

/* 被隐藏的人物卡片 */
.character-card.hidden {
  display: none;
}


/* ... existing code ... */

@keyframes fog-drift-one {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(270px, 50px, 0) scale(1.2); }
}

@keyframes fog-drift-two {
  from { transform: translate3d(0, 0, 0) scale(1.1); }
  to { transform: translate3d(-250px, -30px, 0) scale(0.9); }
}



@media (max-width: 800px) {
  
  /* 1. 重置 Header 布局，给绝对定位做参照 */
  .site-header {
    position: relative;
    min-height: 76px;
    display: flex;
    justify-content: space-between; /* 让 Logo 和汉堡按钮分居两侧 */
    align-items: center;
  }

  /* 2. 汉堡按钮的样式和层级 */
  .menu-toggle {
    display: block;
    z-index: 200; 
    position: relative; 
    cursor: pointer;
    background: none;
    border: none;
  }

  /* 3. 修复导航栏的显示逻辑（包含滑动动画） */
  .site-nav {
    display: flex !important; /* 强制使用 flex 布局 */
    flex-direction: column;
    position: absolute;
    top: 100%; /* 从 Header 的正下方开始展开 */
    left: 0;
    width: 100%;
    background-color: #0f1115; /* 必须给个纯色背景，防止透明漏字 */
    padding: 20px 0;
    border-top: 1px solid #333;
    border-bottom: 1px solid #333;
    
    /* 默认隐藏：向上滑动并隐藏 */
    transform: translateY(-150%);
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
  }

  /* 4. 当 JS 加上 is-active 类名时，导航栏展开 */
  .site-nav.is-active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  /* 5. 修复导航文字被挤压竖排的问题 */
  .site-nav a {
    display: block;
    width: 100%;
    text-align: center; /* 文字居中 */
    padding: 12px 0;
    font-size: 16px;
    white-space: nowrap; /* 强制文字不换行 */
    border-bottom: 1px solid #222;
  }
}

@media (max-width: 800px) {
  
  /* 1. 调整背景图位置：让禹冰冰的脸偏向右侧，左侧留出空白给文字 */
  .hero-bg-slide {
    background-position: 75% center !important; /* 75%代表偏右，你可以微调这个数字 */
    background-size: cover;
  }

  /* 2. 增加文字背景的暗度，防止背景太亮看不清字 */
  .hero-overlay {
    background: linear-gradient(to right, rgba(10, 12, 16, 0.95), rgba(10, 12, 16, 0.6)) !important;
  }

  /* 3. 调整内容区的内边距，让文字不要贴着屏幕边缘 */
  .hero-content {
    padding: 40px 20px !important;
    justify-content: flex-end; /* 内容靠下排布，避开人物脸部 */
    min-height: 80vh;
  }

  /* 4. 调整大标题《化冰》的字号 */
  .hero-content h1 {
    font-size: 64px !important; /* 手机上字号缩小，如果还大就改到 56px */
    margin-bottom: 20px;
    line-height: 1.1;
  }

  /* 5. 调整正文排版 */
  .hero-subtitle {
    font-size: 16px !important;
    line-height: 1.8 !important;
    margin-bottom: 15px;
  }

  .hero-description {
    font-size: 14px !important;
    line-height: 1.8 !important;
    text-align: justify; /* 两端对齐，看起来更整齐 */
    /* 手机端把 <br> 去掉效果更好，或者保持现状，看你的喜好 */
  }

  /* 6. 把按钮变成上下排布，方便拇指点击 */
  .hero-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 25px;
  }
  
  .hero-actions .button {
    width: 100%;
    text-align: center;
  }

  /* 7. 隐藏右下角的装饰英文，防止手机端太挤 */
  .hero-symbol {
    display: none !important;
  }
}


/* 世界观 - 通用模块间距 */
.world-section {
  padding: 80px 0;
  border-bottom: 1px solid var(--line);
}

/* ==========================================
   全局基础对齐
   ========================================== */
.codex-stream,
.ladder-axis,
.relic-list {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 24px;
  /* 移除外层的 padding-left，让竖线有空间 */
}

/* 统一的左侧竖线 */
.codex-stream::before,
.ladder-axis::before {
  content: "";
  position: absolute;
  left: 23px;
  top: 20px;
  bottom: 20px;
  width: 2px;
  background: linear-gradient(180deg, var(--blue-bright), var(--muted), transparent);
  z-index: 0; /* 竖线在最底层 */
}

/* ==========================================
   1. 生灵分类
   ========================================== */
.codex-item {
  position: relative;
  padding-left: 80px; /* 让出左侧圆圈的位置 */
  z-index: 1; /* 保证卡片层级比线高 */
}

/* 新增：神的专属颜色（比如亮金色） */
.codex-divine .codex-detail { border-left: 3px solid #ffd700; }
.codex-divine .codex-icon { border-color: #ffd700; color: #ffd700; }

/* 新增：未知的专属颜色（比如科技紫） */
.codex-unknown .codex-detail { border-left: 3px solid #9b59b6; }
.codex-unknown .codex-icon { border-color: #9b59b6; color: #9b59b6; }

.codex-icon {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  font-size: 22px;
  border-radius: 50%;
  /* 关键：实心背景挡住线 */
  background: #0d1117; /* 如果你网页背景是别的深色，请把这里改成对应的色号 */
  border: 2px solid var(--line);
  z-index: 2;
  transition: all 0.3s ease;
}

.codex-item:hover .codex-icon {
  border-color: var(--blue-bright);
  box-shadow: 0 0 15px rgba(184, 212, 227, 0.3);
}

.codex-detail {
  padding: 24px;
  border: 1px solid var(--line);
  background: var(--panel);
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.codex-item:hover .codex-detail {
  border-color: var(--blue);
  transform: translateX(4px);
}

.codex-detail h3 { margin: 0 0 10px; color: var(--blue-bright); font-size: 20px; }
.codex-detail p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.8; }

.codex-innate .codex-detail { border-left: 3px solid #4a9eff; }
.codex-acquired .codex-detail { border-left: 3px solid #2ecc71; }
.codex-mutant .codex-detail { border-left: 3px solid #ff4a4a; }
.codex-god .codex-detail { border-left: 3px solid #f1c40f; }

/* ==========================================
   2. 修炼体系（阶梯）
   ========================================== */
.ladder-node {
  position: relative;
  padding-left: 80px; /* 让出左侧圆圈的位置 */
  display: flex;
  align-items: center;
  z-index: 1;
}

.ladder-label {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  z-index: 2;
  /* 关键：给整个标签容器加实心背景，挡住背后的线 */
  background: #0d1117; /* 记得改成你的网页背景色 */
  padding: 4px 0;
}

.label-ring {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--blue);
  border-radius: 50%;
  color: var(--blue-bright);
  font-size: 16px;
  font-weight: 600;
  background: #0d1117; /* 再次确保纯色 */
}

.ladder-top .label-ring { border-color: var(--blue-bright); background: rgba(184, 212, 227, 0.1); }
.ladder-bottom .label-ring { border-color: var(--muted); color: var(--muted); }
.label-text { color: var(--muted); font-family: Arial, sans-serif; font-size: 10px; letter-spacing: 1px; text-align: center; white-space: nowrap; }

.ladder-card {
  width: 100%;
  padding: 20px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.ladder-card h3 { margin: 0 0 8px; color: var(--white); font-size: 18px; }
.ladder-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }

/* ==========================================
   3. 奇珍异果
   ========================================== */
.relic-item {
  display: flex;
  gap: 20px;
  padding: 20px;
  border: 1px solid var(--line);
  background: var(--panel);
  transition: border-color 0.3s ease;
  position: relative;
  z-index: 1;
}

.relic-item:hover {
  border-color: var(--red-bright);
}

.relic-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  font-size: 24px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,0.2);
}

.relic-info h3 { margin: 0 0 8px; color: var(--red-bright); font-size: 18px; }
.relic-info p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }

@media (max-width: 800px) {
  /* 全局基础防溢出 */
  body {
    font-size: 15px;
    overflow-x: hidden;
  }
  
  img, video, svg {
    max-width: 100%;
    height: auto;
  }

  /* 页面大标题适配 */
  .page-heading h1 {
    font-size: clamp(40px, 10vw, 64px);
    letter-spacing: 4px;
  }

  .page-heading {
    padding: 30px 0;
  }

  /* 内容区域两侧留白 */
  .content-width {
    width: calc(100% - 32px);
    padding: 0 16px;
  }

  /* 引用区块字号缩减 */
  .quote-section blockquote {
    font-size: clamp(18px, 4vw, 24px);
  }
}

@media (max-width: 800px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding-bottom: 80px;
  }

  .feature-card {
    min-height: 220px;
    padding: 20px;
  }

  .feature-card h2 {
    font-size: 20px;
  }
}

@media (max-width: 800px) {
  /* 包裹容器改为纵向排列 */
  .content-wrapper {
    flex-direction: column;
    gap: 1rem;
  }

  /* 侧边栏改为横向滚动按钮组 */
  .faction-sidebar {
    width: 100%;
    order: 1;
    margin-top: 0;
  }

  .faction-sidebar ul {
    display: flex;
    overflow-x: auto;
    gap: 0.5rem;
    padding-bottom: 0.5rem;
  }

  .faction-btn {
    white-space: nowrap;
    margin-bottom: 0;
  }

  /* 人物网格改为2列 */
  .character-grid {
    order: 2;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 20px 0 80px;
  }

  .character-info h2 {
    font-size: 18px;
  }

  /* 弹窗内容改为纵向排列 */
  .lightbox-content {
    grid-template-columns: 1fr;
    max-height: 90vh;
    margin: 10px;
    padding: 0;
  }

  .lightbox-gallery {
    max-height: 40vh;
  }

  .lightbox-image {
    max-height: 40vh;
    aspect-ratio: auto;
  }

  .lightbox-copy {
    padding: 20px;
    overflow-y: auto;
  }
}

@media (max-width: 800px) {
  .faction-row {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 30px 0;
  }

  .faction-side {
    order: -1; /* 图片移至文字上方 */
  }

  .faction-side img {
    min-height: 200px;
    aspect-ratio: 16 / 9;
  }

  .faction-main h2 {
    font-size: 24px;
  }

  .faction-note {
    margin-bottom: 60px;
    padding: 20px;
  }
}

@media (max-width: 800px) {
  .world-section {
    padding: 40px 0;
  }

  .world-intro {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 50px 0;
  }

  /* 生灵分类：缩小左侧图标占位 */
  .codex-item {
    padding-left: 50px;
  }

  .codex-icon {
    width: 36px;
    height: 36px;
    font-size: 18px;
    left: 0;
  }

  .codex-stream::before,
  .ladder-axis::before {
    left: 17px;
  }

  /* 修炼体系：缩小左侧标签占位 */
  .ladder-node {
    padding-left: 50px;
  }

  .ladder-label {
    width: 36px;
  }

  .label-ring {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }

  /* 奇珍异果：改为上下结构 */
  .relic-item {
    flex-direction: column;
    gap: 12px;
  }

  .relic-icon {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 800px) {
  .timeline-interactive {
    padding: 40px 0;
  }

  .timeline-wrapper {
    padding: 0 10px;
  }

  .timeline-line {
    left: 20px;
  }

  .timeline-items {
    gap: 30px;
  }

  /* 强制所有卡片统一为左轴右卡结构 */
  .timeline-item {
    grid-template-columns: 40px 1fr;
  }

  .timeline-item:nth-child(odd) .timeline-card,
  .timeline-item:nth-child(even) .timeline-card {
    grid-column: 2;
    margin-left: 0;
    margin-right: 0;
  }

  .timeline-item:nth-child(odd) .timeline-node,
  .timeline-item:nth-child(even) .timeline-node {
    grid-column: 1;
  }

  .timeline-spacer {
    display: none;
  }

  .timeline-node {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 800px) {
  .story-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px 0 40px;
  }

  /* 主线故事特殊大卡改为上下结构 */
  .story-featured {
    grid-template-columns: 1fr;
  }

  /* 番外故事横向滚动优化 */
  .story-grid-horizontal {
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 1rem;
    padding-bottom: 1.5rem;
    -webkit-overflow-scrolling: touch;
  }

  .story-grid-horizontal .story-card {
    width: 260px;
    flex-shrink: 0;
  }

  /* 故事阅读页排版优化 */
  .reader-content {
    font-size: 16px;
    line-height: 1.9;
  }

  .reader-content p {
    text-indent: 1.5em;
  }
}