/* 
 * 通用 Markdown 内容样式
 * 适用于隐私政策、服务条款、法律文档等页面
 * 使用方式：在 HTML 元素上添加 .markdown-content 类
 */

.markdown-content {
    color: #374151;
    line-height: 1.75;
    font-size: 1.0625rem;
}

/* 标题样式 */
.markdown-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    color: #111827;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 0.75rem;
}

.markdown-content h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
    line-height: 1.3;
    color: #1f2937;
    padding-top: 0.5rem;
}

.markdown-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    color: #374151;
}

.markdown-content h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    color: #4b5563;
}

.markdown-content h5 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    color: #4b5563;
}

.markdown-content h6 {
    font-size: 1rem;
    font-weight: 600;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    color: #4b5563;
}

/* 段落样式 */
.markdown-content p {
    margin-top: 0;
    margin-bottom: 1.25rem;
    line-height: 1.75;
    font-size: 1.0625rem;
    color: #374151;
}

.markdown-content p:first-of-type {
    margin-top: 0;
}

/* 列表样式 */
.markdown-content ul,
.markdown-content ol {
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    padding-left: 2.5rem;
    line-height: 1.75;
}

.markdown-content ul {
    list-style-type: disc;
}

.markdown-content ol {
    list-style-type: decimal;
    counter-reset: list-counter;
}

.markdown-content li {
    margin-bottom: 0.875rem;
    line-height: 1.75;
    color: #374151;
    padding-left: 0.5rem;
}

.markdown-content ol > li {
    margin-left: 0;
    padding-left: 0.75rem;
}

.markdown-content li p {
    margin-bottom: 0.5rem;
}

.markdown-content li ul,
.markdown-content li ol {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
}

/* 文本样式 */
.markdown-content strong {
    font-weight: 600;
    color: #1f2937;
}

.markdown-content em {
    font-style: italic;
    color: #4b5563;
}

/* 链接样式 */
.markdown-content a {
    color: #2563eb;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s;
}

.markdown-content a:hover {
    color: #1d4ed8;
    text-decoration: none;
}

/* 引用样式 */
.markdown-content blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    border-left: 4px solid #3b82f6;
    background-color: #eff6ff;
    border-radius: 0.375rem;
    font-style: italic;
    color: #1e40af;
}

/* 代码样式 */
.markdown-content code {
    background-color: #f3f4f6;
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-size: 0.9em;
    font-family: 'Courier New', Courier, monospace;
    color: #1f2937;
}

.markdown-content pre {
    background-color: #1f2937;
    color: #f9fafb;
    padding: 1.25rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    font-size: 0.9rem;
    line-height: 1.6;
}

.markdown-content pre code {
    background-color: transparent;
    padding: 0;
    color: inherit;
    font-size: inherit;
}

/* 分隔线样式 */
.markdown-content hr {
    margin: 2rem 0;
    border: none;
    border-top: 1px solid #e5e7eb;
}

/* 表格样式 */
.markdown-content table {
    width: 100%;
    margin: 1.5rem 0;
    border-collapse: collapse;
}

.markdown-content table th,
.markdown-content table td {
    padding: 0.75rem;
    border: 1px solid #e5e7eb;
    text-align: left;
}

.markdown-content table th {
    background-color: #f9fafb;
    font-weight: 600;
    color: #1f2937;
}

.markdown-content table tr:nth-child(even) {
    background-color: #f9fafb;
}

/* 图片样式 */
.markdown-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1.5rem 0;
}

/* 确保缩进正确 */
.markdown-content > * {
    max-width: 100%;
}

/* 响应式调整 */
@media (max-width: 640px) {
    .markdown-content h1 {
        font-size: 2rem;
    }

    .markdown-content h2 {
        font-size: 1.5rem;
    }

    .markdown-content h3 {
        font-size: 1.25rem;
    }

    .markdown-content {
        font-size: 1rem;
    }

    .markdown-content ul,
    .markdown-content ol {
        padding-left: 1.5rem;
    }
}

