
/* 全局样式设置
   ---------------------------
   设置页面的基本字体、背景和文字颜色，确保整体风格协调统一。
*/
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif; /* 正文字体采用现代清晰的Roboto */
    background: linear-gradient(135deg, #003366, #4B3621); /* 主色调深蓝到棕色渐变背景 */
    color: #FFFFFF;
    line-height: 1.6;
}

/* 头部提示信息
   ---------------------------
   在页面显著位置显示提示信息，提醒用户这是一个网页样式设计参考。
*/
.header-notice {
    background-color: rgba(255, 235, 59, 0.8); /* 明黄色半透明背景 */
    color: #003366; /* 深蓝文字颜色 */
    text-align: center;
    padding: 15px 0;
    font-size: 18px;
    font-weight: bold;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 顶部导航栏
   ---------------------------
   设置导航栏的布局、背景色和链接样式，确保导航清晰易用。
*/
.navbar {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background-color: rgba(0, 51, 102, 0.9); /* 深蓝色半透明背景 */
    padding: 20px 0;
    position: fixed;
    top: 60px; /* 头部提示信息下方 */
    width: 100%;
    z-index: 999;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar a {
    color: #FFFFFF;
    text-decoration: none;
    margin: 0 15px;
    font-size: 16px;
    transition: color 0.3s ease;
}

.navbar a:hover {
    color: #FFEB3B; /* 高亮色黄变 */
}

/* 主内容区
   ---------------------------
   使用网格布局，确保内容有序分布，响应式设计适配不同屏幕。
*/
.container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 150px 50px 50px 50px; /* 顶部预留导航空间 */
    max-width: 1200px;
    margin: 0 auto;
}

/* 文章样式
   ---------------------------
   设置文章内各级标题、段落和代码块的样式，确保内容清晰易读。
*/
article {
    background-color: rgba(117, 132, 196, 0.9); /* 辅助色复蓝背景 */
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

article h2, article h3, article h4 {
    font-family: 'Futura', sans-serif; /* 标题字体采用复古Futura */
    color: #FFEB3B; /* 高亮色黄 */
}

article h2 {
    font-size: 24px;
    margin-bottom: 15px;
}

article h3 {
    font-size: 20px;
    margin-top: 20px;
    margin-bottom: 10px;
}

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

article pre {
    background-color: #004080;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
}

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

/* 按钮样式
   ---------------------------
   样式化按钮，添加悬停动画效果，提升交互体验。
*/
.button {
    background: #2995C4; /* 电光蓝背景 */
    color: #FFFFFF;
    padding: 10px 25px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.5s ease, transform 0.3s ease;
}

.button:hover {
    background: linear-gradient(45deg, #2995C4, #FFEB3B); /* 渐变背景 */
    transform: translateY(-5px); /* 浮动效果 */
}

/* 图片样式
   ---------------------------
   为装饰性图片添加圆角、阴影和悬停放大效果。
*/
.decorative-image {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.decorative-image:hover {
    transform: scale(1.05); /* 放大效果 */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

/* 按钮链接样式
   ---------------------------
   设置链接按钮的外观和悬停效果。
*/
a.button-link {
    display: inline-block;
    background: #2995C4;
    color: #FFFFFF;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    transition: background 0.5s ease, transform 0.3s ease;
}

a.button-link:hover {
    background: linear-gradient(45deg, #2995C4, #FFEB3B);
    transform: translateY(-5px);
}

/* 数据图表样式
   ---------------------------
   设置实时数据图表的外观和动画效果。
*/
.chart-bar {
    width: 50px;
    height: 0;
    background-color: #FFEB3B;
    margin: 5px;
    animation: grow 2s forwards;
}

@keyframes grow {
    to {
        height: 200px;
    }
}

/* 仪表盘样式
   ---------------------------
   设置用户可定制的仪表盘模块布局和悬停效果。
*/
.dashboard {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.dashboard-item {
    flex: 1 1 300px;
    background-color: rgba(75, 54, 33, 0.9); /* 深棕色背景 */
    padding: 20px;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dashboard-item:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

/* 教育模块样式
   ---------------------------
   设置教育模块的网格布局和响应式设计。
*/
.education-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 20px 0;
}

.education-item {
    background-color: rgba(117, 132, 196, 0.8); /* 辅助色复蓝背景 */
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.education-item:hover {
    transform: translateY(-10px);
}

/* 面包屑导航样式
   ---------------------------
   设置面包屑导航的外观和链接样式。
*/
.breadcrumb {
    margin: 20px 0;
    font-size: 14px;
}

.breadcrumb a {
    color: #FFEB3B;
    text-decoration: none;
    margin-right: 5px;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: #FFFFFF;
}

/* 页脚样式
   ---------------------------
   设置页脚的布局和文字样式。
*/
.footer {
    background-color: rgba(0, 51, 102, 0.9); /* 深蓝色背景 */
    color: #FFFFFF;
    text-align: center;
    padding: 20px 0;
    margin-top: 50px;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
}

.footer p {
    margin: 0;
    font-size: 14px;
}

/* 响应式设计
   ---------------------------
   使用媒体查询优化不同屏幕尺寸下的布局和字体大小。
*/
@media (max-width: 1024px) {
    .container {
        padding: 150px 30px 30px 30px;
    }

    .navbar {
        flex-direction: column;
    }

    .navbar a {
        margin: 10px 0;
    }

    .education-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header-notice {
        font-size: 16px;
        padding: 10px 0;
    }

    .navbar {
        padding: 15px 0;
    }

    .navbar a {
        font-size: 14px;
        margin: 8px 0;
    }

    article h2 {
        font-size: 22px;
    }

    article h3 {
        font-size: 18px;
    }

    article p {
        font-size: 15px;
    }

    .button, a.button-link {
        font-size: 14px;
        padding: 8px 18px;
    }
}

/* 高级CSS3效果
   ---------------------------
   定义页面中过渡、动画和变换效果，增强视觉表现力。
*/
.fade-in {
    animation: fadeIn 1s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-up {
    animation: slideUp 0.5s ease-in-out;
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* 链接样式调整
   ---------------------------
   设置所有外部链接的样式，确保添加nofollow属性后不影响视觉。
*/
a[rel="nofollow"] {
    color: #FFEB3B;
    text-decoration: none;
    border-bottom: 1px dashed #FFEB3B;
    transition: color 0.3s ease, border-bottom 0.3s ease;
}

a[rel="nofollow"]:hover {
    color: #FFFFFF;
    border-bottom: 1px solid #FFFFFF;
}

