/* 博客文章通用样式 */

/* 白色主题覆盖 */
body {
    background-color: #f8f9fa !important;
    color: #2d2d2d !important;
}

.bg-decoration {
    opacity: 0.3;
}

header {
    background: rgba(255, 255, 255, 0.95) !important;
    border-bottom: 1px solid #e0e0e0 !important;
}

.nav-links a {
    color: #5a5a5a !important;
}

.nav-links a:hover, .nav-links a.active {
    color: #007aff !important;
}

.logo-text {
    color: #2d2d2d !important;
}

footer {
    background: #ffffff !important;
    border-top: 1px solid #e0e0e0 !important;
    color: #5a5a5a !important;
}

/* 文章容器 */
.article-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 60px 24px;
    position: relative;
    z-index: 1;
}

/* 文章头部 */
.article-header {
    text-align: center;
    margin-bottom: 60px;
}

.article-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.article-category {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(147, 51, 234, 0.15);
    color: #a78bfa;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.article-date {
    color: #6b7280;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.article-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: #10b981;
}

.article-header p {
    font-size: 1.1rem;
    color: #6b7280;
    line-height: 1.7;
}

/* 文章内容容器 - 统一背景 */
.article-content {
    background: #ffffff;
    border-radius: 16px;
    padding: 48px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* 文章内容块 - 移除独立背景，合并为连续布局 */
.article-section {
    padding: 0;
    margin-bottom: 48px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: #2d2d2d;
}

.article-section:last-child {
    margin-bottom: 0;
}

.article-section h2 {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1.75rem;
    font-weight: 600;
    margin: 0 0 24px 0;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 12px;
}

.article-section h2 i {
    color: #10b981;
    font-size: 1.5rem;
}

.article-section h3 {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1.3rem;
    font-weight: 600;
    margin: 32px 0 16px 0;
    color: #1a1a1a;
}

.article-section p {
    margin-bottom: 16px;
    line-height: 1.8;
    color: #4a4a4a;
}

.article-section ul, .article-section ol {
    margin: 20px 0;
    padding-left: 28px;
}

.article-section li {
    margin-bottom: 12px;
    line-height: 1.8;
    color: #4a4a4a;
}

.article-section li strong {
    color: #1a1a1a;
    font-weight: 600;
}

/* 重点框 */
.highlight-box {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-left: 4px solid #10b981;
    padding: 20px 24px;
    margin: 24px 0;
    border-radius: 8px;
}

.highlight-box p {
    margin: 0;
    color: #065f46;
    font-size: 1.05rem;
    line-height: 1.7;
}

.highlight-box strong {
    color: #047857;
}

/* 数据展示框 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 24px 0;
}

.stat-card {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #0284c7;
    font-family: 'JetBrains Mono', monospace;
}

.stat-label {
    font-size: 0.9rem;
    color: #075985;
    margin-top: 8px;
}

/* 链接样式 */
.article-content a {
    color: #10b981;
    text-decoration: none;
    transition: color 0.2s ease;
    border-bottom: 1px solid transparent;
}

.article-content a:hover {
    color: #059669;
    border-bottom-color: #059669;
}

/* 返回博客按钮 */
.back-blog {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #6b7280;
    text-decoration: none;
    font-size: 0.95rem;
    margin-bottom: 30px;
    transition: color 0.2s ease;
}

.back-blog:hover {
    color: #10b981;
}

.back-blog i {
    font-size: 0.9rem;
}

/* 表格样式 */
.article-table {
    width: 100%;
    margin: 24px 0;
    border-collapse: collapse;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.article-table thead {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.article-table thead th {
    padding: 16px;
    text-align: left;
    font-weight: 600;
    font-size: 0.95rem;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.article-table tbody tr {
    border-bottom: 1px solid #e5e7eb;
    transition: background-color 0.2s ease;
}

.article-table tbody tr:last-child {
    border-bottom: none;
}

.article-table tbody tr:hover {
    background-color: #f9fafb;
}

.article-table td {
    padding: 16px;
    color: #4a4a4a;
    line-height: 1.6;
    vertical-align: top;
}

.article-table td:first-child {
    font-weight: 600;
    color: #1a1a1a;
    white-space: nowrap;
}

/* 表格标签样式 */
.table-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-right: 8px;
}

.table-badge.success {
    background: #d1fae5;
    color: #065f46;
}

.table-badge.warning {
    background: #fef3c7;
    color: #92400e;
}

.table-badge.error {
    background: #fee2e2;
    color: #991b1b;
}

.table-badge.info {
    background: #dbeafe;
    color: #1e40af;
}

/* 响应式表格 */
@media (max-width: 768px) {
    .article-table {
        font-size: 0.9rem;
    }

    .article-table thead {
        display: none;
    }

    .article-table tbody tr {
        display: block;
        margin-bottom: 16px;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
    }

    .article-table td {
        display: block;
        text-align: left;
        padding: 12px 16px;
        border-bottom: 1px solid #f3f4f6;
    }

    .article-table td:last-child {
        border-bottom: none;
    }

    .article-table td:first-child {
        background: #f9fafb;
        font-weight: 700;
        color: #10b981;
    }

    .article-table td::before {
        content: attr(data-label);
        display: block;
        font-weight: 600;
        color: #6b7280;
        font-size: 0.8rem;
        margin-bottom: 4px;
        text-transform: uppercase;
    }

    .article-table td:first-child::before {
        display: none;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .article-container {
        padding: 40px 16px;
    }

    .article-header h1 {
        font-size: 2rem;
    }

    .article-content {
        padding: 32px 24px;
    }

    .article-section {
        margin-bottom: 40px;
    }

    .article-section h2 {
        font-size: 1.5rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}

