
/* 
整体页面样式设置，采用现代化的无衬线字体，确保文字清晰易读。背景色选用深蓝色与明亮黄色的渐变，营造科技感与温暖感的结合。利用Flexbox和Grid布局实现响应式设计，适配不同屏幕尺寸。导航栏固定在页面顶部，使用透明度变化和阴影效果增强视觉层次。主要内容区域采用模块化布局，每个模块使用卡片式设计，配以圆角和阴影，提升立体感。图片设置圆角和悬浮放大效果，增加互动性。按钮设计简洁，采用渐变色和点击缩放效果，增强用户体验。代码块采用深色背景与等宽字体，便于阅读和区分。通过关键帧动画实现元素的渐入效果，增加页面的动态感。所有内部链接添加rel="nofollow"属性，确保SEO优化。页面中显著位置显示提示文字“这是一个网页样式设计参考”，使用醒目的字体和颜色。底部区域设计简洁，包含品牌信息和用户互动入口，使用统一的色彩风格。整体色彩搭配遵循黄金比例，主色70%深蓝色，辅色25%明亮黄色，点缀色5%橙色，确保视觉平衡和高级感。利用媒体查询实现不同设备下的布局调整，确保无论是在手机、平板还是桌面，页面内容均能完整显示，无水平滚动条。表单元素和互动组件设计简洁美观，注重用户操作的便捷性和反馈效果。文字大小和行高设置合理，确保长篇阅读时的舒适性。通过CSS3的transition和transform属性，实现平滑的过渡和微动画效果，提升页面的整体流畅度和用户的沉浸体验。
*/

/* 导入Google字体 */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@700&family=Open+Sans&display=swap');

/* 全局样式 */
body {
    margin: 0;
    font-family: 'Open Sans', sans-serif;
    background: linear-gradient(135deg, #2B6CB0 70%, #ECC94B 25%, #FFA500 5%);
    color: #333333;
    line-height: 1.6;
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(43, 108, 176, 0.9);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 15px 0;
    z-index: 1000;
}

.navbar a {
    color: #FFFFFF;
    text-decoration: none;
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    transition: color 0.3s;
}

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

/* 主内容区 */
.main-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 100px 20px 40px 20px;
}

/* 提示文字样式 */
.reference-note {
    font-size: 18px;
    color: #FFFFFF;
    margin-bottom: 30px;
    font-family: 'Roboto', sans-serif;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* 章节导航 */
.chapter-nav {
    width: 100%;
    max-width: 1200px;
    display: flex;
    justify-content: space-around;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.chapter-nav a {
    color: #2B6CB0;
    text-decoration: none;
    font-size: 16px;
    margin: 10px;
    transition: color 0.3s;
}

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

/* 文章内容 */
article {
    width: 100%;
    max-width: 1200px;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

article h2, article h3, article h4 {
    font-family: 'Roboto', sans-serif;
    color: #2B6CB0;
    margin-top: 20px;
}

article p {
    font-size: 16px;
    color: #333333;
    margin-bottom: 15px;
}

article pre {
    background-color: #f5f5f5;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin-bottom: 15px;
}

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

/* 图片样式 */
.article-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.article-images img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.article-images img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 12px rgba(0,0,0,0.2);
}

/* 按钮样式 */
.button {
    background: linear-gradient(45deg, #FFC107, #FFA000);
    color: #2B6CB0;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Roboto', sans-serif;
    transition: transform 0.1s, background 0.3s;
}

.button:hover {
    background: linear-gradient(45deg, #FFD54F, #FFCA28);
}

.button:active {
    transform: scale(0.95);
}

/* 代码块样式 */
.code-example {
    background-color: #333333;
    color: #FFFFFF;
    padding: 20px;
    border-radius: 5px;
    font-family: 'Courier New', Courier, monospace;
    overflow-x: auto;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .chapter-nav {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
    }
    .chapter-nav {
        flex-direction: column;
    }
    .article-images {
        grid-template-columns: 1fr;
    }
    article {
        padding: 15px;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

/* 底部样式 */
.footer {
    background-color: rgba(43, 108, 176, 0.9);
    color: #FFFFFF;
    padding: 40px 20px;
    text-align: center;
    font-size: 16px;
    font-family: 'Roboto', sans-serif;
}

.footer input {
    padding: 10px;
    border: none;
    border-radius: 5px;
    margin-right: 10px;
    width: 60%;
    max-width: 300px;
}

.footer button {
    background: linear-gradient(45deg, #FFC107, #FFA000);
    color: #2B6CB0;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.footer button:hover {
    background: linear-gradient(45deg, #FFD54F, #FFCA28);
}

/* 交互微动画 */
.animated-element {
    animation: fadeIn 1s ease-out forwards;
}

