/* ========== 工具详情页样式 ========== */

/* 详情页主容器 */
.detail-main {
    padding: 24px 0;
}

.detail-wrapper {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
}

/* 左侧主内容 */
.detail-content {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

/* 封面图 */
.detail-cover {
    width: 100%;
    height: 400px;
    overflow: hidden;
}
.detail-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 详情信息 */
.detail-info {
    padding: 24px;
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-light);
}

.detail-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 12px;
}

.detail-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 14px;
    color: var(--text-muted);
}
.detail-meta .version {
    background: var(--primary-color);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
}

/* 富文本内容区 */
.detail-body {
    line-height: 1.8;
    color: var(--text-color);
}
.detail-body h2 { font-size: 20px; margin: 24px 0 12px; }
.detail-body h3 { font-size: 18px; margin: 20px 0 10px; }
.detail-body p { margin-bottom: 16px; }
.detail-body ul, .detail-body ol { margin: 16px 0; padding-left: 24px; }
.detail-body li { margin-bottom: 8px; }
.detail-body img { max-width: 100%; border-radius: var(--radius-md); margin: 16px 0; }
.detail-body pre {
    background: var(--bg-color);
    padding: 16px;
    border-radius: var(--radius-md);
    overflow-x: auto;
    font-size: 14px;
}
.detail-body code {
    background: var(--tag-bg);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-size: 14px;
}
.detail-body blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 16px;
    margin: 16px 0;
    color: var(--text-secondary);
}

/* ===== 右侧边栏 ===== */
.detail-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 下载卡片 */
.download-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.download-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-color);
}

.download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    background: var(--accent-color);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 16px;
}
.download-btn:hover { 
    background: #3d5f56;
}

/* 网盘链接列表 */
.cloud-links {
    border-top: 1px solid var(--border-light);
    padding-top: 16px;
}

.cloud-links h4 {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.cloud-link-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: var(--bg-color);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    font-size: 13px;
}
.cloud-link-item:last-child { margin-bottom: 0; }

.cloud-link-item .platform {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-color);
}

.cloud-link-item .code {
    color: var(--text-muted);
    font-size: 12px;
}

.cloud-link-item a {
    color: var(--primary-color);
    font-weight: 500;
}
.cloud-link-item a:hover { text-decoration: underline; }

/* 视频教程卡片 */
.video-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.video-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-color);
}

.video-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-color);
    border-radius: var(--radius-md);
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s;
}
.video-item:last-child { margin-bottom: 0; }
.video-item:hover { background: var(--card-hover-bg); }

.video-item .icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.video-item .icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.video-item .info {
    flex: 1;
    min-width: 0;
}
.video-item .title {
    font-size: 14px;
    color: var(--text-color);
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.video-item .platform {
    font-size: 12px;
    color: var(--text-muted);
}

/* 视频播放器弹窗 */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}
.video-modal.show { display: flex; }

.video-modal-content {
    width: 90%;
    max-width: 900px;
    background: #000;
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
}

.video-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
}

.video-modal iframe {
    width: 100%;
    aspect-ratio: 16/9;
    border: none;
}

/* ===== 图片灯箱 ===== */
.detail-body img {
    cursor: zoom-in;
    transition: opacity 0.2s;
}
.detail-body img:hover {
    opacity: 0.9;
}

.image-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.92);
    z-index: 1001;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}
.image-lightbox.show {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 95vw;
    max-height: 95vh;
}

.lightbox-content img {
    max-width: 95vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 4px 30px rgba(0,0,0,0.5);
}

.lightbox-close {
    position: fixed;
    top: 20px;
    right: 24px;
    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;
    transition: background 0.2s;
}
.lightbox-close:hover {
    background: rgba(255,255,255,0.2);
}

.lightbox-hint {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.6);
    font-size: 13px;
}

/* ===== 响应式 ===== */
@media (max-width: 900px) {
    .detail-wrapper {
        grid-template-columns: 1fr;
    }
    .detail-cover { height: 280px; }
}

@media (max-width: 480px) {
    .detail-cover { height: 200px; }
    .detail-title { font-size: 20px; }
    .detail-info { padding: 16px; }
}


/* ========== 单页面样式 ========== */
.page-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 0;
}

.page-content {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 40px;
}

.page-header {
    text-align: center;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-light);
}

.page-header h1 {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 12px;
}

.page-meta {
    font-size: 14px;
    color: var(--text-muted);
    display: flex;
    justify-content: center;
    gap: 16px;
}

.page-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.page-body {
    line-height: 1.8;
    color: var(--text-secondary);
}

.page-body h2,
.page-body h3 {
    color: var(--text-color);
    margin: 24px 0 12px;
}

.page-body p {
    margin-bottom: 16px;
}

.page-body ul,
.page-body ol {
    margin: 16px 0;
    padding-left: 24px;
}

.page-body li {
    margin-bottom: 8px;
}
