
/* 全局样式设置 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #e0f7fa, #ffffff);
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

/* 导航栏样式 */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    transition: background 0.3s;
}

nav .logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2196F3;
}

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

nav ul li a {
    text-decoration: none;
    color: #333;
    font-size: 1rem;
    position: relative;
    transition: color 0.3s;
}

nav ul li a::after {
    content: '';
    position: absolute;
    width: 0%;
    height: 2px;
    background: #2196F3;
    left: 0;
    bottom: -5px;
    transition: width 0.3s;
}

nav ul li a:hover {
    color: #2196F3;
}

nav ul li a:hover::after {
    width: 100%;
}

/* 主要内容区 */
.main-content {
    padding: 100px 20px 50px;
    max-width: 1200px;
    margin: 0 auto;
}

.main-content h2, .main-content h3, .main-content h4 {
    color: #1E88E5;
}

.main-content p {
    font-size: 16px;
    margin-bottom: 20px;
}

.main-content pre {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin-bottom: 20px;
}

.main-content code {
    color: #d32f2f;
    background: #f5f5f5;
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 0.95em;
}

/* 文章内代码块样式 */
.main-content pre code {
    display: block;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    color: #d32f2f;
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

table thead {
    background: #2196F3;
    color: #fff;
}

table th, table td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: left;
}

table tbody tr:nth-child(even) {
    background: #f9f9f9;
}

/* 图片样式 */
img.decorative {
    width: 100%;
    max-width: 320px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

/* 提示信息样式 */
.notice {
    background: #FFEB3B;
    padding: 20px;
    border-left: 5px solid #FFC107;
    margin-bottom: 30px;
    font-size: 1.2rem;
    font-weight: bold;
}

/* 交互动效 */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 模块化布局 */
.module-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 40px;
}

.module {
    flex: 1 1 30%;
    background: #ffffff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.module img {
    width: 100%;
    height: auto;
    border-radius: 5px;
    margin-bottom: 15px;
}

/* 卡片式设计 */
.card {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(33, 150, 243, 0.8);
    color: #fff;
    opacity: 0;
    transition: opacity 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
}

.card:hover .card-overlay {
    opacity: 1;
}

/* 数据可视化区域 */
.data-visualization {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 400px;
    background: #f0f4f8;
    margin-bottom: 40px;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.node {
    width: 100px;
    height: 100px;
    background: #4CAF50;
    border-radius: 50%;
    transition: transform 0.3s;
    cursor: pointer;
}

.node:hover {
    transform: scale(1.1);
}

/* 底部联系表单与多语言切换 */
.footer {
    background: #ffffff;
    padding: 40px 20px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    border-top: 1px solid #ddd;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    transition: border-color 0.3s;
    font-size: 1rem;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: #2196F3;
    outline: none;
}

.language-switcher select {
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
    transition: border-color 0.3s;
    font-size: 1rem;
}

.language-switcher select:focus {
    border-color: #2196F3;
    outline: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
        gap: 10px;
        background: rgba(255, 255, 255, 0.95);
        position: absolute;
        top: 60px;
        right: 30px;
        width: 200px;
        display: none;
    }

    nav ul.active {
        display: flex;
    }

    .menu-toggle {
        display: block;
        cursor: pointer;
    }

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

@media (max-width: 480px) {
    nav {
        padding: 10px 20px;
    }

    .main-content {
        padding: 80px 10px 30px;
    }

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

    .contact-form, .language-switcher {
        width: 100%;
        text-align: center;
    }
}

