
/* 全局样式设置 */
/* 设置页面的基本字体、背景和色彩 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
    color: #ffffff;
    line-height: 1.6;
}

/* 设置响应式布局 */
.container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    grid-gap: 20px;
    padding: 20px;
}

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

.module:hover {
    transform: scale(1.05);
}

/* 标题样式 */
h2 {
    font-size: 1.8em;
    color: #00ffff;
    margin-bottom: 10px;
}

h3, h4 {
    font-size: 1.6em;
    color: #a0e7e5;
}

/* 段落样式 */
p {
    font-size: 1.6em;
    margin-bottom: 15px;
}

/* 链接样式 */
a {
    color: #ff77ff;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #ffffff;
}

/* 按钮样式 */
.button {
    background-color: #00ffff;
    border: none;
    padding: 10px 20px;
    color: #fff;
    font-family: 'Roboto', sans-serif;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.button:hover {
    background-color: #00aaff;
    transform: translateY(-3px);
}

.button:active {
    background-color: #0088cc;
    transform: translateY(0);
}

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

img:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.5);
}

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

code {
    color: #00ffff;
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.4em;
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(32, 58, 67, 0.9);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
}

.navbar a {
    margin: 0 10px;
    color: #a0e7e5;
}

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

/* 章节导航样式 */
.chapter-nav {
    position: fixed;
    right: 20px;
    top: 100px;
    background: rgba(32, 58, 67, 0.8);
    padding: 10px 15px;
    border-radius: 5px;
}

.chapter-nav a {
    display: block;
    color: #a0e7e5;
    margin-bottom: 5px;
    text-decoration: none;
}

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

/* 媒体查询实现响应式设计 */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
    }

    .chapter-nav {
        display: none;
    }
}

/* 背景动画 */
@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

body {
    background-size: 400% 400%;
    animation: gradientFlow 15s ease infinite;
}

/* 粒子动画 */
.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: #00ffff;
    animation: moveParticle 10s linear infinite;
}

@keyframes moveParticle {
    from { transform: translateY(0) translateX(0); opacity: 1; }
    to { transform: translateY(-100vh) translateX(100vw); opacity: 0; }
}

