/* 基础样式 */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f9;
    color: #333;
}
 
.nav {
    position: fixed;
    /* 固定定位，使导航栏始终在顶部 */
    top: 0;
    /* 从顶部开始 */
    width: 100%;
    /* 导航栏宽度占满整个屏幕 */
    padding: 1rem;
    /* 导航栏内边距，1rem 约等于 16px */
    background: transparent;
    /* 设置导航栏背景为完全透明 */
    display: flex;
    /* 使用弹性布局 */
    justify-content: center;
    /* 水平居中对齐导航项 */
    gap: 2rem;
    /* 导航项之间的间距 */
}
 
.background {
    position: fixed;
    /* 固定定位，使背景图始终覆盖整个屏幕 */
    top: 0;
    /* 从顶部开始 */
    left: 0;
    /* 从左侧开始 */
    width: 100%;
    /* 宽度占满整个屏幕 */
    height: 100%;
    /* 高度占满整个屏幕 */
    background: url('/images/background.jpg') center/cover;
    /* 设置背景图路径，居中并充满容器 */
    filter: brightness(0.7);
    /* 降低背景亮度，提升前景内容的可读性 */
    z-index: -1;
    /* 将背景图置于内容层下方 */
}
 
.photo-gallery {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    text-align: center;
}
 
.photo-gallery h1 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #2A4365;
}
 
/* 照片墙网格布局 */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    /* 自动调整列数，每列最小宽度为200px */
    gap: 10px;
    /* 图片之间的间距 */
}
 
.photo-item {
    overflow: hidden;
    /* 隐藏超出容器的部分 */
    border-radius: 8px;
    /* 图片圆角 */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    /* 添加阴影效果 */
}
 
.photo-item img {
    width: 100%;
    /* 图片宽度占满容器 */
    height: auto;
    /* 图片高度自动调整 */
    transition: transform 0.3s ease;
    /* 添加过渡效果 */
}
 
.photo-item img:hover {
    transform: scale(1.05);
    /* 鼠标悬停时放大图片 */
}