* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	min-height: 100vh;
	padding: 20px;
}

.container {
	max-width: 1200px;
	margin: 0 auto;
	background: white;
	border-radius: 15px;
	padding: 30px;
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

h1 {
	text-align: center;
	color: #333;
	margin-bottom: 10px;
}

p {
	text-align: center;
	color: #666;
	margin-bottom: 30px;
}

.upload-section {
	text-align: center;
	margin-bottom: 30px;
}

.upload-box {
	border: 3px dashed #ccc;
	border-radius: 10px;
	padding: 40px;
	margin-bottom: 20px;
	cursor: pointer;
	transition: all 0.3s ease;
}

.upload-box:hover {
	border-color: #667eea;
	background-color: #f8f9ff;
}

.upload-box.dragover {
	border-color: #667eea;
	background-color: #eef1ff;
}

.upload-icon {
	font-size: 48px;
	margin-bottom: 10px;
	display: block;
}

#processBtn {
	background: #667eea;
	color: white;
	border: none;
	padding: 12px 30px;
	border-radius: 25px;
	font-size: 16px;
	cursor: pointer;
	transition: background 0.3s ease;
}

#processBtn:hover:not(:disabled) {
	background: #5a6fd8;
}

#processBtn:disabled {
	background: #ccc;
	cursor: not-allowed;
}

/* Processing Section */
.comparison-section {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	gap: 30px;
	align-items: start;
	margin-top: 30px;
}

.image-container {
	text-align: center;
}

.image-container h4 {
	margin-bottom: 15px;
	color: #333;
	font-size: 18px;
}

.image-container img {
	max-width: 100%;
	max-height: 300px;
	border-radius: 10px;
	box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
	border: 2px solid #e0e0e0;
}

.processing-animation {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	height: 100%;
}

.progress-container {
	width: 100%;
	margin-bottom: 30px;
}

.progress-bar {
	width: 100%;
	height: 8px;
	background: #f0f0f0;
	border-radius: 4px;
	overflow: hidden;
	margin-bottom: 20px;
}

.progress-fill {
	height: 100%;
	background: linear-gradient(90deg, #667eea, #764ba2);
	width: 0%;
	transition: width 0.5s ease;
}

.progress-steps {
	display: flex;
	justify-content: space-between;
	position: relative;
}

.progress-steps::before {
	content: '';
	position: absolute;
	top: 15px;
	left: 10%;
	right: 10%;
	height: 2px;
	background: #e0e0e0;
	z-index: 1;
}

.step {
	display: flex;
	flex-direction: column;
	align-items: center;
	position: relative;
	z-index: 2;
}

.step-number {
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: #e0e0e0;
	color: #666;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: bold;
	margin-bottom: 5px;
	transition: all 0.3s ease;
}

.step.active .step-number {
	background: #667eea;
	color: white;
}

.step-text {
	font-size: 12px;
	color: #666;
	text-align: center;
}

.animation-placeholder {
	text-align: center;
	padding: 40px;
	background: #f8f9ff;
	border-radius: 10px;
	border: 2px dashed #667eea;
}

.spinner {
	width: 40px;
	height: 40px;
	border: 4px solid #e0e0e0;
	border-top: 4px solid #667eea;
	border-radius: 50%;
	animation: spin 1s linear infinite;
	margin: 0 auto 15px;
}

@keyframes spin {
	0% {
		transform: rotate(0deg);
	}

	100% {
		transform: rotate(360deg);
	}
}

.result-placeholder {
	width: 100%;
	height: 300px;
	background: #f8f9fa;
	border: 2px dashed #ccc;
	border-radius: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.placeholder-content {
	text-align: center;
	color: #666;
}

.placeholder-icon {
	font-size: 48px;
	display: block;
	margin-bottom: 10px;
}

/* Final Result Section */
.final-result {
	margin-bottom: 30px;
}

.vs-separator {
	display: flex;
	align-items: center;
	justify-content: center;
}

.vs-circle {
	width: 60px;
	height: 60px;
	background: linear-gradient(135deg, #667eea, #764ba2);
	color: white;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: bold;
	font-size: 14px;
}

.image-stats {
	margin-top: 15px;
	padding: 15px;
	background: #f8f9fa;
	border-radius: 8px;
}

.stat {
	display: flex;
	justify-content: space-between;
	margin-bottom: 8px;
}

.stat:last-child {
	margin-bottom: 0;
}

.stat-label {
	font-weight: 600;
	color: #333;
}

.stat-value {
	color: #667eea;
	font-weight: 500;
}

.download-section {
	text-align: center;
	margin-top: 30px;
}

.download-button {
	background: #28a745;
	color: white;
	border: none;
	padding: 15px 30px;
	border-radius: 25px;
	font-size: 16px;
	cursor: pointer;
	margin: 0 10px;
	transition: background 0.3s ease;
}

.download-button:hover {
	background: #218838;
	transform: translateY(-2px);
}

.secondary-button {
	background: #6c757d;
	color: white;
	border: none;
	padding: 15px 30px;
	border-radius: 25px;
	font-size: 16px;
	cursor: pointer;
	margin: 0 10px;
	transition: background 0.3s ease;
}

.secondary-button:hover {
	background: #545b62;
	transform: translateY(-2px);
}

.download-icon {
	margin-right: 8px;
}

.hidden {
	display: none;
}

.error-message {
	background: #f8d7da;
	color: #721c24;
	padding: 15px;
	border-radius: 5px;
	border: 1px solid #f5c6cb;
}

.recent-files {
	margin-top: 40px;
}

.file-item {
	background: #f8f9fa;
	padding: 15px;
	margin: 10px 0;
	border-radius: 5px;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.file-item button {
	background: #007bff;
	color: white;
	border: none;
	padding: 5px 15px;
	border-radius: 3px;
	cursor: pointer;
}

.file-item button:hover {
	background: #0056b3;
}

@media (max-width: 768px) {
	.comparison-section {
		grid-template-columns: 1fr;
		gap: 20px;
	}

	.vs-separator {
		order: -1;
		margin-bottom: 20px;
	}

	.container {
		padding: 20px;
		margin: 10px;
	}

	.download-section {
		display: flex;
		flex-direction: column;
		gap: 10px;
	}

	.download-button,
	.secondary-button {
		margin: 5px 0;
	}
}

.mode-toggle {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 10px;
	margin-bottom: 20px;
}

.toggle-label {
	font-weight: 600;
	color: #333;
}

.switch {
	position: relative;
	display: inline-block;
	width: 50px;
	height: 26px;
}

.switch input {
	opacity: 0;
	width: 0;
	height: 0;
}

.slider {
	position: absolute;
	cursor: pointer;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: #ccc;
	transition: 0.3s;
	border-radius: 34px;
}

.slider:before {
	position: absolute;
	content: "";
	height: 20px;
	width: 20px;
	left: 3px;
	bottom: 3px;
	background-color: white;
	transition: 0.3s;
	border-radius: 50%;
}

input:checked+.slider {
	background-color: #667eea;
}

input:checked+.slider:before {
	transform: translateX(24px);
}
