* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --pink: #ffebf1;
  --pink-light: #fff6f8;
  --pink-dark: #efc8d2;
  --dark: #2d2131;
  --dark-soft: #5b475d;
  --green: #00c786;
  --yellow: #f3c233;
  --white: #ffffff;
  --glass: rgba(255, 255, 255, 0.58);
  --glass-strong: rgba(255, 255, 255, 0.78);
  --border: rgba(255, 255, 255, 0.92);
  --shadow: 0 16px 48px rgba(74, 32, 48, 0.18);
  --shadow-soft: 0 8px 24px rgba(74, 32, 48, 0.10);
  --radius-xl: 30px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --transition: 0.25s ease;
}

html,
body {
  min-height: 100%;
}

body {
  font-family: Arial, sans-serif;
  background: linear-gradient(135deg, #fff4f6 0%, #ffe7bf 100%);
  color: var(--dark);
  min-height: 100vh;
  overflow-x: hidden;
  padding: 18px;
  position: relative;
}

body::before,
body::after {
  content: '';
  position: fixed;
  inset: auto;
  border-radius: 50%;
  filter: blur(10px);
  pointer-events: none;
  z-index: 0;
}

body::before {
  width: 320px;
  height: 320px;
  left: -100px;
  top: 90px;
  background: radial-gradient(circle, rgba(255,255,255,0.55), rgba(255,255,255,0));
}

body::after {
  width: 340px;
  height: 340px;
  right: -110px;
  bottom: 60px;
  background: radial-gradient(circle, rgba(255,255,255,0.38), rgba(255,255,255,0));
}

.bg-cloud,
.bg-cloud-right,
.bg-cloud-bottom {
  position: fixed;
  background: rgba(255,255,255,0.22);
  border-radius: 999px;
  z-index: 0;
  pointer-events: none;
  filter: blur(1px);
}

.bg-cloud::before,
.bg-cloud::after,
.bg-cloud-right::before,
.bg-cloud-right::after,
.bg-cloud-bottom::before,
.bg-cloud-bottom::after {
  content: '';
  position: absolute;
  background: inherit;
  border-radius: inherit;
}

.bg-cloud {
  width: 110px;
  height: 38px;
  left: 18px;
  top: 300px;
}

.bg-cloud::before {
  width: 40px;
  height: 40px;
  left: 10px;
  top: -12px;
}

.bg-cloud::after {
  width: 52px;
  height: 52px;
  right: 16px;
  top: -18px;
}

.bg-cloud-right {
  width: 118px;
  height: 40px;
  right: 20px;
  top: 360px;
}

.bg-cloud-right::before {
  width: 36px;
  height: 36px;
  left: 12px;
  top: -10px;
}

.bg-cloud-right::after {
  width: 50px;
  height: 50px;
  right: 14px;
  top: -18px;
}

.bg-cloud-bottom {
  width: 96px;
  height: 32px;
  left: 34px;
  bottom: 110px;
}

.bg-cloud-bottom::before {
  width: 30px;
  height: 30px;
  left: 8px;
  top: -8px;
}

.bg-cloud-bottom::after {
  width: 42px;
  height: 42px;
  right: 12px;
  top: -14px;
}

.app {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
  padding: 8px 4px 0;
}

.topbar strong {
  font-size: 28px;
  line-height: 1;
}

.mini-label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.08em;
  opacity: 0.62;
  margin-bottom: 6px;
}

.meta-box {
  text-align: right;
}

.meta-box strong {
  color: var(--yellow);
  font-size: 24px;
}

.progress-wrap {
  text-align: center;
  margin-bottom: 18px;
}

.saldo-box {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
}

.saldo-box span {
  font-size: 46px;
  font-weight: 900;
  color: var(--green);
  line-height: 1;
}

.saldo-box small {
  color: rgba(45, 33, 49, 0.52);
  font-size: 24px;
  font-weight: 700;
}

.progress-bar {
  width: 100%;
  max-width: 330px;
  height: 8px;
  background: rgba(255,255,255,0.6);
  border-radius: 999px;
  margin: 0 auto 8px;
  overflow: hidden;
  box-shadow: inset 0 1px 4px rgba(0,0,0,0.05);
}

.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #00c786 0%, #4edca9 100%);
  transition: width 0.4s ease;
}

.progress-caption {
  font-size: 13px;
  color: rgba(45, 33, 49, 0.46);
}

