:root {
  --bg-deep: #1a0f0a;
  --bg-mid: #2c1810;
  --wood: #3d2415;
  --ink: #f6efe6;
  --muted: #c4a484;
  --accent: #e85d04;
  --accent-hot: #d00000;
  --lime: #80b918;
  --gold: #ffba08;
  --panel: rgba(26, 15, 10, 0.72);
  --stroke: rgba(255, 186, 8, 0.28);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --font-display: "Teko", sans-serif;
  --font-body: "Nunito Sans", sans-serif;
  --font-game: "Fredoka", "Nunito Sans", sans-serif;
  --game-cyan: #7ad7ff;
  --game-gold: #ffe566;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background-color: var(--bg-deep);
  min-height: 100%;
}

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

body {
  font-family: var(--font-body);
  color: var(--ink);
  background-color: var(--bg-deep);
  background-image:
    linear-gradient(180deg, rgba(26, 15, 10, 0.55), rgba(26, 15, 10, 0.88)),
    url("../images/background.jpg");
  background-position: center top;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: scroll;
}

@media (max-width: 900px) {
  body {
    background-image:
      linear-gradient(180deg, rgba(26, 15, 10, 0.55), rgba(26, 15, 10, 0.88)),
      url("../images/background-Celular.jpg");
  }
}

@supports (background-image: image-set(url("x.webp") type("image/webp"))) {
  body {
    background-image:
      linear-gradient(180deg, rgba(26, 15, 10, 0.55), rgba(26, 15, 10, 0.88)),
      image-set(
        url("../images/background.webp") type("image/webp"),
        url("../images/background.jpg") type("image/jpeg")
      );
  }

  @media (max-width: 900px) {
    body {
      background-image:
        linear-gradient(180deg, rgba(26, 15, 10, 0.55), rgba(26, 15, 10, 0.88)),
        image-set(
          url("../images/background-Celular.webp") type("image/webp"),
          url("../images/background-Celular.jpg") type("image/jpeg")
        );
    }
  }
}

@media (min-width: 901px) {
  body {
    background-attachment: fixed;
  }
}

a {
  color: var(--gold);
  text-decoration: none;
}

a:hover {
  color: #ffe08a;
}

img {
  max-width: 100%;
  display: block;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 6vw;
  gap: 1rem;
  background: linear-gradient(180deg, rgba(15, 8, 5, 0.82), rgba(15, 8, 5, 0.5));
  backdrop-filter: blur(14px) saturate(1.15);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
  border-bottom: 1px solid rgba(255, 186, 8, 0.14);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 12px 30px rgba(0, 0, 0, 0.25);
}

.brand {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
  line-height: 1;
  transition: opacity 0.2s ease;
}

.brand:hover {
  opacity: 0.9;
  color: var(--ink);
}

.brand span {
  color: var(--accent);
  text-shadow: 0 0 24px rgba(232, 93, 4, 0.45);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn {
  position: relative;
  appearance: none;
  border: 0;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  border-radius: 999px;
  padding: 0.85rem 1.35rem;
  overflow: hidden;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
  filter: brightness(0.96);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-hot));
  color: #fff;
  box-shadow: 0 10px 28px rgba(208, 0, 0, 0.35);
}

.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.35) 48%, transparent 66%);
  transform: translateX(-120%);
  transition: transform 0.6s ease;
}

.btn-primary:hover::after {
  transform: translateX(120%);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px);
}

.btn-secondary:hover {
  border-color: rgba(255, 186, 8, 0.4);
  background: rgba(255, 255, 255, 0.12);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  padding-inline: 0.7rem;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

/* HOME */
.fruit-fx {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  opacity: 0.6;
  pointer-events: none;
}

/* O canvas é posicionado, então o conteúdo em fluxo precisa subir junto. */
body.landing-page > main,
body.landing-page > .site-footer {
  position: relative;
  z-index: 1;
}

@media (max-width: 900px) {
  .fruit-fx {
    opacity: 0.4;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fruit-fx {
    display: none;
  }
}

.hero {
  min-height: calc(100vh - 76px);
  display: grid;
  align-items: end;
  padding: 0 6vw 8vh;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 70% 35%, rgba(232, 93, 4, 0.28), transparent 60%),
    radial-gradient(ellipse 50% 40% at 20% 80%, rgba(128, 185, 24, 0.18), transparent 55%);
  pointer-events: none;
  animation: glowPulse 6s ease-in-out infinite alternate;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse 70% 60% at 30% 40%, #000 0%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 30% 40%, #000 0%, transparent 72%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 640px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1.1rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 186, 8, 0.1);
  border: 1px solid rgba(255, 186, 8, 0.32);
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-eyebrow i {
  display: inline-block;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 10px rgba(128, 185, 24, 0.9);
  animation: pulseDot 1.8s ease-in-out infinite;
}

.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(4.2rem, 14vw, 8rem);
  line-height: 0.85;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin: 0 0 1rem;
  text-shadow: 0 8px 30px rgba(0, 0, 0, 0.55);
}

.hero-brand em {
  font-style: normal;
  background: linear-gradient(135deg, var(--gold), var(--accent) 65%, var(--accent-hot));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: block;
}

.hero-tagline {
  margin: 0 0 0.85rem;
  max-width: 30ch;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 5vw, 2.6rem);
  line-height: 1.05;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
}

.hero-tagline strong {
  color: var(--gold);
  font-weight: inherit;
}

.hero-copy {
  margin: 0 0 1.75rem;
  max-width: 36ch;
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  color: var(--muted);
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 2.1rem;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.6rem;
}

.hero-stat {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.hero-stat__icon {
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 1.05rem;
  flex: none;
}

.hero-stat__label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  line-height: 1.3;
}

.hero-fruit {
  position: absolute;
  right: 4vw;
  bottom: 12vh;
  width: min(38vw, 360px);
  opacity: 0.95;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.5));
  animation: floatFruit 4.5s ease-in-out infinite;
  pointer-events: none;
}

.section-eyebrow {
  display: inline-block;
  margin: 0 0 0.6rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

/* FEATURES / COMO FUNCIONA */
.features {
  padding: 4.5rem 6vw 1rem;
  position: relative;
}

.features-head {
  max-width: 560px;
  margin: 0 0 2.5rem;
}

.features-head h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  margin: 0 0 0.5rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
}

.features-head p {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.5;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.feature-card {
  position: relative;
  padding: 1.75rem 1.5rem;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
  border: 1px solid rgba(255, 255, 255, 0.09);
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.feature-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 0%, rgba(232, 93, 4, 0.16), transparent 60%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 186, 8, 0.3);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-index {
  position: relative;
  display: inline-block;
  margin: 0 0 0.9rem;
  font-family: var(--font-display);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  color: var(--gold);
}

.feature-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  margin: 0 0 1rem;
  border-radius: 14px;
  background: rgba(232, 93, 4, 0.16);
  border: 1px solid rgba(255, 186, 8, 0.25);
  font-size: 1.4rem;
}

.feature-card h3 {
  position: relative;
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ink);
}

.feature-card p {
  position: relative;
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

/* LEADERBOARD / RANKING */
.home-panel {
  padding: 4.5rem 6vw 5rem;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.45));
}

.home-panel__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}

.home-panel h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  margin: 0 0 0.35rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
}

.home-panel p {
  margin: 0;
  color: var(--muted);
}

