/* Home Page Styles for BIOMNIGEM */

/* ========================================
   1. Base Styles & Body Override
   ======================================== */
body {
  min-height: 100vh;
  background: linear-gradient(
    135deg,
    #0a0a2a 0%,
    #1a1a4a 50%,
    #2a0a4a 100%
  ) !important;
  color: #fff !important;
  font-family: "Inter", Arial, sans-serif !important;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

html {
  /* scroll-snap-type: y proximity; */
}

/* ========================================
   2. Container & Layout
   ======================================== */
.destiny-bg {
  background: rgba(30, 41, 59, 0.96);
  border-radius: 1.5rem;
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.15);
  padding: 3rem 2rem;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  perspective: 1000px;
  /* scroll-snap-align: center; */
  /* scroll-snap-stop: always; */
}

.story-block.center {
  padding: 2rem 2rem 2rem 2rem;
  margin-left: auto;
  margin-right: auto;
  align-self: center;
  max-width: 800px;
  /* scroll-snap-align: center; */
  /* scroll-snap-stop: always; */
}

#parallel-stories {
  display: flex;
  flex-direction: column;
  width: 100%;
  position: relative;
}

/* Vertical timeline down the center of the parallel stories */
.vertical-timeline {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 0;
  bottom: 0;
  width: 12px;
  background: linear-gradient(180deg, rgba(96,165,250,0.15), rgba(192,132,252,0.25), rgba(96,165,250,0.15));
  border-radius: 6px;
  opacity: 0.4;
  pointer-events: none;
  z-index: 0;
  box-shadow: 0 0 8px rgba(99,102,241,0.2), 0 0 16px rgba(192,132,252,0.15);
}

/* ========================================
   3. Typography - Gradient Text
   ======================================== */
.gradient-text {
  font-family: 'Inter' !important;
  background: linear-gradient(90deg, #a5f3fc 0%, #c4b5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  line-height: 1.5;
  letter-spacing: 0.02em;
  pointer-events: none;
}

h1.gradient-text {
  font-family: "Inter", Arial, sans-serif;
  font-size: 3.2rem;
  font-weight: 700;
  line-height: 1.5 !important;
  letter-spacing: 0.02em;
  pointer-events: none;
}

h2.gradient-text {
  font-family: "Inter", Arial, sans-serif;
  font-size: 2.1rem;
  font-weight: 600;
  line-height: 1.5 !important;
  letter-spacing: 0.01em;
  pointer-events: none;
}

/* ========================================
   4. Story Blocks & Story Rows
   ======================================== */

/* Story Row Container - 文字和图片并排容器 */
.story-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22rem;
  /* 缩短过大的垂直间距，避免页面底部出现大量空白 */
  margin-bottom: 8rem;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 6rem;
  opacity: 0;
  align-self: center;
  transform: translateY(40px);
  transition: all 0.8s cubic-bezier(0.77, 0, 0.18, 1);
  position: relative; /* for year chips */
  /* scroll-snap-align: center; */
  /* scroll-snap-stop: always; */
}

.story-row.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Year chips beside the center line */
.year-chip {
  position: absolute;
  left: 50%;
  transform: translate(-50%, -50%);
  top: 50%;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.35);
  padding: 6px 10px;
  border-radius: 999px;
  z-index: 2;
  box-shadow: 0 6px 18px rgba(2, 6, 23, 0.35);
}

.year-chip.ai {
  background: rgba(37, 99, 235, 0.25);
  border-color: rgba(96, 165, 250, 0.4);
  color: #bfdbfe;
}

.year-chip.bio {
  background: rgba(168, 85, 247, 0.25);
  border-color: rgba(192, 132, 252, 0.4);
  color: #f3e8ff;
}

/* Responsive adjustments for timeline and chips */
@media (max-width: 1200px) {
  .vertical-timeline { width: 3px; opacity: 0.5; }
  .year-chip { font-size: 0.85rem; }
}

