* {
  margin: 0;
  padding: 0;
}

body {
  background-color: #f1f2f3;
}

.container {
  box-sizing: border-box;
  max-width: 1560px;
  min-width: 1240px;
  width: 100%;
  margin: 25px auto;
  color: #333;
  line-height: 1.6;
}

.container *{
  box-sizing: border-box;
}

header {
  text-align: center;
  margin-bottom: 25px;
}

header h1 {
  font-size: 2.2rem;
  margin-bottom: 5px;
}

header p {
  font-size: 1rem;
  max-width: 95%;
  margin: 0 auto;
  opacity: 0.9;
}


.main-content {
  display: flex;
  gap: 20px;
  margin-bottom: 25px;
}

.upload-section {
  flex: 1;
  background: white;
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
}

.preview-section {
  flex: 1;
  background: white;
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
}

.section-title {
  font-size: 1.2rem;
  margin-bottom: 20px;
  color: #2c3e50;
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1;
}

.upload-area {
  border: 3px dashed #3498db;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  background-color: #f8fafc;
  cursor: pointer;
  transition: all 0.3s ease;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.upload-area:hover {
  background-color: #e3f2fd;
  border-color: #2980b9;
}

.upload-icon {
  font-size: 4rem;
  margin-bottom: 15px;
  color: #3498db;
}

.upload-text {
  font-size: 1.2rem;
  color: #7f8c8d;
  margin-bottom: 10px;
}

.file-input {
  display: none;
}

.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: white;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #2980b9, #2573a7);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

.btn-secondary {
  background: #e74c3c;
  color: white;
}

.btn-secondary:hover {
  background: #c0392b;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}

.btn-success {
  background: #2ecc71;
  color: white;
}

.btn-success:hover {
  background: #27ae60;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(46, 204, 113, 0.3);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.preview-container {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  background-color: #f8fafc;
  overflow: hidden;
  min-height: 300px;
  position: relative;
}

.preview-image {
  max-width: 100%;
  max-height: 300px;
  display: none;
}

.placeholder {
  color: #95a5a6;
  font-size: 1.1rem;
}

.image-info {
  margin-top: 15px;
  padding: 15px;
  background-color: #f8f9fa;
  border-radius: 8px;
  font-size: 0.9rem;
}

.info-row {
  display: flex;
  margin-bottom: 8px;
}

.info-label {
  font-weight: 600;
  width: 120px;
  color: #7f8c8d;
}

.action-buttons {
  display: flex;
  gap: 15px;
  margin-top: 20px;
  justify-content: flex-end;
}

.result-section {
  background: white;
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  margin-bottom: 25px;
}

.result-container {
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  background-color: #f8fafc;
  min-height: 200px;
  max-height: 300px;
  overflow: auto;
  padding: 15px;
  font-family: monospace;
  font-size: 0.9rem;
  white-space: pre-wrap;
  word-break: break-all;
}

.warning-box {
  background-color: #fef9e7;
  border-left: 4px solid #f1c40f;
  padding: 15px;
  margin-top: 20px;
  border-radius: 0 8px 8px 0;
}

.warning-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  color: #d35400;
  font-weight: 600;
}

.features {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 25px;
}

.feature-card {
  flex: 1;
  min-width: 300px;
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.feature-card h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
  color: #2c3e50;
}

.feature-card p {
  color: #7f8c8d;
  line-height: 1.6;
}

footer {
  text-align: center;
  color: #7f8c8d;
}

.processing {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  display: none;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(52, 152, 219, 0.2);
  border-top: 5px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.alert {
  padding: 15px;
  border-radius: 8px;
  margin: 15px 0;
  display: none;
}

.alert-error {
  background-color: #fdecea;
  border: 1px solid #f44336;
  color: #f44336;
}
