/* 高级炫酷动画效果 - 为企业官网增强视觉体验 */

/* 通用动画类 */
.fade-up {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-up.active {
  opacity: 1;
  transform: translateY(0);
}

.fade-in {
  opacity: 0;
  transition: opacity 1.2s ease;
}

.fade-in.active {
  opacity: 1;
}

.scale-in {
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.scale-in.active {
  opacity: 1;
  transform: scale(1);
}

.slide-right {
  opacity: 0;
  transform: translateX(-100px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.slide-right.active {
  opacity: 1;
  transform: translateX(0);
}

.slide-left {
  opacity: 0;
  transform: translateX(100px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.slide-left.active {
  opacity: 1;
  transform: translateX(0);
}

.rotate-in {
  opacity: 0;
  transform: rotateY(90deg);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.rotate-in.active {
  opacity: 1;
  transform: rotateY(0);
}

/* 延迟类 */
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }
.delay-400 { transition-delay: 0.4s; }
.delay-500 { transition-delay: 0.5s; }
.delay-600 { transition-delay: 0.6s; }
.delay-700 { transition-delay: 0.7s; }
.delay-800 { transition-delay: 0.8s; }
.delay-900 { transition-delay: 0.9s; }
.delay-1000 { transition-delay: 1s; }

/* 视差滚动效果 */
.parallax-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 120%;
  background-position: center;
  background-size: cover;
  z-index: -1;
  transform: translateZ(-1px) scale(2);
  pointer-events: none;
}

/* 3D翻转卡片效果 */
.flip-card {
  perspective: 1000px;
  transform-style: preserve-3d;
  height: 100%;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.8s;
  transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: var(--border-radius);
  overflow: hidden;
}

.flip-card-back {
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
  text-align: center;
  background-color: var(--primary-color);
  color: white;
}

/* 悬浮效果增强 */
.hover-float {
  transition: transform 0.3s ease;
}

.hover-float:hover {
  transform: translateY(-15px);
}

.hover-glow {
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.hover-glow:hover {
  box-shadow: 0 0 20px rgba(var(--primary-rgb), 0.7);
  transform: translateY(-5px);
}

/* 炫酷背景效果 */
.bg-gradient-animated {
  background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
  background-size: 400% 400%;
  animation: gradient 15s ease infinite;
}

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

/* 文字动画效果 */
.text-focus-in {
  animation: text-focus-in 1s cubic-bezier(0.550, 0.085, 0.680, 0.530) both;
}

@keyframes text-focus-in {
  0% {
    filter: blur(12px);
    opacity: 0;
  }
  100% {
    filter: blur(0px);
    opacity: 1;
  }
}

.char-animation span {
  display: inline-block;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.char-animation.active span {
  opacity: 1;
  transform: translateY(0);
}

/* 动态边框效果 */
.border-animation {
  position: relative;
  overflow: hidden;
}

.border-animation::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 2px solid transparent;
  border-radius: inherit;
}

.border-animation:hover::before {
  animation: border-dance 1.5s linear infinite;
  border-color: var(--primary-color);
}

@keyframes border-dance {
  0% {
    clip-path: inset(0 0 calc(100% - 2px) 0);
  }
  25% {
    clip-path: inset(0 0 0 calc(100% - 2px));
  }
  50% {
    clip-path: inset(calc(100% - 2px) 0 0 0);
  }
  75% {
    clip-path: inset(0 calc(100% - 2px) 0 0);
  }
  100% {
    clip-path: inset(0 0 calc(100% - 2px) 0);
  }
}

/* 滚动指示器 */
.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

.scroll-indicator .mouse {
  width: 26px;
  height: 40px;
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 20px;
  display: flex;
  justify-content: center;
  margin: 0 auto;
}

.scroll-indicator .wheel {
  width: 4px;
  height: 8px;
  background-color: #fff;
  border-radius: 2px;
  animation: scroll 2s cubic-bezier(0.65, 0, 0.35, 1) infinite;
  margin-top: 5px;
}

@keyframes scroll {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  30% {
    opacity: 1;
  }
  60% {
    transform: translateY(15px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 0;
  }
}

/* 光影特效 */
.light-beam {
  position: relative;
  overflow: hidden;
}

.light-beam::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -60%;
  width: 20%;
  height: 200%;
  opacity: 0;
  background: rgba(255, 255, 255, 0.13);
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0.13) 0%,
    rgba(255, 255, 255, 0.13) 77%,
    rgba(255, 255, 255, 0.5) 92%,
    rgba(255, 255, 255, 0.0) 100%
  );
  transform: rotate(30deg);
}

.light-beam:hover::after {
  opacity: 1;
  left: 130%;
  transition-property: left, opacity;
  transition-duration: 0.7s, 0.15s;
  transition-timing-function: ease;
}

/* 3D视差效果 */
.parallax-tilt {
  transform-style: preserve-3d;
  transform: perspective(1000px);
}

.parallax-tilt-child {
  transform: translateZ(20px);
}

/* 滚动驱动的进度条 */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
  z-index: 1000;
  width: 0%;
}

/* 炫酷滚动加载指示器 */
.infinite-loader {
  display: flex;
  justify-content: center;
  margin: 30px 0;
}

.infinite-loader .dot {
  width: 10px;
  height: 10px;
  margin: 0 5px;
  border-radius: 50%;
  background-color: var(--primary-color);
  animation: bounce 1.5s infinite ease-in-out;
}

.infinite-loader .dot:nth-child(1) {
  animation-delay: 0s;
}

.infinite-loader .dot:nth-child(2) {
  animation-delay: 0.2s;
}

.infinite-loader .dot:nth-child(3) {
  animation-delay: 0.4s;
}

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

/* 页面分割线动画 */
.divider {
  height: 2px;
  width: 0;
  background: linear-gradient(to right, transparent, var(--primary-color), transparent);
  margin: 30px auto;
  transition: width 1.5s ease;
}

.divider.active {
  width: 80%;
}

/* 页面加载动画增强 */
.preloader {
  background: linear-gradient(-45deg, #1a1a1a, #2a2a2a, #1a1a1a, #2a2a2a);
  background-size: 400% 400%;
  animation: gradient 10s ease infinite;
}

/* 数字递增动画 */
.counter-value {
  font-weight: bold;
  font-size: 3rem;
  color: var(--primary-color);
  display: inline-block;
}

/* 服务卡片中的图标悬浮旋转效果 */
.service-icon-rotate {
  transition: transform 0.5s ease;
}

.service-box:hover .service-icon-rotate {
  transform: rotateY(360deg);
}

/* 文本下划线动画 */
.underline-animation {
  position: relative;
  display: inline-block;
}

.underline-animation::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -2px;
  left: 0;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
}

.underline-animation:hover::after {
  width: 100%;
}

/* 视差滚动图片 */
.parallax-image-container {
  position: relative;
  overflow: hidden;
  border-radius: var(--border-radius);
}

.parallax-image {
  width: 110%;
  height: 110%;
  object-fit: cover;
  transition: transform 0.5s ease-out;
  transform-origin: center center;
}

.parallax-image-container:hover .parallax-image {
  transform: scale(1.1);
}

/* 页面切换动画 */
.page-transition {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--primary-color);
  z-index: 9999;
  transform: translateY(100%);
  transition: transform 0.7s cubic-bezier(0.7, 0, 0.3, 1);
}

.page-transition.active {
  transform: translateY(0);
}

.page-transition.exit {
  transform: translateY(-100%);
}

/* 视频背景容器 */
.video-bg-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: -1;
}

.video-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translateX(-50%) translateY(-50%);
  background-size: cover;
}

/* 玻璃态效果 */
.glass-effect {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
} 