* {
  -webkit-tap-highlight-color: transparent;
}

:root {
  --ui-bg: rgba(18, 18, 20, 0.72);
  --ui-bg-2: rgba(18, 18, 20, 0.35);
  --ui-border: rgba(255, 255, 255, 0.1);
  --ui-text: rgba(255, 255, 255, 0.92);
  --ui-muted: rgba(255, 255, 255, 0.65);
  --ui-accent: #7f5cff;
  --ui-accent-2: #5a3bff;
  --ui-btn: rgba(255, 255, 255, 0.1);
  --ui-btn-hover: rgba(255, 255, 255, 0.16);
  --ui-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
  --ui-radius: 18px;
}

html,
body {
  height: 100%;
  margin: 0;
  background: #000;
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Arial;
}

#GameWrapper {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.hs-ui {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hs-ui-scale {
  position: absolute;
  left: 50%;
  bottom: 0;

  width: 1060px;
  height: 720px;

  transform-origin: bottom center;
  transform: translateX(-50%) scale3d(var(--ui-scale, 1), var(--ui-scale, 1), 1);

  pointer-events: none;
}

.hs-ui-stage {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
/* ===== BOTTOM BAR ===== */
.hs-bottom {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 10px;
  height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;

  background: linear-gradient(180deg, var(--ui-bg-2), var(--ui-bg));
  border: 1px solid var(--ui-border);
  border-radius: 22px;
  box-shadow: var(--ui-shadow);

  padding: 10px 12px;
  pointer-events: auto;
}

/* left cluster */
.hs-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
}

.hs-icon-btn {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  border: 1px solid var(--ui-border);
  background: var(--ui-btn);
  color: var(--ui-text);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.hs-icon-btn:hover {
  background: var(--ui-btn-hover);
}

.hs-balance {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 12px;
  border-radius: 14px;
  border: 1px solid var(--ui-border);
  background: rgba(0, 0, 0, 0.18);
  min-width: 180px;
}

.hs-balance .label {
  font-size: 12px;
  color: var(--ui-muted);
  letter-spacing: 0.4px;
}
.hs-balance .value {
  font-size: 22px;
  font-weight: 800;
  color: var(--ui-text);
}

/* center cluster */
.hs-center {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  justify-content: center;
}

.hs-bet {
  display: grid;
  grid-template-columns: 1fr 46px;
  gap: 10px;
  align-items: center;

  padding: 8px 10px;
  border-radius: 16px;
  border: 1px solid var(--ui-border);
  background: rgba(0, 0, 0, 0.18);
  width: 130px;
}

.hs-bet .bet-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.hs-bet .label {
  font-size: 12px;
  color: var(--ui-muted);
}
.hs-bet .value {
  font-size: 20px;
  font-weight: 800;
  color: var(--ui-text);
}

.hs-stepper {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 8px;
}

.hs-stepper button {
  width: 46px;
  height: 30px;
  border-radius: 10px;
  border: 1px solid var(--ui-border);
  background: var(--ui-btn);
  color: var(--ui-text);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.hs-stepper button:hover {
  background: var(--ui-btn-hover);
}

/* right cluster */
.hs-right {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 310px;
  justify-content: flex-end;
}

.hs-spin-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hs-spin-count {
  position: absolute;
  right: -6px;
  top: -6px;

  min-width: 26px;
  height: 26px;
  padding: 0 6px;

  display: grid;
  place-items: center;

  border-radius: 999px;
  font-weight: 900;
  font-size: 13px;

  background: rgba(255, 200, 50, 0.95);
  color: rgba(0, 0, 0, 0.85);
  border: 1px solid rgba(0, 0, 0, 0.15);
}

.hs-spin {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: radial-gradient(
    circle at 35% 35%,
    rgba(255, 255, 255, 0.18),
    rgba(255, 255, 255, 0.06)
  );
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.35);
  position: relative;
}

.hs-spin::before {
  content: '';
  width: 0;
  height: 0;
  border-left: 22px solid white;
  border-top: 14px solid transparent;
  border-bottom: 14px solid transparent;
  margin-left: 7px;
  margin-top: 16px;
}
.hs-spin:active {
  transform: scale(0.985);
}

.hs-pill {
  height: 44px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid var(--ui-border);
  background: var(--ui-btn);
  color: var(--ui-text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}
.hs-pill:hover {
  background: var(--ui-btn-hover);
}

/* ===== PANELS ===== */
.hs-panel {
  position: absolute;
  bottom: 106px;
  background: rgba(10, 10, 12, 0.92);
  border: 1px solid var(--ui-border);
  border-radius: 18px;
  box-shadow: var(--ui-shadow);
  pointer-events: auto;
  overflow: hidden;
}

.hs-panel[hidden] {
  display: none;
}

.hs-panel-left {
  left: 12px;
  width: 340px;
}

.hs-panel-right {
  right: 5px;
  width: calc(100% - 5px);
  max-width: 500px;
}

.hs-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 12px;
  color: var(--ui-text);
  font-weight: 900;
  letter-spacing: 0.3px;
}

.hs-panel-close {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--ui-border);
  background: var(--ui-btn);
  color: var(--ui-text);
  cursor: pointer;
}
.hs-panel-close:hover {
  background: var(--ui-btn-hover);
}

