:root {
  --orange: #ff7a00;
  --orange-light: #ff9a3d;
  --orange-dark: #e85d00;
  --green: #25d366;
  --green-dark: #1ebe5a;
  --ink: #1a1a1f;
  --ink-soft: #5a5a66;
  --card: #ffffff;
  --bg-1: #1c1410;
  --bg-2: #0f0b08;
  --radius: 22px;
  --shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.45);
  --ring: 0 0 0 4px rgba(255, 122, 0, 0.18);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font-btn: "Sora", "Poppins", system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { min-height: 100%; }

body {
  font-family: "Poppins", system-ui, sans-serif;
  color: var(--ink);
  background: #ffffff;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* glows de fundo (bem suaves no branco) */
.bg-glow {
  position: fixed;
  width: 380px; height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 122, 0, 0.10), transparent 65%);
  filter: blur(40px);
  top: -120px; left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 0;
}
.bg-glow--2 { top: auto; bottom: -180px; left: 10%; background: radial-gradient(circle, rgba(255, 154, 61, 0.08), transparent 65%); }

.stage {
  width: 100%;
  max-width: 480px;
  padding: calc(28px + var(--safe-top)) 18px calc(16px + var(--safe-bottom));
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
}

/* ---------- screens ---------- */
.screen { display: none; width: 100%; flex-direction: column; align-items: center; flex: 1; animation: fade-up .45s ease both; }
.screen.is-active { display: flex; }
.screen--start { justify-content: center; }

@keyframes fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- tela inicial ---------- */
.title {
  font-size: clamp(42px, 14vw, 60px);
  font-weight: 900;
  line-height: 0.95;
  text-align: center;
  letter-spacing: -1px;
  background: linear-gradient(180deg, var(--orange-light), var(--orange));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: flex; flex-direction: column;
}

.subtitle {
  margin-top: 20px;
  text-align: center;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
  padding: 0 2px;
}
.subtitle .line-bold { display: inline-block; font-size: 21px; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.subtitle .t2-top, .subtitle .t2-bot, .subtitle .t2-mid { display: block; font-size: clamp(14px, 4.2vw, 19px); font-weight: 400; line-height: 1.5; white-space: nowrap; }
.subtitle .hl { color: var(--orange); font-weight: 700; }

.hero { margin: 26px auto 28px; width: 100%; }
.hero__placeholder {
  width: 100%; aspect-ratio: 16 / 11;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255,122,0,.18), rgba(255,154,61,.06));
  border: 2px dashed rgba(255, 154, 61, 0.4);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; color: var(--ink-soft);
}
.hero__placeholder span { font-size: 50px; }
.hero__placeholder small { font-size: 13px; letter-spacing: .5px; }
.hero img { width: 100%; border-radius: var(--radius); display: block; box-shadow: var(--shadow); }

/* ---------- botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%;
  border: none; cursor: pointer;
  font-family: var(--font-btn); font-weight: 700; font-size: 16px; letter-spacing: .3px;
  padding: 18px 24px; border-radius: 999px;
  color: #fff; text-decoration: none;
  min-height: 58px;
  transition: transform .15s ease, box-shadow .25s ease, filter .2s ease, opacity .2s ease;
}
.btn:active { transform: scale(.97); }

.btn--primary {
  background: linear-gradient(135deg, var(--orange-light), var(--orange-dark));
  box-shadow: 0 14px 30px -8px rgba(255, 122, 0, 0.6);
  animation: pulse 2s ease-in-out infinite;
}

.btn--next {
  margin-top: 22px;
  background: linear-gradient(135deg, var(--orange-light), var(--orange-dark));
  box-shadow: 0 14px 30px -8px rgba(255, 122, 0, 0.5);
  animation: pulse 2s ease-in-out infinite;
}
.btn--next:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; filter: grayscale(.4); animation: none; }

.btn--whatsapp {
  margin-top: 4px;
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  box-shadow: 0 14px 34px -8px rgba(37, 211, 102, 0.6);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.025); } }

/* ---------- avatar ---------- */
.avatar { position: relative; width: 80px; height: 80px; margin-bottom: 18px; flex-shrink: 0; }
.avatar__ring {
  position: absolute; inset: -5px; border-radius: 50%;
  background: conic-gradient(var(--orange), var(--orange-light), var(--orange-dark), var(--orange));
  animation: spin 6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.avatar__img {
  position: absolute; inset: 0; border-radius: 50%;
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  display: flex; align-items: center; justify-content: center; font-size: 36px;
  border: 4px solid #ffffff; overflow: hidden;
}
.avatar__img img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- progresso ---------- */
.progress {
  width: 100%; height: 9px;
  background: #ececef;
  border-radius: 999px; overflow: hidden; margin-bottom: 24px;
}
.progress__bar {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--orange-light), var(--orange));
  border-radius: 999px;
  transition: width .5s cubic-bezier(.4, 0, .2, 1);
  box-shadow: 0 0 14px rgba(255, 122, 0, 0.7);
}

