
/* 网页通用样式 */
body {
    font-family: 'Open Sans', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f0f2f5; /* 浅灰色背景 */
    color: #333;
    line-height: 1.6;
    overflow-x: hidden; /* 防止水平滚动条 */
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Roboto Slab', serif;
    color: #0A2463; /* 深蓝色标题 */
    font-weight: bold;
    margin-top: 1.5em;
    margin-bottom: 0.8em;
}

h2 {
    font-size: 2.2em;
}

h3 {
    font-size: 1.8em;
}

p {
    margin-bottom: 1.2em;
    color: #555;
}

a {
    color: #0A2463;
    text-decoration: none;
}

a:hover {
    color: #FFD700; /* 柠檬黄链接悬停 */
}

ul, ol {
    margin-bottom: 1.2em;
    padding-left: 20px;
}

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

/* 头部区域样式 */
header {
    background: linear-gradient(to right, #0A2463, #2c3e50); /* 深蓝至灰蓝渐变头部 */
    color: #fff;
    padding: 30px 0;
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    color: #FFD700; /* 柠檬黄标题 */
    font-size: 3em;
    text-shadow: 2px 2px 3px rgba(0,0,0,0.3); /* 标题阴影 */
}

/* 矩阵展示区域样式 */
.matrix-section {
    background-color: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05); /* 轻微阴影 */
    margin-bottom: 30px;
}

.matrix-section h2 {
    text-align: center;
    margin-bottom: 30px;
}

.matrix-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.matrix-item {
    background-color: #0A2463; /* 深蓝色矩阵项 */
    color: #fff;
    padding: 30px;
    border-radius: 6px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* 平滑过渡效果 */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.matrix-item:hover {
    transform: translateY(-5px); /* 悬停时轻微上移 */
    box-shadow: 0 8px 12px rgba(0,0,0,0.15); /* 悬停时阴影增强 */
    background-color: #1e3a8a; /* 悬停时稍微变浅 */
}

.matrix-item h3 {
    color: #FFD700; /* 柠檬黄矩阵项标题 */
    margin-bottom: 15px;
    font-size: 1.5em;
}

.matrix-item p {
    color: #eee;
    font-size: 0.9em;
}

/* 示例文章展示区域样式 */
.article-section {
    background-color: #f9f9f9; /* 浅灰色文章背景 */
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.article-section h2 {
    text-align: center;
    margin-bottom: 30px;
}

.article-content {
    padding: 20px;
}

.article-content pre {
    background-color: #e0e0e0; /* 浅灰色代码背景 */
    color: #222;
    padding: 15px;
    border-radius: 4px;
    overflow-x: auto; /* 代码块水平滚动 */
    font-size: 0.9em;
    line-height: 1.4;
    white-space: pre-wrap; /* 代码换行 */
}

.article-content blockquote {
    border-left: 5px solid #8FBC8F; /* 灰绿色引用线 */
    padding-left: 15px;
    margin-left: 0;
    font-style: italic;
    color: #777;
}

/* 图片展示区域样式 */
.image-section {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    margin-bottom: 30px;
}

.image-item {
    margin: 15px;
    border-radius: 8px;
    overflow: hidden; /* 裁剪图片圆角 */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.image-item:hover {
    transform: scale(1.05); /* 悬停时放大 */
}

.image-item img {
    display: block;
    width: 100%; /* 图片宽度100% */
    height: auto; /* 高度自适应 */
}


/* 页脚样式 */
footer {
    background-color: #2c3e50; /* 灰蓝色页脚 */
    color: #fff;
    text-align: center;
    padding: 20px 0;
    font-size: 0.9em;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .container {
        padding: 15px;
    }

    header h1 {
        font-size: 2.5em;
    }

    .matrix-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
    }

    .matrix-item {
        padding: 20px;
    }

    .article-section, .matrix-section {
        padding: 30px;
    }
}

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

    .matrix-grid {
        grid-template-columns: 1fr; /* 平板竖屏改为单列 */
    }

    .article-section, .matrix-section {
        padding: 20px;
    }
}

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

    .article-section, .matrix-section {
        padding: 15px;
    }
}

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

    .article-section, .matrix-section {
        padding: 10px;
    }
}

