
:root {
  --bg: #10120f;
  --panel: #191c17;
  --panel2: #20241d;
  --text: #f4f6ef;
  --muted: #a0a69a;
  --green: #c5f467;
  --border: #30352c;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

button, input { font: inherit; }
button, label { -webkit-tap-highlight-color: transparent; }

.topbar {
  min-height: 76px;
  padding: 15px max(5%, calc((100% - 1160px) / 2));
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -1px;
  text-decoration: none;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--green);
  color: #15190f;
  font-size: 22px;
  font-weight: 900;
}

.brand .muted { color: var(--muted); }

.back-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
}

.back-link:hover { color: var(--green); }

.container {
  width: min(100% - 32px, 1000px);
  margin: auto;
}

.intro {
  text-align: center;
  padding: 54px 0 34px;
}

.eyebrow {
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
}

h1 {
  margin: 12px 0;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.12;
  letter-spacing: -1.8px;
}

h1 span { color: var(--green); }

.intro p {
  max-width: 590px;
  margin: 12px auto 0;
  color: var(--muted);
}

.workspace {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: clamp(16px, 4vw, 30px);
}

.upload-box {
  text-align: center;
  border: 1px dashed #505846;
  background: #151812;
  border-radius: 16px;
  padding: 42px 16px;
}

.upload-icon {
  margin: auto;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: #293321;
  color: var(--green);
  font-size: 32px;
}

h2, h3, p { margin-top: 0; }
.upload-box h2 { margin: 16px 0 4px; }
.upload-box p { color: var(--muted); font-size: 13px; }

.small { margin: 18px 0 0 !important; font-size: 11px !important; }

.primary-btn, .secondary-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
  transition: transform .15s, background .15s;
}

.primary-btn {
  background: var(--green);
  color: #15190f;
}

.secondary-btn {
  background: var(--panel2);
  border-color: var(--border);
  color: var(--text);
}

.primary-btn:hover, .secondary-btn:hover { transform: translateY(-1px); }

button:disabled {
  opacity: .45;
  cursor: not-allowed;
  transform: none;
}

.panel-heading, .control-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.panel-heading h2, .control-heading h2 { margin: 0 0 3px; }
.panel-heading p, .control-heading p { color: var(--muted); font-size: 13px; margin: 0; }

.status {
  color: var(--green);
  font-size: 12px;
  background: #293321;
  padding: 6px 10px;
  border-radius: 20px;
}

.compare {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #0b0d0a;
  border: 1px solid var(--border);
  border-radius: 12px;
  isolation: isolate;
  touch-action: pan-y;
}

.compare > img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 600px;
  object-fit: contain;
  margin: auto;
}

.after-layer {
  position: absolute;
  inset: 0;
  width: 50%;
  overflow: hidden;
  border-right: 0;
  pointer-events: none;
}

.after-layer canvas {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
}

.photo-label {
  position: absolute;
  top: 12px;
  z-index: 2;
  padding: 5px 9px;
  background: rgba(12, 14, 10, .8);
  color: white;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  pointer-events: none;
}

.before-label { left: 12px; }
.after-label { right: 12px; }

.compare-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: var(--green);
  z-index: 3;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.compare-line span {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--green);
  color: #15190f;
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 900;
  border: 3px solid #10120f;
}

#compareSlider {
  position: absolute;
  inset: 0;
  z-index: 4;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  touch-action: pan-y;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.controls {
  margin-top: 28px;
  padding: 22px;
  border-radius: 14px;
  background: #141611;
  border: 1px solid var(--border);
}

.range-row {
  display: block;
  margin-top: 22px;
  font-size: 13px;
  font-weight: 700;
}

.range-row span {
  display: flex;
  justify-content: space-between;
  margin-bottom: 9px;
}

.range-row output {
  color: var(--green);
  font-variant-numeric: tabular-nums;
}

.range-row input {
  display: block;
  width: 100%;
  accent-color: var(--green);
  cursor: pointer;
}

.note { margin: 20px 0 0; color: var(--muted); font-size: 12px; }

.bottom-actions { margin-top: 18px; }

.info { padding: 45px 0; }
.info > h2 { text-align: center; margin-bottom: 22px; }

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.info-grid article {
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.info-grid article > span { color: var(--green); font-size: 23px; }
.info-grid h3 { margin: 10px 0 6px; font-size: 16px; }
.info-grid p { color: var(--muted); font-size: 13px; margin: 0; }

footer {
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--muted);
  padding: 24px 12px;
  font-size: 12px;
}

[hidden] { display: none !important; }

@media (max-width: 600px) {
  .topbar { padding: 12px 16px; min-height: 66px; }
  .brand { font-size: 20px; }
  .brand-mark { width: 36px; height: 36px; font-size: 19px; }
  .back-link { font-size: 12px; }
  .intro { padding: 38px 0 25px; }
  .workspace { border-radius: 15px; }
  .actions { display: grid; grid-template-columns: 1fr 1fr; }
  .actions button:first-child { grid-column: 1 / -1; }
  .info-grid { grid-template-columns: 1fr; }
  .controls { padding: 16px; }
}