/* ---------- card ---------- */
.card {
  width: 100%;
  background: var(--card);
  border-radius: var(--radius);
  padding: 26px 18px;
  border: 1px solid #efeff2;
  box-shadow: 0 18px 50px -24px rgba(0, 0, 0, 0.28);
  display: flex; flex-direction: column; align-items: center;
}

.card__step { color: var(--orange); font-weight: 800; font-size: 13px; letter-spacing: 1.5px; }

.card__media { margin: 16px 0 4px; width: 100%; display: flex; align-items: center; justify-content: center; }
.card__media.is-image { height: 160px; }
.card__media.is-image img { max-height: 160px; max-width: 80%; width: auto; height: auto; object-fit: contain; filter: drop-shadow(0 12px 24px rgba(0,0,0,.18)); }

/* botão de áudio */
.audio-btn {
  display: inline-flex; align-items: center; gap: 12px;
  background: linear-gradient(135deg, #fff3e6, #ffe6cc);
  border: 2px solid rgba(255, 122, 0, .35);
  color: var(--orange-dark); font-weight: 700; font-size: 14px; letter-spacing: .4px;
  padding: 12px 22px 12px 12px; border-radius: 999px; cursor: pointer;
  font-family: var(--font-btn); min-height: 56px; transition: box-shadow .2s ease;
  animation: pulseStrong 1.05s ease-in-out infinite;
}
@keyframes pulseStrong { 0%,100% { transform: scale(1); } 50% { transform: scale(1.06); } }
.audio-btn:active { transform: scale(.97); }
.audio-btn__play {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--orange-light), var(--orange-dark));
  display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0;
  position: relative;
}
.audio-btn.is-playing .audio-btn__play { animation: pulse 1s ease-in-out infinite; }

/* alto-falante some quando toca */
.audio-btn .ic-speaker { transition: opacity .2s ease; }
.audio-btn.is-playing .ic-speaker { display: none; }

