/* TikTok知识库 - 专业样式表 */
:root {
    --primary: #667EEA;
    --primary-dark: #5568D3;
    --secondary: #00D9A5;
    --accent: #FF6B6B;
    --dark: #1A1A2E;
    --gray: #6B7280;
    --light: #F8FAFC;
    --white: #FFFFFF;
    --gradient: linear-gradient(135deg, #667EEA 0%, #764BA2 100%);
    --gradient-alt: linear-gradient(135deg, #00D9A5 0%, #00B4D8 100%);
    --shadow: 0 4px 20px rgba(102, 126, 234, 0.15);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--light);
    color: var(--dark);
    line-height: 1.7;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 60px 0;
}

/* 导航栏 */
.navbar {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 1000;
    padding: 16px 0;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--dark);
}

.logo i {
    font-size: 1.8rem;
    color: var(--dark);
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    font-weight: 500;
    color: var(--gray);
    transition: color 0.3s;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s;
}

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

.search-btn {
    width: 44px;
    height: 44px;
    border: none;
    background: var(--light);
    border-radius: 12px;
    cursor: pointer;
    color: var(--gray);
    transition: all 0.3s;
}

.search-btn:hover {
    background: var(--primary);
    color: white;
}

/* 搜索模态框 */
.search-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    align-items: flex-start;
    justify-content: center;
    padding-top: 100px;
}

.search-modal.active {
    display: flex;
}

.search-box {
    width: 100%;
    max-width: 700px;
    background: white;
    border-radius: 20px;
    padding: 24px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    font-size: 1.1rem;
    outline: none;
    transition: border-color 0.3s;
}

.search-box input:focus {
    border-color: var(--primary);
}

.search-box button {
    position: absolute;
    right: 24px;
    top: 24px;
    width: 40px;
    height: 40px;
    border: none;
    background: var(--light);
    border-radius: 10px;
    cursor: pointer;
    color: var(--gray);
}

.search-results {
    margin-top: 16px;
    max-height: 400px;
    overflow-y: auto;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 10px;
    transition: background 0.3s;
    cursor: pointer;
}

.search-result-item:hover {
    background: var(--light);
}

.search-result-item i {
    color: var(--primary);
}

/* 英雄区 */
.hero {
    position: relative;
    padding: 80px 0;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient);
    opacity: 0.03;
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary);
    padding: 8px 20px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 24px;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.2rem;
    color: var(--gray);
    margin-bottom: 40px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
}

.stat-item {
    text-align: center;
}

.stat-num {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
}

.stat-label {
    color: var(--gray);
    font-size: 0.9rem;
}

/* 区块标题 */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.section-header h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
}

.section-header h2 i {
    color: var(--primary);
}

/* 最新文章网格 */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.article-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s;
    display: flex;
    gap: 16px;
    box-shadow: var(--shadow);
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.article-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.article-icon i {
    font-size: 1.2rem;
    color: white;
}

.article-info h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--dark);
}

.article-info p {
    font-size: 0.85rem;
    color: var(--gray);
    margin-bottom: 12px;
}

.article-cat {
    display: inline-block;
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 6px;
}

.article-meta {
    display: flex;
    gap: 16px;
    font-size: 0.8rem;
    color: var(--gray);
}

/* 分类网格 */
.categories-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.category-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--cat-color);
}

.category-card:hover {
    transform: translateX(8px);
    box-shadow: var(--shadow-lg);
}