@media (max-width: 992px) {
  /* Hide timeline completely on mobile devices */
  .vertical-timeline { display: none; }
  .year-chip { left: auto; right: 12px; transform: translateY(-50%); }
}

@media (max-width: 576px) {
  .vertical-timeline { display: none; }
  .year-chip { right: 8px; font-size: 0.8rem; padding: 5px 9px; }
}

/* Story Block - 文字内容块 */
.story-block {
  font-family: "Merriweather", serif;
  font-size: 1.22rem;
  line-height: 1.85 !important;
  letter-spacing: 0.02em;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(139, 92, 246, 0.4);
  transition: all 0.6s cubic-bezier(0.77, 0, 0.18, 1);
  margin-top: auto;
  padding: 2.5rem;
  flex: 1;
  min-width: 0;
  max-width: 600px;
  opacity: 0;
  transform: translateY(40px);
}

/* 独立的story-block（不在story-row内的）需要垂直间距 */
#merged-stories > .story-block:not(.center) {
  margin-bottom: 8rem;
}

.story-block.visible {
  opacity: 1;
  transform: translateY(0);
}

.story-block.left {
  /* 左侧块靠左对齐：左侧留白 2rem，右侧自动 */
  margin-left: 2rem;
  margin-right: auto;
}

.story-block.right {
  /* 右侧块靠右对齐：右侧留白 2rem，左侧自动 */
  margin-left: auto;
  margin-right: 2rem;
}

/* 居中的story-block（用于产品介绍等） */
.story-block.center {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.6s cubic-bezier(0.77, 0, 0.18, 1);
  /* 减少中心卡片底部间距以收紧页面 */
  margin-bottom: 6rem;
  margin-left: 4rem;
  margin-right: 4rem;
}

.story-block.center.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-text {
  transition: all 0.6s cubic-bezier(0.77, 0, 0.18, 1);
  opacity: 0;
  transform: translateY(40px);
  position: relative; /* float above timeline */
  z-index: 3;
}

/* Full-screen snap blocks to ensure headline sections snap cleanly */
.snap-full {
  min-height: 80vh; /* leave some breathing room but large enough to isolate */
  display: flex;
  flex-direction: column; /* stack children vertically */
  align-items: center;
  justify-content: center;
  /* scroll-snap-align: center; */
  /* scroll-snap-stop: always; */
  width: 100%;
  gap: 1rem;
}

@media (max-width: 992px) {
  .snap-full { min-height: 70vh; }
}

.fade-in-text.visible {
  opacity: 1;
  transform: translateY(0);
}

#merged-stories {
  display: flex;
  flex-direction: column;
  width: 100%;
}

/* ========================================
   4.5. Story Image Containers & Animations
   ======================================== */

/* Image Container */
.story-image-container {
  flex: 0 0 400px;
  width: 400px;
  height: 300px;
  position: relative;
  overflow: visible;
}

.story-image-container.left {
  order: -1; /* 确保图片在左边 */
}

.story-image-container.right {
  order: 1; /* 确保图片在右边 */
}

/* Story 1 special layout: two diagonally placed images with chain link */
.story-image-container.story1 {
  position: relative;
}

.story1-img {
  width: 200px !important;
  height: auto !important;
  position: absolute;
  z-index: 1;
}

/* computer top-left, parrot bottom-right to form a diagonal */
.story1-img.computer {
  top: 10px;
  left: 10px;
  transform: rotate(-6deg);
}

.story1-img.parrot {
  bottom: 30px;
  right: -200px;
  transform: rotate(6deg);
}

/* Story 5 special layout: two images together, mimic story1-img pattern */
.story-image-container.story5 {
  position: relative;
}

.story5-img {
  width: 200px !important;
  height: auto !important;
  position: absolute;
  z-index: 1;
}

