
/* 基础样式 */
body {
    font-family: 'Open Sans', sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #e0f7fa, #c2e0f7);
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

h2, h3 {
    font-family: 'Roboto', sans-serif;
    color: #2c3e50;
    font-weight: bold;
    margin-top: 20px;
    margin-bottom: 15px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.05);
}

p, ul, ol, table {
    line-height: 1.7;
    margin-bottom: 15px;
    color: #555;
}

a {
    color: #3498db;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* 容器和布局 */
.container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden; /* 确保内容不溢出 */
}

.header {
    text-align: center;
    padding: 30px 0;
    background: linear-gradient(to right, #a7c0cd, #d3e0e9);
    border-radius: 12px 12px 0 0;
    margin-bottom: 20px;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.header p {
    font-size: 1.2em;
    color: #f0f0f0;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.card {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.card-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: center;
    align-items: center;
}

.card-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
}

.card-title {
    font-size: 1.5em;
    font-weight: bold;
    color: #34495e;
    margin-bottom: 10px;
}

.card-description {
    font-size: 1em;
    color: #666;
    margin-bottom: 15px;
    flex-grow: 1;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px dashed #eee;
    font-size: 0.9em;
    color: #777;
}

.card-category {
    background-color: #e6f7ff;
    color: #08979c;
    padding: 5px 10px;
    border-radius: 5px;
}

.card-value {
    font-weight: bold;
    color: #27ae60;
}

/* 文章展示样式 */
.article-section {
    padding: 30px;
    background-color: #f9f9f9;
    border-radius: 10px;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.article-section h2 {
    color: #34495e;
    border-bottom: 2px solid #ddd;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.article-section h3 {
    color: #555;
    margin-top: 25px;
    margin-bottom: 15px;
}

.article-section p, .article-section ul, .article-section ol, .article-section table {
    color: #666;
}

.article-section pre {
    background-color: #f0f0f0;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto; /* 代码块超出时显示滚动条 */
    white-space: pre-wrap; /* 代码块自动换行 */
    word-wrap: break-word; /* 代码块自动断词换行 */
    font-family: monospace, monospace;
    font-size: 0.9em;
    color: #333;
    line-height: 1.5;
    border: 1px solid #ddd;
}

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

.article-section th, .article-section td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
}

.article-section th {
    background-color: #eee;
    font-weight: bold;
}

/* 页脚样式 */
.footer {
    text-align: center;
    padding: 20px 0;
    color: #777;
    border-top: 1px solid #eee;
    margin-top: auto; /* 页脚推到底部 */
}

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

    .header {
        padding: 20px 0;
    }

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

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

    .card-grid {
        gap: 20px;
        margin-bottom: 25px;
    }

    .card-content {
        padding: 15px;
    }

    .card-title {
        font-size: 1.3em;
        margin-bottom: 8px;
    }

    .card-description {
        font-size: 0.95em;
        margin-bottom: 12px;
    }

    .article-section {
        padding: 20px;
        margin-bottom: 20px;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 15px 0;
    }

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

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

    .card-grid {
        grid-template-columns: 1fr; /* 平板及以下设备卡片单列显示 */
        gap: 15px;
        margin-bottom: 20px;
    }

    .card-content {
        padding: 12px;
    }

    .card-title {
        font-size: 1.2em;
    }

    .card-description {
        font-size: 0.9em;
    }

    .article-section {
        padding: 15px;
        margin-bottom: 15px;
    }
}

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

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

    .card-content {
        padding: 10px;
    }

    .card-title {
        font-size: 1.1em;
    }

    .card-description {
        font-size: 0.85em;
    }

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

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

