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

/* 根元素定义CSS变量 */
:root {
    --main-color: #0A1F44;
    --accent-color-purple: #8C52FF;
    --accent-color-orange: #FF6F61;
    --background-gradient: radial-gradient(circle, rgba(10,31,68,1) 0%, rgba(255,255,255,0) 70%);
    --font-primary: 'Poppins', sans-serif;
    --font-secondary: 'Open Sans', sans-serif;
}

/* 全局字体与背景 */
body {
    font-family: var(--font-secondary);
    background: var(--background-gradient);
    color: #ffffff;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 头部样式 */
.header {
    background: linear-gradient(135deg, var(--main-color), var(--accent-color-purple));
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .logo {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    color: #ffffff;
    text-decoration: none;
}

.navbar {
    display: flex;
    gap: 15px;
}

.navbar a {
    color: #ffffff;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.navbar a:hover {
    color: var(--accent-color-orange);
}

/* 主视觉区 */
.hero {
    display: flex;
    flex-wrap: wrap;
    padding: 60px 40px;
    background: linear-gradient(120deg, var(--main-color), var(--accent-color-purple));
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 87, 34,0.3), transparent 70%);
    animation: aurora-move 15s linear infinite;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    flex: 1 1 300px;
    padding: 20px;
}

.hero-content h1 {
    font-family: var(--font-primary);
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #ffffff;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: #f0f0f0;
}

.hero-content .cta-button {
    background-color: var(--accent-color-orange);
    color: #ffffff;
    padding: 10px 25px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-family: var(--font-secondary);
}

.hero-content .cta-button:hover {
    background-color: #e55b50;
}

.hero-image {
    flex: 1 1 300px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* 功能模块 */
.section {
    padding: 60px 40px;
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    background-color: #ffffff;
    color: var(--main-color);
}

.section:nth-child(even) {
    background: linear-gradient(135deg, var(--accent-color-purple), var(--main-color));
    color: #ffffff;
}

.section h2 {
    font-family: var(--font-primary);
    font-size: 2rem;
    margin-bottom: 20px;
}

.section p {
    font-size: 1rem;
    margin-bottom: 15px;
}

.section .section-content {
    flex: 1 1 300px;
}

.section .section-icon {
    width: 60px;
    height: 60px;
    background-color: var(--accent-color-orange);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
    transition: transform 0.3s ease;
}

.section .section-icon:hover {
    transform: scale(1.1);
}

.section .section-icon img {
    width: 30px;
    height: 30px;
}

.section .section-image {
    flex: 1 1 300px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.section .section-image img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

/* 示例展示区域 */
.example-section {
    padding: 60px 40px;
    background-color: #f9f9f9;
    color: #333333;
}

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

.article {
    max-width: 800px;
    margin: 0 auto;
    background-color: #ffffff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.article h2, .article h3, .article h4 {
    font-family: var(--font-primary);
    color: var(--main-color);
    margin-bottom: 15px;
}

.article p {
    margin-bottom: 15px;
    line-height: 1.8;
}

.article ul {
    list-style: disc;
    margin-left: 20px;
    margin-bottom: 15px;
}

.article pre {
    background-color: #f4f4f4;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin-bottom: 15px;
}

.article code {
    font-family: 'Courier New', Courier, monospace;
    color: #d63384;
}

.article table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
}

.article table, .article th, .article td {
    border: 1px solid #ddd;
}

.article th, .article td {
    padding: 10px;
    text-align: left;
}

.article th {
    background-color: var(--accent-color-purple);
    color: #ffffff;
}

/* 底部样式 */
.footer {
    background: var(--main-color);
    color: #ffffff;
    text-align: center;
    padding: 20px 40px;
    position: relative;
}

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

/* 响应式设计 */
@media (max-width: 1440px) {
    .header, .hero, .section, .example-section, .footer {
        padding: 40px 20px;
    }
}

@media (max-width: 1200px) {
    .hero {
        flex-direction: column;
        text-align: center;
    }

    .hero-content, .hero-image {
        flex: 1 1 100%;
        padding: 10px;
    }
}

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

    .section .section-content, .section .section-image {
        flex: 1 1 100%;
    }
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        align-items: center;
    }

    .navbar {
        flex-direction: column;
        gap: 10px;
    }

    .section {
        padding: 40px 20px;
    }

    .hero {
        padding: 40px 20px;
    }
}

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

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .section h2, .example-section h2 {
        font-size: 1.5rem;
    }
}

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

    .section h2, .example-section h2 {
        font-size: 1.2rem;
    }
}

/* 动画效果 */
@keyframes aurora-move {
    0% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
    100% { transform: translateY(0) rotate(360deg); }
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

.pulse-animation {
    animation: pulse 2s infinite;
}

/* 提示信息 */
.reference-note {
    text-align: center;
    font-size: 0.9rem;
    color: #666666;
    margin-top: 20px;
}

