
/* 全局样式重置，确保不同浏览器下样式一致 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 设置基础字体和背景颜色，遵循主色调和辅助色 */
body {
    font-family: 'Roboto', sans-serif; /* 选择现代无衬线字体 */
    font-size: 16px;
    color: #1E2A43; /* 主色调深蓝 */
    background: linear-gradient(135deg, #4F94FF 70%, #F7F7F7 30%); /* 渐变背景 */
    line-height: 1.6;
    transition: background 0.3s ease, color 0.3s ease;
    padding: 0;
    margin: 0;
}

/* 设置固定导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(30, 42, 67, 0.8); /* 半透明背景 */
    backdrop-filter: blur(10px); /* 玻璃拟态效果 */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* 导航链接样式 */
.navbar a {
    color: #FFFFFF; /* 白色文字 */
    text-decoration: none;
    margin: 0 15px;
    transition: color 0.3s ease;
    font-size: 16px;
}

.navbar a:hover {
    color: #4F94FF; /* 点缀色悬停 */
}

/* 主容器样式，确保内容不被导航栏遮挡 */
.container {
    max-width: 1200px;
    margin: 100px auto 50px; /* 顶部留出导航栏高度 */
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

/* 文章标题样式 */
article h2 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #1E2A43;
    text-align: center;
}

/* 副标题样式 */
article h3 {
    font-size: 20px;
    margin: 15px 0;
    color: #4F94FF; /* 辅助色 */
}

/* 段落样式 */
article p {
    font-size: 16px;
    margin-bottom: 15px;
    color: #333333;
}

/* 代码块样式，确保与正文区分 */
pre {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    border-radius: 10px;
    padding: 15px;
    overflow: auto;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    position: relative;
}

/* 代码块内文字样式 */
pre code {
    font-family: 'Courier New', Courier, monospace;
    color: #FFD700; /* 点缀色高亮 */
    font-size: 14px;
    display: block;
}

/* 为代码块添加标题 */
pre code::before {
    content: "代码示例";
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: #FFFFFF;
}

/* 图片样式，添加圆角和阴影 */
img.decorative {
    width: 100%;
    max-width: 320px;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* 提示文本样式，确保醒目 */
.highlight-text {
    font-size: 18px;
    font-weight: bold;
    color: #FF4500; /* 点缀色橙色 */
    text-align: center;
    margin: 20px 0;
}

/* 响应式网格布局，适配不同屏幕 */
@media (min-width: 600px) {
    .container {
        grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    }
}

/* 按钮样式，增强交互性 */
button {
    background: linear-gradient(45deg, #4F94FF, #1E2A43);
    border: none;
    border-radius: 25px;
    color: white;
    padding: 10px 20px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
    font-size: 16px;
}

button:hover {
    background: linear-gradient(45deg, #1E2A43, #4F94FF);
    transform: translateY(-3px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

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

.collapsible:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 0 15px;
}

.content p {
    padding: 10px 0;
}

/* 关键帧动画示例 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 1s ease-in-out;
}

/* 卡片样式，应用玻璃拟态效果 */
.card {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 20px;
    transition: transform 0.3s ease;
}

.card:hover {
    transform: scale(1.02);
}

/* 导航栏内logo样式 */
.navbar .logo {
    font-size: 20px;
    font-weight: bold;
    color: #FFFFFF;
}

/* 代码块样式优化 */
pre code {
    background: rgba(30, 42, 67, 0.9);
    color: #FFD700;
    padding: 10px;
    border-radius: 5px;
}

/* 悬停效果，增加用户反馈 */
a, button {
    transition: all 0.3s ease;
}

/* 面包屑导航样式 */
.breadcrumb {
    margin: 20px 0;
    font-size: 14px;
}

.breadcrumb a {
    color: #4F94FF;
    text-decoration: none;
    margin-right: 5px;
}

.breadcrumb a::after {
    content: ">";
    margin-left: 5px;
    color: #1E2A43;
}

.breadcrumb a:last-child::after {
    content: "";
}

