
/* 全局样式设置 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif; /* 使用Roboto无衬线字体 */
    color: #ffffff; /* 文字颜色为白色 */
    background: linear-gradient(135deg, #2c5364, #203a43, #0f2027); /* 背景渐变色 */
    line-height: 1.6;
}

/* 导航栏样式 */
.navbar {
    position: fixed; /* 固定在顶部 */
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.2); /* 半透明背景 */
    backdrop-filter: blur(10px); /* 磨砂玻璃效果 */
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 1rem 0;
    z-index: 1000; /* 确保导航栏在最上层 */
}

.navbar a {
    color: #ffffff;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.navbar a:hover {
    color: #ff9800; /* 悬停时颜色变化 */
}

/* 主容器样式 */
.container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr)); /* 响应式网格布局 */
    gap: 2rem;
    padding: 6rem 2rem 2rem 2rem; /* 顶部留出导航栏空间 */
    max-width: 1920px;
    margin: 0 auto;
}

/* 文章样式 */
article {
    background: rgba(255, 255, 255, 0.1); /* 半透明背景 */
    backdrop-filter: blur(8px); /* 磨砂玻璃效果 */
    border-radius: 10px; /* 圆角 */
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5); /* 阴影效果 */
}

/* 标题样式 */
h2, h3 {
    color: #ffffff;
    margin-bottom: 1rem;
    line-height: 1.2;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

/* 段落样式 */
p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    color: #e0e0e0;
}

/* 代码块样式 */
pre {
    background: rgba(0, 0, 0, 0.7); /* 深色背景 */
    padding: 1rem;
    border-radius: 5px;
    overflow: auto;
    position: relative;
}

pre code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    color: #00ffea;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* 代码块前添加标签 */
pre code::before {
    content: "代码示例";
    display: block;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #ff9800;
}

/* 图片装饰样式 */
.decorative-image {
    width: 100%;
    max-width: 320px;
    border-radius: 10px; /* 圆角 */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5); /* 阴影 */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.decorative-image:hover {
    transform: scale(1.05); /* 悬停放大效果 */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.7); /* 加深阴影 */
}

/* 提示文字样式 */
.reference-note {
    text-align: center;
    font-size: 1.2rem;
    margin: 2rem 0;
    color: #ff9800;
    font-weight: bold;
}

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

    .container {
        grid-template-columns: 1fr;
        padding: 6rem 1rem 1rem 1rem;
    }

    .decorative-image {
        max-width: 100%;
    }
}

/* 按钮样式 */
.button {
    background: linear-gradient(135deg, #ff7e5f, #feb47b);
    border: none;
    padding: 0.75rem 1.5rem;
    color: #ffffff;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.3s ease, background 0.3s ease;
    font-size: 1rem;
}

.button:hover {
    transform: translateY(-5px);
    background: linear-gradient(135deg, #feb47b, #ff7e5f);
}

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

a:hover {
    color: #ff9800;
}

/* 折叠区域样式 */
.collapsible {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    padding: 1rem;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.collapsible:hover {
    background: rgba(255, 255, 255, 0.3);
}

.content {
    display: none;
    padding: 1rem 0;
    color: #e0e0e0;
}

