
/* 
整体页面样式
采用现代Web技术栈，包括HTML5和CSS3，确保页面在各种设备上的响应式展示。
主色调为深蓝色，辅以亮橙色和绿色点缀，营造未来科技感。
*/

/* 设定全局字体和背景 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #0D47A1, #1976D2); /* 主色调渐变背景 */
    color: #FFFFFF;
    overflow-x: hidden; /* 防止水平滚动条 */
}

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

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

.navbar a:hover {
    color: #FFC107; /* 点缀色高亮 */
}

/* 子菜单样式 */
.nav-item {
    position: relative;
}

.sub-menu {
    display: none;
    position: absolute;
    top: 40px;
    left: 0;
    background: #1976D2;
    border-radius: 5px;
    overflow: hidden;
    transform: rotateX(-90deg);
    transform-origin: top;
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
}

.nav-item:hover .sub-menu {
    display: block;
    transform: rotateX(0deg);
    opacity: 1;
}

.sub-menu a {
    display: block;
    padding: 10px 20px;
    color: #FFFFFF;
    text-decoration: none;
}

.sub-menu a:hover {
    background: #1565C0;
}

/* 章节导航样式 */
.chapter-navigation {
    position: fixed;
    top: 60px;
    right: 20px;
    background: rgba(25, 118, 210, 0.9);
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

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

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

/* 主内容区域样式 */
.container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 100px 20px 20px 20px; /* 顶部留出导航栏空间 */
    max-width: 1200px;
    margin: 0 auto;
}

/* 模块样式 */
.module {
    background: rgba(30, 136, 229, 0.8);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* 悬停效果 */
.module:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
}

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

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

/* 代码块样式 */
pre {
    background: #263238;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
}

code {
    color: #80CBC4;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
}

/* 强调样式 */
.highlight {
    background: rgba(255, 152, 0, 0.2);
    padding: 2px 4px;
    border-radius: 4px;
}

/* 标题样式 */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    margin-bottom: 15px;
}

h2 {
    font-size: 24px;
}

h3 {
    font-size: 20px;
}

h4 {
    font-size: 18px;
}

/* 正文样式 */
p, span, a {
    font-family: 'Roboto', sans-serif;
    font-weight: 300;
    line-height: 1.6;
    color: #FFFFFF;
}

/* 按钮样式 */
.button-primary {
    background: linear-gradient(45deg, #FF9800, #FFC107);
    border: none;
    border-radius: 5px;
    padding: 10px 20px;
    color: #FFFFFF;
    cursor: pointer;
    transition: background 0.3s ease;
}

.button-primary:hover {
    background: linear-gradient(45deg, #FFA000, #FFD54F);
}

/* 响应式设计 */
@media (min-width: 768px) {
    .container {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

/* 折叠区域样式 */
.collapsible {
    background-color: rgba(25, 118, 210, 0.8);
    color: white;
    cursor: pointer;
    padding: 10px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 18px;
    border-radius: 5px;
    margin-top: 10px;
    transition: background 0.3s ease;
}

.active, .collapsible:hover {
    background-color: #1565C0;
}

.content {
    padding: 0 18px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background-color: rgba(30, 136, 229, 0.8);
    border-radius: 5px;
    margin-bottom: 10px;
}

/* 点缀色高亮 */
.accent {
    color: #FFC107;
}

/* 标注文字 */
.important {
    background: rgba(255, 152, 0, 0.3);
    padding: 2px 4px;
    border-radius: 4px;
}

/* 结尾样式 */
.footer {
    text-align: center;
    padding: 20px;
    background: rgba(13, 71, 161, 0.9);
    margin-top: 20px;
    border-radius: 10px;
}

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

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