
/* 
    页面整体样式设计
    采用卡片式布局，结合现代Web技术栈，实现响应式设计，确保在不同设备上均有良好表现。
    颜色方案遵循黄金比例，主色为蓝色70%，辅色为紫色25%，点缀色为橙色5%，营造出科技感与专业性的视觉效果。
    使用Roboto字体，标题与正文区分不同粗细，确保可读性与美观性。
*/

/* 基本样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 设置全局字体 */
body {
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    color: #333333;
    background: linear-gradient(135deg, #0074D9, #8E44AD);
    background-size: cover;
    background-repeat: no-repeat;
    position: relative;
    line-height: 1.6;
    padding: 20px;
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
}

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

.navbar a:hover {
    color: #FFA500;
}

/* 章节导航样式 */
.chapter-nav {
    margin-top: 80px; /* 为固定导航栏留出空间 */
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.chapter-nav a {
    background: rgba(255, 255, 255, 0.2);
    padding: 10px 20px;
    border-radius: 25px;
    color: #ffffff;
    text-decoration: none;
    transition: background 0.3s, transform 0.3s;
}

.chapter-nav a:hover {
    background: #FFA500;
    transform: scale(1.1);
}

/* 提示信息样式 */
.reference-note {
    text-align: center;
    font-size: 1.2em;
    color: #FFA500;
    margin: 40px 0;
    font-weight: bold;
}

/* 内容区块样式 */
.content-section {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 30px;
    margin: 20px 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.content-section h2 {
    color: #FFA500;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.content-section p {
    margin-bottom: 15px;
    font-size: 1em;
    color: #ffffff;
}

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

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

/* 卡片样式 */
.card {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    padding: 20px;
    margin: 20px 0;
}

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

/* 渐变线条装饰 */
.separator {
    height: 2px;
    background: linear-gradient(90deg, #0074D9, #8E44AD);
    margin: 40px 0;
    border: none;
    border-radius: 5px;
}

/* 按钮样式 */
.button {
    background: #FFA500;
    border: none;
    border-radius: 5px;
    color: #ffffff;
    padding: 10px 20px;
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
    font-size: 1em;
}

.button:hover {
    background: #ff7f00;
    transform: translateY(-2px);
}

/* Neumorphism按钮样式 */
.neumorphism-button {
    background: #e0e0e0;
    border-radius: 12px;
    box-shadow:  5px 5px 15px #a3a3a3,
                 -5px -5px 15px #ffffff;
    padding: 10px 20px;
    cursor: pointer;
    transition: box-shadow 0.3s;
    font-size: 1em;
}

.neumorphism-button:active {
    box-shadow: inset 5px 5px 15px #a3a3a3,
                inset -5px -5px 15px #ffffff;
}

/* 动画样式 */
@keyframes draw {
    to {
        stroke-dashoffset: 0;
    }
}

.line-chart path {
    stroke: #0074D9;
    stroke-width: 2;
    fill: none;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: draw 3s forwards;
}

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

    .content-section {
        padding: 20px;
    }

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

    .navbar a {
        margin: 10px 0;
    }
}

/* 代码块样式 */
code {
    background: rgba(0,0,0,0.7);
    color: #FFA500;
    padding: 5px 10px;
    border-radius: 5px;
    font-family: 'Courier New', Courier, monospace;
}

pre {
    background: rgba(0,0,0,0.8);
    padding: 20px;
    border-radius: 10px;
    overflow-x: auto;
    margin: 20px 0;
}

pre code {
    display: block;
    white-space: pre-wrap;
    word-wrap: break-word;
}

