
/* 全局样式设置 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #1E3A8A 70%, #F97316 25%, #FFFFFF 5%);
    color: #374151;
    line-height: 1.6;
    overflow-x: hidden; /* 防止出现水平滚动条 */
}

/* 顶部导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(30, 58, 138, 0.9);
    color: #FFFFFF;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1000;
    transition: top 0.3s;
}

.navbar.hidden {
    top: -80px;
}

.navbar a {
    color: #FFFFFF;
    text-decoration: none;
    margin: 0 10px;
    font-size: 16px;
}

.navbar a:hover {
    color: #F97316; /* 点缀色 */
}

/* 主容器样式 */
.container {
    max-width: 1200px;
    margin: 100px auto 50px auto;
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

/* 文章内容样式 */
article {
    background-color: #FFFFFF;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

article h2, article h3 {
    color: #1E3A8A; /* 主色调 */
}

article p {
    font-size: 16px;
    margin-bottom: 1em;
}

/* 按钮样式 */
.button {
    background: linear-gradient(45deg, #1E3A8A, #3B82F6);
    border: none;
    color: white;
    padding: 15px 30px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

/* 图片样式 */
img.decorative {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

img.decorative:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0,0,0,0.2);
}

/* 代码块样式 */
pre code {
    background-color: #F3F4F6;
    padding: 15px;
    border-radius: 5px;
    display: block;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
    color: #1E3A8A;
    margin-bottom: 1em;
}

/* 折叠区域样式 */
.collapsible {
    background-color: #F3F4F6;
    color: #1E3A8A;
    cursor: pointer;
    padding: 15px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 18px;
    transition: background-color 0.3s;
    margin-top: 20px;
}

.collapsible:hover {
    background-color: #E5E7EB;
}

.content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background-color: #FFFFFF;
    padding: 0 15px;
}

.collapsible.active + .content {
    max-height: 500px; /* 根据内容高度调整 */
    padding: 15px;
}

/* 面包屑导航样式 */
.breadcrumb {
    display: flex;
    list-style: none;
    padding: 10px 20px;
    background-color: #F3F4F6;
    border-radius: 5px;
    margin-bottom: 20px;
}

.breadcrumb li + li::before {
    content: '>';
    padding: 0 8px;
    color: #9CA3AF;
}

.breadcrumb a {
    text-decoration: none;
    color: #3B82F6;
    transition: color 0.3s;
}

.breadcrumb a:hover {
    color: #1E40AF;
}

/* 背景动画 */
.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1E3A8A 25%, #3B82F6 25%, #3B82F6 50%, #1E3A8A 50%, #1E3A8A 75%, #3B82F6 75%, #3B82F6 100%);
    background-size: 56.57px 56.57px;
    animation: moveBackground 10s linear infinite;
    z-index: -1;
}

@keyframes moveBackground {
    from {
        background-position: 0 0;
    }
    to {
        background-position: 56.57px 56.57px;
    }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .container {
        grid-template-columns: 1fr;
    }
}

