
/* 页面整体样式设置 */
/* 使用赛博朋克主题的高对比度色彩，主色调为深色背景，辅以霓虹色光效 */
body {
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e); /* 主背景渐变 */
    color: #ffffff;
    font-family: 'Exo', sans-serif;
    overflow-x: hidden; /* 防止水平滚动条 */
}

/* 导航条样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: 60px;
    background: rgba(0, 0, 0, 0.7); /* 半透明背景 */
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.navbar a:hover {
    color: #ff00cc; /* 霓虹粉色悬停效果 */
}

/* 侧边栏样式 */
.sidebar {
    position: fixed;
    left: 0;
    top: 60px;
    width: 200px;
    height: calc(100% - 60px);
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    padding: 20px;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
}

.sidebar a {
    display: block;
    color: #ffffff;
    margin-bottom: 15px;
    text-decoration: none;
    transition: color 0.3s;
}

.sidebar a:hover {
    color: #ff00cc; /* 霓虹粉色悬停效果 */
}

/* 主内容区域样式 */
.main-content {
    margin-left: 220px; /* 侧边栏宽度 + 间距 */
    padding: 80px 40px 40px 40px; /* 顶部留白 */
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

/* 文章区块样式 */
article {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
    transition: transform 0.3s ease;
}

article:hover {
    transform: translateY(-10px); /* 鼠标悬停时的提升效果 */
}

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

.chapter-nav a {
    display: block;
    color: #ffffff;
    margin-bottom: 10px;
    text-decoration: none;
    transition: color 0.3s;
}

.chapter-nav a:hover {
    color: #ff00cc; /* 霓虹粉色悬停效果 */
}

/* 图片样式 */
img.decorative {
    width: 100%;
    max-width: 320px;
    border-radius: 15px; /* 圆角效果 */
    box-shadow: 0 4px 15px 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 20px rgba(0, 0, 0, 0.5); /* 加深阴影 */
}

/* 按钮样式 */
.btn {
    background: linear-gradient(45deg, #ff00cc, #3333ff); /* 霓虹色渐变背景 */
    border: none;
    padding: 10px 20px;
    color: #fff;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn:hover {
    background: linear-gradient(45deg, #3333ff, #ff00cc); /* 渐变反转 */
}

/* 代码块样式 */
pre {
    background: rgba(0, 0, 0, 0.7);
    padding: 15px;
    border-radius: 10px;
    overflow-x: auto;
    color: #00ffff;
    font-family: 'Courier New', Courier, monospace;
}

code {
    color: #00ffff;
}

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

.active, .collapsible:hover {
    background-color: rgba(255, 0, 204, 0.3); /* 霓虹粉色 */
}

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

@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        height: auto;
        padding: 10px;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        top: 0;
        box-shadow: none;
    }

    .main-content {
        margin-left: 0;
        padding: 100px 20px 20px 20px;
    }

    .chapter-nav {
        position: static;
        margin-bottom: 20px;
    }
}

/* 提示文本样式 */
#design-reference {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 0, 204, 0.8); /* 点缀色 */
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

/* 关键帧动画示例 */
@keyframes glow {
    0% {
        text-shadow: 0 0 5px #ff00cc, 0 0 10px #ff00cc;
    }
    50% {
        text-shadow: 0 0 20px #ff00cc, 0 0 30px #ff00cc;
    }
    100% {
        text-shadow: 0 0 5px #ff00cc, 0 0 10px #ff00cc;
    }
}

.title {
    font-size: 2.5em;
    font-weight: bold;
    text-shadow: 0 0 10px #ff00cc, 0 0 20px #ff00cc;
    animation: glow 2s infinite;
}

.subtitle {
    font-size: 1.5em;
    color: #ccccff;
    text-shadow: 0 0 5px #ccccff;
}

p {
    line-height: 1.6;
    color: #dddddd;
}

/* 数据可视化图表样式 */
.chart {
    width: 100%;
    height: 300px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.bar {
    width: 50px;
    background: #00ffff;
    position: absolute;
    bottom: 0;
    transition: height 0.5s ease;
}

.bar:hover {
    background: #ff00cc;
    transform: scaleY(1.2);
}

