body {
    padding-top: 90px;
    background: #fafafa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.card {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.article-header {
    padding-bottom: 24px;
    margin-bottom: 32px;
    border-bottom: 1px solid #e8e8e8;
}

.article-title {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 16px;
    line-height: 1.5;
    color: #1a1a1a;
    letter-spacing: 0.3px;
}

.article-meta {
    color: #8c8c8c;
    font-size: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
}

.article-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.article-meta i {
    font-size: 16px;
}

.article-thumb {
    width: 100%;
    max-height: 480px;
    object-fit: contain;
    object-position: center;
    border-radius: 8px;
    margin-bottom: 32px;
    background: #f5f5f5;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.article-thumb.loaded {
    opacity: 1;
}

.article-content {
    line-height: 1.8;
    font-size: 16px;
    color: #262626;
    letter-spacing: 0.3px;
}

/* 图片样式 */
.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 20px auto;
    display: block;
}

/* 段落样式 */
.article-content p {
    margin-bottom: 18px;
    text-align: justify;
}

/* 一级标题 */
.article-content h1 {
    font-size: 26px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 32px 0 20px 0;
    padding: 0 0 12px 0;
    border: none;
    border-bottom: 2px solid #1890ff;
    background: transparent;
}

/* 二级标题 - 与编辑器完全一致 */
.article-content h2 {
    font-size: 22px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 28px 0 16px 0;
    padding: 12px 16px;
    background: linear-gradient(135deg, #e6f7ff 0%, #f0f9ff 100%);
    border-left: 4px solid #1890ff;
    border-radius: 4px;
}

/* 三级标题 - 与编辑器完全一致 */
.article-content h3 {
    font-size: 19px;
    font-weight: 600;
    color: #262626;
    margin: 24px 0 14px 0;
    padding-left: 20px;
    position: relative;
}

.article-content h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: #1890ff;
    border-radius: 50%;
}

/* 四级标题 - 与编辑器完全一致 */
.article-content h4 {
    font-size: 17px;
    font-weight: 600;
    color: #595959;
    margin: 20px 0 12px 0;
    padding-left: 12px;
    border-left: 2px solid #d9d9d9;
}

/* 引用块 */
.article-content blockquote {
    border-left: 4px solid #1890ff;
    padding: 16px 20px;
    margin: 20px 0;
    color: #595959;
    background: rgba(24, 144, 255, 0.05);
    border-radius: 0 4px 4px 0;
    font-style: italic;
}

/* 行内代码 */
.article-content code {
    background: #f5f5f5;
    padding: 3px 8px;
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    color: #e83e8c;
    border: 1px solid #e8e8e8;
}

/* 代码块 */
.article-content pre {
    background: #282c34;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 24px 0;
    position: relative;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.article-content pre::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 36px;
    background: #21252b;
    border-radius: 8px 8px 0 0;
}

.article-content pre::after {
    content: '';
    position: absolute;
    top: 12px;
    left: 12px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ff5f56;
    box-shadow: 20px 0 0 #ffbd2e, 40px 0 0 #27c93f;
}

.article-content pre code {
    background: none;
    padding: 0;
    color: #abb2bf;
    font-size: 14px;
    line-height: 1.6;
    border: none;
    display: block;
    margin-top: 36px;
}

/* 无序列表 */
.article-content ul {
    margin: 16px 0;
    padding-left: 28px;
}

.article-content ul li {
    margin: 8px 0;
    line-height: 1.8;
}

/* 有序列表 */
.article-content ol {
    margin: 16px 0;
    padding-left: 28px;
}

.article-content ol li {
    margin: 8px 0;
    line-height: 1.8;
}

/* 链接 */
.article-content a {
    color: #1890ff;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.article-content a:hover {
    border-bottom-color: #1890ff;
}

/* 表格 */
.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 14px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.article-content table th,
.article-content table td {
    border: 1px solid #e8e8e8;
    padding: 12px 16px;
    text-align: left;
}

.article-content table th {
    background: #fafafa;
    font-weight: 600;
    color: #262626;
    border-bottom: 2px solid #1890ff;
}

.article-content table tbody tr:hover {
    background: rgba(24, 144, 255, 0.05);
}

.article-content table tbody tr:nth-child(even) {
    background: #fafafa;
}

.article-content table tbody tr:nth-child(even):hover {
    background: rgba(24, 144, 255, 0.05);
}

/* 分隔线 */
.article-content hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, #d9d9d9, transparent);
    margin: 32px 0;
}

/* 移动端适配 */
@media (max-width: 768px) {
    body {
        padding-top: 80px;
    }

    .container {
        padding: 15px;
    }

    .card {
        padding: 20px 16px;
        border-radius: 10px;
    }

    .article-title {
        font-size: 22px;
        line-height: 1.4;
    }

    .article-meta {
        font-size: 13px;
        gap: 12px;
    }

    .article-content {
        font-size: 15px;
        line-height: 1.75;
    }

    .article-thumb {
        max-height: 280px;
        border-radius: 6px;
        margin-bottom: 24px;
    }

    .article-content img {
        margin: 16px auto;
    }

    .article-content h1 {
        font-size: 20px;
        padding: 0 0 10px 0;
        margin: 24px 0 16px 0;
        border: none;
        border-bottom: 2px solid #1890ff;
        background: transparent;
    }

    .article-content h2 {
        font-size: 18px;
        padding: 10px 12px;
        margin: 20px 0 12px 0;
    }

    .article-content h3 {
        font-size: 16px;
        padding-left: 16px;
        margin: 16px 0 10px 0;
    }

    .article-content h3::before {
        width: 6px;
        height: 6px;
    }

    .article-content h4 {
        font-size: 15px;
        padding-left: 10px;
        margin: 16px 0 10px 0;
    }

    .article-content pre {
        padding: 16px 12px;
        font-size: 12px;
        margin: 20px -8px;
        border-radius: 6px;
    }

    .article-content pre::before {
        height: 32px;
    }

    .article-content pre::after {
        top: 10px;
        left: 10px;
        width: 10px;
        height: 10px;
        box-shadow: 18px 0 0 #ffbd2e, 36px 0 0 #27c93f;
    }

    .article-content pre code {
        font-size: 12px;
        margin-top: 32px;
    }

    .article-content table {
        font-size: 12px;
        display: block;
        overflow-x: auto;
    }

    .article-content table th,
    .article-content table td {
        padding: 8px 10px;
    }

    .article-content blockquote {
        padding: 12px 16px;
        margin: 16px 0;
        font-size: 14px;
    }
}

/* 访问量冷却提示 */
.view-cooldown-notice {
    margin-top: 16px;
    padding: 12px 16px;
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 8px;
    color: #ff9800;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: slideDown 0.3s ease-out;
}

.view-cooldown-notice i {
    font-size: 18px;
    flex-shrink: 0;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .view-cooldown-notice {
        font-size: 13px;
        padding: 10px 14px;
    }

    .view-cooldown-notice i {
        font-size: 16px;
    }
}