.leaderboard {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.leaderboard li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.85rem 1.1rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  font-weight: 700;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.leaderboard li:hover {
  transform: translateX(3px);
  border-color: rgba(255, 186, 8, 0.22);
}

.leaderboard li:nth-child(1) {
  background: linear-gradient(90deg, rgba(255, 186, 8, 0.14), rgba(255, 255, 255, 0.03));
  border-color: rgba(255, 186, 8, 0.35);
}

.leaderboard .rank {
  display: grid;
  place-items: center;
  width: 2.15rem;
  height: 2.15rem;
  flex: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.leaderboard li:nth-child(1) .rank {
  background: radial-gradient(circle at 30% 25%, #ffd964, var(--gold) 65%, var(--accent));
  color: var(--bg-deep);
  box-shadow: 0 0 16px rgba(255, 186, 8, 0.45);
}

.leaderboard li:nth-child(2) .rank {
  background: linear-gradient(135deg, #d8d8d8, #9c9c9c);
  color: var(--bg-deep);
}

.leaderboard li:nth-child(3) .rank {
  background: linear-gradient(135deg, #cd8a4f, #9a5f2e);
  color: var(--bg-deep);
}

.leaderboard .name {
  flex: 1;
  min-width: 0;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard .score {
  flex: none;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 1.5rem;
}

.leaderboard li:nth-child(1) .score {
  color: var(--gold);
  text-shadow: 0 0 14px rgba(255, 186, 8, 0.35);
}

.empty-board {
  padding: 1.5rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.14);
  color: var(--muted);
  text-align: center;
}

/* FAIXA DE GANHOS RECENTES */
.live-wins {
  overflow: hidden;
}

.live-wins .section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.live-wins__pulse {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 0 rgba(128, 185, 24, 0.7);
  animation: liveWinsPulse 1.6s ease-out infinite;
}

.live-wins__viewport {
  position: relative;
  width: 100%;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}

.live-wins__track {
  display: flex;
  width: max-content;
  animation: liveWinsScroll 38s linear infinite;
}

.live-wins__viewport:hover .live-wins__track {
  animation-play-state: paused;
}

.live-wins__group {
  display: flex;
  gap: 0.75rem;
  padding-right: 0.75rem;
}

.live-win {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: min(82vw, 300px);
  padding: 0.85rem 1rem;
  border: 1px solid rgba(128, 185, 24, 0.24);
  border-radius: 16px;
  background:
    linear-gradient(110deg, rgba(128, 185, 24, 0.1), rgba(255, 255, 255, 0.035)),
    rgba(12, 6, 4, 0.8);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

.live-win__icon {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  flex: none;
  border-radius: 50%;
  background: var(--lime);
  color: var(--bg-deep);
  font-weight: 900;
  box-shadow: 0 0 18px rgba(128, 185, 24, 0.28);
}

.live-win__person {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
}

.live-win__person strong {
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-win__person small {
  color: var(--muted);
  font-size: 0.7rem;
}

.live-win__amount {
  flex: none;
  color: var(--lime);
  font-family: var(--font-display);
  font-size: 1.35rem;
  white-space: nowrap;
}

@keyframes liveWinsScroll {
  to {
    transform: translateX(-50%);
  }
}

@keyframes liveWinsPulse {
  70% {
    box-shadow: 0 0 0 8px rgba(128, 185, 24, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(128, 185, 24, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .live-wins__track {
    animation: none;
  }

  .live-wins__viewport {
    overflow-x: auto;
    mask-image: none;
    -webkit-mask-image: none;
  }
}

/* FOOTER */
.site-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
  padding: 2.25rem 6vw 2.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
}

.site-footer .brand {
  font-size: 1.35rem;
}

.site-footer__warning {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  width: min(100%, 680px);
  padding: 1.4rem 1.5rem;
  border: 1px solid rgba(255, 186, 8, 0.22);
  border-radius: 18px;
  background: rgba(255, 186, 8, 0.05);
}

.site-footer__warning-icon {
  font-size: 1.35rem;
  line-height: 1;
}

.site-footer__warning p {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.6;
}

.site-footer__warning a {
  color: var(--gold);
  text-decoration: underline;
}

.site-footer__warning a:hover {
  color: #ffe08a;
}

.site-footer__note {
  color: var(--muted);
  opacity: 0.7;
}

/* AUTH PAGES */
.auth-shell {
  min-height: calc(100vh - 76px);
  display: grid;
  place-items: center;
  padding: 2rem 6vw 4rem;
}

.auth-form {
  width: min(100%, 420px);
  background: var(--panel);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  padding: 2rem 1.75rem 1.75rem;
  border-radius: 18px;
  animation: riseIn 0.55s ease both;
}

.auth-form h1 {
  font-family: var(--font-display);
  font-size: 2.8rem;
  margin: 0 0 0.25rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1;
}

.auth-form .subtitle {
  margin: 0 0 1.5rem;
  color: var(--muted);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.field label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted);
}

.field input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.35);
  color: var(--ink);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  font: inherit;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(232, 93, 4, 0.2);
}

.form-error {
  min-height: 1.25rem;
  margin: 0 0 0.85rem;
  color: #ff6b6b;
  font-size: 0.9rem;
  font-weight: 700;
}

.form-success {
  min-height: 1.25rem;
  margin: 0 0 0.85rem;
  color: var(--lime);
  font-size: 0.9rem;
  font-weight: 700;
}

.auth-form .btn {
  width: 100%;
  margin-top: 0.25rem;
}

.auth-switch {
  margin: 1.15rem 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 700;
}

.user-chip strong {
  color: var(--gold);
}

/* GAME PAGE */
body.game-page {
  text-align: center;
  overflow: hidden;
  min-height: 100dvh;
  min-height: 100svh;
  padding: 0;
  margin: 0;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

.game-topbar,
.game-meta {
  display: none;
}

.game-stage {
  position: relative;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  text-align: left;
  height: 100dvh;
  height: 100svh;
}

.game-canvas-host {
  position: relative;
  min-width: 0;
  width: 100%;
  height: 100%;
  min-height: 100%;
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

.game-canvas-host canvas {
  display: block;
  /* Nunca esticar: hit-test precisa bater com o tamanho interno do p5 */
  width: auto !important;
  height: auto !important;
  max-width: 100%;
  max-height: 100%;
}

.game-hud {
  position: absolute;
  z-index: 6;
  top: max(0.55rem, env(safe-area-inset-top));
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1fr);
  align-items: start;
  gap: 0.45rem;
  padding: 0.35rem 0.55rem;
  pointer-events: none;
}

.game-hud__bet,
.game-hud__goal {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.55rem 0.7rem;
  border-radius: 14px;
  background: rgba(12, 8, 6, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.game-hud__goal {
  align-items: flex-end;
  text-align: right;
}

.game-hud__label {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1;
}

.game-hud__value {
  font-family: var(--font-game);
  font-size: clamp(1.15rem, 4.8vw, 1.55rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.05;
  letter-spacing: 0.01em;
}

.game-hud__value--gold {
  color: var(--game-gold);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
}

.game-hud__badge {
  margin-top: 0.15rem;
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--game-gold);
  line-height: 1.1;
}

.game-hud__center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.4rem;
  padding-top: 0.2rem;
  min-width: 0;
}

.game-hud__earned {
  font-family: var(--font-game);
  font-size: clamp(1.55rem, 7vw, 2.15rem);
  font-weight: 700;
  color: #ff8a3d;
  line-height: 1;
  letter-spacing: 0.01em;
  text-shadow:
    0 0 12px rgba(232, 93, 4, 0.55),
    0 0 28px rgba(208, 0, 0, 0.22),
    0 2px 0 rgba(0, 0, 0, 0.35);
}

.game-hud__bar {
  width: min(100%, 9.5rem);
  height: 0.55rem;
  border-radius: 999px;
  background: rgba(8, 6, 4, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.45);
}

.game-hud__bar-fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-hot));
  box-shadow: 0 0 10px rgba(232, 93, 4, 0.55);
  transition: width 0.2s ease-out;
}

.game-exit {
  position: absolute;
  z-index: 7;
  top: calc(max(0.55rem, env(safe-area-inset-top)) + 4.6rem);
  right: 0.55rem;
  min-width: 3.4rem;
  padding: 0.38rem 0.85rem;
  border-radius: 10px;
  background: rgba(12, 8, 6, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
}

.game-exit:active {
  transform: scale(0.97);
}

.game-start-prompt {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%);
  width: min(92%, 22rem);
  text-align: center;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.game-start-prompt[hidden] {
  display: none;
}

.game-start-prompt__title {
  margin: 0;
  font-family: var(--font-game);
  font-size: clamp(1.7rem, 7.5vw, 2.35rem);
  font-weight: 700;
  color: var(--game-gold);
  line-height: 1.1;
  text-shadow:
    0 2px 0 rgba(40, 18, 4, 0.85),
    0 6px 18px rgba(0, 0, 0, 0.45);
}

.game-start-prompt__hint {
  margin: 0.55rem 0 0;
  font-family: var(--font-body);
  font-size: clamp(0.95rem, 3.6vw, 1.1rem);
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
}

.game-mute {
  position: absolute;
  z-index: 7;
  right: max(0.7rem, env(safe-area-inset-right));
  bottom: max(0.85rem, env(safe-area-inset-bottom));
  width: 2.7rem;
  height: 2.7rem;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(12, 8, 6, 0.78);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
  -webkit-tap-highlight-color: transparent;
  pointer-events: auto;
}

.game-mute[aria-pressed="true"] {
  color: rgba(255, 255, 255, 0.55);
}

.game-mute svg {
  display: block;
}

.game-mute path[hidden] {
  display: none !important;
}

.game-mute.is-muted {
  color: rgba(255, 255, 255, 0.55);
}

.earnings-panel,
.earn-stat,
.earn-hint {
  display: none !important;
}

.game-loading {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  background:
    radial-gradient(ellipse 70% 50% at 50% 40%, rgba(232, 93, 4, 0.28), transparent 70%),
    linear-gradient(180deg, rgba(26, 15, 10, 0.92), rgba(12, 6, 4, 0.96));
  color: var(--ink);
  font-family: var(--font-body);
  pointer-events: none;
}

.game-loading strong {
  font-family: var(--font-display);
  font-size: clamp(2rem, 8vw, 3.4rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gold);
  line-height: 1;
}

.game-loading span {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
}

.game-loading::after {
  content: "";
  width: 2.4rem;
  height: 2.4rem;
  margin-top: 0.35rem;
  border-radius: 50%;
  border: 3px solid rgba(255, 186, 8, 0.22);
  border-top-color: var(--accent);
  animation: game-spin 0.7s linear infinite;
}

@keyframes game-spin {
  to { transform: rotate(360deg); }
}

.earnings-panel {
  position: absolute;
  z-index: 5;
  top: 0.55rem;
  left: 50%;
  transform: translateX(-50%);
  width: min(calc(100% - 1rem), 520px);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.35rem;
  background: rgba(18, 10, 6, 0.72);
  border: 1px solid rgba(255, 186, 8, 0.22);
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
  pointer-events: none;
}

.earn-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.05rem;
  min-width: 4.2rem;
  padding: 0.28rem 0.45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  font-weight: 700;
  color: var(--muted);
  font-size: 0.62rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border-bottom: 0;
}

.earn-stat strong {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--gold);
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: none;
}

.earn-stat--main {
  background: rgba(232, 93, 4, 0.18);
  min-width: 5rem;
}

.earn-stat--main strong {
  font-size: 1.35rem;
  color: #ffcf4d;
}

.earn-stat--soft strong {
  color: var(--ink);
  font-size: 1.05rem;
}

.earn-hint {
  display: none;
}

.end-game-button {
  position: absolute;
  z-index: 7;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  min-width: min(90%, 280px);
  padding: 0.8rem 1.2rem;
  border: 2px solid #ffcf4d;
  border-radius: 999px;
  background: linear-gradient(135deg, #e85d04, #c2410c);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  color: #fff;
  font: 700 1.15rem var(--font-display);
  letter-spacing: 0.04em;
  cursor: pointer;
  animation: endGamePulse 1.2s ease-in-out infinite alternate;
}

.end-game-button[hidden] {
  display: none;
}

@keyframes endGamePulse {
  from {
    transform: translateX(-50%) scale(1);
  }
  to {
    transform: translateX(-50%) scale(1.05);
    box-shadow: 0 10px 30px rgba(255, 186, 8, 0.55);
  }
}

.deposit-modal[hidden],
.deposit-modal [hidden] {
  display: none !important;
}

.deposit-modal {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: grid;
  place-items: center;
  padding: 1rem;
  overflow-y: auto;
}

.deposit-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 4, 2, 0.78);
  backdrop-filter: blur(5px);
}

.deposit-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 430px);
  padding: 1.8rem 1.5rem 1.6rem;
  text-align: center;
  background: linear-gradient(180deg, var(--bg-mid), var(--bg-deep));
  border: 1px solid var(--stroke);
  border-radius: 20px;
  box-shadow: var(--shadow);
  animation: riseIn 0.35s ease both;
}

.deposit-modal__close {
  position: absolute;
  top: 0.85rem;
  right: 0.95rem;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--stroke);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  color: var(--muted);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}

