/* fashion-showcase-040618/frontend/public/styles.css */

/* 字体引入与全局设置 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Noto+Sans+SC:wght@300;400;500;700&display=swap');

:root {
    --font-sans: 'Inter', 'Helvetica Neue', 'Helvetica', 'Arial', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    --font-serif: 'Times New Roman', serif;
    --color-primary: #1a1a1a;
    --color-secondary: #666666;
    --color-accent: #1e3a8a; /* 深蓝 */
    --transition-base: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

body {
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: var(--color-primary);
    background-color: #f9f9f9; /* 柔和的米白/灰背景 */
    overflow-x: hidden;
}

/* 自定义滚动条 (Webkit) */
::-webkit-scrollbar {
    width: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

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

/* 基础排版 */
h1, h2, h3, h4, h5, h6 {
    letter-spacing: -0.02em;
    font-weight: 400;
}

.font-serif {
    font-family: var(--font-serif);
}

/* 动画关键帧 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from { transform: scale(1.1); }
    to { transform: scale(1); }
}

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

.animate-fade-up {
    opacity: 0; /* 初始隐藏，由JS触发添加类显示，或直接使用animation */
    animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* 图片交互与容器 */
.img-container {
    overflow: hidden;
    position: relative;
}

.img-hover-zoom {
    transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
    width: 100%;
    height: 100%;
    object-fit: cover;
    will-change: transform;
}

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

/* 瀑布流布局 (CSS Columns) */
.masonry-grid {
    column-count: 1;
    column-gap: 2rem;
}

@media (min-width: 768px) {
    .masonry-grid {
        column-count: 2;
    }
}

@media (min-width: 1024px) {
    .masonry-grid {
        column-count: 3;
    }
}

.masonry-item {
    break-inside: avoid;
    margin-bottom: 2rem;
}

/* 导航栏过渡 */
.nav-scrolled {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(0,0,0,0.05);
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
}

/* 视差效果容器 */
.parallax-section {
    position: relative;
    overflow: hidden;
    clip-path: inset(0);
}

.parallax-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-size: cover;
    background-position: center;
    will-change: transform;
}

/* 极简分割线 */
.divider-line {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0,0,0,0.1), transparent);
    margin: 4rem 0;
}

/* 文本选择颜色 */
::selection {
    background-color: rgba(0, 0, 0, 0.1);
    color: #000;
}

/* 隐藏元素但保持布局 (用于加载骨架屏占位) */
.invisible-placeholder {
    visibility: hidden;
}

/* 纯CSS实现的简单的加载指示器 */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #333;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}