/* ========== 按钮主体 ========== */
.nav-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #EEF2FF 0%, #F0F3FF 100%);
  cursor: pointer;
  outline: none;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  box-shadow:
    0 0 0 1px rgba(46,80,250,0.15),
    0 2px 8px rgba(46,80,250,0.1),
    0 4px 16px rgba(28,100,253,0.08),
    inset 0 1px 0 rgba(255,255,255,0.6);
}
.nav-btn span {
  vertical-align: initial !important;
}
/* 流光边框 */
.nav-btn::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 9px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(46,80,250,0.4), rgba(28,100,253,0.15), rgba(46,80,250,0.4), rgba(28,100,253,0.15));
  background-size: 300% 300%;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: borderFlow 4s ease infinite;
  opacity: 0.6;
  transition: opacity 0.4s ease;
}
/* 扫光 */
.nav-btn::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(
    105deg,
    transparent 20%,
    rgba(46,80,250,0.05) 40%,
    rgba(46,80,250,0.1) 50%,
    rgba(46,80,250,0.05) 60%,
    transparent 80%
  );
  animation: shimmer 3.5s ease-in-out infinite;
}
.nav-btn:hover {
  transform: translateY(-1px);
  box-shadow:
    0 0 0 1px rgba(46,80,250,0.35),
    0 4px 20px rgba(46,80,250,0.2),
    0 8px 32px rgba(28,100,253,0.12),
    inset 0 1px 0 rgba(255,255,255,0.8);
}
.nav-btn:hover::before { opacity: 1; }
.nav-btn:hover .btn-icon {
  transform: scale(1.1);
  filter: drop-shadow(0 0 6px rgba(46,80,250,0.4));
}
.nav-btn:active {
  transform: translateY(0) scale(0.98);
  transition-duration: 0.1s;
}
/* ========== 图标 ========== */
.btn-icon {
  position: relative;
  z-index: 1;
  width: 30px; height: 30px;
  flex-shrink: 0;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  animation: robotFloat 2s ease-in-out infinite;
}
.btn-icon svg { width: 100%; height: 100%; }
/* 天线球脉冲 */
.btn-icon svg circle:nth-child(2),
.btn-icon svg circle:nth-child(4) {
  animation: antennaPulse 1.8s ease-in-out infinite;
}
/* 天线球2延迟 */
.btn-icon svg circle:nth-child(4) {
  animation-delay: 0.9s;
}
/* 眨眼效果 */
.robot-eyes {
  animation: eyeBlink 3.5s ease-in-out infinite;
  transform-origin: center;
}
/* ========== 固定标签 ========== */
.btn-label {
  position: relative;
  z-index: 1;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.5px;
  color: #1a2b5f;
  white-space: nowrap;
  transition: color 0.3s ease;
}
.btn-label .highlight {
  color: #2E50FA;
  font-weight: 700;
}
/* ========== 电影字幕翻动区域 ========== */
.subtitle-stage {
  position: relative;
  z-index: 1;
  display: inline-flex !important;
  align-items: center;
  height: 20px;
  overflow: hidden;
  width: 162px;
  margin-left: 1px;
}
.subtitle-track {
  position: relative;
  width: 100%;
  height: 100%;
}
/* 每一行字幕 */
.subtitle-line {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  display: flex !important;
  align-items: center;
  height: 20px;
  line-height: 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(0);
  pointer-events: none;
}
/* 统一深蓝色（浅色按钮上可见） */
.subtitle-line {
  color: rgba(26, 43, 95, 0.95);
}
/* 单字容器 */
.subtitle-line .char {
  display: inline-block !important;
  opacity: 0;
  transform: rotateX(90deg) translateY(-4px);
  transition: none;
}
/* 入场：每个字依次翻入 */
.subtitle-line.entering .char {
  animation: charEnter 0.45s cubic-bezier(0.23, 1, 0.32, 1) forwards;
  animation-delay: calc(var(--i) * 60ms);
}
/* 退场：每个字依次翻出 */
.subtitle-line.exiting .char {
  animation: charExit 0.35s cubic-bezier(0.55, 0, 1, 0.45) forwards;
  animation-delay: calc(var(--i) * 40ms);
}
/* 整行淡入（用于首次显示） */
.subtitle-line.visible {
  opacity: 1;
}
.subtitle-line.visible .char {
  opacity: 1;
  transform: rotateX(0deg) translateY(1px);
}
/* ========== 关键帧 ========== */
@keyframes charEnter {
  0% {
    opacity: 0;
    transform: rotateX(90deg) translateY(-6px) scale(0.8);
    filter: blur(2px);
  }
  60% {
    opacity: 1;
    transform: rotateX(-10deg) translateY(1px) scale(1);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: rotateX(0deg) translateY(1px) scale(1);
    filter: blur(0);
  }
}
@keyframes charExit {
  0% {
    opacity: 1;
    transform: rotateX(0deg) translateY(1px) scale(1);
    filter: blur(0);
  }
  40% {
    opacity: 0.6;
    transform: rotateX(40deg) translateY(1px) scale(1);
  }
  100% {
    opacity: 0;
    transform: rotateX(-90deg) translateY(8px) scale(0.8);
    filter: blur(3px);
  }
}
@keyframes borderFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes shimmer {
  0% { left: -100%; }
  40% { left: 140%; }
  100% { left: 140%; }
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.75); }
}
/* ========== 机器人动画 ========== */
@keyframes robotFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
@keyframes antennaPulse {
  0%, 100% { r: 1.2; opacity: 0.8; filter: drop-shadow(0 0 1px rgba(0,212,170,0.4)); }
  50% { r: 2.0; opacity: 1; filter: drop-shadow(0 0 4px rgba(0,212,170,0.9)); }
}
@keyframes eyeBlink {
  0%, 42%, 48%, 100% { transform: scaleY(1); }
  45% { transform: scaleY(0.1); }
}
/* ========== 进度条 ========== */
.progress-bar {
  position: absolute;
  bottom: 0; left: 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(46,80,250,0.6), rgba(28,100,253,0.8));
  border-radius: 0 1px 1px 0;
  opacity: 0.8;
  transition: width 0.3s linear;
}