/* ondas dentro da bolinha (só aparecem ao tocar) */
.audio-wave { display: none; gap: 3px; align-items: center; height: 20px; }
.audio-btn.is-playing .audio-wave { display: flex; }
.audio-wave span { width: 3px; background: #fff; border-radius: 2px; height: 7px; animation: wave .9s ease-in-out infinite; }
.audio-wave span:nth-child(2){animation-delay:.15s} .audio-wave span:nth-child(3){animation-delay:.3s} .audio-wave span:nth-child(4){animation-delay:.45s}
@keyframes wave { 0%,100%{height:7px} 50%{height:20px} }

.card__question {
  font-size: 21px; font-weight: 800; text-align: center;
  margin: 14px 0 20px; color: var(--ink); line-height: 1.25;
  text-transform: uppercase;
}

/* ---------- opções ---------- */
.options { width: 100%; display: flex; flex-direction: column; gap: 11px; }
.option {
  width: 100%; text-align: left;
  background: #f4f4f6; border: 2px solid transparent;
  border-radius: 14px; padding: 17px 18px;
  font-family: inherit; font-size: 16px; font-weight: 600; color: var(--ink);
  cursor: pointer; min-height: 58px; transition: all .18s ease;
}
.option:active { transform: scale(.99); }
.option.is-selected {
  background: linear-gradient(135deg, #fff3e6, #ffe6cc);
  border-color: var(--orange); color: var(--orange-dark); box-shadow: var(--ring);
}

/* ---------- analisando ---------- */
.screen--analyzing { justify-content: center; }
.analyzing__title { color: var(--ink); font-size: 21px; font-weight: 700; margin-bottom: 20px; text-align: center; }
.recap { list-style: none; width: 100%; display: flex; flex-direction: column; gap: 12px; }
.recap li {
  display: flex; align-items: center; gap: 12px;
  color: var(--ink-soft); font-weight: 600; font-size: 13px;
  padding: 12px 14px; border-radius: 12px; transition: all .3s ease; text-transform: uppercase; letter-spacing: .3px;
}
.recap li::before {
  content: ""; width: 10px; height: 10px; border-radius: 50%;
  background: #d4d4d8; flex-shrink: 0; transition: all .3s ease;
}
.recap li.is-active { background: #fff7ef; color: var(--orange-dark); }
.recap li.is-active::before { background: var(--orange); box-shadow: 0 0 0 4px rgba(255,122,0,.2); }
.recap li.is-done::before { background: var(--green); }

/* ---------- caça-níquel ---------- */
.screen--slot { justify-content: center; }
.slot__title { color: var(--ink); font-size: 24px; font-weight: 800; text-align: center; }
.slot__hint { color: var(--ink-soft); font-size: 14px; margin: 4px 0 18px; text-align: center; }

/* fundo = imagem real do Fortune Tiger; sobrepomos só os rolos e o botão */
.slot {
  position: relative;
  width: 100%;
  aspect-ratio: 1206 / 2131;
  background: url("assets/img/slot/maquina-v9.jpg") center / 100% 100% no-repeat;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 20px 50px -18px rgba(160, 26, 20, .6);
}

/* textos dos 3 retângulos do HUD */
.hud-val {
  position: absolute; top: 79.7%;
  transform: translate(-50%, -50%);
  text-align: center;
  font-family: "Fredoka", system-ui, sans-serif;
  font-weight: 500;
  font-size: clamp(11px, 3vw, 16px);
  color: #a9dcf2;
  z-index: 4; pointer-events: none; white-space: nowrap;
}
.hud-val { top: 80.7%; }
.hud-val--1 { left: 18.6%; }
.hud-val--2 { left: 52.2%; }
.hud-val--3 { left: 85.5%; }
.hud-val--3.rtp { color: #ffe14d; font-weight: 700; }

/* relógio ao vivo (horário de Brasília) sobre o canto superior direito */
.slot__clock {
  position: absolute;
  top: 0.5%; left: 74%; width: 25%;
  text-align: center;
  font-family: "Fredoka", system-ui, sans-serif;
  font-weight: 400;
  font-size: clamp(11px, 3vw, 16px);
  letter-spacing: 0.2px;
  color: #ffffff;
  /* fonte mais fina, mantendo o contorno preto nítido */
  text-shadow: 1px 1px 0 #1a1a1a, -1px 1px 0 #1a1a1a, 1px -1px 0 #1a1a1a, -1px -1px 0 #1a1a1a;
  z-index: 4;
  pointer-events: none;
}

/* rolos sobre a máquina VAZIA (células já são creme na foto) */
.slot__reels { position: absolute; inset: 0; pointer-events: none; }
.reel {
  position: absolute;
  top: 21.5%; height: 45.2%;
  overflow: hidden;
  background: transparent;
}
.reel[data-col="0"] { left: 7.1%;  width: 26%; }
.reel[data-col="1"] { left: 35.8%; width: 28.1%; }
.reel[data-col="2"] { left: 66.7%; width: 25.4%; }
.reel__strip { display: flex; flex-direction: column; will-change: transform; }
.reel__cell { display: flex; align-items: center; justify-content: center; overflow: hidden; }
.reel__cell img { width: 80%; height: 80%; object-fit: contain; display: block; }
.reel__cell.win img { animation: cellPop .5s ease infinite alternate; }
@keyframes cellPop { from { transform: scale(1); } to { transform: scale(1.1); filter: drop-shadow(0 0 10px gold); } }

/* linha de pagamento (linha do meio) */
.slot__payline {
  position: absolute; left: 6%; width: 88%;
  top: 36.6%; height: 15.1%;
  border: 4px solid transparent; border-radius: 8px;
  pointer-events: none; transition: all .3s ease; z-index: 3;
}
.slot__payline.on { border-color: #ffe14d; box-shadow: 0 0 22px rgba(255,225,77,.9), inset 0 0 18px rgba(255,225,77,.4); }

/* botão sobre o verde da imagem */
.slot-spin {
  position: absolute; left: 50%; top: 90.5%;
  transform: translate(-50%, -50%);
  width: 21%; aspect-ratio: 1; border-radius: 50%;
  background: transparent; border: none; cursor: pointer;
  box-shadow: 0 0 0 0 rgba(87,227,107,.7);
  animation: spinGlow 1.6s ease-in-out infinite;
}
.slot-spin:active { transform: translate(-50%, -50%) scale(.92); }
.slot-spin.spinning { pointer-events: none; animation: none; }
@keyframes spinGlow {
  0%,100% { box-shadow: 0 0 0 0 rgba(87,227,107,.6); }
  50% { box-shadow: 0 0 22px 6px rgba(87,227,107,.85); }
}

@media (min-width: 480px) {
  .slot__ganho { font-size: 13px; }
}

/* win + continuar */
.slot__win {
  text-align: center; font-weight: 900; font-size: 24px; color: var(--orange);
  min-height: 0; height: 0; overflow: hidden; opacity: 0; transition: all .4s ease; margin-top: 0;
}
.slot__win.show { height: auto; min-height: 40px; opacity: 1; margin-top: 18px; }
.slot__continue { margin-top: 16px; display: none; }
.slot__continue.show { display: inline-flex; }

@media (max-width: 380px) {
  .reel { --cell: 74px; }
  .slot__payline { height: 74px; }
}

/* ---------- resultado ---------- */
.card--result { padding: 32px 22px; text-align: center; }
.result__title { font-size: 38px; font-weight: 900; color: var(--orange); letter-spacing: .5px; }
.result__sub { color: var(--ink-soft); margin-top: 4px; font-size: 15px; }
.result__score {
  margin: 20px 0; width: 100%; padding: 18px;
  background: #f4f4f6; border-radius: 14px;
  font-size: 21px; font-weight: 800; color: var(--ink);
}
.result__emoji { font-size: 52px; line-height: 1; }
.result__level { font-size: 23px; font-weight: 800; margin-top: 12px; }
.result__msg { color: var(--ink-soft); margin-top: 10px; font-size: 15px; line-height: 1.5; }

/* destaque "ganhou um giro" na página de parabéns */
.result__giro {
  position: relative; overflow: hidden;
  margin-top: 24px; width: 100%; min-height: 64px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #fff3e6, #ffe0c0);
  border: 2px solid var(--orange);
  border-radius: 16px;
  padding: 16px 18px;
  text-align: center; font-size: 18px; font-weight: 700; color: var(--ink);
  box-shadow: 0 10px 26px -12px rgba(255,122,0,.6);
}
.result__giro strong { color: var(--orange); font-weight: 800; }
.screen--result #btn-girar { margin-top: 16px; }

/* ----- presente que abre ----- */
.gift__content {
  opacity: 0; transform: scale(.7);
  transition: opacity .45s ease .3s, transform .55s cubic-bezier(.2, 1.5, .4, 1) .3s;
}
.gift__lid {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #ff9a3d, #e85d00);
  z-index: 2;
  transition: transform .6s cubic-bezier(.5, -0.4, .3, 1.3), opacity .45s ease .15s;
}
/* fita do presente (cruz dourada) */
.gift__lid::before, .gift__lid::after {
  content: ""; position: absolute;
  background: linear-gradient(180deg, #ffe79a, #e7a72b);
  box-shadow: inset 0 0 4px rgba(0,0,0,.2);
}
.gift__lid::before { left: 50%; top: 0; bottom: 0; width: 14px; transform: translateX(-50%); background: linear-gradient(90deg, #e7a72b, #ffe79a, #e7a72b); }
.gift__lid::after { top: 50%; left: 0; right: 0; height: 14px; transform: translateY(-50%); }

/* laço 3D saindo pra fora do topo */
.gift__bow {
  position: absolute; left: 50%; top: -20px; transform: translateX(-50%);
  width: 84px; height: 44px; z-index: 3;
  filter: drop-shadow(0 4px 5px rgba(0,0,0,.35));
}
.gift__loop {
  position: absolute; top: 2px; width: 40px; height: 40px;
  background: radial-gradient(circle at 35% 30%, #fff1bd, #f0b53a 55%, #c9810f);
  box-shadow: inset -4px -5px 8px rgba(150,80,0,.5), inset 3px 3px 6px rgba(255,255,255,.6);
}
.gift__loop--l { left: 0;  border-radius: 80% 40% 70% 30% / 70% 50% 60% 40%; transform: rotate(-12deg); }
.gift__loop--r { right: 0; border-radius: 40% 80% 30% 70% / 50% 70% 40% 60%; transform: rotate(12deg); }
/* "buraco" interno dos loops (cara de laço) */
.gift__loop::after {
  content: ""; position: absolute; top: 50%; left: 50%; width: 13px; height: 13px;
  transform: translate(-50%,-50%); border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #c9810f, #a3650a);
  box-shadow: inset 0 1px 2px rgba(0,0,0,.4);
}
.gift__knot {
  position: absolute; left: 50%; top: 8px; transform: translateX(-50%);
  width: 20px; height: 24px; z-index: 2; border-radius: 7px;
  background: linear-gradient(180deg, #ffe79a, #d9930f);
  box-shadow: inset -2px -2px 4px rgba(120,60,0,.5), inset 2px 2px 3px rgba(255,255,255,.6);
}
.gift__tail {
  position: absolute; top: 30px; width: 14px; height: 26px; z-index: 1;
  background: linear-gradient(180deg, #ffd668, #c9810f);
}
.gift__tail--l { left: 28px; transform: rotate(14deg); border-radius: 3px 3px 0 6px; clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 78%, 0 100%); }
.gift__tail--r { right: 28px; transform: rotate(-14deg); border-radius: 3px 3px 6px 0; clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 78%, 0 100%); }

/* balança enquanto fechado (chama atenção) */
.result__giro:not(.opened) { animation: giftWiggle 1s ease-in-out infinite; }
@keyframes giftWiggle { 0%,100% { transform: rotate(-1.6deg) scale(1); } 50% { transform: rotate(1.6deg) scale(1.04); } }

/* abre: tampa sobe e some, conteúdo aparece */
.result__giro.opened { animation: pulse 2s ease-in-out infinite; }
.result__giro.opened .gift__lid { transform: translateY(-115%) rotate(-7deg); opacity: 0; pointer-events: none; }
.result__giro.opened .gift__content { opacity: 1; transform: scale(1); }

/* popup WhatsApp em cima do caça-níquel */
.slot-popup {
  position: fixed; inset: 0; z-index: 50;
  display: none; align-items: center; justify-content: center;
  background: transparent;
  padding: 24px;
}
.slot-popup.show { display: flex; }
.slot-popup__inner {
  width: 100%; max-width: 360px;
  display: flex; flex-direction: column; align-items: center;
  animation: popIn .4s cubic-bezier(.2, 1.3, .4, 1) both;
}
@keyframes popIn { from { opacity: 0; transform: scale(.8) translateY(10px); } to { opacity: 1; transform: scale(1) translateY(0); } }

.slot-popup__won {
  font-weight: 800; font-size: 23px; color: var(--ink); line-height: 1.3;
  text-align: center; margin-bottom: 14px;
}
.slot-popup__won .rtp-blue {
  background: linear-gradient(180deg, #6fd2ff, #1f7be0);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 9px rgba(80, 180, 255, 0.6);
}

.slot-popup__card {
  position: relative; z-index: 2; width: 100%;
  background: #fff; border-radius: 22px;
  padding: 28px 22px;
  text-align: center;
  box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.6);
}
.slot-popup__label { font-weight: 800; font-size: 18px; color: var(--ink); line-height: 1.35; margin-top: 18px; margin-bottom: 18px; }

/* vídeo dentro do card, embaixo do botão (mantém o formato original) */
.slot-popup__video {
  width: 100%; height: auto; display: block;
  margin: 16px auto 0;
  border-radius: 14px;
  box-shadow: 0 8px 16px -6px rgba(0,0,0,.25);
}

/* desfoca o caça-níquel E o texto de cima quando o popup abre (sem sombra) */
.slot.blur, .slot__title.blur, .slot__hint.blur { filter: blur(5px); transition: filter .3s ease; }

.result__cta-label { color: var(--ink); font-weight: 800; font-size: 19px; text-align: center; margin-top: 26px; line-height: 1.35; padding: 0 6px; }
.result__arrow { color: var(--orange); font-size: 28px; font-weight: 900; margin: 6px 0 12px; animation: bounce 1.4s ease-in-out infinite; }
@keyframes bounce { 0%,100%{transform:translateY(0)} 50%{transform:translateY(8px)} }

/* ---------- footer ---------- */
.footer { color: #a0a0aa; font-size: 11px; padding: 18px 18px calc(18px + var(--safe-bottom)); text-align: center; position: relative; z-index: 1; }

/* ---------- confetti ---------- */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 5; display: none; }
.confetti.is-on { display: block; }

/* telas maiores: centraliza o "celular" */
@media (min-width: 520px) {
  .stage { max-width: 460px; }
  .card { padding: 30px 26px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
