/* Article Detail Page Styles */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Microsoft YaHei', 'Segoe UI', sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
}
a { text-decoration: none; color: inherit; }

/* Header */
.header {
    background: #fff;
    border-bottom: 1px solid #e8e8e8;
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-main { padding: 15px 0; }
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logo {
    font-size: 28px;
    font-weight: 700;
    color: #1890ff;
}
.nav { display: flex; gap: 30px; }
.nav a {
    color: #333;
    font-size: 15px;
    padding: 5px 0;
    transition: color 0.2s;
}
.nav a:hover { color: #1890ff; }

/* Breadcrumb */
.breadcrumb {
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    padding: 12px 0;
}
.breadcrumb-inner {
    font-size: 14px;
    color: #999;
}
.breadcrumb a { color: #666; }
.breadcrumb a:hover { color: #1890ff; }
.breadcrumb .sep { margin: 0 8px; color: #d9d9d9; }
.breadcrumb .current { color: #333; }

/* Main Layout - Three Columns */
.main-container { padding: 30px 0; }
.main-layout {
    display: flex;
    gap: 24px;
}
.sidebar-left { width: 240px; flex-shrink: 0; }
.content-area { flex: 1; min-width: 0; }
.sidebar-right { width: 280px; flex-shrink: 0; }

/* Author Card */
.author-card {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    margin-bottom: 20px;
}
.author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1890ff 0%, #36cfc9 100%);
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: #fff;
    font-weight: 700;
}
.author-name {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}
.author-org {
    font-size: 13px;
    color: #999;
    margin-bottom: 16px;
}
.author-btn {
    display: inline-block;
    background: #1890ff;
    color: #fff;
    padding: 8px 24px;
    border-radius: 20px;
    font-size: 14px;
    transition: background 0.2s;
}
.author-btn:hover { background: #40a9ff; }

/* Related Articles in Left Sidebar */
.related-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}
.related-header {
    padding: 14px 16px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 15px;
    font-weight: 600;
    color: #333;
}
.related-list { padding: 8px 0; }
.related-item {
    display: block;
    padding: 10px 16px;
    transition: background 0.2s;
}
.related-item:hover { background: #fafafa; }
.related-title {
    font-size: 14px;
    color: #333;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 6px;
}
.related-item:hover .related-title { color: #1890ff; }
.related-excerpt {
    font-size: 12px;
    color: #999;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Article Content */
.article-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}
.article-header {
    padding: 30px 30px 20px;
    border-bottom: 1px solid #f0f0f0;
}
.article-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f0f5ff;
    color: #1890ff;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 13px;
    margin-bottom: 16px;
}
.article-title {
    font-size: 26px;
    font-weight: 700;
    color: #333;
    line-height: 1.4;
    margin-bottom: 16px;
}
.article-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 14px;
    color: #999;
    flex-wrap: wrap;
}
.article-meta span { display: flex; align-items: center; gap: 4px; }

/* Article Body */
.article-body {
    padding: 30px;
    font-size: 16px;
    line-height: 1.9;
    color: #333;
}
.article-body h1, .article-body h2, .article-body h3,
.article-body h4, .article-body h5, .article-body h6 {
    color: #333;
    font-weight: 600;
    margin: 28px 0 16px 0;
    line-height: 1.4;
}
.article-body h1 { font-size: 26px; }
.article-body h2 { font-size: 22px; }
.article-body h3 { font-size: 18px; }
.article-body p { margin: 16px 0; text-align: justify; }
.article-body ul, .article-body ol { margin: 16px 0; padding-left: 24px; }
.article-body li { margin: 8px 0; }
.article-body blockquote {
    margin: 20px 0;
    padding: 16px 20px;
    background: #f9f9f9;
    border-left: 4px solid #1890ff;
    color: #666;
    border-radius: 0 4px 4px 0;
}
.article-body code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 14px;
    color: #d63384;
}
.article-body pre {
    background: #282c34;
    color: #abb2bf;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 14px;
}
.article-body pre code { background: none; padding: 0; color: inherit; }
.article-body img { max-width: 100%; border-radius: 8px; margin: 20px 0; }
.article-body a { color: #1890ff; }
.article-body a:hover { text-decoration: underline; }
.article-body table { width: 100%; border-collapse: collapse; margin: 20px 0; }
.article-body th, .article-body td {
    padding: 12px;
    text-align: left;
    border: 1px solid #e8e8e8;
}
.article-body th { background: #fafafa; font-weight: 600; }

/* Article Footer */
.article-footer {
    padding: 20px 30px;
    background: #fafafa;
    border-top: 1px solid #f0f0f0;
    font-size: 13px;
    color: #999;
}

/* Right Sidebar - Hot Articles */
.sidebar-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}
.sidebar-header {
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
}
.sidebar-header::before {
    content: '';
    width: 4px;
    height: 18px;
    background: #1890ff;
    margin-right: 10px;
    border-radius: 2px;
}
.sidebar-title { font-size: 16px; font-weight: 600; color: #333; }

.hot-list { padding: 10px 0; }
.hot-item {
    display: flex;
    padding: 12px 20px;
    gap: 12px;
    transition: background 0.2s;
}
.hot-item:hover { background: #fafafa; }
.hot-rank {
    width: 22px;
    height: 22px;
    background: #f0f0f0;
    color: #999;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
}
.hot-item:nth-child(1) .hot-rank { background: #ff4d4f; color: #fff; }
.hot-item:nth-child(2) .hot-rank { background: #ff7a45; color: #fff; }
.hot-item:nth-child(3) .hot-rank { background: #ffa940; color: #fff; }
.hot-title {
    flex: 1;
    font-size: 14px;
    color: #333;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.hot-item:hover .hot-title { color: #1890ff; }

/* Footer */
.footer {
    background: #fff;
    border-top: 1px solid #e8e8e8;
    padding: 30px 0;
    margin-top: 40px;
}
.footer-content { text-align: center; color: #999; font-size: 14px; }

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 44px;
    height: 44px;
    background: #1890ff;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.3);
    cursor: pointer;
    border: none;
}
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { background: #40a9ff; transform: translateY(-2px); }

/* Reading Progress */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #1890ff, #36cfc9);
    z-index: 1000;
}

/* Responsive */
@media (max-width: 1100px) {
    .sidebar-left { display: none; }
}
@media (max-width: 900px) {
    .main-layout { flex-direction: column; }
    .sidebar-right { width: 100%; }
}
@media (max-width: 768px) {
    .nav { display: none; }
    .logo { font-size: 22px; }
    .article-header { padding: 24px 20px 16px; }
    .article-title { font-size: 22px; }
    .article-body { padding: 24px 20px; font-size: 15px; }
    .article-footer { padding: 16px 20px; }
}
