/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Navigation Bar Styles */
.top-nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.back-home-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.back-home-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    text-decoration: none;
    color: white;
}

.nav-title {
    font-weight: 600;
    color: #2d3748;
    font-size: 16px;
}

@media (max-width: 768px) {
    .nav-container {
        padding: 12px 15px;
    }
    
    .back-home-btn span {
        display: none;
    }
    
    .nav-title {
        font-size: 14px;
    }
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #2d3748;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 40px;
    background: rgba(255, 255, 255, 0.95);
    padding: 40px 30px;
    border-radius: 24px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.brand-info {
    margin-bottom: 25px;
}

.brand-label {
    display: inline-block;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    margin-bottom: 10px;
    position: relative;
    overflow: hidden;
}

.brand-label::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.6s;
}

.brand-label:hover::before {
    left: 100%;
}

.brand-text {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.brand-tagline {
    display: block;
    font-size: 0.85rem;
    opacity: 0.9;
    font-weight: 400;
    margin-top: 2px;
}

.header-badges {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.badge {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(102, 126, 234, 0.2);
    transition: all 0.3s ease;
}

.badge:hover {
    background: rgba(102, 126, 234, 0.2);
    transform: translateY(-2px);
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.logo i {
    font-size: 2.5rem;
    color: #667eea;
}

.logo h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.1rem;
    color: #64748b;
    font-weight: 400;
}

/* Upload Section */
.upload-section {
    margin-bottom: 40px;
}

.upload-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    align-items: start;
}

.upload-area {
    border: 3px dashed #cbd5e0;
    border-radius: 24px;
    padding: 50px 30px;
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.upload-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: #667eea;
    background: rgba(255, 255, 255, 0.98);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 20px 50px rgba(102, 126, 234, 0.2);
}

.upload-area:hover::before,
.upload-area.dragover::before {
    opacity: 1;
}

.upload-icon-container {
    position: relative;
    display: inline-block;
    margin-bottom: 25px;
}

.upload-icon {
    font-size: 5rem;
    color: #667eea;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.upload-area:hover .upload-icon {
    transform: scale(1.1);
    color: #5a67d8;
}

.upload-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    border: 2px solid #667eea;
    border-radius: 50%;
    opacity: 0.3;
    animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0.3;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.4);
        opacity: 0;
    }
}

.upload-content h2 {
    font-size: 2rem;
    margin-bottom: 12px;
    color: #2d3748;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.upload-subtitle {
    font-size: 1.2rem;
    color: #64748b;
    margin-bottom: 30px;
    line-height: 1.5;
}

.browse-link {
    color: #667eea;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
    padding: 2px 4px;
    border-radius: 4px;
}

.browse-link:hover {
    color: #5a67d8;
    background: rgba(102, 126, 234, 0.1);
    border-bottom-color: #667eea;
}

.upload-features {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 35px;
    flex-wrap: wrap;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: rgba(102, 126, 234, 0.08);
    border-radius: 25px;
    color: #2d3748;
    font-weight: 500;
    font-size: 0.9rem;
    border: 1px solid rgba(102, 126, 234, 0.2);
    transition: all 0.3s ease;
}

.feature-item:hover {
    background: rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.feature-item i {
    color: #667eea;
    font-size: 1rem;
}

.upload-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.btn-upload {
    padding: 16px 32px;
    font-size: 1.1rem;
    border-radius: 16px;
    min-width: 200px;
}

.upload-divider {
    position: relative;
    width: 100%;
    text-align: center;
    margin: 10px 0;
}

.upload-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e2e8f0, transparent);
}

.upload-divider span {
    background: white;
    padding: 0 20px;
    color: #64748b;
    font-weight: 600;
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
}

.paste-area {
    padding: 20px 30px;
    border: 2px dashed #e2e8f0;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 250px;
}

.paste-area:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.paste-area i {
    font-size: 1.5rem;
    color: #667eea;
    margin-bottom: 8px;
    display: block;
}

.paste-area span {
    display: block;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 4px;
}

.paste-area small {
    color: #64748b;
    font-size: 0.8rem;
}

/* Upload Progress */
.upload-progress {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(10px);
}

.progress-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    font-size: 1.2rem;
    font-weight: 600;
    color: #2d3748;
}

