/* Image Compressor Tool Styles */

/* Drop Zone Styles */
.drop-zone {
    border: 2px dashed #d1d5db;
    border-radius: 1rem;
    padding: 3rem 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    background: #f9fafb;
    position: relative;
    overflow: hidden;
}

.drop-zone:hover,
.drop-zone.drop-zone-active {
    border-color: #3b82f6;
    background: #eff6ff;
}

.drop-zone-active {
    transform: scale(1.02);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.1);
}

.drop-zone-content {
    position: relative;
    z-index: 2;
}

.drop-zone-icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1.5rem;
    color: #9ca3af;
    transition: color 0.3s ease;
}

.drop-zone:hover .drop-zone-icon,
.drop-zone-active .drop-zone-icon {
    color: #3b82f6;
}

.drop-zone-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.drop-zone-subtitle {
    color: #6b7280;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.drop-zone-button {
    background: #3b82f6;
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 0.75rem;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    margin-bottom: 1rem;
}

.drop-zone-button:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.drop-zone-info {
    color: #9ca3af;
    font-size: 0.875rem;
    margin-top: 1rem;
}

/* Image Card Styles */
.image-card {
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    padding: 1rem;
    transition: all 0.3s ease;
    background: #fafafa;
}

.image-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.image-card.selected {
    border-color: #3b82f6;
    background: #eff6ff;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.image-preview {
    width: 4rem;
    height: 4rem;
    border-radius: 0.5rem;
    object-fit: cover;
    border: 1px solid #e5e7eb;
}

.image-info {
    flex: 1;
    min-width: 0;
}

.image-name {
    font-weight: 600;
    color: #1f2937;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.image-details {
    color: #6b7280;
    font-size: 0.75rem;
}

.image-checkbox {
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 0.25rem;
    border: 2px solid #d1d5db;
    appearance: none;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.image-checkbox:checked {
    background: #3b82f6;
    border-color: #3b82f6;
}

.image-checkbox:checked::after {
    content: "";
    position: absolute;
    left: 3px;
    top: 0px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Format Option Styles */
.format-option {
    cursor: pointer;
}

.format-button {
    display: block;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.875rem;
    color: #6b7280;
    transition: all 0.2s ease;
    background: white;
}

.format-option input:checked + .format-button {
    border-color: #3b82f6;
    background: #eff6ff;
    color: #3b82f6;
}

.format-button:hover {
    border-color: #3b82f6;
}

/* Quality Slider Styles */
.quality-slider-container {
    position: relative;
    margin: 1rem 0;
}

.quality-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e5e7eb;
    outline: none;
    appearance: none;
    cursor: pointer;
}

.quality-slider::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #3b82f6;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 2px solid white;
    transition: all 0.2s ease;
}

.quality-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.quality-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #3b82f6;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.quality-markers {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
}

.quality-marker {
    font-size: 0.75rem;
    color: #9ca3af;
    font-weight: 500;
}

/* Preset Button Styles */
.preset-btn {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    background: white;
    color: #374151;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.preset-btn:hover {
    border-color: #3b82f6;
    background: #f8fafc;
    color: #3b82f6;
}

.preset-btn.active {
    border-color: #3b82f6;
    background: #eff6ff;
    color: #3b82f6;
}

/* Result Card Styles */
.result-card {
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    padding: 1.5rem;
    background: white;
    transition: all 0.3s ease;
}

.result-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.result-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.result-image-container {
    text-align: center;
}

.result-image {
    max-width: 100%;
    height: auto;
    max-height: 8rem;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    margin-bottom: 0.5rem;
}

.result-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.result-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
}

.result-stat {
    text-align: center;
}

.result-stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.result-stat-label {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
}

.compression-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
}

.compression-excellent {
    background: #dcfce7;
    color: #166534;
}
.compression-good {
    background: #dbeafe;
    color: #1d4ed8;
}
.compression-moderate {
    background: #fef3c7;
    color: #92400e;
}
.compression-minimal {
    background: #fee2e2;
    color: #dc2626;
}

/* Processing Overlay Styles */
#processingOverlay {
    display: none;
}

#processingOverlay.show {
    display: flex !important;
}

.processing-spinner {
    width: 3rem;
    height: 3rem;
    border: 3px solid #e5e7eb;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* 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 {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Status Indicators */
.status-processing {
    color: #3b82f6;
    background: #eff6ff;
}

.status-completed {
    color: #059669;
    background: #ecfdf5;
}

.status-error {
    color: #dc2626;
    background: #fef2f2;
}

.status-indicator {
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Download Button Styles */
.download-btn {
    background: #10b981;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.download-btn:hover {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .drop-zone {
        padding: 2rem 1rem;
    }

    .drop-zone-icon {
        width: 3rem;
        height: 3rem;
    }

    .drop-zone-title {
        font-size: 1.25rem;
    }

    .result-comparison {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .result-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .format-button {
        padding: 0.5rem;
        font-size: 0.75rem;
    }

    .preset-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
    }
}

/* Progress Bar Enhancements */
.progress-container {
    position: relative;
    background: #f3f4f6;
    border-radius: 0.5rem;
    overflow: hidden;
    height: 0.5rem;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    border-radius: 0.5rem;
    transition: width 0.3s ease;
    position: relative;
}

.progress-bar::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Tooltip Styles */
.tooltip {
    position: relative;
    cursor: help;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 10;
}

.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
    bottom: calc(100% + 0.5rem);
}
