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

body {
    font-family: 'Noto Sans SC', 'Inter', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
    background-color: #F9FAFB;
    color: #1F2937;
    overflow-x: hidden;
}

/* 极简滚动条 */
::-webkit-scrollbar {
    width: 4px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #D1D5DB;
    border-radius: 2px;
}

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

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

@keyframes kenBurns {
    0% { transform: scale(1); }
    100% { transform: scale(1.08); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 动画工具类 */
.animate-fade-in {
    animation: fadeIn 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-slide-up {
    opacity: 0;
    animation: slideUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }

/* 图片交互效果 */
.img-zoom-container {
    overflow: hidden;
    position: relative;
    background-color: #E5E7EB; /* 图片加载前的占位色 */
}

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

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

/* 单页应用页面切换控制 */
.page-section {
    display: none; /* 默认隐藏所有页面 */
    min-height: 100vh;
    padding-top: 5rem; /* 预留导航栏高度 */
    animation: fadeIn 0.6s ease-in-out;
}

.page-section.active {
    display: block; /* 仅显示当前激活页面 */
}

/* 首页特殊处理：全屏且无顶部内边距 */
#home.page-section {
    padding-top: 0;
}

/* 导航栏激活状态 */
.nav-link {
    position: relative;
    transition: color 0.3s ease;
}

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

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

/* 全局加载遮罩 */
#app-loader {
    position: fixed;
    inset: 0;
    background: #ffffff;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease-out, visibility 0.5s;
}

.loader-circle {
    width: 40px;
    height: 40px;
    border: 2px solid #f3f3f3;
    border-top-color: #333;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* 文本与排版辅助 */
.text-balance {
    text-wrap: balance;
}

.bg-glass {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
}

/* 移动端菜单过渡 */
#mobile-menu {
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

.menu-hidden {
    transform: translateY(-20px);
    opacity: 0;
    pointer-events: none;
}