/* ========================================
   Topic List Page - 专题列表页
   ======================================== */

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

.header-content {
    max-width: 1200px;
    margin: 0 auto;
}

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

.topic-description {
    font-size: 0.95rem;
    opacity: 0.9;
    max-width: 800px;
    margin-bottom: 1rem;
}

.topic-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.85rem;
    opacity: 0.8;
}

/* Topic Container */
.topic-container {
    max-width: 1680px;
    margin: 0 auto;
    padding: 3rem 5%;
}

/* Topics Grid */
.topics-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
}

.topic-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

.topic-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.topic-image {
    height: 83px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    position: relative;
}

.topic-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 23px;
    background: linear-gradient(to top, white, transparent);
}

.topic-content {
    padding: 0.9rem;
}

.topic-content h3 {
    font-size: 0.75rem;
    margin-bottom: 0.2rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.topic-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

.topic-image {
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    position: relative;
}

.topic-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(to top, white, transparent);
}

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

.topic-content {
    padding: 1.5rem;
}

.topic-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* VIP Badge */
.vip-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
}

.topic-content p {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.6;
    height: 3.2em; /* 两行高度，line-height 1.6 * 0.9rem * 2 ≈ 2.88em，取整 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0;
}

.topic-meta-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.topic-stats {
    font-size: 0.85rem;
    color: var(--text-light);
}

.topic-arrow {
    color: var(--secondary-color);
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s;
}

.topic-card:hover .topic-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* Copyright */
.copyright {
    max-width: 1200px;
    margin: 2rem auto 0;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.6);
}

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

/* Responsive */
@media (max-width: 1200px) {
    .topic-container {
        max-width: 100%;
    }
}

@media (max-width: 992px) {
    .topics-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .topic-header {
        padding: 3rem 5%;
    }
    
    .topic-title {
        font-size: 1.75rem;
    }
    
    .topic-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .topic-container {
        padding: 2rem 5%;
    }
    
    .topics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .topics-grid {
        grid-template-columns: 1fr;
    }
}
