* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
a {
    text-decoration: none;
}
/* Grid 容器设置 */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    /* 根据屏幕宽度自动调整列数 */
    gap: 10px;
    /* 图片间隙 */
    padding: 10px;
}

/* 图片样式 */
.image-gallery img {
    width: 100%;
    /* 图片宽度占满容器 */
    height: auto;
    /* 高度自适应 */
    border-radius: 8px;
    object-fit: cover;
    /* 保证图片不变形 */
    transition: transform 0.3s ease;
}

/* 当鼠标悬停时，图片放大效果 */
.image-gallery img:hover {
    transform: scale(1.05);
}

/* 页面底部加载更多按钮（可选） */
.loading-btn {
    width: 100%;
    text-align: center;
    padding: 10px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    cursor: pointer;
}


/* 头部导航样式 */
header {
    display: flex;
    justify-content: center; /* 整个导航栏居中 */
    align-items: center;
    height: 70px;
    padding: 0 30px;
    background: rgba(10, 25, 35, 0.85);
    backdrop-filter: blur(5px);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.header-container {
    display: flex;
    justify-content: space-between; /* Logo和菜单左右分开 */
    align-items: center;
    width: 100%;
    max-width: 1400px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 28px;
    font-weight: 700;
    color: #4fc3f7;
    text-shadow: 0 0 10px rgba(79, 195, 247, 0.5);
    transition: all 0.3s ease;
}

.logo:hover {
    transform: scale(1.03);
    text-shadow: 0 0 15px rgba(79, 195, 247, 0.8);
}

.logo i {
    color: #4fc3f7;
}

nav {
    margin-left: auto; /* 将导航菜单推到最右侧 */
}

nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

nav a {
    color: #e0e0e0;
    text-decoration: none;
    font-size: 18px;
    font-weight: 500;
    padding: 8px 15px;
    border-radius: 30px;
    transition: all 0.3s ease;
    position: relative;
}

nav a:hover, nav a.active {
    color: #4fc3f7;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #4fc3f7;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

nav a:hover::after, nav a.active::after {
    width: 70%;
}

@media (max-width: 900px) {
    .image-gallery {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        /* 根据屏幕宽度自动调整列数 */
        gap: 10px;
        /* 图片间隙 */
        padding: 10px;
    }
    nav ul {
        gap: 15px;
    }

    nav a {
        font-size: 14px;
        padding: 6px 12px;
    }
}

@media (max-width: 768px) {
    .image-gallery {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
        /* 根据屏幕宽度自动调整列数 */
        gap: 10px;
        /* 图片间隙 */
        padding: 10px;
    }
    header {
        height: auto;
        padding: 15px;
    }

    .header-container {
        flex-direction: column;
        gap: 15px;
    }

    nav {
        margin-left: 0;
        width: 100%;
    }

    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
}