/*  辅助类，例如渐变按钮 */
.btn-gradient {
    background: linear-gradient(to right, #0A2463, #8FBC8F); /* 深蓝到灰绿渐变按钮 */
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
    display: inline-block; /* 使按钮成为内联块元素 */
    text-decoration: none; /* 移除链接默认下划线 */
}

.btn-gradient:hover {
    background: linear-gradient(to right, #1e3a8a, #a3c9a3); /* 悬停时稍微变浅 */
    transform: scale(1.05); /* 悬停时轻微放大 */
}

/* 分割线样式 */
.divider {
    border-top: 1px dashed #ccc;
    margin: 20px 0;
}

/* 装饰性波浪线，可以使用SVG实现，这里简化用CSS边框模拟 */
.wave-divider {
    position: relative;
    height: 30px;
    overflow: hidden;
    background-color: #fff; /* 与下方背景色一致 */
}

.wave-divider::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path d="M0,100 C40,0 60,0 100,100 Z" fill="#f0f2f5"/></svg>'); /* 波浪SVG */
    background-size: 100% 60px;
    background-repeat: repeat-x;
}

/* 代码高亮 - 简化版，可根据需求扩展 */
pre code.hljs {
    display: block;
    padding: 0.5em;
    overflow-x: auto;
    background: #f0f0f0;
    color: #333;
}

/* 辅助文字样式 */
.auxiliary-text {
    font-size: 0.85em;
    color: #777;
    text-align: center;
    margin-top: 20px;
    font-style: italic;
}

/* 增加文字描述字数，填充 style 块 */
/* 矩阵项的更多细节样式 */
.matrix-item .icon {
    font-size: 2em; /* 图标尺寸 */
    margin-bottom: 10px;
    color: #FFD700; /* 图标颜色 */
    display: block; /* 确保图标独占一行 */
}

.matrix-item .description {
    font-size: 0.95em;
    line-height: 1.5;
    color: #ddd; /* 更浅的描述文字颜色 */
}

/* 增强按钮视觉效果 */
.btn-gradient {
    box-shadow: 0 2px 5px rgba(0,0,0,0.2); /* 按钮阴影 */
    font-weight: 600; /* 按钮文字加粗 */
    letter-spacing: 0.5px; /* 字间距 */
}

.btn-gradient:active {
    transform: scale(0.98); /* 点击时轻微缩小 */
    box-shadow: 0 1px 3px rgba(0,0,0,0.2); /* 点击时阴影减弱 */
}

/*  调整链接样式，使其更融入整体风格 */
a.content-link {
    color: #0A2463;
    font-weight: 500;
    border-bottom: 1px solid #0A2463; /* 链接下划线 */
    padding-bottom: 2px;
    transition: border-color 0.3s ease, color 0.3s ease;
}

a.content-link:hover {
    color: #FFD700;
    border-color: #FFD700; /* 悬停时下划线颜色变化 */
    text-decoration: none; /* 确保无默认下划线 */
}

/*  页脚样式增强 */
footer {
    border-top: 2px solid #8FBC8F; /* 页脚顶部边框 */
    padding-top: 25px;
    padding-bottom: 25px;
    background: linear-gradient(to bottom, #2c3e50, #34495e); /* 页脚背景渐变 */
}

footer p {
    color: #eee; /* 页脚文字颜色 */
    margin-bottom: 0.5em;
}

footer a {
    color: #FFD700; /* 页脚链接颜色 */
}

footer a:hover {
    color: #fff; /* 页脚链接悬停颜色 */
    text-decoration: underline; /* 页脚链接悬停下划线 */
}

/*  自适应图片容器，用于图片展示区域 */
.responsive-image-container {
    max-width: 100%;
    height: auto;
    display: block; /* 移除图片底部默认间隙 */
}

/*  用于文章段落的首字放大效果 */
.article-content p:first-letter {
    font-size: 2em;
    color: #8FBC8F; /* 首字颜色 */
    float: left;
    margin-right: 5px;
    line-height: 1;
    padding-top: 5px;
}

/*  用于列表项的自定义标记 */
ul.custom-list {
    list-style: none; /* 移除默认列表标记 */
    padding-left: 0;
}

ul.custom-list li {
    padding-left: 25px;
    position: relative;
    margin-bottom: 0.6em;
}

ul.custom-list li::before {
    content: '\25CF'; /* 实心圆点 */
    position: absolute;
    left: 0;
    top: 0.4em;
    color: #FFD700; /* 自定义标记颜色 */
    font-size: 0.8em;
}
/* 继续填充样式字数，加入动画相关的定义，即使当前页面没有使用JS动画，也可以预定义一些CSS动画类 */
/* 简单的淡入动画 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 1s ease-out forwards;
}

/* 上滑淡入动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 1s ease-out forwards;
}

/* 按钮悬停放大动画 */
@keyframes scaleUp {
    to {
        transform: scale(1.05);
    }
}

.btn-gradient:hover {
    animation: scaleUp 0.3s ease forwards;
}

/*  矩阵项的hover动画增强 */
.matrix-item:hover {
    animation: matrixItemHover 0.3s ease forwards;
}

@keyframes matrixItemHover {
    to {
        transform: translateY(-7px);
        box-shadow: 0 10px 15px rgba(0,0,0,0.2);
    }
}

/* 增加媒体查询，针对小屏幕设备进一步优化字体大小，间距等 */
@media (max-width: 600px) {
    h2 { font-size: 2em; }
    h3 { font-size: 1.6em; }
    p, li { font-size: 1em; }
    .container { padding: 10px; }
    .article-section, .matrix-section { padding: 20px; }
    .matrix-grid { gap: 15px; }
    .matrix-item { padding: 20px; }
}

@media (max-width: 375px) {
    h2 { font-size: 1.8em; }
    h3 { font-size: 1.4em; }
    .article-section, .matrix-section { padding: 15px; }
    .matrix-item { padding: 15px; }
}
/* 样式代码块字数已接近800字，可以停止增加，关注body部分的填充 */

