:root {
    --primary: #4361ee;
    --secondary: #4cc9f0;
    --success: #2ecc71;
    --danger: #e74c3c;
    --light: #f8f9fa;
    --dark: #1a1a2e;
    --gray: #6c757d;
}

.container {
    max-width: 1200px;
    margin: 0px auto;
    padding: 2rem;
    border-radius: 12px;
    background: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.upload-area {
    border: 2px dashed #d1d5db;
    border-radius: 10px;
    padding: 2.5rem;
    text-align: center;
    background: #f8fafc;
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
    cursor: pointer;
}

.upload-area:hover {
    border-color: var(--primary);
    background: rgba(67, 97, 238, 0.03);
}

.upload-area i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.upload-area h4 {
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.upload-area p {
    color: #6b7280;
    margin-bottom: 0;
}

.file-list {
    margin-bottom: 1.5rem;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    background: white;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.file-name {
    flex-grow: 1;
    font-weight: 500;
    color: var(--dark);
}

.file-size {
    color: var(--gray);
    margin-right: 1rem;
    font-size: 0.9rem;
}

.remove-btn {
    background: var(--danger);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0.25rem 0.75rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.remove-btn:hover {
    background: #c0392b;
}

.format-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    justify-content: center;
}

.format-btn {
    flex: 1;
    min-width: 120px;
    padding: 0.75rem;
    border: none;
    border-radius: 8px;
    background: white;
    color: var(--dark);
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.format-btn:hover {
    background: #f8fafc;
    transform: translateY(-2px);
}

.format-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 10px rgba(67, 97, 238, 0.3);
}

.action-buttons {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    justify-content: center;
}

.action-btn {
    flex: 1;
    padding: 0.75rem;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
}

.primary-btn {
    background: var(--primary);
    color: white;
}

.primary-btn:hover {
    transform: translateY(-2px);
}

.success-btn {
    background: var(--success);
    color: white;
}

.success-btn:hover {
    transform: translateY(-2px);
}

.progress-container {
    height: 8px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    margin: 1rem 0;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 10px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-status {
    font-size: 0.9rem;
    color: var(--gray);
    text-align: center;
    margin-bottom: 0.5rem;
}

.loading-container {
    text-align: center;
    padding: 1.5rem;
    display: none;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(67, 97, 238, 0.2);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.results-container {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
    margin-top: 1.5rem;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.results-title {
    font-weight: 600;
    color: var(--dark);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.image-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.image-card {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.image-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.image-preview {
    width: 100%;
    height: 150px;
    object-fit: contain;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.image-details {
    padding: 1rem;
    background: white;
}

.image-name {
    font-weight: 500;
    color: var(--dark);
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.image-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

.image-size {
    color: #6b7280;
}

.download-btn {
    width: 100%;
    padding: 0.5rem;
    border: none;
    border-radius: 6px;
    background: var(--primary);
    color: white;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.features-container {
    margin-top: 2.5rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.feature-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.feature-title {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.75rem;
}

.feature-desc {
    color: #6b7280;
    font-size: 0.95rem;
}

.error-message {
    color: var(--danger);
    text-align: center;
    margin: 1rem 0;
    font-weight: 500;
    display: none;
}

@media (max-width: 768px) {
    .container {
        padding: 1.5rem;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .image-grid {
        grid-template-columns: 1fr;
    }
}