
/* 
 * 全局样式设置
 * 设置页面的基础字体、背景色、颜色等
 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif; /* 使用现代无衬线字体 */
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364); /* 渐变背景，增加科技感 */
    color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden; /* 防止出现水平滚动条 */
}

/* 
 * 导航栏样式
 * 固定在页面顶部，包含多级菜单
 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(32, 58, 67, 0.9); /* 半透明背景 */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

.navbar li {
    position: relative;
}

.navbar a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

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

.navbar li:hover > ul {
    display: block;
}

.navbar ul ul {
    display: none;
    position: absolute;
    top: 35px;
    left: 0;
    background: #2c5364;
    padding: 10px 0;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.navbar ul ul li {
    width: 150px;
    padding: 10px 20px;
}

.navbar ul ul li:hover {
    background: #203a43;
}

/* 
 * 主要内容容器
 * 使用网格布局，响应式设计
 */
.container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 100px 50px 50px 50px; /* 顶部留出导航栏空间 */
}

/* 
 * 模块样式
 * 卡片式设计，带有悬停动画
 */
.module {
    background: rgba(44, 83, 100, 0.9);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, background 0.3s ease;
}

.module:hover {
    transform: scale(1.05);
    background: #2c5364;
}

/* 
 * 标题样式
 * 使用不同层级的标题，增强信息层次
 */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    margin-bottom: 15px;
}

h1 {
    font-size: 2.5em;
    color: #e94560;
}

h2 {
    font-size: 2em;
    color: #ffffff;
}

/* 
 * 段落样式
 * 保持良好的可读性
 */
p {
    font-weight: 300;
    margin-bottom: 15px;
}

/* 
 * 图片样式
 * 设置图片大小和浮动方式
 */
img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    margin-bottom: 15px;
}

/* 
 * 按钮样式
 * 采用鲜艳的辅助色，增加视觉冲击
 */
.button {
    background: #e94560;
    border: none;
    padding: 10px 20px;
    color: #ffffff;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
}

.button:hover {
    background: #ff6f61;
    transform: translateY(-2px);
}

/* 
 * 卡片悬停效果
 * 添加阴影和位移，增强互动性
 */
.card {
    background: #2c5364;
    border-radius: 10px;
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.card:hover {
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
    transform: translateY(-5px);
}

/* 
 * 主题切换按钮样式
 * 允许用户更改页面主题
 */
.theme-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #ffffff;
    border: none;
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: background 0.3s ease;
}

.theme-toggle:hover {
    background: #e94560;
}

/* 
 * 粒子效果样式
 * 为页面背景添加动态粒子
 */
.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #ffffff;
    border-radius: 50%;
    opacity: 0.7;
    animation: particleMove 10s infinite;
}

@keyframes particleMove {
    0% { transform: translateY(0) translateX(0); opacity: 0.7; }
    50% { transform: translateY(-20px) translateX(20px); opacity: 0.3; }
    100% { transform: translateY(0) translateX(0); opacity: 0.7; }
}

/* 
 * 数据可视化图表样式
 * 简易柱状图的基本样式
 */
.chart {
    display: flex;
    align-items: flex-end;
    height: 200px;
    gap: 10px;
}

.bar {
    width: 30px;
    background: #e94560;
    transition: height 0.3s ease, background 0.3s ease;
}

.bar:hover {
    background: #ff6f61;
    height: 220px;
}

/* 
 * 固定导航栏响应式调整
 * 确保在小屏幕设备上导航栏的可用性
 */
@media (max-width: 768px) {
    .navbar ul {
        flex-direction: column;
        background: rgba(32, 58, 67, 0.9);
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        display: none;
    }
    
    .navbar ul.active {
        display: flex;
    }
    
    .navbar .menu-toggle {
        display: block;
        cursor: pointer;
    }
}

/* 
 * 过渡和动画效果
 * 增加页面加载和内容呈现的动态感
 */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 
 * 高亮显示特定元素
 * 用于强调重要信息
 */
.highlight {
    color: #ff6f61;
    font-weight: bold;
}

/* 
 * 附加样式
 * 其他辅助性样式，提升页面整体效果
 */
footer {
    background: rgba(32, 58, 67, 0.9);
    padding: 20px 50px;
    text-align: center;
    color: #ffffff;
    position: relative;
    bottom: 0;
    width: 100%;
}

footer a {
    color: #e94560;
    text-decoration: none;
    margin: 0 10px;
}

footer a:hover {
    text-decoration: underline;
}

/* 
 * 背景视频样式
 * 用于首页大幅视觉区
 */
.background-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    opacity: 0.5;
}

/* 
 * 响应式图片调整
 * 适应不同设备的屏幕尺寸
 */
@media (max-width: 480px) {
    .container {
        padding: 100px 20px 20px 20px;
    }
    
    .navbar ul {
        flex-direction: column;
    }

    .navbar ul ul {
        position: static;
    }
}

