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

body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #1E202B, #2E313F);
    color: #FFFFFF;
    line-height: 1.6;
    padding: 20px;
    animation: backgroundMove 15s linear infinite;
}

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

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

/* 头部样式 */
header {
    text-align: center;
    padding: 50px 0;
    background: rgba(30, 32, 43, 0.8);
    border-radius: 10px;
}

header h1 {
    font-size: 2.5em;
    color: #FFC107;
    margin-bottom: 20px;
}

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

/* 导航菜单 */
nav {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 30px 0;
}

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

nav a:hover {
    color: #FF9800;
}

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

/* 侧边栏 */
aside {
    background: rgba(46, 49, 63, 0.9);
    padding: 20px;
    border-radius: 10px;
}

aside h2 {
    color: #FFC107;
    margin-bottom: 15px;
}

aside ul {
    list-style: none;
}

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

aside ul li a {
    color: #FFFFFF;
    text-decoration: none;
    transition: color 0.3s ease;
}

aside ul li a:hover {
    color: #FF9800;
}

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

article h2 {
    color: #FFC107;
    margin-bottom: 20px;
}

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

article h4 {
    color: #FFC107;
    margin-top: 15px;
    margin-bottom: 10px;
}

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

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

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

article table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
}

article table, article th, article td {
    border: 1px solid #FFC107;
}

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

.article-image {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.article-image img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 5px;
}

/* 代码示例美化 */
.code-block {
    background: #1E202B;
    padding: 20px;
    border-radius: 10px;
    overflow-x: auto;
}

.code-block code {
    color: #FFC107;
    font-family: 'Courier New', Courier, monospace;
    display: block;
}

/* 交互按钮 */
button {
    background-color: #FFC107;
    border: none;
    color: #000000;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #FF9800;
}

/* 响应式设计 */
@media (max-width: 1440px) {
    main {
        grid-template-columns: 1fr 3fr;
    }
}

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

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

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

    article h2 {
        font-size: 1.8em;
    }

    article p, article code {
        font-size: 0.9em;
    }

    .article-image img {
        width: 80px;
        height: 80px;
    }
}

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

    nav {
        gap: 15px;
    }

    main {
        padding: 10px;
    }

    button {
        padding: 8px 16px;
    }
}

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

    nav a {
        font-size: 0.9em;
    }

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