/* HELLIX DO PIX — design system da área interna do jogo (visual only) */

:root {
  --hx-ink: #07040A;
  --hx-ink-2: #12080F;
  --hx-glass: rgba(10, 6, 12, 0.72);
  --hx-glass-2: rgba(22, 10, 18, 0.82);
  --hx-line: rgba(232, 93, 4, 0.32);
  --hx-orange: #E85D04;
  --hx-amber: #FFB347;
  --hx-ember: #FF8C42;
  --hx-violet: #7B2FBE;
  --hx-toxic: #7CFF4D;
  --hx-moon: #F4EDE4;
  --hx-muted: #A3968C;
  --hx-danger: #E11D48;
  --hx-radius: 18px;
  --hx-radius-pill: 999px;
  --hx-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  --hx-glow: 0 0 28px rgba(232, 93, 4, 0.45);
  --hx-font-display: 'Oswald', 'Cinzel', sans-serif;
  --hx-font-ui: 'Outfit', sans-serif;
  --hx-z-scene: 2;
  --hx-z-hud: 40;
  --hx-z-cta: 50;
  --hx-z-modal: 80;
}

#page-jogo.page.active {
  display: block;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--hx-ink);
}

/* ── Wordmark HELLIX DO PIX ── */
.hx-wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 0.16em;
  line-height: 0.92;
  white-space: nowrap;
  user-select: none;
}
.hx-wm-helix {
  position: relative;
  font-family: 'Cinzel', serif;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: linear-gradient(180deg, #FFF8EC 0%, #FFB347 46%, #E85D04 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #FFB347;
  filter: drop-shadow(0 1px 0 rgba(0,0,0,.65)) drop-shadow(0 0 14px rgba(232,93,4,.5));
}
.hx-wm-helix::after {
  content: '';
  position: absolute;
  left: 6%;
  right: 6%;
  bottom: -0.1em;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,179,71,.85), transparent);
  pointer-events: none;
}
.hx-wm-do {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-style: italic;
  color: #C4B5FD;
  font-size: 0.52em;
  margin: 0 0.02em;
  letter-spacing: 0.28em;
  align-self: center;
  text-shadow: 0 0 12px rgba(123,47,190,.75);
}
.hx-wm-pix {
  font-family: var(--hx-font-display);
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--hx-orange);
  text-shadow: 0 0 16px rgba(232,93,4,.8), 0 0 2px rgba(255,179,71,.45);
}

.lnd-nav-brand .hx-wordmark,
.pnl-logo .hx-wordmark,
.lgn-logo .hx-wordmark,
.reg-logo .hx-wordmark { font-size: 17px; }
.lnd-footer-copy .hx-wordmark,
.lnd-footer-brand .hx-wordmark { font-size: 13px; }

/* ── Game shell ── */
.hx-game {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--hx-ink);
  font-family: var(--hx-font-ui);
  color: var(--hx-moon);
}
.hx-game iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  z-index: 1;
}

.hx-scene {
  position: absolute;
  inset: 0;
  z-index: var(--hx-z-scene);
  pointer-events: none;
}
.hx-scene-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 42%, transparent 28%, rgba(7,4,10,.42) 78%, rgba(7,4,10,.78) 100%),
    linear-gradient(180deg, rgba(7,4,10,.55) 0%, transparent 18%, transparent 72%, rgba(7,4,10,.62) 100%);
}
.hx-scene-fog {
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: -8%;
  height: 18%;
  background: radial-gradient(ellipse at 50% 100%, rgba(232,93,4,.12), transparent 62%),
              linear-gradient(180deg, transparent, rgba(18,8,16,.4));
  filter: blur(8px);
  animation: hxFog 9s ease-in-out infinite alternate;
}
.hx-scene-embers {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(2px 2px at 12% 78%, rgba(255,179,71,.7) 0, transparent 100%),
    radial-gradient(1.5px 1.5px at 78% 64%, rgba(124,255,77,.45) 0, transparent 100%),
    radial-gradient(2px 2px at 62% 88%, rgba(232,93,4,.55) 0, transparent 100%),
    radial-gradient(1px 1px at 30% 40%, rgba(255,255,255,.28) 0, transparent 100%);
  animation: hxEmber 6s linear infinite;
  opacity: .55;
}
@keyframes hxFog {
  from { transform: translateX(-3%) scaleX(1); opacity: .7; }
  to { transform: translateX(3%) scaleX(1.04); opacity: 1; }
}
@keyframes hxEmber {
  from { transform: translateY(8px); }
  to { transform: translateY(-10px); }
}

