
/* 全局样式设置 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif; /* 使用Roboto字体，确保字体美观和现代感 */
    background: linear-gradient(135deg, #1E2A48, #0D1B2A); /* 背景采用深蓝色渐变，营造高科技氛围 */
    color: #D3D3D3; /* 全局文字颜色为银灰色，保持整体协调 */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: 60px;
    background-color: rgba(30, 42, 72, 0.9); /* 半透明深蓝色背景 */
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3); /* 添加阴影效果，增强立体感 */
    z-index: 1000; /* 确保导航栏在最上层 */
}

/* 侧边栏样式 */
.sidebar {
    position: fixed;
    top: 60px;
    left: 0;
    width: 250px;
    height: calc(100% - 60px);
    background-color: #1E2A48; /* 深蓝色背景 */
    transition: width 0.3s; /* 宽度过渡效果 */
    overflow: hidden;
    box-shadow: 2px 0 5px rgba(0,0,0,0.3); /* 侧边栏阴影 */
}

.sidebar.collapsed {
    width: 60px; /* 折叠后的宽度 */
}

/* 侧边栏导航链接 */
.sidebar a {
    display: block;
    padding: 15px 20px;
    color: #D3D3D3;
    text-decoration: none;
    transition: background 0.3s, color 0.3s;
}

.sidebar a:hover {
    background-color: #3FFB5F; /* 悬停时背景变为荧光绿 */
    color: #1E2A48;
}

/* 主要内容区域样式 */
.main-content {
    margin-top: 60px;
    margin-left: 250px;
    padding: 20px;
    transition: margin-left 0.3s; /* 主内容区域的左边距过渡 */
    flex: 1;
}

/* 侧边栏折叠时主要内容区域调整 */
.sidebar.collapsed + .main-content {
    margin-left: 60px;
}

/* 置顶提示信息样式 */
.prominent-message {
    text-align: center;
    font-size: 1.5em;
    margin: 20px 0;
    color: #3FFB5F; /* 点缀色突出显示 */
    animation: fadeIn 2s ease-in-out; /* 文字淡入效果 */
}

/* 文章内容样式 */
article {
    background: rgba(30, 42, 72, 0.8); /* 半透明深蓝背景 */
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2); /* 文章容器阴影 */
}

article h2, article h3, article h4 {
    color: #D3D3D3;
    margin-top: 20px;
}

article p {
    font-size: 16px;
    line-height: 1.6;
    margin: 15px 0;
}

article pre {
    background: #1E2A48;
    padding: 15px;
    border-radius: 5px;
    overflow: auto;
    margin: 15px 0;
}

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

/* 图片样式 */
img.decorative {
    width: 100%;
    max-width: 320px;
    height: auto;
    border-radius: 10px; /* 圆角效果 */
    box-shadow: 0 4px 10px rgba(0,0,0,0.3); /* 阴影增加立体感 */
    transition: transform 0.3s, box-shadow 0.3s; /* 悬停时的过渡效果 */
}

img.decorative:hover {
    transform: scale(1.05); /* 悬停时稍作放大 */
    box-shadow: 0 6px 15px rgba(0,0,0,0.4); /* 增强阴影 */
}

/* 章节导航系统样式 */
.chapter-navigation {
    position: fixed;
    top: 60px;
    right: 0;
    width: 200px;
    background-color: rgba(30, 42, 72, 0.9);
    padding: 20px;
    box-shadow: -2px 0 5px rgba(0,0,0,0.3);
    overflow-y: auto;
    height: calc(100% - 60px);
}

.chapter-navigation h3 {
    color: #3FFB5F;
    margin-bottom: 10px;
}

.chapter-navigation a {
    display: block;
    color: #D3D3D3;
    text-decoration: none;
    margin: 5px 0;
    transition: color 0.3s;
}

.chapter-navigation a:hover {
    color: #3FFB5F;
}

/* 面包屑导航样式 */
.breadcrumb {
    position: fixed;
    bottom: 0;
    width: 100%;
    background-color: rgba(30, 42, 72, 0.9);
    padding: 10px 20px;
    display: flex;
    font-family: 'Roboto', sans-serif;
    color: #D3D3D3;
}

.breadcrumb a {
    color: #3FFB5F;
    text-decoration: none;
    margin-right: 5px;
}

.breadcrumb a::after {
    content: '>';
    margin-left: 5px;
    color: #D3D3D3;
}

.breadcrumb a:last-child::after {
    content: '';
}

/* 折叠内容样式 */
.collapsed-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
}

.expanded .collapsed-content {
    max-height: 500px; /* 根据内容调整最大高度 */
}

/* CSS3代码示例样式 */
.code-example {
    background: #1E2A48;
    padding: 15px;
    border-radius: 5px;
    overflow: auto;
    margin: 15px 0;
}

.code-example code {
    color: #3FFB5F;
    font-family: 'Courier New', Courier, monospace;
}

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

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

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

@media (max-width: 1200px) {
    .chapter-navigation {
        display: none; /* 小屏幕隐藏章节导航 */
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 60px;
    }

    .main-content {
        margin-left: 60px;
    }

    .navbar {
        flex-direction: column;
        height: auto;
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .prominent-message {
        font-size: 1.2em;
    }

    article {
        padding: 10px;
    }

    img.decorative {
        max-width: 100%;
    }
}

/* 链接样式，强制添加 rel="nofollow" 属性 */
a {
    text-decoration: none;
    color: inherit;
}

a[rel="nofollow"] {
    /* 无特殊样式，只确保属性设置 */
}

/* 按钮样式 */
button {
    background-color: #3FFB5F;
    color: #1E2A48;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

button:hover {
    background-color: #2ECC71;
}

/* 卡片式布局样式 */
.card {
    background: rgba(30, 42, 72, 0.9);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    margin: 20px 0;
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 15px rgba(0,0,0,0.3);
}

/* 信息层次感提升样式 */
.section {
    margin-bottom: 40px;
}

.section-title {
    font-size: 1.8em;
    color: #3FFB5F;
    margin-bottom: 20px;
}

/* 折叠区域按钮样式 */
.toggle-button {
    background: none;
    border: none;
    color: #3FFB5F;
    cursor: pointer;
    font-size: 1em;
    margin-top: 10px;
}

.toggle-button:hover {
    text-decoration: underline;
}

