/* Image Compressor Specific Styles */

.tool-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}

.tool-header {
    text-align: center;
    margin-bottom: 30px;
}

.tool-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.tool-header p {
    color: #6b7280;
    font-size: 1.1rem;
}

/* Upload Card */
.upload-card {
    background: white;
    border-radius: 30px;
    border: 1px solid #e5e7eb;
    padding: 30px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.dark-mode .upload-card {
    background: #1f2937;
    border-color: #374151;
}

.upload-area {
    border: 2px dashed #e5e7eb;
    border-radius: 30px;
    padding: 60px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.upload-area:hover {
    border-color: #3b82f6;
    background: #f9fafb;
}

.dark-mode .upload-area:hover {
    background: #2d3748;
}

.upload-area i {
    font-size: 4rem;
    color: #3b82f6;
    margin-bottom: 15px;
}

.upload-area h3 {
    font-size: 1.3rem;
    margin-bottom: 8px;
    color: #111827;
}

.dark-mode .upload-area h3 {
    color: #f9fafb;
}

.upload-area p {
    color: #6b7280;
    margin-bottom: 5px;
}

.upload-area .supported-formats {
    font-size: 0.85rem;
    color: #9ca3af;
}

/* File Info */
.file-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f9fafb;
    border-radius: 20px;
    padding: 20px;
}

.dark-mode .file-info {
    background: #111827;
}

.file-details {
    display: flex;
    align-items: center;
    gap: 15px;
}

.file-details i {
    font-size: 2rem;
    color: #3b82f6;
}

.file-name {
    font-size: 1rem;
    font-weight: 500;
    color: #111827;
    margin-bottom: 5px;
}

.dark-mode .file-name {
    color: #f9fafb;
}

.file-size {
    font-size: 0.85rem;
    color: #6b7280;
}

.change-file-btn {
    padding: 10px 20px;
    background: #e5e7eb;
    border: none;
    border-radius: 60px;
    color: #111827;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dark-mode .change-file-btn {
    background: #374151;
    color: #f9fafb;
}

.change-file-btn:hover {
    background: #3b82f6;
    color: white;
}

/* Settings Card */
.settings-card {
    background: white;
    border-radius: 30px;
    border: 1px solid #e5e7eb;
    padding: 30px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.dark-mode .settings-card {
    background: #1f2937;
    border-color: #374151;
}

.settings-card h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: #111827;
}

.dark-mode .settings-card h3 {
    color: #f9fafb;
}

.setting-group {
    margin-bottom: 25px;
}

.setting-group label {
    display: block;
    margin-bottom: 10px;
    color: #111827;
    font-weight: 500;
}

.dark-mode .setting-group label {
    color: #f9fafb;
}

/* Quality Slider */
.quality-slider-container {
    margin-bottom: 10px;
}

#qualitySlider {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    background: linear-gradient(to right, #3b82f6, #ef4444);
    border-radius: 3px;
    outline: none;
}

#qualitySlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: white;
    border: 2px solid #3b82f6;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

#qualitySlider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.quality-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    color: #6b7280;
    font-size: 0.9rem;
}

.quality-value {
    font-weight: 600;
    color: #3b82f6;
}

/* Width Select */
.width-select {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 60px;
    font-size: 1rem;
    background: white;
    color: #111827;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 20px center;
    background-size: 16px;
}

.dark-mode .width-select {
    background: #1f2937;
    border-color: #374151;
    color: #f9fafb;
}

/* Format Options */
.format-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.format-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 60px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dark-mode .format-option {
    background: #111827;
    border-color: #374151;
}

.format-option:hover {
    border-color: #3b82f6;
}

.format-option input[type="radio"] {
    accent-color: #3b82f6;
    width: 18px;
    height: 18px;
}

.format-label {
    color: #111827;
    font-size: 0.95rem;
}

.dark-mode .format-label {
    color: #f9fafb;
}

