:root {
    --primary-color: #3B82F6;
    --secondary-color: #10B981;
    --accent-color: #8B5CF6;
    --text-color: #111827;
    --text-secondary: #4B5563;
    --text-tertiary: #6B7280;
    --bg-primary: #FFFFFF;
    --bg-secondary: #F9FAFB;
    --bg-tertiary: #F3F4F6;
    --border-color: #E5E7EB;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius-base: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;    
    --radius-2xl: 1.5rem;
    
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    
    --danger-color: #EF4444;
    --danger-light: #FCA5A5;
    --success-color: #10B981;
    --warning-color: #F59E0B;
    

    --brand-primary: var(--primary-color);
    --brand-secondary: var(--secondary-color);
    --text-primary: var(--text-color);
}

[data-theme="dark"] {
    --text-color: #F9FAFB;
    --text-secondary: #D1D5DB;
    --text-tertiary: #9CA3AF;
    --bg-primary: #111827;
    --bg-secondary: #1F2937;
    --bg-tertiary: #374151;
    --border-color: #374151;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
}

body {
    background: var(--bg-primary);
}

[data-theme="dark"] body {
    background: var(--bg-primary);
}

.tool-hero {
    margin-top: 0;
    padding: 120px 0 80px;
    position: relative;
    z-index: 2;
    background:  linear-gradient(135deg, var(--bg-primary) 0%, rgba(59, 130, 246, 0.1) 30%, rgba(16, 185, 129, 0.1) 70%, var(--bg-primary) 100%);
    overflow: hidden;
}

.tool-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(16, 185, 129, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(139, 92, 246, 0.05) 0%, transparent 50%);
}

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 3;
}

.hero-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    margin: 0 auto 30px auto;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 50%, var(--accent-color) 100%);
    border-radius: 50%;
    box-shadow: 
        0 15px 35px rgba(59, 130, 246, 0.4),
        0 0 0 10px rgba(59, 130, 246, 0.1),
        0 0 0 20px rgba(59, 130, 246, 0.05);
    transition: transform 0.3s ease;
}

.hero-icon:hover {
    transform: scale(1.05);
}

.hero-icon i {
    font-size: 2.5rem;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 50%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Calculator Main Section */
.calculator-main {
    padding: 80px 0;
    background: var(--bg-primary);
}

.calculator-container {
    max-width: 1000px;
    margin: 0 auto;
    background: var(--bg-primary);
    border-radius: var(--radius-2xl);
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

/* Calculator Tabs */
.calculator-tabs {
    display: flex;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}

.tab-button {
    flex: 1;
    padding: 1.25rem 1.5rem;
    border: none;
    background: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.tab-button:hover {
    background: var(--bg-primary);
    color: var(--primary-color);
}

.tab-button.active {
    background: var(--bg-primary);
    color: var(--primary-color);
    font-weight: 600;
}

.tab-button.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-color);
    border-radius: 3px 3px 0 0;
}

.calculator-card {
    padding: 2.5rem;
}

.input-section {
    display: none;
}

.input-section.active {
    display: block;
}

/* Upload Section */
.upload-section {
    margin-bottom: 2rem;
}

.upload-area {
    border: 3px dashed var(--border-color);
    border-radius: var(--radius-xl);
    padding: 3rem 2rem;
    text-align: center;
    background: var(--bg-secondary);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.upload-area:hover {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.05);
}

.upload-area.dragover {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.1);
    transform: scale(1.02);
}

.upload-content {
    position: relative;
    z-index: 2;
}

.upload-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
}

.upload-icon i {
    font-size: 2rem;
    color: white;
}

.upload-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.upload-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.upload-button {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
}

.supported-formats {
    padding: 0.75rem 1.5rem;
    background: var(--bg-primary);
    border-radius: var(--radius-base);
    display: inline-block;
    font-size: 0.875rem;
    color: var(--text-tertiary);
    border: 1px solid var(--border-color);
}

