/* =========================================
   软件专题页专用样式 - topic.css
   ========================================= */

/* 专题页包裹容器 */
.topic-wrapper {
    padding-top: 16px;
}

/* 页面头部 */
.page-header {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #fff;
    padding: 20px 24px;
    border-radius: 1px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 16px;
}

.page-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.page-info {
    flex: 1;
}

.page-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 4px;
}

.page-desc {
    font-size: 14px;
    color: var(--text-sub);
}

/* 专题页主布局 */
.topic-main {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 24px;
}

.topic-content {
    min-width: 0;
}

.topic-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* 专题网格 */
.topic-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

/* 专题卡片 - 图文融合设计 */
.topic-grid .topic-card {
    display: block;
    border-radius: 1px;
    overflow: hidden;
    transition: all 0.2s;
    height: 180px;
    position: relative;
    color: #fff;
}

.topic-grid .topic-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

/* 专题封面 - 作为背景 */
.topic-cover {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.topic-icon {
    position: absolute;
    right: 20px;
    top: 20px;
    opacity: 0.3;
    color: #fff;
}

/* 专题信息 - 叠加在背景上 */
.topic-info {
    position: relative;
    z-index: 2;
    padding: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: linear-gradient(to top, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0) 100%);
}

.topic-name {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 6px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.topic-desc {
    font-size: 13px;
    color: rgba(255,255,255,0.85);
    line-height: 1.5;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.topic-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: rgba(255,255,255,0.7);
}

.meta-count {
    color: #fff;
    font-weight: 500;
}

/* 渐变背景 */
.bg-gradient-blue { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.bg-gradient-purple { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.bg-gradient-green { background: linear-gradient(135deg, #10b981, #059669); }
.bg-gradient-orange { background: linear-gradient(135deg, #f97316, #ea580c); }
.bg-gradient-cyan { background: linear-gradient(135deg, #06b6d4, #0891b2); }
.bg-gradient-red { background: linear-gradient(135deg, #ef4444, #dc2626); }

/* 热门专题列表 */
.hot-topic-list {
    display: flex;
    flex-direction: column;
}

.hot-topic-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--bg-body);
}

.hot-topic-item:last-child {
    border-bottom: none;
}

.hot-topic-item:hover .hot-name {
    color: var(--primary);
}

.hot-num {
    width: 20px;
    height: 20px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    line-height: 20px;
    border-radius: 4px;
    flex-shrink: 0;
}

.hot-num.no-1 { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #fff; }
.hot-num.no-2 { background: linear-gradient(135deg, #94a3b8, #64748b); color: #fff; }
.hot-num.no-3 { background: linear-gradient(135deg, #f97316, #ea580c); color: #fff; }

.hot-name {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    color: var(--text-main);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* 最新专题列表 */
.new-topic-list {
    display: flex;
    flex-direction: column;
}

.new-topic-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--bg-body);
}

.new-topic-item:last-child {
    border-bottom: none;
}

.new-topic-item:hover .new-topic-name {
    color: var(--primary);
}

.new-topic-name {
    font-size: 13px;
    color: var(--text-main);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.new-topic-date {
    font-size: 12px;
    color: var(--text-light);
}
