/* Reset & base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, sans-serif;
  background: #f5f7fa;
  color: #222;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

header,
footer {
  text-align: center;
  padding: 1.5rem 1rem;
}

header h1 {
  font-size: 2rem;
  margin-bottom: 0.25rem;
}

.tagline {
  font-size: 0.95rem;
  color: #555;
}

/* Cards */
.card {
  background: #fff;
  border-radius: 1rem;
  padding: 1.5rem;
  margin: 1rem auto;
  width: 95%;
  max-width: 1000px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

/* Upload */
.upload-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  padding: 2rem 1rem;
  border: 2px dashed #bbb;
  border-radius: 1rem;
  transition: background 0.2s;
}

.upload-label:hover {
  background: #fafafa;
}

.upload-icon {
  font-size: 2.5rem;
}

/* Controls */
.controls-card h2 {
  margin-bottom: 0.75rem;
}

.slider-group label {
  display: flex;
  justify-content: space-between;
  margin: 0.5rem 0;
  font-size: 0.9rem;
}

input[type='range'] {
  width: 65%;
}

button {
  margin-right: 0.5rem;
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 0.5rem;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.1s;
}

button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

button:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

#enhanceBtn {
  background: #4f46e5;
  color: #fff;
}

#resetBtn {
  background: #e5e7eb;
}

/* Compare */
.compare-wrapper {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.image-box {
  text-align: center;
}

canvas {
  width: 100%;
  height: auto;
  border-radius: 0.75rem;
  background: #e5e7eb;
}

.download-btn {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.6rem 1.4rem;
  background: #16a34a;
  color: #fff;
  border-radius: 0.5rem;
  text-decoration: none;
}

.download-btn:hover {
  background: #15803d;
}
