:root {
  --bg: #1a1212;
  --fg: #f7f2f0;
  --card: #2a1c1c;
  --surface: #241818;
  --surface2: #322020;
  --muted: #b9a8a4;
  --primary: #c43a2f;
  --ember: #e8a24a;
  --border: rgba(180, 90, 70, 0.35);
  --ok: #3d9b5f;
  --err: #d64545;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  --glow: 0 0 40px rgba(196, 58, 47, 0.35);
  --font: "Barlow", system-ui, sans-serif;
  --display: "Bebas Neue", "Barlow", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  color: var(--fg);
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(180, 50, 40, 0.35), transparent 60%),
    radial-gradient(100% 60% at 110% 110%, rgba(120, 30, 25, 0.3), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  width: 420px;
  height: 420px;
  left: 50%;
  top: -260px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: rgba(232, 162, 74, .12);
  filter: blur(70px);
  pointer-events: none;
}

.wrap {
  width: min(560px, 100%);
  margin: 0 auto;
  padding: 28px 16px 40px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.hero { text-align: center; display: grid; gap: 10px; justify-items: center; animation: heroIn .55s cubic-bezier(.2,.8,.2,1); }
.custom-amount[hidden] { display: none !important; }
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--border); background: var(--surface);
  border-radius: 999px; padding: 6px 14px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted);
}
.badge .robux { width: 14px; height: 16px; color: #fff; }
.logo-code {
  width: 80px; height: 80px; border-radius: 24px;
  display: grid; place-items: center;
  background: #000; border: 1px solid rgba(220, 40, 40, 0.5);
  color: #ef4444; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 28px; font-weight: 800; box-shadow: var(--glow);
}
h1, h2 { font-family: var(--display); letter-spacing: 0.02em; margin: 0; }
h1 { font-size: clamp(34px, 8vw, 48px); line-height: 1; }
h2 { font-size: 28px; }
.ember {
  background: linear-gradient(120deg, #e8a24a, #c43a2f);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.muted { color: var(--muted); font-size: 14px; margin: 6px 0 0; }
.hero p { max-width: 420px; color: var(--muted); font-size: 14px; margin: 0; }

.stepper {
  display: flex; justify-content: center; gap: 10px;
}
.stepper .item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.stepper .dot {
  width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--border);
  display: grid; place-items: center; font-weight: 800; background: var(--surface); color: var(--muted);
  transition: 0.2s ease;
}
.stepper .item.active .dot {
  background: linear-gradient(120deg, #e8a24a, #c43a2f); color: #fff; border-color: transparent;
  transform: scale(1.08); box-shadow: 0 0 0 8px rgba(196, 58, 47, 0.12);
}
.stepper .item.done .dot {
  background: linear-gradient(135deg, #c43a2f, #7a1f18); color: #fff; border-color: transparent;
}
.stepper .lbl {
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
.stepper .item.active .lbl { color: #fff; }

.card {
  background: rgba(42, 28, 28, 0.85); border: 1px solid var(--border);
  border-radius: 24px; padding: 20px; box-shadow: var(--shadow); backdrop-filter: blur(6px);
}
.card { position: relative; overflow: hidden; animation: cardIn .45s .08s both cubic-bezier(.2,.8,.2,1); }
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 16%;
  right: 16%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,225,180,.4), transparent);
}
.step { display: none; gap: 14px; }
.step.active { display: grid; }
.step[hidden] { display: none !important; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.input {
  flex: 1; min-width: 0; height: 48px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface); color: var(--fg); padding: 0 14px; font: inherit; outline: none;
}
.input.area { height: auto; min-height: 84px; padding: 12px 14px; resize: vertical; }
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(196, 58, 47, 0.2); }

.btn, .link-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 18px; border-radius: 12px; border: none; cursor: pointer;
  font: inherit; font-weight: 700; text-decoration: none; color: #fff;
  background: linear-gradient(135deg, #c43a2f, #7a1f18); box-shadow: var(--glow);
}
.btn:hover, .link-btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn.ghost, .link-btn.ghost {
  background: transparent; border: 1px solid var(--border); color: var(--fg); box-shadow: none;
}
.btn.block, .link-btn.block { width: 100%; }
.link-btn {
  width: 100%; border: 1px solid rgba(196, 58, 47, 0.55); background: rgba(196, 58, 47, 0.12); color: var(--ember);
  box-shadow: none;
}

.profile {
  border: 1px solid var(--border); background: rgba(50, 32, 32, 0.6);
  border-radius: 16px; padding: 14px; display: grid; gap: 12px;
}
.profile .head { display: flex; gap: 12px; align-items: center; }
.profile img, .profile .ph {
  width: 64px; height: 64px; border-radius: 999px; object-fit: cover; background: var(--surface); border: 1px solid var(--border);
}
.profile .ph { display: grid; place-items: center; color: var(--muted); font-weight: 700; }
.profile .name { font-weight: 800; font-size: 18px; }
.profile .sub { color: var(--muted); font-size: 13px; }

.amounts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.amounts .amt {
  border: 1px solid var(--border); background: rgba(50, 32, 32, 0.55);
  border-radius: 16px; padding: 14px 10px; cursor: pointer; text-align: center;
  display: grid; gap: 4px; justify-items: center; color: inherit;
}
.amounts .amt.wide { grid-column: 1 / -1; }
.amounts .amt.on { border-color: var(--primary); background: rgba(196, 58, 47, 0.18); box-shadow: var(--glow); }
.amounts .amt { transition: transform .16s ease, border-color .16s ease, background .16s ease; }
.amounts .amt:hover { transform: translateY(-2px); border-color: rgba(232,162,74,.55); }
.amounts .amt .robux { width: 22px; height: 24px; color: #fff; opacity: 0.55; }
.amounts .amt.on .robux { opacity: 1; }
.amounts .amt b { font-size: 20px; }
.amounts .amt span { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }

.howto { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.howto li {
  display: flex; gap: 12px; align-items: flex-start;
  border: 1px solid var(--border); background: rgba(50, 32, 32, 0.5);
  border-radius: 14px; padding: 12px; font-size: 14px; line-height: 1.4;
}
.howto span {
  width: 28px; height: 28px; border-radius: 999px; flex: 0 0 auto;
  display: grid; place-items: center; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, #c43a2f, #7a1f18);
}

.upload {
  width: 100%; min-height: 88px; border: 2px dashed var(--border); border-radius: 18px;
  background: rgba(50, 32, 32, 0.35); color: var(--muted); cursor: pointer;
  display: grid; place-items: center; gap: 8px; padding: 16px; font: inherit;
}
.upload img,
#printPreview {
  width: 72px !important;
  height: 72px !important;
  max-width: 72px !important;
  max-height: 72px !important;
  object-fit: cover !important;
  border-radius: 10px;
  border: 1px solid var(--border);
  display: block;
  margin: 0 auto;
}

.label { font-size: 13px; font-weight: 700; margin: 0; }
.box {
  border: 1px solid var(--border); background: rgba(50, 32, 32, 0.5);
  border-radius: 14px; padding: 12px 14px;
}
.break { word-break: break-all; font-weight: 700; color: var(--ember); font-size: 13px; margin-top: 4px; }

.msg {
  border-radius: 12px; padding: 12px 14px; font-size: 14px; line-height: 1.4;
  border: 1px solid var(--border); background: rgba(50, 32, 32, 0.55);
}
.msg.ok { border-color: rgba(61, 155, 95, 0.5); background: rgba(61, 155, 95, 0.12); }
.msg.err { border-color: rgba(214, 69, 69, 0.5); background: rgba(214, 69, 69, 0.12); }
.msg.auto-approved { box-shadow: 0 0 0 1px rgba(61,155,95,.15), 0 14px 34px rgba(61,155,95,.12); }

.critical-warning {
  display: grid;
  gap: 4px;
  padding: 14px 15px;
  border: 1px solid rgba(255,75,75,.72);
  border-left: 5px solid #ff4949;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(214,69,69,.22), rgba(90,20,20,.25));
  box-shadow: 0 10px 28px rgba(160,25,25,.16);
}
.critical-warning b { color: #ff8b84; font-size: 13px; letter-spacing: .04em; }
.critical-warning span { color: #f4d3ce; font-size: 12.5px; line-height: 1.4; }
.critical-warning.compact { padding: 11px 13px; }

.custom-amount { display: grid; gap: 7px; }
.custom-amount > span { color: var(--muted); font-size: 12px; font-weight: 700; }
.custom-amount > div { display: flex; align-items: center; border: 1px solid var(--border); border-radius: 13px; background: var(--surface); overflow: hidden; }
.custom-amount input { flex: 1; min-width: 0; height: 48px; border: 0; outline: 0; padding: 0 14px; color: var(--fg); background: transparent; font: inherit; font-weight: 750; }
.custom-amount div span { padding: 0 14px; color: var(--ember); font-size: 12px; font-weight: 800; }

.mission-pet {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 80;
  display: grid;
  justify-items: end;
  gap: 10px;
}
.mission-pet[hidden], .assistant-card[hidden] { display: none !important; }
.assistant-card {
  width: min(370px, calc(100vw - 24px));
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(232,162,74,.34);
  border-radius: 22px;
  background: linear-gradient(160deg, rgba(48,31,28,.96), rgba(29,19,19,.96));
  box-shadow: 0 24px 70px rgba(0,0,0,.58), 0 0 0 1px rgba(255,255,255,.035) inset;
  backdrop-filter: blur(18px);
  animation: petPanelIn .24s cubic-bezier(.2,.8,.2,1);
}
.assistant-head { display: grid; grid-template-columns: 38px 1fr auto; gap: 10px; align-items: center; }
.pet-mini { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 13px; background: linear-gradient(135deg,#f6d389,#e89a45); box-shadow: 0 8px 22px rgba(232,162,74,.2); font-size: 18px; }
.assistant-head b, .assistant-head span { display: block; }
.assistant-head b { font-size: 14px; }
.assistant-head div span { margin-top: 2px; color: var(--muted); font-size: 10.5px; }
.pet-close { width: 32px; height: 32px; border: 1px solid var(--border); border-radius: 10px; color: var(--muted); background: rgba(255,255,255,.035); font: 700 20px/1 inherit; cursor: pointer; }
.pet-close:hover { color: var(--fg); border-color: rgba(232,162,74,.5); }
.assistant-messages { display: grid; gap: 8px; max-height: 260px; overflow: auto; padding: 4px; }
.assistant-message { width: fit-content; max-width: 86%; padding: 9px 11px; border-radius: 13px; font-size: 12.5px; line-height: 1.45; }
.assistant-message.bot { justify-self: start; border: 1px solid var(--border); background: var(--surface); }
.assistant-message.user { justify-self: end; color: #fff; background: linear-gradient(135deg,#c43a2f,#7a1f18); }
.assistant-message.loading { color: var(--muted); animation: breathe 1s ease infinite; }
.assistant-message.error { color: #ffaaa4; }
.assistant-form { display: flex; gap: 8px; }
.assistant-form input { flex: 1; min-width: 0; height: 44px; border: 1px solid var(--border); border-radius: 12px; padding: 0 12px; outline: 0; color: var(--fg); background: var(--surface); font: inherit; }
.assistant-form input:focus { border-color: var(--ember); box-shadow: 0 0 0 3px rgba(232,162,74,.12); }
.assistant-form button { height: 44px; padding: 0 14px; border: 0; border-radius: 12px; color: #fff; background: linear-gradient(135deg,#c43a2f,#7a1f18); font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.assistant-form button:disabled { opacity: .55; cursor: wait; }
.pet-launch { display: flex; align-items: center; gap: 9px; border: 0; padding: 7px 11px 7px 7px; border-radius: 999px; color: #fff; background: linear-gradient(135deg,#7a1f18,#3a1110); box-shadow: 0 16px 42px rgba(0,0,0,.5), 0 0 0 1px rgba(255,107,94,.28) inset; cursor: pointer; font: inherit; animation: petFloat 3s ease-in-out infinite; }
.pet-launch.open { opacity: .65; animation: none; }
.pet-avatar { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(145deg,#f6d389,#e89a45); box-shadow: 0 8px 22px rgba(232,162,74,.25); font-size: 23px; }
.pet-callout { padding-right: 5px; font-size: 12px; font-weight: 800; white-space: nowrap; }

@keyframes heroIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
@keyframes cardIn { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes breathe { 50% { opacity: .45; } }
@keyframes petPanelIn { from { opacity: 0; transform: translateY(10px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes petFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }

.foot { text-align: center; color: var(--muted); font-size: 12px; }

@media (max-width: 480px) {
  .row .btn, .row .link-btn { flex: 1 1 100%; }
  .stepper { gap: 6px; }
  .stepper .dot { width: 38px; height: 38px; }
  .wrap { padding: 20px 12px 34px; gap: 16px; }
  .card { border-radius: 20px; padding: 17px; }
  .amounts { grid-template-columns: 1fr 1fr; }
  .mission-pet { right: 10px; bottom: 10px; }
  .assistant-card { width: calc(100vw - 20px); }
  .assistant-form { flex-direction: column; }
  .assistant-form button { width: 100%; }
}

.stepper .item .lbl { font-size: 11px; color: var(--muted); font-weight: 600; }
.stepper { gap: 14px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Vídeo tutorial (fica fora dos passos, então não reinicia ao avançar) */
.tutorial-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 14px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 10px;
}
.tutorial-head {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--display); font-size: 20px; letter-spacing: 1px;
  color: var(--ember);
}
.tutorial-ic {
  width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center;
  background: var(--primary); color: #fff; font-size: 11px; padding-left: 2px;
}
.tutorial-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--border);
}
.tutorial-media video,
.tutorial-media iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0; display: block; object-fit: contain; background: #000;
}