.deposit-modal__close:hover {
  color: var(--ink);
  border-color: var(--gold);
}

.deposit-modal__icon {
  display: block;
  width: 3.2rem;
  height: 3.2rem;
  margin: 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.5));
}

.deposit-modal__title {
  margin: 0.5rem 0 0.25rem;
  font-family: var(--font-display);
  font-size: 2.1rem;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
}

.deposit-modal__subtitle {
  margin: 0 0 1.2rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.deposit-modal__label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: left;
  color: var(--ink);
}

.deposit-amount {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.32);
}

.deposit-amount:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(255, 186, 8, 0.15);
}

.deposit-amount span {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--gold);
}

.deposit-amount input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.7rem;
  letter-spacing: 0.02em;
  outline: none;
}

.deposit-coupon-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.9rem 0 0.6rem;
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--ink);
  cursor: pointer;
}

.deposit-coupon-toggle input {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--accent);
}

.deposit-coupon input {
  width: 100%;
  margin-bottom: 0.5rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--stroke);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.32);
  color: var(--ink);
  font-size: 0.95rem;
  text-transform: uppercase;
  outline: none;
}

.deposit-presets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.7rem;
  margin: 0.8rem 0 1rem;
}

.deposit-preset {
  position: relative;
  padding: 1.05rem 0.4rem 0.85rem;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.3);
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.deposit-preset strong {
  font-family: var(--font-display);
  font-size: 1.3rem;
  letter-spacing: 0.02em;
}

