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

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

/* 全局样式 */
body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #000046, #1cb5e0); /* 深空蓝到电蓝色渐变 */
    color: #f8f8f2; /* 浅灰色 */
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* 导航栏 */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(0,0,0,0.8);
    padding: 15px 0;
    z-index: 1000;
}

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

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    color: #bd93f9; /* 霓虹紫色 */
    text-decoration: none;
    font-size: 1.2em;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: #ff79c6; /* 霓虹粉色 */
}

/* 头部 */
header {
    text-align: center;
    padding: 100px 0 60px 0;
}

header h1 {
    font-size: 3em;
    color: #ff79c6; /* 霓虹粉色 */
    margin-bottom: 20px;
}

/* 卡片网格 */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 60px 0;
}

.card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    overflow: hidden;
    transition: transform 0.3s ease-in-out;
}

.card:hover {
    transform: scale(1.05);
}

.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-content {
    padding: 20px;
}

.card-content h3 {
    font-size: 1.5em;
    color: #bd93f9; /* 霓虹紫色 */
    margin-bottom: 10px;
}

.card-content p {
    font-size: 1em;
    margin-bottom: 10px;
}

.card-content .function {
    font-size: 0.9em;
    color: #f8f8f2; /* 浅灰色 */
}

/* 样例文章部分 */
.sample-article {
    background: rgba(255, 255, 255, 0.1);
    padding: 40px;
    border-radius: 10px;
    margin-bottom: 60px;
}

.sample-article h2 {
    font-size: 2em;
    color: #ff79c6; /* 霓虹粉色 */
    margin-bottom: 20px;
}

.sample-article h3, .sample-article h4 {
    color: #bd93f9; /* 霓虹紫色 */
    margin-top: 20px;
    margin-bottom: 10px;
}

.sample-article p {
    margin-bottom: 15px;
}

.sample-article pre {
    background: #2d2d2d;
    padding: 10px;
    border-radius: 5px;
    overflow-x: auto;
}

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

/* 页脚 */
footer {
    text-align: center;
    padding: 20px;
    color: #bd93f9; /* 霓虹紫色 */
    background: rgba(0,0,0,0.8);
}

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

@media (max-width: 1200px) {
    .container {
        width: 95%;
    }
}

@media (max-width: 1024px) {
    nav ul li a {
        font-size: 1em;
    }

    .card img {
        height: 150px;
    }

    .sample-article {
        padding: 30px;
    }
}

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

    .card img {
        height: 120px;
    }

    nav ul {
        flex-direction: column;
    }

    nav ul li {
        margin: 10px 0;
    }

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

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

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

    .card img {
        height: 100px;
    }

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

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

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

    .card img {
        height: 80px;
    }

    .sample-article {
        padding: 10px;
    }
}