/* Image Controls */
.image-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Image Comparison Slider */
.image-comparison {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.image-comparison h3 {
    margin: 0 0 1.5rem 0;
    color: var(--text-color);
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
}

.comparison-container {
    width: 100%;
}

.comparison-viewer {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto 1.5rem;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.comparison-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.comparison-before,
.comparison-after {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    user-select: none;
    pointer-events: none;
}

.comparison-before {
    z-index: 1;
}

.comparison-after {
    z-index: 2;
    clip-path: inset(0 50% 0 0);
    transition: clip-path 0.1s ease-out;
}

.comparison-slider {
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    z-index: 10;
    cursor: ew-resize;
    transform: translateX(-50%);
}

.slider-line {
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 100%;
    background: var(--bg-primary);
    border: 1px solid var(--primary-color);
    transform: translateX(-50%);
    box-shadow: 
        0 0 0 1px rgba(59, 130, 246, 0.3),
        0 4px 8px rgba(0, 0, 0, 0.2);
}

.slider-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: 3px solid var(--bg-primary);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    cursor: ew-resize;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 
        0 4px 12px rgba(59, 130, 246, 0.4),
        0 0 0 2px rgba(59, 130, 246, 0.2);
    user-select: none;
}

.slider-handle:hover {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 
        0 6px 16px rgba(59, 130, 246, 0.5),
        0 0 0 3px rgba(59, 130, 246, 0.3);
}

.slider-handle:active {
    transform: translate(-50%, -50%) scale(1.05);
}

.slider-handle i {
    color: white;
    font-size: 0.9rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.comparison-labels {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    justify-content: space-between;
    z-index: 5;
    pointer-events: none;
}

.label-before,
.label-after {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-base);
    font-size: 0.8rem;
    font-weight: 500;
    backdrop-filter: blur(4px);
}

.label-after {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.label-after.visible {
    opacity: 1;
}

.comparison-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.info-section {
    background: var(--bg-primary);
    border-radius: var(--radius-base);
    padding: 1rem;
    border: 1px solid var(--border-color);
}

.info-section h4 {
    margin: 0 0 0.75rem 0;
    color: var(--text-color);
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 500;
    color: var(--text-color);
    font-size: 0.85rem;
}

.info-item span:last-child {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.85rem;
}

.info-item.savings span:last-child {
    color: var(--success-color);
    font-weight: 700;
}

/* Dark theme adjustments for slider */
[data-theme="dark"] .slider-line {
    background: var(--bg-primary);
    border-color: var(--primary-color);
}

[data-theme="dark"] .slider-handle {
    border-color: var(--bg-primary);
}

[data-theme="dark"] .label-before,
[data-theme="dark"] .label-after {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
}

/* Resize Controls */
.resize-controls {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.resize-controls h3 {
    margin: 0 0 1.5rem 0;
    color: var(--text-color);
    font-size: 1.2rem;
    font-weight: 600;
}

/* Method Toggle */
.resize-method {
    margin-bottom: 1.5rem;
}

.method-toggle {
    display: flex;
    background: var(--bg-primary);
    border-radius: var(--radius-base);
    padding: 0.25rem;
    border: 1px solid var(--border-color);
}

.method-button {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    background: none;
    color: var(--text-secondary);
    font-weight: 500;
    border-radius: var(--radius-base);
    cursor: pointer;
    transition: all 0.3s ease;
}

.method-button.active {
    background: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-sm);
}

/* Resize Modes */
.resize-mode {
    display: none;
}

.resize-mode.active {
    display: block;
}

/* Input Groups */
.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
    font-size: 0.9rem;
}

.input-group input[type="number"] {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    background: var(--bg-primary);
    color: var(--text-color);
    transition: all 0.3s ease;
}

.input-group input[type="number"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Percentage Input */
.percentage-input {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 0.875rem 1rem;
}

.percentage-input input[type="range"] {
    flex: 1;
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    outline: none;
    border: none;
    padding: 0;
}

.percentage-input input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.percentage-input input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: var(--shadow-sm);
}

.percentage-value {
    font-weight: 600;
    color: var(--primary-color);
    min-width: 50px;
    text-align: right;
}

/* Dimensions Inputs */
.dimensions-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

/* Aspect Ratio Control */
.aspect-ratio-control {
    margin-bottom: 1.5rem;
}

.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-color);
    font-weight: 500;
}

