* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
}

body {
  min-height: 100vh;
  background: linear-gradient(135deg, #0f1115 0%, #1a1d26 100%);
  color: #f0f0f0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 16px;
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.controls {
  background: rgba(25, 28, 36, 0.8);
  padding: 24px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
}

.controls h2 {
  margin-bottom: 20px;
  color: #ffffff;
  font-size: 1.5rem;
  font-weight: 600;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.file-input-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background: rgba(40, 44, 52, 0.6);
  border: 2px dashed rgba(100, 100, 120, 0.4);
  transition: all 0.3s ease;
}

.file-input-wrapper:hover {
  border-color: #1e88e5;
  background: rgba(40, 44, 52, 0.8);
}

.file-input-wrapper input[type="file"] {
  width: 100%;
  padding: 18px 20px;
  opacity: 0;
  cursor: pointer;
  position: relative;
  z-index: 2;
}

.file-input-wrapper::after {
  content: "Choose an image";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  color: #b0b0c0;
  pointer-events: none;
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(40, 44, 52, 0.6);
  border-radius: 10px;
  border: 1px solid rgba(100, 100, 120, 0.3);
  transition: all 0.2s ease;
}

.checkbox-group:hover {
  border-color: #1e88e5;
  background: rgba(40, 44, 52, 0.8);
}

.checkbox-group label {
  cursor: pointer;
  user-select: none;
  font-weight: 500;
  color: #d0d0e0;
  display: flex;
  align-items: center;
  gap: 10px;
}

input[type="checkbox"] {
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: #2a2e3a;
  border: 2px solid #4a4e5a;
  cursor: pointer;
  transition: all 0.2s ease;
}

input[type="checkbox"]:hover {
  border-color: #1e88e5;
}

input[type="checkbox"]:checked {
  background: #1e88e5;
  border-color: #1e88e5;
}

button#processBtn {
  width: 100%;
  padding: 16px 24px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #1e88e5 0%, #1976d2 100%);
  color: white;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

button#processBtn:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #2196f3 0%, #0d47a1 100%);
}

button#processBtn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.results {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.section-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: white;
  padding-left: 6px;
  opacity: 0.9;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.result-card {
  background: rgba(25, 28, 36, 0.75);
  border-radius: 14px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  transition: transform 0.25s ease;
}

.result-card:hover {
  transform: translateY(-3px);
}

.result-card h1 {
  font-size: 1rem;
  margin-bottom: 14px;
  font-weight: 600;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(30, 136, 229, 0.25);
}

.result-card img {
  width: 100%;
  border-radius: 10px;
  background: rgba(40, 44, 52, 0.6);
  border: 2px solid rgba(100, 100, 120, 0.2);

  aspect-ratio: 1 / 1;
  object-fit: contain;
  max-height: 220px;
}

.result-card img:not([src]) {
  min-height: 200px;
}

@media (max-width: 768px) {
  .result-grid {
    grid-template-columns: 1fr;
  }

  .controls {
    padding: 20px;
  }

  .section-title {
    font-size: 1.2rem;
  }
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

.loading {
  animation: pulse 1.5s ease-in-out infinite;
}