
/* 全局样式设置，定义基本字体、背景和字体颜色 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif; /* 使用Roboto字体，增强现代感 */
    font-size: 16px; /* 设置基础字体大小 */
    line-height: 1.6; /* 提高文本可读性 */
    background: linear-gradient(135deg, #0D47A1 70%, #6A11CB 25%, #E040FB 5%); /* 使用渐变背景，主色70%，辅色25%，点缀色5% */
    color: #ffffff; /* 设置文本颜色为白色，确保与深色背景对比鲜明 */
    overflow-x: hidden; /* 防止出现水平滚动条 */
}

/* 导航栏样式 */
.navbar {
    position: fixed; /* 固定在顶部 */
    top: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.7); /* 半透明黑色背景，增强层次感 */
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000; /* 确保导航栏在最上层 */
}

.navbar a {
    color: #ffffff;
    text-decoration: none;
    margin: 0 15px;
    font-size: 18px; /* 设置导航链接字体大小 */
    transition: color 0.3s ease;
}

.navbar a:hover {
    color: #E040FB; /* 悬停时颜色变化为点缀色 */
}

/* 主要内容区域样式 */
.main-content {
    padding: 100px 20px 50px 20px; /* 上方留出导航栏空间 */
}

/* 章节标题样式 */
h2, h3, h4 {
    font-weight: 700;
    color: #ffffff;
    margin-top: 40px;
    margin-bottom: 20px;
}

h2 {
    font-size: 24px; /* 设置h2标题字体大小 */
}

h3 {
    font-size: 20px; /* 设置h3标题字体大小 */
}

h4 {
    font-size: 18px; /* 设置h4标题字体大小 */
}

/* 段落样式 */
p {
    font-size: 16px;
    color: #e0e0e0;
    margin-bottom: 20px;
}

/* 代码块样式 */
pre {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 30px;
}

code {
    font-family: 'Courier New', Courier, monospace;
    color: #E040FB;
}

/* 按钮样式 */
.button, .feedback button, .language-switch select {
    background: linear-gradient(45deg, #6A11CB, #E040FB);
    border: none;
    padding: 10px 20px;
    color: #ffffff;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
}

.button:hover, .feedback button:hover, .language-switch select:hover {
    background: linear-gradient(45deg, #E040FB, #6A11CB);
    transform: scale(1.05);
}

/* 卡片容器样式 */
.card-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    margin-top: 40px;
}

/* 单个卡片样式 */
.card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 20px;
    width: 300px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, background 0.3s ease;
}

.card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.2);
}

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

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

/* 底部样式 */
.footer {
    background: rgba(0, 0, 0, 0.8);
    padding: 30px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 50px;
}

.footer .feedback, .footer .language-switch {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
}

.footer select {
    padding: 8px 12px;
    border-radius: 4px;
    border: none;
    background: linear-gradient(45deg, #6A11CB, #E040FB);
    color: #ffffff;
    cursor: pointer;
    transition: background 0.3s ease;
}

.footer select:hover {
    background: linear-gradient(45deg, #E040FB, #6A11CB);
}

/* 数据流动画样式 */
.data-stream {
    width: 100%;
    height: 5px;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
    position: relative;
    margin-top: 80px;
}

.data-stream::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,0.8), rgba(255,255,255,0));
    animation: dataFlow 3s linear infinite;
}

/* 动画关键帧 */
@keyframes dataFlow {
    0% { transform: translateX(-100%); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateX(100%); opacity: 0; }
}

/* 卡片式布局内的动态效果 */
.card-container .card {
    backdrop-filter: blur(10px); /* 模糊背景 */
}

/* 教育模块样式 */
.education-module {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 40px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin-top: 40px;
}

.education-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 20px;
    transition: transform 0.3s ease;
}

.education-card:hover {
    transform: translateY(-10px);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .navbar a {
        margin: 10px 0;
    }
    
    .card-container {
        flex-direction: column;
        align-items: center;
    }
    
    .footer {
        flex-direction: column;
        align-items: flex-start;
    }
}