.progress-header i {
    color: #667eea;
    font-size: 1.5rem;
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.progress-bar-container {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
    max-width: 400px;
    margin-bottom: 15px;
}

.progress-bar {
    flex: 1;
    height: 12px;
    background: #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #48bb78, #38a169);
    border-radius: 6px;
    transition: width 0.3s ease;
}

.progress-text {
    font-weight: 700;
    color: #2d3748;
    min-width: 45px;
}

.upload-details {
    color: #64748b;
    font-style: italic;
    text-align: center;
}

/* Upload Tips */
.upload-tips {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 25px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.tips-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.tips-header i {
    color: #f59e0b;
    font-size: 1.2rem;
}

.tips-header h4 {
    color: #2d3748;
    font-weight: 600;
    font-size: 1.1rem;
}

.tips-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.tip-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
}

.tip-item:last-child {
    border-bottom: none;
}

.tip-item i {
    color: #667eea;
    font-size: 1.1rem;
    min-width: 20px;
}

.tip-item span {
    color: #4a5568;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Controls Section */
.controls-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.controls-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
}

.controls-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 10px;
}

.uploaded-count {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.9rem;
}

.controls-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.control-group label {
    font-weight: 600;
    color: #2d3748;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.control-group label i {
    color: #667eea;
}

/* Range Input Styles */
.range-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

input[type="range"] {
    flex: 1;
    height: 8px;
    border-radius: 4px;
    background: #e2e8f0;
    outline: none;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(45deg, #667eea, #764ba2);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(45deg, #667eea, #764ba2);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
}

.range-value {
    background: #f7fafc;
    padding: 5px 12px;
    border-radius: 12px;
    font-weight: 600;
    color: #667eea;
    border: 2px solid #e2e8f0;
    min-width: 60px;
    text-align: center;
}

/* Input Styles */
input[type="number"],
select {
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: white;
}

input[type="number"]:focus,
select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.size-info {
    font-size: 0.8rem;
    color: #64748b;
    font-style: italic;
}

/* Resize Options */
.resize-inputs {
    margin-top: 10px;
}

.resize-percentage input,
.resize-dimensions input {
    margin-bottom: 8px;
}

.resize-dimensions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
}

.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 8px;
    font-weight: 400 !important;
    grid-column: 1 / -1;
    margin-top: 5px;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
}

/* Button Styles */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.85rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
}

.btn-secondary {
    background: #f7fafc;
    color: #2d3748;
    border: 2px solid #e2e8f0;
}

.btn-secondary:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
}

