
/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #000046, #2cb5e8);
    color: white;
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 导航栏 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 70, 0.9);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    padding: 10px 20px;
}

.navbar a {
    color: white;
    text-decoration: none;
    margin: 0 15px;
    font-size: 16px;
    transition: color 0.3s ease;
}

.navbar a:hover {
    color: #00d8ff;
}

/* 模块化布局 */
.module {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 50px 20px;
    background-size: cover;
    background-position: center;
}

.module:nth-child(odd) {
    background: linear-gradient(135deg, #3f5efb, #fc466b);
}

.module:nth-child(even) {
    background: linear-gradient(135deg, #00d8ff, #000046);
}

.module h2 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.module p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto 30px;
}

/* 按钮样式 */
button {
    background-color: #3f5efb;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

button:hover {
    background-color: #00d8ff;
    transform: scale(1.1);
}

/* 数据可视化与代码展示 */
.data-visualization {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.data-visualization div {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

pre {
    background: rgba(0, 0, 0, 0.7);
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
}

code {
    color: #00d8ff;
    font-size: 0.9rem;
}

/* 图片与装饰 */
.gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.gallery img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 5px;
    transition: transform 0.3s ease;
}

.gallery img:hover {
    transform: scale(1.2);
}

/* 自适应布局 */
@media (max-width: 768px) {
    .module h2 {
        font-size: 2rem;
    }

    .module p {
        font-size: 1rem;
    }

    .gallery img {
        width: 80px;
        height: 80px;
    }
}

@media (max-width: 480px) {
    .navbar {
        flex-direction: column;
    }

    .module h2 {
        font-size: 1.5rem;
    }

    .module p {
        font-size: 0.9rem;
    }
}