.category-icon {
    width: 64px;
    height: 64px;
    background: var(--cat-color);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.category-icon i {
    font-size: 1.8rem;
    color: white;
}

.category-info {
    flex: 1;
}

.category-info h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.category-info p {
    font-size: 0.9rem;
    color: var(--gray);
    margin-bottom: 8px;
}

.article-count {
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 600;
}

.arrow {
    color: var(--gray);
    transition: transform 0.3s;
}

.category-card:hover .arrow {
    transform: translateX(4px);
    color: var(--cat-color);
}

/* 热门文章 */
.hot-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hot-item {
    background: white;
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s;
    box-shadow: var(--shadow);
}

.hot-item:hover {
    transform: translateX(8px);
    box-shadow: var(--shadow-lg);
}

.hot-num {
    width: 36px;
    height: 36px;
    background: var(--gradient);
    color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.hot-content h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.hot-content span {
    font-size: 0.8rem;
    color: var(--gray);
}

/* 分类页面 */
.category-header {
    background: white;
    border-radius: 20px;
    padding: 48px;
    margin: 32px 0;
    display: flex;
    align-items: center;
    gap: 32px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.category-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--cat-color);
}

.category-icon-large {
    width: 100px;
    height: 100px;
    background: var(--cat-color);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.category-icon-large i {
    font-size: 3rem;
    color: white;
}

.category-header-info h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.category-header-info p {
    color: var(--gray);
    margin-bottom: 12px;
}

.category-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 32px;
}

.articles-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.article-list-item {
    background: white;
    border-radius: 16px;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s;
    box-shadow: var(--shadow);
}

.article-list-item:hover {
    transform: translateX(8px);
    box-shadow: var(--shadow-lg);
}

.article-list-icon {
    width: 48px;
    height: 48px;
    background: var(--gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.article-list-icon i {
    color: white;
}

.article-list-content {
    flex: 1;
}

.article-list-content h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.article-list-content p {
    font-size: 0.85rem;
    color: var(--gray);
    margin-bottom: 8px;
}

.article-list-meta {
    display: flex;
    gap: 16px;
    font-size: 0.8rem;
    color: var(--gray);
}

.article-list-arrow {
    color: var(--gray);
}

.badge {
    display: inline-flex;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
}

.badge.hot {
    background: rgba(255, 107, 107, 0.1);
    color: #FF6B6B;
}

.badge.featured {
    background: rgba(255, 215, 0, 0.1);
    color: #FFD700;
}

/* 文章详情页 */
.article-page {
    padding: 32px 0 60px;
}

.article-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--gray);
    margin-bottom: 24px;
}

.breadcrumb a {
    color: var(--primary);
}

.breadcrumb i {
    font-size: 0.7rem;
}

.article-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow);
}

.article-header {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid #E5E7EB;
}

.article-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.tag {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.tag.hot {
    background: rgba(255, 107, 107, 0.1);
    color: #FF6B6B;
}

.tag.featured {
    background: rgba(255, 215, 0, 0.1);
    color: #B8860B;
}

.tag.category {
    background: var(--primary);
    color: white;
}

.article-content h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.3;
}

.article-meta {
    display: flex;
    gap: 24px;
    color: var(--gray);
    font-size: 0.9rem;
}

.article-source {
    margin-top: 12px;
    font-size: 0.85rem;
    color: var(--gray);
}

.article-body {
    font-size: 1rem;
    line-height: 1.9;
    color: #374151;
}

.article-body h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 32px 0 16px;
    color: var(--dark);
}

.article-body h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 24px 0 12px;
}

.article-body p {
    margin-bottom: 16px;
}

.article-body ul,
.article-body ol {
    margin: 16px 0;
    padding-left: 24px;
}

.article-body li {
    margin-bottom: 8px;
}

.article-body strong {
    color: var(--dark);
}

.article-footer {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid #E5E7EB;
}

.article-tags-bottom {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tag-item {
    padding: 4px 12px;
    background: var(--light);
    border-radius: 15px;
    font-size: 0.8rem;
    color: var(--gray);
}

.share-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.share-section button {
    padding: 8px 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
}

/* 侧边栏 */
.sidebar-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

.sidebar-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-card h3 i {
    color: var(--primary);
}

.category-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.category-list a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s;
}

.category-list a:hover,
.category-list a.active {
    background: var(--light);
}

.category-list a.active {
    background: var(--primary);
    color: white;
}

.category-list a.active i {
    color: white;
}

.category-list a i {
    color: var(--cat-color, var(--primary));
}

.related-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.related-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.85rem;
    transition: background 0.3s;
}

.related-item:hover {
    background: var(--light);
}

.related-item i {
    color: var(--primary);
    margin-top: 3px;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* 页脚 */
.footer {
    background: var(--dark);
    color: white;
    padding: 60px 0 30px;
    margin-top: 80px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 40px;
}

.footer-brand .logo {
    color: white;
    margin-bottom: 16px;
}

.footer-brand .logo i {
    background: white;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.footer-links h4 {
    font-size: 1rem;
    margin-bottom: 16px;
}

.footer-links a {
    display: block;
    color: rgba(255, 255, 255, 0.6);
    padding: 6px 0;
    font-size: 0.9rem;
    transition: color 0.3s;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}

.footer-bottom a {
    color: var(--primary);
}

/* 响应式 */
@media (max-width: 1024px) {
    .category-layout,
    .article-layout {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        order: -1;
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero-stats {
        gap: 30px;
    }
    
    .stat-num {
        font-size: 2rem;
    }
    
    .nav-links {
        display: none;
    }
    
    .category-header {
        flex-direction: column;
        text-align: center;
        padding: 32px;
    }
    
    .article-content {
        padding: 24px;
    }
    
    .article-content h1 {
        font-size: 1.5rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}
