
/* 整体布局设置，采用响应式的Flexbox与Grid布局 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Montserrat', sans-serif;
    background: linear-gradient(-45deg, #0d47a1, #6a1b9a, #283593, #1a237e);
    background-size: 400% 400%;
    animation: backgroundMove 15s ease infinite;
    color: #ffffff;
}

/* 关键帧动画，背景颜色流动 */
@keyframes backgroundMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(13, 71, 161, 0.9);
    z-index: 1000;
    padding: 20px 40px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.navbar ul {
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0;
}

.navbar li {
    position: relative;
}

.navbar a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    padding: 10px 15px;
    transition: transform 0.3s ease, color 0.3s ease;
}

.navbar a:hover {
    transform: scale(1.05);
    color: #ff6f61;
}

/* 引导区样式 */
.intro-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 150px 20px 50px 20px;
    text-align: center;
}

.intro-section h1 {
    font-family: 'Roboto', sans-serif;
    font-size: 48px;
    margin-bottom: 20px;
    color: #ff6f61;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.intro-section p {
    font-size: 18px;
    max-width: 800px;
    line-height: 1.6;
}

/* 文章内容样式 */
article {
    max-width: 1200px;
    margin: 0 auto;
    padding: 50px 20px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

article h2, article h3, article h4 {
    font-family: 'Roboto', sans-serif;
    color: #ff6f61;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

article h2 {
    font-size: 36px;
}

article h3 {
    font-size: 28px;
}

article h4 {
    font-size: 22px;
}

article p {
    font-size: 16px;
    line-height: 1.8;
    color: #f0f0f0;
}

article pre {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 8px;
    overflow: auto;
}

article code {
    font-family: 'Courier New', Courier, monospace;
    color: #ffeb3b;
    background: rgba(0, 0, 0, 0.5);
    padding: 2px 4px;
    border-radius: 4px;
}

article pre code::before {
    content: '代码示例';
    display: block;
    font-size: 14px;
    color: #ff6f61;
    margin-bottom: 5px;
}

.button {
    display: inline-block;
    padding: 10px 20px;
    background: #ff6f61;
    color: #fff;
    border-radius: 25px;
    text-decoration: none;
    transition: background 0.3s ease, transform 0.3s ease;
}

.button:hover {
    background: #ff3d00;
    transform: scale(1.05);
}

/* 图片展示样式 */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

.image-gallery img {
    width: 100%;
    height: auto;
    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);
}

/* 加载动画样式 */
.loader {
    border: 8px solid #f3f3f3;
    border-top: 8px solid #ff6f61;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 2s linear infinite;
    margin: 100px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 折叠面板样式 */
.accordion {
    background-color: #1a237e;
    color: #fff;
    cursor: pointer;
    padding: 18px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 16px;
    transition: background 0.3s ease;
    border-radius: 8px;
}

.accordion:hover {
    background-color: #283593;
}

.panel {
    padding: 0 18px;
    display: none;
    background-color: rgba(255, 255, 255, 0.1);
    overflow: hidden;
    border-radius: 0 0 8px 8px;
}

@media (max-width: 768px) {
    .navbar ul {
        flex-direction: column;
        align-items: center;
    }

    .intro-section h1 {
        font-size: 32px;
    }

    article {
        padding: 30px 10px;
    }
}

