
/* 全局样式设置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
/* 设定基础字体和背景 */
body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #2c3e50 70%, #2980b9 25%, #e74c3c 5%);
    color: #ecf0f1;
    line-height: 1.6;
    transition: background 0.5s ease;
    overflow-x: hidden;
}
/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(44, 62, 80, 0.9);
    padding: 20px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.navbar .logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #00bfff;
}
.navbar ul {
    list-style: none;
    display: flex;
    gap: 20px;
}
.navbar ul li a {
    color: #bdc3c7;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease;
}
.navbar ul li a:hover {
    color: #00bfff;
}
/* 主题切换按钮 */
.toggle-theme {
    cursor: pointer;
    color: #00bfff;
    font-size: 1.2rem;
}
/* 主内容区样式 */
.container {
    max-width: 1200px;
    margin: 100px auto 50px;
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 40px;
}
/* 侧边导航样式 */
.sidebar {
    position: sticky;
    top: 80px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.sidebar a {
    color: #bdc3c7;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease;
}
.sidebar a:hover {
    color: #00bfff;
}
/* 主要内容样式 */
.content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}
.content h2 {
    font-size: 2rem;
    color: #ffffff;
    margin-bottom: 10px;
}
.content h3 {
    font-size: 1.5rem;
    color: #ffffff;
    margin-bottom: 8px;
}
.content p {
    font-size: 1rem;
    color: #bdc3c7;
    line-height: 1.8;
}
.content pre {
    background: #1a252f;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
}
.content code {
    color: #00bfff;
    font-family: 'Courier New', Courier, monospace;
}
/* 图片样式 */
img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}
/* 悬浮按钮样式 */
.floating-button {
    position: fixed;
    left: 20px;
    bottom: 20px;
    background: linear-gradient(45deg, #00bfff, #007acc);
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: background 0.3s ease, transform 0.3s ease;
    z-index: 1000;
}
.floating-button:hover {
    background: linear-gradient(45deg, #007acc, #005f99);
    transform: scale(1.1);
}
/* 代码块样式 */
.code-block {
    background: #1a252f;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
}
.code-block code {
    color: #00bfff;
    font-family: 'Courier New', Courier, monospace;
}
/* 折叠内容样式 */
.collapsible {
    background-color: #34495e;
    color: #ecf0f1;
    cursor: pointer;
    padding: 10px 20px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 1rem;
    border-radius: 5px;
    transition: background 0.3s ease;
}
.collapsible:hover {
    background-color: #3d566e;
}
.collapsible:after {
    content: '\002B';
    float: right;
    margin-left: 5px;
}
.collapsible.active:after {
    content: "\2212";
}
.content .content-section {
    display: none;
    padding: 15px 20px;
    background-color: #2c3e50;
    border-radius: 5px;
    margin-top: 10px;
}
.content .content-section p {
    color: #bdc3c7;
}
/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
    }
    .sidebar {
        flex-direction: row;
        overflow-x: auto;
    }
    .sidebar a {
        flex: 1;
        text-align: center;
    }
}
@media (max-width: 480px) {
    .navbar {
        padding: 15px 20px;
    }
    .navbar .logo {
        font-size: 1.2rem;
    }
    .navbar ul {
        display: none;
    }
    .toggle-theme {
        font-size: 1rem;
    }
    .floating-button {
        width: 50px;
        height: 50px;
    }
}
/* 动态粒子效果 */
.particles {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: transparent;
    overflow: hidden;
    z-index: -1;
}
.particle {
    position: absolute;
    width: 5px;
    height: 5px;
    background: rgba(0, 191, 255, 0.7);
    border-radius: 50%;
    animation: move 10s linear infinite;
}
@keyframes move {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 1;
    }
    100% {
        transform: translateY(-1000px) translateX(1000px);
        opacity: 0;
    }
}
/* 提示信息样式 */
.highlight-text {
    background: #2980b9;
    padding: 10px 20px;
    border-radius: 5px;
    text-align: center;
    font-size: 1.2rem;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

