/* VerityBench Enhanced Animations & Visual Effects */

/* 语言切换按钮样式 */
.lang-switcher {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  gap: 8px;
  padding: 8px;
  background: rgba(22, 29, 24, 0.95);
  border: 1px solid rgba(198, 243, 107, 0.3);
  border-radius: 50px;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  animation: slideInFromRight 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.lang-switcher button {
  min-width: 44px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 50px;
  background: transparent;
  color: #aab2ad;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
  position: relative;
  overflow: hidden;
}

.lang-switcher button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(198, 243, 107, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.4s, height 0.4s;
}

.lang-switcher button:hover::before {
  width: 100px;
  height: 100px;
}

.lang-switcher button.active {
  background: var(--accent);
  color: var(--dark);
  border-color: var(--accent);
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(198, 243, 107, 0.4);
}

.lang-switcher button:hover:not(.active) {
  color: var(--accent);
  border-color: rgba(198, 243, 107, 0.5);
}

/* 页面加载动画 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInFromRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInFromLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

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

@keyframes glowPulse {
  0%, 100% {
    box-shadow: 0 0 20px rgba(198, 243, 107, 0.3), 0 0 40px rgba(198, 243, 107, 0.1);
  }
  50% {
    box-shadow: 0 0 30px rgba(198, 243, 107, 0.5), 0 0 60px rgba(198, 243, 107, 0.2);
  }
}

/* 应用动画到元素 */
.hero {
  animation: fadeInUp 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.hero-copy h1 {
  animation: fadeInUp 1s cubic-bezier(0.23, 1, 0.32, 1) 0.2s both;
}

.hero-lead {
  animation: fadeInUp 1s cubic-bezier(0.23, 1, 0.32, 1) 0.4s both;
}

.hero-actions {
  animation: fadeInUp 1s cubic-bezier(0.23, 1, 0.32, 1) 0.6s both;
}

.workspace-window {
  animation: scaleIn 1s cubic-bezier(0.23, 1, 0.32, 1) 0.4s both;
}

.stage-glow {
  animation: pulse 4s ease-in-out infinite;
}

.download-orbit {
  animation: rotate 20s linear infinite;
}

.orbit-one {
  animation-duration: 25s;
}

.orbit-two {
  animation-duration: 15s;
  animation-direction: reverse;
}

.download-core {
  animation: float 3s ease-in-out infinite;
}

/* 特征卡片悬停效果 */
.feature-card {
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s;
}

.feature-card:hover::before {
  left: 100%;
}

.feature-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.feature-icon {
  transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.feature-card:hover .feature-icon {
  transform: scale(1.2) rotate(5deg);
}

/* 按钮增强效果 */
.button {
  position: relative;
  overflow: hidden;
}

.button::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.button:hover::after {
  width: 300px;
  height: 300px;
}

.button-primary:hover {
  box-shadow: 0 8px 30px rgba(198, 243, 107, 0.4);
}

/* 导航链接动画 */
.nav-list a {
  position: relative;
}

.nav-list a::after {
  content: '';
  position: absolute;
  bottom: 8px;
  left: 12px;
  right: 12px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.nav-list a:hover::after,
.nav-list a.is-current::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* 眼珠点动画 */
.eyebrow-dot, .pulse-dot, .live-dot, .tag-dot {
  animation: glowPulse 2s ease-in-out infinite;
}

/* 滚动触发动画 */
.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* 为不同元素添加延迟 */
.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.2s; }
.feature-card:nth-child(3) { animation-delay: 0.3s; }

.step-item:nth-child(1) { animation-delay: 0.1s; }
.step-item:nth-child(2) { animation-delay: 0.2s; }
.step-item:nth-child(3) { animation-delay: 0.3s; }

/* 工作流程步骤动画 */
.step-arrow {
  display: inline-block;
  transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.step-item:hover .step-arrow {
  transform: translateX(5px);
}

/* 信号条动画 */
.signal-bar span {
  animation: shimmer 2s linear infinite;
  background: linear-gradient(90deg, var(--accent) 0%, #d5fa82 50%, var(--accent) 100%);
  background-size: 200% 100%;
}

/* 活动图标动画 */
.activity-icon {
  animation: scaleIn 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.activity-row:hover .activity-icon {
  transform: scale(1.1) rotate(5deg);
  transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

/* 价格卡片动画 */
.price-card {
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.price-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.price-card-featured {
  animation: glowPulse 3s ease-in-out infinite;
}

/* 证明卡片动画 */
.proof-card {
  animation: fadeInUp 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.proof-score-value {
  display: inline-block;
  animation: scaleIn 1s cubic-bezier(0.23, 1, 0.32, 1) 0.5s both;
}

/* 仪表板动画 */
.dashboard-welcome {
  animation: fadeInUp 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.download-hero {
  animation: scaleIn 0.8s cubic-bezier(0.23, 1, 0.32, 1) 0.2s both;
}

.surface-card {
  animation: fadeInUp 0.6s cubic-bezier(0.23, 1, 0.32, 1);
  transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.surface-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.surface-card:nth-child(1) { animation-delay: 0.1s; }
.surface-card:nth-child(2) { animation-delay: 0.2s; }
.surface-card:nth-child(3) { animation-delay: 0.3s; }

/* 激活卡片动画 */
.activation-card {
  animation: fadeInUp 0.8s cubic-bezier(0.23, 1, 0.32, 1) 0.4s both;
}

.activation-mark {
  animation: pulse 2s ease-in-out infinite;
}

/* 语言切换过渡效果 */
.lang-transitioning {
  animation: fadeOut 0.2s ease-out;
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0.7;
  }
}

/* 页面切换动画 */
body.page-transitioning {
  animation: pageTransition 0.3s ease-in-out;
}

@keyframes pageTransition {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.95;
  }
  100% {
    opacity: 1;
  }
}

/* 认证页面动画 */
.auth-card {
  animation: scaleIn 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.auth-aside {
  animation: slideInFromLeft 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.auth-aside h1 {
  animation: fadeInUp 1s cubic-bezier(0.23, 1, 0.32, 1) 0.2s both;
}

.auth-quote {
  animation: fadeInUp 1s cubic-bezier(0.23, 1, 0.32, 1) 0.4s both;
}

/* 窗口条动画 */
.window-dots i {
  animation: pulse 2s ease-in-out infinite;
}

.window-dots i:nth-child(1) { animation-delay: 0s; }
.window-dots i:nth-child(2) { animation-delay: 0.3s; }
.window-dots i:nth-child(3) { animation-delay: 0.6s; }

/* 分数徽章动画 */
.score-badge {
  animation: scaleIn 0.6s cubic-bezier(0.23, 1, 0.32, 1) 0.8s both;
}

/* 进度条填充动画 */
@keyframes fillProgress {
  from {
    width: 0;
  }
}

.signal-bar span,
.overview-bar span,
.large-progress span {
  animation: fillProgress 1.5s cubic-bezier(0.23, 1, 0.32, 1) 0.5s both;
}

/* 标签标记动画 */
.stage-tag {
  animation: fadeInUp 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.stage-tag-top {
  animation-delay: 1s;
}

.stage-tag-bottom {
  animation-delay: 1.2s;
}

/* 度量项动画 */
.metric-item {
  animation: fadeInUp 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.metric-item:nth-child(1) { animation-delay: 0.1s; }
.metric-item:nth-child(2) { animation-delay: 0.2s; }
.metric-item:nth-child(3) { animation-delay: 0.3s; }
.metric-item:nth-child(4) { animation-delay: 0.4s; }

.metric-value {
  display: inline-block;
  animation: scaleIn 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

/* 安全图标动画 */
.security-icon {
  transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.security-points article:hover .security-icon {
  transform: scale(1.15) rotate(5deg);
  background: rgba(198, 243, 107, 0.1);
}

/* 隐私卡片动画 */
.privacy-card {
  animation: fadeInUp 0.8s cubic-bezier(0.23, 1, 0.32, 1);
  transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.privacy-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.privacy-icon {
  transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.privacy-card:hover .privacy-icon {
  transform: scale(1.1) rotate(-5deg);
}

/* 加载状态动画 */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(198, 243, 107, 0.3);
  border-radius: 50%;
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}

/* 响应式动画调整 */
@media (max-width: 900px) {
  .lang-switcher {
    top: 10px;
    right: 10px;
    padding: 6px;
  }

  .lang-switcher button {
    min-width: 40px;
    height: 32px;
    padding: 0 12px;
    font-size: 12px;
  }
}

/* 减少动画选项 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .lang-switcher,
  .feature-card,
  .button,
  .nav-list a,
  .price-card,
  .surface-card,
  .privacy-card {
    animation: none !important;
  }
}
