@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500&display=swap');

/* 全局变量定义 */
:root {
    --bg-warm-white: #F9F7F5;
    --bg-light-gray: #E8E5E1;
    --accent-lavender: #B5A9C8;
    --accent-serenity-blue: #8AAAC9;
    --text-primary: #333333;
    --text-secondary: #666666;
}

/* 基础设置 */
html {
    scroll-behavior: smooth;
    height: 100%;
}

body {
    background-color: var(--bg-warm-white);
    font-family: 'Helvetica Now', 'Avenir Next', 'PingFang SC', 'Noto Sans SC', sans-serif;
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    margin: 0;
    line-height: 1.6;
}

/* 选中文本颜色 */
::selection {
    background: var(--accent-lavender);
    color: white;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* 工具类：淡入动画 */
.animate-fade-in {
    opacity: 0;
    animation: fadeIn 1.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.animate-fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s cubic-bezier(0.22, 1, 0.36, 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; }

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

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

/* 导航链接动效 */
.nav-link {
    position: relative;
    display: inline-block;
    padding-bottom: 2px;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: 0;
    left: 0;
    background-color: var(--accent-lavender);
    transition: width 0.3s ease;
}

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

/* 图片容器通用样式 */
.img-container {
    overflow: hidden;
    position: relative;
    background-color: var(--bg-light-gray); /* 占位色 */
}

/* 图片悬停放大 */
.hover-zoom img {
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* 视差效果 */
.parallax-bg {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* 隐藏特定元素的滚动条 */
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

/* 模态框背景模糊 */
.modal-backdrop {
    background-color: rgba(249, 247, 245, 0.95);
    backdrop-filter: blur(8px);
}

/* 加载动画 */
.loader-line {
    width: 100%;
    height: 3px;
    position: relative;
    overflow: hidden;
    background-color: #ddd;
    margin: 100px auto;
}

.loader-line:before {
    content: "";
    position: absolute;
    left: -50%;
    height: 3px;
    width: 40%;
    background-color: var(--accent-lavender);
    animation: lineAnim 1s linear infinite;
}

@keyframes lineAnim {
    0% { left: -50%; width: 30%; }
    50% { width: 30%; }
    70% { width: 70%; }
    80% { left: 50%; }
    95% { left: 120%; }
    100% { left: 120%; }
}

/* 移动端汉堡菜单过渡 */
.mobile-menu-enter {
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
}
.mobile-menu-enter-active {
    transform: translateX(0);
}