/* =========================================
   详情页专用样式 - detail.css
   ========================================= */

/* 详情页包裹容器 */
.detail-wrapper {
    padding-top: 16px;
}

/* 面包屑导航卡片 */
.breadcrumb-card {
    background: #fff;
    padding: 12px 20px;
    border-radius: 1px;
    box-shadow: var(--shadow-sm);
    font-size: 13px;
    color: var(--text-sub);
    margin-bottom: 16px;
}

.breadcrumb-card a {
    color: var(--text-sub);
    transition: color 0.2s;
}

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

.breadcrumb-card .sep {
    margin: 0 8px;
    color: var(--text-light);
}

.breadcrumb-card .current {
    color: var(--text-main);
}

/* 详情页主布局 */
.detail-main {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 24px;
}

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

.detail-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 软件头部卡片 */
.soft-header-card {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    background: #fff;
    padding: 24px;
    border-radius: 1px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 16px;
}

.soft-header-card .soft-icon {
    width: 72px;
    height: 72px;
    border-radius: 12px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 800;
}

.soft-header-card .soft-header-content {
    flex: 1;
    min-width: 0;
}

.soft-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.soft-title-row .soft-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
}

.soft-title-row .tag.t-blue-solid {
    background: var(--primary);
    color: #fff;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 2px;
}

.soft-title-row .tag.t-green-solid {
    background: var(--green);
    color: #fff;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 2px;
}

.soft-title-row .tag.t-cyan-solid {
    background: var(--cyan);
    color: #fff;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 2px;
}

.soft-title-row .tag.t-orange-solid {
    background: var(--orange);
    color: #fff;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 2px;
}

.soft-title-row .tag.t-purple-solid {
    background: var(--purple);
    color: #fff;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 2px;
}

.soft-header-card .soft-brief {
    font-size: 14px;
    color: var(--text-sub);
    margin-bottom: 12px;
    line-height: 1.5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.soft-header-card .soft-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tag.t-outline {
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 2px;
    background: var(--bg-body);
    color: var(--text-sub);
    border: 1px solid #e2e8f0;
}

.tag.t-outline:hover {
    color: var(--primary);
    border-color: var(--primary);
}

.soft-header-card .soft-header-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.soft-header-card .btn-download {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--primary);
    color: #fff;
    padding: 10px 28px;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.2s;
}

.soft-header-card .btn-download:hover {
    background: var(--primary-hover);
}

.soft-header-btns {
    display: flex;
    gap: 8px;
}

.btn-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    color: var(--text-sub);
    transition: all 0.2s;
}

.btn-icon:hover {
    color: var(--primary);
    border-color: var(--primary);
}

/* 软件信息卡片 */
.soft-info-card {
    display: flex;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 16px 20px;
    border-radius: 1px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 16px;
}

.soft-info-card .info-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 12px;
    flex: 1;
}

.soft-info-card .info-label {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 4px;
}

.soft-info-card .info-value {
    font-size: 13px;
    color: var(--text-main);
    font-weight: 500;
}

.soft-info-card .info-value.link {
    color: var(--primary);
    cursor: pointer;
}

.soft-info-card .info-value.stars {
    color: var(--orange);
}

.soft-info-card .info-value.safe-pass {
    color: var(--green);
}

.soft-info-card .info-value.safe-warn {
    color: var(--orange);
}

.soft-info-card .info-value.safe-none {
    color: var(--red);
}

.soft-info-card .info-value.time-new {
    color: #e53935;
}

.soft-icon {
    width: 80px;
    height: 80px;
    border-radius: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 800;
    flex-shrink: 0;
}

.soft-header-info {
    flex: 1;
    min-width: 0;
}

.soft-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px;
}

.soft-title .version {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-sub);
    margin-left: 8px;
}

.soft-brief {
    font-size: 14px;
    color: var(--text-sub);
    margin-bottom: 12px;
    line-height: 1.5;
}

.soft-tags {
    display: flex;
    gap: 8px;
}

