
/* 全局样式设置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 设定页面背景与字体 */
body {
    font-family: 'Roboto', sans-serif; /* 使用现代无衬线字体 */
    color: #333333; /* 主文字颜色 */
    line-height: 1.6; /* 行高 */
    background: linear-gradient(135deg, #424242 70%, #67FF5E 25%, #FFC107 5%); /* 渐变背景 */
    padding: 20px;
}

/* 导航栏样式 */
.navbar {
    width: 100%;
    background: rgba(33, 150, 243, 0.8); /* 半透明背景 */
    padding: 15px 0;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: background 0.3s;
}

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

.navbar li {
    margin: 0 20px;
}

.navbar a {
    color: #ffffff;
    text-decoration: none;
    font-size: 18px;
    transition: color 0.3s, background 0.3s;
}

.navbar a:hover {
    color: #000000;
    background: #67FF5E;
    padding: 5px 10px;
    border-radius: 5px;
}

/* 主内容区 */
.main-content {
    max-width: 1200px;
    margin: 100px auto 50px;
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 20px;
}

/* 侧边栏样式 */
.sidebar {
    display: none;
}

@media (min-width: 768px) {
    .sidebar {
        display: block;
        position: sticky;
        top: 100px;
    }
    .main-content {
        grid-template-columns: 1fr 3fr;
    }
}

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

.article h2, .article h3, .article h4 {
    color: #2196F3;
    margin-bottom: 15px;
}

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

.article pre {
    background: #f0f0f0;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin-bottom: 15px;
}

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

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

.article img:hover {
    transform: scale(1.05);
}

/* 提示文本样式 */
.reference-note {
    text-align: center;
    font-size: 20px;
    color: #FF5722;
    margin-bottom: 30px;
}

/* 按钮样式 */
.button {
    display: inline-block;
    padding: 10px 20px;
    background: #67FF5E;
    color: #ffffff;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s, transform 0.3s;
    margin-top: 20px;
}

.button:hover {
    background: #43A047;
    transform: translateY(-3px);
}

/* 折叠内容样式 */
.collapsible {
    background-color: #2196F3;
    color: white;
    cursor: pointer;
    padding: 10px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 18px;
    border-radius: 5px;
    margin-top: 20px;
}

.active, .collapsible:hover {
    background-color: #1976D2;
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 代码块样式 */
.code-block {
    background: #272822;
    color: #f8f8f2;
    padding: 20px;
    border-radius: 5px;
    overflow-x: auto;
    font-family: 'Fira Code', monospace;
    margin-bottom: 20px;
}

.code-block code {
    display: block;
    white-space: pre-wrap;
}

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

.article th, .article td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}

.article th {
    background-color: #2196F3;
    color: white;
}

/* 导航栏调整 */
@media (max-width: 768px) {
    .navbar ul {
        flex-direction: column;
    }
    .navbar li {
        margin: 10px 0;
    }
}

/* 确保无水平滚动 */
body {
    overflow-x: hidden;
}

