/* fashion-showcase-060128/frontend/public/style.css */

/* 引入字体: 思源黑体作为首选，兼顾多平台现代无衬线字体 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@100;300;400;500;700&display=swap');

:root {
  --color-dark: #212529;
  --color-gray: #f8f9fa;
  --color-text-main: #333333;
  --color-text-sub: #666666;
  --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

/* 基础重置与全局设置 */
body {
  font-family: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: #ffffff;
  color: var(--color-text-main);
  overflow-x: hidden;
  margin: 0;
  padding: 0;
}

/* 滚动条美化 - 极简风格 */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

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

::-webkit-scrollbar-thumb {
  background: #d1d5db; /* gray-300 */
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #9ca3af; /* gray-400 */
}

/* 全局平滑滚动 */
html {
  scroll-behavior: smooth;
}

/* 文本选择颜色 - 高级灰 */
::selection {
  background: rgba(33, 37, 41, 0.1); /* #212529 */
  color: #000;
}

/* -------------------
   自定义动画工具类
   ------------------- */

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

.animate-fade-up {
  animation: fadeInUp 1.2s var(--transition-smooth) forwards;
  opacity: 0; /* 初始隐藏 */
}

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

.animate-fade-in {
  animation: fadeIn 1.5s ease-out forwards;
  opacity: 0;
}

/* 延迟工具类 */
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-500 { animation-delay: 0.5s; }
.delay-700 { animation-delay: 0.7s; }

/* -------------------
   组件交互效果
   ------------------- */

/* 导航链接：简约下划线动画 */
.nav-hover-line {
  position: relative;
  text-decoration: none;
}

.nav-hover-line::after {
  content: '';
  position: absolute;
  width: 0;
  height: 1px;
  bottom: -4px;
  left: 50%; /* 从中心展开 */
  background-color: currentColor;
  transition: width 0.4s var(--transition-smooth), left 0.4s var(--transition-smooth);
}

.nav-hover-line:hover::after {
  width: 100%;
  left: 0;
}

/* 图片容器：悬停微放大 */
.group-hover-scale {
  overflow: hidden;
  display: block;
}

.group-hover-scale img {
  transition: transform 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

.group-hover-scale:hover img {
  transform: scale(1.03); /* 极微小的放大，更显高级 */
}

/* 遮罩层：半透明渐变 */
.overlay-gradient {
  background: linear-gradient(to top, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.1) 50%, rgba(0,0,0,0.5) 100%);
  pointer-events: none;
}

/* -------------------
   特殊布局辅助
   ------------------- */

/* 视差背景容器 */
.parallax-bg {
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

/* 移动端优化：禁用fixed背景以提升性能 */
@media (max-width: 768px) {
  .parallax-bg {
    background-attachment: scroll;
  }
}

/* 隐藏滚动条但保留功能 (用于横向滚动区域) */
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* 加载骨架屏动画 */
@keyframes shimmer {
  0% { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}

.skeleton-loading {
  animation: shimmer 2s infinite linear;
  background: linear-gradient(to right, #f6f7f8 4%, #edeef1 25%, #f6f7f8 36%);
  background-size: 1000px 100%;
}