
/* 页面整体样式设置 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Lato', sans-serif; /* 使用易读字体 */
    background: linear-gradient(135deg, #0E243B 70%, #1EA7FD 25%, #FF5A5F 5%);
    color: #0E243B;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* 响应式布局 */
    box-sizing: border-box;
    overflow-x: hidden;
}

/* 主要导航栏样式 */
header {
    width: 100%;
    background-color: rgba(14, 36, 59, 0.9);
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

header .logo {
    font-size: 24px;
    font-weight: bold;
    color: #FFFFFF;
}

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

nav ul li a {
    text-decoration: none;
    color: #FFFFFF;
    font-size: 16px;
    transition: color 0.3s ease, transform 0.3s ease;
}

nav ul li a:hover {
    color: #FF5A5F;
    transform: scale(1.1);
}

/* 主体内容样式 */
.main-content {
    padding: 100px 20px 40px 20px; /* 顶部预留导航栏空间 */
    max-width: 1200px;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 40px;
}

/* 文章内容样式 */
article {
    background-color: rgba(242, 242, 242, 0.8);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(14, 36, 59, 0.1);
    position: relative;
}

article h2, article h3 {
    font-family: 'Roboto', sans-serif;
    color: #0E243B;
}

article p {
    font-size: 16px;
    line-height: 1.6;
    color: #333333;
}

article pre {
    background-color: #1EA7FD;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin: 20px 0;
}

article pre code {
    color: #FFFFFF;
    font-family: 'Courier New', Courier, monospace;
}

/* 图片样式 */
.image-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.image-gallery img {
    width: 320px;
    height: 320px;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.image-gallery img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}

/* 提示信息样式 */
.notice {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(255, 90, 95, 0.9);
    color: #FFFFFF;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* 响应式设计 */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: flex-start;
    }

    nav ul {
        flex-direction: column;
        width: 100%;
    }

    nav ul li {
        width: 100%;
    }

    nav ul li a {
        display: block;
        width: 100%;
        padding: 10px 0;
    }

    .main-content {
        grid-template-columns: 1fr;
    }

    .image-gallery img {
        width: 100%;
        height: auto;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

article, .image-gallery {
    animation: fadeIn 1s ease-in-out;
}

/* 链接样式 */
a {
    color: #1EA7FD;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* 代码块样式 */
code {
    background-color: #333333;
    color: #FFFFFF;
    padding: 2px 4px;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
}

/* 按钮样式 */
.button {
    background-color: #FF5A5F;
    color: #FFFFFF;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.button:hover {
    background-color: #e04e52;
    transform: scale(1.05);
}

