/* MERGE-BLOCK: hud.css */
#screen-play {
  position: relative;
  background: var(--bg-canvas);
}

#game-wrap {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.game-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.play-controls-dock {
  flex-shrink: 0;
  position: relative;
  z-index: 30;
  background: linear-gradient(180deg, transparent 0%, rgba(5, 0, 16, 0.88) 28%);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 6px;
}

#game-canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  background: linear-gradient(180deg, #1a0533 0%, #0d0220 55%, #050010 100%);
}

#game-hud {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: clamp(6px, 2vw, 10px);
  padding: calc(10px + var(--safe-top)) calc(10px + var(--safe-right)) 0 calc(10px + var(--safe-left));
  pointer-events: none;
  z-index: 20;
  flex-wrap: wrap;
}

.hud-pill {
  flex: 1;
  max-width: 120px;
  min-width: 88px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 14px 11px;
  border-radius: 16px;
  background: rgba(8, 6, 18, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.hud-label {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

.hud-value {
  font-family: var(--font-display);
  font-size: clamp(18px, 5vw, 22px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.hud-balance .hud-value {
  color: #fde68a;
  text-shadow: 0 0 20px rgba(251, 191, 36, 0.35);
}

.hud-bet .hud-value {
  color: #c4b5fd;
  text-shadow: 0 0 20px rgba(167, 139, 250, 0.3);
}

.hud-balance {
  border-color: rgba(251, 191, 36, 0.18);
}

.hud-bet {
  border-color: rgba(167, 139, 250, 0.18);
}

.hud-jackpot {
  border-color: rgba(251, 191, 36, 0.22);
}

.hud-jackpot .hud-value {
  color: #fcd34d;
  text-shadow: 0 0 18px rgba(251, 191, 36, 0.4);
  font-size: clamp(14px, 4vw, 18px);
}

.hud-luck-wrap {
  position: absolute;
  top: calc(68px + var(--safe-top));
  left: calc(14px + var(--safe-left));
  right: calc(14px + var(--safe-right));
  z-index: 19;
  pointer-events: none;
}

.hud-luck-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.hud-luck-label {
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

.hud-luck-status {
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 800;
  color: #c4b5fd;
}

.hud-luck-status.hot {
  color: #fde68a;
  animation: luck-pulse 0.8s ease-in-out infinite alternate;
}

@keyframes luck-pulse {
  from { opacity: 0.7; }
  to { opacity: 1; text-shadow: 0 0 8px rgba(253, 230, 138, 0.6); }
}

.hud-luck-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.hud-luck-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #7c3aed, #a78bfa, #fde68a);
  transition: width 0.35s ease;
  box-shadow: 0 0 12px rgba(167, 139, 250, 0.45);
}

.hud-luck-fill.full {
  animation: luck-fill-glow 0.6s ease-in-out infinite alternate;
}

@keyframes luck-fill-glow {
  from { box-shadow: 0 0 8px rgba(251, 191, 36, 0.4); }
  to { box-shadow: 0 0 20px rgba(251, 191, 36, 0.75); }
}

.free-spin-badge,
.hot-mode-badge {
  position: absolute;
  top: calc(96px + var(--safe-top));
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 14px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  z-index: 22;
  pointer-events: none;
  animation: badge-pop 0.4s cubic-bezier(0.34, 1.4, 0.64, 1);
}

.free-spin-badge {
  background: rgba(16, 185, 129, 0.25);
  border: 1px solid rgba(52, 211, 153, 0.5);
  color: #6ee7b7;
}

.hot-mode-badge {
  background: rgba(239, 68, 68, 0.25);
  border: 1px solid rgba(248, 113, 113, 0.5);
  color: #fca5a5;
  animation: hot-badge 0.5s ease-in-out infinite alternate;
}

@keyframes badge-pop {
  from { transform: translateX(-50%) scale(0.8); opacity: 0; }
  to { transform: translateX(-50%) scale(1); opacity: 1; }
}

@keyframes hot-badge {
  from { box-shadow: 0 0 8px rgba(239, 68, 68, 0.3); }
  to { box-shadow: 0 0 22px rgba(251, 191, 36, 0.5); }
}

.free-spin-badge.hidden,
.hot-mode-badge.hidden {
  display: none;
}

#msg-overlay.msg-near .msg-card {
  border-color: rgba(251, 191, 36, 0.5);
  animation: near-shake 0.4s ease;
}

#msg-overlay.msg-near .msg-text {
  color: #fde68a;
}

@keyframes near-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-4px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}

.hud-clickable {
  pointer-events: auto;
  cursor: pointer;
  border: none;
  font: inherit;
  color: inherit;
  text-align: center;
  touch-action: manipulation;
  transition: transform 0.12s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.hud-clickable:active {
  transform: scale(0.97);
}

.hud-clickable:hover,
.hud-clickable:focus-visible {
  border-color: rgba(251, 191, 36, 0.45);
  box-shadow: 0 8px 28px rgba(251, 191, 36, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  outline: none;
}

.hud-share-icon {
  display: inline-block;
  margin-left: 2px;
  font-size: 9px;
  opacity: 0.55;
  vertical-align: super;
}

#share-balance-modal {
  z-index: 1300;
}

.share-modal-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.share-modal-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.share-preview-wrap {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #0f0518;
}

.share-preview-wrap img {
  display: block;
  width: 100%;
  height: auto;
}

.share-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.share-modal-actions .btn {
  width: 100%;
  min-height: 44px;
}

.share-modal-actions .share-btn {
  background: #25d366;
  color: #fff;
  border-color: #1da851;
}

.share-modal-actions .share-btn:active {
  background: #1da851;
}

#msg-overlay {
  position: absolute;
  top: auto;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%) translateY(6px) scale(0.96);
  width: max-content;
  max-width: calc(100% - 24px);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.34, 1.4, 0.64, 1);
  z-index: 24;
}

#msg-overlay.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}

.msg-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 16px;
  background: rgba(8, 6, 18, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.msg-icon {
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
}

.msg-text {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(12px, 3.2vw, 14px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  white-space: nowrap;
  text-align: center;
  max-width: min(240px, calc(100vw - 48px));
  overflow: hidden;
  text-overflow: ellipsis;
}

#msg-overlay.msg-win .msg-card {
  border-color: rgba(74, 222, 128, 0.35);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45), 0 0 32px rgba(74, 222, 128, 0.15);
}

#msg-overlay.msg-win .msg-text {
  color: #86efac;
}

#msg-overlay.msg-lose .msg-card {
  border-color: rgba(248, 113, 113, 0.3);
}

#msg-overlay.msg-lose .msg-text {
  color: #fca5a5;
}

#msg-overlay.msg-info .msg-card {
  border-color: rgba(167, 139, 250, 0.3);
}

#msg-overlay.msg-info .msg-text {
  color: #ddd6fe;
}

#msg-overlay.msg-warn .msg-card {
  border-color: rgba(251, 191, 36, 0.35);
}

#msg-overlay.msg-warn .msg-text {
  color: #fde68a;
}

#pause-badge {
  position: absolute;
  top: calc(72px + var(--safe-top));
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  z-index: 18;
  pointer-events: none;
}

#pause-badge.hidden {
  display: none;
}

@media (max-width: 420px) {
  #msg-overlay {
    bottom: 10px;
    max-width: calc(100% - 20px);
  }
}
/* END-MERGE-BLOCK */
