
/* 根元素变量定义，简化颜色管理 */
:root {
    --main-color-1: #000066; /* 深蓝色 */
    --main-color-2: #660099; /* 紫色 */
    --accent-color-1: #FF5722; /* 亮橙色 */
    --accent-color-2: #00FFCC; /* 荧光绿色 */
    --background-gradient: linear-gradient(45deg, var(--main-color-1), var(--main-color-2), var(--accent-color-2));
    --font-family: 'Roboto', sans-serif; /* 无衬线字体 */
    --text-color: #FFFFFF; /* 白色文字 */
    --header-height: 60px; /* 导航栏高度 */
    --transition-speed: 0.3s; /* 动画过渡时间 */
}

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

body {
    background: var(--background-gradient);
    font-family: var(--font-family);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    padding-top: var(--header-height);
    animation: aurora-move 15s linear infinite;
}

/* 背景动画效果 */
@keyframes aurora-move {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

header h1 {
    font-size: 24px;
    font-weight: bold;
    color: var(--accent-color-1);
}

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

/* 文章样式 */
article {
    background: rgba(0, 0, 0, 0.6);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

/* 文章标题 */
article h2 {
    font-size: 32px;
    color: var(--accent-color-1);
    margin-bottom: 20px;
    text-align: center;
}

/* 二级标题 */
article h3 {
    font-size: 24px;
    color: var(--accent-color-2);
    margin-top: 30px;
    margin-bottom: 15px;
}

/* 三级标题 */
article h4 {
    font-size: 20px;
    color: var(--accent-color-1);
    margin-top: 25px;
    margin-bottom: 10px;
}

/* 段落样式 */
article p {
    font-size: 16px;
    margin-bottom: 15px;
    text-align: justify;
}

/* 代码块样式 */
article pre {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 10px;
    overflow-x: auto;
    margin-bottom: 20px;
}

article code {
    font-family: 'Courier New', Courier, monospace;
    color: var(--accent-color-2);
    font-size: 14px;
}

/* 表格样式 */
article table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

article table, article th, article td {
    border: 1px solid var(--accent-color-1);
}

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

article th {
    background: rgba(255, 87, 34, 0.8);
    color: #fff;
}

/* 图片样式 */
article img {
    width: 100%;
    max-width: 320px;
    height: auto;
    border-radius: 10px;
    margin: 10px 0;
}

/* 模块化布局 */
.modules {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

/* 模块样式 */
.module {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 20px;
    transition: transform var(--transition-speed) ease-in-out, box-shadow var(--transition-speed) ease-in-out;
}

.module:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.5);
}

/* 按钮样式 */
button {
    background: var(--accent-color-1);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: background var(--transition-speed) ease-in-out;
}

button:hover {
    background: var(--accent-color-2);
}

/* 响应式设计 */
@media (max-width: 1440px) {
    article h2 {
        font-size: 28px;
    }
}

@media (max-width: 1200px) {
    .container {
        padding: 15px;
    }
}

@media (max-width: 1024px) {
    article {
        padding: 25px;
    }
}

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

    article h2 {
        font-size: 24px;
    }

    article h3 {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    article h2 {
        font-size: 20px;
    }

    article h3 {
        font-size: 18px;
    }

    article p {
        font-size: 14px;
    }

    .modules {
        grid-template-columns: 1fr;
    }
}

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

    article h2 {
        font-size: 18px;
    }

    article h3 {
        font-size: 16px;
    }

    article p {
        font-size: 12px;
    }
}

/* 提示语样式 */
.reference-note {
    text-align: center;
    font-size: 14px;
    color: var(--accent-color-1);
    margin-top: 20px;
}

/* 链接样式 */
a {
    color: var(--accent-color-2);
    text-decoration: none;
    transition: color var(--transition-speed) ease-in-out;
}

a:hover {
    color: var(--accent-color-1);
}