.deposit-preset:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
}

.deposit-preset.is-active {
  border-color: var(--gold);
  background: rgba(232, 93, 4, 0.22);
  box-shadow: 0 0 0 2px rgba(255, 186, 8, 0.2) inset;
}

.deposit-preset.is-active strong {
  color: var(--gold);
}

.deposit-preset__badge {
  position: absolute;
  top: -0.6rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold), var(--accent));
  color: var(--bg-deep);
  font-size: 0.55rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.deposit-preset:nth-child(3n + 2) .deposit-preset__badge {
  background: linear-gradient(135deg, var(--lime), #5c8a0f);
  color: #0f1a02;
}

.deposit-preset:nth-child(3n) .deposit-preset__badge {
  background: linear-gradient(135deg, var(--accent), var(--accent-hot));
  color: #fff;
}

.deposit-note {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  background: rgba(255, 186, 8, 0.08);
  text-align: left;
}

.deposit-note__icon {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 12px;
  background: rgba(232, 93, 4, 0.22);
  color: var(--gold);
}

.deposit-note__text {
  font-size: 0.95rem;
  color: var(--ink);
}

.deposit-note__text strong {
  display: block;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
}

.deposit-error {
  min-height: 1.1rem;
  margin: 0.7rem 0 0;
  font-size: 0.85rem;
  font-weight: 700;
  color: #ff8f6b;
}

.deposit-submit {
  width: 100%;
  margin-top: 0.6rem;
  padding: 0.95rem 1.2rem;
  border: 1px solid rgba(255, 186, 8, 0.45);
  border-radius: 14px;
  background: linear-gradient(135deg, var(--gold), var(--accent));
  box-shadow: 0 12px 28px rgba(232, 93, 4, 0.35);
  color: var(--bg-deep);
  font-family: var(--font-display);
  font-size: 1.45rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.deposit-submit:hover {
  filter: brightness(1.06);
}

.deposit-submit:disabled {
  opacity: 0.6;
  cursor: progress;
}

.deposit-qr {
  display: grid;
  place-items: center;
  margin: 0.4rem auto 1rem;
  padding: 0.7rem;
  width: fit-content;
  border-radius: 16px;
  background: #fff;
}

.deposit-qr img {
  display: block;
  width: 190px;
  height: 190px;
}

.deposit-code {
  display: flex;
  gap: 0.5rem;
}

.deposit-code input {
  flex: 1;
  min-width: 0;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--stroke);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.32);
  color: var(--muted);
  font-size: 0.8rem;
  outline: none;
}

.deposit-code button {
  padding: 0 1.1rem;
  border: 1px solid rgba(255, 186, 8, 0.45);
  border-radius: 12px;
  background: linear-gradient(135deg, var(--gold), var(--accent));
  color: var(--bg-deep);
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.deposit-status {
  margin: 1rem 0 0.2rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--gold);
}

.deposit-status.is-paid {
  color: var(--lime);
}

.deposit-back {
  margin-top: 0.3rem;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

.deposit-back:hover {
  color: var(--ink);
}

.retention-modal[hidden] {
  display: none !important;
}

.retention-modal {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: grid;
  place-items: center;
  padding: 3.2rem 1rem 1rem;
  overflow-y: auto;
}

.retention-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 4, 2, 0.82);
  backdrop-filter: blur(6px);
}

.retention-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 400px);
  padding: 3rem 1.4rem 1.4rem;
  text-align: center;
  background: linear-gradient(180deg, var(--bg-mid), var(--bg-deep));
  border: 1px solid var(--gold);
  border-radius: 20px;
  box-shadow: var(--shadow), 0 0 40px rgba(255, 186, 8, 0.18);
  animation: riseIn 0.35s ease both;
}

.retention-modal__badge {
  position: absolute;
  top: -2.15rem;
  left: 50%;
  transform: translateX(-50%);
  display: grid;
  place-items: center;
  width: 4.3rem;
  height: 4.3rem;
  border-radius: 50%;
  color: var(--bg-deep);
  background: radial-gradient(circle at 30% 25%, #ffd964, var(--gold) 65%, var(--accent));
  border: 3px solid var(--accent-hot);
  box-shadow: 0 0 28px rgba(255, 186, 8, 0.45);
}

.retention-modal__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 2.35rem;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gold);
}

.retention-modal__subtitle {
  margin: 0.2rem 0 0.7rem;
  font-family: var(--font-display);
  font-size: 1.55rem;
  line-height: 1.1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-hot);
}

.retention-modal__text {
  margin: 0 0 1rem;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--ink);
}

.retention-summary {
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--stroke);
  text-align: left;
}

.retention-summary__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.retention-summary__row strong {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: 0.02em;
}

.retention-summary__row--bonus {
  color: var(--lime);
  font-weight: 800;
}

.retention-summary__row--bonus i {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  margin-right: 0.25rem;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 8px rgba(128, 185, 24, 0.8);
  vertical-align: middle;
}

.retention-summary__row--bonus strong {
  color: var(--lime);
}

.retention-summary__total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.7rem;
  padding-top: 0.7rem;
  border-top: 1px solid rgba(255, 186, 8, 0.18);
  font-size: 0.9rem;
  color: var(--ink);
}

.retention-summary__total strong {
  font-family: var(--font-display);
  font-size: 1.9rem;
  line-height: 1;
  color: var(--gold);
  text-shadow: 0 0 18px rgba(255, 186, 8, 0.35);
}

.retention-timer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin: 0.9rem 0 0.4rem;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  background: rgba(232, 93, 4, 0.16);
  border: 1px solid rgba(232, 93, 4, 0.35);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.retention-timer strong {
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.06em;
}

.retention-error {
  min-height: 1.1rem;
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  font-weight: 700;
  color: #ff8f6b;
}

.retention-accept {
  width: 100%;
  margin-top: 0.55rem;
  padding: 0.95rem 1.1rem;
  border: 1px solid rgba(255, 186, 8, 0.45);
  border-radius: 14px;
  background: linear-gradient(135deg, var(--gold), var(--accent));
  box-shadow: 0 12px 28px rgba(232, 93, 4, 0.35);
  color: var(--bg-deep);
  font-family: var(--font-display);
  font-size: 1.3rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
}

.retention-accept:hover {
  filter: brightness(1.06);
}

.retention-accept:disabled {
  opacity: 0.65;
  cursor: progress;
}

.retention-snooze {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  margin-top: 0.55rem;
  padding: 0.8rem 1rem;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

.retention-snooze:hover {
  border-color: var(--gold);
}

.retention-leave {
  margin-top: 0.75rem;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

.retention-leave:hover {
  color: var(--ink);
}

@media (max-width: 900px) {
  .retention-modal__dialog {
    padding: 2.8rem 1.15rem 1.25rem;
  }

  .retention-modal__title {
    font-size: 2.05rem;
  }

  .retention-modal__subtitle {
    font-size: 1.35rem;
  }

  .retention-summary__total strong {
    font-size: 1.65rem;
  }
}

@media (max-width: 900px) {
  .deposit-modal__dialog {
    padding: 1.5rem 1.1rem 1.3rem;
  }

  .deposit-presets {
    gap: 0.55rem;
  }

  .deposit-preset strong {
    font-size: 1.15rem;
  }
}

.result-modal[hidden] {
  display: none !important;
}

.result-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 3.2rem 1rem 1rem;
  overflow-y: auto;
}

.result-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 4, 2, 0.78);
  backdrop-filter: blur(5px);
}

