﻿/* ========================================
   Roadmap - 高端黑金主题
   ======================================== */

.roadmap {
  position: relative;
  background:
    radial-gradient(ellipse at bottom, #1a1202 0%, #000000 50%),
    linear-gradient(135deg, #000000 0%, #0a0a0a 25%, #1a1202 75%, #2d2409 100%);
  padding: 120px 24px;
  overflow: hidden;
}

.roadmap::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 25% 20%, rgba(212, 175, 55, 0.06), transparent 40%),
    radial-gradient(circle at 75% 80%, rgba(255, 215, 0, 0.04), transparent 45%),
    repeating-linear-gradient(90deg, rgba(212, 175, 55, 0.02) 0 1px, transparent 1px 50px),
    repeating-linear-gradient(0deg, rgba(255, 215, 0, 0.015) 0 1px, transparent 1px 45px),
    repeating-linear-gradient(45deg, rgba(212, 175, 55, 0.015) 0 1px, transparent 1px 70px);
  pointer-events: none;
  animation: gridRotate 30s linear infinite;
}

@keyframes gridRotate {
  0% {
    transform: rotate(0deg) scale(1);
  }

  100% {
    transform: rotate(360deg) scale(1.1);
  }
}

.roadmap__content {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
}

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

.roadmap__title {
  margin: 0 0 16px;
  font-family: Orbitron, "Space Grotesk", Inter, sans-serif;
  font-weight: 900;
  font-size: clamp(36px, 5vw, 64px);
  letter-spacing: 0.1em;
  background: linear-gradient(135deg, #ffd700 0%, #d4af37 25%, #ffed4e 50%, #d4af37 75%, #ffd700 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% 100%;
  animation: goldShine 4s linear infinite, roadmapGlow 2.5s ease-in-out infinite;
  position: relative;
}

@keyframes goldShine {
  0% {
    background-position: 200% center;
  }

  100% {
    background-position: -200% center;
  }
}

@keyframes roadmapGlow {

  0%,
  100% {
    filter: drop-shadow(0 0 20px rgba(212, 175, 55, 0.4));
  }

  50% {
    filter: drop-shadow(0 0 35px rgba(212, 175, 55, 0.7));
  }
}

.roadmap__subtitle {
  margin: 0 0 24px;
  font-weight: 700;
  font-size: clamp(20px, 2.5vw, 28px);
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.roadmap__description {
  margin: 0;
  font-size: clamp(16px, 1.9vw, 19px);
  font-weight: 500;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.85);
  max-width: 750px;
  margin: 0 auto;
}

.roadmap__timeline {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 0;
}

.roadmap__line {
  position: absolute;
  top: 60px;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg,
      transparent 0%,
      rgba(212, 175, 55, 0.2) 15%,
      #d4af37 50%,
      rgba(212, 175, 55, 0.2) 85%,
      transparent 100%);
  border-radius: 999px;
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 2.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 1.5s ease;
  box-shadow:
    0 0 20px rgba(212, 175, 55, 0.4),
    0 0 40px rgba(212, 175, 55, 0.2);
}

.roadmap__line.fi-in {
  opacity: 1;
  transform: scaleX(1);
}

.roadmap__node {
  position: relative;
  flex: 1;
  text-align: center;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s ease, transform 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.roadmap__node.fi-in {
  opacity: 1;
  transform: translateY(0);
}

.roadmap__node:nth-child(1) {
  transition-delay: 0.1s;
}

.roadmap__node:nth-child(2) {
  transition-delay: 0.2s;
}

.roadmap__node:nth-child(3) {
  transition-delay: 0.3s;
}

.roadmap__node:nth-child(4) {
  transition-delay: 0.4s;
}

.roadmap__node:nth-child(5) {
  transition-delay: 0.5s;
}

.roadmap__node-dot {
  position: relative;
  width: 28px;
  height: 28px;
  margin: 0 auto 28px;
  background: linear-gradient(135deg, #ffd700 0%, #d4af37 100%);
  border-radius: 50%;
  box-shadow:
    0 0 20px rgba(212, 175, 55, 0.6),
    0 0 40px rgba(212, 175, 55, 0.3),
    inset 0 2px 8px rgba(255, 255, 255, 0.3);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.roadmap__node-dot::before {
  content: "";
  position: absolute;
  inset: -10px;
  border: 2px solid rgba(212, 175, 55, 0.4);
  border-radius: 50%;
  animation: roadmapPulse 2.5s ease-in-out infinite;
}

.roadmap__node-dot::after {
  content: "";
  position: absolute;
  inset: -6px;
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 50%;
  animation: roadmapPulse 2.5s ease-in-out infinite 0.5s;
}

@keyframes roadmapPulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.8);
    opacity: 0;
  }
}

