/* 应用下载页面样式 */

/* 微信内打开下载时的引导遮罩层 */
#weixin-tip {
    display: none;
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    background: rgba(0, 0, 0, 0.8);
}

#weixin-tip p {
    padding: 0 5%;
    text-align: center;
    margin-top: 10%;
    position: relative;
}

#weixin-tip .weixin-close {
    position: absolute;
    left: 5%;
    top: 0;
    padding: 5px;
    color: #fff;
    font: bold 20px/20px simsun;
    text-shadow: 0 1px 0 #ddd;
}

#weixin-tip img {
    max-width: 100%;
    height: auto;
}

/* 下载页面背景 */
.bg-download,
.bg-download nav:before {
    background-color: #dedede;
    color: #252525;
}

.bg-download *:not(i):not(nav):after,
.bg-download *:not(i):not(nav):before,
.bg-download .btn:hover,
.bg-download .btn-inverse {
    border-color: #252525;
    background-color: #252525;
    color: #dedede;
}

/* 下载页独立滚动：配合 main.js 销毁/重建 perfect-scrollbar
   真机上 pointer-events 无法阻止捕获阶段的触摸事件，必须销毁 ps */
.slide-item[data-slide-id="download"].active {
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

/* 应用列表容器 */
.app-list-container {
    margin-top: 30px;
    padding-bottom: 80px; /* 底部留白，用 padding 确保在独立滚动下生效 */
}

/* 应用卡片 */
.app-card {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.app-card:hover {
    background: #f5f5f5;
    border-color: #999;
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.app-icon {
    font-size: 48px;
    color: #2196f3;
    flex-shrink: 0;
    width: 60px;
    text-align: center;
}

.app-icon img {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    object-fit: cover;
}

.app-card-content {
    flex-grow: 1;
    min-width: 0;
}

.app-name {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #252525;
}

.app-category {
    margin-bottom: 10px;
}

.app-category .badge {
    background: #e3f2fd;
    color: #1976d2;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.app-short-desc {
    font-size: 14px;
    line-height: 1.6;
    color: #555;
    margin-bottom: 12px;
}

.app-platforms {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 10px;
    border-top: 1px solid #e0e0e0;
}

.app-platforms i {
    font-size: 18px;
    color: #666;
}

.app-platforms-label {
    font-size: 12px;
    color: #999;
    margin-right: 5px;
}

/* 应用详情容器 */
.app-detail-container {
    margin-top: 30px;
}

.app-detail-content {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 30px;
    padding-bottom: 60px; /* 内容区内部底部留白 */
    margin-bottom: 80px; /* 和屏幕底部的外边距，加大到 80px */
    text-align: left;
}

.btn-back {
    background: transparent;
    border: 1px solid #999;
    color: #252525;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    margin-bottom: 30px;
    transition: all 0.3s ease;
    font-size: 14px;
}

.btn-back:hover {
    background: #f5f5f5;
    border-color: #666;
}

.btn-back i {
    margin-right: 8px;
}

/* 应用详情头部 */
.app-detail-header {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.btn-jump-download {
    margin-left: auto;
    flex-shrink: 0;
    background: #2196f3;
    color: #fff;
    padding: 14px 28px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
}

.btn-jump-download:hover {
    background: #1976d2;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(33, 150, 243, 0.5);
    color: #fff;
}

.btn-jump-download:active {
    background: #1565c0;
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(33, 150, 243, 0.4);
}

/* 移动端禁用悬停效果 */
@media (hover: none) {
    .btn-jump-download:hover {
        background: #2196f3;
        transform: none;
        box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
    }
}

.btn-jump-download i {
    margin-right: 8px;
}

.btn-share-link {
    margin-left: 10px;
    flex-shrink: 0;
    background: #fff;
    color: #2196f3;
    border: 2px solid #2196f3;
    padding: 14px 28px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-share-link:hover {
    background: #2196f3;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(33, 150, 243, 0.3);
}

.btn-share-link:active {
    background: #1976d2;
    color: #fff;
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(33, 150, 243, 0.3);
}

/* 移动端禁用悬停效果 */
@media (hover: none) {
    .btn-share-link:hover {
        background: #fff;
        color: #2196f3;
        transform: none;
        box-shadow: none;
    }
}

.btn-share-link i {
    margin-right: 8px;
}

/* 意见反馈按钮 */
.btn-feedback {
    margin-left: 10px;
    flex-shrink: 0;
    background: #fff;
    color: #888;
    border: 2px solid #ccc;
    padding: 14px 28px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
}

.btn-feedback:hover {
    background: #f5f5f5;
    color: #555;
    border-color: #999;
    transform: translateY(-2px);
}

.btn-feedback:active {
    background: #eee;
    color: #555;
    transform: translateY(0);
}

/* 移动端禁用悬停效果 */
@media (hover: none) {
    .btn-feedback:hover {
        background: #fff;
        color: #888;
        border-color: #ccc;
        transform: none;
    }
}

.btn-feedback i {
    margin-right: 8px;
}

.app-detail-icon {
    font-size: 48px;
    color: #2196f3;
    margin-right: 25px;
    flex-shrink: 0;
}

.app-detail-icon img {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    object-fit: cover;
}

.app-detail-info h2 {
    font-size: 32px;
    font-weight: 700;
    color: #252525;
    margin-bottom: 10px;
}

.app-detail-body {
    color: #333;
    text-align: left;
}

.app-detail-body h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1976d2;
    margin-bottom: 15px;
    margin-top: 25px;
}

.app-detail-body h3:first-child {
    margin-top: 0;
}

.app-description p {
    line-height: 1.8;
    font-size: 15px;
    text-align: left;
}

.app-features ul {
    list-style: none;
    padding: 0;
}

.app-features ul li {
    padding: 10px 0;
    font-size: 15px;
    line-height: 1.6;
    text-align: left;
}

.app-features ul li i {
    color: #4caf50;
    margin-right: 10px;
}

.app-new-features {
    margin-top: 25px;
}

.app-new-features ul {
    list-style: none;
    padding: 0;
}

.app-new-features ul li {
    padding: 10px 0;
    font-size: 15px;
    line-height: 1.6;
    text-align: left;
}

.app-new-features ul li i {
    color: #ff9800;
    margin-right: 10px;
}

/* 下载区块：标题与上方内容拉开距离 */
.app-downloads {
    margin-top: 25px;
}

/* 下载列表 */
.downloads-list {
    margin-top: 20px;
}

.download-item {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 20px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.download-item:hover {
    background: #f0f0f0;
    border-color: #bbb;
}

.download-info {
    flex-grow: 1;
    min-width: 0;
}

.download-platform {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #252525;
    display: flex;
    align-items: center;
    width: 100%;
}

.download-platform i {
    margin-right: 8px;
    color: #2196f3;
}

.platform-name {
    flex: 1 1 auto;
}

.download-actions {
    display: flex;
    align-items: center;
    align-self: flex-end;
    gap: 12px;
    flex: 0 0 auto;
}

/* 下载条目快捷操作按钮 */
.download-quick-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    margin: 0;
    flex: 0 0 auto;
}

.quick-action-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: #999;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    border: none;
}

.quick-action-btn:hover {
    background: transparent;
    color: #666;
    transform: scale(1.05);
}

.quick-action-btn i {
    font-size: 13px;
    margin: 0;
}

.download-details {
    display: flex;
    gap: 15px;
    align-items: center;
}

/* 下载版本特性说明（内测版等） */
.download-description {
    margin-top: 8px;
    font-size: 13px;
    color: #f57c00;
    line-height: 1.5;
    font-weight: 500;
}

.badge-stable {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
}

.badge-beta {
    background: #fff3e0;
    color: #e65100;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
}

.download-size {
    color: #666;
    font-size: 13px;
}

.btn-download {
    background: #2196f3;
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    white-space: nowrap;
}

.btn-download:hover {
    background: #1976d2;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
    color: #fff;
}

.btn-download i {
    margin-right: 8px;
}

/* 响应式设计 */
@media (max-width: 991px) {
    .app-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .app-icon {
        margin-bottom: 15px;
    }

    .app-platforms {
        justify-content: center;
    }

    .app-detail-header {
        flex-wrap: wrap;
    }

    .btn-jump-download {
        margin-left: 0;
        margin-top: 15px;
        width: 100%;
        text-align: center;
    }

    .btn-share-link {
        margin-left: 0;
        margin-top: 10px;
        width: 100%;
        text-align: center;
    }

    .btn-feedback {
        margin-left: 0;
        margin-top: 10px;
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    .app-detail-icon {
        margin-right: 15px;
        margin-bottom: 0;
    }

    .download-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .download-actions {
        width: 100%;
        align-self: stretch;
        justify-content: flex-end;
    }

    .btn-download {
        flex: 1 1 auto;
        margin-top: 0;
        text-align: center;
    }
}

@media (max-width: 767px) {
    .app-card {
        padding: 15px;
    }

    .app-icon {
        font-size: 36px;
        width: 50px;
    }

    .app-name {
        font-size: 18px;
    }

    .app-detail-content {
        padding: 20px;
    }

    .app-detail-info h2 {
        font-size: 24px;
    }

    .download-platform {
        font-size: 16px;
    }

    .download-actions {
        gap: 10px;
    }

    .download-quick-actions {
        gap: 8px;
    }

    .quick-action-btn {
        width: 40px;
        height: 40px;
    }
}

/* 全站浮动意见反馈入口 */
.floating-feedback-widget {
    position: fixed;
    left: 0;
    top: 20%;
    z-index: 2147483646;
    width: 46px;
    height: 46px;
    touch-action: none;
    user-select: none;
    transition: transform 0.2s ease, left 0.2s ease, top 0.2s ease;
}

.floating-feedback-btn {
    position: relative;
    width: 46px;
    height: 46px;
    border: none;
    border-radius: 50%;
    background: #f6b37f;
    color: #fff;
    opacity: 0.7;
    box-shadow: 0 5px 16px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity 0.2s ease, box-shadow 0.2s ease;
}

.floating-feedback-widget:hover .floating-feedback-btn {
    opacity: 1;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.floating-feedback-btn i {
    font-size: 20px;
    pointer-events: none;
}

.floating-feedback-widget.is-dragging {
    transition: none;
    cursor: grabbing;
}

.floating-feedback-widget.is-dragging .floating-feedback-btn {
    transform: none;
}

.floating-feedback-close {
    position: absolute;
    top: -12px;
    right: -12px;
    width: 18px;
    height: 18px;
    border: none;
    border-radius: 50%;
    background: rgba(37, 37, 37, 0.35);
    color: rgba(255, 255, 255, 0.75);
    font-size: 14px;
    line-height: 18px;
    padding: 0;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.floating-feedback-widget:hover .floating-feedback-close {
    opacity: 0.75;
}

.floating-feedback-close:hover {
    background: rgba(37, 37, 37, 0.55);
    color: rgba(255, 255, 255, 0.9);
}

/* 意见反馈弹窗 - 原生实现 */
.feedback-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2147483647;
}

.feedback-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.feedback-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.feedback-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #e5e5e5;
}

.feedback-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #252525;
    margin: 0;
}

.feedback-modal-close {
    background: transparent;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    line-height: 1;
    transition: color 0.2s ease;
}

.feedback-modal-close:hover {
    color: #333;
}

.feedback-modal-body {
    padding: 20px 25px;
}

.feedback-form-group {
    margin-bottom: 20px;
}

.feedback-form-group:last-child {
    margin-bottom: 0;
}

.feedback-form-group label {
    display: block;
    font-weight: 600;
    color: #555;
    margin-bottom: 8px;
    font-size: 14px;
}

.feedback-message,
.feedback-contact {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px 12px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.feedback-message:focus,
.feedback-contact:focus {
    outline: none;
    border-color: #2196f3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.feedback-message {
    resize: vertical;
    min-height: 100px;
}

.feedback-message.input-error {
    border-color: #dc3545;
}

.feedback-message.input-error:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.feedback-notice {
    padding: 12px;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
    margin-top: 15px;
    background: #f8f9fa;
}

.feedback-success-state {
    padding: 18px 0 22px;
    text-align: center;
}

.feedback-success-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #e8f5e9;
    color: #2e7d32;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 24px;
}

.feedback-success-state h4 {
    margin: 0 0 8px;
    color: #252525;
    font-size: 20px;
    font-weight: 600;
}

.feedback-success-state p {
    margin: 0;
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

.feedback-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 15px 25px;
    border-top: 1px solid #e5e5e5;
}

.feedback-btn {
    padding: 10px 24px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.feedback-btn-cancel {
    background: #f5f5f5;
    color: #666;
}

.feedback-btn-cancel:hover {
    background: #e0e0e0;
}

.feedback-btn-submit {
    background: #2196f3;
    color: #fff;
}

.feedback-btn-submit:hover {
    background: #1976d2;
}

.feedback-btn-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.feedback-btn-done {
    background: #2196f3;
    color: #fff;
}

.feedback-btn-done:hover {
    background: #1976d2;
}

/* 移动端适配 */
@media (max-width: 576px) {
    .floating-feedback-widget,
    .floating-feedback-btn {
        width: 42px;
        height: 42px;
    }

    .feedback-modal-content {
        width: 95%;
        max-height: 85vh;
    }

    .feedback-modal-header {
        padding: 15px 20px;
    }

    .feedback-modal-title {
        font-size: 16px;
    }

    .feedback-modal-body {
        padding: 15px 20px;
    }

    .feedback-success-state {
        padding: 20px 0 24px;
    }

    .feedback-modal-footer {
        padding: 12px 20px;
    }

    .feedback-btn {
        padding: 8px 20px;
        font-size: 13px;
    }
}

/* 分享弹窗 */
.share-modal-tip {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 15px;
}

.share-link-box {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.share-link-input {
    flex: 1;
    min-width: 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px 12px;
    font-size: 13px;
    color: #555;
    background: #f9f9f9;
    box-sizing: border-box;
}

.share-link-input:focus {
    outline: none;
    border-color: #2196f3;
}

.share-copy-btn {
    flex: 0 0 auto;
    background: #2196f3;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 0 20px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s ease;
    white-space: nowrap;
}

.share-copy-btn:hover {
    background: #1976d2;
}

.share-notice {
    padding: 10px 0 0;
    font-size: 14px;
    text-align: center;
}
