
/* 
整体布局设置
使用流式布局结合Flexbox和Grid，确保响应式设计
主要颜色设置：深蓝色为主色，电蓝和霓虹绿为辅色，银色为点缀色
设置背景渐变，营造科技感
*/
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #001f3f 70%, #00ffff 25%, #39ff14 5%);
    color: #ecf0f1;
    overflow-x: hidden;
}

/* 
顶部固定导航栏样式
使用Flexbox布局，确保内容居中对齐
添加阴影效果，提升层次感
*/
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: rgba(0, 31, 63, 0.9);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

/* 
侧边导航栏样式
隐藏文字，仅显示图标
悬停时展开显示文字
添加过渡动画，提升互动体验
*/
.sidebar {
    position: fixed;
    left: 0;
    top: 60px;
    width: 60px;
    height: calc(100% - 60px);
    background: rgba(0, 31, 63, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: width 0.3s ease;
    overflow: hidden;
}

.sidebar:hover {
    width: 200px;
}

.sidebar a {
    width: 100%;
    padding: 20px;
    color: #39ff14;
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: background 0.3s ease;
}

.sidebar a:hover {
    background: rgba(57, 255, 20, 0.1);
}

.sidebar a .icon {
    margin-right: 10px;
}

/* 
主内容区域样式
使用Grid布局，确保每个模块宽度不低于500px
添加阴影和圆角，提升视觉层次
*/
.main-content {
    margin-left: 60px;
    padding: 80px 20px 20px 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.main-content .section {
    background: rgba(44, 62, 80, 0.8);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.main-content .section:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.5);
}

/* 
图片样式
设置圆角、阴影和悬停放大效果
*/
.section img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
}

.section img:hover {
    transform: scale(1.05);
}

/* 
标题样式
使用较大的字体并添加阴影增强视觉效果
*/
.section h2, .section h3, .section h4 {
    color: #39ff14;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.section h2 {
    font-size: 24px;
}

.section h3 {
    font-size: 20px;
}

.section h4 {
    font-size: 18px;
}

/* 
段落样式
设置适当的行高和字体大小，提升可读性
*/
.section p {
    font-size: 16px;
    line-height: 1.6;
    color: #ecf0f1;
}

/* 
代码块样式
使用背景色区分，与正文形成对比
添加内边距和圆角
*/
pre {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 8px;
    overflow: auto;
}

code {
    color: #00ffff;
    font-family: 'Courier New', Courier, monospace;
    position: relative;
}

code::before {
    content: "代码块";
    display: block;
    font-size: 14px;
    color: #39ff14;
    margin-bottom: 5px;
}

/* 
底部仪表板样式
固定在页面底部，使用Flex布局
添加渐变背景和透明度
*/
.dashboard {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 150px;
    background: rgba(44, 62, 80, 0.9);
    display: flex;
    justify-content: space-around;
    align-items: center;
    color: #ecf0f1;
    animation: fadeIn 1s ease-in-out;
}

/* 
动画效果定义
*/
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 
数据流动画样式
使用伪元素和关键帧动画
*/
.data-flow::before {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 200%;
    height: 100%;
    background: linear-gradient(
        to right,
        rgba(0, 255, 255, 0),
        rgba(0, 255, 255, 0.5),
        rgba(0, 255, 255, 0)
    );
    animation: flow 5s linear infinite;
}

/* 
关键帧动画定义
*/
@keyframes flow {
    from {
        transform: translateX(0%);
    }
    to {
        transform: translateX(100%);
    }
}

/* 
提示信息样式
突出显示
*/
.notice {
    text-align: center;
    font-size: 20px;
    color: #ff4136;
    margin: 20px 0;
    font-weight: bold;
}

/* 
响应式调整
适配不同屏幕宽度，确保内容不小于500px
*/
@media (max-width: 768px) {
    .sidebar {
        width: 60px;
    }

    .sidebar:hover {
        width: 150px;
    }

    .main-content {
        margin-left: 60px;
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 480px) {
    .sidebar {
        width: 60px;
    }

    .sidebar:hover {
        width: 140px;
    }

    .main-content {
        margin-left: 60px;
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .section h2 {
        font-size: 20px;
    }

    .section p {
        font-size: 14px;
    }
}