/* chatbox top-left, transformer bottom-right */
.story5-img.chatbox {
  top: 10px;
  right: -200px;
  transform: rotate(-4deg);
}

.story5-img.transformer {
  bottom: 20px;
  left: 10px;
  transform: rotate(5deg);
}

/* Story 4 special layout: two images on the left container */
.story-image-container.story4 {
  position: relative;
}

.story4-img {
  width: 200px !important;
  height: auto !important;
  position: absolute;
  z-index: 1;
}

/* rna top-left, protein bottom-right within left container */
.story4-img.rna {
  top: 10px;
  left: 10px;
  transform: rotate(-4deg);
}

.story4-img.protein {
  bottom: 20px;
  right: -200px;
  transform: rotate(5deg);
}

/* Story 4: add genome overlay, smaller and behind RNA/Protein */
.story4-img.genome {
  width: 160px !important;
  top: auto;
  bottom: 50%;
  left: 50%;
  transform: translate(-50%, 40%) rotate(-2deg);
  opacity: 0.9;
  z-index: 0;
}

/* Image Inline Styling */
.story-image-inline {
  width: 400px;
  height: auto;
  object-fit: cover;
  border-radius: 1rem;
  transition: all 0.6s cubic-bezier(0.77, 0, 0.18, 1);
  position: relative;
}

/* 发光边框效果 - 已禁用 */
.story-image-inline::before {
  display: none;
}

.story-row.visible .story-image-inline::before {
  display: none;
}

/* 悬停效果 */
.story-image-inline:hover {
  transform: scale(1.05) rotate(1deg);
}

.story-image-inline:hover::before {
  display: none;
}

/* 浮动动画 */
.story-row.visible .story-image-inline {
  animation: imageFloatGentle 6s ease-in-out infinite;
}

/* 大图片样式 */
.story-image-inline.large-image {
  width: 600px;
  max-width: 90vw;
}

@keyframes imageFloatGentle {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  25% {
    transform: translateY(-8px) rotate(1deg);
  }
  50% {
    transform: translateY(0) rotate(0deg);
  }
  75% {
    transform: translateY(-8px) rotate(-1deg);
  }
}

@keyframes borderGradientFlow {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* 脉冲发光效果 - 已禁用发光动画 */
.story-row.visible .story-image-inline {
  animation: imageFloatGentle 6s ease-in-out infinite;
}

/* ========================================
   4.6. Fragmented collage (Story 7)
   ======================================== */
.fragmented-collage {
  height: auto;
}

.fragmented-collage .collage-grid {
  position: relative;
  width: 420px;
  height: 320px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: 150px;
  gap: 14px;
  padding: 6px;
}

.fragmented-collage .tile {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255,255,255,0.06);
  border: 1px dashed rgba(148,163,184,0.35);
  box-shadow: 0 10px 24px rgba(2,6,23,0.35);
  transform: rotate(var(--rot, 0deg));
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.fragmented-collage .tile:hover {
  transform: rotate(0deg) scale(1.02);
  box-shadow: 0 16px 36px rgba(2,6,23,0.5);
}

.fragmented-collage .tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.95;
}

