
/* 全局样式设置 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif; /* 使用现代无衬线字体 */
    background: linear-gradient(135deg, #e0f7fa, #ffffff); /* 背景渐变，避免纯白色 */
    color: #333;
}

/* 导航栏样式 */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #0078FF; /* 主色调蓝色 */
    padding: 15px 30px;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); /* 阴影效果 */
}

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

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

/* 响应式导航栏 */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start;
    }
    .navbar a {
        margin: 5px 0;
    }
}

/* 主要内容区样式 */
.main-content {
    padding: 100px 20px 50px 20px; /* 留出导航栏高度 */
    display: grid;
    grid-template-columns: 1fr 3fr 1fr;
    gap: 20px;
}

/* 侧边栏样式 */
.sidebar {
    background-color: #f1f1f1; /* 辅助色灰色 */
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.sidebar img {
    width: 100%;
    border-radius: 10px; /* 圆角 */
    box-shadow: 0 2px 4px rgba(0,0,0,0.2); /* 阴影 */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sidebar img:hover {
    transform: scale(1.05); /* 悬浮放大效果 */
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

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

.article-content h2, .article-content h3 {
    color: #0078FF;
}

.article-content pre {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    border-left: 4px solid #34C759; /* 点缀色绿色 */
}

.article-content code {
    font-family: 'Courier New', Courier, monospace;
    color: #0078FF;
}

/* 提示信息样式 */
.highlight-note {
    background-color: #FFF3E0; /* 柔和的背景色 */
    border-left: 4px solid #FFA726; /* 点缀色橙色 */
    padding: 10px 20px;
    margin: 20px 0;
    border-radius: 5px;
}

/* 图片展示区样式 */
.image-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
}

.image-gallery img {
    width: calc(25% - 15px);
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

@media (max-width: 1200px) {
    .image-gallery img {
        width: calc(33.333% - 15px);
    }
}

@media (max-width: 768px) {
    .image-gallery img {
        width: calc(50% - 15px);
    }
}

@media (max-width: 480px) {
    .image-gallery img {
        width: 100%;
    }
}

/* 按钮样式 */
.button {
    background: linear-gradient(45deg, #34C759, #FFA726); /* 主色与点缀色渐变 */
    border: none;
    padding: 10px 20px;
    color: #ffffff;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
    font-size: 16px;
}

.button:hover {
    background: linear-gradient(45deg, #FFA726, #34C759); /* 颜色反转 */
    transform: translateY(-2px); /* 轻微上移 */
}

/* 代码示例样式 */
.code-example {
    background-color: #2d2d2d;
    color: #f8f8f2;
    padding: 20px;
    border-radius: 5px;
    font-family: 'Courier New', Courier, monospace;
    overflow-x: auto;
    margin: 20px 0;
}

.code-example::before {
    content: "代码示例";
    display: block;
    font-size: 14px;
    color: #66d9ef;
    margin-bottom: 5px;
}

/* 底部样式 */
.footer {
    background-color: #0078FF;
    color: #ffffff;
    padding: 20px;
    text-align: center;
}

.footer a {
    color: #FFA726;
    text-decoration: none;
    margin: 0 10px;
}

.footer a:hover {
    text-decoration: underline;
}

/* 提示信息突出显示 */
.prominent-note {
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    color: #FF5722;
    margin: 30px 0;
    animation: fadeIn 2s ease-in-out;
}

/* 渐变线条样式 */
.gradient-line {
    height: 4px;
    background: linear-gradient(90deg, #34C759, #0078FF, #FFA726);
    border-radius: 2px;
    margin: 20px 0;
    animation: slide 3s linear infinite;
}

/* 动画关键帧 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slide {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

/* 折叠内容样式 */
.collapsible {
    background-color: #f1f1f1;
    color: #333;
    cursor: pointer;
    padding: 10px 20px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 16px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

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

.collapsible:after {
    content: '\002B'; /* 加号 */
    font-size: 13px;
    float: right;
    margin-left: 5px;
}

.collapsible.active:after {
    content: "\2212"; /* 减号 */
}

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

