/* Vivo Quiz Samsung */

/* ============================================================
   FONTES
============================================================ */
@font-face {
  font-family: 'VivoType';
  src: url('../fonts/VivoTypeLight.otf') format('opentype');
  font-weight: 300;
  font-style: normal;
}

@font-face {
  font-family: 'VivoType';
  src: url('../fonts/VivoTypeRegular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'VivoType';
  src: url('../fonts/VivoTypeBold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
}

/* ============================================================
   RESET & BASE
============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --roxo-base:   #5B0FA8;
  --roxo-escuro: #3D0870;
  --branco:      #ffffff;
  --verde-ok:    rgba(80, 220, 100, 0.45);
  --verde-borda: #50DC64;
  --vermelho-err:rgba(220, 60,  60, 0.45);
  --vermelho-borda:#DC3C3C;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'VivoType', sans-serif;
  background: var(--roxo-base);
  color: var(--branco);
  -webkit-user-select: none;
  user-select: none;
}

#app {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

/* ============================================================
   SCREENS
============================================================ */
.screen {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.38s ease;
}

.screen.ativa {
  opacity: 1;
  pointer-events: all;
}

/* ============================================================
   FUNDO ROXO COM BLOBS
============================================================ */
.bg-roxo {
  background:
    radial-gradient(ellipse 68% 78% at 88% 12%, #B060F0 0%, #8030C8 32%, transparent 62%),
    radial-gradient(ellipse 58% 68% at 12% 88%, #8540C0 0%, #6020A8 36%, transparent 64%),
    var(--roxo-base);
}

#s-loja, #s-intro {
  background: url('../imagens/bg.jpg') center / cover no-repeat;
}

#s-produto-2 {
  background: var(--roxo-base) url('../imagens/tela-produto-2.png') center / contain no-repeat;
  cursor: pointer;
}

#s-produto-1 {
  background: var(--roxo-base) url('../imagens/tela3.jpg') center / contain no-repeat;
  cursor: pointer;
}

/* ============================================================
   LOGO LOCKUP (canto inferior direito em todas as telas)
============================================================ */
img.logo-lockup {
  position: absolute;
  bottom: 22px;
  right: 28px;
  height: 56px;
  object-fit: contain;
  pointer-events: none;
}

/* ============================================================
   BOTÕES BASE
============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: none;
  cursor: pointer;
  font-family: 'VivoType', sans-serif;
  font-weight: 700;
  letter-spacing: 0.5px;
  transition: transform 0.12s, opacity 0.12s;
}

.btn:active { transform: scale(0.96); }

.btn-glass {
  background: rgba(255,255,255,0.14);
  border: 2px solid rgba(255,255,255,0.32);
  color: var(--branco);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 50px;
  padding: 14px 52px;
  font-size: 18px;
}

.btn-branco {
  background: var(--branco);
  color: var(--roxo-escuro);
  border-radius: 50px;
  padding: 14px 52px;
  font-size: 18px;
}

/* ============================================================
   S1 — ESCOLHA DA LOJA
============================================================ */
#s-loja .loja-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  width: 100%;
  max-width: 540px;
  padding: 20px 32px;
}

#s-loja .loja-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

#s-loja .loja-logos img {
  height: 66px;
  object-fit: contain;
}

#s-loja .loja-titulo {
  font-size: 26px;
  font-weight: 700;
  text-align: center;
  line-height: 1.3;
}

#s-loja .loja-sub {
  font-size: 15px;
  opacity: 0.75;
  text-align: center;
  margin-top: -14px;
}

.sel-wrap {
  width: 100%;
  position: relative;
}

.sel-wrap select {
  width: 100%;
  padding: 15px 44px 15px 20px;
  border-radius: 12px;
  border: 2px solid rgba(255,255,255,0.28);
  background: rgba(255,255,255,0.1);
  color: var(--branco);
  font-family: 'VivoType', sans-serif;
  font-size: 16px;
  font-weight: 500;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
}

.sel-wrap select.erro {
  border-color: var(--vermelho-borda);
  animation: shake 0.3s ease;
}

.sel-wrap select option {
  background: #4A0D80;
  color: var(--branco);
}

.sel-arrow {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 18px;
  opacity: 0.7;
}

@keyframes shake {
  0%,100% { transform: translateX(0); }
  25%      { transform: translateX(-6px); }
  75%      { transform: translateX(6px); }
}

/* ============================================================
   S2 — INTRO / DESAFIO
============================================================ */
#s-intro {
  cursor: pointer;
}

#s-intro .intro-inner {
  position: absolute;
  left: 5%;
  top: 50%;
  transform: translateY(-52%);
  width: 58%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
}

#s-intro .intro-label {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 10px;
  text-transform: uppercase;
  opacity: 0.85;
}

#s-intro .intro-titulo {
  font-size: 90px;
  font-weight: 800;
  text-transform: uppercase;
  line-height: 0.95;
}

#s-intro .intro-sub {
  font-size: 22px;
  font-weight: 400;
  opacity: 0.9;
  line-height: 1.5;
  margin-top: 6px;
}

