
/* 
 * 全局样式设置
 * 设置页面的背景渐变，字体，颜色等基础样式
 */
body {
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #0F2027, #203A43, #2C5364); /* 渐变背景 */
    color: #FFFFFF; /* 文字颜色 */
    font-family: 'Roboto', sans-serif; /* 字体设置 */
    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-around;
    padding: 15px 0;
    z-index: 1000;
    transition: background 0.3s ease;
}

.navbar:hover {
    background: rgba(32, 58, 67, 1);
}

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

.navbar a:hover {
    color: #7FFF00; /* 点缀色 */
}

/* 
 * 侧边按钮样式
 * 固定在页面右侧中间，圆形按钮，悬停时放大
 */
.side-button {
    position: fixed;
    right: 20px;
    bottom: 50%;
    background: #00CED1; /* 辅助色 */
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.side-button:hover {
    transform: scale(1.1);
}

/* 
 * 主标题样式
 * 大字体，阴影效果，居中显示
 */
.header-title {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    text-align: center;
    margin: 100px 0 50px 0; /* 留出导航栏空间 */
}

/* 
 * 文章内容样式
 * 模块化布局，使用flexbox
 */
article {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

section {
    width: 100%;
    max-width: 1200px;
    margin-bottom: 50px;
    background: rgba(44, 83, 100, 0.8); /* 半透明背景增强层次感 */
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
}

section:hover {
    transform: translateY(-10px);
}

/* 
 * 图片样式
 * 圆角，阴影，悬停时放大
 */
img.decorative {
    width: 320px;
    height: 320px;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin: 20px;
}

img.decorative:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0,0,0,0.5);
}

/* 
 * 标题样式
 * 各级标题的字体大小和颜色
 */
h2, h3, h4 {
    color: #FFD700; /* 黄金色 */
    margin-bottom: 20px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 2rem;
}

h4 {
    font-size: 1.5rem;
}

/* 
 * 段落样式
 * 设置段落的字体大小和间距
 */
p {
    font-size: 16px;
    margin-bottom: 20px;
    line-height: 1.8;
}

/* 
 * 代码块样式
 * 背景色，边框，内边距，滚动条样式等
 */
pre {
    background: #2C5364;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
    margin-bottom: 20px;
}

code {
    color: #7FFF00; /* 点缀色 */
    font-family: 'Courier New', Courier, monospace;
    font-size: 15px;
}

/* 
 * 按钮样式
 * 背景色，边框，圆角，悬停效果
 */
.button {
    background-color: #800080; /* 辅助色 */
    color: #FFFFFF;
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 16px;
}

.button:hover {
    background-color: #7FFF00; /* 点缀色 */
}

/* 
 * 加载动画样式
 * 居中显示，旋转动画
 */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.loader .spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #FFFFFF;
    border-top: 5px solid #00CED1; /* 辅助色 */
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 
 * 星河粒子动画样式
 * 模拟星河流动效果
 */
.star-field {
    position: absolute;
    width: 100%;
    height: 100%;
    background: transparent url('https://images.gptkong.com/demo/sample1.png') repeat;
    animation: starFlow 60s linear infinite;
    transform: translateZ(0);
}

@keyframes starFlow {
    0% { transform: translateY(0) rotate(0deg); }
    100% { transform: translateY(-1000px) rotate(360deg); }
}

/* 
 * 仪表盘和图表样式
 * 动态数据展示，悬停放大效果
 */
.dashboard {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.widget {
    background: #203A43; /* 主色调 */
    border-radius: 8px;
    padding: 20px;
    flex: 1 1 300px;
    transition: transform 0.3s ease;
}

.widget:hover {
    transform: scale(1.05);
}

.chart {
    width: 100%;
    height: 200px;
    background: #2C5364;
    border-radius: 4px;
    position: relative;
}

.bar {
    position: absolute;
    bottom: 0;
    width: 30px;
    background: #7FFF00; /* 点缀色 */
    transition: height 0.5s ease;
}

.bar1 { left: 10%; height: 50%; }
.bar2 { left: 40%; height: 70%; }
.bar3 { left: 70%; height: 60%; }

/* 
 * 响应式设计
 * 针对不同屏幕尺寸调整布局和字体
 */
@media (max-width: 768px) {
    .dashboard {
        flex-direction: column;
    }

    .widget {
        flex: 1 1 100%;
    }
}

@media (max-width: 480px) {
    .header-title {
        font-size: 2rem;
    }

    .button {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    img.decorative {
        width: 100%;
        height: auto;
    }
}

/* 
 * 折叠区域样式
 * 次要信息的显示与隐藏
 */
.collapsible {
    background-color: #2C5364;
    color: #FFFFFF;
    cursor: pointer;
    padding: 10px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 16px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.collapsible:hover {
    background-color: #00CED1;
}

.content {
    padding: 0 18px;
    display: none;
    background-color: #1B263B;
    overflow: hidden;
    border-radius: 0 0 5px 5px;
}

.content p {
    margin: 10px 0;
}

/* 
 * 视觉引导区样式
 * 引导用户注意力的过渡效果区域
 */
.hero-section {
    position: relative;
    width: 100%;
    height: 100vh;
    background: url('https://images.gptkong.com/demo/sample2.png') center center / cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.hero-text {
    position: relative;
    color: #FFFFFF;
    font-size: 2.5rem;
    text-align: center;
    z-index: 1;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
}