.game-area,
.card {
  background: var(--glass);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.game-area {
  min-height: 560px;
  border-radius: 38px;
  position: relative;
  overflow: hidden;
  margin-bottom: 18px;
}

.game-area::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.22) 0%, rgba(255,255,255,0.02) 34%, rgba(255,255,255,0.18) 100%);
  pointer-events: none;
}

.scene {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scene-ghost {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.12;
  font-size: 420px;
  line-height: 1;
  transform: translateY(10px);
  user-select: none;
}

.scene-cloud-left,
.scene-cloud-right,
.scene-cloud-bottom-right,
.scene-cloud-bottom-left {
  position: absolute;
  background: rgba(255,255,255,0.22);
  border-radius: 999px;
}

.scene-cloud-left {
  width: 92px;
  height: 30px;
  left: 16px;
  top: 180px;
}

.scene-cloud-right {
  width: 88px;
  height: 28px;
  right: 20px;
  top: 220px;
}

.scene-cloud-bottom-left {
  width: 84px;
  height: 26px;
  left: 34px;
  bottom: 110px;
}

.scene-cloud-bottom-right {
  width: 90px;
  height: 28px;
  right: 34px;
  bottom: 120px;
}

.scene-center {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 36px 22px;
  margin-top: 42px;
}

.tap-title {
  font-size: 28px;
  font-weight: 900;
  margin-bottom: 14px;
}

.pirata {
  font-size: 94px;
  line-height: 1;
  user-select: none;
  cursor: pointer;
  transition: transform var(--transition), filter var(--transition);
  filter: drop-shadow(0 12px 26px rgba(62, 29, 50, 0.16));
}

.pirata:hover {
  transform: translateY(-3px) scale(1.04);
}

.pirata.spin {
  animation: premiumPulse 0.55s infinite alternate;
}

@keyframes premiumPulse {
  from { transform: translateY(0) scale(1); }
  to { transform: translateY(-6px) scale(1.12) rotate(-4deg); }
}

.arrow {
  margin-top: 8px;
  font-size: 46px;
  line-height: 1;
  color: var(--dark);
}

.result-box {
  margin-top: 18px;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(255,255,255,0.96);
  border-radius: 20px;
  padding: 14px 18px;
  min-width: 240px;
  box-shadow: var(--shadow-soft);
}

.result-box h1 {
  font-size: 24px;
  margin-bottom: 5px;
}

.result-box p {
  opacity: 0.72;
  font-size: 14px;
}

.panel-grid {
  display: grid;
  gap: 16px;
}

.card {
  border-radius: var(--radius-xl);
  padding: 18px;
}

.card-title {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 14px;
}

.controls-grid {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  margin-bottom: 12px;
}

.bet-chip {
  border: none;
  border-radius: 16px;
  height: 52px;
  padding: 0 16px;
  background: rgba(255,255,255,0.68);
  color: var(--dark);
  font-weight: 800;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
}

.controls label {
  display: block;
  margin-bottom: 8px;
  font-weight: 800;
}

.controls input {
  width: 100%;
  height: 56px;
  border-radius: 18px;
  border: 1px solid #eddce1;
  background: rgba(255,255,255,0.78);
  padding: 0 16px;
  font-size: 18px;
  margin-bottom: 12px;
  color: var(--dark);
}

button {
  border: none;
  border-radius: 18px;
  height: 56px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  transition: transform var(--transition), opacity var(--transition), box-shadow var(--transition);
}

button:hover {
  transform: translateY(-1px);
}

button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

button.primary {
  width: 100%;
  background: linear-gradient(135deg, #30212f 0%, #564158 100%);
  color: #fff;
  box-shadow: 0 14px 28px rgba(48, 33, 47, 0.28);
}

button.secondary {
  width: auto;
  height: 40px;
  padding: 0 16px;
  background: rgba(255,255,255,0.72);
  color: var(--dark);
  box-shadow: var(--shadow-soft);
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 6px;
}

.stat-box {
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(255,255,255,0.92);
  border-radius: 18px;
  padding: 12px;
  text-align: center;
}

.stat-box small {
  display: block;
  font-size: 11px;
  opacity: 0.62;
  margin-bottom: 6px;
}

.stat-box strong {
  font-size: 16px;
}

.history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.history-list {
  display: grid;
  gap: 10px;
}

.history-item {
  background: rgba(255,255,255,0.78);
  border-radius: 18px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,0.95);
  box-shadow: var(--shadow-soft);
}

.history-item small {
  display: block;
  opacity: 0.62;
  margin-top: 6px;
}

.win {
  color: #0e8e63;
}

.lose {
  color: #b44747;
}

@media (max-width: 520px) {
  body {
    padding: 12px;
  }

  .topbar strong {
    font-size: 22px;
  }

  .meta-box strong {
    font-size: 20px;
  }

  .saldo-box span {
    font-size: 38px;
  }

  .saldo-box small {
    font-size: 20px;
  }

  .game-area {
    min-height: 520px;
    border-radius: 30px;
  }

  .scene-ghost {
    font-size: 330px;
  }

  .tap-title {
    font-size: 24px;
  }

  .controls-grid {
    grid-template-columns: 1fr 1fr;
  }

  .controls-grid .bet-chip:first-child {
    grid-column: 1 / -1;
  }

  .stats-row {
    grid-template-columns: 1fr;
  }
}
.app-shell {
  max-width: 560px;
  margin: 0 auto;
}

.page {
  display: none;
}

.page.active {
  display: block;
}

.hero-page,
.painel-page,
.jogo-page {
  padding: 18px 0 30px;
}

.hero-card,
.panel-card,
.hud-card,
.arena-card,
.resultado-card,
.top-info-card {
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(255,255,255,0.92);
  box-shadow: 0 16px 48px rgba(74,32,48,0.18);
  backdrop-filter: blur(14px);
  border-radius: 28px;
  padding: 20px;
  margin-bottom: 16px;
}

.hero-badge,
.mini-label {
  font-size: 11px;
  opacity: .6;
  display: block;
  margin-bottom: 8px;
}

.hero-card h1 {
  font-size: 34px;
  line-height: 1.08;
  margin-bottom: 12px;
}

.hero-card p {
  opacity: .78;
  line-height: 1.6;
  margin-bottom: 18px;
}

.hero-actions,
.quick-bets,
.game-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-primary,
.btn-secondary,
.btn-gold,
.bet-chip {
  border: none;
  border-radius: 18px;
  min-height: 52px;
  padding: 0 18px;
  cursor: pointer;
  font-weight: 800;
}

.btn-primary {
  background: linear-gradient(135deg,#30212f 0%,#564158 100%);
  color: #fff;
}

.btn-secondary {
  background: rgba(255,255,255,0.75);
  color: #2d2131;
}

.btn-gold {
  background: linear-gradient(135deg,#FFD700,#FFA500);
  color: #000;
}

.btn-full {
  width: 100%;
  margin-top: 12px;
}

.panel-card input,
.panel-card select {
  width: 100%;
  height: 54px;
  border-radius: 16px;
  border: 1px solid #ead7dd;
  background: rgba(255,255,255,0.82);
  padding: 0 14px;
  font-size: 16px;
  margin: 8px 0 12px;
}

.card-title {
  font-weight: 900;
  font-size: 20px;
  margin-bottom: 12px;
}

.top-info-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.saldo-big {
  display: block;
  font-size: 34px;
  color: #00c786;
}

.meta-mini-box strong {
  color: #f3c233;
}

.history-list {
  display: grid;
  gap: 10px;
}

.history-item {
  background: rgba(255,255,255,0.78);
  border-radius: 16px;
  padding: 12px;
}

.history-item.win {
  color: #0e8e63;
}

.history-item.lose {
  color: #b44747;
}

.hud-card {
  display: grid;
  grid-template-columns: 110px 1fr 110px;
  gap: 12px;
  align-items: center;
}

.hud-center {
  text-align: center;
}

.valor-acumulado {
  font-size: 26px;
  font-weight: 900;
  color: #00c786;
  margin-bottom: 8px;
}

.barra-wrap {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.55);
  overflow: hidden;
}

.barra-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg,#00c786,#ffd700);
  transition: width .3s ease;
}

.arena-card {
  min-height: 360px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.arena-ghost {
  font-size: 180px;
  opacity: .12;
  line-height: 1;
  margin-bottom: 10px;
}

.arena-title {
  font-size: 24px;
  font-weight: 900;
  margin-bottom: 10px;
}

.arena-sub {
  opacity: .7;
  margin-bottom: 18px;
}

.resultado-card h3 {
  font-size: 26px;
  margin-bottom: 10px;
}

.resultado-valor {
  font-size: 34px;
  font-weight: 900;
  margin-bottom: 8px;
}

.resultado-win {
  border: 1px solid rgba(255,215,0,.5);
}

.resultado-lose {
  border: 1px solid rgba(239,68,68,.35);
}

@media (max-width: 640px) {
  .hero-card h1 {
    font-size: 28px;
  }

  .hud-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .game-buttons {
    justify-content: center;
  }
}