#s-intro .intro-play {
  width: 170px;
  height: 170px;
  object-fit: contain;
  margin-top: 24px;
  cursor: pointer;
  opacity: 0.9;
  transition: transform 0.15s, opacity 0.15s;
}

#s-intro .intro-play:hover {
  transform: scale(1.06);
  opacity: 1;
}

/* ============================================================
   S3 — PRODUTO 1
============================================================ */
#s-produto-1 {
  cursor: pointer;
  padding: 0 6% 0 8%;
}

.prod-inner {
  display: flex;
  align-items: center;
  width: 100%;
  height: 100%;
  gap: 40px;
}

.prod-texto {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.prod-tag {
  font-size: 40px;
  font-weight: 800;
  font-style: italic;
  line-height: 1.1;
  background: linear-gradient(90deg, #FFE060, #A0F070);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.prod-slogan {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.85;
  max-width: 340px;
  line-height: 1.5;
}

.prod-nome {
  font-size: 26px;
  font-weight: 800;
  text-transform: uppercase;
  margin-top: 6px;
}

.prod-specs {
  display: flex;
  gap: 28px;
  margin-top: 10px;
}

.spec {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.spec-lbl {
  font-size: 10px;
  opacity: 0.65;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.spec-val {
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
}

.spec-sub {
  font-size: 9px;
  opacity: 0.65;
  text-transform: uppercase;
}

.prod-features {
  display: flex;
  gap: 20px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.feat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  width: 72px;
  text-align: center;
}

.feat img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  opacity: 0.9;
}

.feat span {
  font-size: 9px;
  opacity: 0.8;
  line-height: 1.3;
}

.prod-hint {
  font-size: 12px;
  opacity: 0.45;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 20px;
}

.prod-img-area {
  flex: 0 0 auto;
  position: relative;
  display: flex;
  align-items: flex-end;
  height: 100%;
}

.prod-img {
  height: 260px;
  object-fit: contain;
  display: block;
}

.prod-mascote {
  position: absolute;
  right: -30px;
  bottom: 0;
  height: 85%;
  object-fit: contain;
}

/* Onda decorativa */
.prod-onda {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 45%;
  height: 55%;
  background: rgba(255,255,255,0.04);
  border-radius: 0 80% 0 0;
  pointer-events: none;
}

/* ============================================================
   S4 — CONCENTRE-SE
============================================================ */
#s-concentre {
  cursor: pointer;
}

.concentre-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.concentre-titulo {
  font-size: 68px;
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1;
}

.concentre-sub {
  font-size: 20px;
  font-weight: 400;
  letter-spacing: 4px;
  text-transform: uppercase;
  opacity: 0.85;
}

/* Contador regressivo */
.concentre-count {
  position: relative;
  width: 180px;
  height: 180px;
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.count-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.count-ring-bg {
  fill: none;
  stroke: rgba(255,255,255,0.12);
  stroke-width: 5;
}

.count-ring-fill {
  fill: none;
  stroke: rgba(255,255,255,0.75);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 339.3;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.92s linear;
}

#countdown-num {
  position: relative;
  font-size: 110px;
  font-weight: 800;
  line-height: 1;
  text-shadow: 0 0 48px rgba(255,255,255,0.35);
}

#countdown-num.pop {
  animation: num-pop 0.9s ease-out forwards;
}

@keyframes num-pop {
  0%   { transform: scale(1.5); opacity: 0; }
  18%  { transform: scale(1.0); opacity: 1; }
  72%  { transform: scale(1.0); opacity: 1; }
  100% { transform: scale(0.55); opacity: 0; }
}

/* ============================================================
   TRANSIÇÃO "PÁGINA RASGANDO" (tela de mídia)
============================================================ */
.tear-top, .tear-bottom {
  position: absolute;
  left: 0;
  width: 100%;
  z-index: 8;
  pointer-events: none;
  will-change: transform;
}

.tear-top {
  top: 0;
  height: 54%;
  background: radial-gradient(ellipse 110% 120% at 50% -10%, #A050E0 0%, #7020B8 45%, #5B0FA8 100%);
  clip-path: polygon(
    0 0, 100% 0, 100% 82%,
    96% 89%, 91% 82%, 87% 91%, 82% 84%, 78% 93%,
    73% 85%, 68% 92%, 63% 84%, 58% 91%, 53% 84%,
    48% 92%, 43% 85%, 38% 91%, 33% 83%, 28% 92%,
    23% 85%, 18% 90%, 13% 83%, 8% 91%, 3% 84%, 0 90%
  );
  filter: drop-shadow(0 6px 12px rgba(0,0,0,0.5));
}

.tear-bottom {
  bottom: 0;
  height: 54%;
  background: radial-gradient(ellipse 110% 120% at 50% 110%, #A050E0 0%, #7020B8 45%, #5B0FA8 100%);
  clip-path: polygon(
    0 18%, 5% 10%, 10% 18%, 15% 9%, 20% 17%,
    25% 9%, 30% 18%, 35% 10%, 40% 17%, 45% 9%,
    50% 18%, 55% 10%, 60% 17%, 65% 9%, 70% 18%,
    75% 10%, 80% 17%, 85% 9%, 90% 18%, 95% 10%,
    100% 17%, 100% 100%, 0 100%
  );
  filter: drop-shadow(0 -6px 12px rgba(0,0,0,0.5));
}

.tear-top.rasgando {
  animation: rasgar-cima 0.72s cubic-bezier(0.4, 0, 0.7, 0.3) forwards;
}

.tear-bottom.rasgando {
  animation: rasgar-baixo 0.72s cubic-bezier(0.4, 0, 0.7, 0.3) forwards;
}

@keyframes rasgar-cima {
  0%   { transform: translateY(0)     rotate(0deg);  }
  100% { transform: translateY(-112%) rotate(-1.5deg); }
}

@keyframes rasgar-baixo {
  0%   { transform: translateY(0)    rotate(0deg);  }
  100% { transform: translateY(112%) rotate(1.5deg); }
}

/* ============================================================
   S5 — MÍDIA (vídeo / imagem)
============================================================ */
#s-midia {
  background: #000;
}

#s-midia video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

#midia-img-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #111;
  cursor: pointer;
}

#img-midia {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.video-overlay {
  position: absolute;
  top: 24px;
  right: 28px;
  pointer-events: none;
}

