
/* 
    页面整体样式定义
    采用CSS3技术，实现高度响应式布局，适配320px至1920px不同宽度设备，确保无论在手机、平板或桌面端均有优异表现。
    使用不对称网格布局，结合Flexbox和Grid布局方式，打破传统对称设计，增强视觉冲击力和现代感。
    
    主色调为深蓝色(#1B254F)和灰色(#333333)，占比70%，传达专业与稳重；辅色为橙色(#FF8C00)和绿色(#3CB371)，占比25%，象征创新与活力；点缀色为白色和淡灰色，占比5%，用于细节装饰和平衡整体色彩。
    
    字体采用Roboto和Montserrat，确保良好的可读性和现代感。正文字体大小设定在16px，标题字体大小在18px左右，层次分明，视觉舒适。
    
    页面各模块之间留有适当的留白，符合呼吸感原则，通过渐变线条和装饰性元素进行视觉分隔，提升内容的独立性和辨识度。同时，利用阴影和过渡效果，增强模块的立体感和层次感。
    
    导航系统采用固定侧边栏设计，包含有意义的导航标题，帮助用户快速定位和跳转到指定内容区域。所有内部链接均添加rel="nofollow"属性，确保SEO优化。
    
    图片装饰采用圆角、阴影和悬停效果，提升视觉美观和互动性。图片大小为320x320px，使用指定的本地图片链接，描述属性为空。
    
    动态交互效果包括按钮悬停变色与轻微放大，滚动触发的元素滑入与淡入动画，提升用户体验的互动感和参与感。同时，关键CSS3代码示例部分采用不同的样式区分，与正文内容形成视觉上的区隔。
    
    响应式设计通过媒体查询实现，确保在不同设备上布局自动调整，无需左右滚动条，用户体验流畅无阻。
    
    背景采用深蓝色渐变，避免使用纯白色，提升整体色彩的丰富性和协调性。所有装饰性元素和互动动画均基于CSS3实现，确保性能优化和跨浏览器兼容性。
*/

/* 基本样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 设置背景和字体 */
body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #1B254F, #333333);
    color: #fff;
    line-height: 1.6;
    font-size: 16px;
    padding: 20px;
}

/* 设置标题字体 */
h1, h2, h3, h4 {
    font-family: 'Montserrat', sans-serif;
    color: #FF8C00;
    margin-bottom: 15px;
}

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

a:hover {
    color: #FF8C00;
}

/* 设置导航栏 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 200px;
    height: 100%;
    background-color: rgba(27, 37, 79, 0.9);
    padding: 20px;
    overflow-y: auto;
}

.navbar h2 {
    color: #fff;
    margin-bottom: 20px;
}

.navbar ul {
    list-style: none;
}

.navbar ul li {
    margin-bottom: 15px;
}

.navbar ul li a {
    color: #fff;
    font-size: 16px;
    transition: color 0.3s;
}

.navbar ul li a:hover {
    color: #FF8C00;
}

/* 主内容区域 */
.main-content {
    margin-left: 220px;
    padding: 20px;
}

/* 提示信息 */
.notice {
    background-color: rgba(60, 179, 113, 0.8);
    padding: 10px 20px;
    border-radius: 5px;
    margin-bottom: 30px;
    text-align: center;
    font-size: 18px;
    color: #fff;
}

/* 文章内容样式 */
article {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    color: #fff;
}

/* 段落和标题间隔 */
article p {
    margin-bottom: 20px;
    font-size: 16px;
    color: #f0f0f0;
}

article h2, article h3 {
    margin-top: 30px;
    margin-bottom: 15px;
    color: #FF8C00;
}

article pre {
    background: rgba(0, 0, 0, 0.5);
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin-bottom: 20px;
}

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

/* 图片样式 */
article img {
    width: 320px;
    height: 320px;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s, box-shadow 0.3s;
    margin: 20px 0;
}

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

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

table th, table td {
    border: 1px solid #3CB371;
    padding: 10px;
    text-align: center;
}

table th {
    background-color: rgba(60, 179, 113, 0.7);
    color: #fff;
}

table td {
    background-color: rgba(255, 255, 255, 0.2);
}

/* 按钮样式 */
.button {
    background-color: #FF8C00;
    color: #fff;
    padding: 10px 25px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
}

.button:hover {
    background-color: #3CB371;
    transform: scale(1.05);
}

/* Code 示例样式区分 */
.code-example {
    background-color: rgba(0, 0, 0, 0.6);
    padding: 20px;
    border-radius: 10px;
    margin: 30px 0;
    overflow-x: auto;
}

.code-example pre {
    color: #FFD700;
    font-family: 'Courier New', Courier, monospace;
}

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

.fade-in-up {
    animation: fadeInUp 1s ease-out forwards;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .navbar {
        width: 180px;
    }
    .main-content {
        margin-left: 200px;
    }
}

@media (max-width: 992px) {
    .navbar {
        width: 160px;
    }
    .main-content {
        margin-left: 180px;
    }
}

@media (max-width: 768px) {
    .navbar {
        position: static;
        width: 100%;
        height: auto;
        background-color: rgba(27, 37, 79, 0.95);
    }
    .navbar ul {
        display: flex;
        flex-wrap: wrap;
    }
    .navbar ul li {
        flex: 1 1 50%;
        text-align: center;
    }
    .main-content {
        margin-left: 0;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    article {
        padding: 20px;
    }
    article img {
        width: 100%;
        height: auto;
    }
    h1, h2, h3, h4 {
        font-size: 18px;
    }
    p {
        font-size: 15px;
    }
}

