/* ═══════════════════════════════════════════════════════════════════════════════
   HelixJumPAY — Game Page Styles
   ═══════════════════════════════════════════════════════════════════════════════ */

/* ─── Game Container ─────────────────────────────────────────────────────────── */
#game-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  background: linear-gradient(to bottom, #FFE4EE, #FFB3CB) !important;
  opacity: 1 !important;
}

#game-container canvas {
  display: block;
  width: 100%;
  height: 100%;
  background: transparent !important;
  opacity: 1 !important;
}

#ui-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
}

/* ─── Start Screen ───────────────────────────────────────────────────────────── */
#start-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255, 240, 240, 0.92);
  pointer-events: auto;
  z-index: 10;
}

#start-screen.hidden { display: none; }

#start-screen p {
  font-size: 26px;
  font-weight: bold;
  color: #1a1a2e;
  margin-bottom: 20px;
}

#start-screen .arrow {
  font-size: 52px;
  animation: bounce-arrow 1s ease-in-out infinite;
}

@keyframes bounce-arrow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(14px); }
}

/* ─── Score & Combo ──────────────────────────────────────────────────────────── */
#score {
  position: absolute;
  top: 20px;
  top: calc(20px + env(safe-area-inset-top, 0px));
  left: 50%;
  transform: translateX(-50%);
  font-size: 64px;
  font-weight: bold;
  color: #1a1a2e;
  white-space: nowrap;
  pointer-events: none;
}

#idle-hint {
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 18px;
  color: rgba(26, 26, 46, 0.45);
  display: none;
  pointer-events: none;
}

#idle-hint.visible {
  display: block;
  animation: blink-hint 1.5s ease-in-out infinite;
}

@keyframes blink-hint {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

#combo {
  position: absolute;
  top: 96px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 20px;
  font-weight: bold;
  color: #e91e63;
  display: none;
  pointer-events: none;
}

#combo.visible { display: block; }

/* ─── Bet Header ─────────────────────────────────────────────────────────────── */
#bet-header {
  position: absolute;
  top: 14px;
  top: calc(14px + env(safe-area-inset-top, 0px));
  left: 14px;
  right: 14px;
  z-index: 12;
  pointer-events: auto;
  display: grid;
  gap: 10px;
}

.bet-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 12px;
  border-radius: 16px;
  background: rgba(7, 8, 21, 0.62);
  border: 1px solid rgba(255,255,255,0.14);
  backdrop-filter: blur(10px);
  color: rgba(251,247,255,0.95);
  box-shadow: 0 16px 56px rgba(0,0,0,0.24);
}

.bet-left {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.bet-left small {
  opacity: 0.72;
  font-weight: 800;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  font-size: 11px;
}

.bet-left b {
  font-size: 16px;
  letter-spacing: 0.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bet-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  font-weight: 900;
}

.bet-tag {
  padding: 9px 10px;
  border-radius: 14px;
  border: 1px solid rgba(32,227,255,0.18);
  background: rgba(32,227,255,0.10);
  color: rgba(214,251,255,0.95);
  font-weight: 950;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  font-size: 11px;
  white-space: nowrap;
}

.bet-exit {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: rgba(251,247,255,0.92);
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 18px;
  font-weight: 900;
}

/* ─── Bet Progress ───────────────────────────────────────────────────────────── */
.bet-progress {
  display: grid;
  gap: 8px;
  padding: 12px 12px;
  border-radius: 16px;
  background: rgba(7, 8, 21, 0.52);
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(10px);
  color: rgba(251,247,255,0.92);
}

.bet-progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 900;
  letter-spacing: 0.2px;
}

.bet-progress-row span {
  opacity: 0.74;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.9px;
  text-transform: uppercase;
}

#bet-earned { color: #00C97A; }
#bet-target { color: #4D9EFF; }

.bet-sub {
  opacity: 0.72;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.2px;
}