/* ── HUD ── */
.hx-hud {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--hx-z-hud);
  display: none;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 12px 0;
  pointer-events: none;
}
.hx-hud-bar {
  pointer-events: auto;
  display: grid;
  grid-template-columns: minmax(86px, 1fr) minmax(0, 2.2fr) minmax(86px, 1fr);
  align-items: center;
  gap: 8px;
  max-width: 920px;
  margin: 0 auto;
  padding: 10px 12px 12px;
  background: linear-gradient(180deg, var(--hx-glass) 0%, rgba(10,6,12,.46) 100%);
  border: 1px solid var(--hx-line);
  border-radius: 20px;
  box-shadow: var(--hx-shadow), inset 0 1px 0 rgba(255,255,255,.06);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.hx-hud-chip {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.hx-hud-chip-right { align-items: flex-end; text-align: right; }
.hx-hud-k {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(244,237,228,.48);
}
.hx-hud-v {
  font-size: 14px;
  font-weight: 800;
  color: var(--hx-moon);
  white-space: nowrap;
}
.hx-hud-hero {
  text-align: center;
  min-width: 0;
}
.hx-hud-money {
  font-family: var(--hx-font-display);
  font-size: clamp(22px, 5.4vw, 34px);
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--hx-amber);
  text-shadow: 0 0 22px rgba(255,179,71,.45);
  line-height: 1;
  transition: color .2s, text-shadow .2s;
}
.hx-hud-mult {
  margin-top: 3px;
  font-size: clamp(16px, 3.6vw, 22px);
  font-weight: 800;
  color: var(--hx-toxic);
  letter-spacing: .08em;
  text-shadow: 0 0 14px rgba(124,255,77,.35);
}
.hx-hud-track {
  margin: 7px auto 0;
  height: 6px;
  width: min(100%, 280px);
  border-radius: 99px;
  background: rgba(255,255,255,.1);
  overflow: hidden;
}
.hx-hud-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--hx-orange), var(--hx-amber));
  box-shadow: 0 0 10px rgba(232,93,4,.55);
  transition: width .28s ease;
}
.hx-hud-meta {
  margin-top: 4px;
  font-size: 11px;
  color: rgba(244,237,228,.5);
}
.hx-hud-exit {
  margin-top: 4px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.14);
  color: rgba(244,237,228,.7);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  min-height: 28px;
}
.hx-hud-exit:hover,
.hx-hud-exit:focus-visible {
  color: #fff;
  border-color: var(--hx-orange);
  outline: none;
}

