* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  width: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* fundo tema futebol Brasil */
  background: linear-gradient(180deg,
    #0288D1 0%,
    #29B6F6 35%,
    #4FC3F7 65%,
    #B3E5FC 100%
  );

  color:#fff;
  overflow-x:hidden;
  overflow-y:hidden;

  /* se você quer centralizar o conteúdo, ok */
  display:flex;
  justify-content:center;
}

.app {
  width: 100%;
  max-width: 500px;
  height: 100svh;
  margin: 0 auto;
  padding: 10px 0 max(10px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 6px;
}

@supports not (height: 100svh) {
  .app {
    height: 100vh;
  }
}

:root {
  /* região clara do tutorial (buraco) */
  --tutorial-hole-top: 48%;
  --tutorial-hole-height: 34%;
  --tutorial-hole-left: 6%;
  --tutorial-hole-right: 6%;
}

/* TOPO */

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
  padding: 0 8px;
  flex-shrink: 0;
}

.icon-button {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
  padding: 0;
  flex-shrink: 0;
  position: relative;
}

/* Expands tap target to 44×44px without changing the visual size */
.icon-button::before {
  content: '';
  position: absolute;
  inset: -8px;
}

.back-icon {
  font-size: 12px;
  line-height: 1;
  color: #ffffff;
}

.icon-wrapper {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-wrapper img {
  max-width: 165%;
  max-height: 165%;
  display: block;
  filter: brightness(0) invert(1);
}

.logo-wrapper {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 0;
}

.logo-wrapper img {
  height: 50px;
  max-width: 80%;
  object-fit: contain;
  display: block;
}

/* CARTÃO DE SALDO */

.balance-card {
  width: calc(100% - 16px);
  margin: 0 auto;
  padding: 0;
  flex-shrink: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
  position: relative;
}

.balance-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 14px 10px;
  background: #1565C0;
  border-radius: 8px;
  box-shadow: 0 1px 30px rgba(0, 0, 0, 0.35);
  position: relative;
  z-index: 2;
}

