/* APP详情页样式 */

/* 页面容器 */
.app-detail-container {
    width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
    position: relative;
}

/* 左侧功能按钮（悬浮） */
.left-sidebar {
    width: 100px;
    position: fixed;
    left: calc(50% - 550px);
    top: 100px;
    padding: 15px;
    z-index: 100;
}

/* 中间操作按钮和分类标签（悬浮） */
.center-sidebar {
    width: 200px;
    position: fixed;
    left: calc(50% - 430px);
    top: 100px;
    padding: 15px;
    z-index: 100;
}

.software-cover {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
}

.software-cover img {
    width: 100%;
    display: block;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.action-buttons > div {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn {
    padding: 10px 15px;
    border-radius: 6px;
    border: none;
    font-size: 14px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    width: 100%; /* 与图片宽度一致 */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn_down {
    max-width: 100%;
    box-sizing: border-box;
}

.custom_btn-d {
    flex-shrink: 1;
    max-width: 100%;
    box-sizing: border-box;
}

.btn-download {
    background-color: #1677ff;
    color: white;
}

.btn-website {
    border: 1px solid #dcdfe6;
    color: #666;
    background-color: white;
}

/* 手机查看二维码 */
.phone-view {
    position: relative;
    margin-top: 20px;
}

.phone-view-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
}

.phone-icon {
    font-size: 16px;
}

.qrcode {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 10px;
    background-color: white;
    border: 1px solid #dcdfe6;
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: none;
    z-index: 101;
}

.qrcode img {
    width: 150px;
    height: 150px;
    display: block;
}

.qrcode p {
    text-align: center;
    margin-top: 10px;
    font-size: 12px;
    color: #666;
}

.phone-view:hover .qrcode {
    display: block;
}

/* 左侧功能按钮：图标在文字上面 */
.side-function {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
    font-size: 13px;
    color: #666;
}

.side-function .count {
    color: #f56c6c;
    font-weight: 500;
    margin-left: 5px;
}

.side-function .icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    background-color: #f0f0f0;
    border-radius: 50%;
}

.side-function .icon i {
    font-size: 20px;
    color: #666;
}

.mac-version-section {
    margin-top: 30px;
}

.tags-section {
    margin-top: 20px;
}

.tags-title {
    font-size: 16px;
    margin-bottom: 10px;
    font-weight: 600;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    padding: 5px 12px;
    background-color: #f5f7fa;
    border-radius: 15px;
    font-size: 12px;
    color: #666;
}

/* 右侧主内容区 */
.app-detail-container .app-main-content {
    margin-left: 270px; /* 为固定定位的侧边栏留出空间 */
    min-height: 100vh;
}

/* 相关软件区域 */
.related-software {
    position: relative;
    left: -230px; /* 向左移动，与中间下载按钮对齐 */
    width: calc(100% + 230px); /* 增加宽度，覆盖中间和右边区域 */
    margin-top: 30px;
}

.bread-crumb {
    font-size: 13px;
    color: #999;
    margin-bottom: 10px;
}

.bread-crumb a {
    color: #999;
    text-decoration: none;
}

.software-title {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 5px;
}

.software-subtitle {
    color: #666;
    margin-bottom: 20px;
}

/* 软件信息 */
.info-container {
    display: flex;
    flex-wrap: wrap;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    padding: 20px 0;
}

.info-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    min-width: 120px;
    text-align: center;
}

.info-label {
    font-weight: 600;
    color: #333;
    font-size: 14px;
    margin-bottom: 8px;
}

.info-value {
    color: #666;
    font-size: 14px;
}

.info-divider {
    width: 1px;
    background-color: #eee;
    margin: 5px 0;
}

/* 软件介绍 */
.software-desc {
    line-height: 1.8;
    font-size: 14px;
    color: #333;
    margin-bottom: 20px;
}

.software-screenshot {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 20px;
}

.screenshot-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
}

.screenshot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.screenshot-item {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.screenshot-item img {
    width: 100%;
    display: block;
    transition: transform 0.3s ease;
}

.screenshot-item:hover img {
    transform: scale(1.02);
}

.software-screenshot img {
    width: 100%;
    display: block;
}

/* 评价区域 */
.comment-section {
    margin: 20px 0;
}

.comment-title {
    font-size: 18px;
    margin-bottom: 15px;
    font-weight: 600;
}

.comment-tips {
    background-color: #f5f7fa;
    padding: 20px;
    text-align: center;
    border-radius: 6px;
    color: #999;
    font-size: 14px;
}

.btn-login {
    display: inline-block;
    margin-top: 10px;
    padding: 6px 12px;
    background-color: #1677ff;
    color: white;
    border-radius: 4px;
    text-decoration: none;
    font-size: 13px;
}

.related-title {
    font-size: 18px;
    margin-bottom: 15px;
    font-weight: 600;
}

.related-software .row {
    display: flex;
    flex-wrap: wrap;
}

/* 收藏和点赞状态 */
.side-function .icon i.icon-dianzan.active,
.side-function .icon i.icon-tubiao_shoucang.active {
    color: #ed4c78;
}

/* 图片放大模态框 */
.screenshot-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    text-align: center;
}

.screenshot-modal:before {
    content: '';
    display: inline-block;
    height: 100%;
    vertical-align: middle;
    margin-right: -0.25em;
}

.screenshot-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: inline-block;
    vertical-align: middle;
}

.screenshot-modal-img {
    max-width: 100%;
    max-height: 90vh;
    display: block;
    margin: 0 auto;
}

.screenshot-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
}

.screenshot-close:hover {
    color: #ed4c78;
}

/* 复制成功提示 */
.copy-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    z-index: 9999;
    display: none;
    font-size: 14px;
}

/* 加载动画 */
.icon-spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .app-detail-container {
        width: 90%;
    }
    
    .left-sidebar {
        left: calc(50% - 45%);
    }
    
    .center-sidebar {
        left: calc(50% - 35%);
    }
    
    .app-detail-container .app-main-content {
        margin-left: 350px;
    }
}

@media (max-width: 992px) {
    .app-detail-container {
        display: flex;
        flex-direction: column;
        width: 100%;
        padding: 20px;
    }
    
    /* 左侧悬浮按钮在平板和手机端隐藏 */
    .left-sidebar {
        display: none !important;
    }
    
    /* 中间侧边栏在平板和手机端显示在最上面，不悬浮 */
    .center-sidebar {
        position: relative !important;
        width: 100%;
        max-width: 600px;
        margin: 0 auto 20px;
        left: auto !important;
        top: auto !important;
        order: -1;
        z-index: 1;
    }
    
    .app-detail-container .app-main-content {
        margin-left: 0;
        width: 100%;
    }
    
    /* 相关软件区域在手机端恢复正常布局 */
    .related-software {
        position: relative;
        left: auto;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .info-container {
        flex-direction: column;
        align-items: center;
    }
    
    .info-divider {
        width: 100%;
        height: 1px;
        margin: 10px 0;
    }
    
    .info-item {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        padding: 0 20px;
    }
    
    /* 手机端中间侧边栏优化 */
    .center-sidebar {
        padding: 10px;
    }
    
    .software-cover {
        max-width: 200px;
        margin: 0 auto 15px;
    }
    
    .action-buttons {
        flex-direction: row;
        justify-content: center;
        gap: 10px;
    }
    
    .action-buttons .btn {
        width: auto;
        flex: 1;
    }
    
    .mac-version-section,
    .tags-section {
        margin-top: 15px;
    }
    
    .phone-view {
        text-align: center;
        margin-top: 15px;
    }
}

@media (max-width: 576px) {
    .software-title {
        font-size: 24px;
    }
}
