
/* 网页通用样式 */
body {
    font-family: sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #0a0029, #1c005a, #300080, #4500a8, #5b00d1, #7200fa);
    color: #ffffff;
    overflow-x: hidden; /* 避免出现水平滚动条 */
}

/* 容器和布局 */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* 标题区域样式 */
.header {
    text-align: center;
    padding: 30px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}

.header h1 {
    font-size: 2.5em;
    font-weight: bold;
    letter-spacing: 1px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    color: #ccf2ff; /* 梦幻标题颜色 */
}

.header p {
    font-size: 1.1em;
    color: #a6b7c5;
    margin-top: 10px;
}

/* 内容主体样式 */
.main-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

/* 特色模块样式 */
.feature-module {
    background-color: rgba(255, 255, 255, 0.08);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* 使内容均匀分布 */
}

.feature-module:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25);
}

.feature-module img {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 15px;
    transition: opacity 0.3s ease;
}

.feature-module:hover img {
    opacity: 0.9; /* 鼠标悬停时略微降低图片透明度 */
}


.feature-module h3 {
    font-size: 1.6em;
    margin-bottom: 10px;
    color: #e0f7fa; /* 特色标题颜色 */
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);
}

.feature-module p {
    font-size: 1.0em;
    line-height: 1.7;
    color: #c5cae9;
    margin-bottom: 15px; /* 增加段落底部间距 */
}

.feature-module a {
    display: inline-block;
    padding: 12px 25px;
    background: linear-gradient(to right, #6a1b9a, #8e24aa); /* 按钮渐变色 */
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.3s ease;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    align-self: flex-start; /* 按钮左对齐 */
}

.feature-module a:hover {
    background: linear-gradient(to right, #8e24aa, #6a1b9a); /* 反向渐变 */
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}


/* 示例文章展示区域 */
.article-section {
    background-color: rgba(255, 255, 255, 0.08);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.article-section h2 {
    font-size: 2em;
    color: #b3e5fc; /* 文章标题颜色 */
    margin-bottom: 20px;
    text-align: center;
    text-shadow: 2px 2px 3px rgba(0, 0, 0, 0.5);
}

.article-section article {
    color: #e0f7fa; /* 文章文本颜色 */
    font-size: 1.05em;
    line-height: 1.8;
}

.article-section article h3 {
    font-size: 1.6em;
    color: #81d4fa; /* 小标题颜色 */
    margin-top: 25px;
    margin-bottom: 15px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);
}

.article-section article p {
    margin-bottom: 15px;
    color: #c5cae9;
}

.article-section article b {
    color: #bbdefb; /* 强调文本颜色 */
    font-weight: bold;
}

.article-section article pre {
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto; /* 水平滚动条，代码过长时可滚动 */
    font-size: 0.9em;
    line-height: 1.5;
    margin: 15px 0;
    white-space: pre-wrap; /* 代码块换行 */
    word-wrap: break-word; /* 单词过长时断开换行 */
    tab-size: 4; /* 设置制表符大小 */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.article-section article code {
    font-family: monospace, monospace; /* 代码字体 */
}


/* 页脚样式 */
.footer {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #a6b7c5;
    font-size: 0.9em;
}

/* 响应式布局 */
@media (max-width: 768px) {
    .container {
        width: 95%;
        padding: 15px;
        margin: 15px auto;
    }

    .header {
        padding: 20px 0;
    }

    .header h1 {
        font-size: 2em;
    }

    .header p {
        font-size: 1em;
    }

    .main-content {
        grid-template-columns: 1fr; /* 平板及以下屏幕，模块垂直排列 */
    }

    .feature-module {
        padding: 20px;
    }

    .feature-module h3 {
        font-size: 1.4em;
    }

    .article-section {
        padding: 20px;
    }

    .article-section h2 {
        font-size: 1.8em;
    }

    .article-section article {
        font-size: 1em;
    }
}

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

    .header p {
        font-size: 0.9em;
    }

    .feature-module h3 {
        font-size: 1.2em;
    }

    .feature-module p {
        font-size: 0.9em;
    }

    .article-section h2 {
        font-size: 1.6em;
    }

    .article-section article {
        font-size: 0.95em;
    }
}

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