/* ─── Cashout Button ─────────────────────────────────────────────────────────── */
.cashout-btn {
  margin-top: 6px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(34,197,94,0.35);
  background: linear-gradient(135deg, rgba(34,197,94,0.85), rgba(32,227,255,0.55));
  color: rgba(7,8,21,0.95);
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

.cashout-btn.show { display: inline-flex; }
.cashout-btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* ─── Collect Button ─────────────────────────────────────────────────────────── */
.collect-btn {
  padding: 8px 12px;
  border-radius: 12px;
  border: 1.5px solid rgba(34,197,94,0.5);
  background: linear-gradient(135deg, #16a34a, #059669);
  color: #fff;
  font-weight: 950;
  font-size: 11px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: pointer;
  display: none;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  box-shadow: 0 0 10px rgba(34,197,94,0.3), inset 0 1px 0 rgba(255,255,255,0.2);
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
  position: relative;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.collect-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.15) 50%, transparent 100%);
  animation: collectShine 2s ease-in-out infinite;
}
@keyframes collectShine {
  0% { transform: translateX(-100%); }
  60%, 100% { transform: translateX(100%); }
}
.collect-btn:active { transform: scale(0.95); }
.collect-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.collect-btn svg { width: 12px; height: 12px; position: relative; }
.collect-btn.show { display: inline-flex; }

/* ─── Meta Pill ──────────────────────────────────────────────────────────────── */
.meta-pill {
  position: fixed;
  bottom: 24px;
  right: 16px;
  z-index: 900;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(32,227,255,0.18);
  background: rgba(7,8,21,0.75);
  backdrop-filter: blur(6px);
  color: rgba(214,251,255,0.95);
  font-weight: 950;
  font-size: 11px;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
}

/* ─── Progress Bar ───────────────────────────────────────────────────────────── */
.bar {
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.20);
  overflow: hidden;
}

.bar > i {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, rgba(34,197,94,0.95), rgba(32,227,255,0.85));
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(34,197,94,0.16);
}

/* ─── Points Popup ───────────────────────────────────────────────────────────── */
#points-popup {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 38px;
  font-weight: 900;
  color: #22c55e;
  text-shadow: 0 4px 12px rgba(34,197,94,0.4), 0 0 4px rgba(0,0,0,0.2);
  pointer-events: none;
  opacity: 0;
  display: none;
}

#points-popup.visible { display: block; }

/* ─── Game Over ──────────────────────────────────────────────────────────────── */
#game-over {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  display: none;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.92);
  padding: 30px 24px;
  border-radius: 22px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.18);
  width: min(360px, calc(100vw - 40px));
  backdrop-filter: blur(10px);
}

#game-over.visible {
  display: block;
  pointer-events: auto;
}

#game-over h2 {
  margin-bottom: 10px;
  color: #1a1a2e;
  font-size: 32px;
}

#game-over p {
  margin-bottom: 8px;
  color: #555;
  font-size: 18px;
}

#game-over .restart-btn {
  margin-top: 16px;
  width: 100%;
  padding: 14px 18px;
  font-size: 16px;
  font-weight: bold;
  color: white;
  background: #e91e63;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-family: Arial, sans-serif;
  transition: background 0.2s;
}

#game-over .restart-btn:hover { background: #c2185b; }

#game-over .go-sub {
  margin-top: 10px;
  font-size: 13px;
  color: rgba(85, 85, 85, 0.85);
}

/* ─── Cashout Modal ──────────────────────────────────────────────────────────── */
#cashout-modal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  display: none;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.92);
  padding: 30px 24px;
  border-radius: 22px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.18);
  width: min(360px, calc(100vw - 40px));
  backdrop-filter: blur(10px);
}

#cashout-modal.visible {
  display: block;
  pointer-events: auto;
}

#cashout-modal h2 {
  margin-bottom: 10px;
  color: #1a1a2e;
  font-size: 32px;
}

#cashout-modal p {
  margin-bottom: 8px;
  color: #555;
  font-size: 18px;
}

#cashout-modal .go-sub {
  margin-top: 10px;
  font-size: 13px;
  color: rgba(85, 85, 85, 0.85);
}

#cashout-modal .recolher-btn {
  margin-top: 12px;
  width: 100%;
  padding: 14px 18px;
  font-size: 16px;
  font-weight: bold;
  color: white;
  background: #22c55e;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-family: Arial, sans-serif;
  transition: filter 0.2s;
}

#cashout-modal .recolher-btn:hover { filter: brightness(0.95); }

/* ─── Free Finish ────────────────────────────────────────────────────────────── */
#cashout-modal.free-finish h2 {
  width: 86px;
  height: 86px;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.95), rgba(255,255,255,0) 55%), linear-gradient(135deg, #22c55e, #00c2ff);
  color: rgba(0,0,0,0.82);
  box-shadow: 0 18px 55px rgba(34,197,94,0.22);
  animation: freeFinishPulse 1100ms ease-in-out infinite;
}

@keyframes freeFinishPulse {
  0%, 100% { transform: translateZ(0) scale(1); }
  50% { transform: translateZ(0) scale(1.05); }
}

