/* Custom CSS for Resize Image to 20KB Tool */

/* Orange/Pink theme colors */
:root {
    --orange-primary: #ea580c;
    --orange-secondary: #f97316;
    --pink-primary: #e11d48;
    --pink-secondary: #f43f5e;
}

/* Custom orange slider styling */
.slider-orange::-webkit-slider-thumb {
    appearance: none;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--orange-primary), var(--pink-primary));
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.slider-orange::-moz-range-thumb {
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--orange-primary), var(--pink-primary));
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Upload area enhancements */
#uploadArea.drag-over {
    border-color: var(--orange-secondary);
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.1), rgba(244, 63, 94, 0.1));
    transform: scale(1.02);
}

.upload-icon svg {
    transition: all 0.3s ease;
}

#uploadArea:hover .upload-icon svg {
    transform: scale(1.1);
    color: var(--orange-secondary);
}

/* Loading spinner */
.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(234, 88, 12, 0.2);
    border-top: 4px solid var(--orange-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Queue item styling */
.queue-item {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.05), rgba(244, 63, 94, 0.05));
    border: 1px solid rgba(249, 115, 22, 0.2);
    border-radius: 12px;
    padding: 16px;
    transition: all 0.3s ease;
}

.queue-item:hover {
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.15);
}

.queue-item.processing {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(16, 185, 129, 0.1));
    border-color: rgba(34, 197, 94, 0.3);
}

.queue-item.completed {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(16, 185, 129, 0.1));
    border-color: rgba(34, 197, 94, 0.3);
}

.queue-item.error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(220, 38, 38, 0.1));
    border-color: rgba(239, 68, 68, 0.3);
}

/* Progress bar styling */
.progress-bar {
    width: 100%;
    height: 8px;
    background-color: rgba(156, 163, 175, 0.3);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--orange-primary), var(--pink-primary));
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Result card styling */
.result-card {
    background: white;
    border: 1px solid rgba(229, 231, 235, 0.8);
    border-radius: 16px;
    padding: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.result-card:hover {
    box-shadow: 0 8px 25px rgba(234, 88, 12, 0.12);
    transform: translateY(-2px);
}

/* Comparison slider */
.image-comparison {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}

.image-comparison img {
    width: 100%;
    height: auto;
    display: block;
}

/* Stats styling */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.stat-item {
    text-align: center;
    padding: 12px;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.05), rgba(244, 63, 94, 0.05));
    border-radius: 8px;
    border: 1px solid rgba(249, 115, 22, 0.1);
}

.stat-value {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--orange-primary);
    display: block;
}

.stat-label {
    font-size: 0.75rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 4px;
}

/* Size comparison badges */
.size-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.size-badge.original {
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.1), rgba(75, 85, 99, 0.1));
    color: #374151;
    border: 1px solid rgba(107, 114, 128, 0.2);
}

.size-badge.compressed {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.1), rgba(244, 63, 94, 0.1));
    color: var(--orange-primary);
    border: 1px solid rgba(249, 115, 22, 0.2);
}

/* Download button styling */
.download-btn {
    background: linear-gradient(135deg, var(--orange-primary), var(--pink-primary));
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.3);
}

/* API Status indicator */
.api-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
}

.api-status.connected {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(16, 185, 129, 0.1));
    color: #059669;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.api-status.error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(220, 38, 38, 0.1));
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.api-status.testing {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.1), rgba(244, 63, 94, 0.1));
    color: var(--orange-primary);
    border: 1px solid rgba(249, 115, 22, 0.2);
}

/* Responsive design */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .result-card {
        padding: 16px;
    }

    .queue-item {
        padding: 12px;
    }
}

/* Animation classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

/* Ultra compression badge */
.ultra-compression-badge {
    background: linear-gradient(135deg, var(--orange-primary), var(--pink-primary));
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Quality indicator */
.quality-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
}

.quality-bar {
    flex: 1;
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
}

.quality-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--orange-primary), var(--pink-primary));
    border-radius: 2px;
    transition: width 0.3s ease;
}
