
/* 基础样式重置与通用设置 */
body, html {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #1e3c72, #2a5298); /* 深蓝到深紫渐变背景 */
    color: #fff;
    overflow-x: hidden; /* 防止水平滚动条 */
    scroll-behavior: smooth; /* 平滑滚动 */
}

*, ::before, ::after {
    box-sizing: border-box;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部区域样式 */
header {
    text-align: center;
    padding: 40px 20px;
}

header h1 {
    font-size: 2.5em;
    font-weight: bold;
    color: #fff; /* 白色标题文字 */
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3); /* 标题阴影 */
    margin-bottom: 10px;
}

header p {
    font-size: 1.1em;
    color: #eee; /* 稍浅的描述文字颜色 */
    margin-bottom: 20px;
}

/* 卡片展示区域样式 */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* 响应式列数，最小宽度300px */
    gap: 30px;
    padding: 20px;
}

.card {
    background-color: rgba(255, 255, 255, 0.08); /* 半透明白色卡片背景 */
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3); /* 卡片阴影 */
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* 平滑过渡效果 */
    position: relative;
    overflow: hidden; /* 裁剪溢出内容 */
}

.card:hover {
    transform: translateY(-5px) scale(1.03); /* 悬停时轻微上移和放大 */
    box-shadow: 0 8px 25px rgba(0,0,0,0.4); /* 悬停时阴影增强 */
}

.card-image {
    width: 100%;
    height: 200px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 图片填充方式 */
    display: block;
}

.card-body {
    position: relative; /* 建立定位上下文 */
    z-index: 1; /* 确保内容在伪元素之上 */
}

.card h3 {
    font-size: 1.6em;
    margin-bottom: 10px;
    color: #fff; /* 白色卡片标题 */
    font-weight: bold;
}

.card p {
    font-size: 1em;
    color: #eee; /* 卡片描述文字颜色 */
    line-height: 1.5;
}

.card .owner {
    font-size: 0.9em;
    color: #ccc; /* 所有者文字颜色 */
    margin-top: 15px;
}

/* 示例文章展示区域样式 */
.article-section {
    background-color: rgba(0, 0, 0, 0.1); /* 文章区域背景 */
    border-radius: 15px;
    padding: 30px;
    margin-top: 40px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.article-section h2 {
    font-size: 2em;
    color: #fff; /* 文章标题颜色 */
    margin-bottom: 20px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2); /* 标题下划线 */
    padding-bottom: 10px;
}

.article-section h3 {
    font-size: 1.5em;
    color: #ddd; /* 文章小标题颜色 */
    margin-top: 25px;
    margin-bottom: 15px;
}

.article-section p, .article-section li {
    font-size: 1em;
    color: #eee; /* 文章正文颜色 */
    line-height: 1.7;
    margin-bottom: 15px;
}

.article-section ul {
    list-style-type: square;
    padding-left: 30px;
}

.article-section pre {
    background-color: rgba(255, 255, 255, 0.05); /* 代码块背景 */
    color: #ddd; /* 代码颜色 */
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto; /* 水平滚动条，如果代码过长 */
    font-family: monospace, monospace;
    white-space: pre-wrap; /* 代码自动换行 */
}

.article-section code {
    font-family: monospace, monospace;
    color: #ffcdd2; /* 代码内文字颜色 */
}

.article-section blockquote {
    border-left: 5px solid #64b5f6; /* 引用块左边线 */
    padding: 15px;
    margin: 20px 0;
    background-color: rgba(255, 255, 255, 0.03); /* 引用块背景 */
    font-style: italic;
    color: #ccc; /* 引用文字颜色 */
}

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

.article-section th, .article-section td {
    border: 1px solid rgba(255, 255, 255, 0.1); /* 表格边框颜色 */
    padding: 10px;
    text-align: left;
    color: #eee; /* 表格文字颜色 */
}

.article-section th {
    background-color: rgba(255, 255, 255, 0.05); /* 表头背景 */
    font-weight: bold;
}

/* 页脚样式 */
footer {
    text-align: center;
    padding: 30px 20px;
    color: #bbb; /* 页脚文字颜色 */
    font-size: 0.9em;
    border-top: 1px solid rgba(255, 255, 255, 0.1); /* 页脚上边线 */
    margin-top: 50px;
}

/* 响应式设计 */
@media screen and (max-width: 768px) {
    header {
        padding: 30px 15px;
    }
    header h1 {
        font-size: 2em;
    }
    header p {
        font-size: 1em;
    }
    .card-grid {
        grid-template-columns: 1fr; /* 平板及以下设备，卡片单列显示 */
        gap: 20px;
    }
    .card {
        padding: 20px;
    }
    .card h3 {
        font-size: 1.4em;
    }
    .article-section {
        padding: 20px;
        margin-top: 30px;
    }
    .article-section h2 {
        font-size: 1.8em;
    }
    .article-section h3 {
        font-size: 1.3em;
    }
    .article-section p, .article-section li {
        font-size: 0.95em;
    }
}

@media screen and (max-width: 480px) {
    header {
        padding: 20px 10px;
    }
    header h1 {
        font-size: 1.7em;
    }
    header p {
        font-size: 0.9em;
    }
    .card {
        padding: 15px;
    }
    .card h3 {
        font-size: 1.3em;
    }
    .article-section {
        padding: 15px;
        margin-top: 20px;
    }
    .article-section h2 {
        font-size: 1.6em;
    }
    .article-section h3 {
        font-size: 1.2em;
    }
    .article-section p, .article-section li {
        font-size: 0.9em;
    }
}