.result-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 400px);
  padding: 3rem 1.6rem 1.6rem;
  text-align: center;
  background: linear-gradient(180deg, var(--bg-mid), var(--bg-deep));
  border: 1px solid var(--gold);
  border-radius: 20px;
  box-shadow: var(--shadow), 0 0 0 1px rgba(255, 186, 8, 0.12) inset;
  animation: riseIn 0.35s ease both;
}

.result-modal__badge {
  position: absolute;
  top: -2.2rem;
  left: 50%;
  transform: translateX(-50%);
  display: grid;
  place-items: center;
  width: 4.4rem;
  height: 4.4rem;
  border-radius: 50%;
  color: var(--bg-deep);
  background: radial-gradient(circle at 30% 25%, #ffd964, var(--gold) 65%, var(--accent));
  border: 3px solid var(--accent-hot);
  box-shadow: 0 0 28px rgba(255, 186, 8, 0.45);
}

.result-modal__title {
  margin: 0 0 0.3rem;
  font-family: var(--font-display);
  font-size: 2.4rem;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gold);
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.35);
}

.result-modal__subtitle {
  margin: 0 0 1.1rem;
  font-size: 0.95rem;
  color: var(--ink);
}

.result-modal__amount {
  padding: 0.9rem 1rem 1rem;
  border-radius: 14px;
  background: rgba(232, 93, 4, 0.14);
  border: 1px solid var(--stroke);
}

.result-modal__amount span {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.result-modal__amount strong {
  font-family: var(--font-display);
  font-size: 2.7rem;
  line-height: 1;
  color: var(--gold);
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.35);
}

.result-modal__text {
  margin: 1.1rem 0 1.3rem;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--ink);
}

.result-modal__text strong {
  color: var(--accent-hot);
}

.result-modal__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.95rem 1.2rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-hot));
  border: 1px solid rgba(255, 186, 8, 0.5);
  box-shadow: 0 12px 28px rgba(208, 0, 0, 0.4);
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.result-modal__cta:hover {
  color: #fff;
  filter: brightness(1.08);
}

.result-modal__dismiss {
  margin-top: 0.85rem;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

.result-modal__dismiss:hover {
  color: var(--ink);
}

@media (max-width: 900px) {
  .result-modal__dialog {
    padding: 2.8rem 1.2rem 1.3rem;
  }

  .result-modal__title {
    font-size: 2.1rem;
  }

  .result-modal__amount strong {
    font-size: 2.3rem;
  }
}

.game-canvas-host canvas,
#defaultCanvas0,
canvas {
  display: block;
  margin: 0 auto;
  /* Mantém tamanho lógico do p5 = tamanho visual (mouse/touch alinhados). */
  width: auto !important;
  height: auto !important;
  max-width: 100%;
  border-radius: 0;
  box-shadow: none;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

@keyframes floatFruit {
  0%,
  100% {
    transform: translateY(0) rotate(-6deg);
  }
  50% {
    transform: translateY(-18px) rotate(4deg);
  }
}

@keyframes pulseDot {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.55;
    transform: scale(0.75);
  }
}

@keyframes glowPulse {
  from {
    opacity: 0.75;
  }
  to {
    opacity: 1;
  }
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* AUTH MODAL */
body.modal-open {
  overflow: hidden;
}

.auth-modal[hidden] {
  display: none !important;
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.auth-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 4, 2, 0.72);
  backdrop-filter: blur(4px);
}

.auth-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 440px);
  max-height: min(92dvh, 720px);
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  border-radius: 18px;
  padding: 1.35rem 1.35rem 1.5rem;
  animation: riseIn 0.35s ease both;
}

.auth-modal__close {
  position: absolute;
  top: 0.7rem;
  right: 0.85rem;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

.auth-modal__close:hover {
  color: var(--ink);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  margin: 0.2rem 0 1rem;
  padding: 0.3rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
}

.auth-tab {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 800;
  padding: 0.7rem 0.85rem;
  cursor: pointer;
}

.auth-tab.is-active {
  background: linear-gradient(135deg, var(--accent), var(--accent-hot));
  color: #fff;
}

.auth-modal .auth-form {
  width: 100%;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  padding: 0;
  animation: none;
  border-radius: 0;
}

.auth-panel[hidden] {
  display: none !important;
}

/* MOBILE SYSTEM */
@media (max-width: 900px) {
  .site-header {
    padding: 0.75rem 1rem;
    gap: 0.5rem;
  }

  .brand {
    font-size: 1.55rem;
  }

  .nav-links {
    gap: 0.4rem;
  }

  .btn {
    font-size: 0.82rem;
    padding: 0.7rem 0.95rem;
  }

  .btn-ghost {
    padding-inline: 0.55rem;
  }

  .user-chip {
    font-size: 0.78rem;
    padding: 0.35rem 0.65rem;
  }

  .hero {
    min-height: calc(100dvh - 64px);
    padding: 0 1rem 5vh;
    align-items: end;
  }

  .hero-brand {
    font-size: clamp(3.4rem, 18vw, 5.2rem);
  }

  .hero-copy {
    font-size: 1rem;
    margin-bottom: 1.2rem;
  }

  .hero-actions {
    gap: 0.65rem;
  }

  .hero-actions .btn {
    flex: 1 1 calc(50% - 0.65rem);
    text-align: center;
    justify-content: center;
  }

  .hero-fruit {
    opacity: 0.28;
    width: 62vw;
    right: -8vw;
    bottom: 34vh;
  }

  .hero-eyebrow {
    font-size: 0.65rem;
  }

  .hero-stats {
    gap: 1.1rem;
  }

  .hero-stat__label {
    font-size: 0.72rem;
  }

  .features {
    padding: 3rem 1rem 0.5rem;
  }

  .features-head {
    margin-bottom: 1.75rem;
  }

  .feature-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .home-panel {
    padding: 2.5rem 1rem 3rem;
  }

  .home-panel__head {
    margin-bottom: 1.5rem;
  }

  .leaderboard li {
    padding: 0.7rem 0.85rem;
    gap: 0.7rem;
  }

  .site-footer {
    padding: 1.5rem 1rem 1.75rem;
    justify-content: center;
    text-align: center;
  }

  .game-stage {
    width: 100%;
    padding: 0;
  }

  .game-canvas-host {
    border-radius: 0;
  }

  .game-hud {
    gap: 0.35rem;
    padding: 0.3rem 0.4rem;
  }

  .game-hud__bet,
  .game-hud__goal {
    padding: 0.48rem 0.55rem;
    border-radius: 12px;
  }

  .game-exit {
    top: calc(max(0.45rem, env(safe-area-inset-top)) + 4.35rem);
    right: 0.4rem;
  }

  .auth-modal {
    padding: 0.65rem;
    align-items: end;
  }

  .auth-modal__dialog {
    width: 100%;
    max-height: 88dvh;
    border-radius: 18px 18px 12px 12px;
    padding: 1.1rem 1rem 1.2rem;
  }

  .field input {
    font-size: 16px; /* evita zoom no iOS */
    padding: 0.85rem 0.9rem;
  }
}

@media (max-width: 420px) {
  .game-hud__badge {
    font-size: 0.6rem;
  }
}

/* LOBBY DO JOGADOR LOGADO */
html:has(body.lobby-page),
body.lobby-page {
  overflow-x: hidden;
  max-width: 100%;
  touch-action: manipulation;
  -ms-touch-action: manipulation;
}

/* Evita zoom automático do iOS ao focar inputs do lobby e dos modais. */
body.lobby-page input,
body.lobby-page select,
body.lobby-page textarea,
.deposit-modal input,
.deposit-modal select,
.deposit-modal textarea,
.withdraw-modal input,
.withdraw-modal select,
.withdraw-modal textarea,
.refer-modal input,
.refer-modal select,
.refer-modal textarea {
  font-size: 16px;
  touch-action: manipulation;
}

body.lobby-page .bet-stepper input {
  font-size: max(16px, 2.1rem);
}

.deposit-modal .deposit-amount input {
  font-size: max(16px, 1.7rem);
}

.deposit-modal .deposit-code input {
  font-size: max(16px, 0.95rem);
}

body.lobby-page {
  background-image:
    radial-gradient(ellipse 80% 45% at 50% 0%, rgba(232, 93, 4, 0.22), transparent 65%),
    linear-gradient(180deg, rgba(20, 11, 7, 0.92), rgba(12, 6, 4, 0.97)),
    url("../images/background.jpg");
}

@media (max-width: 900px) {
  body.lobby-page {
    background-image:
      radial-gradient(ellipse 80% 45% at 50% 0%, rgba(232, 93, 4, 0.22), transparent 65%),
      linear-gradient(180deg, rgba(20, 11, 7, 0.92), rgba(12, 6, 4, 0.97)),
      url("../images/background-Celular.jpg");
  }
}

@supports (background-image: image-set(url("x.webp") type("image/webp"))) {
  body.lobby-page {
    background-image:
      radial-gradient(ellipse 80% 45% at 50% 0%, rgba(232, 93, 4, 0.22), transparent 65%),
      linear-gradient(180deg, rgba(20, 11, 7, 0.92), rgba(12, 6, 4, 0.97)),
      image-set(
        url("../images/background.webp") type("image/webp"),
        url("../images/background.jpg") type("image/jpeg")
      );
  }

  @media (max-width: 900px) {
    body.lobby-page {
      background-image:
        radial-gradient(ellipse 80% 45% at 50% 0%, rgba(232, 93, 4, 0.22), transparent 65%),
        linear-gradient(180deg, rgba(20, 11, 7, 0.92), rgba(12, 6, 4, 0.97)),
        image-set(
          url("../images/background-Celular.webp") type("image/webp"),
          url("../images/background-Celular.jpg") type("image/jpeg")
        );
    }
  }
}

.lobby {
  min-height: 100dvh;
  padding-bottom: 5.5rem;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

.lobby-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0.85rem max(0.9rem, env(safe-area-inset-right)) 0.85rem max(0.9rem, env(safe-area-inset-left));
  background: linear-gradient(180deg, rgba(12, 6, 4, 0.92), rgba(12, 6, 4, 0.6));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 186, 8, 0.14);
}

