/* 全局样式 */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    padding-bottom: 50px;
}

nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    min-height: 8vh;
    background-color: #333;
    color: white;
}

.logo {
    text-transform: uppercase;
    letter-spacing: 5px;
    font-size: 20px;
}

.nav-links {
    display: flex;
    justify-content: space-around;
    width: 30%;
}

.nav-links li {
    list-style: none;
}

.nav-links a {
    color: white;
    text-decoration: none;
    letter-spacing: 3px;
    font-weight: bold;
    font-size: 14px;
}

.burger {
    display: none;
    cursor: pointer;
}

.burger div {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 5px;
    transition: all 0.3s ease;
}

/* 定义背景图片向上移动动画 */
@keyframes backgroundMoveUp {
    0% {
        background-position: 50% 100%;
    }
    100% {
        background-position: 50% 0%;
    }
}

.blog-header {
    text-align: center;
    padding: 100px 0;
    background-image: url('https://pic1.imgdb.cn/item/67f013990ba3d5a1d7ed72ba.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    /* 应用动画 */
    animation: backgroundMoveUp 40s ease-in-out infinite alternate;
}

.article-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    grid-gap: 20px;
    padding: 20px;
}

article {
    border: 1px solid #ccc;
    border-radius: 5px;
    overflow: hidden;
}

article img {
    width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: cover;
}

article h2 {
    padding: 0 20px;
}

article p {
    padding: 0 20px;
}

.read-more {
    display: inline-block;
    background-color: #333;
    color: white;
    padding: 10px 20px;
    margin: 20px;
    text-decoration: none;
    border-radius: 5px;
}



.site-footer {
    background-color: #f5f5f5;
    padding: 20px 0;
    text-align: center;
    font-size: 14px;
    color: #666;
}

.site-footer a {
    color: #666;
    text-decoration: none;
}

.site-footer a:hover {
    color: #333;
}

.site-footer img {
    vertical-align: middle;
    margin-right: 5px;
}

/* 响应式设计 */
@media screen and (max-width: 1024px) {
    .nav-links {
        width: 60%;
    }
}

@media screen and (max-width: 768px) {
    body {
        overflow-x: hidden;
    }

    .nav-links {
        position: absolute;
        right: 0px;
        height: 92vh;
        top: 8vh;
        background-color: #333;
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 50%;
        transform: translateX(100%);
        transition: transform 0.5s ease-in;
    }

    .nav-links li {
        opacity: 0;
    }

    .burger {
        display: block;
    }
}

.nav-active {
    transform: translateX(0%);
}

@keyframes navLinkFade {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0px);
    }
}

.toggle .line1 {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.toggle .line2 {
    opacity: 0;
}

.toggle .line3 {
    transform: rotate(45deg) translate(-5px, -6px);
}    