.fragmented-collage .tile .label {
  position: absolute;
  bottom: 8px;
  left: 10px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(2,6,23,0.7);
  color: #cbd5e1;
  border: 1px solid rgba(148,163,184,0.25);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* individual rotations to enhance fragmentation */
.fragmented-collage .tile.dna { --rot: -3deg; }
.fragmented-collage .tile.protein { --rot: 2deg; }
.fragmented-collage .tile.expression { --rot: -1deg; }
.fragmented-collage .tile.cell { --rot: 3deg; }
.fragmented-collage .tile.toolui { --rot: -2deg; }
.fragmented-collage .tile.micro { --rot: 1deg; }

@keyframes imagePulseGlow {
  /* 发光动画已禁用 */
  0%, 100% {
    box-shadow: none;
  }
}

/* ========================================
   5. Feature Icons
   ======================================== */
.feature-icon {
  width: 40px;
  height: 40px;
}

.feature-icon.blue {
  color: #60a5fa;
  background-color: transparent !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.feature-icon.purple {
  color: #c084fc;
  background-color: transparent !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ========================================
   6. Clue Lines (Binary & DNA)
   ======================================== */
.clue-line {
  font-family: "Courier New", monospace;
  position: fixed;
  top: 0;
  writing-mode: vertical-rl;
  text-orientation: upright;
  white-space: nowrap;
  opacity: 0.7;
  z-index: 1;
  font-size: 1.2rem;
  pointer-events: none;
  transition: all 0.5s ease;
}

.clue-line.bent {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  writing-mode: initial;
  text-orientation: initial;
}

.clue-line.bent.right {
  align-items: flex-end;
}

.clue-line .vertical-part {
  writing-mode: vertical-rl;
  text-orientation: upright;
  white-space: nowrap;
}

.clue-line .horizontal-part {
  writing-mode: horizontal-tb;
  margin-top: -2px;
  margin-left: 0.5em;
  white-space: nowrap;
  letter-spacing: 3px !important;
}

.clue-line.right .horizontal-part {
  margin-left: 0;
  margin-right: 0.3em;
  letter-spacing: 3px !important;
}

.clue-line.left {
  left: 50px;
  color: #60a5fa;
  text-shadow: 0 0 10px #3b82f6;
}

.clue-line.right {
  right: 50px;
  color: #c084fc;
  text-shadow: 0 0 10px #8b5cf6;
}

.clue-line.merge.left {
  left: calc(50% - 40px);
}

.clue-line.merge.right {
  right: calc(50% - 40px);
}

.blink-slow {
  animation: clueBlink 2s infinite;
}

.blink-fast {
  animation: clueBlinkFast 1s infinite;
}

@keyframes clueBlink {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

@keyframes clueBlinkFast {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 1; }
}

/* ========================================
   7. Scroll Indicator
   ======================================== */
.scroll-indicator {
  animation: bounce 2s infinite;
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0.8;
  z-index: 10;
  pointer-events: none;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-20px); }
  60% { transform: translateY(-10px); }
}

/* ========================================
   8. Shadow Utilities
   ======================================== */
.shadow-blue {
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
}

.shadow-purple {
  box-shadow: 0 4px 20px rgba(168, 85, 247, 0.3);
}

.shadow-indigo {
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
}

/* ========================================
   9. Gradient Button
   ======================================== */
.bg-gradient-btn {
  background: linear-gradient(90deg, #2563eb 0%, #a21caf 100%);
  color: #fff;
  border: none;
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.2);
  transition: background 0.3s, box-shadow 0.3s;
}

.bg-gradient-btn:hover {
  background: linear-gradient(90deg, #1d4ed8 0%, #7c3aed 100%);
  box-shadow: 0 8px 32px rgba(139, 92, 246, 0.4);
}

/* ========================================
   10. DNA Scene Animation
   ======================================== */
#dna-scene {
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translate(-50%, 0);
  width: 160px;
  height: 3000px;
  pointer-events: none;
  z-index: 5;
  overflow: visible;
}

.dna-char {
  position: absolute;
  font-family: monospace;
  font-size: 20px;
  color: cyan;
  text-shadow: 0 0 10px cyan, 0 0 20px blue;
  white-space: pre;
  perspective: 1000px;
  pointer-events: none;
}

.dna-char.purple {
  color: #c084fc;
  text-shadow: 0 0 10px #c084fc, 0 0 20px #8b5cf6;
}

/* ========================================
   11. Product Introduction Card
   ======================================== */
.product-intro-card {
  position: relative;
  background: linear-gradient(135deg, 
    rgba(30, 41, 59, 0.98) 0%, 
    rgba(51, 65, 85, 0.95) 50%, 
    rgba(30, 41, 59, 0.98) 100%);
  border: 2px solid transparent;
  background-clip: padding-box;
  box-shadow: 
    0 20px 60px rgba(139, 92, 246, 0.3),
    0 0 100px rgba(79, 172, 254, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  animation: epicGlow 4s ease-in-out infinite alternate;
  overflow: hidden;
}

.product-intro-card::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, 
    #4facfe 0%, 
    #00f2fe 25%, 
    #a855f7 50%, 
    #3b82f6 75%, 
    #4facfe 100%);
  border-radius: 1rem;
  z-index: -1;
  animation: borderFlow 6s linear infinite;
}

.product-intro-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(255, 255, 255, 0.2) 50%, 
    transparent 100%);
  animation: shimmer 3s ease-in-out infinite;
  z-index: 1;
}

