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

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

/* 颜色变量 */
:root {
    --deep-blue: #00264d;
    --purple-blue: #5c0087;
    --teal: #00aaff;
    --silver: #c0c0c0;
    --green: #00ff7f;
    --white: #ffffff;
    --light-gray: #f5f5f5;
    --dark-gray: #333333;
}

/* 动画关键帧 */
@keyframes gradientAnimation {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

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

/* 全局样式 */
body {
    font-family: 'Roboto', 'Fira Sans', sans-serif;
    line-height: 1.6;
    color: var(--dark-gray);
    background: linear-gradient(135deg, var(--deep-blue), var(--purple-blue), var(--teal));
    background-size: 400% 400%;
    animation: gradientAnimation 15s ease infinite;
    overflow-x: hidden;
}

/* 容器 */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 0;
}

/* 导航栏 */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    z-index: 1000;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: flex-end;
    padding: 20px;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    color: var(--white);
    text-decoration: none;
    font-weight: 700;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: var(--green);
}

/* 英雄区 */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-align: center;
    background: rgba(0, 0, 0, 0.3);
    position: relative;
}

.hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: inherit;
    z-index: -1;
    opacity: 0.7;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
}

/* 模块化布局 */
.section {
    padding: 60px 0;
    background: var(--light-gray);
}

.section:nth-child(even) {
    background: var(--white);
}

.section h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.5rem;
    color: var(--deep-blue);
    position: relative;
}

.section h2::after {
    content: "";
    width: 50px;
    height: 5px;
    background: var(--green);
    display: block;
    margin: 10px auto 0;
    border-radius: 2.5px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.card {
    background: var(--white);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

.card h3 {
    margin-bottom: 10px;
    color: var(--purple-blue);
}

.card p {
    color: var(--dark-gray);
}

/* 示例数据展示 */
.example-data {
    background: var(--white);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-top: 40px;
}

.example-data h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--purple-blue);
}

.example-data ul {
    list-style: disc;
    margin-left: 20px;
}

.example-data ul li {
    margin-bottom: 10px;
}

/* 示例文章展示 */
.article {
    background: var(--light-gray);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-top: 40px;
}

.article h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--deep-blue);
}

.article h3 {
    font-size: 1.5rem;
    margin-top: 20px;
    color: var(--purple-blue);
}

.article h4 {
    font-size: 1.2rem;
    margin-top: 15px;
    color: var(--teal);
}

.article p {
    margin-bottom: 15px;
    color: var(--dark-gray);
}

.article pre {
    background: var(--silver);
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin-bottom: 15px;
}

.article code {
    font-family: 'Fira Sans', sans-serif;
    color: var(--deep-blue);
}

.article table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.article table, .article th, .article td {
    border: 1px solid var(--dark-gray);
}

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

.article th {
    background: var(--teal);
    color: var(--white);
}

.article img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    margin-top: 20px;
}

/* 按钮样式 */
.button {
    display: inline-block;
    background: linear-gradient(90deg, var(--deep-blue), var(--purple-blue));
    color: var(--white);
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 700;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.button:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    background: linear-gradient(90deg, var(--teal), var(--green));
}

/* 页脚 */
footer {
    background: var(--deep-blue);
    color: var(--white);
    text-align: center;
    padding: 20px 0;
    position: relative;
    margin-top: 60px;
}

footer p {
    font-size: 1rem;
}

/* 响应式设计 */
@media (max-width: 1440px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .section h2 {
        font-size: 2.2rem;
    }
}

@media (max-width: 1200px) {
    .container {
        width: 95%;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .section h2 {
        font-size: 2rem;
    }
}

@media (max-width: 1024px) {
    nav ul {
        justify-content: center;
        flex-wrap: wrap;
    }

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

    .section h2 {
        font-size: 1.8rem;
    }
}

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

    .section h2 {
        font-size: 1.6rem;
    }

    nav ul {
        flex-direction: column;
    }

    nav ul li {
        margin: 10px 0;
    }
}

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

    .section h2 {
        font-size: 1.4rem;
    }

    .card h3 {
        font-size: 1.2rem;
    }

    .button {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
}

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

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

    .card h3 {
        font-size: 1rem;
    }

    .button {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}

/* 图片样式 */
img.decorative {
    width: 100%;
    height: auto;
    border-radius: 10px;
    margin-top: 20px;
}

