
/* 全局样式设置 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif; /* 使用Roboto无衬线字体 */
    background: linear-gradient(135deg, #0a0a0a, #1e1e1e); /* 渐变背景，营造深色科技感 */
    color: #ffffff; /* 白色文字，确保高对比度 */
    line-height: 1.6;
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.9); /* 半透明背景 */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.5);
    z-index: 1000;
}

.navbar .logo {
    font-size: 1.5em;
    font-weight: bold;
    color: #39ff14; /* 点缀色，荧光绿 */
}

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

.navbar .nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: #39ff14;
    left: 0;
    bottom: -5px;
    transition: width 0.3s;
}

.navbar .nav-links a:hover::after {
    width: 100%;
}

.navbar .nav-links a[rel="nofollow"]::after {
    /* 确保内部链接添加了nofollow属性，不做特殊样式 */
}

/* 主要内容区域 */
.main-content {
    padding: 100px 50px 50px 50px; /* 留出顶部导航栏的空间 */
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 30px;
}

/* 侧边栏样式 */
.sidebar {
    background: rgba(26, 26, 26, 0.8);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.sidebar h3 {
    margin-top: 0;
    color: #39ff14;
}

.sidebar ul {
    list-style: none;
    padding: 0;
}

.sidebar ul li {
    margin-bottom: 10px;
}

.sidebar ul li a {
    text-decoration: none;
    color: #ffffff;
    transition: color 0.3s;
}

.sidebar ul li a:hover {
    color: #1e90ff;
}

/* 文章内容样式 */
.article-content {
    background: rgba(26, 26, 26, 0.8);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.article-content h2,
.article-content h3 {
    color: #1e90ff;
}

.article-content pre {
    background: #1a1a1a;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
}

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

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

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

/* 代码块样式 */
.code-block {
    background: #1a1a1a;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
}

.code-block code {
    color: #39ff14;
    font-family: 'Courier New', Courier, monospace;
    display: block;
}

/* 提示信息样式 */
.highlight {
    background: linear-gradient(135deg, #1e90ff, #39ff14);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.2em;
    font-weight: bold;
    text-align: center;
    margin-bottom: 30px;
}

/* 章节导航样式 */
.chapter-nav {
    position: fixed;
    right: 20px;
    top: 100px;
    background: rgba(26, 26, 26, 0.9);
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.chapter-nav h3 {
    margin-top: 0;
    color: #1e90ff;
    text-align: center;
}

.chapter-nav ul {
    list-style: none;
    padding: 0;
}

.chapter-nav ul li {
    margin-bottom: 10px;
}

.chapter-nav ul li a {
    text-decoration: none;
    color: #ffffff;
    transition: color 0.3s;
}

.chapter-nav ul li a:hover {
    color: #39ff14;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 1fr 2fr;
    }
}

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

    .main-content {
        grid-template-columns: 1fr;
        padding: 120px 20px 20px 20px;
    }

    .chapter-nav {
        display: none; /* 在小屏幕设备隐藏章节导航 */
    }
}

/* 折叠区域样式 */
.collapsible {
    background: rgba(57, 255, 20, 0.1);
    color: #ffffff;
    cursor: pointer;
    padding: 10px;
    border: none;
    text-align: left;
    outline: none;
    font-size: 1em;
    transition: background 0.3s;
    border-radius: 5px;
    width: 100%;
}

.collapsible:hover {
    background: rgba(57, 255, 20, 0.2);
}

.content {
    padding: 0 18px;
    display: none;
    background-color: rgba(26, 26, 26, 0.8);
    overflow: hidden;
    border-radius: 5px;
    margin-bottom: 10px;
}


