/* ==================== 软件专题详情页样式 ==================== */

/* 面包屑导航 */
.breadcrumb {
    background: white;
    padding: 15px 0;
    border-bottom: 1px solid var(--gray-200);
}

.breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.breadcrumb-nav a {
    color: var(--gray-600);
    transition: color var(--transition-fast);
}

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

.breadcrumb-nav .separator {
    color: var(--gray-400);
}

.breadcrumb-nav .current {
    color: var(--gray-800);
    font-weight: 500;
}

/* 专题头部区域 */
.topic-hero-section {
    padding: 0 0 40px 0;
}

.topic-hero {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.topic-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.topic-hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 50px 60px;
    color: #fff;
    min-height: 360px;
}

.topic-hero-text {
    flex: 1;
    max-width: 600px;
}

.topic-tags {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.tag-hot {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(238, 90, 90, 0.4);
}

.tag-featured {
    background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(78, 205, 196, 0.4);
}

.topic-title {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 16px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    line-height: 1.2;
}

.topic-desc {
    font-size: 16px;
    line-height: 1.7;
    opacity: 0.95;
    margin-bottom: 24px;
}

.topic-stats {
    display: flex;
    gap: 30px;
    margin-bottom: 28px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-item svg {
    opacity: 0.8;
    fill: #fff;
    color: #fff;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
}

.topic-actions {
    display: flex;
    gap: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #fff;
    color: #667eea;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
}

.btn-large {
    padding: 14px 32px;
    font-size: 15px;
}

.btn-outline {
    background: transparent;
    color: #3b82f6;
    border: 1px solid #3b82f6;
}

.btn-outline:hover {
    background: #3b82f6;
    color: #fff;
}

.topic-hero-image {
    width: 280px;
    height: 280px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

.topic-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 主内容区域布局 */
.topic-detail-container {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 30px;
    /* padding-bottom: 60px; */
}

/* 分类大卡片 */
.category-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: 24px;
    overflow: hidden;
}

.category-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px 10px;
    background: #fff;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
}

.category-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-icon.category-android {
    background: #f5f5f5;
}

.category-icon.category-apple {
    background: #f5f5f5;
}

.category-info {
    flex: 1;
}

.category-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 4px;
}

.category-count {
    font-size: 14px;
    opacity: 0.9;
}

.category-more {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s;
}

.category-more:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* 分类软件网格 - 参考index.html电脑常用软件样式 */
.category-software-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 20px;
}

.category-software-card {
    background: transparent;
    border-radius: 8px;
    box-shadow: none;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 12px;
    border: 1px solid #ecf0f4;
    gap: 8px;
}

.category-software-card:hover {
    transform: none;
    box-shadow: none;
    background: rgba(30, 118, 229, 0.06);
    border-color: #3b82f6;
}

.software-card-main {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
}

.software-card-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    /* gap: 4px; */
}

