
/* 
整体页面样式定义
使用未来主义风格，注重科技感与现代感的结合，运用深蓝色、荧光绿和银白色作为主要色调，确保色彩搭配和谐。
*/

/* 全局样式 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    background-color: #FFFFFF; /* 纯白色背景 */
    color: #0A0F1E; /* 主文本颜色 */
}

/* 导航栏样式 */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: #0A0F1E; /* 深蓝色背景 */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1000;
}

.header .logo {
    font-size: 24px;
    color: #39FF14; /* 荧光绿色 */
}

.nav-menu {
    display: flex;
    gap: 15px;
}

.nav-menu a {
    color: #FFFFFF;
    text-decoration: none;
    font-size: 16px;
    position: relative;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: #39FF14; /* 悬停变为荧光绿色 */
}

.nav-menu a::after {
    content: '';
    position: absolute;
    width: 0%;
    height: 2px;
    background-color: #39FF14;
    left: 0;
    bottom: -5px;
    transition: width 0.3s ease;
}

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

/* 侧边栏样式 */
.sidebar {
    position: fixed;
    left: 0;
    top: 60px;
    width: 250px;
    height: 100%;
    background-color: #1E1E1E;
    transform: translateX(-250px);
    transition: transform 0.3s ease;
    padding-top: 20px;
}

.sidebar.open {
    transform: translateX(0);
}

.sidebar a {
    display: block;
    padding: 10px 20px;
    color: #FFFFFF;
    text-decoration: none;
    font-size: 16px;
    transition: background 0.3s ease;
}

.sidebar a:hover {
    background-color: #39FF14;
    color: #0A0F1E;
}

/* 侧边栏切换按钮 */
.toggle-button {
    background-color: #39FF14;
    border: none;
    padding: 10px;
    cursor: pointer;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.toggle-button:hover {
    background-color: #2EFF0A;
}

/* 主内容区域样式 */
.main-content {
    margin-top: 60px;
    padding: 20px;
    margin-left: 270px; /* 侧边栏宽度 + 偏移 */
    transition: margin-left 0.3s ease;
}

.sidebar.open + .main-content {
    margin-left: 270px;
}

@media (max-width: 768px) {
    .sidebar {
        width: 200px;
        transform: translateX(-200px);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .sidebar.open + .main-content {
        margin-left: 200px;
    }
}

/* 章节导航系统样式 */
.chapter-nav {
    position: fixed;
    top: 100px;
    right: 20px;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

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

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

.chapter-nav a {
    text-decoration: none;
    color: #0A0F1E;
    font-size: 14px;
    transition: color 0.3s ease;
}

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

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

img.decorative:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 12px rgba(0,0,0,0.2);
}

/* 模块分隔线 */
.decorative-line {
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #39FF14, #0A0F1E);
    margin: 40px 0;
}

/* 文本内容样式 */
h2, h3, h4 {
    color: #0A0F1E;
    margin-bottom: 20px;
}

h2 {
    font-size: 24px;
    border-bottom: 2px solid #C0C0C0;
    padding-bottom: 10px;
}

h3 {
    font-size: 20px;
    margin-top: 30px;
}

p {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* 卡片式设计 */
.card {
    background-color: #F9F9F9;
    border: 1px solid #C0C0C0;
    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;
    margin-bottom: 30px;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 15px rgba(0,0,0,0.2);
}

/* 按钮样式 */
.button-primary {
    background-color: #39FF14;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    color: #0A0F1E;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.button-primary:hover {
    background-color: #2EFF0A;
}

/* 动画效果 */
@keyframes float {
    0% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0); }
}

.particle {
    position: absolute;
    width: 5px;
    height: 5px;
    background-color: #39FF14;
    border-radius: 50%;
    animation: float 5s infinite;
}

/* 3D 图表效果 */
.chart-container {
    perspective: 1000px;
}

.chart {
    width: 100%;
    height: 400px;
    transform: rotateY(10deg) rotateX(10deg);
    transition: transform 0.5s;
}

.chart:hover {
    transform: rotateY(0deg) rotateX(0deg);
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .main-content {
        margin-left: 250px;
    }

    .sidebar {
        width: 200px;
        transform: translateX(-200px);
    }

    .sidebar.open + .main-content {
        margin-left: 200px;
    }
}

@media (max-width: 768px) {
    .chapter-nav {
        display: none;
    }

    .nav-menu {
        display: none;
    }

    .toggle-button {
        display: block;
    }
}