.tag {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 1px;
    font-weight: 500;
}

.soft-header-action {
    text-align: center;
    flex-shrink: 0;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary);
    color: #fff;
    padding: 12px 32px;
    border-radius: 1px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(29, 78, 216, 0.3);
}

.btn-download:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(29, 78, 216, 0.4);
}

.download-count {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 8px;
}

/* 通用面板样式 */
.soft-info-panel,
.panel {
    background: #fff;
    border-radius: 1px;
    box-shadow: var(--shadow-sm);
    padding: 20px;
    margin-bottom: 20px;
    overflow: hidden;
    min-width: 0;
}

.panel-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--bg-body);
}

/* 软件信息网格 */
.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 24px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    padding: 8px 0;
}

.info-label {
    color: var(--text-sub);
}

.info-value {
    color: var(--text-main);
    font-weight: 500;
}

.info-value.stars {
    color: var(--orange);
}

.info-value.safe {
    color: var(--green);
}

/* 软件截图 */
.screenshot-wrapper {
    position: relative;
    padding: 0 20px;
}

.screenshot-list {
    display: flex;
    gap: 12px;
    overflow: hidden;
    scroll-behavior: smooth;
}

.screenshot-item {
    flex: 0 0 calc((100% - 24px) / 3);
    min-width: 0;
    aspect-ratio: 4 / 3;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s;
    background: transparent;
}

.screenshot-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.screenshot-item:hover {
    transform: scale(1.02);
}

.screenshot-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.9);
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s;
}

.screenshot-nav:hover {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.screenshot-nav.prev {
    left: -16px;
}

.screenshot-nav.next {
    right: -16px;
}

.screenshot-nav.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* 大图模式 */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close:hover {
    background: rgba(255,255,255,0.2);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-nav:hover {
    background: rgba(255,255,255,0.2);
}

.lightbox-nav.prev {
    left: 20px;
}

.lightbox-nav.next {
    right: 20px;
}

.screenshot-placeholder {
    background: var(--bg-body);
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 13px;
}

/* 软件介绍 */
.soft-intro {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-main);
    word-wrap: break-word;
    overflow-wrap: break-word;
    padding-left: 5px;
}

.soft-intro h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 20px 0 12px;
    color: var(--text-main);
}

.soft-intro ul,
.soft-intro ol {
    padding-left: 20px;
}

.soft-intro img {
    max-width: 100%;
    height: auto;
}

/* 下载地址栏 */
.download-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.download-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--bg-body);
    border-radius: 1px;
}

.download-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.download-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
}

.download-size,
.download-code {
    font-size: 12px;
    color: var(--text-light);
}

.btn-dl {
    padding: 10px 24px;
    border-radius: 1px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-dl.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-dl.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-dl.btn-secondary {
    background: #fff;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn-dl.btn-secondary:hover {
    background: var(--blue-light);
}

/* 下载版权提示 */
.download-notice {
    margin-top: 16px;
    padding: 12px;
    background: #fef3c7;
    border-radius: 4px;
    font-size: 12px;
    color: #92400e;
    line-height: 1.6;
}

/* 更多版本 */
.version-list {
    display: flex;
    flex-direction: column;
}

.version-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--bg-body);
    transition: all 0.2s;
}

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

.version-item:hover {
    padding-left: 8px;
}

.version-item:hover .ver-name {
    color: var(--primary);
}

.ver-name {
    font-size: 14px;
    color: var(--text-main);
}

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

/* 猜你喜欢 */
.like-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.like-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-body);
    border-radius: 1px;
    transition: all 0.2s;
    overflow: hidden;
    min-width: 0;
}

.like-item:hover {
    background: var(--blue-light);
}

.like-icon {
    width: 40px;
    height: 40px;
    border-radius: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 800;
    flex-shrink: 0;
    overflow: hidden;
}

.like-icon img {
    width: 36px;
    height: 36px;
    object-fit: cover;
    border-radius: 6px;
}

.like-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.like-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.like-cat {
    font-size: 12px;
    color: var(--text-light);
}

