
/* 全局样式设置 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif; /* 使用现代无衬线字体 */
    background: linear-gradient(135deg, #0d47a1, #6a1b9a); /* 深蓝与紫色渐变背景 */
    color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden; /* 防止出现水平滚动条 */
}

/* 容器设置，使用网格布局 */
.container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    grid-gap: 40px;
    padding: 60px 20px;
    max-width: 1920px;
    margin: 0 auto;
}

/* 模块块的通用样式 */
.module {
    background: rgba(255, 255, 255, 0.1); /* 半透明背景 */
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3); /* 立体感阴影效果 */
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.module:hover {
    transform: translateY(-10px); /* 悬停时微动效果 */
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

/* 标题样式 */
h2, h3 {
    color: #ffffff;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.6); /* 标题阴影增强可读性 */
}

h2 {
    font-size: 2em;
}

h3 {
    font-size: 1.5em;
}

/* 段落样式 */
p {
    font-size: 16px;
    margin-bottom: 20px;
    text-align: justify; /* 两端对齐，提高可读性 */
}

/* 按钮样式 */
.button {
    display: inline-block;
    padding: 12px 25px;
    background: #ff9800; /* 点缀色橙色 */
    color: #ffffff;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.3s ease, transform 0.3s ease;
}

.button:hover {
    background: #e68900;
    transform: scale(1.05); /* 悬停时放大效果 */
}

/* 图片样式，圆角、阴影与悬停效果 */
img.decorative {
    width: 100%;
    max-width: 320px;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

img.decorative:hover {
    transform: scale(1.05); /* 悬停时轻微放大 */
    box-shadow: 0 8px 25px rgba(0,0,0,0.5);
}

/* 代码块样式，与正文内容区分 */
pre {
    background: rgba(0, 0, 0, 0.8);
    padding: 20px;
    border-radius: 10px;
    overflow: auto;
    position: relative;
    margin-bottom: 20px;
}

code {
    color: #00e676;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    white-space: pre-wrap;
}

pre code::before {
    content: '代码示例：';
    display: block;
    color: #ffeb3b;
    font-weight: bold;
    margin-bottom: 10px;
}

pre code {
    overflow: visible; /* 防止::before被遮挡 */
}

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

.top-nav.scrolled {
    background: rgba(13, 71, 161, 1); /* 滚动后背景更不透明 */
}

.top-nav a {
    color: #ffffff;
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.3s ease;
}

.top-nav a:hover {
    color: #ff9800; /* 点缀色橙色 */
}

/* 侧边导航栏样式 */
.side-nav {
    position: fixed;
    left: 0;
    top: 60px;
    width: 250px;
    height: 100%;
    background: rgba(106, 27, 154, 0.95); /* 半透明紫色 */
    padding: 20px;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 999;
}

.side-nav.open {
    transform: translateX(0);
}

.side-nav a {
    display: block;
    color: #ffffff;
    text-decoration: none;
    margin-bottom: 15px;
    transition: color 0.3s ease;
}

.side-nav a:hover {
    color: #00e676; /* 点缀色绿色 */
}

/* 侧边导航切换按钮 */
.side-nav-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    background: #6a1b9a; /* 紫色 */
    color: #ffffff;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    z-index: 1001;
    transition: background 0.3s ease;
}

.side-nav-toggle:hover {
    background: #4a148c; /* 深紫色 */
}

/* 面包屑导航样式 */
.breadcrumb {
    margin-top: 80px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    font-size: 14px;
}

/* 表格样式 */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.data-table th, .data-table td {
    padding: 15px;
    text-align: center;
}

.data-table thead {
    background: rgba(13, 71, 161, 0.8);
}

.data-table th {
    color: #ffffff;
    font-weight: bold;
}

.data-table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.05);
}

.trend {
    font-size: 1.2em;
}

.trend.up {
    color: #4caf50; /* 绿色表示上升 */
}

.trend.down {
    color: #f44336; /* 红色表示下降 */
}

/* 仪表盘样式 */
.dashboard {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    padding: 20px;
}

.dashboard-item {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 150px;
    height: 150px;
    margin: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dashboard-item:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(255, 165, 0, 0.7); /* 橙色阴影 */
}

/* 仪表盘图标 */
.dashboard-item i {
    font-size: 2em;
    color: #ffffff;
}

/* 折叠区域样式 */
.collapsible {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    cursor: pointer;
    padding: 18px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 16px;
    transition: background 0.3s ease;
    border-radius: 5px;
}

.active, .collapsible:hover {
    background: rgba(255, 152, 0, 0.7); /* 点缀色橙色 */
}

.content {
    padding: 0 18px;
    display: none;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0 0 5px 5px;
}

/* 动态星河动画 */
@keyframes starFlow {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: -10000px 5000px;
    }
}

.background-star {
    width: 100%;
    height: 100vh;
    background: url('https://images.gptkong.com/demo/sample1.png') repeat;
    animation: starFlow 200s linear infinite;
    position: fixed;
    top: 0;
    left: 0;
    z-index: -1;
}

/* 固定顶导航在小屏幕上的调整 */
@media (max-width: 768px) {
    .top-nav {
        flex-direction: column;
        align-items: flex-start;
    }
    .side-nav {
        width: 200px;
    }
    .container {
        grid-template-columns: 1fr;
        padding: 80px 10px;
    }
    h2 {
        font-size: 1.8em;
    }
    h3 {
        font-size: 1.3em;
    }
    p {
        font-size: 15px;
    }
}

/* 按钮光晕效果 */
.button-hover::after {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    width: calc(100% + 20px);
    height: calc(100% + 20px);
    border-radius: 10px;
    border: 2px solid rgba(255, 152, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.button-hover:hover::after {
    opacity: 1;
}

/* 光晕效果 */
.glow::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    filter: blur(20px);
    z-index: -1;
}

/* 阴影盒子 */
.shadow-box {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

