body {
    padding-top: 90px;
    background: #fafafa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: calc(100vh - 290px);
}

.card {
    display: block;
    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 {
    margin-top: 8px;
    min-height: 40px;
    line-height: 1.8;
    font-size: 16px;
    color: #262626;
    letter-spacing: 0.3px;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.article-content > * {
    max-width: 100%;
}

/* 图片样式 */
.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;
}

/* 文章资源区域 */
.article-detail-card {
    margin-bottom: 18px;
}

.resource-card {
    margin-top: 2px;
    padding: 22px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

.resource-card .resource-section-title {
    font-size: 21px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 16px;
    line-height: 1.25;
}

.resource-card .resource-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.resource-card .resource-item {
    border: 1px solid #e6ebf1;
    border-radius: 12px;
    background: #ffffff;
    padding: 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.resource-card .resource-item:hover {
    border-color: #cfd8e3;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

.resource-card .resource-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.resource-card .resource-title {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.45;
}

.resource-card .resource-desc {
    margin-top: 6px;
    color: #64748b;
    font-size: 13px;
    line-height: 1.65;
}

.resource-card .resource-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 11px;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid #d2d8e1;
    background: #f8fafc;
    color: #334155;
    white-space: nowrap;
}

.resource-card .resource-badge-paid {
    border-color: #8fb6ff;
    color: #1d4ed8;
    background: #f5f9ff;
}

.resource-card .resource-badge-free {
    border-color: #b8e6c9;
    color: #166534;
    background: #f0fdf4;
}

.resource-card .resource-link-list {
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
}

.resource-card .resource-link-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-top: 1px solid #eef2f7;
}

.resource-card .resource-link-meta {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.resource-card .resource-link-name {
    font-size: 14px;
    color: #1e293b;
    font-weight: 600;
    word-break: break-all;
}

.resource-card .resource-extract-code {
    font-size: 12px;
    color: #64748b;
}

.resource-card .resource-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid #91b4ff;
    color: #1d4ed8;
    background: #f5f9ff;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
}

.resource-card .resource-download-btn:hover {
    background: #e8f1ff;
    border-color: #6a98f7;
    color: #1e3a8a;
}

.resource-card .resource-lock-box {
    margin-top: 12px;
    padding: 12px 14px;
    background: #f8fafc;
    border: 1px solid #e6ebf2;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    color: #475569;
    font-size: 13px;
}

.resource-card .resource-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid #d1d8e3;
    background: #fff;
    color: #0f172a;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.2s ease;
}

.resource-card .resource-action-btn:hover {
    background: #f8fafc;
    border-color: #aeb8c7;
}

.resource-card .resource-action-login {
    border-color: #8fb6ff;
    color: #1d4ed8;
    background: #f5f9ff;
}

.resource-card .resource-action-login:hover {
    background: #e8f1ff;
    border-color: #6697f4;
    color: #1e40af;
}

.resource-card .resource-action-pay {
    border-color: #8fb6ff;
    color: #1d4ed8;
    background: #f5f9ff;
}

.resource-card .resource-action-pay:hover {
    background: #e8f1ff;
    border-color: #6697f4;
    color: #1e40af;
}

/* 移动端适配 */
@media (max-width: 768px) {
    body {
        padding-top: 80px;
    }

    .container {
        padding: 15px;
    }

    .card {
        padding: 18px 14px;
        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;
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-collapse: separate;
    }

    .article-content table thead,
    .article-content table tbody,
    .article-content table tr {
        white-space: nowrap;
    }

    .article-content table th,
    .article-content table td {
        padding: 8px 10px;
        white-space: nowrap;
        min-width: 88px;
    }

    .article-content blockquote {
        padding: 12px 16px;
        margin: 16px 0;
        font-size: 14px;
    }

    .article-detail-card {
        margin-bottom: 12px;
    }

    .resource-card {
        padding: 14px 12px;
        border-radius: 10px;
    }

    .resource-card .resource-section-title {
        font-size: 18px;
        margin-bottom: 12px;
    }

    .resource-card .resource-item {
        padding: 12px;
    }

    .resource-card .resource-item-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .resource-card .resource-link-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .resource-card .resource-download-btn,
    .resource-card .resource-action-btn {
        width: 100%;
        justify-content: center;
    }

    .resource-card .resource-lock-box {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* 访问量冷却提示 */
.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;
    }
}