
/* 全局样式 */
body {
    margin: 0;
    padding: 0;
    background: linear-gradient(to bottom, #1e006c, #3f00a1);
    color: #ffffff;
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
}

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

/* 头部样式 */
header {
    text-align: center;
    padding: 50px 0;
    background: rgba(0, 0, 0, 0.5);
}

header h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #00ff99;
}

header p {
    font-size: 1.2rem;
}

/* 导航栏 */
nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
}

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

nav a:hover {
    color: #00ff99;
}

/* 主要内容 */
main {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
}

/* 文章展示区 */
.article {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
}

.article h2 {
    color: #00ff99;
    margin-bottom: 15px;
}

.article pre {
    background: #2c003e;
    padding: 10px;
    border-radius: 5px;
    overflow-x: auto;
}

.article code {
    font-family: 'Fira Code', monospace;
    color: #00ff99;
}

/* 示例展示 */
.sample-display {
    grid-column: 1 / -1;
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
}

.sample-display h2 {
    color: #00ff99;
    margin-bottom: 15px;
}

.sample-display .sample-item {
    margin-bottom: 30px;
}

.sample-display h3 {
    color: #00ff99;
    margin-bottom: 10px;
}

.sample-display p {
    margin-bottom: 10px;
}

.sample-display img {
    margin-right: 10px;
    margin-bottom: 10px;
}

/* 图片样式 */
img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
}

/* 按钮样式 */
.button {
    display: inline-block;
    padding: 10px 20px;
    background: #00ff99;
    color: #000000;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s, transform 0.3s;
}

.button:hover {
    background: #00cc66;
    transform: scale(1.05);
}

/* 代码示例预览 */
.code-preview {
    background: #1e006c;
    padding: 15px;
    border-radius: 5px;
    font-family: 'Fira Code', monospace;
    color: #ffffff;
    overflow-x: auto;
}

/* 视差效果 */
.parallax {
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    height: 400px;
    position: relative;
}

/* 交互动画 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.animate-fade-in {
    animation: fadeIn 2s ease-in-out;
}

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

    main {
        grid-template-columns: 1fr 1fr;
    }
}

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

@media (max-width: 1024px) {
    main {
        grid-template-columns: 1fr;
    }

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

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

    nav a {
        font-size: 0.9rem;
    }

    .article, .sample-display {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    header {
        padding: 30px 0;
    }

    header h1 {
        font-size: 1.5rem;
    }

    nav a {
        font-size: 0.8rem;
    }

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

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

    nav a {
        font-size: 0.7rem;
    }

    .article, .sample-display {
        padding: 10px;
    }
}

