/* 
 * File: fashion-vision-080124/frontend/public/css/style.css
 * Description: 全局样式定义，补充Tailwind CSS无法覆盖的动画与细节
 * Author: HAISNAP
 */

:root {
  --font-main: 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --color-text-main: #1a1a1a;
  --color-bg-light: #f9f9f9;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-main);
  background-color: #ffffff;
  color: var(--color-text-main);
  overflow-x: hidden; /* 防止横向滚动 */
}

/* 预留动态槽位样式 */
[data-slot] {
  display: contents; 
}

/* ===== 动画定义 ===== */

/* 淡入 */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* 上浮淡入 */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 缓慢缩放 */
@keyframes slowZoom {
  from { transform: scale(1); }
  to { transform: scale(1.1); }
}

/* 实用动画类 */
.animate-fade {
  animation: fadeIn 1.2s ease-out forwards;
}

.animate-slide-up {
  opacity: 0; /* 初始隐藏 */
  animation: slideUp 1.0s var(--ease-out-expo) forwards;
}

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }

/* ===== 微交互效果 ===== */

/* 图片容器：用于悬停放大效果 */
.img-container {
  overflow: hidden;
  position: relative;
}

/* 图片悬停放大 */
.hover-zoom {
  transition: transform 0.8s var(--ease-out-expo), filter 0.5s ease;
  will-change: transform;
}

.group:hover .hover-zoom {
  transform: scale(1.03);
}

/* 文本下划线动画 */
.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 1px;
  bottom: -4px;
  left: 50%;
  background-color: currentColor;
  transition: width 0.3s ease, left 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
  left: 0;
}

/* ===== 极简滚动条 ===== */
::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #e5e5e5;
  border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
  background: #c0c0c0;
}

/* ===== 加载状态 ===== */
#page-loader {
  position: fixed;
  inset: 0;
  background: #fff;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.6s ease;
  pointer-events: none;
}

.loader-line {
  width: 0;
  height: 1px;
  background: #000;
  animation: loadProgress 1.5s ease-in-out forwards;
}

@keyframes loadProgress {
  0% { width: 0; }
  100% { width: 100px; }
}