.roadmap__node:hover .roadmap__node-dot {
  transform: scale(1.3);
  box-shadow:
    0 0 35px rgba(212, 175, 55, 0.9),
    0 0 60px rgba(212, 175, 55, 0.5),
    inset 0 2px 12px rgba(255, 255, 255, 0.5);
}

.roadmap__node-content {
  position: relative;
  z-index: 2;
  padding: 20px;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.6) 0%, rgba(10, 10, 10, 0.4) 100%);
  border: 1px solid rgba(212, 175, 55, 0.15);
  border-radius: 16px;
  backdrop-filter: blur(10px);
  transition: all 0.4s ease;
}

.roadmap__node:hover .roadmap__node-content {
  border-color: rgba(212, 175, 55, 0.4);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.6),
    0 0 20px rgba(212, 175, 55, 0.2);
  transform: translateY(-4px);
}

.roadmap__node-time {
  font-family: Orbitron, "Space Grotesk", Inter, sans-serif;
  font-weight: 800;
  font-size: 15px;
  color: #d4af37;
  text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
  margin-bottom: 12px;
  letter-spacing: 0.08em;
}

.roadmap__node-title {
  margin: 0 0 10px;
  font-family: "Space Grotesk", Orbitron, Inter, sans-serif;
  font-weight: 700;
  font-size: clamp(17px, 2vw, 21px);
  color: rgba(255, 255, 255, 0.95);
}

.roadmap__node-desc {
  margin: 0;
  font-size: clamp(14px, 1.5vw, 16px);
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.5;
}

.roadmap__tooltip {
  position: absolute;
  bottom: calc(100% + 20px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 16px;
  padding: 20px;
  min-width: 300px;
  max-width: 400px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow:
    0 0 35px rgba(212, 175, 55, 0.25),
    0 20px 50px rgba(0, 0, 0, 0.8);
  z-index: 20;
}

.roadmap__tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 10px solid transparent;
  border-top-color: rgba(212, 175, 55, 0.4);
}

.roadmap__node:hover .roadmap__tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-10px);
}

.roadmap__tooltip h5 {
  margin: 0 0 12px;
  font-family: "Space Grotesk", Orbitron, Inter, sans-serif;
  font-weight: 700;
  font-size: 17px;
  color: #d4af37;
  text-shadow: 0 0 10px rgba(212, 175, 55, 0.4);
}

.roadmap__tooltip p {
  margin: 0 0 10px;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
}

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

/* ========================================
   移动端火箭发射轨迹效果 (< 900px)
   ======================================== */