#cashout-modal.free-finish #free-collect-line b {
  display: block;
  margin: 12px 0 6px;
  padding: 12px 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(34,197,94,0.16), rgba(0,194,255,0.12));
  border: 1px solid rgba(26,26,46,0.12);
  color: #1a1a2e;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 950;
}

#cashout-modal.free-finish #free-collect-total {
  font-size: 22px;
  letter-spacing: 0.2px;
}

#cashout-modal.free-finish .recolher-btn {
  box-shadow: 0 16px 40px rgba(34,197,94,0.22);
}

/* ─── Game Page Layout ───────────────────────────────────────────────────────── */
.jogo-page { min-height: 100vh; position: relative; background: #fbcfe8; overflow: hidden; }

/* ─── Helix Game Area (from style.css) ───────────────────────────────────────── */
.helix-game-area {
  position: fixed; top: 60px; left: 0; right: 0; bottom: 0;
  background: #0a0018;
  touch-action: none;
  cursor: grab;
}
.helix-game-area:active { cursor: grabbing; }
.helix-game-area canvas {
  width: 100%; height: 100%; display: block;
}
.helix-instructions {
  position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
  pointer-events: none; z-index: 10;
  animation: fadeIn 0.5s ease both;
  animation-delay: 0.5s;
}
.helix-instructions-text {
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.14);
  backdrop-filter: blur(10px); border-radius: 16px;
  padding: 12px 24px; text-align: center;
  font-size: 14px; font-weight: 600; color: rgba(255,255,255,0.7);
}
.helix-instructions-text small {
  font-size: 12px; color: rgba(255,255,255,0.4);
}

/* ─── Result Overlay (from style.css) ────────────────────────────────────────── */
.resultado-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.75); display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.resultado-overlay.hidden { display: none; }
.resultado-box {
  background: #fff; border-radius: var(--radius); padding: 40px 32px;
  text-align: center; max-width: 380px; width: 100%;
  animation: popIn 0.4s ease both; color: #2d0014;
}
.resultado-icon { font-size: 64px; margin-bottom: 10px; }
.resultado-title { font-size: 26px; font-weight: 800; margin-bottom: 8px; }
.resultado-valor { font-size: 36px; font-weight: 800; margin-bottom: 20px; }
.resultado-valor.ganhou { color: var(--green); }
.resultado-valor.perdeu { color: var(--red); }

/* ─── HUD (from style.css) ──────────────────────────────────────────────────── */
.bolinha-hud {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 900px; padding: 0 10px; z-index: 50;
  display: flex; flex-direction: column; gap: 8px;
}
.hud-pill {
  background: rgba(80, 70, 80, 0.85); backdrop-filter: blur(4px);
  border-radius: 8px; font-family: 'Poppins', sans-serif;
  color: #fff; position: relative; overflow: hidden;
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 16px;
}
.hud-pill.pd-bottom {
  flex-direction: column; align-items: stretch; padding: 0;
}
.hud-progress-track {
  width: 100%; height: 36px; background: rgba(0,0,0,0.2);
  position: relative;
}
.hud-progress-bar {
  height: 100%; background: rgba(255,255,255,0.15); transition: width 0.3s;
}
.hud-text-row {
  position: absolute; top: 0; left: 0; right: 0; height: 36px;
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 16px;
}
.hud-left, .hud-right { display: flex; align-items: center; gap: 12px; }
.hud-left { flex-direction: column; align-items: flex-start; gap: 2px; }
.hud-text-row .hud-left { align-items: flex-start; }
.hud-text-row .hud-right { align-items: flex-end; }
.hud-label { font-size: 10px; color: rgba(255,255,255,0.7); font-weight: 700; text-transform: uppercase; line-height: 1; }
.hud-val { font-size: 14px; font-weight: 800; line-height: 1; }
.meta-badge { background: #5a7b8c; padding: 4px 10px; border-radius: 4px; font-size: 11px; font-weight: 800; }
.hud-close { background: rgba(255,255,255,0.15); border: none; color: #fff; width: 24px; height: 24px; border-radius: 4px; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.hud-val-inline { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; }
.hud-val-inline .hud-label { margin-bottom: 0; }
.hud-sub { font-size: 9px; color: rgba(255,255,255,0.5); font-weight: 600; padding-left: 16px; margin-top: -3px; }
.hud-text-row .hud-sub { position: absolute; top: 22px; left: 16px; }
