
/* 全局样式与基础设置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #1e1e2f, #2a2a40);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 20px;
}
h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    text-align: center;
}
h2 {
    font-size: 2rem;
    margin-top: 40px;
    margin-bottom: 20px;
    position: relative;
}
h2::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, #4a90e2, #7ed321);
    margin: 10px auto;
}
p {
    font-size: 1rem;
    color: #ccc;
    margin-bottom: 20px;
    line-height: 1.8;
}
.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}
.module {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.module:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}
.module img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    margin-bottom: 15px;
}
.highlight {
    color: #4a90e2;
    font-weight: bold;
}
pre {
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    font-family: 'Consolas', monospace;
    font-size: 0.9rem;
    margin-bottom: 20px;
}
code {
    color: #ff6f61;
}
.fade-in {
    opacity: 0;
    animation: fadeIn ease 2s forwards;
}
@keyframes fadeIn {
    to { opacity: 1; }
}
.scroll-trigger {
    transform: translateY(50px);
    opacity: 0;
    transition: all 0.8s ease;
}
.scroll-trigger.active {
    transform: translateY(0);
    opacity: 1;
}
.button {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(90deg, #4a90e2, #7ed321);
    color: #fff;
    text-decoration: none;
    border-radius: 25px;
    font-weight: bold;
    transition: background 0.3s ease;
}
.button:hover {
    background: linear-gradient(90deg, #7ed321, #4a90e2);
}
.footer {
    margin-top: 40px;
    text-align: center;
    font-size: 0.9rem;
    color: #aaa;
}
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    h2 {
        font-size: 1.8rem;
    }
    .container {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    h1 {
        font-size: 1.8rem;
    }
    h2 {
        font-size: 1.6rem;
    }
    p {
        font-size: 0.9rem;
    }
}

