/* ===== Base ===== */
body {
  margin: 0;
  font-family: "Inter", sans-serif;
  background: radial-gradient(ellipse at bottom right, #05091e 0%, #0b112b 75%);
  color: #ecf0f3;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== Container ===== */
.enhancer-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 16px 64px;
}

.enhancer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.enhancer-title {
  font-weight: 800;
  font-size: 1.8rem;
  color: #00f6b9;
}

.back-link {
  color: #a7f3d0;
  text-decoration: none;
  font-weight: 600;
}
.back-link:hover {
  text-decoration: underline;
}

/* ===== Card ===== */
.enhancer-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 6px 25px rgba(7, 16, 39, 0.45);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ===== Layout ===== */
.enhancement-panel {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}
@media (max-width: 768px) {
  .enhancement-panel {
    grid-template-columns: 1fr;
  }
}

/* ===== Canvas ===== */
.canvas-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.canvas-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16/10;
  background: #0b1225;
  border-radius: 12px;
  overflow: hidden;
  min-height: 300px;
}

.canvas-wrap canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}

/* Before/After slider */
.after-clip {
  position: absolute;
  inset: 0;
  width: 50%;
  overflow: hidden;
}
.range-full {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
}
.handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: #00ffd9;
  box-shadow: 0 0 8px #00ffd9;
  pointer-events: none;
}

.legend {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: #64748b;
  font-weight: 500;
}

/* ===== Controls ===== */
.controls-section {
  background: #f8fafc;
  border-radius: 16px;
  padding: 16px;
  color: #1e293b;
}

.control-group {
  margin-bottom: 20px;
}
.control-group h3 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 8px;
  text-transform: uppercase;
  color: #0f172a;
}

.control-item {
  margin-bottom: 12px;
}
.control-item label {
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 4px;
  display: block;
}

/* Sliders */
.slider {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #e2e8f0;
  outline: none;
  -webkit-appearance: none;
}
.slider::-webkit-slider-thumb {
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #00f6b9;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 246, 185, 0.3);
}
.slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #00f6b9;
  cursor: pointer;
  border: none;
}

/* Buttons */
.btn {
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-size: 0.9rem;
  transition: all 0.3s;
}
.btn-primary {
  background: linear-gradient(135deg, #00f6b9, #37ffe1);
  color: #0a0f1c;
}
.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(0, 246, 185, 0.3);
}
.btn-secondary {
  background: #64748b;
  color: #fff;
}
.btn-secondary:hover {
  background: #475569;
}

/* Overlay */
.overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.6);
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  z-index: 10;
}
.overlay.active {
  display: flex;
}
/* Red handle line */
.handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  background: red;
  box-shadow: 0 0 6px red;
  pointer-events: none;
  transition: left 0.1s linear;
}
