
/* 全局样式设置 */
/* 使用盒模型边界盒 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 设置基础字体和背景 */
body {
    font-family: 'Roboto', 'Helvetica', sans-serif;
    background: linear-gradient(135deg, #1E3A8A, #0EA5E9);
    color: #FFFFFF;
    line-height: 1.6;
    overflow-x: hidden;
}

/* 设置链接样式 */
a {
    color: #16A34A;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #0EA5E9;
}

/* 头部样式 */
header {
    background: rgba(30, 58, 138, 0.8);
    padding: 20px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 导航栏样式 */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 90%;
    margin: auto;
}

nav .logo {
    font-size: 1.5em;
    font-weight: bold;
}

nav ul {
    list-style: none;
    display: flex;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    font-size: 1em;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background 0.3s ease;
}

nav ul li a:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* 主要内容区域样式 */
.main {
    padding-top: 80px;
    width: 90%;
    margin: auto;
}

/* 提示信息样式 */
.prompt {
    text-align: center;
    font-size: 1.2em;
    margin: 40px 0;
    color: #FFD700;
    animation: fadeIn 2s ease-in-out;
}

/* 文章内容样式 */
article {
    background: rgba(196, 196, 196, 0.1);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

article h2 {
    color: #FFFFFF;
    margin-bottom: 20px;
    position: relative;
}

article h2::after {
    content: '';
    width: 50px;
    height: 3px;
    background: #16A34A;
    display: block;
    margin-top: 10px;
    border-radius: 2px;
}

article p {
    margin-bottom: 20px;
    font-size: 1em;
    color: #FFFFFF;
}

/* 图片样式 */
article img {
    width: 100%;
    max-width: 320px;
    height: auto;
    display: block;
    margin: 20px auto;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

article img:hover {
    transform: scale(1.05);
}

/* 卡片式布局 */
.card-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 20px;
    width: 300px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.card h3 {
    margin-bottom: 15px;
    color: #0EA5E9;
}

.card p {
    font-size: 0.95em;
    color: #FFFFFF;
}

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

/* 视差滚动效果 */
.parallax {
    background-image: url('https://images.gptkong.com/demo/sample5.png');
    height: 400px;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    margin: 40px 0;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    animation: parallaxAnim 5s infinite;
}

@keyframes parallaxAnim {
    0% { background-position: center top; }
    50% { background-position: center bottom; }
    100% { background-position: center top; }
}

/* 数据可视化样式 */
.data-visualization {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 40px 0;
}

.data-visualization img {
    width: 100%;
    max-width: 320px;
    margin-bottom: 20px;
    border-radius: 8px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    nav ul {
        display: none;
    }

    nav .hamburger {
        display: block;
        cursor: pointer;
    }

    .main {
        width: 100%;
        padding: 10px;
    }

    .card-container {
        flex-direction: column;
        align-items: center;
    }
}

/* 移动端导航菜单 */
.hamburger {
    display: none;
    flex-direction: column;
    width: 30px;
}

.hamburger div {
    height: 4px;
    background: #FFFFFF;
    margin: 5px 0;
    transition: all 0.3s ease;
}

/* 展开导航菜单 */
.nav-active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 60px;
    right: 20px;
    background: rgba(30, 58, 138, 0.9);
    padding: 10px;
    border-radius: 5px;
}

.nav-active ul {
    flex-direction: column;
}

.nav-active ul li {
    margin: 10px 0;
}

/* 底部样式 */
footer {
    background: rgba(30, 58, 138, 0.8);
    padding: 20px 0;
    text-align: center;
    margin-top: 40px;
}

footer p {
    color: #FFFFFF;
    font-size: 0.9em;
}

/* 侧边导航样式 */
.sidebar {
    position: fixed;
    top: 80px;
    left: 0;
    width: 200px;
    height: calc(100% - 80px);
    background: rgba(30, 58, 138, 0.9);
    padding: 20px;
    box-shadow: 2px 0 5px rgba(0,0,0,0.3);
    overflow-y: auto;
}

.sidebar a {
    display: block;
    margin-bottom: 15px;
    color: #FFFFFF;
    font-size: 1em;
    transition: color 0.3s ease;
}

.sidebar a:hover {
    color: #16A34A;
}

/* 主内容区域与侧边导航的适配 */
@media (max-width: 1024px) {
    .sidebar {
        display: none;
    }

    .main {
        width: 100%;
    }
}