@media (max-width: 900px) {
  .roadmap {
    padding: 70px 18px;
    background:
      radial-gradient(ellipse at center, #1a1202 0%, #000000 70%),
      #000000;
  }

  /* 移动端星光背景 */
  .roadmap::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
      radial-gradient(2px 2px at 20px 30px, rgba(255, 215, 0, 0.6), transparent),
      radial-gradient(2px 2px at 60px 70px, rgba(212, 175, 55, 0.5), transparent),
      radial-gradient(1px 1px at 50px 50px, rgba(255, 255, 255, 0.7), transparent),
      radial-gradient(1px 1px at 130px 80px, rgba(255, 215, 0, 0.4), transparent),
      radial-gradient(2px 2px at 90px 10px, rgba(212, 175, 55, 0.6), transparent);
    background-size: 200px 200px;
    background-position: 0 0;
    animation: starsFloat 60s linear infinite;
    pointer-events: none;
    opacity: 0.8;
  }

  @keyframes starsFloat {
    0% {
      background-position: 0 0;
    }

    100% {
      background-position: 0 1000px;
    }
  }

  .roadmap__header {
    margin-bottom: 50px;
  }

  .roadmap__title {
    font-size: clamp(32px, 8vw, 48px);
  }

  .roadmap__subtitle {
    font-size: clamp(18px, 4vw, 24px);
  }

  .roadmap__description {
    font-size: 15px;
    padding: 0 8px;
  }

  /* 垂直时间线容器 */
  .roadmap__timeline {
    flex-direction: column-reverse;
    /* 从下往上 */
    align-items: center;
    gap: 0;
    padding: 80px 0 40px;
    max-width: 500px;
  }

  /* 火箭轨迹线 */
  .roadmap__line {
    top: 0;
    bottom: 0;
    left: 28px;
    right: auto;
    width: 5px;
    height: 100%;
    background: linear-gradient(180deg,
        rgba(255, 215, 0, 0.8) 0%,
        #d4af37 20%,
        #d4af37 80%,
        rgba(212, 175, 55, 0.3) 100%);
    transform: scaleY(0);
    transform-origin: bottom;
    /* 从下往上生长 */
    border-radius: 999px;
    box-shadow:
      0 0 25px rgba(212, 175, 55, 0.6),
      0 0 50px rgba(212, 175, 55, 0.3),
      inset 0 0 10px rgba(255, 215, 0, 0.4);
    transition: transform 3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  /* 轨迹线粒子效果 */
  .roadmap__line::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    background: #ffd700;
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.9);
    animation: rocketTrail 3s linear infinite;
    opacity: 0;
  }

  .roadmap__line.fi-in::before {
    opacity: 1;
  }

  @keyframes rocketTrail {
    0% {
      top: 100%;
      opacity: 0;
    }

    10% {
      opacity: 1;
    }

    90% {
      opacity: 1;
    }

    100% {
      top: 0%;
      opacity: 0;
    }
  }

  .roadmap__line.fi-in {
    transform: scaleY(1);
  }

  /* 太空站节点容器 */
  .roadmap__node {
    width: 100%;
    max-width: 500px;
    padding-left: 80px;
    margin-bottom: 60px;
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .roadmap__node:last-child {
    margin-bottom: 0;
  }

  /* 节点依次点亮 */
  .roadmap__node:nth-child(2) {
    /* 注意：因为line是第1个子元素 */
    transition-delay: 0.6s;
  }

  .roadmap__node:nth-child(3) {
    transition-delay: 0.9s;
  }

  .roadmap__node:nth-child(4) {
    transition-delay: 1.2s;
  }

  .roadmap__node:nth-child(5) {
    transition-delay: 1.5s;
  }

  .roadmap__node:nth-child(6) {
    transition-delay: 1.8s;
  }

  .roadmap__node.fi-in {
    opacity: 1;
    transform: translateX(0);
  }

  /* 太空站圆点 */
  .roadmap__node-dot {
    position: absolute;
    left: 14px;
    top: 0;
    width: 32px;
    height: 32px;
    margin: 0;
    background: linear-gradient(135deg, #ffd700 0%, #d4af37 100%);
    box-shadow:
      0 0 25px rgba(255, 215, 0, 0.8),
      0 0 50px rgba(212, 175, 55, 0.5),
      inset 0 2px 10px rgba(255, 255, 255, 0.4);
    z-index: 2;
  }

  .roadmap__node-dot::before,
  .roadmap__node-dot::after {
    border-color: rgba(255, 215, 0, 0.6);
  }

  /* 点击前状态 - 未激活 */
  .roadmap__node:not(.is-active) .roadmap__node-dot {
    opacity: 0.6;
    box-shadow:
      0 0 15px rgba(212, 175, 55, 0.5),
      0 0 30px rgba(212, 175, 55, 0.3);
  }

  /* 节点内容卡片 */
  .roadmap__node-content {
    padding: 18px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.85) 0%, rgba(15, 12, 0, 0.75) 100%);
    border: 1.5px solid rgba(212, 175, 55, 0.25);
    border-radius: 14px;
    text-align: left;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .roadmap__node-content::before {
    content: "";
    position: absolute;
    top: 50%;
    left: -20px;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-right: 12px solid rgba(212, 175, 55, 0.25);
    transition: border-color 0.4s ease;
  }

  /* 点击反馈 */
  .roadmap__node-content:active {
    transform: scale(0.97);
  }

  /* 激活状态 - 展开 */
  .roadmap__node.is-active .roadmap__node-dot {
    opacity: 1;
    transform: scale(1.2);
    box-shadow:
      0 0 35px rgba(255, 215, 0, 1),
      0 0 70px rgba(212, 175, 55, 0.7),
      inset 0 2px 15px rgba(255, 255, 255, 0.6);
  }

  .roadmap__node.is-active .roadmap__node-content {
    border-color: rgba(255, 215, 0, 0.6);
    box-shadow:
      0 10px 40px rgba(0, 0, 0, 0.8),
      0 0 35px rgba(212, 175, 55, 0.3),
      inset 0 0 25px rgba(212, 175, 55, 0.08);
    background: linear-gradient(135deg, rgba(26, 18, 2, 0.95) 0%, rgba(45, 36, 9, 0.9) 100%);
  }

  .roadmap__node.is-active .roadmap__node-content::before {
    border-right-color: rgba(255, 215, 0, 0.6);
  }

  .roadmap__node.is-active .roadmap__node-time {
    color: #ffd700;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.7);
  }

  .roadmap__node.is-active .roadmap__node-title {
    color: #fff;
  }

  /* 详情内容 */
  .roadmap__tooltip {
    position: relative;
    margin-left: -80px;
    /* 抵消父容器的padding-left */
    width: calc(100vw - 36px);
    /* 屏幕宽度减去左右padding */
    max-width: 500px;
    /* 最大宽度限制 */
    opacity: 0;
    visibility: hidden;
    max-height: 0;
    transform: none;
    margin-top: 0;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    overflow: hidden;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .roadmap__tooltip::after {
    display: none;
  }

  .roadmap__node.is-active .roadmap__tooltip {
    opacity: 1 !important;
    visibility: visible !important;
    max-height: 500px !important;
    margin-top: 16px;
    padding: 18px;
    background: rgba(15, 12, 0, 0.8);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 12px;
    overflow: visible;
    box-shadow:
      0 8px 25px rgba(0, 0, 0, 0.5),
      inset 0 0 15px rgba(212, 175, 55, 0.05);
  }

  .roadmap__tooltip h5 {
    font-size: 16px;
    margin-bottom: 10px;
    color: #ffd700;
  }

  .roadmap__tooltip p {
    font-size: 14px;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.85);
  }



  @keyframes rocketShake {

    0%,
    100% {
      transform: translateY(0) rotate(0deg);
    }

    25% {
      transform: translateY(-3px) rotate(-2deg);
    }

    75% {
      transform: translateY(-3px) rotate(2deg);
    }
  }


  @keyframes starTwinkle {

    0%,
    100% {
      transform: scale(1);
      opacity: 1;
    }

    50% {
      transform: scale(1.2);
      opacity: 0.8;
    }
  }
}

