        /* Unified Box Styles */
        .unified-box {
            border: 3px dashed #d1d9e6;
            border-radius: 12px;
            background: white;
            transition: border-color 0.3s, background-color 0.3s;
            margin: 2rem auto;
            max-width: 900px;
            padding: 0 1rem;
        }
        
        .unified-box.dragover {
            border-color: #4a7bff;
            background-color: #f0f5ff;
        }
        
        .unified-content {
            padding: 3rem 2rem;
            text-align: center;
        }
        
        .unified-icon {
            font-size: 48px;
            margin-bottom: 15px;
            color: #6c757d;
        }
        
        .unified-title {
            font-size: 22px;
            font-weight: 600;
            margin-bottom: 10px;
            color: #212529;
        }
        
        .unified-subtitle {
            color: #6c757d;
            margin-bottom: 25px;
            max-width: 500px;
            margin-left: auto;
            margin-right: auto;
        }
        
        .unified-helper {
            font-size: 13px;
            color: #718096;
            margin-top: 8px;
        }
        
        .preview-grid-container {
            padding: 1.5rem;
            display: none;
        }
        
        /* Animation Settings Styles */
        .animation-settings {
            background: linear-gradient(135deg, #f8fafc, #f1f5f9);
            border-radius: 12px;
            padding: 1.5rem;
            margin: 1.5rem 0;
            border: 2px solid #e2e8f0;
            display: none;
        }
        
        .setting-row {
            display: flex;
            align-items: center;
            gap: 1rem;
            margin-bottom: 1rem;
            flex-wrap: wrap;
        }
        
        .setting-label {
            font-weight: 600;
            color: #2d3748;
            min-width: 150px;
        }
        
        .setting-control {
            flex: 1;
        }
        
        .slider-container {
            display: flex;
            align-items: center;
            gap: 1rem;
            flex: 1;
        }
        
        .slider-value {
            min-width: 40px;
            text-align: center;
            font-weight: 600;
            color: #4299e1;
        }
        
        input[type="range"] {
            width: 100%;
            height: 8px;
            -webkit-appearance: none;
            background: linear-gradient(90deg, #4299e1, #2b6cb0);
            border-radius: 4px;
            outline: none;
        }
        
        input[type="range"]::-webkit-slider-thumb {
            -webkit-appearance: none;
            width: 20px;
            height: 20px;
            background: white;
            border: 2px solid #4299e1;
            border-radius: 50%;
            cursor: pointer;
            box-shadow: 0 2px 6px rgba(0,0,0,0.2);
        }
        
        .conversion-mode-selector {
            display: flex;
            gap: 0.5rem;
            margin-bottom: 1rem;
        }
        
        .mode-btn {
            padding: 0.75rem 1.5rem;
            border: 2px solid #e2e8f0;
            background: white;
            color: #4a5568;
            border-radius: 8px;
            cursor: pointer;
            font-weight: 600;
            transition: all 0.3s;
            flex: 1;
            text-align: center;
        }
        
        .mode-btn.active {
            background: linear-gradient(135deg, #4299e1, #2b6cb0);
            color: white;
            border-color: #4299e1;
            box-shadow: 0 4px 12px rgba(66, 153, 225, 0.2);
        }
        
        .mode-btn:hover:not(.active) {
            border-color: #4299e1;
            background: #f0f7ff;
        }
        
        .mode-description {
            color: #718096;
            font-size: 0.9rem;
            margin-top: 0.5rem;
            padding: 0.75rem;
            background: #f8fafc;
            border-radius: 8px;
            border-left: 4px solid #4299e1;
        }
        
        /* Size Selection Styles */
        .size-presets {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
            gap: 0.5rem;
            margin-top: 0.5rem;
        }
        
        .size-preset-btn {
            padding: 0.5rem;
            border: 2px solid #e2e8f0;
            background: white;
            border-radius: 6px;
            cursor: pointer;
            font-size: 0.85rem;
            text-align: center;
            transition: all 0.2s;
        }
        
        .size-preset-btn:hover {
            border-color: #4299e1;
            background: #ebf8ff;
        }
        
        .size-preset-btn.active {
            border-color: #4299e1;
            background: #4299e1;
            color: white;
            font-weight: 600;
        }
        
        .size-preset-btn .size-desc {
            font-size: 0.7rem;
            color: #718096;
            margin-top: 0.25rem;
        }
        
        .size-preset-btn.active .size-desc {
            color: rgba(255, 255, 255, 0.9);
        }
        
        .custom-size-inputs {
            display: flex;
            gap: 0.5rem;
            margin-top: 0.5rem;
            align-items: center;
        }
        
        .custom-size-inputs input {
            flex: 1;
            padding: 0.5rem;
            border: 2px solid #e2e8f0;
            border-radius: 6px;
            font-size: 0.9rem;
        }
        
        .custom-size-inputs span {
            color: #718096;
            font-size: 0.9rem;
        }
        
        @media (max-width: 768px) {
            .unified-content {
                padding: 2rem 1rem;
            }
            
            .unified-box {
                margin: 1rem auto;
            }
            
            .setting-row {
                flex-direction: column;
                align-items: flex-start;
            }
            
            .setting-label {
                min-width: auto;
            }
            
            .conversion-mode-selector {
                flex-direction: column;
            }
            
            .size-presets {
                grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
            }
        }
        @keyframes spin {
        0% { transform: rotate(0deg); }
        100% { transform: rotate(360deg); }
    }
    
    .modern-button {
        position: relative;
        overflow: hidden;
    }
    
    .modern-button::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 0;
        height: 0;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.3);
        transform: translate(-50%, -50%);
        transition: width 0.6s, height 0.6s;
    }
    
    .modern-button:hover::before {
        width: 300px;
        height: 300px;
    }
    
    .upload-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
    }
    
    .convert-btn:hover {
        transform: translateY(-3px) scale(1.02);
        box-shadow: 0 8px 24px rgba(66, 153, 225, 0.5);
    }
    
    .download-btn:hover {
        transform: translateY(-2px);
    }
    
    #downloadBtn:hover {
        box-shadow: 0 6px 20px rgba(34, 197, 94, 0.5);
    }
    
    #downloadZipBtn:hover {
        box-shadow: 0 6px 20px rgba(139, 92, 246, 0.5);
        background: linear-gradient(135deg, #7c3aed, #6d28d9);
    }
    
    #downloadIndividualBtn:hover {
        box-shadow: 0 6px 20px rgba(34, 197, 94, 0.5);
    }
    
    .modern-button:active {
        transform: translateY(0);
    }
    
    #imageGrid::-webkit-scrollbar {
        width: 8px;
    }
    
    #imageGrid::-webkit-scrollbar-track {
        background: #f1f5f9;
        border-radius: 4px;
    }
    
    #imageGrid::-webkit-scrollbar-thumb {
        background: #cbd5e0;
        border-radius: 4px;
    }
    
    #imageGrid::-webkit-scrollbar-thumb:hover {
        background: #a0aec0;
    }
    
    #clearBtn:hover {
        background: #fee2e2;
        border-color: #fca5a5;
    }
    
    /* Sortable frames styling */
    .sortable-frame {
        transition: all 0.3s;
    }
    
    .sortable-frame:hover {
        border-color: #4299e1 !important;
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(66, 153, 225, 0.2);
    }
    
    .sortable-frame.dragging {
        opacity: 0.5;
    }
    
    .sortable-frame.over {
        border-color: #10b981 !important;
        transform: scale(1.05);
    }