/* ========================================
   Topic Detail Page - 专题详情页
   ======================================== */

/* Topic Header */
.topic-header {
    background: linear-gradient(135deg, var(--primary-color), #1a252f);
    color: white;
    padding: 4rem 5%;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.topic-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.3;
}

.topic-header.ai-tools { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.topic-header.ai-writing { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.topic-header.ai-workflow { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
.topic-header.tutorials { background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); }

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

.topic-header h1 {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.topic-header p {
    font-size: 0.95rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

.topic-stats-bar {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.topic-stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    opacity: 0.9;
}

/* Articles Section */
.articles-section {
    padding: 3rem 5%;
    background: var(--light-bg);
}

.articles-container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.section-subtitle {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Articles Grid */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
}

.article-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.article-header {
    padding: 1.25rem 1.25rem 0;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.article-topic-badge {
    background: var(--secondary-color);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 15px;
    font-size: 0.7rem;
    text-decoration: none;
}

.article-title {
    font-size: 1.05rem;
    line-height: 1.4;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-excerpt {
    color: var(--text-light);
    font-size: 0.85rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-footer {
    padding: 1rem 1.25rem;
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-top: 1px solid var(--border-color);
}

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

.article-tag {
    background: var(--light-bg);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    color: var(--text-light);
}

.article-info-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--text-light);
}

/* No Articles */
.no-articles {
    text-align: center;
    padding: 3rem 2rem;
    background: white;
    border-radius: 12px;
}

.no-articles .icon {
    font-size: 3rem;
    margin-bottom: 0.75rem;
    opacity: 0.5;
    color: var(--text-light);
}

.no-articles h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.no-articles p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .topic-header {
        padding: 3rem 5%;
    }
    
    .topic-header h1 {
        font-size: 1.5rem;
    }
    
    .topic-stats-bar {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .articles-section {
        padding: 2rem 5%;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
    }
}
