
/* 基础样式设置 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: #ffffff;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* 容器样式 */
.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);
    border-bottom: 2px solid #39FF14;
}

header h1 {
    font-size: 2.5em;
    margin: 0;
    color: #39FF14;
    animation: fadeIn 2s ease-in-out;
}

header p {
    margin-top: 10px;
    font-size: 1.2em;
    color: #ffffff;
}

/* 导航栏样式 */
nav {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 20px 0;
}

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

nav a::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: #39FF14;
    transition: width 0.3s;
    position: absolute;
    bottom: -5px;
    left: 0;
}

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

/* 主内容区样式 */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

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

.article-section h2 {
    font-size: 2em;
    color: #FFD700;
    margin-bottom: 20px;
}

.article-section h3 {
    font-size: 1.5em;
    color: #FF4500;
    margin-top: 30px;
}

.article-section p {
    font-size: 1em;
    color: #ffffff;
    margin: 15px 0;
}

.article-section pre {
    background: #2a5298;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
}

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

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

.article-section th, .article-section td {
    border: 1px solid #ffffff;
    padding: 10px;
    text-align: left;
}

.article-section th {
    background: #39FF14;
    color: #000000;
}

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

/* 示范展示 */
.demo-section {
    background: rgba(0, 0, 0, 0.7);
    padding: 20px;
    border-radius: 10px;
}

.demo-section h2 {
    color: #FFD700;
    margin-bottom: 15px;
}

.demo-section ul {
    list-style: none;
    padding: 0;
}

.demo-section li {
    margin-bottom: 20px;
}

.demo-section li img {
    width: 320px;
    height: 320px;
    object-fit: cover;
    display: block;
    margin-bottom: 10px;
    border-radius: 5px;
}

.demo-section li h4 {
    color: #39FF14;
    margin-bottom: 5px;
}

.demo-section li p {
    color: #ffffff;
    margin: 5px 0;
}

.demo-section li .code-example {
    background: #2a5298;
    padding: 10px;
    border-radius: 5px;
    overflow-x: auto;
}

.demo-section a {
    color: #39FF14;
    text-decoration: none;
}

.demo-section a:hover {
    text-decoration: underline;
}

/* 页脚样式 */
footer {
    text-align: center;
    padding: 20px 0;
    background: rgba(0, 0, 0, 0.5);
    color: #ffffff;
}

footer p {
    margin: 0;
    font-size: 0.9em;
}

/* 提示信息 */
.reference-note {
    text-align: center;
    font-size: 1em;
    color: #FF4500;
    margin: 20px 0;
}

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

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

@media (max-width: 1200px) {
    .container {
        width: 95%;
    }
    .demo-section li img {
        width: 100%;
        height: auto;
    }
}

@media (max-width: 1024px) {
    nav {
        flex-direction: column;
        gap: 15px;
    }
    header {
        padding: 30px 0;
    }
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2em;
    }
    .article-section h2 {
        font-size: 1.8em;
    }
}

@media (max-width: 480px) {
    nav a {
        font-size: 0.85em;
    }
    .article-section pre, .demo-section .code-example {
        font-size: 0.9em;
    }
}

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