.hs-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--ui-text);
}

.hs-row .title {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-weight: 800;
}
.hs-row .sub {
  font-size: 12px;
  color: var(--ui-muted);
  font-weight: 600;
}

.hs-toggle {
  width: 74px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--ui-border);
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
  position: relative;
}
.hs-toggle::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  transition: transform 0.18s ease;
}
.hs-toggle[data-on='true'] {
  background: rgba(255, 200, 50, 0.9);
}
.hs-toggle[data-on='true']::after {
  transform: translateX(38px);
  background: rgba(0, 0, 0, 0.75);
}

.hs-toggle[disabled],
.hs-toggle[data-disabled='true'] {
  opacity: 0.4;
  pointer-events: none;
}

.hs-btn-wide {
  width: 100%;
  height: 44px;
  border-radius: 14px;
  border: 1px solid var(--ui-border);
  background: var(--ui-btn);
  color: var(--ui-text);
  cursor: pointer;
  font-weight: 800;
}
.hs-btn-wide:hover {
  background: var(--ui-btn-hover);
}

/* autoplay */
.hs-autoplay-body {
  padding: 0 16px 16px;
}
.hs-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 84px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--ui-border);
  background: rgba(255, 255, 255, 0.1);
  color: var(--ui-text);
  font-weight: 900;
}
.hs-chip[data-active='true'] {
  background: rgba(255, 200, 50, 0.9);
  color: rgba(0, 0, 0, 0.85);
  border-color: rgba(0, 0, 0, 0);
}

.hs-autoplay-actions {
  display: flex;
  gap: 12px;
  padding-top: 14px;
}

/* scenario styles (якщо треба) */
.hs-select {
  height: 40px;
  min-width: 200px;
  border-radius: 12px;
  border: 1px solid var(--ui-border);
  background: rgba(255, 255, 255, 0.08);
  color: var(--ui-text);
  padding: 0 10px;
}

.hs-btn-mini {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--ui-border);
  background: var(--ui-btn);
  color: var(--ui-text);
  cursor: pointer;
  font-weight: 900;
}
.hs-btn-mini:hover {
  background: var(--ui-btn-hover);
}

.hs-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 16px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.hs-badge {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;

  border: 1px solid var(--ui-border);
  background: rgba(255, 255, 255, 0.08);
  color: var(--ui-text);
  font-weight: 800;
  letter-spacing: 0.2px;
}

.hs-badge[data-active='true'] {
  border-color: rgba(255, 200, 50, 0.9);
  box-shadow: 0 0 0 2px rgba(255, 200, 50, 0.18);
  background: rgba(255, 200, 50, 0.18);
}

.hs-feature {
  display: flex;
  flex-direction: column;
  gap: 6px;

  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid var(--ui-border);
  background: rgba(0, 0, 0, 0.18);

  min-width: 150px;
}

.hs-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hs-stat-row .label {
  font-size: 12px;
  color: var(--ui-muted);
  font-weight: 700;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.hs-stat-row .value {
  font-size: 18px;
  font-weight: 900;
  color: var(--ui-text);
  white-space: nowrap;
}

.hs-stepper button:disabled {
  opacity: 0.45;
  cursor: default;
}

/* AUTO active */
.hs-pill[data-on='true'] {
  background: rgba(255, 200, 50, 0.9);
  color: rgba(0, 0, 0, 0.85);
  border-color: rgba(0, 0, 0, 0);
}