.checkbox-container input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-base);
    margin-right: 0.75rem;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-container input[type="checkbox"]:checked + .checkmark {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-container input[type="checkbox"]:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Quality Control */
.quality-control {
    margin-bottom: 1.5rem;
}

.quality-input {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 0.875rem 1rem;
    margin-bottom: 0.5rem;
}

.quality-input input[type="range"] {
    flex: 1;
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    outline: none;
    border: none;
    padding: 0;
}

.quality-input input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--warning-color);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.quality-input input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--warning-color);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: var(--shadow-sm);
}

.quality-value {
    font-weight: 600;
    color: var(--warning-color);
    min-width: 50px;
    text-align: right;
}

.quality-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

/* Output Format */
.output-format {
    margin-bottom: 1.5rem;
}

.output-format label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 500;
    color: var(--text-color);
    font-size: 0.9rem;
}

.format-buttons {
    display: flex;
    gap: 0.5rem;
}

.format-button {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-secondary);
    border-radius: var(--radius-base);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.format-button:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.format-button.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-sm);
}

/* Responsive Design for Comparison Slider */
@media (max-width: 768px) {
    .comparison-info {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .slider-handle {
        width: 36px;
        height: 36px;
    }
    
    .slider-handle i {
        font-size: 0.8rem;
    }
    
    .label-before,
    .label-after {
        font-size: 0.75rem;
        padding: 0.4rem 0.6rem;
    }
}

@media (max-width: 640px) {
    .comparison-viewer {
        max-width: 100%;
    }
    
    .slider-handle {
        width: 32px;
        height: 32px;
    }
    
    .comparison-labels {
        top: 8px;
        left: 8px;
        right: 8px;
    }
}

/* Responsive adjustments for input-section and children */
@media (max-width: 1024px) {
  .calculator-card {
    padding: 1.2rem;
  }
  .image-controls {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }
}

@media (max-width: 768px) {
  .calculator-card {
    padding: 0.5rem;
  }
  .input-section.active {
    padding: 0.5rem 0.2rem;
  }
  .resize-controls,
  .image-comparison {
    padding: 1rem 0.5rem;
  }
  .input-group,
  .percentage-input,
  .quality-input {
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.5rem 0.5rem;
  }
  .dimensions-inputs {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
}

@media (max-width: 480px) {
  .calculator-card {
    padding: 0.2rem;
  }
  .input-section.active {
    padding: 0.2rem 0.1rem;
  }
  .resize-controls,
  .image-comparison {
    padding: 0.5rem 0.1rem;
  }
  .input-group label {
    font-size: 0.85rem;
  }
  .percentage-value,
  .quality-value {
    min-width: 36px;
    font-size: 0.9rem;
  }
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.calculate-button,
.download-button,
.clear-button {
    padding: 1rem 2rem;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 150px;
    justify-content: center;
}

.calculate-button {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    box-shadow: var(--shadow-md);
}

.calculate-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.download-button {
    background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
    color: white;
    box-shadow: var(--shadow-md);
}

.download-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.clear-button {
    background: var(--bg-primary);
    color: var(--danger-color);
    border: 2px solid var(--danger-color);
}

.clear-button:hover {
    background: var(--danger-color);
    color: white;
    transform: translateY(-2px);
}

/* Coming Soon */
.coming-soon {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.coming-soon-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--text-tertiary), var(--text-secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
}

.coming-soon-icon i {
    font-size: 2rem;
    color: white;
}

.coming-soon h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.coming-soon p {
    font-size: 1rem;
    margin: 0;
}

/* Batch Processing Styles */
.batch-upload-section,
.format-upload-section {
    margin-bottom: 2rem;
}

.batch-upload-area,
.format-upload-area {
    border: 3px dashed var(--border-color);
    border-radius: var(--radius-xl);
    padding: 3rem 2rem;
    text-align: center;
    background: var(--bg-secondary);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.batch-upload-area:hover,
.format-upload-area:hover {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.05);
}

.batch-upload-area.dragover,
.format-upload-area.dragover {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.1);
    transform: scale(1.02);
}

.batch-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.batch-file-list {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    max-height: 400px;
    overflow-y: auto;
}

.batch-file-list h3 {
    margin: 0 0 1rem 0;
    color: var(--text-color);
    font-size: 1.1rem;
    font-weight: 600;
}

.file-list-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-primary);
    border-radius: var(--radius-base);
    border: 1px solid var(--border-color);
}

.file-thumbnail {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: var(--radius-base);
    flex-shrink: 0;
}

