
/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 设置背景为渐变色，营造科技感与专业性 */
body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

/* 设置整体容器，使用响应式网格布局 */
.container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 2em;
    padding: 2em;
}

/* 模块样式，确保每个模块不小于500px宽度 */
.module {
    background: #ffffffcc; /* 半透明白色，增加层次感 */
    padding: 1.5em;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* 头部导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(30, 60, 114, 0.9);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 1em 0;
    z-index: 1000;
}

.navbar a {
    color: #fff;
    text-decoration: none;
    padding: 0.5em 1em;
    position: relative;
}

.navbar a::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: #a044ff;
    transition: width 0.3s;
    position: absolute;
    bottom: 0;
    left: 0;
}

.navbar a:hover::after {
    width: 100%;
}

/* 下拉菜单样式 */
.nav-item {
    position: relative;
}

.dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #2a5298;
    min-width: 150px;
    border-radius: 5px;
    overflow: hidden;
}

.nav-item:hover .dropdown {
    display: block;
}

.dropdown a {
    padding: 0.75em 1em;
    display: block;
    color: #fff;
}

.dropdown a:hover {
    background: #1e3c72;
}

/* 提示信息样式 */
.alert {
    background: #fffae6;
    border-left: 5px solid #ffe58f;
    padding: 1em;
    margin: 2em 0;
    border-radius: 5px;
    font-size: 1.1em;
}

/* 图片装饰样式 */
.decorative-image {
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* 代码块样式 */
pre code {
    display: block;
    padding: 1em;
    background: #f5f5f5;
    border-radius: 5px;
    overflow: visible;
    position: relative;
    font-size: 0.9em;
    line-height: 1.5;
}

/* 代码块标题 */
pre code::before {
    content: "代码示例";
    position: absolute;
    top: -1.5em;
    left: 0;
    background: #2a5298;
    color: #fff;
    padding: 0.2em 0.5em;
    border-radius: 3px;
    font-size: 0.8em;
}

/* 按钮样式 */
.button {
    background: #2a5298;
    color: #fff;
    padding: 0.75em 1.5em;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
    font-size: 1em;
}

.button:hover {
    background: #a044ff;
    transform: scale(1.05);
}

/* 响应式设计：调整布局以适应不同屏幕 */
@media (max-width: 1200px) {
    .container {
        grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    }
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        padding: 0.5em 0;
    }

    .container {
        grid-template-columns: 1fr;
    }

    .module {
        padding: 1em;
    }
}

/* 添加页面底部样式 */
.footer {
    background: linear-gradient(90deg, #1e3c72, #2a5298);
    padding: 2em 0;
    text-align: center;
    color: #fff;
}

.footer .partner-logo {
    width: 100px;
    margin: 0.5em;
    transition: transform 0.3s ease;
}

.footer .partner-logo:hover {
    transform: scale(1.1);
}

/* 多语言切换按钮 */
.language-switcher {
    display: flex;
    justify-content: center;
    gap: 1em;
    margin-top: 1em;
}

.language-switcher button {
    background: #fff;
    color: #2a5298;
    border: 1px solid #2a5298;
    padding: 0.5em 1em;
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease;
}

.language-switcher button:hover {
    background: #2a5298;
    color: #fff;
}

/* 段落与标题样式 */
h1, h2, h3, h4 {
    color: #2a5298;
    margin-bottom: 0.5em;
}

p {
    margin-bottom: 1em;
    font-size: 1em;
}

/* 链接样式，确保内部链接有 rel="nofollow" */
a[rel="nofollow"] {
    color: #a044ff;
    text-decoration: none;
    border-bottom: 1px dashed #a044ff;
}

a[rel="nofollow"]:hover {
    color: #2a5298;
    border-bottom: 1px solid #2a5298;
}

/* 折叠区域样式 */
.collapsible {
    background: #f1f1f1;
    color: #2a5298;
    cursor: pointer;
    padding: 1em;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 1em;
    transition: background 0.3s ease;
}

.collapsible:hover {
    background: #e2e2e2;
}

.content {
    padding: 0 1em;
    display: none;
    overflow: hidden;
    background: #fafafa;
    border-left: 4px solid #a044ff;
}

.content.show {
    display: block;
}

/* 动画效果：元素淡入 */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