.software-card-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.software-card-icon-wrap {
    position: relative;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.software-card-icon {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    object-fit: cover;
}

.badge {
    position: absolute;
    top: -4px;
    right: -4px;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
}

.badge-hot {
    background: #ef4444;
    color: #fff;
}

.badge-new {
    background: #10b981;
    color: #fff;
}

.software-card-name {
    font-size: 18px;
    font-weight: 600;
    color: #000000;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.software-card-info {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: #94a3b8;
}

.info-item {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.info-label {
    color: #64748b;
    font-weight: 500;
}

.software-card-reason {
    font-size: 12px;
    color: #64748b;
    line-height: 1.5;
    margin: 0;
    padding: 8px 0px;
    /* background: #f8fafc; */
    border-radius: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.reason-label {
    color: #f97316;
    font-weight: 600;
}

.software-card-header,
.software-card-body,
.software-card-footer,
.software-card-desc,
.software-card-meta {
    display: none;
}

.btn-card-download {
    padding: 6px 26px;
    background: #3b82f6;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-card-download:hover {
    background: #2563eb;
}

.view-btn {
    padding: 6px 10px;
    border: none;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}

.view-btn.active {
    background: #fff;
    color: #3b82f6;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 软件网格 */
.software-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.software-grid.list-view {
    grid-template-columns: 1fr;
}

/* 软件卡片 */
.software-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.software-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.card-header {
    position: relative;
    padding: 20px 20px 0;
    display: flex;
    justify-content: center;
}

.software-icon {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    object-fit: cover;
}

.badge {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.badge-new {
    background: #10b981;
    color: #fff;
}

.badge-hot {
    background: #ef4444;
    color: #fff;
}

.card-body {
    padding: 16px 20px;
    flex: 1;
}

.software-name {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.software-desc {
    font-size: 13px;
    color: #64748b;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 12px;
}

.software-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: #94a3b8;
}

.card-footer {
    padding: 12px 20px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f1f5f9;
}

.rating {
    color: #f59e0b;
    font-size: 14px;
}

.btn-download {
    padding: 8px 16px;
    background: #3b82f6;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-download:hover {
    background: #2563eb;
}

/* 列表视图样式 */
.software-grid.list-view .software-card {
    flex-direction: row;
    align-items: center;
}

.software-grid.list-view .card-header {
    padding: 16px;
    width: 100px;
    flex-shrink: 0;
}

.software-grid.list-view .software-icon {
    width: 60px;
    height: 60px;
}

.software-grid.list-view .card-body {
    flex: 1;
    padding: 16px;
}

.software-grid.list-view .card-footer {
    border-top: none;
    border-left: 1px solid #f1f5f9;
    padding: 16px 20px;
    flex-direction: column;
    gap: 8px;
    min-width: 120px;
}

/* 加载更多 */
.load-more {
    text-align: center;
    padding: 40px 0;
}

/* 侧边栏 */
.topic-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.sidebar-widget {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.widget-title {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f1f5f9;
}

/* 专题信息 */
.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px 0;
    /* border-bottom: 1px solid #f1f5f9; */
}

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

.info-label {
    font-size: 12px;
    color: #64748b;
}

.info-value {
    font-size: 14px;
    color: #1e293b;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* 相关专题 */
.related-topics {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.related-topic-item {
    display: flex;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    padding: 8px;
    border-radius: 12px;
    transition: all 0.2s;
}

.related-topic-item:hover {
    background: #f8fafc;
}

.related-topic-thumb {
    width: 100px;
    height: 70px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
}

.related-topic-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-topic-info h4 {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 6px;
}

.related-topic-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.related-topic-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.related-topic-tag.purple {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
}

.related-topic-tag.blue {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.related-topic-tag.orange {
    background: rgba(249, 115, 22, 0.1);
    color: #f97316;
}

.related-topic-tag.cyan {
    background: rgba(6, 182, 212, 0.1);
    color: #06b6d4;
}

.related-topic-tag.pink {
    background: rgba(236, 72, 153, 0.1);
    color: #ec4899;
}

.related-topic-count {
    font-size: 13px;
    color: #64748b;
    display: flex;
    align-items: center;
}

.related-topic-count svg {
    fill: none !important;
    stroke: currentColor;
}

/* 热门标签 */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-item {
    padding: 6px 14px;
    background: #f1f5f9;
    color: #64748b;
    border-radius: 20px;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s;
}

.tag-item:hover {
    background: #3b82f6;
    color: #fff;
}

/* 回到顶部 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #3b82f6;
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 100;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: #2563eb;
    transform: translateY(-2px);
}

/* 响应式适配 */
@media (max-width: 1200px) {
    .topic-detail-container {
        grid-template-columns: 1fr;
    }
    
    .topic-sidebar {
        order: 2;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
    
    .software-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .topic-hero-content {
        flex-direction: column;
        text-align: center;
        padding: 40px;
    }
    
    .topic-hero-text {
        max-width: 100%;
    }
    
    .topic-title {
        font-size: 32px;
    }
    
    .topic-stats {
        justify-content: center;
    }
    
    .topic-actions {
        justify-content: center;
    }
    
    .topic-hero-image {
        width: 200px;
        height: 200px;
        margin-top: 30px;
    }
    
    .software-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .topic-sidebar {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .breadcrumb {
        padding: 12px 0;
    }
    
    .breadcrumb-nav {
        font-size: 13px;
    }
    
    .topic-hero-content {
        padding: 30px 20px;
        min-height: auto;
    }
    
    .topic-title {
        font-size: 24px;
    }
    
    .topic-desc {
        font-size: 14px;
    }
    
    .topic-stats {
        flex-wrap: wrap;
        gap: 16px;
        justify-content: center;
    }
    
    .stat-item {
        flex-direction: column;
        gap: 4px;
    }
    
    .topic-actions {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .btn {
        padding: 10px 18px;
        font-size: 13px;
    }
    
    .topic-hero-image {
        display: none;
    }
    
    .filter-bar {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }
    
    .filter-categories {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
    }
    
    .filter-pill {
        white-space: nowrap;
    }
    
    .filter-options {
        justify-content: space-between;
    }
    
    .category-software-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 16px;
    }
    
    .category-software-card {
        padding: 10px;
    }
    
    .software-card-icon {
        width: 48px;
        height: 48px;
    }
    
    .software-card-name {
        font-size: 14px;
    }
    
    .software-card-desc {
        font-size: 12px;
    }
    
    .topic-sidebar {
        grid-template-columns: 1fr;
    }
    
    .sidebar-widget {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .category-software-grid {
        grid-template-columns: 1fr;
        gap: 4px;
        padding: 12px;
    }
    
    .topic-tags {
        justify-content: center;
    }
    
    .stat-value {
        font-size: 18px;
    }
    
    .category-software-grid {
        grid-template-columns: 1fr;
    }
}
