
/* 主体色彩变量定义 */
:root {
    --main-color: #0d47a1; /* 主色调：深蓝色，营造科技感与稳定性 */
    --secondary-color: #424242; /* 辅色：深灰色，增强层次感 */
    --accent-color-orange: #ff9800; /* 点缀色：橙色，吸引注意力 */
    --accent-color-green: #4caf50; /* 点缀色：绿色，突出重点区域 */
    --background-gradient: linear-gradient(135deg, var(--main-color), var(--secondary-color)); /* 页面背景渐变 */
    --text-color: #ffffff; /* 文字颜色：白色，确保可读性 */
    --font-family: 'Roboto', sans-serif; /* 字体选择：Roboto，现代无衬线字体 */
}

/* 全局样式 */
body {
    margin: 0;
    padding: 0;
    background: var(--background-gradient);
    color: var(--text-color);
    font-family: var(--font-family);
    line-height: 1.6;
    font-size: 16px;
    scroll-behavior: smooth;
}

/* 提示信息样式 */
.header-banner {
    background-color: rgba(255, 152, 0, 0.9); /* 橙色半透明背景 */
    color: #ffffff;
    text-align: center;
    padding: 20px 0;
    font-size: 18px;
    font-weight: bold;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(13, 71, 161, 0.95); /* 深蓝色半透明背景 */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    z-index: 999;
    transition: background-color 0.3s ease;
}

.navbar:hover {
    background-color: var(--main-color); /* 鼠标悬停时背景不变 */
}

.navbar .logo {
    font-size: 24px;
    font-weight: bold;
}

.navbar ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

.navbar ul li {
    margin-left: 20px;
}

.navbar ul li a {
    color: #ffffff;
    text-decoration: none;
    position: relative;
    padding: 5px 0;
    transition: color 0.3s ease;
}

.navbar ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background-color: var(--accent-color-orange);
    left: 0;
    bottom: -5px;
    transition: width 0.3s ease;
}

.navbar ul li a:hover::after {
    width: 100%;
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        align-items: center;
    }
    .navbar ul {
        flex-direction: column;
    }
    .navbar ul li {
        margin-left: 0;
        margin-top: 10px;
    }
}

/* 主内容区域样式 */
.main-content {
    display: flex;
    flex-wrap: wrap;
    margin-top: 100px; /* 留出导航栏空间 */
    padding: 20px;
    gap: 20px;
}

.module {
    flex: 1 1 500px;
    background-color: rgba(66, 66, 66, 0.8);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.module:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

/* 图片样式 */
.module img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.module img:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

/* 文章内容样式 */
article {
    max-width: 1200px;
    margin: 0 auto;
}

article h2, article h3, article h4 {
    color: var(--accent-color-orange);
}

article pre {
    background-color: #2d2d2d;
    padding: 15px;
    border-radius: 5px;
    overflow: auto;
}

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

article pre code::before {
    content: '';
    display: block;
    height: 3px;
    background: var(--accent-color-green);
    margin-bottom: 10px;
}

@media (max-width: 1200px) {
    .main-content {
        flex-direction: column;
    }
    .module {
        flex: 1 1 100%;
    }
}