.lobby-topbar .brand {
  flex: 1 1 auto;
  min-width: 0;
  font-size: clamp(1.35rem, 5.2vw, 2.2rem);
}

.lobby-topbar__right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex: 0 0 auto;
  max-width: 58%;
}

.balance-chip {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.05rem;
  max-width: 100%;
  padding: 0.4rem 0.85rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-hot));
  box-shadow: 0 10px 24px rgba(208, 0, 0, 0.32);
  color: #fff;
  cursor: pointer;
  font-family: var(--font-body);
}

.balance-chip__label {
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.85;
}

.balance-chip__value {
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 3.8vw, 1.2rem);
  letter-spacing: 0.02em;
  max-width: 9.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lobby-account {
  position: relative;
}

.lobby-avatar {
  width: 2.6rem;
  height: 2.6rem;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 186, 8, 0.35);
  border-radius: 50%;
  background: linear-gradient(135deg, #7b2cbf, #5a189a);
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.35rem;
  cursor: pointer;
}

.lobby-account__menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  z-index: 50;
  min-width: 12rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.85rem;
  background: linear-gradient(180deg, var(--bg-mid), var(--bg-deep));
  border: 1px solid var(--stroke);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.lobby-account__menu[hidden] {
  display: none;
}

.lobby-account__name {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.lobby-account__menu a,
.lobby-account__menu button {
  padding: 0.5rem 0.15rem;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.lobby-account__menu a:hover,
.lobby-account__menu button:hover {
  color: var(--gold);
}

.lobby-account__exit {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--accent) !important;
}

.lobby-main {
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
  padding: 1.5rem 1.1rem 0;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  box-sizing: border-box;
  min-width: 0;
}

.wallet-card {
  position: relative;
  padding: 0.5rem 1rem 1.2rem;
  text-align: center;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.wallet-card__label {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.wallet-card__value {
  display: block;
  margin: 0.35rem 0 1.1rem;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 11vw, 3.6rem);
  line-height: 1;
  color: var(--ink);
  text-shadow: 0 0 32px rgba(255, 186, 8, 0.28);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.wallet-card__fruit {
  position: absolute;
  top: -0.6rem;
  right: 1.2rem;
  width: clamp(38px, 11vw, 56px);
  opacity: 0.85;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.5));
  pointer-events: none;
}

.wallet-card__actions {
  display: flex;
  justify-content: center;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.wallet-card__actions .btn {
  min-width: 9.5rem;
}

.wallet-card__refer {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.85rem;
  padding: 0.55rem 1.4rem;
  border: 1px solid rgba(255, 186, 8, 0.45);
  border-radius: 999px;
  background: rgba(255, 186, 8, 0.12);
  color: var(--gold);
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 0.9rem;
  cursor: pointer;
}

.wallet-card__refer:hover {
  background: rgba(255, 186, 8, 0.2);
  color: var(--ink);
}

.lobby-notice {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 186, 8, 0.22);
  border-left: 4px solid var(--gold);
  background: rgba(255, 186, 8, 0.08);
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 600;
}

.lobby-notice--alert {
  border-color: rgba(208, 0, 0, 0.35);
  border-left-color: var(--accent-hot);
  background: rgba(208, 0, 0, 0.12);
}

.lobby-notice__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: rgba(255, 186, 8, 0.2);
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.lobby-resume {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  flex-wrap: wrap;
  padding: 1rem 1.15rem;
  border: 1px solid rgba(128, 185, 24, 0.4);
  border-radius: 18px;
  background: rgba(128, 185, 24, 0.12);
}

.lobby-resume span {
  display: block;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.lobby-resume strong {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--ink);
}

/* CARTÃO DE APOSTA */
.bet-card {
  padding: 1.4rem 1.2rem 1.5rem;
  border: 1px solid var(--stroke);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(61, 36, 21, 0.55), rgba(18, 10, 6, 0.85));
  box-shadow: var(--shadow);
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
}

.bet-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.bet-card__head h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 7vw, 2.4rem);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1;
}

.bet-card__head p {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.35;
}

.online-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex: none;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: rgba(128, 185, 24, 0.16);
  border: 1px solid rgba(128, 185, 24, 0.35);
  color: #cdf07a;
  font-size: 0.75rem;
  font-weight: 800;
}

