/**
 * Image Compressor Styles
 */

.image-compressor-tool {
    max-width: 1200px;
    margin: 20px auto;
    padding: 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: white;
}

.tool-header {
    text-align: center;
    margin-bottom: 30px;
}

.tool-header h2 {
    margin: 0 0 10px 0;
    color: white;
    font-size: 32px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.tool-header p {
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    line-height: 1.5;
}

.compressor-container {
    display: grid;
    gap: 25px;
}

/* Upload Section */
.upload-section {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 25px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.upload-area {
    border: 3px dashed rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
    position: relative;
}

.upload-area:hover,
.upload-area.drag-over {
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.upload-area {
    cursor: pointer;
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.upload-content h3 {
    margin: 0 0 10px 0;
    color: white;
    font-size: 24px;
    font-weight: 600;
}

.upload-content p {
    margin: 0 0 5px 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
}

.upload-hint {
    font-size: 14px !important;
    color: rgba(255, 255, 255, 0.6) !important;
    margin-top: 10px !important;
}

/* Settings Section */
.settings-section {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 25px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.settings-section h3 {
    margin: 0 0 20px 0;
    color: white;
    font-size: 24px;
    font-weight: 600;
    text-align: center;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.setting-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.setting-item label {
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.quality-range {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
    -webkit-appearance: none;
}

.quality-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.quality-range::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.setting-input,
.setting-select {
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 8px;
    font-size: 14px;
    backdrop-filter: blur(10px);
}

.setting-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.setting-hint {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

/* Compression Presets */
.compression-presets {
    text-align: center;
}

.compression-presets h4 {
    margin: 0 0 15px 0;
    color: white;
    font-size: 18px;
    font-weight: 600;
}

.preset-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.preset-btn {
    padding: 10px 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.preset-btn:hover,
.preset-btn.active {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

/* Images Section */
.images-section {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 25px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.images-section h3 {
    margin: 0 0 20px 0;
    color: white;
    font-size: 24px;
    font-weight: 600;
    text-align: center;
}

.images-list {
    margin-bottom: 20px;
}

.no-images {
    text-align: center;
    padding: 40px;
    color: rgba(255, 255, 255, 0.6);
}

.image-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin-bottom: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.image-preview {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-info {
    flex: 1;
}

.image-name {
    color: white;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 5px;
}

.image-details {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.image-actions {
    flex-shrink: 0;
}

.remove-btn {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.remove-btn:hover {
    background: rgba(239, 68, 68, 0.3);
    transform: scale(1.1);
}

/* Batch Actions */
.batch-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.action-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.action-btn.primary {
    background: linear-gradient(135deg, #4ade80, #22c55e);
    color: white;
}

.action-btn.primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 222, 128, 0.3);
}

.action-btn.primary:disabled {
    background: rgba(255, 255, 255, 0.2);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.action-btn.secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.action-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Results Section */
.results-section {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 25px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.results-section h3 {
    margin: 0 0 20px 0;
    color: white;
    font-size: 24px;
    font-weight: 600;
    text-align: center;
}

.results-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.summary-item {
    text-align: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.summary-label {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 5px;
}

.summary-value {
    display: block;
    color: white;
    font-size: 24px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.results-list {
    margin-bottom: 25px;
}

.result-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin-bottom: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.result-preview {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.result-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.result-info {
    flex: 1;
}

.result-name {
    color: white;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 5px;
}

.result-stats {
    display: flex;
    gap: 10px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    align-items: center;
}

.original-size {
    color: rgba(255, 255, 255, 0.6);
}

.arrow {
    color: rgba(255, 255, 255, 0.5);
}

.compressed-size {
    color: #4ade80;
    font-weight: 600;
}

.saved {
    color: #fbbf24;
    font-weight: 600;
}

.result-actions {
    flex-shrink: 0;
}

.download-btn {
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #3b82f6;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.download-btn:hover {
    background: rgba(59, 130, 246, 0.3);
    transform: scale(1.1);
}

.download-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* Status Messages */
.status-messages {
    margin-top: 20px;
    padding: 15px;
    border-radius: 10px;
    font-weight: 600;
    text-align: center;
    display: none;
}

.status-messages.success {
    background: rgba(74, 222, 128, 0.2);
    border: 1px solid rgba(74, 222, 128, 0.3);
    color: #4ade80;
    display: block;
}

.status-messages.error {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    display: block;
}

.status-messages.info {
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #3b82f6;
    display: block;
}

/* Responsive Design */
@media (max-width: 768px) {
    .image-compressor-tool {
        margin: 10px;
        padding: 20px;
    }
    
    .settings-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .preset-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .preset-btn {
        width: 100%;
        max-width: 200px;
    }
    
    .batch-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .action-btn {
        width: 100%;
        max-width: 200px;
    }
    
    .results-summary {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .download-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .image-item,
    .result-item {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .image-preview,
    .result-preview {
        width: 80px;
        height: 80px;
    }
}

@media (max-width: 480px) {
    .tool-header h2 {
        font-size: 24px;
    }
    
    .upload-area {
        padding: 30px 20px;
    }
    
    .upload-icon {
        font-size: 36px;
    }
    
    .upload-content h3 {
        font-size: 20px;
    }
    
    .summary-value {
        font-size: 20px;
    }
} 