.profile-area {
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-pic {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #FFB300;
  flex-shrink: 0;
}

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

.label-small {
  font-size: 12px;
  opacity: 0.9;
}

.balance-value {
  font-size: 19px;
  font-weight: 700;
}

.balance-value .currency {
  font-size: 13px;
  margin-right: 3px;
}

.min-withdraw {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.btn-resgatar {
  border: none;
  border-radius: 999px;
  padding: 6px 16px;
  background: #FFB300;
  color: #0D47A1;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

/* desabilitada antes dos 7 chutes */
.btn-resgatar[disabled] {
  opacity: 0.55;
  cursor: default;
}

/* habilita depois do último chute */
.btn-resgatar.btn-resgatar--white {
  background: #ffffff;
  color: #3c3c3c;
  box-shadow: 0 0 0 rgba(0,0,0,0);
  opacity: 1;
}

.balance-footer {
  padding: 22px 14px 8px;
  background: #01579B;
  border-radius: 8px;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1;
  margin-top: -15px;
}

.expires {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.time-chip {
  min-width: 22px;
  padding: 2px 5px;
  border-radius: 6px;
  background: #0277BD;
  text-align: center;
  font-weight: 600;
  font-size: 11px;
}

.more-link {
  border: none;
  background: transparent;
  color: #ffffff;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}

.more-link::after {
  content: " ›";
}

/* ===== FRAME DO JOGO ===== */

.game-frame {
  position: relative;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  flex: 1;
}

.game-frame::before {
  content: "";
  display: block;
  padding-top: 130%;
}

.game-bg {
  position: absolute;
  inset: 0;
  background-image: url("../images/jogo-area17.webp");
  background-size: 100% 100%;
  background-position: center top;
  background-repeat: no-repeat;
  z-index: 0;
}

.play-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* BOLA */

.kick-ball {
  position: absolute;
  width: 90px;
  max-width: 22vw;
  bottom: 11%;
  left: 50%;
  transform: translateX(-50%) scale(1);
  opacity: 0;
  transition:
    opacity 0.25s linear,
    bottom 1.1s cubic-bezier(.16,.84,.37,1),
    left  1.1s cubic-bezier(.16,.84,.37,1),
    transform 1.1s cubic-bezier(.16,.84,.37,1);
  pointer-events: none;
}

.kick-ball.visible {
  opacity: 1;
}

/* PERNA */

.kick-leg {
  position: absolute;
  width: 230px;
  max-width: 44vw;
  bottom: 13%;
  left: -20%;
  transform: translateX(-100%) rotate(0deg);
  transform-origin: 100% 20%;
  opacity: 0;
  transition:
    opacity 0.25s linear,
    transform 0.45s ease-out;
  pointer-events: none;
}

.kick-leg.visible {
  opacity: 1;
  transform: translateX(0) rotate(0deg);
}

.kick-leg.visible.kicking {
  transform: translateX(10%) rotate(-30deg);
}

.kick-hotspot {
  position: absolute;
  bottom: 7%;
  left: 50%;
  transform: translateX(-50%);
  width: 40%;
  height: 12%;
  border: none;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
  outline: none;
}

@media (min-width: 768px) {
  .app { padding: 12px 24px 12px; }
  .logo-wrapper img { height: 64px; }
}

/* CONTADOR DE CHUTES */
.shots-counter {
  position: absolute;
  bottom: 2%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.6);
  pointer-events: none;
  white-space: nowrap;
}

/* HOTSPOTS INVISÍVEIS PARA MAIS CHANCES / QR CODE */
.hotspot-extra {
  position: absolute;
  bottom: 0%;
  width: 30%;
  height: 14%;
  background: transparent;
  border: none;
  cursor: pointer;
  pointer-events: auto;
}

.hotspot-extra-left {
  left: 2%;
}

.hotspot-extra-right {
  right: 2%;
}

/* ===== MODAIS ===== */

.screen {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(3px);
  z-index: 999;
}

.screen.is-modal {
  display: flex;
}

.screen .modal-inner {
  width: 100%;
  max-width: 380px;
  padding: 0 16px;
  max-height: 90dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.screen.is-modal .modal-inner * {
  pointer-events: auto;
}

@keyframes popupIn {
  from { opacity: 0; transform: translateY(10px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0)   scale(1); }
}

@keyframes popupGlow {
  0%   { box-shadow: 0 0 0px rgba(255,215,0,0); }
  40%  { box-shadow: 0 0 40px rgba(255,215,0,0.7), 0 0 80px rgba(255,165,0,0.4); }
  100% { box-shadow: 0 22px 45px rgba(255,255,255,0); }
}

@keyframes popupShake {
  0%,100% { transform: translateY(0) scale(1); }
  15%      { transform: translateY(-6px) scale(1.03); }
  30%      { transform: translateY(2px) scale(0.99); }
  50%      { transform: translateY(-3px) scale(1.01); }
  70%      { transform: translateY(1px) scale(1); }
}

.popup {
  padding: 30px 22px 22px;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
  overflow: visible;
  border-radius: 24px;
  background: #ffffff;
  position: relative;
  margin: 12px auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  box-shadow: 0 22px 45px rgba(255, 255, 255, 0);
  border: 1px solid #f1e3dd;
  animation: popupIn 0.3s ease-out, popupGlow 1.2s ease-out 0.2s, popupShake 0.5s ease-out 0.3s;
}

.popup.invite-popup {
  background: #ffffff00;
  border-color: #ffffff00;
  color: #ffffff;
}

.invite-popup .popup-title,
.invite-popup .popup-subtext {
  color: #ffffff;
}

.popup-ball-wrapper {
  position: absolute;
  top: -52px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.popup-ball-wrapper img {
  width: 130px;
  height: 130px;
  object-fit: contain;
  display: block;
}

.popup-content {
  margin-top: 36px;
}

.popup-title {
  font-size: 22px;
  font-weight: 800;
  color: #111111;
  margin-bottom: 8px;
}

.popup-subtext {
  font-size: 14px;
  color: #111111;
  line-height: 1.4;
  margin-bottom: 16px;
}

.popup-amount-big {
  font-size: 32px;
  font-weight: 900;
  color: #111111;
  margin-bottom: 16px;
}

.popup-expira {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  color: #333333;
  margin-bottom: 22px;
}

.popup-expira-label {
  font-weight: 700;
}

.popup-expira-time {
  font-family: "SF Mono", ui-monospace, monospace;
  letter-spacing: 1px;
}

.btn-resgatar-popup {
  margin-top: 4px;
  width: 100%;
  border: none;
  border-radius: 999px;
  padding: 12px 16px;
  background: #fe2c55;
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(254, 44, 85, 0.45);
}

.btn-resgatar-popup:active {
  transform: scale(0.97);
}

.popup-valor-tiktok {
  color: #fe2c55;
  font-weight: 700;
}

.invite-close {
  margin-top: 10px;
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 13px;
  opacity: 0.9;
  cursor: pointer;
}

/* POPUP DO QR CODE (imagem inteira + X) */
.qr-popup-wrapper {
  position: relative;
  width: 100%;
  max-width: 360px;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 22px 45px rgba(0,0,0,0.5);
}

.qr-popup-image {
  display: block;
  width: 100%;
  height: auto;
}

.qr-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: none;
  background: rgba(0,0,0,0.45);
  color: #ffffff;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== TEXTO DO PRÊMIO +R$ XX ===== */

.reward-flash {
  position: absolute;
  left: 50%;
  bottom: 20%;
  transform: translateX(-50%) scale(0.4);
  opacity: 0;
  font-size: 46px;
  font-weight: 800;
  color: #ffe8b0;
  text-shadow:
    0 0 8px rgba(255, 210, 90, 0.9),
    0 0 22px rgba(255, 190, 70, 0.95),
    0 8px 24px rgba(0, 0, 0, 0.55);
  pointer-events: none;
  white-space: nowrap;
}

.reward-flash .prefix {
  font-size: 24px;
  margin-right: 4px;
  opacity: 0.95;
}

.reward-flash::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 260px;
  height: 260px;
  margin-left: -130px;
  margin-top: -130px;
  border-radius: 50%;
  border: 4px solid rgba(255, 222, 145, 0.95);
  box-shadow:
    0 0 18px rgba(255, 210, 90, 0.8),
    0 0 42px rgba(255, 210, 90, 0.8);
  opacity: 0;
  transform: scale(0.5);
  transform-origin: center;
}

.reward-flash::after {
  content: "";
  position: absolute;
  right: -28px;
  top: -4px;
  width: 26px;
  height: 26px;
  background: radial-gradient(circle at 30% 30%, #ffffff, #ffe28a 60%, rgba(255, 190, 0, 0) 75%);
  filter: drop-shadow(0 0 8px rgba(255, 210, 90, 0.9));
  clip-path: polygon(
    50% 0%,
    61% 35%,
    98% 35%,
    68% 57%,
    79% 91%,
    50% 70%,
    21% 91%,
    32% 57%,
    2% 35%,
    39% 35%
  );
  opacity: 0;
  transform: scale(0.3) rotate(-25deg);
  transform-origin: center;
}

.reward-flash.is-animating {
  animation: rewardPop 1.8s ease-out forwards;
}

.reward-flash.is-animating::before {
  animation: rewardRing 1.8s ease-out forwards;
}

.reward-flash.is-animating::after {
  animation: rewardStar 1.8s ease-out forwards;
}

/* ── Animação GRAND (último chute — valor alto) ── */
.reward-flash.is-animating-grand {
  animation: rewardPopGrand 4.5s ease-out forwards;
}

.reward-flash.is-animating-grand::before {
  animation: rewardRingGrand 4.5s ease-out forwards;
}

.reward-flash.is-animating-grand::after {
  animation: rewardStarGrand 4.5s ease-out forwards;
}

@keyframes rewardPopGrand {
  0%   { opacity: 0;   transform: translateX(-50%) scale(0.2);  font-size: 46px; }
  8%   { opacity: 1;   transform: translateX(-50%) scale(1.35); }
  15%  { opacity: 1;   transform: translateX(-50%) scale(1.0);  }
  55%  { opacity: 1;   transform: translateX(-50%) scale(1.0);  font-size: 46px; }
  65%  { opacity: 1;   transform: translateX(-50%) scale(1.18); font-size: 62px; }
  75%  { opacity: 1;   transform: translateX(-50%) scale(1.12); font-size: 62px; }
  88%  { opacity: 1;   transform: translateX(-50%) scale(1.12); font-size: 62px; }
  100% { opacity: 0;   transform: translateX(-50%) scale(1.05); font-size: 62px; }
}

@keyframes rewardRingGrand {
  0%   { opacity: 0; transform: scale(0.3); box-shadow: 0 0 18px rgba(255,210,90,0.8), 0 0 42px rgba(255,210,90,0.8); }
  8%   { opacity: 1; transform: scale(1.1); }
  15%  { opacity: 1; transform: scale(1.0); }
  65%  { opacity: 1; transform: scale(1.4); box-shadow: 0 0 40px rgba(255,210,90,1), 0 0 90px rgba(255,190,50,1); }
  88%  { opacity: 1; transform: scale(1.5); }
  100% { opacity: 0; transform: scale(1.6); }
}

@keyframes rewardStarGrand {
  0%   { opacity: 0; transform: scale(0.3) rotate(-25deg); }
  10%  { opacity: 1; transform: scale(1.4) rotate(0deg);   }
  55%  { opacity: 1; transform: scale(1.1) rotate(10deg);  }
  65%  { opacity: 1; transform: scale(1.8) rotate(-15deg); }
  88%  { opacity: 1; transform: scale(1.6) rotate(20deg);  }
  100% { opacity: 0; transform: scale(1.2) rotate(30deg);  }
}

@keyframes rewardPop {
  0% {
    opacity: 0;
    transform: translateX(-50%) scale(0.4);
  }
  20% {
    opacity: 1;
    transform: translateX(-50%) scale(1.2);
  }
  60% {
    opacity: 1;
    transform: translateX(-50%) scale(1.02);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) scale(0.9);
  }
}

@keyframes rewardRing {
  0% {
    opacity: 0;
    transform: scale(0.5);
  }
  25% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.3);
  }
}

@keyframes rewardStar {
  0% {
    opacity: 0;
    transform: scale(0.3) rotate(-30deg);
  }
  25% {
    opacity: 1;
    transform: scale(1.1) rotate(0deg);
  }
  60% {
    opacity: 1;
    transform: scale(1) rotate(10deg);
  }
  100% {
    opacity: 0;
    transform: scale(0.7) rotate(20deg);
  }
}

/* ===== TUTORIAL INICIAL ===== */
.tutorial-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  z-index: 950;
  opacity: 1;
  transition: opacity 0.25s ease;
  cursor: pointer;
}

.tutorial-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.tutorial-dim {
  position: absolute;
  background: rgba(0,0,0,0.65);
  pointer-events: none;
}

.tutorial-dim-top {
  top: 0;
  left: 0;
  right: 0;
  height: var(--tutorial-hole-top);
}

.tutorial-dim-bottom {
  bottom: 0;
  left: 0;
  right: 0;
  top: calc(var(--tutorial-hole-top) + var(--tutorial-hole-height));
}

.tutorial-dim-left {
  top: var(--tutorial-hole-top);
  left: 0;
  width: var(--tutorial-hole-left);
  height: var(--tutorial-hole-height);
}

.tutorial-dim-right {
  top: var(--tutorial-hole-top);
  right: 0;
  width: var(--tutorial-hole-right);
  height: var(--tutorial-hole-height);
}

.tutorial-card,
.tutorial-highlight,
.tutorial-hand {
  position: absolute;
  z-index: 2;
  pointer-events: none;
}

.tutorial-card {
  margin-top: 0;
  top: 18%;
  left: 50%;
  transform: translateX(-50%);
  background: #ffffff;
  color: #111111;
  border-radius: 18px;
  padding: 18px 18px 20px;
  max-width: 320px;
  text-align: center;
  box-shadow: 0 14px 32px rgba(0,0,0,0.45);
  pointer-events: auto;
}

.tutorial-card-title {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  background: #ffd21e;
  color: #111111;
  padding: 4px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
}

.tutorial-card-body {
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.45;
}

.tutorial-highlight {
  top: var(--tutorial-hole-top);
  left: var(--tutorial-hole-left);
  right: var(--tutorial-hole-right);
  height: var(--tutorial-hole-height);
  border-radius: 22px;
  border: 2px dashed rgba(255,255,255,0.9);
}

.tutorial-hand {
  bottom: 7%;
  left: 57%;
  width: 90px;
}

/* ===== TAP HINT — anel pulsante na área de chute ===== */
.tap-hint {
  position: absolute;
  bottom: calc(7% + 6%);
  left: 50%;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 3px solid rgba(255, 215, 0, 0.9);
  transform: translateX(-50%);
  pointer-events: none;
  animation: tapRing 1.4s ease-out infinite;
}

@keyframes tapRing {
  0%   { transform: translateX(-50%) scale(0.4); opacity: 1; }
  100% { transform: translateX(-50%) scale(2.2); opacity: 0; }
}

/* ===== LANDSCAPE BLOCKER — mobile portrait only ===== */
.landscape-blocker {
  display: none;
  position: fixed;
  inset: 0;
  background: linear-gradient(160deg, #0D47A1 0%, #1565C0 100%);
  z-index: 99999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  color: #fff;
  text-align: center;
}

@media (orientation: landscape) and (max-height: 500px) {
  .landscape-blocker { display: flex; }
}

.landscape-phone {
  font-size: 56px;
  animation: rotatePh 2s ease-in-out infinite;
  transform-origin: center;
}

@keyframes rotatePh {
  0%,100% { transform: rotate(-90deg); }
  50%      { transform: rotate(0deg); }
}

.landscape-text {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.45;
}

/* ===== SMALL SCREEN — 360px e abaixo ===== */
@media (max-width: 360px) {
  .balance-value { font-size: 17px; }
  .label-small   { font-size: 10px; }
  .shots-counter { font-size: 11px; }
  .balance-card  { padding: 8px 12px; }
}
