
/* 导入字体 */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700&family=Roboto:wght@400&display=swap');

/* CSS变量定义 */
:root {
    --dark-blue: #181E3C;
    --black: #000000;
    --neon-blue: #00FFFF;
    --purple-red: #B500FF;
    --white: #FFFFFF;
    --font-title: 'Montserrat', sans-serif;
    --font-body: 'Roboto', sans-serif;
}

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

body {
    font-family: var(--font-body);
    background: linear-gradient(to bottom, var(--dark-blue), var(--black));
    color: var(--white);
    overflow-x: hidden;
    animation: aurora-move 15s linear infinite;
}

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

/* 导航栏样式 */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 200px;
    height: 100vh;
    background-color: var(--dark-blue);
    padding-top: 60px;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.5);
}

nav ul {
    list-style: none;
}

nav li {
    margin: 20px 0;
    text-align: center;
}

nav a {
    text-decoration: none;
    color: var(--white);
    font-family: var(--font-title);
    font-size: 18px;
    transition: color 0.3s ease, transform 0.3s ease;
}

nav a:hover {
    color: var(--neon-blue);
    transform: scale(1.1);
}

/* 主内容区域 */
.main-content {
    margin-left: 220px;
    padding: 20px;
    min-height: 100vh;
}

/* 轮播图样式 */
.carousel {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    border-radius: 10px;
    margin-bottom: 40px;
}

.carousel img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
    animation: fadein 2s ease-in-out forwards;
}

.carousel img.active {
    display: block;
}

@keyframes fadein {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 模块化排版 */
.modules {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.module {
    background-color: var(--black);
    border: 1px solid var(--dark-blue);
    border-radius: 8px;
    padding: 20px;
    flex: 1 1 calc(33.333% - 40px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.7);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.module:hover {
    transform: translateY(-10px);
    background-color: var(--dark-blue);
}

.module h3 {
    color: var(--neon-blue);
    margin-bottom: 10px;
    font-family: var(--font-title);
}

.module p {
    color: var(--white);
    font-size: 14px;
    line-height: 1.6;
}

/* 示例数据展示 */
.sample-data {
    margin-top: 40px;
    padding: 20px;
    background: linear-gradient(135deg, var(--dark-blue), var(--black));
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.5);
}

.sample-data h2 {
    color: var(--purple-red);
    margin-bottom: 20px;
    font-family: var(--font-title);
}

.sample-data ul {
    list-style: disc inside;
    margin-bottom: 20px;
}

.sample-data li {
    margin-bottom: 10px;
    font-size: 16px;
}

.sample-data pre {
    background-color: var(--black);
    padding: 10px;
    border-radius: 5px;
    overflow-x: auto;
    margin-bottom: 20px;
}

.sample-data code {
    color: var(--neon-blue);
    font-family: 'Courier New', Courier, monospace;
}

/* 示例文章展示 */
.article-display {
    margin-top: 40px;
    padding: 20px;
    background: linear-gradient(135deg, var(--dark-blue), var(--black));
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.5);
}

.article-display h2, .article-display h3 {
    font-family: var(--font-title);
    color: var(--purple-red);
    margin-bottom: 15px;
}

.article-display p {
    color: var(--white);
    line-height: 1.8;
    margin-bottom: 15px;
}

.article-display pre {
    background-color: var(--black);
    padding: 10px;
    border-radius: 5px;
    overflow-x: auto;
    margin-bottom: 20px;
}

.article-display code {
    color: var(--neon-blue);
    font-family: 'Courier New', Courier, monospace;
}

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

.article-display th, .article-display td {
    border: 1px solid var(--dark-blue);
    padding: 10px;
    text-align: left;
}

.article-display th {
    background-color: var(--purple-red);
    color: var(--black);
}

.article-display td {
    background-color: var(--black);
    color: var(--white);
}

/* 提示信息 */
.reference-note {
    margin-top: 20px;
    padding: 10px;
    background-color: var(--dark-blue);
    color: var(--neon-blue);
    border-left: 5px solid var(--purple-red);
    font-family: var(--font-body);
}

/* 响应式设计 */
@media (max-width: 1440px) {
    .module {
        flex: 1 1 calc(33.333% - 40px);
    }
}

@media (max-width: 1200px) {
    .module {
        flex: 1 1 calc(50% - 40px);
    }
}

@media (max-width: 1024px) {
    nav {
        width: 180px;
    }
    .main-content {
        margin-left: 200px;
    }
    .module {
        flex: 1 1 100%;
    }
}

@media (max-width: 768px) {
    nav {
        width: 150px;
    }
    .main-content {
        margin-left: 170px;
    }
    .carousel {
        height: 300px;
    }
    .module {
        flex: 1 1 100%;
    }
}

@media (max-width: 480px) {
    nav {
        width: 120px;
    }
    .main-content {
        margin-left: 140px;
    }
    .carousel {
        height: 200px;
    }
    nav a {
        font-size: 16px;
    }
    .module {
        padding: 15px;
    }
}

@media (max-width: 320px) {
    nav {
        width: 100px;
    }
    .main-content {
        margin-left: 120px;
    }
    .carousel {
        height: 150px;
    }
    nav a {
        font-size: 14px;
    }
    .module {
        padding: 10px;
    }
    .module h3 {
        font-size: 16px;
    }
    .module p {
        font-size: 12px;
    }
}

/* 按钮样式 */
button {
    background-color: var(--neon-blue);
    color: var(--black);
    border: none;
    padding: 10px 20px;
    font-family: var(--font-title);
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 5px;
}

button:hover {
    transform: scale(1.1);
    background-color: var(--purple-red);
}

/* 图标样式 */
.icon {
    width: 24px;
    height: 24px;
    fill: var(--neon-blue);
    transition: fill 0.3s ease;
}

.icon:hover {
    fill: var(--purple-red);
}

/* 图片样式 */
img.decorative {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 10px;
    margin: 10px;
}

/* 代码块样式 */
pre {
    background-color: var(--black);
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 20px;
}

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