.file-details {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-weight: 500;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.9rem;
}

.file-size {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.file-remove {
    background: none;
    border: none;
    color: var(--danger-color);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: var(--radius-base);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.file-remove:hover {
    background: rgba(239, 68, 68, 0.1);
}

.batch-settings {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.batch-settings h3 {
    margin: 0 0 1.5rem 0;
    color: var(--text-color);
    font-size: 1.2rem;
    font-weight: 600;
}

.batch-resize-settings {
    margin-bottom: 1.5rem;
}

.batch-resize-controls {
    margin-top: 1rem;
}

.batch-resize-mode {
    display: none;
}

.batch-resize-mode.active {
    display: block;
}

.batch-action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.batch-progress {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    margin-top: 2rem;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.progress-header h4 {
    margin: 0;
    color: var(--text-color);
    font-size: 1.1rem;
}

.progress-text {
    font-weight: 600;
    color: var(--primary-color);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

/* Format Conversion Styles */
.format-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.format-original,
.format-conversion {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.format-original h3,
.format-conversion h3 {
    margin: 0 0 1.5rem 0;
    color: var(--text-color);
    font-size: 1.2rem;
    font-weight: 600;
}

.format-preview-container {
    text-align: center;
}

.format-preview-container img {
    max-width: 100%;
    max-height: 200px;
    border-radius: var(--radius-base);
    box-shadow: var(--shadow-md);
    margin-bottom: 1rem;
}

.format-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.format-selection {
    margin-bottom: 1.5rem;
}

.format-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.format-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.3s ease;
}

.format-option:hover {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.05);
}

.format-option.active {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.1);
    box-shadow: var(--shadow-sm);
}

.format-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: var(--radius-base);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.format-icon i {
    color: white;
    font-size: 1.2rem;
}

.format-details h4 {
    margin: 0 0 0.25rem 0;
    color: var(--text-color);
    font-size: 1rem;
    font-weight: 600;
}

.format-details p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.format-quality-control {
    margin-bottom: 1.5rem;
}

.format-result-preview {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.format-result-preview h4 {
    margin: 0 0 1rem 0;
    color: var(--text-color);
    font-size: 1.1rem;
    font-weight: 600;
}

.format-comparison {
    text-align: center;
}

.format-comparison canvas {
    max-width: 100%;
    max-height: 200px;
    border-radius: var(--radius-base);
    box-shadow: var(--shadow-md);
    margin-bottom: 1rem;
}

.format-result-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.format-action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

/* Responsive Design for New Sections */
@media (max-width: 1024px) {
    .batch-controls,
    .format-controls {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .batch-action-buttons,
    .format-action-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .batch-action-buttons button,
    .format-action-buttons button {
        width: 100%;
        max-width: 300px;
    }
    
    .format-options {
        gap: 0.75rem;
    }
    
    .format-option {
        padding: 0.75rem;
    }
}

@media (max-width: 640px) {
    .batch-upload-area,
    .format-upload-area {
        padding: 2rem 1rem;
    }
    
    .file-item {
        padding: 0.5rem;
    }
    
    .file-thumbnail {
        width: 32px;
        height: 32px;
    }
    
    .format-option {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
}

/* Comparison Slider Dragging Styles */
.comparison-slider.dragging .slider-handle {
    transform: translate(-50%, -50%) scale(1.05);
    box-shadow: 
        0 8px 20px rgba(59, 130, 246, 0.6),
        0 0 0 4px rgba(59, 130, 246, 0.4);
}

.comparison-slider.dragging .slider-line {
    box-shadow: 
        0 0 0 2px rgba(59, 130, 246, 0.5),
        0 6px 12px rgba(0, 0, 0, 0.3);
}

/* Prevent text selection during drag */
.comparison-slider.dragging,
.comparison-slider.dragging * {
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
}

/* Responsive adjustments for .action-buttons */
@media (max-width: 768px) {
  .action-buttons {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }
  .action-buttons button {
    width: 100%;
    max-width: 300px;
  }
}

@media (max-width: 480px) {
  .action-buttons {
    gap: 0.5rem;
    margin-top: 1rem;
  }
  .action-buttons button {
    padding: 0.75rem 1rem;
    font-size: 1rem;
  }
}