/* ── Resgatar CTA ── */
.hx-resgatar {
  display: none;
  position: fixed;
  left: 50%;
  bottom: calc(28px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: var(--hx-z-cta);
  min-width: min(92vw, 340px);
  padding: 16px 22px;
  border: 0;
  border-radius: var(--hx-radius-pill);
  background: linear-gradient(135deg, var(--hx-orange), var(--hx-amber));
  color: #1A0800;
  font-family: inherit;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .08em;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: var(--hx-glow), 0 8px 28px rgba(0,0,0,.45);
}
.hx-resgatar:active { transform: translateX(-50%) scale(.97); }
.hx-resgatar-hint {
  display: none;
  position: fixed;
  left: 50%;
  bottom: calc(6px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: var(--hx-z-cta);
  font-size: 11px;
  color: rgba(255,179,71,.78);
  white-space: nowrap;
}
@keyframes hxPulseCta {
  0%,100% { transform: translateX(-50%) scale(1); box-shadow: 0 0 28px rgba(232,93,4,.5), 0 8px 28px rgba(0,0,0,.45); }
  50% { transform: translateX(-50%) scale(1.035); box-shadow: 0 0 42px rgba(255,179,71,.7), 0 8px 28px rgba(0,0,0,.5); }
}

/* ── Loading ── */
.hx-loading {
  position: fixed;
  inset: 0;
  z-index: var(--hx-z-modal);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(232,93,4,.16), transparent 50%),
    radial-gradient(ellipse at 50% 100%, rgba(123,47,190,.2), #07040A 70%);
  overflow: hidden;
}
.hx-loading-pumpkin {
  width: 108px;
  height: 108px;
  object-fit: contain;
  mix-blend-mode: screen;
  filter: drop-shadow(0 0 22px rgba(232,93,4,.55));
  animation: hxFloat 2.2s ease-in-out infinite;
}
.hx-loading-title {
  margin-top: 18px;
  font-family: var(--hx-font-display);
  font-size: 22px;
  letter-spacing: .12em;
  color: var(--hx-moon);
}
.hx-loading-msg {
  margin: 8px 0 28px;
  font-size: 14px;
  color: var(--hx-muted);
}
.hx-loading-bar {
  width: 180px;
  height: 3px;
  border-radius: 99px;
  overflow: hidden;
  background: rgba(255,255,255,.08);
}
.hx-loading-bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--hx-orange), var(--hx-amber), var(--hx-toxic));
  background-size: 200% 100%;
  animation: hxLoad 1.5s ease-in-out infinite;
}
@keyframes hxFloat {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes hxLoad {
  0% { width: 12%; background-position: 0% 0; }
  50% { width: 100%; background-position: 100% 0; }
  100% { width: 12%; background-position: 0% 0; }
}

/* ── Result modal ── */
.hx-result {
  position: fixed;
  inset: 0;
  z-index: var(--hx-z-modal);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(4,2,6,.78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.hx-result-card {
  width: min(100%, 360px);
  border-radius: 24px;
  overflow: hidden;
  text-align: center;
  background: linear-gradient(180deg, #160A12 0%, #0C060A 100%);
  border: 1px solid var(--hx-line);
  box-shadow: var(--hx-shadow);
  animation: hxCardIn .42s cubic-bezier(.34,1.4,.64,1) both;
}
@keyframes hxCardIn {
  from { transform: scale(.84) translateY(24px); opacity: 0; }
  to { transform: none; opacity: 1; }
}

/* ── Lobby / painel stage ── */
.pnl-root {
  --pnl-pink: var(--hx-orange);
  --pnl-pink-light: var(--hx-ember);
}
.pnl-stage-pump {
  position: absolute;
  right: 4%;
  bottom: 12%;
  width: min(28vw, 180px);
  height: auto;
  opacity: .55;
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 0;
  filter: drop-shadow(0 0 20px rgba(232,93,4,.35));
}
.pnl-game-card {
  position: relative;
  isolation: isolate;
}
.pnl-game-deco {
  position: absolute;
  right: -18px;
  top: -36px;
  width: 110px;
  height: 110px;
  background: url('../images/pumpkin-hero.png') center / contain no-repeat;
  mix-blend-mode: screen;
  opacity: .8;
  pointer-events: none;
  filter: drop-shadow(0 0 16px rgba(232,93,4,.4));
}

.hx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  font-weight: 800;
  border-radius: var(--hx-radius-pill);
  transition: transform .15s, filter .15s, box-shadow .15s;
}
.hx-btn:focus-visible { outline: 2px solid var(--hx-amber); outline-offset: 3px; }
.hx-btn:active { transform: scale(.97); }
.hx-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.hx-btn-primary {
  background: linear-gradient(135deg, var(--hx-orange), var(--hx-amber));
  color: #1A0800;
  box-shadow: var(--hx-glow);
}
.hx-btn-primary:hover:not(:disabled) { filter: brightness(1.08); }
.hx-btn-ghost {
  background: rgba(255,255,255,.08);
  color: var(--hx-moon);
  border: 1px solid rgba(255,255,255,.14);
}

@media (min-width: 768px) {
  .hx-hud { padding-top: calc(16px + env(safe-area-inset-top, 0px)); }
  .hx-hud-bar { padding: 12px 18px 14px; }
  .hx-hud-money { font-size: 36px; }
  .pnl-stage-pump { bottom: 16%; width: 200px; }
}
@media (min-width: 1024px) {
  .hx-hud-bar { max-width: 1040px; }
  .hx-resgatar { bottom: 40px; }
  .pnl-game-card { width: min(460px, 92vw); margin-left: auto; margin-right: auto; }
}
@media (max-width: 430px) {
  .hx-hud-k { font-size: 8px; }
  .hx-hud-v { font-size: 12px; }
  .hx-hud-bar { gap: 6px; padding: 8px 10px 10px; }
  .hx-resgatar { min-width: calc(100vw - 28px); font-size: 15px; padding: 15px 16px; }
  .pnl-game-deco { width: 78px; height: 78px; top: -22px; right: -10px; }
  .hx-wm-helix, .hx-wm-pix { letter-spacing: .07em; }
  .lnd-nav-brand .hx-wordmark,
  .pnl-logo .hx-wordmark,
  .lgn-logo .hx-wordmark,
  .reg-logo .hx-wordmark { font-size: 14px; gap: 0.1em; }
  .hx-wm-helix::after { display: none; }
}
@media (max-width: 360px) {
  .hx-hud-bar { grid-template-columns: 1fr 1.6fr 1fr; }
  .lnd-nav-brand .hx-wordmark,
  .pnl-logo .hx-wordmark,
  .lgn-logo .hx-wordmark,
  .reg-logo .hx-wordmark { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .hx-scene-fog, .hx-scene-embers, .hx-loading-pumpkin, .hx-resgatar {
    animation: none !important;
  }
}
