
/* 全局样式设置 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif; /* 使用无衬线字体 */
    color: #ffffff;
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364); /* 主色调渐变背景 */
    overflow-x: hidden; /* 防止水平滚动条出现 */
}

/* 固定导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(0, 32, 39, 0.9); /* 辅色背景 */
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 15px 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: background 0.3s ease;
}

.navbar a {
    color: #00d2ff; /* 点缀色 */
    text-decoration: none;
    font-size: 18px;
    transition: color 0.3s ease;
}

.navbar a:hover {
    color: #00aaff;
}

/* 侧边导航样式 */
.side-nav {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 15px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.side-nav:hover {
    opacity: 1;
}

.side-nav a {
    width: 40px;
    height: 40px;
    background-color: rgba(0, 210, 255, 0.7); /* 点缀色 */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.side-nav a:hover {
    background-color: #00aaff;
}

/* 主内容区样式 */
.main-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 80px; /* 留出导航栏空间 */
    padding-bottom: 50px;
}

/* 标题样式 */
h1, h2, h3, h4 {
    color: #00d2ff; /* 点缀色 */
    text-align: center;
    margin: 20px 0;
}

h1 {
    font-size: 32px;
}

h2 {
    font-size: 28px;
}

h3 {
    font-size: 24px;
}

h4 {
    font-size: 20px;
}

/* 文章样式 */
article {
    max-width: 1200px;
    width: 90%;
    background: rgba(32, 58, 67, 0.8); /* 辅色背景 */
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    margin-bottom: 40px;
}

article p {
    font-size: 16px;
    line-height: 1.6;
    margin: 15px 0;
}

article pre {
    background: #1e2a31;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
}

article code {
    color: #00d2ff;
    font-family: 'Courier New', Courier, monospace;
}

/* 图片样式 */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    width: 90%;
    max-width: 1200px;
    margin-bottom: 40px;
}

.image-gallery img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* 突出提示文本样式 */
.highlight-text {
    background: #00d2ff;
    color: #0f2027;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 18px;
    margin: 30px 0;
    box-shadow: 0 4px 8px rgba(0, 210, 255, 0.4);
}

/* 折叠内容样式 */
.collapsible {
    background: rgba(32, 58, 67, 0.8);
    color: #ffffff;
    cursor: pointer;
    padding: 15px;
    width: 90%;
    max-width: 1200px;
    border: none;
    text-align: left;
    outline: none;
    font-size: 18px;
    border-radius: 8px;
    margin: 10px 0;
    transition: background 0.3s ease;
}

.collapsible:hover {
    background: rgba(0, 210, 255, 0.7);
}

.content {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
    background: rgba(32, 58, 67, 0.6);
    border-radius: 0 0 8px 8px;
}

.content p {
    margin: 15px 0;
}

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

    .side-nav {
        right: 10px;
    }

    h1 {
        font-size: 28px;
    }

    h2 {
        font-size: 24px;
    }

    h3 {
        font-size: 20px;
    }

    h4 {
        font-size: 18px;
    }

    .highlight-text {
        font-size: 16px;
    }

    .collapsible {
        font-size: 16px;
    }
}