.btn-success {
    background: linear-gradient(45deg, #48bb78, #38a169);
    color: white;
}

.btn-outline {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-outline:hover {
    background: #667eea;
    color: white;
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.1rem;
}

.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Presets Section */
.presets-section {
    margin-bottom: 30px;
    padding: 25px;
    background: linear-gradient(145deg, #f8faff, #f0f4ff);
    border-radius: 16px;
    border: 1px solid #e2e8f0;
}

.presets-section h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.presets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.preset-btn {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.preset-btn:hover {
    border-color: #667eea;
    background: linear-gradient(145deg, #ffffff, #f8faff);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
}

.preset-btn.active {
    border-color: #667eea;
    background: linear-gradient(145deg, #667eea, #764ba2);
    color: white;
}

.preset-btn i {
    font-size: 1.5rem;
    color: #667eea;
    margin-bottom: 5px;
}

.preset-btn.active i {
    color: white;
}

.preset-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: #2d3748;
}

.preset-btn.active .preset-title {
    color: white;
}

.preset-desc {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 400;
}

.preset-btn.active .preset-desc {
    color: rgba(255, 255, 255, 0.9);
}

/* Recommendations Section */
.recommendations-section {
    margin-bottom: 25px;
}

.recommendation-card {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 20px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.recommendation-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulse 3s ease-in-out infinite;
}

.recommendation-icon {
    font-size: 2rem;
    opacity: 0.9;
    z-index: 1;
}

.recommendation-content {
    z-index: 1;
}

.recommendation-content h4 {
    margin-bottom: 8px;
    font-size: 1.1rem;
    font-weight: 600;
}

.recommendation-content p {
    margin-bottom: 15px;
    opacity: 0.9;
    line-height: 1.5;
}

/* Image Statistics */
.image-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.stat-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.stat-card i {
    font-size: 1.5rem;
    color: #667eea;
    background: linear-gradient(145deg, #f8faff, #f0f4ff);
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 2px;
}

.stat-label {
    font-size: 0.85rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Preview Section */
.preview-section,
.processing-section,
.results-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.preview-header,
.processing-header,
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
}

.preview-header h3,
.processing-header h3,
.results-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 10px;
}

.preview-controls {
    display: flex;
    gap: 20px;
    align-items: center;
}

.view-toggle {
    display: flex;
    gap: 5px;
    background: #f7fafc;
    padding: 4px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.selection-controls {
    display: flex;
    gap: 10px;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.preview-item {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    position: relative;
    border: 2px solid transparent;
    overflow: hidden;
}

.preview-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(145deg, transparent, rgba(102, 126, 234, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.preview-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.15);
}

.preview-item:hover::before {
    opacity: 1;
}

.preview-item.selected {
    border-color: #667eea;
    background: linear-gradient(145deg, #f8faff, #f0f4ff);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.2);
}

.preview-item.selected::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}

.preview-checkbox {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
}

.preview-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #667eea;
}

.preview-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
}

.preview-info {
    font-size: 0.85rem;
    color: #64748b;
}

.preview-name {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.preview-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.preview-size {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.size-badge,
.dimension-badge,
.savings-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
}

.size-badge {
    background: linear-gradient(145deg, #e6fffa, #b2f5ea);
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.dimension-badge {
    background: linear-gradient(145deg, #eff6ff, #dbeafe);
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.savings-badge {
    background: linear-gradient(145deg, #fef3e2, #fed7aa);
    color: #9a3412;
    border: 1px solid #fdba74;
}

.final-size-badge {
    background: linear-gradient(145deg, #f0fdf4, #dcfce7);
    color: #166534;
    border: 1px solid #bbf7d0;
}

.preview-estimate {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.selected-info {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 16px;
    font-weight: 600;
    font-size: 1.1rem;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* Progress Styles */
.progress-container {
    margin-bottom: 20px;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(45deg, #48bb78, #38a169);
    transition: width 0.3s ease;
    border-radius: 10px;
}

.progress-text {
    text-align: center;
    font-weight: 600;
    color: #2d3748;
}

.processing-details {
    text-align: center;
    color: #64748b;
    font-style: italic;
}

/* Results Stats */
.results-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-item {
    text-align: center;
    padding: 20px;
    background: linear-gradient(145deg, #f8faff, #f0f4ff);
    border-radius: 12px;
    border: 2px solid #e2e8f0;
}

.stat-item i {
    font-size: 2rem;
    color: #667eea;
    margin-bottom: 10px;
    display: block;
}

.stat-number {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.download-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.loading-spinner {
    text-align: center;
    color: #667eea;
}

.loading-spinner i {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

.loading-spinner p {
    font-size: 1.1rem;
    font-weight: 600;
}

/* Footer */
.footer {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 24px 24px 0 0;
    margin-top: 60px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: 40px;
    padding: 40px;
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
}

.footer-brand h3 {
    color: #2d3748;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-brand p {
    color: #64748b;
    line-height: 1.6;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.footer-section h4 {
    color: #2d3748;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-section h4::before {
    content: '';
    width: 4px;
    height: 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 2px;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section li {
    color: #64748b;
    margin-bottom: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 4px 0;
}

.footer-section li:hover {
    color: #667eea;
    padding-left: 8px;
}

.footer-bottom {
    text-align: center;
    padding: 25px 40px;
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header {
        padding: 20px;
        margin-bottom: 30px;
    }
    
    .logo h1 {
        font-size: 2rem;
    }
    
    .upload-area {
        padding: 40px 15px;
    }
    
    .upload-icon {
        font-size: 3rem;
    }
    
    .upload-content h2 {
        font-size: 1.5rem;
    }
    
    .controls-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .controls-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .preview-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .preview-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .action-buttons,
    .download-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .results-stats {
        grid-template-columns: 1fr;
    }
    
    .resize-dimensions {
        grid-template-columns: 1fr;
    }
    
    .presets-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
    
    .preset-btn {
        padding: 15px;
    }
    
    .image-stats {
        grid-template-columns: 1fr;
    }
    
    .preview-controls {
        flex-direction: column;
        gap: 15px;
    }
    
    .view-toggle,
    .selection-controls {
        justify-content: center;
    }
    
    .recommendation-card {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .upload-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .upload-area {
        padding: 40px 20px;
    }
    
    .upload-icon {
        font-size: 4rem;
    }
    
    .upload-content h2 {
        font-size: 1.7rem;
    }
    
    .upload-features {
        flex-direction: column;
        gap: 15px;
    }
    
    .feature-item {
        justify-content: center;
    }
    
    .paste-area {
        min-width: auto;
        width: 100%;
    }
    
    .header-badges {
        flex-direction: column;
        align-items: center;
    }
    
    .badge {
        width: 100%;
        max-width: 250px;
        text-align: center;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 30px 20px;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .footer-bottom {
        padding: 20px;
        font-size: 0.8rem;
    }
    
    .brand-text {
        font-size: 1rem;
    }
    
    .brand-tagline {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .logo {
        flex-direction: column;
        gap: 10px;
    }
    
    .logo h1 {
        font-size: 1.8rem;
    }
    
    .preview-grid {
        grid-template-columns: 1fr;
    }
    
    .controls-section,
    .preview-section,
    .processing-section,
    .results-section {
        padding: 20px;
    }
}

/* Animation Keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.preview-item {
    animation: fadeInUp 0.3s ease;
}

.upload-area.dragover .upload-icon {
    animation: pulse 0.5s ease-in-out infinite;
}