/**
 * Atlas Menu 动画样式文件
 * 包含滚动动画、悬停效果和过渡动画
 */

/* ===== Uiverse 按钮样式 ===== */
.button {
  height: 50px;
  width: 200px;
  position: relative;
  background-color: transparent;
  cursor: pointer;
  border: 2px solid #252525;
  overflow: hidden;
  border-radius: 30px;
  color: #fff;
  transition: all 0.5s ease-in-out;
}

.btn-txt {
  z-index: 1;
  font-weight: 800;
  letter-spacing: normal;
}

.type1::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  transition: all 0.5s ease-in-out;
  background-color: rgba(255, 255, 255, 0.15);
  border-radius: 30px;
  visibility: hidden;
  height: 10px;
  width: 10px;
  z-index: -1;
}

.button:hover {
  box-shadow: 1px 1px 200px #252525;
  color: #fff;
  border: none;
}

.type1:hover::after {
  visibility: visible;
  transform: scale(100) translateX(2px);
}

/* ===== Uiverse 霓虹按钮样式 ===== */
.btn-neon {
  --neon: #8b5cf6;
  font-size: 15px;
  padding: 0.7em 2.7em;
  letter-spacing: 0.06em;
  position: relative;
  font-family: inherit;
  border-radius: 0.6em;
  overflow: hidden;
  transition: all 0.3s;
  line-height: 1.4em;
  border: 2px solid var(--neon);
  background: linear-gradient(to right, rgba(139, 92, 246, 0.1) 1%, transparent 40%, transparent 60%, rgba(139, 92, 246, 0.1) 100%);
  color: var(--neon);
  box-shadow: inset 0 0 10px rgba(139, 92, 246, 0.4), 0 0 9px 3px rgba(139, 92, 246, 0.1);
  display: inline-block;
  text-decoration: none;
}

.btn-neon:hover {
  color: #c4b5fd;
  box-shadow: inset 0 0 10px rgba(139, 92, 246, 0.6), 0 0 9px 3px rgba(139, 92, 246, 0.2);
}

.btn-neon::before {
  content: "";
  position: absolute;
  left: -4em;
  width: 4em;
  height: 100%;
  top: 0;
  transition: transform 0.4s ease-in-out;
  background: linear-gradient(to right, transparent 1%, rgba(139, 92, 246, 0.1) 40%, rgba(139, 92, 246, 0.1) 60%, transparent 100%);
}

.btn-neon:hover::before {
  transform: translateX(15em);
}

/* ===== 淡入动画 ===== */
.fade-in {
    opacity: 0;
    animation: fadeIn 0.8s ease-out forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* ===== 从下方淡入 ===== */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

/* ===== 从左侧淡入 ===== */
.fade-in-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ===== 从右侧淡入 ===== */
.fade-in-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ===== 缩放淡入 ===== */
.fade-in-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

/* ===== 延迟类 ===== */
.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;
}

/* ===== 悬停缩放效果 ===== */
.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

/* ===== 悬停上浮效果 ===== */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.3);
}

/* ===== 脉冲动画 ===== */
.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* ===== 旋转动画 ===== */
.spin {
    animation: spin 1s linear infinite;
}

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

/* ===== 闪烁动画 ===== */
.blink {
    animation: blink 1.5s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}

/* ===== 渐变流动效果 ===== */
.gradient-flow {
    background-size: 200% 200%;
    animation: gradientFlow 3s ease infinite;
}

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

/* ===== 数字计数器动画 ===== */
.counter {
    display: inline-block;
    font-variant-numeric: tabular-nums;
}

/* ===== 平滑过渡 ===== */
.smooth-transition {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== 响应式动画调整 ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== 移动端菜单动画 ===== */
.mobile-menu {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu.active {
    pointer-events: auto;
    opacity: 1;
    visibility: visible;
}

/* 遮罩层 */
.mobile-menu-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu.active .mobile-menu-overlay {
    opacity: 1;
}

/* 菜单内容 */
.mobile-menu-content {
    position: relative;
    transform: translateY(-20px);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
}

.mobile-menu.active .mobile-menu-content {
    transform: translateY(0);
    opacity: 1;
}

/* 菜单项交错动画 */
.mobile-menu-item {
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.mobile-menu.active .mobile-menu-item {
    opacity: 1;
    transform: translateX(0);
}

.mobile-menu.active .mobile-menu-item:nth-child(1) { transition-delay: 0.05s; }
.mobile-menu.active .mobile-menu-item:nth-child(2) { transition-delay: 0.1s; }
.mobile-menu.active .mobile-menu-item:nth-child(3) { transition-delay: 0.15s; }
.mobile-menu.active .mobile-menu-item:nth-child(4) { transition-delay: 0.2s; }
.mobile-menu.active .mobile-menu-item:nth-child(5) { transition-delay: 0.25s; }
.mobile-menu.active .mobile-menu-item:nth-child(6) { transition-delay: 0.3s; }
.mobile-menu.active .mobile-menu-item:nth-child(7) { transition-delay: 0.35s; }

/* 菜单项悬停效果 */
.mobile-menu-item:hover {
    transform: translateX(8px);
}

/* ===== 移动端语言切换器 ===== */
.mobile-lang-switcher {
    text-align: center;
}

.mobile-lang-switcher:hover {
    transform: translateX(0);
}

.mobile-lang-dropdown {
    max-height: 0;
    margin-top: 0;
    transform-origin: top center;
}

.mobile-lang-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
    max-height: 200px;
    margin-top: 0.5rem;
}

.mobile-lang-switcher.active .mobile-lang-chevron {
    transform: rotate(180deg);
}
