/* Update Manager Styles */

/* Popup Container */
.update-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.update-popup.show {
    opacity: 1;
    visibility: visible;
}

/* Overlay */
.update-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

/* Content */
.update-popup-content {
    position: relative;
    background: white;
    border-radius: 20px;
    padding: 40px 30px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.update-popup.show .update-popup-content {
    transform: scale(1);
}

/* Icon */
.update-popup-icon {
    font-size: 64px;
    margin-bottom: 20px;
    animation: bounceIn 0.6s ease;
}

.update-popup-icon.error {
    animation: shake 0.5s ease;
}

/* Title */
.update-popup-title {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin: 0 0 15px 0;
}

/* Message */
.update-popup-message {
    font-size: 15px;
    color: #666;
    line-height: 1.6;
    margin: 0 0 20px 0;
}

/* Version */
.update-popup-version {
    font-size: 14px;
    color: #888;
    margin-bottom: 15px;
    padding: 10px 15px;
    background: #f5f5f5;
    border-radius: 8px;
}

.update-popup-version strong {
    color: #007bff;
    font-weight: 600;
}

/* Warning */
.update-warning {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* Error */
.update-popup-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 20px;
    font-family: monospace;
    word-break: break-word;
}

/* Actions */
.update-popup-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 25px;
}

/* Buttons */
.update-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    flex: 1;
    max-width: 150px;
}

.update-btn:active {
    transform: scale(0.98);
}

.update-btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.update-btn-primary:hover {
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
    transform: translateY(-2px);
}

.update-btn-secondary {
    background: #f0f0f0;
    color: #666;
}

.update-btn-secondary:hover {
    background: #e0e0e0;
}

/* Loading Popup */
.update-loading-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.update-loading-popup.show {
    opacity: 1;
    visibility: visible;
}

.update-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
}

.update-loading-content {
    position: relative;
    background: white;
    border-radius: 20px;
    padding: 40px 30px;
    max-width: 350px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
}

/* Spinner */
.update-loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 1s linear infinite;
}

.update-loading-title {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin: 0 0 10px 0;
}

.update-loading-message {
    font-size: 14px;
    color: #666;
    margin: 0 0 20px 0;
}

/* Progress Bar */
.update-loading-progress {
    width: 100%;
    height: 6px;
    background: #f0f0f0;
    border-radius: 3px;
    overflow: hidden;
}

.update-loading-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 3px;
    width: 0%;
    transition: width 0.3s ease;
}

/* Animations */
@keyframes bounceIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes slideUpToast {
    from {
        transform: translate(-50%, 100%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
        transform: translate(-50%, 20px);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .update-popup-content {
        padding: 30px 20px;
    }
    
    .update-popup-icon {
        font-size: 48px;
    }
    
    .update-popup-title {
        font-size: 20px;
    }
    
    .update-popup-message {
        font-size: 14px;
    }
    
    .update-popup-actions {
        flex-direction: column;
    }
    
    .update-btn {
        max-width: none;
        width: 100%;
    }
}