.epic-title {
  position: relative;
  z-index: 2;
  font-size: 3.5rem !important;
  font-weight: 800 !important;
  background: linear-gradient(135deg, 
    #10497b 0%, 
    #fbbf24 25%, 
    #f5c856 50%, 
    #60a5fa 75%, 
    #a855f7 100%);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: epicTextFlow 4s ease-in-out infinite;
  text-shadow: 0 0 30px rgba(79, 172, 254, 0.4);
  letter-spacing: 0.05em;
  line-height: 1.2 !important;
}

.epic-subtitle {
  position: relative;
  z-index: 2;
  font-size: 1.4rem !important;
  color: #e2e8f0;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  animation: subtitlePulse 2s ease-in-out infinite alternate;
  font-weight: 300;
  letter-spacing: 0.08em;
}

@keyframes epicGlow {
  0% {
    box-shadow: 
      0 20px 60px rgba(139, 92, 246, 0.3),
      0 0 100px rgba(79, 172, 254, 0.15),
      inset 0 1px 0 rgba(255, 255, 255, 0.1);
  }
  100% {
    box-shadow: 
      0 30px 80px rgba(139, 92, 246, 0.5),
      0 0 150px rgba(79, 172, 254, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.2);
  }
}

@keyframes borderFlow {
  0% { background-position: 0% 0%; }
  100% { background-position: 400% 400%; }
}

@keyframes shimmer {
  0% { left: -100%; }
  50% { left: -100%; }
  100% { left: 100%; }
}

@keyframes epicTextFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes subtitlePulse {
  0% {
    opacity: 0.8;
    transform: translateY(0px);
  }
  100% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

/* ========================================
   12. Floating Molecules Background
   ======================================== */
.floating-molecules {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.molecule {
  position: absolute;
  opacity: 0.1;
  animation: moleculeFloat 15s infinite linear;
  pointer-events: none;
}

.molecule::before {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  background: radial-gradient(circle, #60a5fa 0%, rgba(96, 165, 250, 0) 70%);
  border-radius: 50%;
  box-shadow: 0 0 20px #60a5fa;
}

.molecule::after {
  content: '';
  position: absolute;
  width: 6px;
  height: 6px;
  background: radial-gradient(circle, #c084fc 0%, rgba(192, 132, 252, 0) 70%);
  border-radius: 50%;
  box-shadow: 0 0 15px #c084fc;
  top: 20px;
  left: 15px;
}

.molecule.large::before {
  width: 12px;
  height: 12px;
}

.molecule.large::after {
  width: 10px;
  height: 10px;
  top: 25px;
  left: 20px;
}

@keyframes moleculeFloat {
  0% {
    transform: translateY(100vh) translateX(0) rotate(0deg);
    opacity: 0;
  }
  10% { opacity: 0.1; }
  90% { opacity: 0.1; }
  100% {
    transform: translateY(-100px) translateX(50px) rotate(360deg);
    opacity: 0;
  }
}

/* ========================================
   13. Starfield Background
   ======================================== */
.starfield {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.star {
  position: absolute;
  background: white;
  border-radius: 50%;
  animation: starTwinkle 3s infinite alternate;
  pointer-events: none;
}

.star.small {
  width: 1px;
  height: 1px;
  box-shadow: 0 0 3px rgba(255, 255, 255, 0.8);
}

.star.medium {
  width: 2px;
  height: 2px;
  box-shadow: 0 0 6px rgba(165, 243, 252, 0.9);
}

.star.large {
  width: 3px;
  height: 3px;
  box-shadow: 0 0 10px rgba(196, 181, 253, 1);
}

@keyframes starTwinkle {
  0% {
    opacity: 0.3;
    transform: scale(1);
  }
  100% {
    opacity: 1;
    transform: scale(1.2);
  }
}

/* ========================================
   14. Neural Network Effect
   ======================================== */
.neural-network {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.neural-node {
  position: absolute;
  width: 6px;
  height: 6px;
  background: radial-gradient(circle, rgba(96, 165, 250, 0.8) 0%, rgba(96, 165, 250, 0) 70%);
  border-radius: 50%;
  animation: nodeGlow 4s infinite alternate;
  pointer-events: none;
}

.neural-node.purple {
  background: radial-gradient(circle, rgba(192, 132, 252, 0.8) 0%, rgba(192, 132, 252, 0) 70%);
}

.neural-connection {
  position: absolute;
  height: 1px;
  background: linear-gradient(90deg, 
    rgba(96, 165, 250, 0) 0%, 
    rgba(96, 165, 250, 0.3) 50%, 
    rgba(96, 165, 250, 0) 100%);
  transform-origin: left center;
  animation: connectionPulse 6s infinite;
  pointer-events: none;
}

.neural-connection.purple {
  background: linear-gradient(90deg, 
    rgba(192, 132, 252, 0) 0%, 
    rgba(192, 132, 252, 0.3) 50%, 
    rgba(192, 132, 252, 0) 100%);
}

@keyframes nodeGlow {
  0% {
    opacity: 0.3;
    transform: scale(1);
    box-shadow: 0 0 5px rgba(96, 165, 250, 0.3);
  }
  100% {
    opacity: 0.8;
    transform: scale(1.5);
    box-shadow: 0 0 15px rgba(96, 165, 250, 0.6);
  }
}

@keyframes connectionPulse {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 0.6; }
}

/* ========================================
   15. Story Image Styling
   ======================================== */
.story-image {
  position: absolute;
  right: -120px;
  top: 50%;
  transform: translateY(-50%);
  width: auto;
  height: auto;
  border-radius: 15px;
  object-fit: cover;
  opacity: 0;
  transition: all 0.8s cubic-bezier(0.77, 0, 0.18, 1);
  box-shadow: 
    0 10px 30px rgba(59, 130, 246, 0.3),
    0 0 20px rgba(59, 130, 246, 0.2);
  border: 2px solid rgba(96, 165, 250, 0.4);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  z-index: 10;
  pointer-events: none;
}

.story-image.vintage {
  filter: sepia(20%) contrast(1.1) brightness(1.05);
  border-color: rgba(96, 165, 250, 0.6);
}

.story-image::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, 
    #60a5fa 0%, 
    #3b82f6 25%, 
    #2563eb 50%, 
    #1d4ed8 75%, 
    #60a5fa 100%);
  border-radius: 17px;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.story-block.visible .story-image {
  opacity: 1;
  transform: translateY(-50%) scale(1);
  animation: imageFloat 4s ease-in-out infinite;
}

.story-block.visible .story-image::before {
  opacity: 0.6;
  animation: imageBorderGlow 3s ease-in-out infinite alternate;
}

.story-image:hover {
  transform: translateY(-50%) scale(1.05) rotate(2deg);
  box-shadow: 
    0 15px 40px rgba(59, 130, 246, 0.4),
    0 0 30px rgba(59, 130, 246, 0.3);
}

@keyframes imageFloat {
  0%, 100% {
    transform: translateY(-50%) translateX(0) rotate(0deg);
  }
  25% {
    transform: translateY(-55%) translateX(2px) rotate(1deg);
  }
  50% {
    transform: translateY(-45%) translateX(0) rotate(0deg);
  }
  75% {
    transform: translateY(-55%) translateX(-2px) rotate(-1deg);
  }
}

@keyframes imageBorderGlow {
  0% {
    opacity: 0.4;
    filter: blur(1px);
  }
  100% {
    opacity: 0.8;
    filter: blur(0px);
  }
}

/* ========================================
   15. Video Showcase Card Styles
   ======================================== */

.video-showcase-card {
  background: rgba(30, 41, 59, 0.95);
  border-radius: 2rem;
  box-shadow: 0 8px 32px rgba(139, 92, 246, 0.2);
  padding: 3rem 2.5rem;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(139, 92, 246, 0.2);
  position: relative;
  overflow: hidden;
  margin: 4rem 0;
}

.video-showcase-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(139, 92, 246, 0.1), rgba(96, 165, 250, 0.1));
  opacity: 0.7;
  z-index: -1;
}

.video-intro-section h2 {
  background: linear-gradient(135deg, #60a5fa, #c084fc, #10b981);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
}

.video-container {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.video-wrapper {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  background: rgba(0, 0, 0, 0.8);
  border-radius: 1.5rem;
  overflow: hidden;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 1.5rem;
}

.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(139, 92, 246, 0.1), rgba(96, 165, 250, 0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 2;
  border-radius: 1.5rem;
}

.video-wrapper:hover .video-overlay {
  opacity: 1;
  pointer-events: auto;
}

/* 当视频正在播放时隐藏覆盖层 */
.video-wrapper.playing .video-overlay {
  opacity: 0 !important;
  pointer-events: none !important;
}

.play-button {
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1e293b;
  font-size: 2rem;
  transform: scale(0.8);
  transition: all 0.3s ease;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  cursor: pointer;
}

.play-button i {
  margin-left: 3px; /* 让播放图标看起来更居中 */
}

.video-wrapper:hover .play-button {
  transform: scale(1);
}





.video-description-section {
  background: rgba(15, 23, 42, 0.6);
  border-radius: 1rem;
  padding: 2rem;
  margin-top: 2rem;
  border: 1px solid rgba(139, 92, 246, 0.1);
}

.video-stat {
  padding: 1rem;
  text-align: center;
}

.video-stat .stat-label {
  font-weight: 600;
  color: #e2e8f0;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}



/* Additional hover effects for video wrapper */
.video-wrapper {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-wrapper:hover {
  box-shadow: 0 15px 50px rgba(139, 92, 246, 0.3);
}



/* ========================================
   16. Responsive Adjustments
   ======================================== */

/* Tablet */
@media (max-width: 1200px) {
  .story-row {
    gap: 8rem;
    padding: 0 4rem;
    margin-bottom: 10rem;
  }
  
  .story-image-container {
    flex: 0 0 300px;
    width: 300px;
    height: 225px;
  }
  
  .story-block {
    font-size: 1.1rem;
    padding: 2rem;
  }
  
  /* 独立的story-block在平板设备上的间距 */
  #merged-stories > .story-block:not(.center) {
    /* 合并故事区卡片底部间距：较紧凑但保留呼吸空间 */
    margin-bottom: 3.5rem;
  }
  
  .story-block.left {
    /* Tablet: 左侧留白 2rem，右侧自动 */
    margin-left: 2rem;
    margin-right: auto;
  }
  
  .story-block.right {
    /* Tablet: 右侧留白 2rem，左侧自动 */
    margin-left: auto;
    margin-right: 2rem;
  }
  .fragmented-collage .collage-grid { width: 360px; height: 280px; gap: 12px; }
}

/* Mobile */
@media (max-width: 992px) {
  .story-row {
    flex-direction: column;
    gap: 3rem;
    margin-bottom: 8rem;
    padding: 0 2rem;
  }
  
  .story-image-container {
    flex: 0 0 auto;
    width: 100%;
    max-width: 500px;
    height: auto;
    aspect-ratio: 4/3;
    order: 1 !important; /* 图片始终在下方 */
  }
  
  .story-block {
    max-width: 100%;
    order: 0 !important; /* 文字始终在上方 */
  }
  /* html { scroll-snap-type: y mandatory; } */
  
  /* 独立的story-block在移动设备上的间距 */
  #merged-stories > .story-block:not(.center) {
    margin-bottom: 5rem;
  }
  
  .story-block.left,
  .story-block.right {
    margin-left: 1rem;
    margin-right: 1rem;
  }
  .story1-img.parrot,
  .story5-img.chatbox,
  .story4-img.protein {
    right: -60px;
    transform: rotate(3deg) scale(0.95);
  }
  .fragmented-collage .collage-grid { width: 100%; height: auto; grid-auto-rows: 140px; gap: 12px; }
}

@media (max-width: 768px) {
  .story-row {
    padding: 0 1rem;
    margin-bottom: 6rem;
  }
  
  .story-block {
    font-size: 1rem;
    padding: 1.5rem;
  }
  
  /* 独立的story-block在小屏幕上的间距 */
  #merged-stories > .story-block:not(.center) {
    margin-bottom: 4rem;
  }
  
  .story-block.left,
  .story-block.right {
    margin-left: 0.5rem;
    margin-right: 0.5rem;
  }
  .story1-img.parrot,
  .story5-img.chatbox,
  .story4-img.protein {
    right: -36px;
    transform: rotate(2deg) scale(0.92);
  }
  .fragmented-collage .collage-grid { grid-auto-rows: 120px; gap: 10px; }
}

@media (max-width: 576px) {
  .story-block {
    padding: 1.2rem;
  }
  
  /* 独立的story-block在极小屏幕上的间距 */
  #merged-stories > .story-block:not(.center) {
    margin-bottom: 3rem;
  }
  
  .story-block.left,
  .story-block.right {
    margin-left: 0.3rem;
    margin-right: 0.3rem;
  }
  .story1-img.parrot,
  .story5-img.chatbox,
  .story4-img.protein {
    right: -24px;
    transform: rotate(2deg) scale(0.9);
  }
  .fragmented-collage .collage-grid { grid-auto-rows: 100px; gap: 8px; }
}

@media (max-width: 992px) {
  h1.gradient-text {
    font-size: 2.5rem;
  }
  
  h2.gradient-text {
    font-size: 1.8rem;
  }
  
  /* Video card responsive adjustments */
  .video-showcase-card {
    padding: 2rem 1.5rem;
    margin: 2rem 0;
    border-radius: 1.5rem;
  }
  
  .video-intro-section h2 {
    font-size: 1.8rem;
  }
  
  .video-intro-section p {
    font-size: 1rem;
  }
  
  .video-container {
    max-width: 100%;
  }
  
  .video-description-section {
    padding: 1.5rem;
  }
  
  .video-description-section .row {
    text-align: center;
  }
  
  .video-stat {
    padding: 0.8rem;
  }
  
  .play-button {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  }
  
  .play-button i {
    margin-left: 2px;
  }
}

/* Extra small devices */
@media (max-width: 576px) {
  .video-showcase-card {
    padding: 1.5rem 1rem;
    margin: 1.5rem 0;
  }
  
  .video-intro-section h2 {
    font-size: 1.5rem;
  }
  
  .video-intro-section p {
    font-size: 0.95rem;
  }
  
  .video-description-section {
    padding: 1rem;
  }
  
  .video-stat {
    padding: 0.5rem;
  }
  
  .video-stat .stat-label {
    font-size: 0.8rem;
  }
}

