
/* 全局样式设置，包括字体、颜色及基本布局 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Lato', sans-serif;
    background-color: #000000; /* 深空黑作为主色调，营造神秘感 */
    color: #F0F2F5; /* 浅灰色作为文字颜色，确保高对比度 */
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: #8A2BE2; /* 银河紫作为辅色，增强科技感 */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.navbar .logo {
    font-size: 1.5em;
    font-weight: bold;
    color: #32CD32; /* 极光绿作为点缀色，突出品牌标识 */
}

.navbar ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

.navbar ul li {
    margin: 0 15px;
    position: relative;
}

.navbar ul li a {
    text-decoration: none;
    color: #F0F2F5;
    font-size: 1em;
    transition: color 0.3s ease;
}

.navbar ul li a:hover {
    color: #32CD32; /* 悬停时颜色变化，提升互动感 */
}

.dropdown {
    display: none;
    position: absolute;
    top: 40px;
    left: 0;
    background-color: #8A2BE2;
    padding: 10px;
    border-radius: 5px;
}

.navbar ul li:hover .dropdown {
    display: block;
}

.dropdown a {
    display: block;
    color: #F0F2F5;
    padding: 5px 0;
    font-size: 0.9em;
}

.dropdown a:hover {
    color: #32CD32;
}

/* 主要内容容器 */
.container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 100px 40px 40px 40px; /* 顶部留出导航栏空间 */
    background: linear-gradient(-45deg, #8A2BE2, #32CD32, #FFA500, #00BFFF);
    background-size: 400% 400%;
    animation: moveBackground 15s ease infinite; /* 背景动画 */
}

/* 背景动画关键帧 */
@keyframes moveBackground {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 卡片式设计 */
.card {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding: 20px;
}

.card:hover {
    transform: rotateY(10deg) scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.5);
}

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

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

/* 标题样式 */
h2, h3, h4 {
    font-family: 'Orbitron', sans-serif;
    color: #00BFFF; /* 电光蓝作为标题颜色，突出重点 */
    margin-bottom: 15px;
}

/* 正文样式 */
p {
    font-size: 1em;
    line-height: 1.6;
    color: #F0F2F5;
}

/* 代码块样式 */
pre {
    background-color: rgba(0, 0, 0, 0.7);
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
}

code {
    color: #32CD32;
    font-family: 'Courier New', Courier, monospace;
}

/* 按钮样式 */
.button {
    background: linear-gradient(45deg, #32CD32, #FFA500);
    border: none;
    border-radius: 25px;
    padding: 10px 20px;
    color: #fff;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
}

.button:hover {
    background: linear-gradient(45deg, #FFA500, #32CD32);
    transform: scale(1.05);
}

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

.collapsible:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.content {
    padding: 0 18px;
    display: none;
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
}

/* 章节导航样式 */
.chapter-nav {
    position: fixed;
    right: 20px;
    top: 100px;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 10px;
    border-radius: 10px;
}

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

.chapter-nav a:hover {
    color: #FFA500;
}

/* 提示文字样式 */
.reference-note {
    text-align: center;
    font-size: 1.2em;
    margin: 20px 0;
    color: #FFA500; /* 点缀色吸引注意 */
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar ul {
        flex-direction: column;
        align-items: flex-start;
    }

    .navbar ul li {
        margin: 10px 0;
    }

    .chapter-nav {
        display: none; /* 移动设备隐藏章节导航 */
    }

    .container {
        padding: 100px 20px 20px 20px;
    }
}

