/*
 * 应用下载弹窗样式
 */

/* 弹窗遮罩 */
.app-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.app-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

/* 弹窗内容 */
.app-modal-content {
    position: relative;
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

/* 弹窗头部 */
.app-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
}

.app-modal-title {
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.app-modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: #f1f5f9;
    border-radius: 50%;
    font-size: 24px;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1;
}

.app-modal-close:hover {
    background: #e2e8f0;
    transform: rotate(90deg);
}

/* 应用信息区 */
.app-modal-info {
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    gap: 16px;
    background: #f8fafc;
}

.app-modal-icon {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    flex-shrink: 0;
    object-fit: cover;
}

.app-modal-info-text {
    flex: 1;
    min-width: 0;
}

.app-modal-name {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 8px 0;
}

.app-modal-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.app-modal-desc {
    font-size: 14px;
    color: #64748b;
    line-height: 1.5;
    margin: 0;
}

/* 下载区域 */
.app-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.download-section {
    margin-bottom: 24px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
}

.download-section:last-child {
    margin-bottom: 0;
}

/* iOS区域 */
.ios-section {
    border-color: #667eea;
}

.ios-section .download-section-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Android区域 */
.android-section {
    border-color: #3ddc84;
}

.android-section .download-section-header {
    background: linear-gradient(135deg, #3ddc84 0%, #00c853 100%);
}

/* 下载区块头部 */
.download-section-header {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
}

.download-platform-icon {
    font-size: 24px;
}

.download-section-header h4 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

/* 下载区块内容 */
.download-section-body {
    padding: 20px;
    background: white;
}

.download-note {
    font-size: 14px;
    color: #64748b;
    margin: 0 0 16px 0;
}

/* 下载按钮 */
.download-button {
    display: block;
    width: 100%;
    padding: 14px 24px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    margin-bottom: 20px;
}

.ios-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.ios-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.android-button {
    background: linear-gradient(135deg, #3ddc84 0%, #00c853 100%);
    box-shadow: 0 4px 12px rgba(61, 220, 132, 0.3);
}

.android-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(61, 220, 132, 0.4);
}

.download-button:active {
    transform: translateY(0);
}

/* 下架按钮 */
.download-button.off-shelf {
    background: #e0e0e0 !important;
    color: #999 !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
}

.download-button.off-shelf:hover {
    transform: none !important;
}

/* 安装步骤 */
.installation-steps {
    margin-top: 20px;
}

.installation-steps h5 {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 12px 0;
}

.installation-steps ol {
    margin: 0;
    padding-left: 20px;
}

.installation-steps li {
    font-size: 13px;
    color: #64748b;
    line-height: 1.8;
    margin-bottom: 6px;
}

.download-tip {
    margin-top: 16px;
    padding: 12px;
    background: #fef3c7;
    border-left: 3px solid #f59e0b;
    border-radius: 6px;
    font-size: 13px;
    color: #92400e;
    margin-bottom: 0;
}

/* 弹窗底部 */
.app-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e5e7eb;
    background: #f8fafc;
}

.support-note {
    font-size: 13px;
    color: #94a3b8;
    text-align: center;
    margin: 0;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .app-modal {
        padding: 0;
        align-items: flex-end;
    }

    .app-modal-content {
        max-width: 100%;
        max-height: 95vh;
        border-radius: 16px 16px 0 0;
    }

    .app-modal-header {
        padding: 16px 20px;
    }

    .app-modal-title {
        font-size: 18px;
    }

    .app-modal-info {
        padding: 16px 20px;
    }

    .app-modal-icon {
        width: 60px;
        height: 60px;
        border-radius: 12px;
    }

    .app-modal-name {
        font-size: 16px;
    }

    .app-modal-body {
        padding: 16px 20px;
    }

    .download-section-body {
        padding: 16px;
    }

    .download-button {
        padding: 12px 20px;
        font-size: 15px;
    }
}

/* 隐藏不可用的下载区 */
.download-section.hidden {
    display: none;
}