/* 侧边栏 */
.sidebar-panel {
    background: #fff;
    border-radius: 1px;
    box-shadow: var(--shadow-sm);
    padding: 16px;
}

.sidebar-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--bg-body);
}

/* 作者卡片 */
.author-card {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 800;
}

.author-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.author-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
}

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

.author-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

.author-badge {
    padding: 2px 8px;
    border-radius: 1px;
    background: var(--bg-body);
    color: var(--text-sub);
}

.author-badge.verified {
    background: var(--blue-light);
    color: var(--primary);
}

.author-stat {
    color: var(--text-light);
}

/* 新版作者卡片 */
.author-panel .sidebar-title {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.author-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.author-actions {
    display: flex;
    gap: 8px;
}

.author-btn {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 1px;
    transition: all 0.2s;
}

.author-btn.follow {
    color: var(--primary);
}

.author-btn.follow:hover {
    background: var(--blue-light);
}

.author-btn.msg {
    color: var(--text-sub);
}

.author-btn.msg:hover {
    color: var(--primary);
}

.author-profile {
    text-align: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--bg-body);
    margin-bottom: 12px;
}

.author-avatar-lg {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 800;
    overflow: hidden;
}

.author-avatar-lg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-name-lg {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px;
}

.author-verify-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--green);
    color: #fff;
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 20px;
}

.author-verify-badge svg {
    flex-shrink: 0;
}

/* 作者分割线 */
.author-divider {
    height: 1px;
    background: var(--bg-body);
    margin: 16px 0;
}

/* 最近发布 */
.author-recent-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-sub);
    margin-bottom: 10px;
}

.author-recent-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.author-recent-item {
    font-size: 13px;
    color: var(--text-main);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.2s;
}

.author-recent-item:hover {
    color: var(--primary);
}

.author-team-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--green);
    color: #fff;
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 20px;
}

.author-posts {
    margin-bottom: 12px;
}

.author-post-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 0;
    font-size: 13px;
    border-bottom: 1px solid var(--bg-body);
}

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

.post-tag {
    font-weight: 600;
    flex-shrink: 0;
}

.post-text {
    color: var(--text-sub);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.author-post-item:hover .post-text {
    color: var(--primary);
}

.author-all-link {
    display: block;
    text-align: center;
    color: var(--orange);
    font-size: 13px;
    font-weight: 500;
    padding-top: 8px;
}

/* 侧边栏列表 */
.sidebar-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 1px;
    transition: all 0.2s;
}

.sidebar-item:hover {
    background: var(--bg-body);
}

.item-icon {
    width: 32px;
    height: 32px;
    border-radius: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
    flex-shrink: 0;
    overflow: hidden;
}

.item-icon img {
    width: 28px;
    height: 28px;
    object-fit: cover;
    border-radius: 4px;
}

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

/* 迷你排行榜 */
.rank-mini-list {
    display: flex;
    flex-direction: column;
}

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

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

.rank-mini-item:hover .rank-mini-name {
    color: var(--primary);
}

.rank-mini-num {
    width: 18px;
    height: 18px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 11px;
    text-align: center;
    line-height: 18px;
    border-radius: 1px;
    font-weight: 700;
}

.rank-mini-num.no-1 { background: #fee2e2; color: #ef4444; }
.rank-mini-num.no-2 { background: #ffedd5; color: #f97316; }
.rank-mini-num.no-3 { background: #fef3c7; color: #f59e0b; }

.rank-mini-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    overflow: hidden;
}

.rank-mini-icon img {
    width: 24px;
    height: 24px;
    object-fit: cover;
    border-radius: 4px;
}

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

/* 迷你资讯列表 */
.news-mini-list {
    display: flex;
    flex-direction: column;
}

.news-mini-item {
    padding: 8px 0;
    font-size: 13px;
    color: var(--text-sub);
    border-bottom: 1px solid var(--bg-body);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

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

.news-mini-item:hover {
    color: var(--primary);
}
