
/* 全局样式设置 */
/* 使用柔和的深蓝色作为主色调，银灰色作为辅助色，橙色作为点缀色 */
body {
    margin: 0;
    font-family: 'Oswald', sans-serif; /* 使用无衬线字体，确保清晰易读 */
    color: #333333;
    background: linear-gradient(135deg, #0d47a1 70%, #c0c0c0 25%, #ff9800 5%);
    line-height: 1.6;
}

/* 导航栏样式 */
.navbar {
    background: linear-gradient(90deg, #0d47a1, #c0c0c0); /* 渐变背景 */
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    padding: 15px 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* 阴影效果 */
}

.navbar a {
    color: #ffffff;
    text-decoration: none;
    margin: 0 15px;
    transition: color 0.3s ease;
}

.navbar a:hover {
    color: #ff9800; /* 悬停变色 */
}

/* 容器样式，使用网格布局 */
.container {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
    padding: 100px 20px 40px 20px; /* 顶部留白避免导航栏遮挡 */
}

/* 文章内容样式 */
article {
    grid-column: span 12;
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.8); /* 半透明背景 */
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* 文章标题样式 */
article h2, article h3, article h4 {
    color: #0d47a1;
    margin-top: 20px;
    margin-bottom: 10px;
}

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

/* 代码块样式，区分于正文 */
article pre {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin-bottom: 20px;
}

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

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

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

/* 提示信息样式 */
.prompt-message {
    text-align: center;
    font-size: 18px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.6);
    padding: 20px;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 10px;
    z-index: 2000;
    display: none; /* 初始隐藏，需通过JavaScript触发显示 */
}

/* 响应式设计 */
@media (max-width: 1920px) {
    body {
        font-size: 16px;
    }
}

@media (max-width: 1200px) {
    .container {
        grid-template-columns: repeat(8, 1fr);
    }
}

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

    .container {
        grid-template-columns: repeat(4, 1fr);
    }

    article {
        padding: 15px;
    }

    .prompt-message {
        font-size: 16px;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 2s ease-in-out;
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.slide-in {
    animation: slideIn 1s ease-out forwards;
}

/* 过渡效果 */
button, .button {
    background-color: #0d47a1;
    color: #ffffff;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

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

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #dddddd;
}

th {
    background-color: #0d47a1;
    color: #ffffff;
}

tr:hover {
    background-color: #f1f1f1;
}

/* 底部样式 */
.footer {
    background: #0d47a1;
    color: #ffffff;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-top: 40px;
}

.footer a {
    color: #ff9800;
    margin-right: 15px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: #ffffff;
}

/* 折叠区域样式 */
.collapsible {
    background-color: #e0e0e0;
    color: #333;
    cursor: pointer;
    padding: 10px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 16px;
    border-radius: 5px;
    margin-top: 10px;
}

.active, .collapsible:hover {
    background-color: #0d47a1;
    color: #ffffff;
}

.content {
    padding: 0 18px;
    display: none;
    overflow: hidden;
    background-color: #f9f9f9;
    border-radius: 5px;
    margin-bottom: 10px;
}

/* 手风琴效果 */
.collapsible.active + .content {
    display: block;
}

/* 过渡效果 */
.collapsible, .content {
    transition: all 0.3s ease;
}

