/* Utilities */
.hidden {
    display: none !important;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, background 0.3s, box-shadow 0.3s;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: var(--primary-color);
    color: var(--text-primary);
    box-shadow: var(--primary-glow);
}

.btn-primary:hover {
    box-shadow: 0 0 25px rgba(59, 130, 246, 0.6);
}

.btn-secondary {
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: rgba(0, 0, 0, 0.15);
}

/* Upload Section */
.upload-section {
    padding: 2rem;
    text-align: center;
}

.drop-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    border: 2px dashed rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.02);
    cursor: pointer;
    transition: all 0.3s ease;
}

.drop-zone:hover, .drop-zone.dragover {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.05);
}

.drop-zone.dragover {
    transform: scale(1.02);
}

.upload-icon {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.drop-zone h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.drop-zone p {
    color: var(--text-secondary);
}

/* Processing Section */
.processing-section {
    padding: 4rem 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.loader-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(0, 0, 0, 0.1);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 2rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.progress-bar-container {
    width: 100%;
    max-width: 400px;
    height: 10px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    margin-top: 2rem;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--primary-color);
    width: 0%;
    transition: width 0.3s ease;
}

/* Editor Section */
.editor-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Comparison Grid */
.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.preview-card {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.preview-header h3 {
    font-size: 1.1rem;
    color: var(--text-primary);
}

.preview-img-wrapper {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--input-bg);
    border-radius: 8px;
    overflow: hidden;
    min-height: 250px;
    position: relative;
}

.preview-img-wrapper img {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
}

/* Checkerboard Pattern for Transparency */
.checkerboard {
    background-image: 
        linear-gradient(45deg, rgba(0, 0, 0, 0.05) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(0, 0, 0, 0.05) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(0, 0, 0, 0.05) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(0, 0, 0, 0.05) 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

/* Actions */
.actions-card {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.savings-info {
    font-size: 1rem;
    color: var(--text-secondary);
}

.action-buttons {
    display: flex;
    gap: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .comparison-grid {
        grid-template-columns: 1fr;
    }
    
    .actions-card {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .action-buttons {
        flex-direction: column;
    }
}
