/* 引入字体：Montserrat (英文) 和 Noto Sans SC (中文) */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600&family=Noto+Sans+SC:wght@300;400;500;700&display=swap');

/* 全局基础设置 */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Montserrat', 'Noto Sans SC', sans-serif;
    color: #1a1a1a;
    background-color: #ffffff;
    overflow-x: hidden;
}

/* 隐藏特定元素的滚动条但保留滚动功能 */
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* 自定义选中文本颜色 */
::selection {
    background-color: #2F4F4F; /* 墨绿色 */
    color: #ffffff;
}

/* 页面加载过渡动画 */
.fade-in {
    animation: fadeIn 0.8s ease-out forwards;
    opacity: 0;
}

.fade-in-up {
    animation: fadeInUp 1s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
}

.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 {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* 图片悬停特效增强 */
.img-hover-zoom {
    overflow: hidden;
    position: relative;
}

.img-hover-zoom img {
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), filter 0.5s ease;
    will-change: transform;
}

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

/* 遮罩层动画 */
.hover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.img-hover-zoom:hover .hover-overlay {
    opacity: 1;
}

/* 磁性按钮效果 (可选) */
.magnetic-btn {
    transition: transform 0.3s ease;
}
.magnetic-btn:hover {
    transform: translateY(-2px);
}

/* 灯箱模态框样式 */
#lightbox {
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    transition: opacity 0.3s ease;
}

/* 瀑布流布局辅助 (Column-count method) */
.masonry-grid {
    column-count: 1;
    column-gap: 1.5rem;
}
@media (min-width: 640px) {
    .masonry-grid { column-count: 2; }
}
@media (min-width: 1024px) {
    .masonry-grid { column-count: 3; }
}

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

/* 文字排版增强 */
.text-justify-inter {
    text-align: justify;
    text-justify: inter-ideograph;
}

/* 极简加载指示器 */
.loader {
    width: 48px;
    height: 1px;
    background: #e5e5e5;
    position: relative;
    overflow: hidden;
}
.loader::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 1px;
    background: #1a1a1a;
    left: 0;
    animation: loaderAnim 1.5s infinite ease-in-out;
}
@keyframes loaderAnim {
    0% { left: 0; width: 0; }
    50% { left: 50%; width: 24px; }
    100% { left: 100%; width: 0; }
}

/* 下拉菜单过渡 */
.nav-menu-transition {
    transition: all 0.3s ease-in-out;
}