/* 详情页面通用样式 */

/* 面包屑导航 */
.breadcrumb {
    background: white;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
}

.breadcrumb .container {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}

.breadcrumb a {
    color: var(--text-secondary);
}

.breadcrumb a:hover {
    color: var(--primary-color);
}

.breadcrumb i {
    font-size: 10px;
    color: var(--text-tertiary);
}

.breadcrumb .current {
    color: var(--text-primary);
    font-weight: 500;
}

/* 详情页面布局 */
.detail-page {
    padding: 32px 0 80px;
    background: var(--bg-secondary);
}

.detail-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 32px;
}

.detail-main {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* 技能头部 */
.skill-header {
    background: white;
    border-radius: var(--radius-md);
    padding: 28px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.skill-header-content {
    display: flex;
    gap: 24px;
}

.skill-icon-large {
    width: 88px;
    height: 88px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #7C3AED 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

.skill-info {
    flex: 1;
}

.badges {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.badge.official {
    background: #FF9F43;
    color: white;
}

.badge.verified {
    background: #00A870;
    color: white;
}

.badge.featured {
    background: #E91E63;
    color: white;
}

.skill-header h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.skill-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.6;
}

.skill-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13px;
    color: var(--text-tertiary);
}

.skill-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* 统计数据条 */
.stats-bar {
    background: white;
    border-radius: var(--radius-lg);
    padding: 20px 32px;
    display: flex;
    justify-content: space-around;
    box-shadow: var(--shadow-sm);
}

.stats-bar .stat-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stats-bar i {
    font-size: 24px;
    color: var(--primary-color);
}

.stat-value {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
}

/* 快速操作 */
.quick-actions {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.install-command {
    background: #1C2435;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 16px;
}

.command-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.command-header span {
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
}

.btn-copy {
    color: white;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
}

.install-command code {
    display: block;
    padding: 16px;
    color: #00A870;
    font-family: 'Courier New', monospace;
    font-size: 15px;
}

.action-buttons {
    display: flex;
    gap: 12px;
}

.btn-action {
    flex: 1;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-action.primary {
    background: var(--primary-color);
    color: white;
}

.btn-action.primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-action.secondary {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-action.secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* 详细说明区块 */
.detail-section {
    background: white;
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-sm);
}

.detail-section h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.detail-section h2 i {
    color: var(--primary-color);
}

.description-content {
    color: var(--text-secondary);
    line-height: 1.8;
}

.description-content h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 24px 0 12px;
}

.description-content ul {
    list-style: none;
    padding-left: 0;
}

.description-content li {
    padding: 8px 0 8px 24px;
    position: relative;
}

.description-content li::before {
    content: '•';
    position: absolute;
    left: 8px;
    color: var(--primary-color);
    font-weight: bold;
}

.description-content pre {
    background: #1C2435;
    padding: 16px;
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin: 16px 0;
}

.description-content code {
    color: #E8F0FE;
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

/* 使用示例 */
.examples {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.example-item {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.example-header {
    background: var(--bg-secondary);
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.example-header span {
    font-weight: 500;
    font-size: 14px;
}

.btn-copy-small {
    color: var(--text-secondary);
    font-size: 13px;
    padding: 4px 8px;
}

.btn-copy-small:hover {
    color: var(--primary-color);
}

.example-item pre {
    background: white;
    padding: 16px;
    margin: 0;
    overflow-x: auto;
}

.example-item code {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
}

/* 更新日志 */
.changelog {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.changelog-item {
    display: flex;
    gap: 16px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.changelog-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.version-badge {
    background: var(--primary-color);
    color: white;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    height: fit-content;
}

.changelog-content {
    flex: 1;
}

.changelog-content .date {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-bottom: 6px;
    display: block;
}

.changelog-content h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
}

.changelog-content ul {
    list-style: none;
    padding: 0;
}

.changelog-content li {
    padding: 4px 0 4px 16px;
    position: relative;
    font-size: 14px;
    color: var(--text-secondary);
}

.changelog-content li::before {
    content: '-';
    position: absolute;
    left: 0;
    color: var(--text-tertiary);
}

/* 评论区 */
.reviews-summary {
    display: flex;
    gap: 32px;
    padding: 24px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    margin-bottom: 24px;
}

.overall-rating {
    text-align: center;
    flex-shrink: 0;
}

.rating-number {
    font-size: 48px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.overall-rating .stars {
    color: #FF9F43;
    font-size: 20px;
    margin: 8px 0;
}

.total-reviews {
    font-size: 13px;
    color: var(--text-secondary);
}

.rating-bars {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
}

.bar-item span:first-child {
    width: 30px;
}

.bar {
    flex: 1;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
}

.bar .fill {
    height: 100%;
    background: #FF9F43;
}

.bar-item span:last-child {
    width: 40px;
    color: var(--text-tertiary);
}

/* 评价列表 */
.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.review-item {
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.review-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.reviewer {
    display: flex;
    align-items: center;
    gap: 12px;
}

.reviewer .avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #0044B8 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.reviewer .avatar.female {
    background: linear-gradient(135deg, #E91E63 0%, #C2185B 100%);
}

.reviewer-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.reviewer-info .name {
    font-weight: 600;
    font-size: 15px;
}

.reviewer-info .badge {
    font-size: 11px;
}

.reviewer-info .badge i {
    color: var(--primary-color);
}

.review-meta {
    text-align: right;
}

.review-meta .stars {
    color: #FF9F43;
    font-size: 14px;
    margin-bottom: 4px;
}

.review-meta .date {
    font-size: 12px;
    color: var(--text-tertiary);
}

.review-content h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
}

.review-content p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.review-footer {
    display: flex;
    gap: 16px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.btn-helpful, .btn-reply {
    padding: 6px 12px;
    font-size: 13px;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-helpful:hover, .btn-reply:hover {
    background: var(--bg-secondary);
    color: var(--primary-color);
}

.btn-load-more-reviews {
    width: 100%;
    padding: 16px;
    background: var(--bg-secondary);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 24px;
}

.btn-load-more-reviews:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* 侧边栏 */
.detail-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.sidebar-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

/* 作者信息 */
.author-avatar {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    margin: 0 auto 12px;
}

.author-details {
    text-align: center;
}

.author-details h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
}

.author-badge {
    font-size: 12px;
    color: var(--primary-color);
    margin-bottom: 12px;
    display: inline-block;
}

.author-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 12px;
}

.author-stats {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--text-tertiary);
}

.btn-follow {
    width: 100%;
    padding: 10px;
    background: var(--primary-color);
    color: white;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
}

.btn-follow:hover {
    background: var(--primary-dark);
}

/* 相关技能 */
.related-skills {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.related-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.related-item:hover {
    background: var(--bg-secondary);
}

.related-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-light);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
}

.related-info h4 {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
}

.related-info .downloads {
    font-size: 12px;
    color: var(--text-tertiary);
}

/* 标签云 */
.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tags-cloud .tag {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
}

.tags-cloud .tag:hover {
    background: var(--primary-light);
    color: var(--primary-color);
}

/* 依赖项列表 */
.dependencies-list {
    list-style: none;
}

.dependencies-list li {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
}

.dependencies-list li:last-child {
    border-bottom: none;
}

.dep-name {
    color: var(--primary-color);
    font-weight: 500;
}

.dep-version {
    color: var(--text-tertiary);
}

/* 响应式 */
@media (max-width: 1024px) {
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .detail-sidebar {
        order: -1;
    }
}

@media (max-width: 768px) {
    .skill-header-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .skill-meta {
        justify-content: center;
    }

    .stats-bar {
        flex-wrap: wrap;
        gap: 16px;
    }

    .stats-bar .stat-item {
        flex: 1 1 40%;
    }

    .action-buttons {
        flex-wrap: wrap;
    }

    .btn-action {
        flex: 1 1 45%;
    }

    .reviews-summary {
        flex-direction: column;
    }
}
