/* 现代文章页面样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.7;
    color: #1a1a1a;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.modern-article-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* 顶部导航 */
.top-nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand a {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    text-decoration: none;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-menu a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-menu a:hover {
    color: #667eea;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    transition: width 0.3s ease;
}

.nav-menu a:hover::after {
    width: 100%;
}

/* 英雄区域 */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8rem 2rem 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.1)"/></svg>') repeat;
    animation: float 20s infinite linear;
}

@keyframes float {
    0% { transform: translateY(0) rotate(0deg); }
    100% { transform: translateY(-100px) rotate(360deg); }
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.breadcrumb-nav {
    margin-bottom: 2rem;
    opacity: 0.9;
}

.breadcrumb-nav a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

.breadcrumb-nav a:hover {
    color: white;
}

.breadcrumb-nav span {
    margin: 0 0.5rem;
    opacity: 0.6;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    font-weight: 300;
}

.hero-meta {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.hero-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.8;
}

/* 主要内容区域 */
.main-container {
    background: #f8fafc;
    min-height: 100vh;
    padding: 2rem 0;
}

.content-grid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 3rem;
}

/* 侧边栏 */
.content-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.toc-widget, .author-widget {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.toc-widget h3 {
    margin-bottom: 1rem;
    color: #333;
    font-size: 1.1rem;
}

.toc-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toc-item {
    color: #666;
    text-decoration: none;
    padding: 0.5rem 0;
    border-left: 3px solid transparent;
    padding-left: 1rem;
    transition: all 0.3s ease;
}

.toc-item:hover {
    color: #667eea;
    border-left-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.author-card {
    text-align: center;
}

.author-card img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-bottom: 1rem;
    object-fit: cover;
}

.author-card h4 {
    margin-bottom: 0.5rem;
    color: #333;
}

.author-card p {
    color: #666;
    font-size: 0.9rem;
}

/* 文章主体 */
.article-main {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.modern-article {
    padding: 3rem;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.article-tags .tag {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.article-tags .tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    color: white;
}

.article-body {
    line-height: 1.8;
}

.content-section {
    margin-bottom: 3rem;
}

.content-section h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: #333;
    position: relative;
    padding-bottom: 0.5rem;
}

.content-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-radius: 2px;
}

.code-block {
    background: #1e1e1e;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    overflow-x: auto;
}

.code-block pre {
    margin: 0;
}

.code-block code {
    color: #d4d4d4;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
}

/* 文章操作 */
.article-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 0;
    border-top: 1px solid #eee;
    margin-top: 3rem;
}

.share-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.share-btn {
    background: #f1f5f9;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.share-btn:hover {
    background: #667eea;
    color: white;
}

.like-btn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    transition: transform 0.3s ease;
}

.like-btn:hover {
    transform: translateY(-2px);
}

.heart {
    font-size: 1.2rem;
}

/* 相关文章 */
.related-section {
    padding: 3rem;
    border-top: 1px solid #eee;
}

.related-section h3 {
    margin-bottom: 2rem;
    color: #333;
    font-size: 1.5rem;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.related-card {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.related-card:hover {
    transform: translateY(-4px);
}

.related-card h4 {
    margin-bottom: 0.5rem;
}

.related-card a {
    color: #333;
    text-decoration: none;
}

.related-card a:hover {
    color: #667eea;
}

.related-date {
    color: #666;
    font-size: 0.8rem;
}

/* 讨论区 */
.discussion-section {
    padding: 3rem;
    border-top: 1px solid #eee;
}

.discussion-section h3 {
    margin-bottom: 2rem;
    color: #333;
    font-size: 1.5rem;
}

.comment-form textarea {
    width: 100%;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.comment-form textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-actions {
    margin-top: 1rem;
    text-align: right;
}

.submit-comment {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: transform 0.3s ease;
}

.submit-comment:hover {
    transform: translateY(-2px);
}

.comments {
    margin-top: 2rem;
}

.comment-item {
    display: flex;
    gap: 1rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid #eee;
}

.comment-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-header {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.comment-author {
    font-weight: 600;
    color: #333;
}

.comment-time {
    color: #666;
    font-size: 0.9rem;
}

/* 页脚 */
.modern-footer {
    background: #1a202c;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: white;
}

.footer-section a {
    color: #a0aec0;
    text-decoration: none;
    display: block;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: white;
}

.social-icons {
    display: flex;
    gap: 1rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #2d3748;
    color: #a0aec0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .content-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .content-sidebar {
        position: static;
        order: 2;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-menu {
        gap: 1rem;
    }
    
    .hero-meta {
        flex-direction: column;
        gap: 1rem;
    }
    
    .article-actions {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .modern-article {
        padding: 2rem 1.5rem;
    }
}

/* 标签页面样式 */
.tag-articles {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.article-card {
    border-bottom: 1px solid #eee;
    padding: 2rem 0;
    transition: all 0.3s ease;
}

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

.article-card:hover {
    background: rgba(102, 126, 234, 0.02);
    border-radius: 8px;
    padding: 2rem 1rem;
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.card-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.card-title a:hover {
    color: #667eea;
}

.card-subtitle {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.card-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #888;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.card-tags .tag {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.card-tags .tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.no-articles {
    text-align: center;
    padding: 4rem 2rem;
    color: #666;
}

.no-articles h3 {
    margin-bottom: 1rem;
    color: #333;
}

.no-articles p {
    margin-bottom: 2rem;
    line-height: 1.6;
}

.back-home {
    display: inline-block;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: transform 0.3s ease;
}

.back-home:hover {
    transform: translateY(-2px);
    color: white;
}
