
/* 引入字体 */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@600&family=Open+Sans&display=swap');

/* CSS变量定义 */
:root {
    --primary-gradient: linear-gradient(135deg, #004E92 0%, #FFD700 100%);
    --secondary-gradient: linear-gradient(180deg, rgba(0, 123, 255, 0.8), rgba(255, 215, 0, 0.8));
    --button-gradient: linear-gradient(135deg, #007BFF 0%, #00C853 100%);
    --hover-gradient: linear-gradient(135deg, #00C853 0%, #007BFF 100%);
    --background-gradient: radial-gradient(circle, rgb(255, 87, 34), transparent);
    --text-color: #333333;
    --light-color: #FFFFFF;
    --accent-color: #00C853;
    --font-primary: 'Open Sans', sans-serif;
    --font-secondary: 'Poppins', sans-serif;
}

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

body {
    font-family: var(--font-primary);
    background: var(--primary-gradient);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    animation: backgroundMove 15s linear infinite;
    padding-top: 60px;
}

/* 动画定义 */
@keyframes backgroundMove {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes auroraMove {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

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

.nav-links {
    list-style: none;
    display: flex;
}

.nav-links li {
    margin-left: 20px;
}

.nav-links a {
    text-decoration: none;
    color: var(--light-color);
    font-family: var(--font-secondary);
    font-weight: 600;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--accent-color);
}

/* 头部样式 */
.header {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 80vh;
    text-align: center;
    background: var(--primary-gradient);
}

.header h1 {
    font-family: var(--font-secondary);
    font-size: 3rem;
    color: var(--light-color);
    margin-bottom: 20px;
}

.header p {
    font-size: 1.2rem;
    color: var(--light-color);
    max-width: 600px;
    margin-bottom: 30px;
}

.cta-button {
    background: var(--button-gradient);
    color: var(--light-color);
    padding: 15px 30px;
    border: none;
    border-radius: 5px;
    font-family: var(--font-secondary);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.cta-button:hover {
    transform: scale(1.1);
    background: var(--hover-gradient);
}

/* 内容模块样式 */
.section {
    padding: 60px 20px;
    background: var(--light-color);
}

.section:nth-child(even) {
    background: #f9f9f9;
}

.section h2 {
    font-family: var(--font-secondary);
    font-size: 2rem;
    color: var(--primary-gradient);
    margin-bottom: 20px;
    text-align: center;
}

.module {
    background: var(--secondary-gradient);
    padding: 20px;
    margin: 20px auto;
    border-radius: 10px;
    max-width: 1200px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.module img {
    width: 100%;
    max-width: 320px;
    height: auto;
    border-radius: 10px;
    margin-bottom: 20px;
}

.module-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

.module-content div {
    flex: 1;
    padding: 20px;
}

.module-content h3 {
    font-family: var(--font-secondary);
    font-size: 1.5rem;
    color: var(--accent-color);
    margin-bottom: 10px;
}

.module-content p {
    font-size: 1rem;
    color: var(--text-color);
    margin-bottom: 10px;
}

.module-content a {
    text-decoration: none;
    color: var(--accent-color);
    font-weight: bold;
}

.module-content a:hover {
    text-decoration: underline;
}

/* 示例展示样式 */
.example-display {
    background: #e0f7fa;
    padding: 40px 20px;
    border-radius: 10px;
    max-width: 1200px;
    margin: 40px auto;
}

.example-display h2 {
    font-family: var(--font-secondary);
    color: #006064;
    margin-bottom: 20px;
    text-align: center;
}

.example-display article {
    background: var(--light-color);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.example-display pre {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin: 15px 0;
}

.example-display code {
    font-family: 'Courier New', Courier, monospace;
    color: #d32f2f;
}

/* 代码示例美化 */
.code-block {
    background: #263238;
    color: #eceff1;
    padding: 20px;
    border-radius: 5px;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
    margin: 20px 0;
}

.code-block pre {
    margin: 0;
    white-space: pre-wrap;
}

/* 滚动触发动画 */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease, transform 1s ease;
}

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

/* 响应式设计 */
@media (max-width: 1440px) {
    .module-content {
        flex-direction: row;
    }
}

@media (max-width: 1200px) {
    .module-content {
        flex-direction: row;
    }
}

@media (max-width: 1024px) {
    .module-content {
        flex-direction: column;
        align-items: center;
    }

    .module img {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 2.5rem;
    }

    .module-content {
        flex-direction: column;
    }

    .cta-button {
        width: 100%;
        text-align: center;
    }
}

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

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

    .nav-links li {
        margin: 10px 0;
    }

    .header h1 {
        font-size: 2rem;
    }

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

@media (max-width: 320px) {
    .header h1 {
        font-size: 1.5rem;
    }

    .module-content {
        flex-direction: column;
    }

    .cta-button {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* 图片样式 */
.image-gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.image-gallery img {
    width: 100%;
    max-width: 320px;
    height: auto;
    border-radius: 5px;
}

/* 页脚样式 */
.footer {
    text-align: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.5);
    color: var(--light-color);
    position: fixed;
    width: 100%;
    bottom: 0;
}


