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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #121212, #1E1E1E);
    color: #FFFFFF;
    overflow-x: hidden;
    line-height: 1.6;
    padding: 20px;
}

/* 渐变背景动画 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #63B8FF, #D87093, #32CD32);
    background-size: 400% 400%;
    animation: gradient-animation 15s ease infinite;
    z-index: -1;
    opacity: 0.3;
}

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

/* 头部样式 */
header {
    text-align: center;
    padding: 50px 20px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    margin-bottom: 40px;
}

header h1 {
    font-size: 3em;
    color: #63B8FF;
    margin-bottom: 20px;
    text-shadow: 2px 2px #D87093;
}

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

/* 导航栏样式 */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(18, 18, 18, 0.9);
    padding: 10px 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
}

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    color: #FFFFFF;
    text-decoration: none;
    font-size: 1em;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: #32CD32;
}

/* 主内容区 */
.main-content {
    max-width: 1200px;
    margin: auto;
    padding: 20px;
}

/* 示例展示 */
.sample-display {
    background: rgba(30, 30, 30, 0.8);
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 40px;
}

.sample-display h2 {
    color: #D87093;
    margin-bottom: 20px;
    text-align: center;
}

.sample-display h3 {
    color: #63B8FF;
    margin-top: 20px;
    margin-bottom: 10px;
}

.sample-display p {
    margin-bottom: 15px;
    color: #FFFFFF;
}

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

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

.sample-display pre {
    background: #1E1E1E;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin-bottom: 15px;
}

.sample-display code {
    color: #32CD32;
    font-family: 'Courier New', Courier, monospace;
}

/* 图像样式 */
.image-gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
}

.image-gallery img {
    width: 100%;
    max-width: 320px;
    height: auto;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.image-gallery img:hover {
    transform: scale(1.05);
}

/* 文章内容 */
article {
    background: rgba(30, 30, 30, 0.8);
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 40px;
}

article h2 {
    color: #63B8FF;
    margin-bottom: 20px;
    text-align: center;
}

article h3 {
    color: #D87093;
    margin-top: 20px;
    margin-bottom: 10px;
}

article p {
    margin-bottom: 15px;
    color: #FFFFFF;
}

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

article ul li {
    margin-bottom: 10px;
}

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

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

/* 底部提示 */
footer {
    text-align: center;
    padding: 20px;
    color: #FFFFFF;
    font-size: 1em;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
}

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

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

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

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

    .image-gallery {
        gap: 10px;
    }
}

@media (max-width: 1024px) {
    nav ul {
        flex-direction: column;
    }

    nav ul li {
        margin: 10px 0;
    }

    .image-gallery {
        flex-direction: column;
        align-items: center;
    }
}

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

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

    nav ul {
        flex-direction: column;
    }
}

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

    nav ul li a {
        font-size: 0.8em;
    }

    .image-gallery img {
        max-width: 100%;
    }
}

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

    nav ul li a {
        font-size: 0.7em;
    }
}

