/**
 * WebP Converter Tool - Styles
 * Clean, modern, mobile-first responsive design
 */

/* Tool Container */
.tool-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Tool Header */
.tool-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 30px 20px;
    background: white;
    border-radius: 15px;
    color: #2c3e50;
    
}

.tool-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #667eea;
}

.tool-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 15px 0;
    color: #2c3e50;
}

.tool-description {
    font-size: 1.1rem;
    margin: 0;
    color: #6c757d;
    line-height: 1.6;
}

/* Section Cards */
.section-card {
    background: white;
    border-radius: 12px;
    margin-bottom: 25px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.section-card:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.section-header {
    background: #f8f9fa;
    padding: 20px 25px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-header i {
    color: #667eea;
    font-size: 1.2rem;
}

.section-header h2 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
    color: #2c3e50;
}

.preview-stats {
    margin-left: auto;
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 500;
}

.results-summary {
    margin-left: auto;
}

/* Upload Section */
.upload-area {
    padding: 40px 25px;
    text-align: center;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    margin: 25px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover,
.upload-area.drag-over {
    border-color: #667eea;
    background-color: #f8f9ff;
}

.upload-icon {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 15px;
}

.upload-content h3 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-weight: 600;
}

.upload-content p {
    margin: 10px 0;
    color: #6c757d;
}

.upload-info {
    font-size: 0.9rem;
    color: #6c757d;
    margin-top: 15px;
}

/* URL Upload */
.url-upload {
    padding: 0 25px 25px 25px;
    text-align: center;
}

.url-input {
    margin-top: 15px;
}

.input-group {
    display: flex;
    gap: 10px;
    max-width: 500px;
    margin: 0 auto;
}

.form-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Mode Selection */
.mode-selection {
    padding: 25px;
}

.mode-options {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.mode-btn {
    flex: 1;
    max-width: 300px;
    padding: 20px;
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.mode-btn:hover {
    border-color: #667eea;
    background-color: #f8f9ff;
}

.mode-btn.active {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.mode-btn i {
    font-size: 2rem;
    margin-bottom: 10px;
    display: block;
}

.mode-title {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.mode-btn small {
    opacity: 0.8;
    font-size: 0.9rem;
}

/* Settings Grid */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 25px;
}

.settings-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
}

.settings-card h3 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 1.2rem;
    font-weight: 600;
}

/* Control Groups */
.control-group {
    margin-bottom: 20px;
}

.control-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #495057;
}

.quality-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #dee2e6;
    outline: none;
    -webkit-appearance: none;
    margin-bottom: 10px;
}

.quality-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
}

.quality-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    border: none;
}

.quality-indicators {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #6c757d;
}

.form-select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: white;
    font-size: 1rem;
}

/* Checkbox Labels */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.95rem;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #667eea;
}

.checkbox-label i {
    color: #667eea;
    margin-left: 5px;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid #667eea;
    color: #667eea;
}

.btn-outline:hover {
    background: #667eea;
    color: white;
}

.btn-link {
    background: transparent;
    color: #667eea;
    text-decoration: underline;
    border: none;
    padding: 8px 0;
}

.btn-large {
    padding: 15px 30px;
    font-size: 1.1rem;
}

/* Conversion Actions */
.conversion-actions {
    text-align: center;
    padding: 25px;
    border-top: 1px solid #e9ecef;
}

/* Results Actions */
.results-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    padding: 25px;
    border-top: 1px solid #e9ecef;
    flex-wrap: wrap;
}

/* Image Grids */
.image-previews-grid,
.converted-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 25px;
}

/* Image Preview Cards */
.image-preview-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.image-preview-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.image-preview-header {
    padding: 15px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.image-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.image-size {
    font-size: 0.9rem;
    color: #6c757d;
}

.image-container {
    position: relative;
    padding: 15px;
    text-align: center;
    background: #f8f9fa;
}

.preview-image {
    max-width: 100%;
    max-height: 200px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.image-info {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #6c757d;
}

.image-format {
    background: #667eea;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Result Cards */
.result-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.result-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.result-header {
    padding: 15px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.result-name {
    font-weight: 600;
    color: #2c3e50;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    margin-right: 10px;
}

.result-size {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 500;
}

/* Comparison Section */
.result-comparison {
    display: flex;
    align-items: center;
    padding: 20px 15px;
    background: #f8f9fa;
    gap: 15px;
}

.comparison-item {
    flex: 1;
    text-align: center;
}

.comparison-image {
    width: 100%;
    max-width: 120px;
    max-height: 80px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 8px;
}

.comparison-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 4px;
}

.comparison-info {
    font-size: 0.8rem;
    color: #6c757d;
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 10px;
    display: inline-block;
}

.comparison-arrow {
    color: #667eea;
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* Result Stats */
.result-stats {
    padding: 15px;
    border-top: 1px solid #e9ecef;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.stat-item:last-child {
    margin-bottom: 0;
}

.stat-label {
    font-size: 0.9rem;
    color: #6c757d;
}

.stat-value {
    font-weight: 600;
    color: #2c3e50;
}

.stat-value.compression-positive {
    color: #28a745;
}

.stat-value.compression-negative {
    color: #dc3545;
}

/* Result Actions */
.result-actions {
    padding: 15px;
    border-top: 1px solid #e9ecef;
    text-align: center;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* Summary Stats */
.summary-stats {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 0 25px 20px 25px;
}

.summary-item {
    text-align: center;
}

.summary-label {
    display: block;
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 5px;
}

.summary-value {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    color: #2c3e50;
}

.summary-value.positive {
    color: #28a745;
}

.summary-value.negative {
    color: #dc3545;
}

/* Progress Section */
.progress-container {
    padding: 25px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    text-align: center;
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 5px;
}

.progress-details {
    text-align: center;
    color: #6c757d;
    font-size: 0.9rem;
}

/* Notification */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    max-width: 400px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    overflow: hidden;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.notification:not(.hidden) {
    transform: translateX(0);
}

.notification-content {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    gap: 12px;
}

.notification-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #6c757d;
    margin-left: auto;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .tool-container {
        padding: 15px;
    }
    
    .tool-header {
        padding: 20px 15px;
    }
    
    .tool-title {
        font-size: 2rem;
    }
    
    .mode-options {
        flex-direction: row;
        gap: 10px;
    }
    
    .mode-btn {
        padding: 15px 10px;
        font-size: 0.9rem;
    }
    
    .mode-btn i {
        font-size: 1.5rem;
    }
    
    .settings-grid {
        grid-template-columns: 1fr;
        padding: 20px;
    }
    
    .results-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .results-actions .btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .notification {
        left: 15px;
        right: 15px;
        max-width: none;
    }
}
