/**
 * EasyLottie - 使用完成页样式
 * V1.2.71 - 留存优化
 */

/* ===== 遮罩层 ===== */
.completion-page-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 20px;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ===== 内容容器 ===== */
.completion-page-content {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideInUp 0.4s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== 关闭按钮 ===== */
.completion-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    border-radius: 50%;
    font-size: 24px;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.completion-close-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #1f2937;
    transform: rotate(90deg);
}

/* ===== 成功提示 ===== */
.completion-success {
    text-align: center;
    padding: 60px 40px 40px;
    background: linear-gradient(135deg, #a7f3d0 0%, #6ee7b7 100%);
    border-radius: 20px 20px 0 0;
}

.success-icon {
    font-size: 80px;
    margin-bottom: 20px;
    animation: bounceIn 0.6s ease-out;
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

.completion-success h2 {
    font-size: 32px;
    font-weight: 700;
    color: #065f46;
    margin: 0 0 12px 0;
}

.completion-success .file-name {
    font-size: 16px;
    color: #047857;
    margin: 0;
    word-break: break-word;
}

/* ===== 统计数据 ===== */
.completion-stats {
    padding: 40px;
    border-bottom: 1px solid #e5e7eb;
}

.completion-stats h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 24px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-item {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-item:hover {
    border-color: #10b981;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.1);
}

.stat-label {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 8px;
    font-weight: 500;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.size-before {
    color: #6b7280;
}

.arrow {
    font-size: 20px;
    color: #10b981;
}

.size-after {
    color: #10b981;
}

.reduction {
    font-size: 16px;
    font-weight: 600;
}

/* ===== 下一步推荐 ===== */
.next-steps {
    padding: 40px;
    background: linear-gradient(135deg, #ddd6fe 0%, #c4b5fd 100%);
}

.next-steps h3 {
    font-size: 20px;
    font-weight: 700;
    color: #5b21b6;
    margin: 0 0 24px 0;
    text-align: center;
}

.next-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.next-tool-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.next-tool-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.next-tool-card .tool-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 16px;
    transition: transform 0.3s ease;
}

.next-tool-card:hover .tool-icon {
    transform: scale(1.1) rotate(5deg);
}

.next-tool-card h4 {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 8px 0;
}

.next-tool-card p {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 16px 0;
    line-height: 1.5;
}

.try-btn {
    width: 100%;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.try-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ===== 操作按钮 ===== */
.completion-actions {
    padding: 30px 40px;
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.action-btn {
    padding: 14px 32px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.star-btn {
    background: white;
    border: 2px solid #fbbf24;
    color: #f59e0b;
}

.star-btn:hover {
    background: #fef3c7;
    border-color: #f59e0b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}

.star-btn .btn-icon {
    font-size: 20px;
}

.primary-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.primary-btn:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* ===== 响应式设计 ===== */

/* 平板 */
@media (max-width: 768px) {
    .completion-page-content {
        max-width: 95%;
        border-radius: 16px;
    }
    
    .completion-success {
        padding: 50px 30px 30px;
    }
    
    .success-icon {
        font-size: 64px;
    }
    
    .completion-success h2 {
        font-size: 28px;
    }
    
    .completion-stats,
    .next-steps {
        padding: 30px 20px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .next-tools-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .completion-actions {
        padding: 24px 20px;
        flex-direction: column;
    }
    
    .action-btn {
        width: 100%;
        justify-content: center;
    }
}

/* 小手机 */
@media (max-width: 480px) {
    .completion-page-overlay {
        padding: 10px;
    }
    
    .completion-success {
        padding: 40px 20px 24px;
    }
    
    .success-icon {
        font-size: 56px;
    }
    
    .completion-success h2 {
        font-size: 24px;
    }
    
    .completion-success .file-name {
        font-size: 14px;
    }
    
    .completion-stats h3,
    .next-steps h3 {
        font-size: 18px;
    }
    
    .stat-value {
        font-size: 20px;
    }
    
    .next-tool-card {
        padding: 20px;
    }
    
    .next-tool-card .tool-icon {
        width: 50px;
        height: 50px;
        font-size: 28px;
    }
    
    .completion-close-btn {
        top: 15px;
        right: 15px;
        width: 36px;
        height: 36px;
        font-size: 20px;
    }
}

/* ===== 深色模式 ===== */
@media (prefers-color-scheme: dark) {
    .completion-page-content {
        background: #1f2937;
        color: #f3f4f6;
    }
    
    .completion-success {
        background: linear-gradient(135deg, #065f46 0%, #047857 100%);
    }
    
    .completion-success h2 {
        color: #d1fae5;
    }
    
    .completion-success .file-name {
        color: #a7f3d0;
    }
    
    .completion-stats {
        border-bottom-color: #374151;
    }
    
    .completion-stats h3,
    .next-steps h3 {
        color: #f3f4f6;
    }
    
    .stat-item {
        background: #374151;
        border-color: #4b5563;
    }
    
    .stat-label {
        color: #9ca3af;
    }
    
    .stat-value {
        color: #f3f4f6;
    }
    
    .next-steps {
        background: linear-gradient(135deg, #5b21b6 0%, #6d28d9 100%);
    }
    
    .next-tool-card {
        background: #374151;
        border-color: #4b5563;
    }
    
    .next-tool-card h4 {
        color: #f3f4f6;
    }
    
    .next-tool-card p {
        color: #9ca3af;
    }
    
    .completion-close-btn {
        background: rgba(255, 255, 255, 0.1);
        color: #9ca3af;
    }
    
    .completion-close-btn:hover {
        background: rgba(255, 255, 255, 0.2);
        color: #f3f4f6;
    }
    
    .star-btn {
        background: #374151;
    }
    
    .star-btn:hover {
        background: #4b5563;
    }
}

/* ===== 滚动条样式 ===== */
.completion-page-content::-webkit-scrollbar {
    width: 8px;
}

.completion-page-content::-webkit-scrollbar-track {
    background: #f1f3f5;
}

.completion-page-content::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 4px;
}

.completion-page-content::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}
