/**
 * 模板 · 3D 彩虹光谱 (3D Rainbow Spectrum & Chromatic Dispersion)
 * 尔湾云 (erwancloud.lol) 专属棱镜色散与彩虹光谱动效系统
 */

:root {
  --spectrum-violet: #8a2be2;
  --spectrum-indigo: #4b0082;
  --spectrum-blue: #0070f3;
  --spectrum-cyan: #00dfd8;
  --spectrum-green: #00ff88;
  --spectrum-yellow: #ffdf00;
  --spectrum-orange: #ff7700;
  --spectrum-red: #ff0055;
  --spectrum-gradient-full: linear-gradient(
    135deg,
    #ff0055 0%,
    #ff7700 15%,
    #ffdf00 30%,
    #00ff88 48%,
    #00dfd8 65%,
    #0070f3 82%,
    #8a2be2 100%
  );
}

/* 3D 彩虹光谱 Canvas 画布容器 */
.rainbow-spectrum-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 3;
  overflow: hidden;
}

#rainbow-spectrum-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.85;
  mix-blend-mode: screen;
}

/* 棱镜折射光晕 (Prismatic Refraction Halo) */
.prismatic-halo {
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 550px;
  height: 240px;
  background: radial-gradient(ellipse at center, rgba(0, 223, 216, 0.25) 0%, rgba(255, 0, 85, 0.2) 45%, rgba(138, 43, 226, 0.15) 70%, transparent 80%);
  filter: blur(40px);
  pointer-events: none;
  z-index: 2;
  animation: prismPulse 6s ease-in-out infinite alternate;
}

@keyframes prismPulse {
  0% {
    transform: translate(-50%, -50%) scale(0.92) rotate(-3deg);
    opacity: 0.65;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.1) rotate(3deg);
    opacity: 0.95;
  }
}

/* 彩虹光谱动态流光文字 */
.rainbow-spectrum-text {
  background: var(--spectrum-gradient-full);
  background-size: 260% 260%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: spectrumFlow 5s ease infinite alternate;
  display: inline-block;
  filter: drop-shadow(0 0 16px rgba(0, 223, 216, 0.45));
}

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

/* 3D 彩虹光谱高能行动按钮 (Rainbow CTA Button) */
.btn-rainbow-spectrum {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 34px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff !important;
  text-decoration: none;
  background: #090314;
  border-radius: 50px;
  z-index: 1;
  overflow: hidden;
  box-shadow: 
    0 8px 25px rgba(255, 0, 85, 0.35),
    0 0 20px rgba(0, 223, 216, 0.35);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  border: none;
  cursor: pointer;
}

.btn-rainbow-spectrum::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: var(--spectrum-gradient-full);
  background-size: 300% 300%;
  border-radius: 52px;
  z-index: -1;
  animation: spectrumBorderFlow 4s linear infinite;
  transition: opacity 0.3s ease;
}

.btn-rainbow-spectrum::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  right: 2px;
  bottom: 2px;
  background: linear-gradient(135deg, #130728 0%, #200b3e 100%);
  border-radius: 48px;
  z-index: -1;
  transition: background 0.3s ease;
}

.btn-rainbow-spectrum:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 
    0 12px 35px rgba(255, 0, 85, 0.6),
    0 0 35px rgba(0, 223, 216, 0.6);
}

.btn-rainbow-spectrum:hover::after {
  background: linear-gradient(135deg, rgba(32, 11, 62, 0.85) 0%, rgba(45, 12, 85, 0.85) 100%);
}

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

/* 棱镜光谱边缘高光卡片 (Prism Iridescent Card) */
.prism-spectrum-card {
  position: relative;
  border: 1px solid transparent;
  background: linear-gradient(#120727, #120727) padding-box,
              var(--spectrum-gradient-full) border-box;
  background-size: 200% 200%;
  animation: spectrumBorderFlow 8s ease infinite alternate;
}

/* 彩虹条形色散刻度 */
.spectrum-bar-indicator {
  display: flex;
  height: 4px;
  width: 100%;
  border-radius: 2px;
  overflow: hidden;
  margin: 12px 0;
}

.spectrum-bar-indicator span {
  flex: 1;
  height: 100%;
}
.spectrum-bar-indicator span:nth-child(1) { background: #ff0055; }
.spectrum-bar-indicator span:nth-child(2) { background: #ff7700; }
.spectrum-bar-indicator span:nth-child(3) { background: #ffdf00; }
.spectrum-bar-indicator span:nth-child(4) { background: #00ff88; }
.spectrum-bar-indicator span:nth-child(5) { background: #00dfd8; }
.spectrum-bar-indicator span:nth-child(6) { background: #0070f3; }
.spectrum-bar-indicator span:nth-child(7) { background: #8a2be2; }