.online-badge i {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 10px var(--lime);
}

.bet-modes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  margin: 1.2rem 0 1.3rem;
  min-width: 0;
}

.bet-mode {
  padding: 0.8rem 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.3);
  color: var(--muted);
  font-size: clamp(0.72rem, 3.2vw, 0.85rem);
  font-weight: 800;
  text-align: center;
  min-width: 0;
  overflow-wrap: anywhere;
}

.bet-mode.is-active {
  border-color: var(--gold);
  background: rgba(232, 93, 4, 0.2);
  color: var(--gold);
}

.bet-label {
  display: block;
  margin-bottom: 0.6rem;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-align: center;
}

.bet-presets {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
  min-width: 0;
}

.bet-preset {
  padding: 0.85rem 0.3rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.32);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.25rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.bet-preset:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
}

.bet-preset.is-active {
  border-color: transparent;
  background: linear-gradient(135deg, var(--gold), var(--accent));
  color: var(--bg-deep);
  box-shadow: 0 10px 24px rgba(232, 93, 4, 0.35);
}

.bet-stepper {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0.9rem 0;
  padding: 0.7rem 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.32);
}

.bet-stepper__currency {
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 1.4rem;
}

.bet-stepper input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 2.1rem;
  text-align: center;
  outline: none;
  appearance: textfield;
  -moz-appearance: textfield;
}

.bet-stepper input::-webkit-outer-spin-button,
.bet-stepper input::-webkit-inner-spin-button {
  appearance: none;
  margin: 0;
}

.bet-stepper__arrows {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.bet-stepper__arrows button {
  border: 0;
  padding: 0 0.35rem;
  background: transparent;
  color: var(--muted);
  font-size: 0.7rem;
  cursor: pointer;
}

.bet-stepper__arrows button:hover {
  color: var(--gold);
}

.bet-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  padding: 0.9rem 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.28);
  min-width: 0;
}

.bet-stat {
  text-align: center;
  min-width: 0;
}

.bet-stat span {
  display: block;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.bet-stat strong {
  display: block;
  margin-top: 0.25rem;
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 4.2vw, 1.35rem);
  color: var(--gold);
  overflow-wrap: anywhere;
}

.bet-error {
  margin: 0.75rem 0 0;
  min-height: 1.1rem;
  color: #ff9a76;
  font-size: 0.85rem;
  font-weight: 700;
  text-align: center;
}

.bet-warning {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.9rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(255, 186, 8, 0.4);
  border-radius: 14px;
  background: rgba(255, 186, 8, 0.1);
  color: var(--gold);
  font-weight: 800;
  font-size: 0.9rem;
}

.bet-warning[hidden] {
  display: none;
}

.bet-warning .btn {
  padding: 0.6rem 1rem;
  font-size: 0.8rem;
  text-transform: uppercase;
}

.bet-submit {
  width: 100%;
  padding: 1.05rem 1.2rem;
  border: 1px solid rgba(255, 186, 8, 0.45);
  border-radius: 16px;
  background: linear-gradient(135deg, var(--gold), var(--accent));
  box-shadow: 0 14px 30px rgba(232, 93, 4, 0.4);
  color: var(--bg-deep);
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: filter 0.2s ease, transform 0.2s ease;
}

.bet-submit:hover {
  filter: brightness(1.06);
  transform: translateY(-2px);
}

.bet-submit:disabled {
  opacity: 0.6;
  cursor: progress;
  transform: none;
}

.bet-submit.is-blocked {
  background: linear-gradient(135deg, #6b4a2f, #4a2f1c);
  color: rgba(246, 239, 230, 0.7);
  box-shadow: none;
}

.lobby-panel {
  padding: 1.2rem 1.2rem 1.3rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  background: rgba(18, 10, 6, 0.6);
}

.lobby-panel__head {
  margin-bottom: 0.9rem;
}

.lobby-panel__head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.75rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.lobby-panel__head span {
  color: var(--muted);
  font-size: 0.85rem;
}

.lobby-panel .leaderboard {
  max-width: none;
}

.lobby-panel .leaderboard .score {
  font-size: 1.25rem;
}

/* NAV INFERIOR */
.lobby-nav {
  position: fixed;
  z-index: 45;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.2rem;
  padding: 0.5rem 0.4rem calc(0.5rem + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(12, 6, 4, 0.85), rgba(12, 6, 4, 0.98));
  border-top: 1px solid rgba(255, 186, 8, 0.16);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.lobby-nav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  min-width: 0;
  padding: 0.4rem 0.15rem;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 800;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lobby-nav__item span {
  font-size: 1.1rem;
  line-height: 1;
}

.lobby-nav__item:hover {
  color: var(--gold);
}

.lobby-nav__item.is-active {
  color: var(--gold);
  background: rgba(255, 186, 8, 0.1);
}

/* MODAL DE SAQUE */
.withdraw-modal[hidden],
.refer-modal[hidden],
.deposit-modal[hidden] {
  display: none !important;
}

.withdraw-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.withdraw-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 4, 2, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.withdraw-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  max-height: 92dvh;
  overflow-y: auto;
  padding: 2rem 1.6rem 1.7rem;
  background:
    radial-gradient(ellipse 90% 55% at 50% 0%, rgba(232, 93, 4, 0.16), transparent 70%),
    linear-gradient(180deg, #2a1410, #150b07);
  border: 1px solid rgba(255, 186, 8, 0.22);
  border-radius: 26px;
  box-shadow: var(--shadow);
  animation: riseIn 0.35s ease both;
}

.withdraw-modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-hot));
  color: #fff;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  transition: filter 0.2s ease;
}

.withdraw-modal__close:hover {
  filter: brightness(1.1);
}

.withdraw-modal__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 2.2rem;
  letter-spacing: 0.02em;
  text-align: center;
  color: var(--ink);
}

.withdraw-modal__subtitle {
  margin: 0.15rem 0 1.4rem;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

.withdraw-lock {
  margin: 1rem 0 0;
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(255, 186, 8, 0.35);
  border-radius: 14px;
  background: rgba(255, 186, 8, 0.1);
  color: var(--gold);
  font-size: 0.85rem;
  font-weight: 700;
}

.withdraw-lock[hidden] {
  display: none;
}

.withdraw-label {
  display: block;
  margin: 1.1rem 0 0.45rem;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.withdraw-field[hidden] {
  display: none;
}

.withdraw-select {
  position: relative;
}

.withdraw-select::after {
  content: "⌃";
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-55%) rotate(180deg);
  color: var(--muted);
  font-size: 0.9rem;
  pointer-events: none;
}

.withdraw-select select {
  width: 100%;
  padding: 0.9rem 2.4rem 0.9rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.4);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  appearance: none;
  outline: none;
  cursor: pointer;
}

.withdraw-select select:focus,
.withdraw-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(255, 186, 8, 0.12);
}

.withdraw-input {
  width: 100%;
  padding: 1.05rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.4);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  outline: none;
}

.withdraw-input::placeholder {
  color: rgba(196, 164, 132, 0.65);
  font-weight: 600;
}

.withdraw-amount {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.4);
}

.withdraw-amount:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(255, 186, 8, 0.12);
}

.withdraw-amount input {
  flex: 1;
  min-width: 0;
  padding: 0.55rem 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 700;
  outline: none;
  appearance: textfield;
  -moz-appearance: textfield;
}

