/* 全局重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 根变量定义 */
:root {
    /* 颜色系统 */
    --primary-white: #ffffff;
    --light-gray: #f8f9fa;
    --medium-gray: #e9ecef;
    --dark-gray: #6c757d;
    --matte-black: #212529;
    --accent-metal: #b8bcc8;
    --accent-wood: #8b7355;
    
    /* 字体 */
    --font-primary: 'Noto Sans SC', 'Source Han Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    /* 间距 */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;
    
    /* 边框 */
    --border-light: 1px solid var(--medium-gray);
    --border-radius-sm: 0.25rem;
    --border-radius-md: 0.5rem;
    
    /* 阴影 */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    
    /* 动画 */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* 基础样式 */
html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    color: var(--matte-black);
    background-color: var(--primary-white);
    line-height: 1.6;
    overflow-x: hidden;
}

/* 导航栏 */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: var(--border-light);
    z-index: 1000;
    padding: var(--spacing-sm) 0;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-lg);
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

nav a {
    text-decoration: none;
    color: var(--dark-gray);
    font-weight: 400;
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    transition: color var(--transition-fast);
    position: relative;
    padding: var(--spacing-xs) 0;
}

nav a:hover,
nav a.active {
    color: var(--matte-black);
}

nav a.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--matte-black);
}

/* 主内容区 */
main {
    margin-top: 60px;
    min-height: calc(100vh - 60px);
}

/* 英雄区域 */
.hero {
    position: relative;
    width: 100%;
    height: 80vh;
    min-height: 500px;
    overflow: hidden;
}

.slider {
    width: 100%;
    height: 100%;
    position: relative;
}

.slider img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.slider img.active {
    opacity: 1;
}

/* 图片淡入动画 */
.fade-in {
    animation: fadeIn 1s ease-in-out;
}

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

/* 介绍区域 */
.intro {
    position: absolute;
    bottom: var(--spacing-lg);
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: var(--primary-white);
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--border-radius-md);
    max-width: 600px;
}

.intro h1 {
    font-size: 2.5rem;
    font-weight: 300;
    letter-spacing: 0.1em;
    margin-bottom: var(--spacing-sm);
}

.intro p {
    font-size: 1rem;
    opacity: 0.9;
    line-height: 1.8;
}

/* 瀑布流布局 */
.waterfall {
    column-count: 3;
    column-gap: var(--spacing-sm);
    padding: var(--spacing-md);
}

.waterfall-item {
    break-inside: avoid;
    margin-bottom: var(--spacing-sm);
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius-sm);
}

.waterfall-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform var(--transition-normal);
}

.waterfall-item:hover img {
    transform: scale(1.03);
}

.waterfall-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    color: var(--primary-white);
    padding: var(--spacing-md);
    transform: translateY(100%);
    transition: transform var(--transition-normal);
}

.waterfall-item:hover .waterfall-caption {
    transform: translateY(0);
}

/* 网格布局 */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-md);
    padding: var(--spacing-md);
}

.grid-item {
    position: relative;
    overflow: hidden;
    background: var(--light-gray);
    border-radius: var(--border-radius-sm);
    aspect-ratio: 3/4;
}

.grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

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

/* 故事文章 */
.story-container {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--spacing-md);
}

.story {
    margin-bottom: var(--spacing-xl);
}

.story-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: var(--border-radius-sm);
    margin-bottom: var(--spacing-md);
}

.story-title {
    font-size: 1.8rem;
    font-weight: 300;
    margin-bottom: var(--spacing-sm);
    letter-spacing: 0.05em;
}

.story-content {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--dark-gray);
}

/* 页脚 */
footer {
    text-align: center;
    padding: var(--spacing-lg);
    background: var(--light-gray);
    border-top: var(--border-light);
}

footer p {
    font-size: 0.875rem;
    color: var(--dark-gray);
    opacity: 0.7;
}

/* 响应式设计 */
@media (max-width: 768px) {
    nav ul {
        gap: var(--spacing-md);
        padding: 0 var(--spacing-sm);
    }
    
    nav a {
        font-size: 0.875rem;
    }
    
    .intro h1 {
        font-size: 1.8rem;
    }
    
    .waterfall {
        column-count: 2;
    }
    
    .grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: var(--spacing-sm);
        padding: var(--spacing-sm);
    }
    
    .story-image {
        height: 250px;
    }
    
    .story-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    nav ul {
        gap: var(--spacing-sm);
    }
    
    .intro {
        bottom: var(--spacing-md);
        left: var(--spacing-md);
        right: var(--spacing-md);
        transform: none;
        padding: var(--spacing-sm) var(--spacing-md);
    }
    
    .intro h1 {
        font-size: 1.5rem;
    }
    
    .waterfall {
        column-count: 1;
    }
    
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 加载状态 */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-gray);
}

::-webkit-scrollbar-thumb {
    background: var(--dark-gray);
    border-radius: var(--border-radius-sm);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--matte-black);
}