/* 版本历史弹窗样式 */
.version-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.version-modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s ease;
    overflow: hidden;
}

.version-modal.show .modal-content {
    transform: scale(1) translateY(0);
}

/* 弹窗头部 */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #f0f0f0;
    background: #fafafa;
}

.modal-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1d1d1f;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    margin-right: 20px;
}

.modal-close {
    background: none;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #666;
    flex-shrink: 0;
}

.modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

/* 弹窗主体 */
.modal-body {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* 加载状态 */
.version-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.loading-spinner {
    font-size: 32px;
    color: #007AFF;
    margin-bottom: 16px;
}

.version-loading p {
    color: #666;
    margin: 0;
    font-size: 14px;
}

/* 错误状态 */
.version-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.error-icon {
    font-size: 32px;
    color: #FF3B30;
    margin-bottom: 16px;
}

.error-message {
    color: #666;
    margin: 0 0 20px;
    font-size: 14px;
}

.retry-btn {
    padding: 8px 20px;
    background: #007AFF;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.retry-btn:hover {
    background: #0056b3;
}

/* 版本列表 */
.version-list {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

/* 版本统计信息 */
.version-stats {
    display: flex;
    gap: 24px;
    padding: 20px 24px;
    background: #f8f9fa;
    border-bottom: 1px solid #f0f0f0;
}

.stats-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
}

.stats-item i {
    color: #007AFF;
    width: 16px;
    text-align: center;
}

/* 版本容器 */
.versions-container {
    padding: 0 24px 20px;
}

/* 版本项目 */
.version-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid #f5f5f5;
    transition: all 0.2s ease;
}

.version-item:last-child {
    border-bottom: none;
}

.version-item:hover {
    background: #fafafa;
    margin: 0 -12px;
    padding-left: 12px;
    padding-right: 12px;
    border-radius: 8px;
}

.version-item.latest {
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f8ff 100%);
    border: 1px solid #e6f3ff;
    border-radius: 8px;
    padding: 16px 12px;
    margin-bottom: 12px;
}

/* 版本信息 */
.version-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.version-number {
    display: flex;
    align-items: center;
    gap: 12px;
}

.version-text {
    font-size: 16px;
    font-weight: 600;
    color: #1d1d1f;
    font-family: 'SF Mono', Consolas, monospace;
}

.latest-badge {
    background: linear-gradient(135deg, #007AFF 0%, #5856d6 100%);
    color: white;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 100px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.version-id {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #666;
    margin: 4px 0;
}

.version-id i {
    color: #999;
    width: 12px;
}

.version-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: #666;
}

.release-date {
    display: flex;
    align-items: center;
    gap: 6px;
}

.release-date i {
    color: #999;
    width: 12px;
}

.days-ago {
    color: #999;
    font-size: 12px;
}

/* 版本操作 */
.version-actions {
    display: flex;
    align-items: center;
}

.copy-version-btn {
    background: none;
    border: 1px solid #e5e5ea;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #666;
}

.copy-version-btn:hover {
    background: #f5f5f7;
    border-color: #d1d1d6;
    color: #333;
    transform: translateY(-1px);
}

.copy-version-btn:active {
    transform: translateY(0);
}

/* 无版本状态 */
.no-versions {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: #666;
}

.no-versions i {
    font-size: 32px;
    margin-bottom: 16px;
    color: #ccc;
}

.no-versions p {
    margin: 0;
    font-size: 14px;
}

/* 自定义滚动条 */
.version-list::-webkit-scrollbar {
    width: 6px;
}

.version-list::-webkit-scrollbar-track {
    background: transparent;
}

.version-list::-webkit-scrollbar-thumb {
    background: #d1d1d6;
    border-radius: 3px;
}

.version-list::-webkit-scrollbar-thumb:hover {
    background: #a1a1aa;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .modal-content {
        width: 90%;
        max-height: 75vh;
        margin: 0 auto;
    }
    
    .modal-header {
        padding: 14px 18px;
    }
    
    .modal-title {
        font-size: 16px;
        margin-right: 12px;
    }
    
    .modal-close {
        width: 28px;
        height: 28px;
    }
    
    .version-stats {
        flex-direction: column;
        gap: 10px;
        padding: 14px 18px;
    }
    
    .stats-item {
        font-size: 13px;
    }
    
    .versions-container {
        padding: 0 18px 14px;
    }
    
    .version-item {
        padding: 10px 0;
    }
    
    .version-item.latest {
        padding: 10px 8px;
    }
    
    .version-number {
        gap: 8px;
    }
    
    .version-text {
        font-size: 15px;
    }
    
    .latest-badge {
        font-size: 10px;
        padding: 2px 6px;
    }
    
    .version-meta {
        gap: 10px;
        font-size: 12px;
    }
    
    .days-ago {
        font-size: 11px;
    }
    
    .copy-version-btn {
        width: 26px;
        height: 26px;
    }
}

@media (max-width: 480px) {
    .modal-content {
        width: 92%;
        height: auto;
        max-height: 70vh;
        border-radius: 12px;
        max-width: none;
    }
    
    .version-stats {
        padding: 12px 16px;
    }
    
    .versions-container {
        padding: 0 16px 12px;
    }
    
    .modal-header {
        padding: 12px 16px;
    }
    
    .version-item:hover {
        margin: 0 -6px;
        padding-left: 6px;
        padding-right: 6px;
    }
    
    .version-item.latest {
        padding: 10px 6px;
    }
}

/* 版本按钮样式 - 与其他按钮保持一致 */
.version-btn {
    background: white !important;
    color: #666 !important;
    border: 1px solid #e5e5ea !important;
}

.version-btn:hover {
    background: #f5f5f7 !important;
    border-color: #d1d1d6 !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
    color: #333 !important;
}

/* 动画效果 */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.version-item {
    animation: slideInUp 0.3s ease-out;
}

.version-item:nth-child(1) { animation-delay: 0.1s; }
.version-item:nth-child(2) { animation-delay: 0.15s; }
.version-item:nth-child(3) { animation-delay: 0.2s; }
.version-item:nth-child(4) { animation-delay: 0.25s; }
.version-item:nth-child(5) { animation-delay: 0.3s; }