/* Image Conversion Tool Styles */
.image-conversion-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.subtitle {
    text-align: center;
    color: var(--muted);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    line-height: 1.5;
}

/* Format Info Section */
.format-info {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(38, 105, 105, 0.1);
}

.format-info h3 {
    margin: 0 0 1rem 0;
    color: var(--accent);
    font-size: 1.1rem;
}

.format-categories {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.format-category {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.category-title {
    font-weight: 600;
    color: var(--text);
    min-width: 80px;
    font-size: 0.95rem;
}

.format-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.format-badge {
    background: linear-gradient(135deg, var(--accent), #1a5858);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(38, 105, 105, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.format-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(38, 105, 105, 0.3);
}

.format-badge.popular {
    background: linear-gradient(135deg, var(--accent-strong), #0056b3);
    box-shadow: 0 2px 8px rgba(0, 120, 215, 0.2);
}

/* Upload Section */
.upload-section {
    margin-bottom: 2rem;
}

.upload-area {
    border: 3px dashed var(--accent);
    border-radius: var(--radius);
    padding: 3rem 2rem;
    text-align: center;
    background: var(--surface);
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover {
    border-color: var(--accent-strong);
    background: rgba(38, 105, 105, 0.02);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(38, 105, 105, 0.1);
}

.upload-area.dragover {
    border-color: var(--accent-strong);
    background: rgba(0, 120, 215, 0.05);
    box-shadow: 0 8px 32px rgba(0, 120, 215, 0.15);
}

.upload-content h3 {
    color: var(--accent);
    margin: 1rem 0 0.5rem 0;
    font-size: 1.4rem;
}

.upload-content p {
    color: var(--muted);
    margin: 0.5rem 0;
    line-height: 1.5;
}

.upload-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    color: var(--accent);
}

.upload-icon svg {
    width: 100%;
    height: 100%;
}

.supported-formats {
    font-weight: 600;
    color: var(--accent) !important;
}

.upload-limits {
    font-size: 0.9rem;
    color: var(--muted) !important;
}

.browse-btn {
    background: linear-gradient(135deg, var(--accent), #1a5858);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(38, 105, 105, 0.2);
}

.browse-btn:hover {
    background: linear-gradient(135deg, #1a5858, var(--accent));
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(38, 105, 105, 0.3);
}

/* Settings Section */
.settings-section {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(38, 105, 105, 0.1);
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.settings-header h3 {
    margin: 0;
    color: var(--accent);
    font-size: 1.3rem;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.setting-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.setting-group label {
    font-weight: 600;
    color: var(--text);
    font-size: 0.95rem;
}

.setting-input {
    padding: 0.7rem;
    border: 2px solid #e1e1e1;
    border-radius: 8px;
    font-size: 0.95rem;
    background: white;
    color: var(--text);
    transition: border-color 0.3s ease;
}

.setting-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(38, 105, 105, 0.1);
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.setting-slider {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: #e1e1e1;
    outline: none;
    -webkit-appearance: none;
}

.setting-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(38, 105, 105, 0.3);
}

.setting-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(38, 105, 105, 0.3);
}

.slider-value {
    min-width: 50px;
    text-align: right;
    font-weight: 600;
    color: var(--accent);
}

.resize-inputs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.resize-inputs input {
    padding: 0.5rem;
    border: 2px solid #e1e1e1;
    border-radius: 6px;
    width: 80px;
    text-align: center;
    font-size: 0.9rem;
}

.resize-inputs span {
    display: flex;
    align-items: center;
    color: var(--muted);
    font-size: 0.9rem;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.95rem;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
}

.checkbox-label input[type="checkbox"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.checkbox-text {
    color: var(--text);
}

/* Buttons */
.conversion-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary, .btn-secondary {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 48px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-strong), #0056b3);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 120, 215, 0.2);
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #0056b3, var(--accent-strong));
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 120, 215, 0.3);
}

.btn-primary:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: white;
    color: var(--accent);
    border: 2px solid var(--accent);
    box-shadow: 0 2px 8px rgba(38, 105, 105, 0.1);
}

.btn-secondary:hover {
    background: var(--accent);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(38, 105, 105, 0.2);
}

.btn-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* File List Section */
.file-list-section {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(38, 105, 105, 0.1);
}

.file-list-section h3 {
    margin: 0 0 1rem 0;
    color: var(--accent);
    font-size: 1.2rem;
}

.file-list {
    display: grid;
    gap: 1rem;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #e1e1e1;
    transition: all 0.3s ease;
}

.file-item:hover {
    border-color: var(--accent);
    box-shadow: 0 2px 8px rgba(38, 105, 105, 0.1);
}

.file-preview {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    object-fit: cover;
    border: 2px solid #e1e1e1;
}

.file-info {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-weight: 600;
    color: var(--text);
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-details {
    color: var(--muted);
    font-size: 0.85rem;
    margin-top: 0.2rem;
}

.file-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-small {
    padding: 0.4rem 0.8rem;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-remove {
    background: #ff4757;
    color: white;
}

.btn-remove:hover {
    background: #ff3838;
}

/* Progress Section */
.progress-section {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(38, 105, 105, 0.1);
}

.progress-section h3 {
    margin: 0 0 1.5rem 0;
    color: var(--accent);
    font-size: 1.3rem;
}

.overall-progress {
    margin-bottom: 1rem;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: #e1e1e1;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-strong));
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 6px;
}

.progress-text {
    font-weight: 600;
    color: var(--accent);
    font-size: 0.95rem;
}

.current-file {
    color: var(--muted);
    font-size: 0.9rem;
    margin-top: 0.5rem;
    font-style: italic;
}

/* Results Section */
.results-section {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border-radius: var(--radius);
    padding: 2rem;
    border: 2px solid #22c55e;
}

.results-header {
    text-align: center;
    margin-bottom: 2rem;
}

.results-header h3 {
    margin: 0 0 1rem 0;
    color: #15803d;
    font-size: 1.5rem;
}

.results-summary {
    color: #166534;
    font-size: 1rem;
    line-height: 1.5;
}

.download-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.converted-files {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.converted-file-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #22c55e;
}

.converted-preview {
    width: 50px;
    height: 50px;
    border-radius: 6px;
    object-fit: cover;
}

.converted-info {
    flex: 1;
}

.converted-name {
    font-weight: 600;
    color: #15803d;
    font-size: 0.95rem;
}

.converted-details {
    color: #166534;
    font-size: 0.85rem;
    margin-top: 0.2rem;
}

.btn-download {
    background: #22c55e;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-download:hover {
    background: #16a34a;
    transform: translateY(-1px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .image-conversion-main {
        padding: 1rem 0.5rem;
    }
    
    .format-categories {
        gap: 1.5rem;
    }
    
    .format-category {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .settings-grid {
        grid-template-columns: 1fr;
    }
    
    .settings-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .conversion-actions,
    .download-actions {
        flex-direction: column;
    }
    
    .file-item,
    .converted-file-item {
        flex-direction: column;
        text-align: center;
    }
    
    .file-info,
    .converted-info {
        text-align: center;
    }
    
    .upload-area {
        padding: 2rem 1rem;
    }
    
    .resize-inputs {
        justify-content: center;
    }
}