.video-overlay > * { pointer-events: all; }

#btn-skip {
  background: rgba(255,255,255,0.18);
  border: 1.5px solid rgba(255,255,255,0.35);
  border-radius: 30px;
  color: white;
  font-family: 'VivoType', sans-serif;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 22px;
  cursor: pointer;
  letter-spacing: 1px;
  backdrop-filter: blur(8px);
}

.img-tap-hint {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 13px;
  opacity: 0.55;
  letter-spacing: 2px;
  text-transform: uppercase;
  pointer-events: none;
}

/* ============================================================
   S6 — PERGUNTA
============================================================ */
#s-pergunta {
  padding: 32px 72px 28px;
  justify-content: center;
  gap: 20px;
}

.pg-header {
  position: absolute;
  top: 28px;
  left: 72px;
  right: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pg-num {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.65;
}

.timer {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  transition: border-color 0.3s, color 0.3s;
}

.timer.urgente {
  border-color: #FF5555;
  color: #FF5555;
}

.pg-enunciado {
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  line-height: 1.55;
  max-width: 820px;
  margin: 0 auto;
}

#pg-respostas {
  display: flex;
  flex-direction: column;
  gap: 11px;
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
}

.btn-resp {
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
  padding: 15px 26px;
  border-radius: 12px;
  border: 1.5px solid rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.1);
  color: var(--branco);
  cursor: pointer;
  font-family: 'VivoType', sans-serif;
  font-size: 18px;
  font-weight: 600;
  text-align: left;
  transition: background 0.18s, transform 0.1s, border-color 0.2s;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.btn-resp:hover:not(:disabled) {
  background: rgba(255,255,255,0.2);
}

.btn-resp:active:not(:disabled) {
  transform: scale(0.98);
}

.btn-resp:disabled {
  cursor: default;
}

.resp-letra {
  font-weight: 800;
  flex-shrink: 0;
  width: 26px;
}

.btn-resp.certa {
  background: var(--verde-ok);
  border-color: var(--verde-borda);
}

.btn-resp.errada {
  background: var(--vermelho-err);
  border-color: var(--vermelho-borda);
}

/* ============================================================
   S7 — PRODUTO INTERMEDIÁRIO
============================================================ */
.btn-produto-2-continuar {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255,255,255,0.18);
  border: 2px solid rgba(255,255,255,0.38);
  border-radius: 50px;
  color: #fff;
  font-family: 'VivoType', sans-serif;
  font-size: 18px;
  font-weight: 700;
  padding: 14px 52px;
  cursor: pointer;
  letter-spacing: 0.5px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.12s, opacity 0.12s;
}

.btn-produto-2-continuar:active { transform: translateX(-50%) scale(0.96); }

/* ============================================================
   S8 — CALCULANDO PONTOS
============================================================ */
#s-calculando .calc-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

.calc-titulo {
  font-size: 46px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.spinner {
  width: 56px;
  height: 56px;
  border: 4px solid rgba(255,255,255,0.2);
  border-top-color: var(--branco);
  border-radius: 50%;
  animation: girar 0.75s linear infinite;
}

@keyframes girar {
  to { transform: rotate(360deg); }
}

/* ============================================================
   S9 — RESULTADO
============================================================ */
#s-resultado .res-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  max-width: 640px;
  padding: 20px;
}

.res-titulo {
  font-size: 58px;
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1;
}

.res-texto {
  font-size: 20px;
  font-weight: 400;
  opacity: 0.9;
  line-height: 1.55;
}

.res-pontos {
  font-size: 22px;
  font-weight: 700;
  opacity: 0.7;
  margin-top: 4px;
}

.res-final {
  font-size: 16px;
  font-weight: 400;
  opacity: 0.75;
  margin-top: 12px;
  font-style: italic;
  line-height: 1.5;
}

#s-resultado .res-btns {
  margin-top: 20px;
}
