
/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 变量定义 */
:root {
    --primary-color: #000080;
    --secondary-color: #800080;
    --accent-color: #39ff14;
    --highlight-color: #00ffff;
    --font-family-base: 'Roboto', sans-serif;
    --font-family-heading: 'Helvetica Neue', sans-serif;
    --background-gradient: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    --transition-duration: 0.3s;
}

/* 全局样式 */
body {
    font-family: var(--font-family-base);
    background: var(--background-gradient);
    color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
}

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

header {
    text-align: center;
    padding: 60px 0;
    background: rgba(0, 0, 0, 0.5);
    border-bottom: 2px solid var(--accent-color);
}

header h1 {
    font-family: var(--font-family-heading);
    font-size: 3em;
    color: var(--accent-color);
    margin-bottom: 20px;
}

header p {
    font-size: 1.2em;
    color: #e0e0e0;
}

nav {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 20px;
}

nav a {
    color: #ffffff;
    text-decoration: none;
    font-size: 1em;
    position: relative;
}

nav a::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width var(--transition-duration) ease;
    position: absolute;
    bottom: -5px;
    left: 0;
}

nav a:hover::after {
    width: 100%;
}

.section {
    min-height: 100vh;
    padding: 60px 0;
    position: relative;
    background: rgba(255, 255, 255, 0.1);
    margin: 20px 0;
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.section:nth-child(even) {
    background: rgba(128, 0, 128, 0.7);
}

.section h2 {
    font-family: var(--font-family-heading);
    font-size: 2.5em;
    color: var(--accent-color);
    margin-bottom: 20px;
    text-align: center;
}

.section p {
    font-size: 1.1em;
    color: #f0f0f0;
    margin-bottom: 20px;
}

.section img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 20px auto;
    border-radius: 10px;
}

.code-block {
    background: rgba(0, 0, 0, 0.8);
    padding: 20px;
    border-radius: 10px;
    overflow-x: auto;
    margin: 20px 0;
}

.code-block code {
    font-family: 'Courier New', Courier, monospace;
    color: #39ff14;
    white-space: pre-wrap;
}

.footer {
    text-align: center;
    padding: 40px 0;
    background: rgba(0, 0, 0, 0.5);
    border-top: 2px solid var(--accent-color);
}

.footer p {
    color: #ffffff;
    font-size: 1em;
}

/* 示例展示样式 */
.sample-article {
    background: rgba(255, 255, 255, 0.2);
    padding: 40px;
    border-radius: 10px;
    margin: 40px 0;
}

.sample-article h2 {
    font-size: 2em;
    color: var(--highlight-color);
    margin-bottom: 20px;
}

.sample-article h3 {
    font-size: 1.5em;
    color: var(--accent-color);
    margin-top: 30px;
    margin-bottom: 15px;
}

.sample-article p {
    font-size: 1.1em;
    color: #f0f0f0;
    margin-bottom: 15px;
}

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

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

/* 按钮样式 */
.button {
    display: inline-block;
    padding: 10px 20px;
    background: var(--accent-color);
    color: #000;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    font-size: 1em;
    transition: background var(--transition-duration);
}

.button:hover {
    background: var(--highlight-color);
    color: #fff;
}

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

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

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

    nav {
        gap: 20px;
    }

    .section {
        padding: 50px 0;
    }
}

@media (max-width: 1024px) {
    header h1 {
        font-size: 2em;
    }

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

    nav a {
        font-size: 0.9em;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 40px 0;
    }

    .section h2 {
        font-size: 1.5em;
    }

    .sample-article {
        padding: 20px;
    }

    nav {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8em;
    }

    .section h2 {
        font-size: 1.3em;
    }

    .sample-article h2 {
        font-size: 1.5em;
    }

    .sample-article h3 {
        font-size: 1.2em;
    }
}

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

    .section {
        padding: 30px 0;
    }

    .section p, .sample-article p {
        font-size: 1em;
    }
}

/* 动画效果 */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 1s ease-in-out forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* 滚动视差 */
[data-type="parallax"] {
    position: relative;
    overflow: hidden;
}

[data-type="parallax"] .parallax-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