/* ========================================
   手机端优化 (< 768px)
   ======================================== */

@media (max-width: 768px) {
  .roadmap {
    padding: 60px 16px;
  }

  .roadmap__timeline {
    padding: 70px 0 30px;
    max-width: 100%;
  }

  .roadmap__node {
    padding-left: 70px;
    margin-bottom: 50px;
  }

  .roadmap__node-content {
    padding: 16px;
  }

  .roadmap__tooltip {
    margin-left: -70px;
    /* 抵消父容器的padding-left (768px时为70px) */
    width: calc(100vw - 32px);
    /* 屏幕宽度减去左右padding */
    max-width: 500px;
    /* 最大宽度限制 */
  }

  .roadmap__node.is-active .roadmap__tooltip {
    padding: 16px;
    max-height: 500px !important;
    overflow: visible;
  }
}

/* ========================================
   小屏手机优化 (< 480px)
   ======================================== */

@media (max-width: 480px) {
  .roadmap {
    padding: 50px 12px;
  }

  .roadmap__title {
    font-size: clamp(28px, 9vw, 40px);
  }

  .roadmap__subtitle {
    font-size: 16px;
  }

  .roadmap__description {
    font-size: 14px;
  }

  .roadmap__timeline {
    padding: 60px 0 20px;
  }

  .roadmap__node {
    padding-left: 60px;
    margin-bottom: 45px;
  }

  .roadmap__line {
    left: 22px;
    width: 4px;
  }

  .roadmap__node-dot {
    left: 8px;
    width: 28px;
    height: 28px;
  }

  .roadmap__node-content {
    padding: 14px;
    border-radius: 12px;
  }

  .roadmap__tooltip {
    margin-left: -60px;
    /* 抵消父容器的padding-left (480px时为60px) */
    width: calc(100vw - 24px);
    /* 屏幕宽度减去左右padding */
    max-width: 450px;
    /* 最大宽度限制 */
  }

  .roadmap__node-time {
    font-size: 13px;
    margin-bottom: 8px;
  }

  .roadmap__node-title {
    font-size: 16px;
    margin-bottom: 8px;
  }

  .roadmap__node-desc {
    font-size: 13px;
  }

  .roadmap__node.is-active .roadmap__tooltip {
    padding: 14px;
    margin-top: 12px;
    max-height: 500px !important;
    overflow: visible;
  }

  .roadmap__tooltip h5 {
    font-size: 15px;
    margin-bottom: 8px;
  }

  .roadmap__tooltip p {
    font-size: 13px;
  }

  .roadmap__timeline::before,
  .roadmap__timeline::after {
    font-size: 32px;
  }

  .roadmap__timeline::before {
    bottom: 10px;
    left: 2px;
  }

  .roadmap__timeline::after {
    left: 2px;
  }
}

/* ========================================
   触摸设备优化
   ======================================== */

@media (hover: none) and (pointer: coarse) {

  /* 移动端禁用桌面悬停效果 */
  .roadmap__node:hover .roadmap__node-dot {
    transform: none;
  }

  .roadmap__node:hover .roadmap__node-content {
    transform: none;
    box-shadow: none;
  }

  .roadmap__node:hover .roadmap__tooltip {
    opacity: 0;
    visibility: hidden;
  }
}

/* ========================================
   动画性能优化
   ======================================== */

@media (prefers-reduced-motion: reduce) {
  .roadmap::before {
    animation: none;
  }

  .roadmap::after {
    animation: none;
  }

  .roadmap__title {
    animation: none;
  }

  .roadmap__line::before {
    animation: none;
  }

  .roadmap__node-dot::before,
  .roadmap__node-dot::after {
    animation: none;
  }

  .roadmap__timeline::before,
  .roadmap__timeline::after {
    animation: none;
  }
}