* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f8fafc;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部导航 */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand h1 a {
    color: white;
    text-decoration: none;
    font-size: 24px;
    font-weight: 600;
}

.nav-menu {
    display: flex;
    gap: 30px;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    opacity: 0.8;
}

.nav-actions {
    display: flex;
    gap: 15px;
}

.btn-primary,
.btn-secondary {
    padding: 8px 20px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.btn-primary:hover {
    background: rgba(255, 255, 255, 0.3);
}

.btn-secondary {
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* 主要内容 */
.main {
    padding: 40px 0;
    min-height: calc(100vh - 200px);
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
}

/* 文章内容 */
.article-content {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.article-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f1f5f9;
}

.article-title {
    font-size: 32px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.3;
    margin-bottom: 15px;
}

.article-meta {
    display: flex;
    gap: 20px;
    color: #64748b;
    font-size: 14px;
    margin-bottom: 15px;
}

.article-summary {
    background: #f8fafc;
    padding: 20px;
    border-radius: 8px;
    color: #475569;
    font-size: 16px;
    line-height: 1.6;
    border-left: 4px solid #8b5cf6;
}

.article-cover {
    margin: 30px 0;
    text-align: center;
}

.article-cover img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.article-body {
    font-size: 16px;
    line-height: 1.8;
    color: #374151;
}

.article-body h1,
.article-body h2,
.article-body h3,
.article-body h4,
.article-body h5,
.article-body h6 {
    margin: 30px 0 15px 0;
    color: #1e293b;
    font-weight: 600;
}

.article-body h1 { font-size: 28px; }
.article-body h2 { font-size: 24px; }
.article-body h3 { font-size: 20px; }
.article-body h4 { font-size: 18px; }

.article-body p {
    margin-bottom: 20px;
}

.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.article-body ul,
.article-body ol {
    margin: 20px 0;
    padding-left: 30px;
}

.article-body li {
    margin-bottom: 8px;
}

.article-body blockquote {
    background: #f8fafc;
    border-left: 4px solid #8b5cf6;
    padding: 20px;
    margin: 20px 0;
    border-radius: 0 8px 8px 0;
    font-style: italic;
}

.article-body code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

.article-body pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
}

.article-body pre code {
    background: none;
    padding: 0;
    color: inherit;
}

.article-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.article-actions {
    display: flex;
    gap: 15px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    color: #64748b;
}

.action-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.action-btn.liked {
    background: #fef3c7;
    border-color: #f59e0b;
    color: #92400e;
}

.article-tags {
    display: flex;
    gap: 8px;
}

.tag {
    padding: 4px 12px;
    background: #f1f5f9;
    color: #64748b;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.tag.featured {
    background: #fef3c7;
    color: #92400e;
}

/* 侧边栏 */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.sidebar-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.sidebar-section h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #8b5cf6;
    padding-bottom: 8px;
}

.related-news {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.related-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: background 0.3s ease;
}

.related-item:hover {
    background: #f8fafc;
}

.related-image {
    width: 60px;
    height: 40px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}

.related-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-placeholder {
    width: 100%;
    height: 100%;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #9ca3af;
}

.related-info {
    flex: 1;
    min-width: 0;
}

.related-info h4 {
    margin: 0 0 5px 0;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-meta {
    display: flex;
    gap: 10px;
    font-size: 12px;
    color: #64748b;
}

.hot-courses {
    text-align: center;
}

.course-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 8px;
    text-decoration: none;
    color: #64748b;
    transition: all 0.3s ease;
}

.course-link:hover {
    background: #f1f5f9;
    color: #374151;
}

.course-placeholder {
    font-size: 32px;
}

/* 底部 */
.footer {
    background: #1e293b;
    color: white;
    text-align: center;
    padding: 20px 0;
    margin-top: 50px;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .sidebar {
        order: -1;
    }
    
    .sidebar-section {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-menu {
        gap: 20px;
    }
    
    .article-content {
        padding: 25px 20px;
    }
    
    .article-title {
        font-size: 24px;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .article-footer {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .content-grid {
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .article-content {
        padding: 20px 15px;
    }
    
    .article-title {
        font-size: 20px;
    }
    
    .article-body {
        font-size: 15px;
    }
    
    .sidebar-section {
        padding: 15px;
    }
}