/* 将此样式添加到 post.html 的 <style> 标签中*/

/* ========================================================================
   表格样式增强 - 现代化设计
   ======================================================================== */
.post-content .markdown-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    font-size: 0.95rem;
}

.post-content .markdown-table thead {
    background: linear-gradient(135deg, #5dade2 0%, #3498db 100%);
    color: white;
}

.post-content .markdown-table thead tr {
    border-bottom: 3px solid #2980b9;
}

.post-content .markdown-table th {
    padding: 1rem 0.75rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.post-content .markdown-table tbody tr {
    border-bottom: 1px solid #f0f4f8;
    transition: background-color 0.2s ease;
}

.post-content .markdown-table tbody tr:hover {
    background-color: #f8fbfe;
}

.post-content .markdown-table tbody tr:last-child {
    border-bottom: none;
}

.post-content .markdown-table td {
    padding: 0.875rem 0.75rem;
    color: #495057;
    line-height: 1.6;
}

/* 表格内的代码 */
.post-content .markdown-table code {
    background: #f8fbfe;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.875rem;
    color: #e74c3c;
}

/* 表格内的链接 */
.post-content .markdown-table a {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.post-content .markdown-table a:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* 响应式表格 - 移动端优化 */
@media (max-width: 768px) {
    .post-content .markdown-table {
        font-size: 0.875rem;
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .post-content .markdown-table th,
    .post-content .markdown-table td {
        padding: 0.75rem 0.5rem;
    }
}

/* ========================================================================
   列表样式增强 - 现代化设计
   ======================================================================== */

/* 无序列表 */
.post-content .markdown-list.unordered-list {
    list-style: none;
    padding-left: 0;
    margin: 1.25rem 0;
}

.post-content .markdown-list.unordered-list > .list-item {
    position: relative;
    padding-left: 1.75rem;
    margin-bottom: 0.75rem;
    line-height: 1.7;
    color: #495057;
}

.post-content .markdown-list.unordered-list > .list-item::before {
    content: "";
    position: absolute;
    left: 0.25rem;
    top: 0.65rem;
    width: 8px;
    height: 8px;
    background: linear-gradient(135deg, #5dade2 0%, #3498db 100%);
    border-radius: 50%;
    transition: transform 0.2s ease;
}

.post-content .markdown-list.unordered-list > .list-item:hover::before {
    transform: scale(1.3);
}

/* 嵌套无序列表 */
.post-content .markdown-list.unordered-list .markdown-list.unordered-list {
    margin: 0.5rem 0 0.5rem 0;
}

.post-content .markdown-list.unordered-list .markdown-list.unordered-list > .list-item::before {
    background: linear-gradient(135deg, #b3e0ff 0%, #85c1e9 100%);
    width: 6px;
    height: 6px;
}

/* 有序列表 */
.post-content .markdown-list.ordered-list {
    counter-reset: list-counter;
    list-style: none;
    padding-left: 0;
    margin: 1.25rem 0;
}

.post-content .markdown-list.ordered-list > .list-item {
    position: relative;
    padding-left: 2.25rem;
    margin-bottom: 0.75rem;
    line-height: 1.7;
    color: #495057;
    counter-increment: list-counter;
}

.post-content .markdown-list.ordered-list > .list-item::before {
    content: counter(list-counter);
    position: absolute;
    left: 0;
    top: 0.1rem;
    width: 1.5rem;
    height: 1.5rem;
    background: linear-gradient(135deg, #5dade2 0%, #3498db 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    transition: transform 0.2s ease;
}

.post-content .markdown-list.ordered-list > .list-item:hover::before {
    transform: scale(1.15);
}

/* 嵌套有序列表 */
.post-content .markdown-list.ordered-list .markdown-list.ordered-list {
    margin: 0.5rem 0 0.5rem 0;
}

.post-content .markdown-list.ordered-list .markdown-list.ordered-list > .list-item::before {
    background: linear-gradient(135deg, #b3e0ff 0%, #85c1e9 100%);
    width: 1.25rem;
    height: 1.25rem;
    font-size: 0.75rem;
}

/* 列表内的代码 */
.post-content .markdown-list code {
    background: #f8fbfe;
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    font-size: 0.9rem;
    color: #e74c3c;
    font-family: 'Courier New', monospace;
}

/* 列表内的链接 */
.post-content .markdown-list a {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.post-content .markdown-list a:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* 列表内的粗体文本 */
.post-content .markdown-list strong {
    color: #2d3748;
    font-weight: 600;
}

/* 列表项之间的间距调整 */
.post-content .markdown-list .list-item > p {
    margin: 0;
}

.post-content .markdown-list .list-item > p + p {
    margin-top: 0.5rem;
}

/* 响应式列表 - 移动端优化 */
@media (max-width: 768px) {
    .post-content .markdown-list.unordered-list > .list-item {
        padding-left: 1.5rem;
        font-size: 0.95rem;
    }
    
    .post-content .markdown-list.ordered-list > .list-item {
        padding-left: 2rem;
        font-size: 0.95rem;
    }
    
    .post-content .markdown-list.ordered-list > .list-item::before {
        width: 1.35rem;
        height: 1.35rem;
        font-size: 0.75rem;
    }
}

/* ========================================================================
   任务列表样式（复选框列表）
   ======================================================================== */

.post-content .task-list-item {
    list-style: none;
    position: relative;
    padding-left: 2rem;
}

.post-content .task-list-item input[type="checkbox"] {
    position: absolute;
    left: 0;
    top: 0.35rem;
    width: 1.1rem;
    height: 1.1rem;
    cursor: pointer;
    margin: 0;
    accent-color: #3498db;
    border: 1px solid #d1e7ff;
    border-radius: 3px;
}

/* ========================================================================
   混合内容优化
   ======================================================================== */

/* 表格中的列表 */
.post-content .markdown-table .markdown-list {
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

.post-content .markdown-table .markdown-list .list-item {
    margin-bottom: 0.4rem;
}

/* 列表中的表格 */
.post-content .markdown-list .markdown-table {
    margin: 0.75rem 0;
    font-size: 0.9rem;
}

/* ========================================================================
   GitHub 风格 Callouts 样式优化
   ======================================================================== */

.post-content .callout {
    margin: 1.5rem 0;
    padding: 1rem 1.25rem;
    border-left: 4px solid var(--callout-color, #1a85ff);
    border-radius: 0 6px 6px 0;
    background: linear-gradient(
        to right,
        rgba(var(--callout-rgb, 26, 133, 255), 0.08) 0%,
        rgba(var(--callout-rgb, 26, 133, 255), 0.02) 100%
    );
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.post-content .callout:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateX(2px);
}

/* Callout 头部 */
.post-content .callout-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--callout-color, #1a85ff);
}

/* Callout 图标容器 */
.post-content .callout-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    line-height: 1;
    min-width: 1.5rem;
}

/* Emoji 图标样式 */
.post-content .callout-icon {
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

/* SVG 图标样式 */
.post-content .callout-icon svg {
    width: 1.125rem;
    height: 1.125rem;
    vertical-align: middle;
    color: var(--callout-color, #1a85ff);
}

/* Callout 标题 */
.post-content .callout-header strong {
    font-size: 1rem;
    letter-spacing: 0.3px;
}

/* Callout 内容 */
.post-content .callout-content {
    color: #495057;
    line-height: 1.7;
}

.post-content .callout-content p {
    margin: 0.5rem 0;
}

.post-content .callout-content p:first-child {
    margin-top: 0;
}

.post-content .callout-content p:last-child {
    margin-bottom: 0;
}

/* 不同类型的 Callout 配色 */

/* Note - 蓝色 */
.post-content .callout.note {
    --callout-color: #1a85ff;
    --callout-rgb: 26, 133, 255;
}

/* Warning - 橙色 */
.post-content .callout.warning {
    --callout-color: #ff6b35;
    --callout-rgb: 255, 107, 53;
}

/* Tip - 绿色 */
.post-content .callout.tip {
    --callout-color: #00b300;
    --callout-rgb: 0, 179, 0;
}

/* Important - 紫色 */
.post-content .callout.important {
    --callout-color: #b300b3;
    --callout-rgb: 179, 0, 179;
}

/* Caution - 红色 */
.post-content .callout.caution {
    --callout-color: #ff0000;
    --callout-rgb: 255, 0, 0;
}

/* Callout 内的代码 */
.post-content .callout code {
    background: rgba(0, 0, 0, 0.05);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.9rem;
    color: inherit;
}

/* Callout 内的链接 */
.post-content .callout a {
    color: var(--callout-color, #1a85ff);
    text-decoration: underline;
    font-weight: 500;
}

.post-content .callout a:hover {
    text-decoration: none;
    opacity: 0.8;
}

/* Callout 内的列表 */
.post-content .callout ul,
.post-content .callout ol {
    margin: 0.75rem 0;
    padding-left: 1.5rem;
}

.post-content .callout li {
    margin: 0.375rem 0;
}

/* 响应式优化 */
@media (max-width: 768px) {
    .post-content .callout {
        margin: 1rem -0.5rem;
        padding: 0.875rem 1rem;
        border-radius: 0 4px 4px 0;
    }
    
    .post-content .callout-header {
        font-size: 0.95rem;
    }
    
    .post-content .callout-icon {
        font-size: 1.125rem;
    }
    
    .post-content .callout-content {
        font-size: 0.95rem;
    }
}

/* 暗色模式支持（可选） */
@media (prefers-color-scheme: dark) {
    .post-content .callout {
        background: linear-gradient(
            to right,
            rgba(var(--callout-rgb, 26, 133, 255), 0.15) 0%,
            rgba(var(--callout-rgb, 26, 133, 255), 0.05) 100%
        );
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }
    
    .post-content .callout-content {
        color: #e0e0e0;
    }
    
    .post-content .callout code {
        background: rgba(255, 255, 255, 0.1);
    }
}