.withdraw-amount input::placeholder {
  color: rgba(196, 164, 132, 0.65);
  font-weight: 600;
}

.withdraw-amount input::-webkit-outer-spin-button,
.withdraw-amount input::-webkit-inner-spin-button {
  appearance: none;
  margin: 0;
}

.withdraw-amount__arrows {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  flex: none;
}

.withdraw-amount__arrows button {
  border: 0;
  padding: 0 0.3rem;
  background: transparent;
  color: var(--muted);
  font-size: 0.65rem;
  line-height: 1.1;
  cursor: pointer;
}

.withdraw-amount__arrows button:hover {
  color: var(--gold);
}

.withdraw-hint {
  display: block;
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.withdraw-hint--balance {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.withdraw-hint--balance strong {
  color: var(--ink);
  font-weight: 800;
}

.withdraw-hint--balance button {
  margin-left: auto;
  padding: 0.3rem 0.75rem;
  border: 1px solid rgba(255, 186, 8, 0.35);
  border-radius: 999px;
  background: rgba(255, 186, 8, 0.12);
  color: var(--gold);
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 0.72rem;
  cursor: pointer;
}

.withdraw-hint--balance button:hover {
  background: rgba(255, 186, 8, 0.2);
}

.withdraw-note {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 1.3rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.withdraw-error {
  margin: 0.8rem 0 0;
  min-height: 1.1rem;
  color: #ff9a76;
  font-size: 0.85rem;
  font-weight: 700;
  text-align: center;
}

.withdraw-success {
  margin: 0.4rem 0 0;
  color: #cdf07a;
  font-size: 0.88rem;
  font-weight: 800;
  text-align: center;
}

.withdraw-success[hidden] {
  display: none;
}

.withdraw-submit {
  width: 100%;
  margin-top: 1.1rem;
  padding: 1.05rem 1.2rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff8c1a, var(--accent) 55%, var(--accent-hot));
  box-shadow: 0 14px 30px rgba(232, 93, 4, 0.4);
  color: #fff;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: filter 0.2s ease, transform 0.2s ease;
}

.withdraw-submit:hover {
  filter: brightness(1.06);
  transform: translateY(-2px);
}

.withdraw-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

/* INDICAÇÃO */
.refer-modal[hidden] {
  display: none;
}

.refer-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.refer-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 4, 2, 0.78);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.refer-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  max-height: 92dvh;
  overflow-y: auto;
  padding: 2rem 1.6rem 1.7rem;
  background:
    radial-gradient(ellipse 90% 55% at 50% 0%, rgba(232, 93, 4, 0.16), transparent 70%),
    linear-gradient(180deg, #2a1410, #150b07);
  border: 1px solid rgba(255, 186, 8, 0.22);
  border-radius: 26px;
  box-shadow: var(--shadow);
  animation: riseIn 0.35s ease both;
}

.refer-modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-hot));
  color: #fff;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  transition: filter 0.2s ease;
}

.refer-modal__close:hover {
  filter: brightness(1.1);
}

.refer-modal__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 2.2rem;
  letter-spacing: 0.02em;
  text-align: center;
}

.refer-modal__subtitle {
  margin: 0.15rem 0 1.3rem;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

.refer-modal__subtitle strong {
  color: var(--lime);
  font-weight: 900;
}

.refer-link-box {
  padding: 1.1rem 1rem;
  border: 1px dashed rgba(255, 186, 8, 0.45);
  border-radius: 18px;
  background: rgba(232, 93, 4, 0.08);
  text-align: center;
}

.refer-link-box__label {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.refer-link-box__url {
  display: block;
  margin: 0.55rem 0 0.9rem;
  color: var(--gold);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.refer-link-box__input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.refer-link-box__copy {
  padding: 0.55rem 1.4rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff8c1a, var(--accent));
  box-shadow: 0 8px 20px rgba(232, 93, 4, 0.35);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  transition: filter 0.2s ease;
}

.refer-link-box__copy:hover {
  filter: brightness(1.08);
}

.refer-link-box__copy.is-copied {
  background: linear-gradient(135deg, var(--lime), #5c8a12);
  box-shadow: none;
}

.refer-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
  margin: 0.9rem 0;
}

.refer-tile {
  padding: 0.9rem 0.4rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.4);
  text-align: center;
}

.refer-tile strong {
  display: block;
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 900;
}

.refer-tile--money strong {
  color: var(--lime);
}

.refer-tile span {
  display: block;
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.refer-payout {
  padding: 1.1rem 1rem 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.4);
  text-align: center;
}

.refer-payout__label {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.refer-payout__value {
  display: block;
  margin: 0.3rem 0 0.9rem;
  color: var(--lime);
  font-family: var(--font-display);
  font-size: 2.6rem;
  line-height: 1;
}

.refer-payout__button {
  width: 100%;
  padding: 0.95rem 1rem;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #ff8c1a, var(--accent) 55%, var(--accent-hot));
  box-shadow: 0 12px 26px rgba(232, 93, 4, 0.35);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: filter 0.2s ease, transform 0.2s ease;
}

.refer-payout__button:hover:not(:disabled) {
  filter: brightness(1.06);
  transform: translateY(-2px);
}

.refer-payout__button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.refer-payout__note {
  margin: 0.7rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

.refer-payout__note:empty {
  margin: 0;
}

.refer-payout__form {
  margin-top: 0.4rem;
  text-align: left;
}

.refer-payout__form[hidden],
.refer-payout__cpf[hidden] {
  display: none;
}

.refer-payout__form .refer-payout__button {
  margin-top: 0.4rem;
}

.refer-modal__legal {
  margin: 1.1rem 0 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.5;
  text-align: center;
}

/* RESULTADO DA PARTIDA PAGA */
.match-result[hidden] {
  display: none;
}

.match-result {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(8, 4, 2, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.match-result__dialog {
  width: min(100%, 400px);
  padding: 2rem 1.5rem 1.7rem;
  text-align: center;
  border: 1px solid var(--stroke);
  border-radius: 22px;
  background: linear-gradient(180deg, var(--bg-mid), var(--bg-deep));
  box-shadow: var(--shadow);
}

.match-result.is-win .match-result__dialog {
  border-color: rgba(128, 185, 24, 0.55);
}

.match-result__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 2.2rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.match-result__value {
  display: block;
  margin: 0.6rem 0 0.5rem;
  font-family: var(--font-display);
  font-size: 3rem;
  line-height: 1;
  color: var(--gold);
}

.match-result__value[hidden] {
  display: none;
}

.match-result.is-win .match-result__value {
  color: var(--lime);
  text-shadow: 0 0 26px rgba(128, 185, 24, 0.4);
}

.match-result__note {
  margin: 0.85rem 0 1.3rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.match-result.is-lose .match-result__note {
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 700;
}

.match-result__button {
  display: block;
  padding: 0.9rem 1.2rem;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--gold), var(--accent));
  color: var(--bg-deep);
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.match-result__button:hover {
  color: var(--bg-deep);
  filter: brightness(1.06);
}

@media (max-width: 420px) {
  .lobby-main {
    padding-inline: 0.85rem;
  }

  .bet-presets {
    grid-template-columns: repeat(3, 1fr);
  }

  .wallet-card__actions .btn {
    min-width: 8rem;
  }

  .refer-payout__value {
    font-size: 2.2rem;
  }
}