/* Compress Button */
.compress-btn {
    width: 100%;
    padding: 16px 30px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 60px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.compress-btn:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px #3b82f6;
}

.compress-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Loading */
.loading {
    text-align: center;
    padding: 40px;
    background: #f9fafb;
    border-radius: 30px;
    margin-bottom: 20px;
}

.dark-mode .loading {
    background: #111827;
}

.spinner {
    border: 4px solid #f3f4f6;
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 20px;
}

.progress-fill {
    height: 100%;
    background: #3b82f6;
    width: 0%;
    transition: width 0.3s ease;
}

/* Preview Card */
.preview-card {
    background: white;
    border-radius: 30px;
    border: 1px solid #e5e7eb;
    padding: 30px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    animation: fadeIn 0.5s ease;
}

.dark-mode .preview-card {
    background: #1f2937;
    border-color: #374151;
}

.preview-card h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: #10b981;
    text-align: center;
}

.preview-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    align-items: center;
    margin-bottom: 25px;
}

.preview-box {
    text-align: center;
}

.preview-label {
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 10px;
}

.preview-image {
    max-width: 100%;
    max-height: 200px;
    border-radius: 16px;
    border: 2px solid #e5e7eb;
    background: #f9fafb;
}

.dark-mode .preview-image {
    border-color: #374151;
    background: #111827;
}

.preview-size {
    margin-top: 10px;
    font-size: 0.85rem;
    color: #6b7280;
}

.preview-arrow i {
    font-size: 2rem;
    color: #3b82f6;
}

/* Compression Stats */
.compression-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 25px;
    padding: 20px;
    background: #f9fafb;
    border-radius: 20px;
}

.dark-mode .compression-stats {
    background: #111827;
}

.stat-item {
    text-align: center;
}

.stat-label {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: 600;
    color: #111827;
}

.dark-mode .stat-value {
    color: #f9fafb;
}

/* Download Options */
.download-options {
    display: flex;
    gap: 10px;
}

.download-btn {
    flex: 2;
    padding: 16px;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 60px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.download-btn:hover {
    background: #059669;
    transform: translateY(-2px);
}

.new-btn {
    flex: 1;
    padding: 16px;
    background: #f3f4f6;
    color: #111827;
    border: 1px solid #e5e7eb;
    border-radius: 60px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dark-mode .new-btn {
    background: #374151;
    color: #f9fafb;
    border-color: #4b5563;
}

.new-btn:hover {
    background: #e5e7eb;
}

.dark-mode .new-btn:hover {
    background: #4b5563;
}

/* Info Section */
.info-section {
    background: #f9fafb;
    border-radius: 30px;
    padding: 30px;
    margin: 30px 0;
    border: 1px solid #e5e7eb;
}

.dark-mode .info-section {
    background: #111827;
    border-color: #374151;
}

.info-section h3 {
    font-size: 1.3rem;
    margin: 20px 0 15px;
    color: #111827;
}

.dark-mode .info-section h3 {
    color: #f9fafb;
}

.info-section h3:first-child {
    margin-top: 0;
}

.info-section p {
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 15px;
}

.dark-mode .info-section p {
    color: #9ca3af;
}

.info-section ul {
    list-style: none;
    padding: 0;
}

.info-section ul li {
    padding: 8px 0;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dark-mode .info-section ul li {
    color: #9ca3af;
}

.info-section .note {
    margin-top: 20px;
    padding: 15px;
    background: #f3f4f6;
    border-radius: 60px;
    font-size: 0.9rem;
    border: 1px solid #e5e7eb;
}

.dark-mode .info-section .note {
    background: #1f2937;
    border-color: #374151;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .tool-header h1 {
        font-size: 2rem;
    }
    
    .preview-container {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .preview-arrow {
        transform: rotate(90deg);
    }
    
    .compression-stats {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .download-options {
        flex-direction: column;
    }
    
    .format-options {
        grid-template-columns: 1fr;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}