@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

* {
  box-sizing: border-box;
  font-family: 'Plus Jakarta Sans', system-ui, Arial, sans-serif;
}

body {
  margin: 0;
  background: radial-gradient(circle at top, #111 0%, #000 55%);
  color: #e5e7eb;
}

/* TOPO (painel) */
.topo {
  background: rgba(0,0,0,0.75);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding: 16px 30px;
}

.topo .container {
  max-width: 1280px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.topo h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
}

/* GRID */
.painel-grid {
  max-width: 1280px;
  margin: auto;
  padding: 35px 25px;
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 28px;
}

/* COLUNAS */
.painel-col {
  background: linear-gradient(180deg, rgba(20,20,20,0.9), rgba(8,8,8,0.95));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.6);
}

/* UPLOAD SOBRE IMAGEM */
.comparador-com-upload {
  position: relative;
}

.upload-sobreposto {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 12px;
  align-items: center;
}

/* BOTÃO INLINE LARANJA */
.upload-area-inline {
  background: linear-gradient(135deg, #ff6a00, #ff8a00);
  color: #fff;
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
}

.upload-area-inline span {
  display: block;
  font-weight: 400;
  font-size: 11px;
  opacity: 0.85;
}

.select-modelo {
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid #333;
  background: #111;
  color: #fff;
}

/* COMPARADOR */
.comparador {
  position: relative;
  width: 100%;
  border-radius: 18px;
  overflow: hidden;
  background: #000;
  cursor: ew-resize;
  margin-top: 60px;
}

.comparador img {
  width: 100%;
  display: block;
}

.img-depois {
  position: absolute;
  top: 0;
  left: 0;
  clip-path: inset(0 50% 0 0);
}

.divisor {
  position: absolute;
  top: 0;
  left: 50%;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, #ff6a00, #ff8a00);
  box-shadow: 0 0 10px rgba(255,106,0,0.9);
}

.tag {
  position: absolute;
  top: 14px;
  padding: 6px 14px;
  border-radius: 8px;
  background: rgba(0,0,0,0.7);
  font-size: 12px;
  font-weight: 700;
}

.tag.antes { left: 14px; }
.tag.depois { right: 14px; }

/* AÇÕES */
.acoes-box button {
  width: 100%;
  margin-bottom: 14px;
}

.link-acao {
  display: block;
  text-align: center;
  margin-top: 10px;
  font-weight: 700;
}

.switch {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

/* BOTÕES GERAIS (painel) */
.btn,
button {
  background: linear-gradient(135deg, #ff6a00, #ff8a00);
  color: #fff;
  border: none;
  padding: 12px 22px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
}

.btn-cinza {
  background: #2a2f37;
  color: #fff;
}

/* PLACEHOLDER */
.placeholder {
  text-align: center;
  opacity: 0.6;
  padding: 60px 0;
}

/* LINK BAIXAR COMO BOTÃO */
a.link-acao {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  background: linear-gradient(135deg, #ff6a00, #ff8a00);
  color: #fff !important;
  border: none;
  padding: 12px 22px;
  border-radius: 12px;
  font-weight: 700;
  text-decoration: none !important;
  cursor: pointer;
}

/* UPLOAD PRINCIPAL (painel) */
.upload-area {
  background: linear-gradient(135deg, #ff6a00, #ff8a00);
  color: #fff;
  border-radius: 12px;
  padding: 14px 22px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.upload-area span {
  font-size: 12px;
  opacity: 0.9;
}

/* LOADING */
.comparador-loading {
  position: relative;
}

.loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.65);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 20;
  color: #fff;
  font-weight: 700;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #ddd;
  border-top: 4px solid #ff7a00;
  border-radius: 50%;
  animation: girar 1s linear infinite;
  margin-bottom: 6px;
}

@keyframes girar {
  to { transform: rotate(360deg); }
}

.comparador.processando img {
  filter: grayscale(100%) opacity(0.6);
}

.preview-card {
  position: relative;
  width: 100%;
}

/* SELINHO DE CRÉDITO */
.credit-pill {
  position: absolute;
  top: -0px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #ff6a00, #ff8a00);
  color: #fff;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0,0,0,.6);
  z-index: 30;
  pointer-events: none;
}
