:root {
  --sait: var(--discord-safe-area-inset-top, env(safe-area-inset-top, 0px));
  --saib: var(--discord-safe-area-inset-bottom, env(safe-area-inset-bottom, 0px));
  --sail: var(--discord-safe-area-inset-left, env(safe-area-inset-left, 0px));
  --sair: var(--discord-safe-area-inset-right, env(safe-area-inset-right, 0px));
  --bg: #0b101b;
  --panel: #151c2c;
  --panel-2: #1c2538;
  --line: rgba(255, 255, 255, 0.09);
  --text: #eef1f8;
  --muted: rgba(238, 241, 248, 0.6);
  --gold: #ffdd82;
  --green: #2e9e4f;
  --red: #e5484d;
  --blue: #3a6ea5;
  --radius: 14px;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: radial-gradient(1200px 700px at 50% -10%, #1a2540 0%, var(--bg) 60%);
  color: var(--text);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

#app {
  max-width: 1080px;
  margin: 0 auto;
  padding: max(14px, var(--sait)) max(16px, var(--sair)) max(28px, var(--saib)) max(16px, var(--sail));
}

/* Бързото натискане на телефон не бива да приближава страницата или да маркира текст. */
button,
.input,
select {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

button {
  user-select: none;
  -webkit-user-select: none;
}

.splash {
  display: grid;
  place-items: center;
  min-height: 70vh;
  text-align: center;
  gap: 4px;
}

.splash h1 {
  margin: 0;
  font-size: 28px;
  color: var(--gold);
}

.splash p {
  margin: 0;
  color: var(--muted);
}

.banner {
  position: sticky;
  top: 0;
  z-index: 5;
  margin: 0 0 10px;
  padding: 8px 12px;
  border-radius: 10px;
  background: #5b3a10;
  color: #ffe2a6;
  text-align: center;
  font-size: 14px;
}

.banner[hidden] {
  display: none;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.brand {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--gold);
}

.who {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.avatar {
  border-radius: 50%;
}

.who .name {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 14px;
}

.balance {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--gold);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.solo-back {
  margin-bottom: 10px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.game-menu {
  position: relative;
  margin-bottom: 12px;
}

.menu-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(255, 221, 130, 0.45);
  border-radius: 12px;
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.menu-title {
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(255, 221, 130, 0.18);
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 0.12em;
}

.menu-current {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu-arrow {
  color: var(--gold);
  transition: transform 0.15s;
}

.game-menu.open .menu-arrow {
  transform: rotate(180deg);
}

.menu-list {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 6px;
  max-height: min(70vh, 420px);
  overflow-y: auto;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.5);
}

.menu-list[hidden] {
  display: none;
}

.menu-item {
  padding: 12px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 600;
  cursor: pointer;
}

.menu-item:hover,
.menu-item:focus-visible {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  outline: none;
}

.menu-item.active {
  background: rgba(255, 221, 130, 0.14);
  color: var(--gold);
}

.game {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
}

.stage.felt {
  background: radial-gradient(120% 90% at 50% 0%, #1f7a4d 0%, #0e4a30 60%, #0a3322 100%);
  border-color: rgba(255, 221, 130, 0.35);
  min-height: 330px;
}

.dealer {
  display: grid;
  gap: 6px;
  justify-items: center;
  margin-bottom: 16px;
}

.seats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.seat {
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.22);
}

.seat.me {
  border-color: rgba(255, 221, 130, 0.6);
}

.seat.active {
  box-shadow: 0 0 0 2px var(--gold);
}

.seat.won {
  background: rgba(46, 158, 79, 0.28);
}

.seat.lost {
  background: rgba(229, 72, 77, 0.2);
}

.seat-head,
.seat-foot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
}

.seat-head .name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}

.seat-head .total {
  min-width: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.4);
  color: var(--gold);
  font-weight: 800;
  text-align: center;
}

.seat-head .total:empty {
  display: none;
}

.seat-foot {
  color: var(--muted);
}

.badge {
  color: var(--text);
  font-weight: 700;
}

.hand {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-height: 62px;
}

.dealer .hand {
  justify-content: center;
}

.card {
  display: grid;
  align-content: center;
  justify-items: center;
  width: 42px;
  height: 60px;
  border-radius: 7px;
  background: #fbfbf7;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  font-weight: 800;
  line-height: 1.05;
}

.card.red {
  color: #c62828;
}

.card.black {
  color: #1b1b1f;
}

.card .rank {
  font-size: 17px;
}

.card .suit {
  font-size: 16px;
}

.card.back {
  background: repeating-linear-gradient(45deg, #7a1f2b 0 5px, #5c1520 5px 10px);
  border: 3px solid #fbfbf7;
}

.play-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.play-row[hidden],
.action[hidden] {
  display: none;
}

.play-row .action {
  padding: 12px 4px;
  font-size: 15px;
}

.action.secondary {
  background: linear-gradient(180deg, #8a93a6, #656e82);
}

.timer {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.timer-track {
  height: 5px;
  margin-top: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.timer-bar {
  height: 100%;
  background: var(--gold);
  transition: width 0.2s linear;
}

.slots {
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  align-items: start;
}

.slots-canvas {
  display: block;
  width: 100%;
  border-radius: 10px;
}

.jackpot-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(84px, 1fr));
  gap: 6px;
  margin-bottom: 8px;
}

.jackpot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.35);
  font-size: 12px;
}

.jackpot .j-name {
  font-weight: 800;
  opacity: 0.9;
}

.jackpot .j-amount {
  font-weight: 800;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.jackpot.mega {
  grid-column: 1 / -1;
  border-color: #7df9ff;
  background: linear-gradient(90deg, rgba(125, 249, 255, 0.18), rgba(224, 64, 251, 0.18));
}

.jackpot.won {
  background: var(--gold);
  color: #1b1b1f;
}

.stake-row {
  align-items: stretch;
}

.stake-label {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
  font-weight: 700;
  font-size: 14px;
  text-align: center;
}

.segments.wrap {
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.segments.wrap .seg {
  flex: 1 1 28%;
}

.free-box {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding: 8px;
  border: 1px solid rgba(255, 221, 130, 0.5);
  border-radius: 10px;
  background: rgba(201, 154, 46, 0.18);
  font-size: 13px;
}

.free-box[hidden] {
  display: none;
}

.expand-badge {
  width: 36px;
  height: 36px;
}

.slots-status {
  min-height: 20px;
  margin-top: 10px;
  color: var(--gold);
  font-weight: 700;
  font-size: 14px;
}

.rules {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.rules summary {
  cursor: pointer;
  color: var(--text);
  font-weight: 600;
}

.rules p {
  margin: 6px 0 0;
  line-height: 1.4;
}

.stage,
.controls,
.side {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 28px;
  margin-bottom: 8px;
}

.chip {
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.chip.high {
  background: rgba(46, 158, 79, 0.2);
  color: #7be0a0;
}

.chip.low {
  background: rgba(229, 72, 77, 0.18);
  color: #ff9a9d;
}

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
}

.field label {
  color: var(--muted);
  font-size: 13px;
}

.input-row {
  display: flex;
  gap: 6px;
}

.input {
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
  font-variant-numeric: tabular-nums;
}

.input:focus-visible,
.action:focus-visible,
.mini:focus-visible,
.seg:focus-visible,
.menu-toggle:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.mini {
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.segments {
  display: flex;
  gap: 6px;
}

.seg {
  flex: 1;
  padding: 9px 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
  color: var(--muted);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.seg.active {
  color: #1b1b1f;
  background: var(--gold);
  border-color: var(--gold);
}

.action {
  width: 100%;
  padding: 14px 12px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(180deg, #4a87d4, #3a6ea5);
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}

.action.cash {
  background: linear-gradient(180deg, #3bbf64, #2e9e4f);
  animation: pulse 0.9s ease-in-out infinite;
}

.action:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  animation: none;
}

@keyframes pulse {
  50% {
    transform: scale(1.015);
  }
}

.hint {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.side h3 {
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--muted);
  font-weight: 600;
}

.players {
  display: grid;
  gap: 6px;
  max-height: 420px;
  overflow: auto;
}

.player {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--panel-2);
  font-size: 14px;
}

.player.me {
  border: 1px solid rgba(255, 221, 130, 0.45);
}

.player.won .result {
  color: #7be0a0;
}

.player.lost .result {
  color: #ff9a9d;
}

.player .name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player .result {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.empty {
  color: var(--muted);
  font-size: 14px;
}

.toasts {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 10;
  display: grid;
  gap: 8px;
  max-width: min(360px, calc(100vw - 28px));
}

.toast {
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  font-size: 14px;
  animation: rise 0.2s ease-out;
}

.toast.win {
  border-color: rgba(255, 221, 130, 0.6);
  color: var(--gold);
}

.toast.error {
  border-color: rgba(229, 72, 77, 0.6);
  color: #ffb0b3;
}

@keyframes rise {
  from {
    transform: translateY(8px);
    opacity: 0;
  }
}

@media (max-width: 820px) {
  .slots {
    grid-template-columns: 1fr;
  }

  .who .name {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .action.cash,
  .toast {
    animation: none;
  }
}

@keyframes card-deal {
  from {
    opacity: 0;
    transform: translateY(-46px) rotate(-8deg) scale(0.8);
  }
}

@keyframes card-flip {
  0% {
    transform: perspective(500px) rotateY(90deg) scale(1.08);
  }
  100% {
    transform: perspective(500px) rotateY(0) scale(1);
  }
}

.field[hidden] {
  display: none;
}

@keyframes result-pop {
  from {
    opacity: 0;
    transform: scale(0.7);
  }
}

.play-row.two {
  grid-template-columns: 1.4fr 1fr;
}

/* ───────── Последни залози ───────── */

.bet-history {
  grid-column: 1 / -1;
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.bet-history h3 {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  font-weight: 700;
}

.bet-history-list {
  display: grid;
  gap: 3px;
}

.bet-row {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 10px;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.03);
}

.bet-time {
  color: var(--muted);
}

.bet-net {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.bet-row.win .bet-net {
  color: #5fd68a;
}

.bet-row.lose .bet-net {
  color: #ff7a7e;
}

.bet-row.even .bet-net {
  color: var(--muted);
}

.bet-empty {
  color: var(--muted);
  font-size: 13px;
}

.mini.wide {
  min-height: 38px;
}

.mini:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.mini.active,
.mini.toggle.active {
  background: rgba(255, 221, 130, 0.18);
  border-color: var(--gold);
  color: var(--gold);
}

/* ───────── Кристален каскад ───────── */

.cascade {
  grid-template-columns: 1fr;
  max-width: 760px;
  margin: 0 auto;
  width: 100%;
}

.cs-stage {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(155, 107, 255, 0.45);
  border-radius: var(--radius);
  background: #0c0626;
  box-shadow: 0 0 30px rgba(120, 70, 220, 0.25);
}

.cascade.free-mode .cs-stage {
  border-color: rgba(255, 184, 74, 0.7);
  box-shadow: 0 0 34px rgba(255, 150, 40, 0.35);
}

.cs-canvas {
  display: block;
  width: 100%;
  touch-action: manipulation;
}

.cs-win {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%) scale(0.9);
  padding: 6px 18px;
  border-radius: 999px;
  background: rgba(10, 5, 30, 0.82);
  border: 1px solid rgba(255, 221, 130, 0.5);
  color: var(--gold);
  font-size: 20px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}

.cs-win:not(:empty) {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

.cs-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.cs-bet {
  display: grid;
  gap: 4px;
  justify-items: start;
}

.cs-bet-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.cs-bet-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cs-bet-row .mini {
  width: 38px;
  height: 38px;
  padding: 0;
  font-size: 20px;
}

.cs-stake-value {
  min-width: 82px;
  color: var(--gold);
  font-size: 18px;
  font-weight: 800;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.cs-spin {
  display: grid;
  place-items: center;
  gap: 0;
  width: 112px;
  height: 112px;
  border: 4px solid #ffe08a;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #b98cff 0%, #6a3ee0 55%, #3b1c99 100%);
  box-shadow: 0 6px 0 #25106a, 0 0 26px rgba(140, 90, 255, 0.6);
  color: #fff;
  font: inherit;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s;
}

.cs-spin:hover:not(:disabled) {
  transform: translateY(-2px);
}

.cs-spin:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 #25106a, 0 0 18px rgba(140, 90, 255, 0.6);
}

.cs-spin.free {
  background: radial-gradient(circle at 35% 30%, #ffd98a 0%, #f08a1f 55%, #a14400 100%);
  box-shadow: 0 6px 0 #5e2a00, 0 0 26px rgba(255, 150, 40, 0.65);
}

.cs-spin.busy {
  filter: saturate(0.7);
}

.cs-spin-icon {
  font-size: 40px;
  line-height: 0.9;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

.cs-spin.busy .cs-spin-icon {
  animation: cs-turn 0.9s linear infinite;
}

.cs-spin-text {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

@keyframes cs-turn {
  to {
    transform: rotate(360deg);
  }
}

.cs-side-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.cs-side-buttons .mini,
.cs-auto {
  min-height: 36px;
  padding: 0 10px;
  font-size: 13px;
}

.cs-auto {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
  font-size: 13px;
}

.cs-info {
  position: absolute;
  inset: 0;
  z-index: 3;
  overflow-y: auto;
  padding: 16px;
  background: rgba(8, 4, 24, 0.96);
}

.cs-info[hidden] {
  display: none;
}

.cs-info .cs-character {
  display: block;
  margin: 0 auto 8px;
  max-width: 40%;
  height: auto;
}

.cs-info h3 {
  margin: 0 0 8px;
  color: var(--gold);
}

.cs-info ul {
  display: grid;
  gap: 6px;
  margin: 0 0 12px;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.cs-pay {
  display: grid;
  gap: 4px;
  margin-bottom: 10px;
}

.cs-pay-row {
  display: grid;
  grid-template-columns: 40px minmax(90px, 1fr) repeat(3, auto);
  align-items: center;
  gap: 10px;
  padding: 3px 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.cs-pay-row.scatter {
  margin-bottom: 12px;
  background: rgba(255, 210, 74, 0.1);
}

@media (max-width: 520px) {
  .cs-controls {
    grid-template-columns: 1fr auto;
  }

  .cs-side-buttons {
    grid-column: 1 / -1;
    justify-content: center;
  }

  .cs-spin {
    width: 96px;
    height: 96px;
  }

  .cs-pay-row {
    grid-template-columns: 34px 1fr;
  }

  .cs-pay-row span {
    grid-column: 2;
    font-size: 12px;
  }

  .cs-win {
    font-size: 16px;
  }
}

/* ───────── Слотове с линии: джакпоти, гейбъл, карти ───────── */

.lineslot .cs-stage {
  border-color: rgba(255, 190, 90, 0.5);
}

.jp-ladder {
  display: grid;
  gap: 6px;
}

.jp-mega {
  padding: 5px 10px;
  border: 1px solid rgba(120, 200, 255, 0.5);
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(40, 90, 200, 0.35), rgba(120, 60, 220, 0.35));
  color: #cfe9ff;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.jp-mega[hidden] {
  display: none;
}

.jp-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.jp-tile {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 6px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  font-variant-numeric: tabular-nums;
}

.jp-tile strong {
  grid-column: 1 / -1;
  color: var(--gold);
  font-size: 14px;
}

.jp-name {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.jp-suit {
  font-size: 18px;
  line-height: 1;
}

.jp-suit.red,
.gb-front.red,
.jc-front.red,
.gb-mini.red,
.jc-count.red {
  color: #ff4a5a;
}

.jp-suit.black,
.gb-front.black,
.jc-front.black,
.gb-mini.black,
.jc-count.black {
  color: #e8e6f0;
}

.jp-grand {
  border-color: rgba(255, 90, 90, 0.6);
}

.jp-major {
  border-color: rgba(255, 150, 60, 0.55);
}

.jp-minor {
  border-color: rgba(170, 110, 255, 0.55);
}

.jp-mini {
  border-color: rgba(90, 180, 255, 0.55);
}

.jp-tile.hit {
  animation: jp-hit 0.5s ease-in-out infinite alternate;
}

@keyframes jp-hit {
  from {
    box-shadow: 0 0 0 rgba(255, 221, 130, 0);
    background: var(--panel);
  }

  to {
    box-shadow: 0 0 22px rgba(255, 221, 130, 0.9);
    background: rgba(255, 221, 130, 0.22);
  }
}

.gb-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(255, 221, 130, 0.5);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #2a0f14, #14090c);
}

.gb-panel[hidden] {
  display: none;
}

.gb-info {
  color: var(--gold);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.gb-body {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.gb-card {
  width: 84px;
  height: 120px;
  perspective: 700px;
}

.gb-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.7s;
}

.gb-card.flipped .gb-inner {
  transform: rotateY(180deg);
}

.gb-face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 10px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  font-size: 46px;
}

.gb-back {
  background: repeating-linear-gradient(45deg, #8a1c1c 0 8px, #c93a3a 8px 16px);
  color: rgba(255, 255, 255, 0.85);
  font-size: 18px;
}

.gb-front {
  background: #fff;
  transform: rotateY(180deg);
}

.gb-card.win .gb-inner {
  filter: drop-shadow(0 0 14px rgba(80, 255, 140, 0.9));
}

.gb-card.lose .gb-inner {
  filter: drop-shadow(0 0 14px rgba(255, 70, 70, 0.9));
}

.gb-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.gb-button {
  min-width: 112px;
  padding: 12px 16px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 12px;
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}

.gb-button.red {
  background: linear-gradient(180deg, #ff5a6a, #b01427);
}

.gb-button.black {
  background: linear-gradient(180deg, #4a4a58, #14141c);
}

.gb-button.take {
  background: linear-gradient(180deg, #4cc88a, #1b7a4c);
}

.gb-button:disabled {
  opacity: 0.5;
  cursor: wait;
}

.gb-note {
  color: var(--muted);
  font-size: 13px;
}

.gb-history {
  display: flex;
  gap: 6px;
}

.gb-mini {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: #fff3;
  font-size: 16px;
}

.jc-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 12px;
  background: radial-gradient(circle at 50% 30%, #3a1850, #0a0412);
  animation: rise 0.3s ease-out;
  transition: opacity 0.4s;
}

.jc-overlay.out {
  opacity: 0;
}

.jc-overlay h3 {
  margin: 0;
  color: var(--gold);
  text-align: center;
  letter-spacing: 0.06em;
}

.jc-bar {
  display: flex;
  justify-content: center;
  gap: 14px;
  font-size: 15px;
  font-weight: 800;
}

.jc-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.jc-card {
  aspect-ratio: 0.72;
  padding: 0;
  border: 0;
  background: none;
  perspective: 600px;
  cursor: pointer;
}

.jc-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.6s;
}

.jc-card.open .jc-inner {
  transform: rotateY(180deg);
}

.jc-face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 2px solid #ffdd82;
  border-radius: 8px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  font-size: 34px;
}

.jc-back {
  background: repeating-linear-gradient(45deg, #5a1a8a 0 7px, #8a3ad0 7px 14px);
  color: #ffdd82;
}

.jc-front {
  background: #fff;
  transform: rotateY(180deg);
}

.jc-status {
  min-height: 28px;
  color: #fff;
  font-weight: 700;
  text-align: center;
}

.jc-overlay.won .jc-status {
  color: var(--gold);
  font-size: 22px;
  animation: jp-hit 0.5s ease-in-out infinite alternate;
}

/* ───────── 20 Супер Дядо и Камбанките на Цеци (подредба като в оригиналните автомати) ───────── */

.egt {
  gap: 8px;
  max-width: 820px;
  margin: 0 auto;
  width: 100%;
}

.egt-jp-wrap {
  display: grid;
  gap: 6px;
}

.egt-jp {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.egt-jp.suits {
  grid-template-columns: repeat(2, minmax(0, 1fr)) minmax(0, 1.5fr) repeat(2, minmax(0, 1fr));
}

.egt-jp-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 6px 10px;
  border: 2px solid #b8862e;
  border-radius: 8px;
  background: linear-gradient(180deg, #1a1218, #07050a);
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.8);
  font-variant-numeric: tabular-nums;
}

.egt-jp.names .egt-jp-box {
  flex-direction: column;
  gap: 0;
  padding: 3px 8px 5px;
}

.egt-jp-box strong {
  color: #fff;
  font-size: 15px;
  letter-spacing: 0.02em;
}

.egt-jp-box .jp-name {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.egt-jp-box .jp-grand {
  color: #ff4a4a;
}

.egt-jp-box .jp-major {
  color: #3fdc5a;
}

.egt-jp-box .jp-minor {
  color: #4aa8ff;
}

.egt-jp-box .jp-mini {
  color: #c06bff;
}

.egt-jp-box .jp-suit {
  font-size: 22px;
  line-height: 1;
}

.egt-jp-box.jp-box-grand {
  border-color: #c03030;
}

.egt-jp-box.jp-box-major {
  border-color: #2c9c46;
}

.egt-jp-box.jp-box-minor {
  border-color: #2f78c8;
}

.egt-jp-box.jp-box-mini {
  border-color: #8a46c8;
}

.egt-jp-box.hit {
  animation: jp-hit 0.5s ease-in-out infinite alternate;
}

/* Живите джакпоти: при растеж числото се търкаля, а кутията светва за кратко. */
.egt-jp-box strong,
.jp-mega {
  font-variant-numeric: tabular-nums;
}

.egt-jp-box.tick:not(.hit) {
  animation: jp-tick 0.6s ease-out;
}

.egt-jp-box.tick strong {
  animation: jp-tick-text 0.6s ease-out;
}

.jp-mega.tick {
  animation: jp-tick 0.6s ease-out;
}

@keyframes jp-tick {
  0% {
    box-shadow: 0 0 16px rgba(255, 221, 130, 0.95);
    filter: brightness(1.5);
  }

  100% {
    box-shadow: 0 0 0 rgba(255, 221, 130, 0);
    filter: brightness(1);
  }
}

@keyframes jp-tick-text {
  0% {
    color: #ffe38a;
    text-shadow: 0 0 10px rgba(255, 221, 130, 0.95);
    transform: scale(1.12);
  }

  100% {
    color: #fff;
    text-shadow: none;
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .egt-jp-box.tick,
  .egt-jp-box.tick strong,
  .jp-mega.tick {
    animation: none;
  }
}

.egt-title {
  display: grid;
  place-items: center;
  color: #ffd24a;
  font-size: clamp(14px, 3.4vw, 26px);
  font-weight: 900;
  letter-spacing: 0.04em;
  text-align: center;
  text-shadow: 0 2px 0 #7a0a0a, 0 0 12px rgba(255, 70, 40, 0.8);
}

.egt-stage {
  position: relative;
  overflow: hidden;
  border: 3px solid #5a1010;
  border-radius: 10px;
  background: #160307;
  box-shadow: 0 0 0 2px #b8862e, 0 8px 28px rgba(0, 0, 0, 0.6);
}

.egt-stage canvas {
  display: block;
  width: 100%;
  touch-action: manipulation;
}

.egt-badge {
  position: absolute;
  left: 6px;
  bottom: 6px;
  z-index: 2;
  padding: 3px 7px;
  border: 1px solid #b8862e;
  border-radius: 6px;
  background: rgba(10, 24, 80, 0.9);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.06em;
  pointer-events: none;
}

.egt-bell .egt-badge {
  background: rgba(70, 20, 6, 0.92);
}

.egt-bar {
  display: grid;
  grid-template-columns: auto auto auto auto;
  justify-content: center;
  align-items: center;
  gap: 12px 16px;
  padding: 6px 12px;
  border: 2px solid #5a1010;
  border-radius: 10px;
  background: linear-gradient(180deg, #1c0a0c, #090304);
}

.egt-meter {
  display: grid;
  gap: 1px;
  min-width: 68px;
  text-align: center;
}

.egt-meter span {
  color: #ffd24a;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.egt-meter strong {
  color: #fff;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.egt-meter.lit strong {
  color: #ffe58a;
  text-shadow: 0 0 10px rgba(255, 210, 74, 0.9);
}

.egt-bets {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
}

.egt-bet {
  display: grid;
  gap: 0;
  min-width: 58px;
  padding: 4px 8px;
  border: 1px solid #5a5a68;
  border-radius: 6px;
  background: linear-gradient(180deg, #4a4a56, #1c1c24);
  color: #fff;
  font: inherit;
  cursor: pointer;
}

.egt-bet small {
  color: #aaa;
  font-size: 8px;
  letter-spacing: 0.1em;
}

.egt-bet b {
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.egt-bet.active {
  border-color: #8aff8a;
  background: linear-gradient(180deg, #5cc24a, #2a7a22);
  box-shadow: 0 0 10px rgba(110, 255, 110, 0.5);
}

.egt-bet:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.egt-bet[hidden] {
  display: none;
}

.egt-betbox[hidden] {
  display: none;
}

.egt-spin-box {
  display: grid;
  justify-items: center;
  gap: 2px;
}

.egt-spin {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  padding: 0;
  border: 4px solid #e8c36a;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #3a3a46, #0c0c12);
  box-shadow: 0 4px 0 #3a2a08, 0 0 18px rgba(255, 210, 90, 0.35);
  color: #fff;
  cursor: pointer;
  transition: transform 0.1s;
}

.egt-spin:hover {
  transform: translateY(-2px);
}

.egt-spin:active {
  transform: translateY(2px);
}

.egt-spin.busy svg {
  animation: cs-turn 0.9s linear infinite;
}

.egt-spin-caption {
  color: #ffd24a;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.egt-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.egt-gamble[hidden] {
  display: none;
}

/* Екранът на гейбъла: карта върху подиум под прожектори, като в оригинала. */
.gs-screen {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  grid-template-rows: auto auto 1fr auto auto;
  justify-items: center;
  gap: 6px;
  padding: 10px;
  background: radial-gradient(ellipse at 20% 0%, rgba(255, 190, 90, 0.5), transparent 45%), radial-gradient(ellipse at 80% 0%, rgba(255, 190, 90, 0.5), transparent 45%), radial-gradient(ellipse at 50% 100%, #7a3a08, #240e04 70%);
}

.gs-screen[hidden] {
  display: none;
}

.gs-title {
  color: #ffd24a;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.gs-history {
  display: flex;
  gap: 6px;
}

.gs-mini {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 40px;
  border: 1px solid #fff;
  border-radius: 4px;
  background: #fff;
  font-size: 20px;
}

.gs-mini.empty {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.gs-mini.red,
.gs-front.red {
  color: #d41a2a;
}

.gs-mini.black,
.gs-front.black {
  color: #14141c;
}

.gs-stage {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 190px;
}

.gs-card {
  position: relative;
  z-index: 2;
  width: 118px;
  height: 168px;
  perspective: 900px;
}

.gs-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.85s;
}

.gs-card.flipped .gs-inner {
  transform: rotateY(180deg);
}

.gs-face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 12px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.gs-back {
  background: repeating-linear-gradient(45deg, #8a1010 0 9px, #c42a2a 9px 18px);
  color: rgba(255, 255, 255, 0.85);
  font-size: 40px;
}

.gs-front {
  background: #fff;
  transform: rotateY(180deg);
}

.gs-center {
  font-size: 84px;
  line-height: 1;
}

.gs-corner {
  position: absolute;
  font-size: 24px;
  line-height: 1;
}

.gs-corner.top {
  left: 8px;
  top: 6px;
}

.gs-corner.bottom {
  right: 8px;
  bottom: 6px;
  transform: rotate(180deg);
}

.gs-card.win {
  filter: drop-shadow(0 0 18px rgba(255, 230, 120, 0.95));
}

.gs-card.lose {
  filter: drop-shadow(0 0 14px rgba(255, 60, 60, 0.9)) grayscale(0.4);
}

.gs-podium {
  position: absolute;
  bottom: 4px;
  width: 210px;
  height: 46px;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 30%, #ffe08a, #b8741a 60%, #5a3208);
  box-shadow: 0 8px 0 #3a1e04, 0 0 24px rgba(255, 190, 80, 0.7);
}

.gs-banner {
  position: absolute;
  z-index: 3;
  bottom: 2px;
  color: #ffd24a;
  font-size: 40px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-shadow: 0 3px 0 #7a3a00, 0 0 18px rgba(255, 200, 60, 0.95);
  opacity: 0;
  transform: scale(0.4);
  pointer-events: none;
}

.gs-banner.show {
  animation: gs-pop 0.5s ease-out forwards;
}

.gs-banner.lose {
  color: #ff6a6a;
  text-shadow: 0 3px 0 #5a0a0a, 0 0 18px rgba(255, 60, 60, 0.9);
}

@keyframes gs-pop {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.gs-info {
  display: flex;
  gap: 22px;
  color: #ffe9b8;
  text-align: center;
}

.gs-info div {
  display: grid;
  gap: 1px;
}

.gs-info strong {
  color: #fff;
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

.gs-info span {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.gs-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.gs-button {
  min-width: 118px;
  padding: 12px 16px;
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: 12px;
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
}

.gs-button.red {
  background: linear-gradient(180deg, #ff5a6a, #a01022);
}

.gs-button.black {
  background: linear-gradient(180deg, #55556a, #14141c);
}

.gs-button.take {
  background: linear-gradient(180deg, #5cc24a, #2a7a22);
}

.gs-button:disabled {
  opacity: 0.5;
  cursor: wait;
}

@media (max-width: 560px) {
  .egt-bar {
    grid-template-columns: 1fr 1fr;
    gap: 8px 10px;
  }

  .egt-bar .egt-bets {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .egt-bar .egt-spin-box {
    grid-column: 1 / -1;
  }

  .egt-meter {
    min-width: 0;
  }

  .egt-spin {
    width: 56px;
    height: 56px;
  }

  .egt-jp-box strong {
    font-size: 12px;
  }

  .egt-jp.suits {
    grid-template-columns: repeat(2, minmax(0, 1fr)) repeat(2, minmax(0, 1fr));
  }

  .egt-jp.suits .egt-title {
    display: none;
  }
}

/* Простото меню за залози и линиите */
.egt-betbox {
  display: grid;
  gap: 3px;
  justify-items: center;
}

.egt-cap {
  color: #ffd24a;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.egt-stepper {
  display: flex;
  align-items: center;
  gap: 6px;
}

.egt-stepper b {
  min-width: 74px;
  padding: 4px 6px;
  border: 1px solid #5a5a68;
  border-radius: 8px;
  background: #07050a;
  color: #fff;
  font-size: 17px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.egt-step {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 2px solid #e8c36a;
  border-radius: 50%;
  background: linear-gradient(180deg, #4a4a56, #1c1c24);
  color: #fff;
  font: inherit;
  font-size: 20px;
  font-weight: 900;
  cursor: pointer;
}

.egt-step:disabled,
.egt-max:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.egt-max {
  padding: 8px 10px;
  border: 2px solid #e8c36a;
  border-radius: 8px;
  background: linear-gradient(180deg, #d98a00, #8a5200);
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
  cursor: pointer;
}

.egt-betbox small {
  color: rgba(255, 233, 184, 0.75);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.egt-winline {
  min-height: 22px;
  color: #ffe9b8;
  font-size: 14px;
  font-weight: 800;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.egt-winline.on {
  color: #ffd24a;
  text-shadow: 0 0 10px rgba(255, 190, 60, 0.7);
}

.egt-diagrams {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.egt-diagram {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.egt-diagram b {
  min-width: 18px;
  color: #ffd24a;
  font-size: 12px;
  text-align: center;
}

.egt-diagram-note {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 560px) {
  .egt-stepper b {
    min-width: 70px;
    font-size: 15px;
  }
}

/* ───────── Neon 20 ───────── */
.egt-neon .egt-stage {
  border-color: #3a0f7a;
  background: #08011f;
  box-shadow: 0 0 0 2px #ff4fd8, 0 0 28px rgba(255, 79, 216, 0.45), 0 8px 28px rgba(0, 0, 0, 0.6);
}

.egt-neon .egt-badge {
  border-color: #ff4fd8;
  background: rgba(30, 6, 80, 0.92);
  color: #ffd2f6;
}

.egt-neon .egt-bar {
  border-color: #4a1a9a;
  background: linear-gradient(180deg, #1c0a4a, #0a0222);
  box-shadow: 0 0 18px rgba(120, 60, 255, 0.35);
}

.egt-neon .egt-jp-box {
  border-color: #6a3ae0;
  background: linear-gradient(180deg, #1a0a48, #0a0226);
}

.egt-neon .egt-meter span,
.egt-neon .egt-cap,
.egt-neon .egt-spin-caption {
  color: #ff9bec;
}

.egt-neon .egt-spin {
  border-color: #ff4fd8;
  background: radial-gradient(circle at 35% 30%, #a43ae0, #3a0f7a);
  box-shadow: 0 4px 0 #1a0640, 0 0 22px rgba(255, 79, 216, 0.6);
}

.egt-neon .egt-step,
.egt-neon .egt-max {
  border-color: #ff4fd8;
}

.egt-neon .egt-max {
  background: linear-gradient(180deg, #d83ac8, #7a1a9a);
}

.egt-neon .egt-stepper b {
  border-color: #6a3ae0;
  background: #0a0226;
}

.egt-neon .egt-winline.on {
  color: #ff9bec;
  text-shadow: 0 0 10px rgba(255, 79, 216, 0.8);
}


/* Гейбъл: прозорец върху цялата страница, червеното е отляво на картата, черното — отдясно. */
.gs-screen {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  grid-template-rows: none;
  align-content: center;
  padding: 12px;
  background: rgba(4, 2, 12, 0.82);
  overflow-y: auto;
}

.gs-panel {
  display: grid;
  gap: 12px;
  justify-items: center;
  width: min(100%, 560px);
  padding: 14px 12px 16px;
  border: 2px solid #e8c36a;
  border-radius: 16px;
  background: radial-gradient(ellipse at 50% 0%, #7a3a08, #240e04 70%);
  box-shadow: 0 0 40px rgba(255, 170, 60, 0.35);
}

.gs-table {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  width: 100%;
}

.gs-card {
  width: min(34vw, 150px);
  height: calc(min(34vw, 150px) * 1.42);
}

.gs-pick {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  min-height: 150px;
  padding: 10px 6px;
  border: 3px solid rgba(255, 255, 255, 0.7);
  border-radius: 16px;
  color: #fff;
  font: inherit;
  cursor: pointer;
  transition: transform 0.1s, filter 0.1s;
}

.gs-pick:hover:not(:disabled) {
  transform: translateY(-3px);
  filter: brightness(1.15);
}

.gs-pick.red {
  background: linear-gradient(180deg, #ff5a6a, #a01022);
}

.gs-pick.black {
  background: linear-gradient(180deg, #55556a, #14141c);
}

.gs-pick:disabled {
  opacity: 0.55;
  cursor: wait;
}

.gs-pick-suits {
  font-size: clamp(26px, 8vw, 40px);
  line-height: 1;
}

.gs-pick b {
  font-size: clamp(12px, 3.4vw, 16px);
  letter-spacing: 0.06em;
}

.gs-button.take {
  min-width: 200px;
}

/* Надпис за MEGA JACKPOT */
.mega-win {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-content: center;
  gap: 10px;
  text-align: center;
  background: radial-gradient(circle at 50% 45%, rgba(255, 190, 40, 0.35), rgba(8, 4, 24, 0.94) 70%);
  animation: mega-in 0.5s ease-out both;
  cursor: pointer;
}

.mega-win-title {
  font-size: clamp(34px, 11vw, 92px);
  font-weight: 900;
  letter-spacing: 0.04em;
  background: linear-gradient(180deg, #ffffff, #ffe58a 45%, #e0a526);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 22px rgba(255, 190, 40, 0.8));
  animation: mega-pulse 1.1s ease-in-out infinite;
}

.mega-win-amount {
  font-size: clamp(30px, 9vw, 72px);
  font-weight: 900;
  color: #fff3b0;
  text-shadow: 0 0 18px rgba(255, 190, 40, 0.9);
}

.mega-win-sub {
  color: #d8cfff;
  font-size: 15px;
}

@keyframes mega-in {
  from {
    opacity: 0;
    transform: scale(1.15);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes mega-pulse {
  50% {
    transform: scale(1.06);
  }
}

/* ───────── Крепостта на Бари ───────── */
.egt-ilium .egt-stage {
  border-color: #6a4a12;
  background: #03080d;
  box-shadow: 0 0 0 2px #d9a33a, 0 0 26px rgba(217, 163, 58, 0.4), 0 8px 28px rgba(0, 0, 0, 0.6);
}

.egt-ilium .egt-badge {
  border-color: #d9a33a;
  background: rgba(7, 27, 37, 0.92);
  color: #ffe19a;
}

.egt-ilium .egt-bar {
  border-color: #6a4a12;
  background: linear-gradient(180deg, #0b2430, #04101a);
  box-shadow: 0 0 18px rgba(217, 163, 58, 0.25);
}

.egt-ilium .egt-jp-box {
  border-color: #8a6a22;
  background: linear-gradient(180deg, #0b2430, #04101a);
}

.egt-ilium .egt-meter span,
.egt-ilium .egt-cap,
.egt-ilium .egt-spin-caption {
  color: #f5cd6a;
}

.egt-ilium .egt-spin {
  border-color: #d9a33a;
  background: radial-gradient(circle at 35% 30%, #e2b450, #7a4d10);
  box-shadow: 0 4px 0 #3b2506, 0 0 22px rgba(217, 163, 58, 0.55);
}

.egt-ilium .egt-step,
.egt-ilium .egt-max {
  border-color: #d9a33a;
}

.egt-ilium .egt-max {
  background: linear-gradient(180deg, #d9a33a, #7a4d10);
}

.egt-ilium .egt-stepper b {
  border-color: #8a6a22;
  background: #04101a;
}

.egt-ilium .egt-winline.on {
  color: #ffe19a;
  text-shadow: 0 0 10px rgba(217, 163, 58, 0.8);
}

.egt.free-mode .egt-spin-caption {
  color: #ffe58a;
  text-shadow: 0 0 10px rgba(255, 210, 90, 0.9);
}

/* Брой линии и залог на линия */
.egt-bets {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 14px;
}

.egt-linebox .egt-stepper b {
  min-width: 44px;
}

/* По-събрана лента: баланс, печалба, линии, общ залог и старт са близо един до друг */
.egt-spin svg {
  width: 34px;
  height: 34px;
}

.egt-bar .egt-bets {
  gap: 10px;
}

/* ───────── Слотове с линии: нова лента за управление на телефон ───────── */
.egt-more,
.snd-bars {
  display: none;
}

.snd-bars svg rect {
  fill: rgba(255, 255, 255, 0.28);
}

.snd-bars .mute {
  stroke: #ff7a7a;
  stroke-width: 2.4;
  stroke-linecap: round;
  opacity: 0;
}

.snd-bars.lvl-0 .mute {
  opacity: 1;
}

.snd-bars.lvl-1 svg rect:nth-child(-n + 1),
.snd-bars.lvl-2 svg rect:nth-child(-n + 2),
.snd-bars.lvl-3 svg rect {
  fill: #ffd24a;
}

.snd-word {
  margin-left: 4px;
}

@media (max-width: 560px) {
  /* Баланс и печалба се махат от долната лента (балансът си стои в заглавието), старт е най-горе. */
  .egt-bar {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 10px 12px;
  }

  .egt-bar .egt-meter {
    display: none;
  }

  .egt-bar .egt-spin-box {
    order: -1;
    grid-column: 1;
  }

  .egt-bar .egt-spin {
    width: 76px;
    height: 76px;
  }

  .egt-bar .egt-spin svg {
    width: 42px;
    height: 42px;
  }

  /* Само иконата е видима; надписът остава само при безплатни завъртания, където носи важна информация. */
  .egt-bar .egt-spin-caption {
    display: none;
  }

  .egt.free-mode .egt-bar .egt-spin-caption {
    display: block;
  }

  .egt-bar .egt-bets {
    order: 1;
    grid-column: 1;
    grid-row: auto;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 10px;
    width: 100%;
  }

  .egt-bets .egt-betbox {
    width: 100%;
    justify-items: stretch;
  }

  .egt-bets .egt-stepper {
    width: 100%;
    gap: 8px;
  }

  .egt-bets .egt-stepper b,
  .egt-bets .egt-linebox .egt-stepper b {
    flex: 1;
    min-width: 0;
    min-height: 44px;
    display: grid;
    place-items: center;
    font-size: 18px;
  }

  .egt-bets .egt-step {
    flex: none;
    width: 44px;
    height: 44px;
  }

  /* Без бутон „Макс“ на телефон. */
  .egt-bets .egt-max {
    display: none;
  }

  .egt-bets small {
    text-align: center;
  }

  /* Под залога: Авто, Турбо, Звук, Още — по един ред; допълнителното се отваря с „Още“. */
  .egt-tools {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    justify-content: stretch;
  }

  .egt-tools > * {
    min-width: 0;
    min-height: 44px;
    margin: 0;
  }

  .egt-tools .cs-auto {
    order: 1;
    width: 100%;
    padding-left: 6px;
    padding-right: 4px;
  }

  .egt-tools .egt-turbo {
    order: 2;
  }

  .egt-tools .egt-sound {
    order: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .egt-tools .egt-more {
    order: 4;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .egt-tools .egt-secondary {
    display: none;
    order: 10;
    grid-column: span 2;
  }

  .egt.more-open .egt-tools .egt-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .snd-text {
    display: none;
  }

  .snd-bars {
    display: inline-flex;
    align-items: center;
  }

  .egt:not(.more-open) > .hint,
  .egt:not(.more-open) > .bet-history {
    display: none;
  }
}

/* ───────── Печалбата се вижда и на телефон: вляво от бутона за въртене ───────── */
@media (max-width: 560px) {
  .egt-bar {
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
  }

  .egt-bar .egt-meter:nth-child(2) {
    display: grid;
    grid-column: 1;
    grid-row: 1;
    justify-items: end;
    text-align: right;
    min-width: 0;
    padding: 0 4px 0 0;
  }

  .egt-bar .egt-meter:nth-child(2) span {
    font-size: 11px;
  }

  .egt-bar .egt-meter:nth-child(2) strong {
    font-size: 20px;
    white-space: nowrap;
  }

  .egt-bar .egt-spin-box {
    grid-column: 2;
    grid-row: 1;
  }

  .egt-bar .egt-bets {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

/* ───────── Бутон „Двоен шанс“ (гейбъл): квадрат вдясно от бутона за въртене ───────── */
.egt-spin-box {
  position: relative;
}

.egt-gamble {
  position: absolute;
  top: 0;
  left: calc(50% + 30px + 12px);
  width: 60px;
  height: 60px;
  padding: 0;
  border: 0;
  border-radius: 22%;
  background: transparent;
  cursor: pointer;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.55));
  animation: gamble-pulse 1.1s ease-in-out infinite alternate;
}

.egt-gamble img {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.egt-gamble:hover {
  transform: translateY(-2px);
}

.egt-gamble:active {
  transform: translateY(2px);
}

.egt-gamble[hidden] {
  display: none;
}

@keyframes gamble-pulse {
  from {
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.55));
  }
  to {
    filter: drop-shadow(0 0 12px rgba(255, 210, 90, 0.85));
  }
}

@media (max-width: 560px) {
  .egt-gamble {
    left: calc(50% + 38px + 10px);
    width: 76px;
    height: 76px;
  }
}

/* ───────── 20 Burning Hot ───────── */
.egt-burning20 .egt-stage { border-color: #f2a33a; background: #1a0403; box-shadow: 0 0 22px rgba(255, 106, 26, .35); }
.egt-burning20 .egt-badge { border-color: #ffd24a; background: rgba(74, 13, 6, .92); color: #fff3c9; }
.egt-burning20 .egt-bar { border-color: #c4561a; background: linear-gradient(180deg, #5a0f06, #1c0403); }
.egt-burning20 .egt-jp-box { border-color: #d27a22; background: linear-gradient(180deg, #4a0d06, #170302); }
.egt-burning20 .egt-meter span, .egt-burning20 .egt-cap, .egt-burning20 .egt-spin-caption { color: #ffcf5e; }
.egt-burning20 .egt-spin { border-color: #ffd24a; background: radial-gradient(circle at 35% 30%, #ff8a2a, #a31c0a); }
.egt-burning20 .egt-step, .egt-burning20 .egt-max { border-color: #ffd24a; }
.egt-burning20 .egt-max { background: linear-gradient(180deg, #e5400f, #8a1604); }
.egt-burning20 .egt-stepper b { border-color: #c4561a; background: #170302; }
.egt-burning20 .egt-winline.on { border-color: #ffd24a; }

/* ───────── Не се сърди човече ───────── */
.ludo [hidden] { display: none !important; }
.ludo { grid-template-columns: 1fr; }
.ludo-lobby { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.ludo-lobby h3, .ludo-lobby h4 { margin: 0; }
.ludo-create { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); align-items: end; }
.ludo-tiers { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.ludo-rooms { display: grid; gap: 8px; }
.ludo-room-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: rgba(0, 0, 0, .18); }
.ludo-room-row .action { width: auto; min-width: 120px; }
.ludo-private { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 10px; border: 1px dashed var(--line); border-radius: 10px; cursor: pointer; }
.ludo-code { width: 7ch; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line); background: rgba(0, 0, 0, .25); color: inherit; font: inherit; letter-spacing: .3em; text-align: center; }
.ludo-return { display: block; width: 100%; margin: 6px 0; padding: 10px 12px; border: 1px solid #f2c744; border-radius: 10px; background: rgba(242, 199, 68, .16); color: inherit; font: inherit; font-weight: 700; cursor: pointer; }
.ludo-return[hidden] { display: none; }
.ludo-mute { font-size: .9em; }
.ludo-room { display: grid; gap: 12px; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: start; }
.ludo-stage { background: radial-gradient(120% 90% at 50% 0%, #3a2a1c 0%, #19110b 75%); border-color: rgba(255, 221, 130, .3); padding: 8px; }

/* дъската */
.ludo-board-wrap { position: relative; width: 100%; max-width: 640px; margin: 0 auto; border-radius: 10px; overflow: hidden; box-shadow: 0 6px 22px rgba(0, 0, 0, .55); }
.ludo-board-wrap.shake { animation: ludo-board-shake .4s linear; }
@keyframes ludo-board-shake { 15% { transform: translate(-4px, 2px); } 35% { transform: translate(4px, -3px); } 55% { transform: translate(-3px, -2px); } 75% { transform: translate(2px, 2px); } }
.ludo-board { display: block; width: 100%; height: auto; touch-action: manipulation; user-select: none; }
.ludo-board image { pointer-events: none; }
.ludo-piece { cursor: default; }
.ludo-hit { fill: transparent; pointer-events: all; }
.ludo-shadow { transform-box: fill-box; transform-origin: center; }
.ludo-body { transform-box: fill-box; transform-origin: 50% 84%; }
.ludo-badge { fill: #2a1c10; stroke: #ffdd82; stroke-width: .035; }
.ludo-badge-text { fill: #fff; font: 700 .2px system-ui, sans-serif; text-anchor: middle; pointer-events: none; }
.ludo-ring { opacity: 0; transform-box: fill-box; transform-origin: center; }
.ludo-piece.movable .ludo-ring { opacity: 1; animation: ludo-ring 1s ease-in-out infinite; }
.ludo-piece.movable:not(.mine-move) .ludo-ring { opacity: .55; animation: none; }
.ludo-piece.mine-move { cursor: pointer; }
.ludo-piece.mine-move .ludo-body { animation: ludo-nudge 1s ease-in-out infinite; }
@keyframes ludo-ring { 50% { transform: scale(1.14); opacity: .75; } }
@keyframes ludo-nudge { 50% { transform: translateY(-.1px); } }

/* стрелка за чий е редът */
.ludo-marker { position: absolute; width: 8.2%; transform: translate(-50%, -50%); pointer-events: none; transition: left .45s ease, top .45s ease; animation: ludo-bob 1s ease-in-out infinite; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .6)); }
@keyframes ludo-bob { 50% { margin-top: -6px; } }

/* ленти от 8 кадъра (ефекти) */
.ludo-fx { position: absolute; aspect-ratio: 1; background-size: 800% 100%; background-repeat: no-repeat; pointer-events: none; animation: ludo-strip 700ms steps(7, end) forwards; }
@keyframes ludo-strip { from { background-position: 0 0; } to { background-position: 100% 0; } }

/* зарът */
.ludo-die-wrap { position: relative; flex: none; width: 96px; height: 96px; }
.ludo-die { width: 100%; height: 100%; background-repeat: no-repeat; background-size: contain; background-position: center; user-select: none; filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .5)); }
.ludo-die.idle { opacity: .55; }
.ludo-die.rolling { background-size: 800% 100%; animation: ludo-roll .56s steps(7, end) forwards, ludo-toss .56s ease-out; }
.ludo-die.landed { animation: ludo-land .38s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes ludo-roll { from { background-position: 0 0; } to { background-position: 100% 0; } }
@keyframes ludo-toss { 0% { transform: translateY(0); } 40% { transform: translateY(-22px) rotate(12deg); } 100% { transform: translateY(0) rotate(-4deg); } }
@keyframes ludo-land { 0% { transform: scale(1.25) rotate(-8deg); } 55% { transform: scale(.92) rotate(3deg); } 100% { transform: scale(1) rotate(0); } }

/* страничен панел */
.ludo-side { display: grid; gap: 10px; align-content: start; }
.ludo-info { font-weight: 700; }
.ludo-seats { display: grid; gap: 6px; }
.ludo-seat { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 10px; background: rgba(0, 0, 0, .18); font-size: 14px; transition: box-shadow .25s, background .25s; }
.ludo-seat .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ludo-seat.me { border-color: rgba(255, 221, 130, .6); }
.ludo-seat.active { box-shadow: 0 0 0 2px var(--gold); animation: ludo-seat-glow 1.6s ease-in-out infinite; }
@keyframes ludo-seat-glow { 50% { box-shadow: 0 0 0 2px var(--gold), 0 0 12px 2px rgba(255, 221, 130, .45); } }
.ludo-seat.won { background: rgba(46, 158, 79, .28); }
.ludo-dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #fff; flex: none; }
.ludo-dice-row { display: flex; align-items: center; gap: 12px; }
.ludo-dice-row .action { flex: 1; }
.ludo-log { min-height: 2.6em; color: var(--muted); font-size: 14px; }
.ludo-absent { flex-basis: 100%; color: #ff8a8a; font-size: 12px; }
.ludo-banner { padding: 10px; border-radius: 10px; text-align: center; font-weight: 700; background: rgba(229, 72, 77, .2); }
.ludo-banner.win { background: rgba(46, 158, 79, .35); animation: ludo-land .6s cubic-bezier(.3, 1.6, .5, 1); }
.ludo-actions { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
@media (max-width: 820px) { .ludo-room { grid-template-columns: 1fr; } .ludo-die-wrap { width: 80px; height: 80px; } }
@media (prefers-reduced-motion: reduce) {
  .ludo-piece.movable .ludo-ring, .ludo-piece.mine-move .ludo-body, .ludo-marker, .ludo-seat.active, .ludo-board-wrap.shake, .ludo-die.rolling, .ludo-die.landed, .ludo-banner.win { animation: none; }
}
/* ───────── Свара (проба с жетони) ─────────
   Сцена 1600×900 (на телефон 900×1200): всичко се мери в „--u“ = 1 пиксел от проектната сцена.
   Картините от ChatGPT (web/art/svara/*.webp) се включват от клас `art-<име>` върху секцията; без тях масата е от CSS. */
.svara [hidden] { display: none !important; }
.svara { grid-template-columns: 1fr; }
.svara-lobby { display: grid; gap: 10px; padding: 12px; border: 1px solid rgba(232, 185, 72, .35); border-radius: var(--radius); background: linear-gradient(180deg, #2a0d12, #14070a); }
.svara-lobby h3, .svara-lobby h4 { margin: 0; }
.svara-tiers { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.svara-rooms { display: grid; gap: 8px; }
.svara-room-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: rgba(0, 0, 0, .25); }
.svara-room-row .svara-btn { width: auto; min-width: 110px; }
.svara-rules { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: rgba(0, 0, 0, .25); font-size: 14px; }
.svara-rules summary { cursor: pointer; font-weight: 700; }
.svara-rules-list { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 4px; color: var(--muted); font-size: 14px; }
.svara-room { display: grid; gap: 10px; }

/* Сцената */
.svara-stage { position: relative; width: 100%; max-width: 1100px; margin: 0 auto; aspect-ratio: 16 / 9; container-type: inline-size; border-radius: 14px; overflow: hidden; background: radial-gradient(120% 90% at 50% 40%, #2b0d12 0%, #0d0305 78%); box-shadow: 0 8px 30px rgba(0, 0, 0, .6); user-select: none; }
.svara-scene { position: absolute; inset: 0; --u: calc(100cqw / 1600); --av: max(46px, calc(150 * var(--u))); --cw: max(20px, calc(56 * var(--u))); --hw: max(52px, calc(150 * var(--u))); --font: max(10px, calc(24 * var(--u))); font-size: var(--font); }
.art-table .svara-stage { background: url(svara/table.webp) center / 100% 100% no-repeat, #0d0305; }
.art-table .svara-felt { display: none; }
.svara-stage.shake { animation: svara-shake .45s linear; }
@keyframes svara-shake { 15% { transform: translate(-5px, 2px); } 35% { transform: translate(5px, -3px); } 55% { transform: translate(-4px, -2px); } 75% { transform: translate(3px, 2px); } }

/* Масата от CSS (докато няма картина) */
.svara-felt { position: absolute; left: 12.5%; top: 17.8%; width: 75%; height: 60%; border-radius: 50%; background: radial-gradient(ellipse at 50% 38%, #c01f2a 0%, #8a1019 52%, #4d0a10 100%); border: calc(46 * var(--u)) solid #25120f; box-shadow: 0 0 0 calc(6 * var(--u)) #e8b948, inset 0 0 0 calc(5 * var(--u)) #e8b948, inset 0 0 calc(80 * var(--u)) rgba(0, 0, 0, .55), 0 calc(30 * var(--u)) calc(60 * var(--u)) rgba(0, 0, 0, .7); }
.svara-logo { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font: 900 calc(130 * var(--u)) / 1 Georgia, 'Times New Roman', serif; letter-spacing: .06em; color: rgba(255, 205, 90, .16); text-shadow: 0 2px 0 rgba(0, 0, 0, .25); pointer-events: none; white-space: nowrap; }
.art-logo .svara-logo { width: calc(760 * var(--u)); height: calc(220 * var(--u)); font-size: 0; background: url(svara/logo.webp) center / contain no-repeat; opacity: .5; }

/* Пот */
.svara-pot { position: absolute; left: 50%; top: 38%; transform: translate(-50%, -50%); display: grid; justify-items: center; min-width: calc(250 * var(--u)); padding: 0 0 calc(6 * var(--u)); border-radius: calc(16 * var(--u)); background: linear-gradient(180deg, #3b1115, #1c0709); border: calc(3 * var(--u)) solid #e8b948; text-align: center; z-index: 4; }
.svara-pot-title { width: 100%; padding: calc(4 * var(--u)) 0; border-radius: calc(12 * var(--u)) calc(12 * var(--u)) 0 0; background: linear-gradient(180deg, #ff9a2e, #d4561a); font-weight: 900; letter-spacing: .12em; font-size: calc(26 * var(--u)); color: #fff; text-shadow: 0 1px 0 rgba(0, 0, 0, .4); }
.svara-pot-num { font-size: calc(52 * var(--u)); line-height: 1.1; color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, .5); }
.svara-pot-sub { font-size: calc(24 * var(--u)); color: #ffdd82; min-height: 1.2em; }
.art-pot-plaque .svara-pot { background: url(svara/pot-plaque.webp) center / 100% 100% no-repeat; border: 0; padding-bottom: calc(24 * var(--u)); }
.art-pot-plaque .svara-pot-title { background: none; text-shadow: 0 1px 2px #000; }
.svara-pot.pop { animation: svara-pop .35s ease-out; }
@keyframes svara-pop { 40% { transform: translate(-50%, -50%) scale(1.12); } }

/* Места: центърът на аватара е върху рамката на масата */
.svara-seat { position: absolute; width: var(--av); height: var(--av); transform: translate(-50%, -50%); z-index: 3; }
.svara-seat.s0 { left: 50%; top: 74%; --fx: 0px; --fy: calc(-300 * var(--u)); }
.svara-seat.s1 { left: 17.5%; top: 62.8%; --fx: calc(330 * var(--u)); --fy: calc(-60 * var(--u)); }
.svara-seat.s2 { left: 17.5%; top: 32.8%; --fx: calc(330 * var(--u)); --fy: calc(120 * var(--u)); }
.svara-seat.s3 { left: 50%; top: 21.5%; --fx: 0px; --fy: calc(260 * var(--u)); }
.svara-seat.s4 { left: 82.5%; top: 32.8%; --fx: calc(-330 * var(--u)); --fy: calc(120 * var(--u)); }
.svara-seat.s5 { left: 82.5%; top: 62.8%; --fx: calc(-330 * var(--u)); --fy: calc(-60 * var(--u)); }
.svara-bet { position: absolute; transform: translate(-50%, -50%); display: flex; align-items: center; gap: .35em; padding: .15em .7em .15em .3em; border-radius: 99px; background: rgba(0, 0, 0, .6); border: 1px solid rgba(232, 185, 72, .6); font-weight: 800; color: #ffe9a8; font-size: max(11px, calc(30 * var(--u))); z-index: 4; }
.svara-bet.s0 { left: 64%; top: 66%; } .svara-bet.s1 { left: 27.5%; top: 58%; } .svara-bet.s2 { left: 27.5%; top: 38%; }
.svara-bet.s3 { left: 40%; top: 21.5%; } .svara-bet.s4 { left: 72.5%; top: 38%; } .svara-bet.s5 { left: 72.5%; top: 58%; }
.svara-bet.pop { animation: svara-pop-bet .35s ease-out; }
@keyframes svara-pop-bet { 40% { transform: translate(-50%, -50%) scale(1.25); } }
.svara-coin { width: 1.4em; height: 1.4em; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff1a8, #e0a41e 60%, #8a5a08); border: .12em dashed rgba(255, 255, 255, .55); flex: none; }
.art-chip-gold .svara-coin { background: url(svara/chip-gold.webp) center / contain no-repeat; border: 0; }

.svara-avatar { position: absolute; inset: 0; z-index: 1; border-radius: 50%; }
.svara-photo { position: absolute; inset: 8%; border-radius: 50%; background: #3a1a22 center / cover no-repeat; display: grid; place-items: center; font-weight: 900; font-size: calc(var(--av) * .42); color: #ffdd82; overflow: hidden; }
.svara-avatar::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: max(2px, calc(7 * var(--u))) solid #e8b948; box-shadow: 0 calc(6 * var(--u)) calc(14 * var(--u)) rgba(0, 0, 0, .6); pointer-events: none; }
.art-avatar-frame .svara-avatar::after { border: 0; box-shadow: none; background: url(svara/avatar-frame.webp) center / 100% 100% no-repeat; inset: -6%; }
.svara-seat.active .svara-avatar::before { content: ''; position: absolute; inset: -9%; border-radius: 50%; background: conic-gradient(#3ddc84 var(--t, 360deg), rgba(255, 255, 255, .18) 0); -webkit-mask: radial-gradient(circle, transparent 60%, #000 62%); mask: radial-gradient(circle, transparent 60%, #000 62%); }
.art-avatar-frame-active .svara-seat.active .svara-avatar::after { background-image: url(svara/avatar-frame-active.webp); }
.svara-seat.won .svara-avatar::after { border-color: #fff1c4; box-shadow: 0 0 calc(40 * var(--u)) calc(10 * var(--u)) rgba(255, 221, 130, .85); animation: svara-glow 1s ease-in-out infinite alternate; }
.art-avatar-frame-winner .svara-seat.won .svara-avatar::after { background-image: url(svara/avatar-frame-winner.webp); box-shadow: none; }
@keyframes svara-glow { to { box-shadow: 0 0 calc(70 * var(--u)) calc(18 * var(--u)) rgba(255, 221, 130, 1); } }
.svara-plus { display: none; font-size: calc(var(--av) * .6); font-weight: 300; color: rgba(255, 221, 130, .7); z-index: 1; }
.svara-seat.empty .svara-photo { background: rgba(255, 255, 255, .06); border: 2px dashed rgba(232, 185, 72, .35); }
.svara-seat.empty .svara-avatar::after { opacity: .35; }
.svara-seat.addable { cursor: pointer; }
.svara-seat.addable .svara-plus { display: block; }
.svara-seat.addable:hover .svara-photo { background: rgba(232, 185, 72, .2); }
.art-avatar-empty .svara-seat.empty .svara-photo { background: url(svara/avatar-empty.webp) center / cover no-repeat; border: 0; }
.svara-seat.folded { opacity: .5; filter: grayscale(.55); }
.svara-seat.out { opacity: .4; filter: grayscale(.8); }
.svara-seat.empty:not(.addable) { opacity: .45; }
.svara-plate { position: absolute; left: 50%; top: 100%; transform: translate(-50%, calc(6 * var(--u))); z-index: 2; display: grid; justify-items: center; width: max(96px, calc(280 * var(--u))); padding: .15em .4em; border-radius: calc(14 * var(--u)); background: linear-gradient(180deg, rgba(60, 20, 26, .95), rgba(14, 5, 8, .95)); border: calc(2 * var(--u)) solid rgba(232, 185, 72, .7); line-height: 1.15; }
.art-seat-plate .svara-plate { background: url(svara/seat-plate.webp) center / 100% 100% no-repeat; border: 0; padding: .35em .8em; }
.svara-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; color: #fff; }
.svara-chips { display: inline-flex; align-items: center; gap: .3em; color: #ffdd82; font-weight: 800; }
.svara-chips:not(:empty)::before { content: ''; width: .95em; height: .95em; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff1a8, #e0a41e 60%, #8a5a08); }
.svara-status { position: absolute; left: 50%; top: 80%; transform: translateX(-50%); z-index: 3; padding: .05em .7em; border-radius: 99px; background: rgba(0, 0, 0, .75); color: #fff; font-size: .85em; font-weight: 700; white-space: nowrap; }
.svara-status:empty { display: none; }
.svara-seat.active .svara-status { background: #1f7a45; }
.svara-dealer { position: absolute; right: -4%; top: 2%; z-index: 3; width: max(18px, calc(48 * var(--u))); height: max(18px, calc(48 * var(--u))); border-radius: 50%; display: grid; place-items: center; background: #2c6fd1; border: 2px solid #fff; color: #fff; font-weight: 900; font-size: .8em; }
.art-badge-dealer .svara-dealer { background: url(svara/badge-dealer.webp) center / 100% 100% no-repeat; border: 0; font-size: 0; }
.svara-seat-cards { position: absolute; left: 50%; bottom: 68%; transform: translateX(-50%); z-index: 0; display: flex; }
.svara-seat-cards .svara-card { margin-left: calc(var(--cw) * -.45); }
.svara-seat-cards .svara-card:first-child { margin-left: 0; }

/* Карти */
.svara-card { position: relative; flex: none; width: var(--cw); height: calc(var(--cw) * 1.4); border-radius: calc(var(--cw) * .09); font-size: calc(var(--cw) * .3); line-height: 1; --rot: 0deg; transform: rotate(var(--rot)); box-shadow: 0 calc(var(--cw) * .04) calc(var(--cw) * .1) rgba(0, 0, 0, .55); }
.svara-card:nth-child(1) { --rot: -7deg; } .svara-card:nth-child(2) { --rot: 0deg; } .svara-card:nth-child(3) { --rot: 7deg; }
.svara-card.face { background: linear-gradient(160deg, #fffdf4, #efe6cc); border: 1px solid #b9aa7c; color: #1b1b1b; }
.svara-card.face.red { color: #c21e2b; }
.svara-card.back { background: repeating-linear-gradient(45deg, #8a1019 0 .22em, #5a0a11 .22em .44em); border: calc(var(--cw) * .05) solid #fff1c4; }
.art-card-face .svara-card.face { background: url(svara/card-face.webp) center / 100% 100% no-repeat; border: 0; box-shadow: none; }
.art-card-back .svara-card.back { background: url(svara/card-back.webp) center / 100% 100% no-repeat; border: 0; box-shadow: none; }
.svara-card .corner { position: absolute; left: 9%; top: 6%; display: grid; justify-items: center; font-weight: 900; line-height: 1; }
.svara-card .corner i { font-style: normal; font-size: 1.05em; }
.svara-card .suit { display: block; font-weight: 400; line-height: 1; }
.svara-card .corner .suit { font-size: .9em; }
.svara-card .suit.big { position: absolute; left: 50%; top: 56%; transform: translate(-50%, -50%); font-size: 2.1em; }
.art-suit-spades .svara-card[data-suit='spades'] .suit, .art-suit-hearts .svara-card[data-suit='hearts'] .suit, .art-suit-diamonds .svara-card[data-suit='diamonds'] .suit, .art-suit-clubs .svara-card[data-suit='clubs'] .suit { font-size: 0; background: center / contain no-repeat; }
.art-suit-spades .svara-card[data-suit='spades'] .suit { background-image: url(svara/suit-spades.webp); }
.art-suit-hearts .svara-card[data-suit='hearts'] .suit { background-image: url(svara/suit-hearts.webp); }
.art-suit-diamonds .svara-card[data-suit='diamonds'] .suit { background-image: url(svara/suit-diamonds.webp); }
.art-suit-clubs .svara-card[data-suit='clubs'] .suit { background-image: url(svara/suit-clubs.webp); }
.svara-card .corner .suit { width: calc(var(--cw) * .2); height: calc(var(--cw) * .2); }
.svara-card .suit.big { width: calc(var(--cw) * .5); height: calc(var(--cw) * .5); }
.svara-card.deal { animation: svara-deal .5s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--n, 0) * 90ms); }
.svara-card.flip { animation: svara-flip .5s ease-out both; animation-delay: calc(var(--n, 0) * 110ms); }
@keyframes svara-deal { from { transform: translate(var(--fx, 0), var(--fy, 0)) scale(.3) rotate(-35deg); opacity: 0; } to { transform: rotate(var(--rot)); opacity: 1; } }
@keyframes svara-flip { from { transform: perspective(500px) rotateY(90deg) rotate(var(--rot)); } to { transform: perspective(500px) rotateY(0) rotate(var(--rot)); } }

/* Моите карти */
.svara-hand { position: absolute; left: 50%; top: 63%; transform: translate(-50%, -50%); z-index: 5; display: grid; justify-items: center; gap: calc(10 * var(--u)); --cw: var(--hw); --fx: 0px; --fy: calc(-260 * var(--u)); }
.svara-hand.folded { opacity: .45; filter: grayscale(.6); }
.svara-hand-cards { display: flex; gap: calc(14 * var(--u)); }
.svara-hand-badges { display: flex; gap: calc(10 * var(--u)); flex-wrap: wrap; justify-content: center; }
.svara-badge { padding: .05em .7em; border-radius: 99px; background: rgba(0, 0, 0, .7); border: 1px solid rgba(232, 185, 72, .6); color: #ffe9a8; font-weight: 800; font-size: .95em; white-space: nowrap; }
.svara-badge.pts { background: #1f7a45; color: #fff; border-color: #fff; }

/* Кръгли бутони, банер, ефекти, наслагвания */
.svara-round { position: absolute; top: 3%; z-index: 8; width: max(34px, calc(84 * var(--u))); height: max(34px, calc(84 * var(--u))); border-radius: 50%; border: 2px solid rgba(232, 185, 72, .8); background: rgba(0, 0, 0, .55); color: #ffdd82; font-weight: 900; font-size: max(16px, calc(40 * var(--u))); cursor: pointer; display: grid; place-items: center; padding: 0; }
.svara-round.left { left: 2%; } .svara-round.right { right: 2%; }
.svara-pill { position: absolute; left: 2%; bottom: 3%; z-index: 8; padding: .2em .9em; border-radius: 99px; border: 1px solid rgba(232, 185, 72, .7); background: rgba(0, 0, 0, .6); color: #ffdd82; font-weight: 700; cursor: pointer; }
.svara-info { position: absolute; right: 2%; bottom: 3%; z-index: 8; color: rgba(255, 255, 255, .65); font-size: .85em; text-align: right; }
.svara-banner { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); z-index: 9; padding: .3em 1.2em; border-radius: 14px; background: rgba(20, 8, 10, .9); border: 2px solid rgba(232, 185, 72, .8); font-weight: 900; font-size: calc(46 * var(--u)); color: #fff; white-space: nowrap; animation: svara-pop .45s ease-out; text-align: center; }
.svara-banner.win { background: rgba(31, 122, 69, .92); }
.svara-banner.tie { background: linear-gradient(180deg, #ff9a2e, #c4361a); letter-spacing: .14em; font-size: calc(90 * var(--u)); text-shadow: 0 3px 0 rgba(0, 0, 0, .45); }
.svara-overlay { position: absolute; inset: 5%; z-index: 20; display: grid; gap: 8px; align-content: start; overflow: auto; padding: 12px; border-radius: 14px; background: rgba(10, 4, 6, .95); border: 1px solid rgba(232, 185, 72, .7); font-size: max(12px, calc(26 * var(--u))); }
.svara-overlay h4 { margin: 0; }
.svara-log-list { display: grid; gap: 3px; color: var(--muted); }
.svara-fx { position: absolute; aspect-ratio: 1; background-size: 800% 100%; background-repeat: no-repeat; pointer-events: none; z-index: 15; animation: svara-strip 1s steps(7, end) forwards; }
@keyframes svara-strip { from { background-position: 0 0; } to { background-position: 100% 0; } }

/* Фигури на картите (J, Q, K, A), иконки, жетони по цвят, купчинка при пота */
.svara-card.face[data-rank='J']::before, .svara-card.face[data-rank='Q']::before, .svara-card.face[data-rank='K']::before, .svara-card.face[data-rank='A']::before { content: ''; position: absolute; left: 50%; top: 56%; width: 66%; height: 62%; transform: translate(-50%, -50%); background: center / contain no-repeat; pointer-events: none; }
.art-court-j .svara-card.face[data-rank='J']::before { background-image: url(svara/court-j.webp); }
.art-court-q .svara-card.face[data-rank='Q']::before { background-image: url(svara/court-q.webp); }
.art-court-k .svara-card.face[data-rank='K']::before { background-image: url(svara/court-k.webp); }
.art-court-a .svara-card.face[data-rank='A']::before { background-image: url(svara/court-a.webp); }
.art-court-j .svara-card.face[data-rank='J'] .suit.big, .art-court-q .svara-card.face[data-rank='Q'] .suit.big, .art-court-k .svara-card.face[data-rank='K'] .suit.big { display: none; }
.art-court-a .svara-card.face[data-rank='A'] .suit.big { width: calc(var(--cw) * .28); height: calc(var(--cw) * .28); top: 80%; }
.art-icon-lobby .svara-round.left { background: url(svara/icon-lobby.webp) center / cover no-repeat; border: 0; font-size: 0; }
.art-icon-info .svara-round.right { background: url(svara/icon-info.webp) center / cover no-repeat; border: 0; font-size: 0; }
.art-icon-log .svara-pill::before { content: ''; display: inline-block; width: 1.3em; height: 1.3em; margin: 0 .3em -.3em 0; background: url(svara/icon-log.webp) center / contain no-repeat; }
.art-chip-red .svara-bet[data-c='1'] .svara-coin { background: url(svara/chip-red.webp) center / contain no-repeat; border: 0; }
.art-chip-blue .svara-bet[data-c='2'] .svara-coin { background: url(svara/chip-blue.webp) center / contain no-repeat; border: 0; }
.art-chip-green .svara-bet[data-c='3'] .svara-coin { background: url(svara/chip-green.webp) center / contain no-repeat; border: 0; }
.art-chip-gold .svara-bet[data-c='4'] .svara-coin { background: url(svara/chip-gold.webp) center / contain no-repeat; border: 0; }
.art-chip-stack .svara-pot::after { content: ''; position: absolute; right: calc(-84 * var(--u)); bottom: calc(-6 * var(--u)); width: calc(90 * var(--u)); height: calc(90 * var(--u)); background: url(svara/chip-stack.webp) center / contain no-repeat; pointer-events: none; }

/* Бутоните под масата */
.svara-actions { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); max-width: 1100px; width: 100%; margin: 0 auto; }
.svara-btn { padding: .75em 1em; border-radius: 12px; border: 2px solid rgba(255, 255, 255, .35); color: #fff; font-weight: 800; font-size: 16px; cursor: pointer; text-shadow: 0 1px 2px rgba(0, 0, 0, .55); box-shadow: 0 3px 0 rgba(0, 0, 0, .45); }
.svara-btn.red { background: linear-gradient(180deg, #e0525a, #a31a26); }
.svara-btn.green { background: linear-gradient(180deg, #3fc277, #1b7a45); }
.svara-btn.blue { background: linear-gradient(180deg, #5b9bf0, #2b5fb8); }
.svara-btn.gold { background: linear-gradient(180deg, #ffd45e, #c48a12); color: #2a1604; text-shadow: none; }
.svara-btn:disabled { opacity: .4; cursor: default; }
.art-btn-red .svara-btn.red { background: url(svara/btn-red.webp) center / 100% 100% no-repeat; border: 0; box-shadow: none; }
.art-btn-green .svara-btn.green { background: url(svara/btn-green.webp) center / 100% 100% no-repeat; border: 0; box-shadow: none; }
.art-btn-blue .svara-btn.blue { background: url(svara/btn-blue.webp) center / 100% 100% no-repeat; border: 0; box-shadow: none; }
.art-btn-gold .svara-btn.gold { background: url(svara/btn-gold.webp) center / 100% 100% no-repeat; border: 0; box-shadow: none; }
.svara-raise { display: flex; align-items: center; gap: 10px; max-width: 1100px; width: 100%; margin: 0 auto; padding: 6px 10px; border-radius: 12px; background: rgba(0, 0, 0, .35); border: 1px solid rgba(232, 185, 72, .35); }
.svara-range { flex: 1; min-width: 0; accent-color: #e8b948; height: 28px; }
.svara-range:disabled { opacity: .35; }
.svara-step { width: 40px; height: 40px; border-radius: 50%; border: 2px solid rgba(232, 185, 72, .7); background: rgba(0, 0, 0, .55); color: #ffdd82; font-size: 22px; font-weight: 800; cursor: pointer; padding: 0; }
.svara-step:disabled { opacity: .35; cursor: default; }
.svara-range-value { min-width: 8.5em; text-align: right; color: #ffe9a8; font-weight: 700; font-size: 14px; }
.svara-card[data-joker]::after { content: 'ЖОКЕР'; position: absolute; left: 50%; bottom: 5%; transform: translateX(-50%); padding: .05em .4em; border-radius: 99px; background: linear-gradient(180deg, #ffd45e, #c48a12); color: #2a1604; font-size: .42em; font-weight: 900; letter-spacing: .04em; pointer-events: none; }
.svara-seat-cards .svara-card[data-joker]::after { font-size: .3em; }
.svara-log { min-height: 2.4em; color: var(--muted); font-size: 14px; text-align: center; }

/* Широка сцена: горното място е на една линия с табелката (отгоре няма място под аватара) */
@media (min-width: 721px) {
  .svara-seat.s3 .svara-plate { left: calc(100% + 10 * var(--u)); top: 50%; transform: translate(0, -50%); }
}

/* Телефон: изправена сцена 900×1200 */
@media (max-width: 720px) {
  .svara-stage { aspect-ratio: 3 / 4; }
  .svara-scene { --u: calc(100cqw / 900); --av: max(46px, calc(120 * var(--u))); --cw: max(20px, calc(46 * var(--u))); --hw: max(52px, calc(150 * var(--u))); --font: max(10px, calc(26 * var(--u))); }
  .art-table .svara-stage { background: #0d0305; }
  .art-table .svara-felt { display: block; }
  .art-table-portrait .svara-stage { background: url(svara/table-portrait.webp) center / 100% 100% no-repeat, #0d0305; }
  .art-table-portrait .svara-felt { display: none; }
  .svara-felt { left: 12.2%; top: 10%; width: 75.6%; height: 76.7%; border-width: calc(40 * var(--u)); }
  .svara-seat.s0 { left: 50%; top: 86.7%; --fy: calc(-380 * var(--u)); }
  .svara-seat.s1 { left: 17.3%; top: 67.5%; --fx: calc(250 * var(--u)); --fy: calc(-80 * var(--u)); }
  .svara-seat.s2 { left: 17.3%; top: 29.2%; --fx: calc(250 * var(--u)); --fy: calc(150 * var(--u)); }
  .svara-seat.s3 { left: 50%; top: 10%; --fy: calc(300 * var(--u)); }
  .svara-seat.s4 { left: 82.7%; top: 29.2%; --fx: calc(-250 * var(--u)); --fy: calc(150 * var(--u)); }
  .svara-seat.s5 { left: 82.7%; top: 67.5%; --fx: calc(-250 * var(--u)); --fy: calc(-80 * var(--u)); }
  .svara-bet.s0 { left: 70%; top: 79%; } .svara-bet.s1 { left: 31%; top: 59%; } .svara-bet.s2 { left: 31%; top: 41%; }
  .svara-bet.s3 { left: 50%; top: 24%; } .svara-bet.s4 { left: 69%; top: 41%; } .svara-bet.s5 { left: 69%; top: 59%; }
  .svara-pot { top: 33%; min-width: calc(250 * var(--u)); }
  .svara-pot-title { font-size: calc(34 * var(--u)); } .svara-pot-num { font-size: calc(72 * var(--u)); } .svara-pot-sub { font-size: calc(28 * var(--u)); }
  .svara-logo { top: 49%; font-size: calc(130 * var(--u)); }
  .svara-hand { top: 72%; --hw: max(48px, calc(130 * var(--u))); }
  .svara-plate { width: max(84px, calc(200 * var(--u))); }
  .svara-banner { font-size: calc(54 * var(--u)); } .svara-banner.tie { font-size: calc(100 * var(--u)); }
  .svara-round { width: max(34px, calc(90 * var(--u))); height: max(34px, calc(90 * var(--u))); }
}
@media (prefers-reduced-motion: reduce) {
  .svara-card.deal, .svara-card.flip, .svara-pot.pop, .svara-bet.pop, .svara-banner, .svara-stage.shake, .svara-seat.won .svara-avatar::after { animation: none; }
}

.cs-side-buttons .buy-bonus {
  border-color: #e0a526;
  background: linear-gradient(180deg, #5b3a8c, #34205a);
  color: #ffe58a;
  font-weight: 700;
}

.cs-side-buttons .buy-bonus.confirm {
  background: linear-gradient(180deg, #2f9e44, #1d6b2d);
  color: #fff;
}

.egt-tools .buy-bonus {
  border-color: #e0a526;
  background: linear-gradient(180deg, #5b3a8c, #34205a);
  color: #ffe58a;
  font-weight: 700;
}

.egt-tools .buy-bonus.confirm {
  background: linear-gradient(180deg, #2f9e44, #1d6b2d);
  color: #fff;
}

.buy-bonus[hidden] {
  display: none;
}

.egt-free-badge {
  margin: 6px 0 0;
  padding: 7px 10px;
  border: 1px solid #e0a526;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(91, 58, 140, 0.9), rgba(36, 14, 60, 0.95));
  color: #ffe58a;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-align: center;
  text-shadow: 0 0 8px rgba(255, 210, 90, 0.7);
}

.egt-free-badge[hidden] {
  display: none;
}

/* Брояч на безплатните завъртания: „отскача“ при всяка промяна. */
.egt-free-badge.pop {
  animation: egt-free-pop 0.45s ease-out;
}

@keyframes egt-free-pop {
  0% { transform: scale(1.18); box-shadow: 0 0 18px rgba(255, 210, 90, 0.9); }
  60% { transform: scale(0.97); }
  100% { transform: scale(1); box-shadow: none; }
}

@media (prefers-reduced-motion: reduce) {
  .egt-free-badge.pop { animation: none; }
}

/* Бутон СТАРТ: докато чака, дишa със светлина, а стрелките бавно се въртят. */
.egt-spin:not(.busy) {
  animation: egt-spin-ready 2.4s ease-in-out infinite;
}

.egt-spin:not(.busy) svg {
  animation: egt-spin-idle 14s linear infinite;
}

@keyframes egt-spin-ready {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.28); }
}

@keyframes egt-spin-idle {
  to { transform: rotate(360deg); }
}

/* Джакпот сумите: леко „дишане“, всяко ниво със свое закъснение, за да не мигат заедно. */
.egt-jp-box strong {
  animation: egt-jp-breathe 3.6s ease-in-out infinite;
}

.egt-jp-box.jp-box-major strong { animation-delay: -0.9s; }
.egt-jp-box.jp-box-minor strong { animation-delay: -1.8s; }
.egt-jp-box.jp-box-mini strong { animation-delay: -2.7s; }

@keyframes egt-jp-breathe {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.22); }
}

@media (prefers-reduced-motion: reduce) {
  .egt-spin:not(.busy),
  .egt-spin:not(.busy) svg,
  .egt-jp-box strong { animation: none; }
}

@media (max-width: 560px) {
  /* „Купи бонус“ е винаги на виждане: цял ред над Авто / Турбо / Звук / Още. */
  .egt-tools .buy-bonus {
    order: 0;
    grid-column: 1 / -1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    font-size: 15px;
  }

  .egt-free-badge {
    font-size: 12px;
  }
}

/* ───────── Sweet Ivka: долният панел в стила на „Захарна община“ (лилаво, розово, кремаво, злато) ───────── */
.sweetivka .cs-controls {
  position: relative;
  gap: 14px;
  padding: 16px 14px 14px;
  border: 2px solid #e9c46a;
  border-radius: 20px;
  background:
    radial-gradient(120% 90% at 50% -20%, rgba(255, 190, 240, 0.28) 0%, rgba(255, 190, 240, 0) 60%),
    linear-gradient(180deg, #4a2189 0%, #2c1259 55%, #1f0c42 100%);
  box-shadow:
    inset 0 0 0 2px rgba(255, 244, 214, 0.12),
    inset 0 -10px 24px rgba(20, 5, 50, 0.5),
    0 0 22px rgba(176, 108, 255, 0.35);
}

.sweetivka .cs-bet-label {
  color: #ffe9a8;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-shadow: 0 1px 0 #2a0f55;
}

.sweetivka .cs-bet-row {
  gap: 8px;
  padding: 5px;
  border: 1.5px solid rgba(233, 196, 106, 0.7);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(20, 6, 48, 0.75), rgba(54, 24, 100, 0.55));
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.45);
}

.sweetivka .cs-bet-row .mini {
  width: 40px;
  height: 40px;
  border: 2px solid #ffe29a;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, #ffd1ef 0%, #f0609f 55%, #b02a73 100%);
  box-shadow: 0 3px 0 #6c1745, inset 0 1px 0 rgba(255, 255, 255, 0.55);
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(60, 10, 40, 0.7);
  transition: transform 0.08s, box-shadow 0.08s;
}

.sweetivka .cs-bet-row .mini:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #6c1745, inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.sweetivka .cs-stake-value {
  min-width: 86px;
  color: #fff3c4;
  font-size: 19px;
  text-shadow: 0 2px 0 #4b1f80, 0 0 10px rgba(255, 214, 120, 0.45);
}

/* Големият бутон: златен пръстен, розово-лилава „бонбонена“ повърхност с отблясък и ясно центрирана стрелка. */
.sweetivka .cs-spin {
  position: relative;
  width: 124px;
  height: 124px;
  overflow: hidden;
  border: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, transparent 0 62%, rgba(0, 0, 0, 0) 62%),
    radial-gradient(circle at 34% 24%, #ffc2ee 0%, #ee5fb0 34%, #9a35d6 72%, #5a1fa8 100%);
  box-shadow:
    0 0 0 4px #ffe08a,
    0 0 0 7px #b8801f,
    0 0 0 9px #fff0b8,
    0 8px 0 9px #4a1f08,
    0 0 30px rgba(255, 120, 220, 0.6);
  transition: transform 0.1s, box-shadow 0.1s;
}

.sweetivka .cs-spin::before {
  content: '';
  position: absolute;
  top: 6%;
  left: 14%;
  width: 72%;
  height: 40%;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.sweetivka .cs-spin:hover:not(:disabled) {
  transform: translateY(-2px) scale(1.02);
}

.sweetivka .cs-spin:active {
  transform: translateY(4px);
  box-shadow:
    0 0 0 4px #ffe08a,
    0 0 0 7px #b8801f,
    0 0 0 9px #fff0b8,
    0 3px 0 9px #4a1f08,
    0 0 20px rgba(255, 120, 220, 0.6);
}

.sweetivka .cs-spin.free {
  background:
    radial-gradient(circle at 34% 24%, #fff0b0 0%, #ffbe3c 38%, #e0701a 74%, #a43c06 100%);
  box-shadow:
    0 0 0 4px #fff0b8,
    0 0 0 7px #b8801f,
    0 0 0 9px #ffe08a,
    0 8px 0 9px #4a1f08,
    0 0 32px rgba(255, 180, 60, 0.8);
}

.sweetivka .cs-spin-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-top: 2px;
  line-height: 0;
  filter: drop-shadow(0 2px 3px rgba(60, 10, 70, 0.55));
}

.sweetivka .cs-spin-icon svg {
  display: block;
  width: 100%;
  height: 100%;
  transform-origin: 50% 50%;
}

.sweetivka .cs-spin.busy .cs-spin-icon {
  animation: none;
}

.sweetivka .cs-spin.busy .cs-spin-icon svg {
  animation: cs-turn 0.8s linear infinite;
}

.sweetivka .cs-spin-text {
  position: relative;
  margin-top: -2px;
  color: #fff8e0;
  max-width: 82%;
  font-size: 12px;
  line-height: 1.05;
  letter-spacing: 0.06em;
  text-align: center;
  text-shadow: 0 1px 0 #5a1a80, 0 2px 4px rgba(50, 5, 70, 0.7);
}

/* Малките бутони: кремави бонбони със златен ръб. */
.sweetivka .cs-side-buttons {
  gap: 8px;
}

.sweetivka .cs-side-buttons .mini,
.sweetivka .cs-auto {
  min-height: 40px;
  padding: 0 14px;
  border: 1.5px solid #e9c46a;
  border-radius: 999px;
  background: linear-gradient(180deg, #6a35b8 0%, #43207f 100%);
  box-shadow: 0 3px 0 #1d0a40, inset 0 1px 0 rgba(255, 255, 255, 0.28);
  color: #fff3d0;
  font-size: 13px;
  font-weight: 800;
  transition: transform 0.08s, box-shadow 0.08s, filter 0.08s;
}

.sweetivka .cs-side-buttons .mini:hover:not(:disabled) {
  filter: brightness(1.12);
}

.sweetivka .cs-side-buttons .mini:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #1d0a40, inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.sweetivka .cs-side-buttons .mini.active,
.sweetivka .cs-side-buttons .mini.toggle.active {
  border-color: #fff0b8;
  background: linear-gradient(180deg, #ffd978 0%, #e9a52e 100%);
  color: #4a1f08;
  box-shadow: 0 3px 0 #7a4a08, 0 0 14px rgba(255, 210, 100, 0.6);
}

@media (max-width: 520px) {
  .sweetivka .cs-spin {
    width: 108px;
    height: 108px;
  }

  .sweetivka .cs-spin-icon {
    width: 44px;
    height: 44px;
  }

  .sweetivka .cs-spin-text {
    font-size: 10.5px;
    letter-spacing: 0.03em;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sweetivka .cs-spin.busy .cs-spin-icon svg {
    animation-duration: 2s;
  }
}

/* ───────── Банди (Activity „Банди“) ───────── */
.gg { display: grid; gap: 14px; }
.gg-status { color: var(--muted); padding: 18px; text-align: center; }
.gg-content { display: grid; gap: 14px; }
.gg-stack { display: grid; gap: 12px; }
.gg-banner { background-color: #10151f; background-size: cover; background-position: center; border: 1px solid rgba(255, 221, 130, 0.35); border-radius: var(--radius); padding: 18px 18px 14px; min-height: 120px; display: grid; align-content: space-between; gap: 10px; }
.gg-title { text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8); }
.gg-name { font-size: 26px; font-weight: 700; color: var(--gold); letter-spacing: 0.4px; }
.gg-sub { color: rgba(238, 241, 248, 0.85); font-size: 14px; }
.gg-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.gg-chip { background: rgba(8, 11, 18, 0.78); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: 13px; }
.gg-chip.gold { color: var(--gold); border-color: rgba(255, 221, 130, 0.5); font-weight: 600; }
.gg-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.gg-tab { background: var(--panel); color: var(--muted); border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; font: inherit; cursor: pointer; transition: transform 0.12s ease, background 0.15s ease; }
.gg-tab:hover { background: var(--panel-2); color: var(--text); }
.gg-tab:active { transform: scale(0.97); }
.gg-tab.active { background: linear-gradient(180deg, #e9c25f, #b8902c); color: #1a1405; border-color: #e9c25f; font-weight: 600; }
.gg-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.gg-wide { grid-column: 1 / -1; }
.gg-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.gg-card h3 { margin: 0 0 8px; font-size: 17px; }
.gg-hq { display: flex; gap: 12px; align-items: center; }
.gg-hq-img { width: 140px; height: 140px; object-fit: contain; flex: none; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.5)); animation: gg-breathe 4s ease-in-out infinite; }
.gg-hq-text p { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.gg-big { font-size: 30px; font-weight: 700; color: var(--gold); margin: 2px 0 6px; }
.gg-muted { color: var(--muted); font-size: 13px; line-height: 1.5; }
.gg-note { background: var(--panel); border: 1px dashed var(--line); border-radius: 10px; padding: 10px 14px; color: var(--muted); }
.gg-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.gg-input { background: #0e1422; color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; font: inherit; min-width: 0; flex: 1 1 140px; }
.gg-input.short { flex: 0 0 90px; }
.gg-input:focus-visible, .gg-select:focus-visible, .gg-btn:focus-visible, .gg-tab:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.gg-select { background: #0e1422; color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 7px 8px; font: inherit; }
.gg-btn { border-radius: 10px; padding: 8px 14px; font: inherit; cursor: pointer; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); transition: transform 0.12s ease, filter 0.15s ease; }
.gg-btn:hover:not(:disabled) { filter: brightness(1.15); }
.gg-btn:active:not(:disabled) { transform: scale(0.97); }
.gg-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.gg-btn.gold { background: linear-gradient(180deg, #e9c25f, #b8902c); color: #1a1405; border-color: #e9c25f; font-weight: 600; }
.gg-btn.danger { background: #3a1a1e; border-color: rgba(229, 72, 77, 0.55); color: #ffb3b6; }
.gg-member { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.gg-member:first-of-type { border-top: 0; }
.gg-member-text { flex: 1 1 160px; min-width: 0; }
.gg-member-name { font-weight: 600; overflow-wrap: anywhere; }
.gg-rank { display: inline-flex; flex: none; object-fit: contain; }
.gg-pips { display: inline-flex; gap: 4px; }
.gg-pips i { width: 18px; height: 7px; border-radius: 3px; background: #2a3248; }
.gg-pips i.on { background: var(--gold); box-shadow: 0 0 6px rgba(255, 221, 130, 0.5); }
.gg-upgrade { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.gg-upgrade img { flex: none; object-fit: contain; }
.gg-upgrade-text { flex: 1 1 200px; min-width: 0; }
.gg-upgrade-text h3 { margin-bottom: 6px; }
.gg-items { display: grid; gap: 8px; }
.gg-item { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.gg-item img { object-fit: contain; }
.gg-item-name { font-weight: 600; min-width: 90px; }
.gg-item-qty { color: var(--muted); font-size: 13px; flex: 1 1 120px; }
.gg-task-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.gg-tier { border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 600; }
.gg-tier.t1 { background: rgba(46, 158, 79, 0.25); color: #8be0a4; }
.gg-tier.t2 { background: rgba(239, 159, 39, 0.25); color: #f4c36b; }
.gg-tier.t3 { background: rgba(229, 72, 77, 0.25); color: #ff9ca0; }
.gg-task-label { flex: 1 1 160px; font-weight: 600; }
.gg-task-count { color: var(--gold); font-variant-numeric: tabular-nums; }
.gg-bar { height: 10px; background: #232b40; border-radius: 6px; overflow: hidden; margin-bottom: 8px; }
.gg-bar-fill { height: 100%; background: linear-gradient(90deg, #b8902c, #ffdd82); border-radius: 6px; transition: width 0.6s ease; }
.gg-bar-fill.done { background: linear-gradient(90deg, #2e9e4f, #8be0a4); }
.gg-line { padding: 6px 0; border-top: 1px solid var(--line); display: flex; gap: 10px; font-size: 14px; }
.gg-line:first-of-type { border-top: 0; }
.gg-when { color: var(--muted); font-size: 12px; min-width: 78px; flex: none; }
.gg-apply { margin: 0 0 8px; }
@keyframes gg-breathe { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
/* Горна навигация: Владение / Карта / Банда */
.gg-sections { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.gg-section { background: var(--panel); color: var(--muted); border: 1px solid var(--line); border-radius: 12px; padding: 12px 8px; font: inherit; font-size: 16px; cursor: pointer; transition: transform 0.12s ease, background 0.15s ease; }
.gg-section:hover { background: var(--panel-2); color: var(--text); }
.gg-section:active { transform: scale(0.97); }
.gg-section.active { background: linear-gradient(180deg, #e9c25f, #b8902c); color: #1a1405; border-color: #e9c25f; font-weight: 700; }
.gg-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gg-btn.big { padding: 18px 12px; font-size: 17px; }
.gg-rank-no { color: var(--gold); font-weight: 700; min-width: 34px; }
.gg-item-emoji { font-size: 30px; width: 44px; text-align: center; flex: none; }
.gg-item-text { flex: 1; min-width: 140px; }
/* Владение: карта на България */
.gg-map { width: 100%; height: auto; display: block; }
.gg-map-land { fill: #182033; stroke: #3d4a68; stroke-width: 2; stroke-linejoin: round; }
.gg-pin { fill: #e9c25f; stroke: #fff3c4; stroke-width: 2; }
.gg-pin.soon { fill: #3d4a68; stroke: #5a6a8f; stroke-width: 1; }
.gg-pin-wrap { cursor: pointer; outline: none; }
.gg-pin-wrap .gg-pin { transition: transform 0.15s ease; transform-box: fill-box; transform-origin: center; }
.gg-pin-wrap:hover .gg-pin, .gg-pin-wrap:focus .gg-pin, .gg-pin-wrap.on .gg-pin { transform: scale(1.3); fill: #ffdd82; }
.gg-pin-wrap.on .gg-pin { animation: gg-pulse 1.6s ease-in-out infinite; }
.gg-pin-wrap.mine .gg-pin { fill: #f2c94c; stroke: #fff3c4; }
.gg-pin-wrap.taken .gg-pin { fill: #c0504d; stroke: #ffd2cf; }
.gg-pin-wrap.free .gg-pin { fill: #cfd6e6; stroke: #ffffff; }
.gg-pin-wrap.siege .gg-pin { animation: gg-pulse 0.9s ease-in-out infinite; stroke: #ff6a3d; stroke-width: 3; }
.gg-legend { margin-top: 8px; font-size: 13px; color: #9aa3b8; }
.gg-siege { margin: 10px 0 4px; padding: 10px 12px; border-radius: 10px; background: #2a1d24; border: 1px solid #7a3a3a; display: grid; gap: 6px; }
.gg-siege-head { font-weight: 700; color: #ffb4a8; }
.gg-pin-label { fill: #e8e6df; font-size: 15px; font-weight: 600; paint-order: stroke; stroke: #0b0f18; stroke-width: 3px; pointer-events: none; }
@keyframes gg-pulse { 0%, 100% { stroke-opacity: 1; } 50% { stroke-opacity: 0.3; } }
@media (max-width: 520px) { .gg-section { font-size: 14px; padding: 10px 4px; } .gg-choices { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .gg-pin-wrap.on .gg-pin { animation: none; } }
/* Улица: противници и резултат от нападение */
.gg-bar-fill.good { background: linear-gradient(90deg, #2e9e4f, #8be0a4); }
.gg-bar-fill.mid { background: linear-gradient(90deg, #b8902c, #ffdd82); }
.gg-bar-fill.bad { background: linear-gradient(90deg, #a83232, #ff8a8a); }
.gg-npc { display: flex; gap: 12px; align-items: center; animation: gg-rise 0.35s ease both; }
.gg-npc.boss { border-color: var(--gold); box-shadow: 0 0 0 1px rgba(255, 221, 130, 0.25) inset; }
.gg-npc-face { font-size: 38px; width: 56px; height: 56px; display: grid; place-items: center; flex: none; background: #1a2133; border-radius: 12px; animation: gg-breathe 3.5s ease-in-out infinite; }
.gg-npc-text { flex: 1; min-width: 0; }
.gg-npc-text .gg-bar { margin: 6px 0; }
.gg-npc-name { font-weight: 700; }
.gg-street-head p { margin: 8px 0 0; }
.gg-result { position: sticky; top: 8px; z-index: 5; margin-bottom: 12px; padding: 18px; border-radius: 14px; text-align: center; border: 2px solid var(--line); background: #10151f; cursor: pointer; animation: gg-pop 0.4s cubic-bezier(0.2, 1.4, 0.4, 1) both; }
.gg-result-title { font-size: 34px; font-weight: 900; letter-spacing: 1px; }
.gg-result-line { margin-top: 4px; font-size: 15px; }
.gg-result.win { border-color: #2e9e4f; } .gg-result.win .gg-result-title { color: #8be0a4; }
.gg-result.lose { border-color: #a83232; animation: gg-pop 0.4s both, gg-shake 0.5s 0.1s both; } .gg-result.lose .gg-result-title { color: #ff8a8a; }
.gg-result.busted { border-color: #3b6bd6; animation: gg-pop 0.4s both, gg-shake 0.6s 0.1s both; } .gg-result.busted .gg-result-title { color: #8fb3ff; }
@keyframes gg-pop { 0% { transform: scale(0.6); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes gg-rise { 0% { transform: translateY(10px); opacity: 0; } 100% { transform: translateY(0); opacity: 1; } }
@keyframes gg-shake { 0%, 100% { translate: 0; } 20% { translate: -8px; } 40% { translate: 8px; } 60% { translate: -5px; } 80% { translate: 5px; } }
@media (prefers-reduced-motion: reduce) { .gg-npc, .gg-npc-face, .gg-result { animation: none; } }
@media (max-width: 640px) {
  .gg-grid { grid-template-columns: minmax(0, 1fr); }
  .gg-hq { flex-direction: column; text-align: center; }
  .gg-name { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .gg-hq-img { animation: none; }
  .gg-bar-fill, .gg-btn, .gg-tab { transition: none; }
}

/* Владение: областите върху картината */
.gg-oblast { fill: rgba(220, 226, 240, 0.08); stroke: rgba(255, 236, 180, 0.55); stroke-width: 1.6; stroke-linejoin: round; cursor: pointer; outline: none; transition: fill 0.2s ease; }
.gg-oblast:hover, .gg-oblast:focus { fill: rgba(255, 236, 180, 0.22); }
.gg-oblast.free { fill: rgba(220, 226, 240, 0.1); }
.gg-oblast.mine { fill: rgba(242, 201, 76, 0.42); }
.gg-oblast.taken { fill: rgba(200, 70, 64, 0.42); }
.gg-oblast.on { stroke: #fff3c4; stroke-width: 5; filter: drop-shadow(0 0 8px rgba(255, 220, 130, 0.9)); }
.gg-oblast.siege { animation: gg-siege-pulse 1s ease-in-out infinite; stroke: #ff7a4d; }
.gg-oblast.soon { fill: rgba(0, 0, 0, 0.45); stroke: rgba(255, 236, 180, 0.2); stroke-width: 1; cursor: default; pointer-events: auto; }
.gg-oblast-label { fill: #fff6df; font-size: 34px; font-weight: 700; paint-order: stroke; stroke: #0b0f18; stroke-width: 7px; pointer-events: none; }
.gg-seal { float: right; width: 72px; height: 72px; margin: -4px 0 6px 10px; border-radius: 12px; }
@keyframes gg-siege-pulse { 0%, 100% { fill-opacity: 0.55; } 50% { fill-opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .gg-oblast.siege { animation: none; } }

/* Банди: картинки от ChatGPT */
.gg-street-head { background: linear-gradient(rgba(11, 15, 24, 0.72), rgba(11, 15, 24, 0.92)), url('gangs/street/street-bg.webp') center / cover; }
.gg-npc-face.photo { background: radial-gradient(circle at 50% 35%, #2a3350, #11172a); overflow: hidden; }
.gg-npc-face.photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; animation: none; }
.gg-chip-icon { width: 16px; height: 16px; vertical-align: -3px; margin-right: 4px; }
.gg-item-img { width: 44px; height: 44px; flex: none; object-fit: contain; }
.gg-seal.garrison { width: 96px; height: 96px; border-radius: 14px; box-shadow: 0 0 0 2px rgba(233, 194, 95, 0.5); }
.gg-siege { background: linear-gradient(rgba(30, 14, 18, 0.82), rgba(20, 10, 14, 0.94)), url('gangs/siege/siege-bg.webp') center / cover; }
.gg-siege-banner { width: 100%; max-width: 300px; height: auto; justify-self: center; }
.gg-siege-head { display: flex; align-items: center; gap: 6px; }
.gg-siege-head img { width: 24px; height: 24px; }
.gg-section { background: url('gangs/ui/tab-off.webp') center / 100% 100% no-repeat; border: 0; }
.gg-section:hover { background: url('gangs/ui/tab-off.webp') center / 100% 100% no-repeat; filter: brightness(1.2); }
.gg-section.active { background: url('gangs/ui/tab-on.webp') center / 100% 100% no-repeat; color: #fff3c4; text-shadow: 0 1px 2px #000; }
/* ---------- Любимец (Тамагочи) ---------- */
.pt { position: relative; display: grid; gap: 14px; max-width: 560px; margin: 0 auto; }
.pt-status { color: var(--muted); padding: 18px; text-align: center; }
.pt-content { display: grid; gap: 14px; }
.pt-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: grid; gap: 12px; }
.pt-card h3, .pt-modal-card h3 { margin: 0; }
.pt-muted { color: var(--muted); }
.pt-muted.small, .small { font-size: 0.82rem; }
.pt-label { font-size: 0.85rem; color: var(--muted); margin-top: 2px; }
.pt-input { width: 100%; background: var(--panel-2); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; font-size: 1rem; }
.pt-btn { appearance: none; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); border-radius: 11px; padding: 10px 12px; font-size: 0.95rem; font-weight: 600; cursor: pointer; min-height: 44px; }
.pt-btn.gold { background: linear-gradient(#ffdd82, #e8b84a); color: #3a2a05; border-color: #ffdd82; }
.pt-btn.green { background: #2e9e4f; border-color: #2e9e4f; }
.pt-btn.danger { background: #5a2226; border-color: #8a3036; }
.pt-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.pt-species { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.pt-species-card { display: grid; justify-items: center; gap: 4px; background: var(--panel-2); border: 2px solid transparent; border-radius: 12px; padding: 8px 4px; color: var(--text); cursor: pointer; font-size: 0.85rem; }
.pt-species-card.on { border-color: var(--gold); background: #2a2f45; }
.pt-genders { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pt-gender { background: var(--panel-2); border: 2px solid transparent; border-radius: 12px; padding: 12px; font-size: 1rem; color: var(--text); cursor: pointer; font-weight: 700; }
.pt-gender.on.m { border-color: #5aa9ff; background: #1c3050; }
.pt-gender.on.f { border-color: #ff7eb6; background: #4a2038; }
.pt-img { display: inline-flex; align-items: center; justify-content: center; }
.pt-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.pt-emoji { line-height: 1; }
.pt-emoji.big { font-size: 2.4rem; }
.pt-egg { justify-items: center; text-align: center; }
.pt-egg-img { animation: pt-wobble 2.4s ease-in-out infinite; }
.pt-dead { justify-items: center; text-align: center; }
.pt-head { display: grid; gap: 2px; }
.pt-name { display: flex; align-items: center; gap: 6px; font-size: 1.2rem; }
.pt-gender-badge { font-weight: 800; }
.pt-gender-badge.m { color: #5aa9ff; }
.pt-gender-badge.f { color: #ff7eb6; }
.pt-mood { color: var(--muted); }
.pt-stage { position: relative; width: 100%; height: clamp(240px, 70vw, 340px); background-size: cover; background-position: center; border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; display: grid; place-items: end center; transition: filter 0.6s; }
.pt-stage.sleeping { filter: brightness(0.5) saturate(0.8); }
.pt-stage.ill { box-shadow: inset 0 0 40px rgba(229, 72, 77, 0.35); }
.pt-sprite { position: relative; width: 240px; height: 240px; max-width: 70%; cursor: pointer; margin-bottom: 6px; user-select: none; -webkit-user-select: none; }
.pt-art { width: 100%; height: 100%; }
.pt-art.idle { background-size: 400% 100%; background-repeat: no-repeat; animation: pt-idle 1.6s steps(1) infinite; }
.pt-sprite { z-index: 2; }
.pt-sprite.scene-toilet { animation: pt-toilet 5.2s linear 1 forwards; }
.pt-sprite.scene-bath { animation: pt-bath 3.6s ease-in-out 1 forwards; transform-origin: 50% 100%; }
.pt-sprite.scene-bath .pt-wear { display: none; }
.pt-sprite.scene-brush { animation: none; }
.pt-prop, .pt-fx.loop.pt-prop { position: absolute; pointer-events: none; z-index: 3; }
.pt-prop.toilet { right: 6%; bottom: 8%; z-index: 1; }
.pt-prop.tub-front { left: 50%; bottom: -3%; transform: translateX(-50%); z-index: 3; }
.pt-prop.brush { left: 56%; top: 38%; animation: pt-brush-move 0.5s ease-in-out infinite; }
.pt-poop { position: absolute; bottom: 4%; z-index: 2; background: none; border: 0; padding: 0; cursor: pointer; }
.pt-thought { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); z-index: 4; display: flex; align-items: center; gap: 6px; background: rgba(255, 255, 255, 0.92); color: #3a2a05; border: 2px solid #3a2a05; border-radius: 18px; padding: 4px 12px 4px 8px; font-weight: 800; cursor: pointer; animation: pt-bob 1.4s ease-in-out infinite; }
.pt-stage.hatch { animation: pt-flash 1.2s ease-out 1; }
.pt-stage.tub { overflow: hidden; }
.pt-sprite .pt-img { width: 100% !important; height: 100% !important; }
.pt-fx { position: absolute; display: block; background-size: 400% 100%; background-repeat: no-repeat; pointer-events: none; animation: pt-idle 0.8s steps(1) 1 forwards; }
.pt-fx-layer { position: fixed; inset: 0; pointer-events: none; z-index: 60; }
.pt-fx.loop { position: relative; animation-iteration-count: infinite; animation-duration: 1.2s; }
.pt-card-flip .back { position: absolute; inset: 0; display: block; }
.pt-cardback { width: 100% !important; height: 100% !important; border-radius: 11px; overflow: hidden; }
.pt-cardback img { width: 100%; height: 100%; object-fit: cover; }
.pt-alert { display: flex; align-items: center; gap: 10px; }
.pt-zzz { position: absolute !important; top: 14%; right: 22%; }
.pt-boarding { position: absolute; left: 0; right: 0; top: 10px; text-align: center; background: rgba(0, 0, 0, 0.55); padding: 6px; font-weight: 700; }
.pt-levels { display: grid; gap: 6px; }
.pt-meter { display: grid; grid-template-columns: 150px 1fr; align-items: center; gap: 8px; font-size: 0.85rem; }
.pt-track { height: 10px; background: rgba(255, 255, 255, 0.1); border-radius: 6px; overflow: hidden; }
.pt-track i { display: block; height: 100%; background: linear-gradient(90deg, #2e9e4f, #6ad07f); border-radius: 6px; transition: width 0.4s; }
.pt-meter.xp .pt-track i { background: linear-gradient(90deg, #3a6ea5, #6aa9ff); }
.pt-meter.bond .pt-track i { background: linear-gradient(90deg, #d64a7b, #ff8fb4); }
.pt-needs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; }
.pt-need { display: grid; grid-template-columns: 30px 1fr 34px; align-items: center; gap: 8px; }
.pt-need b { text-align: right; font-size: 0.85rem; }
.pt-need-emoji { font-size: 1.4rem; text-align: center; }
.pt-need.low .pt-track i { background: linear-gradient(90deg, #e5484d, #ff8a8d); }
.pt-alert { padding: 10px 12px; border-radius: 10px; font-weight: 600; }
.pt-alert.warn { background: #4a3a14; border: 1px solid #c79a2f; }
.pt-alert.bad { background: #4a1a1d; border: 1px solid #e5484d; animation: pt-pulse 1.2s ease-in-out infinite; }
.pt-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pt-actions .pt-btn { display: grid; justify-items: center; gap: 2px; padding: 8px 4px; font-size: 0.8rem; }
.pt-act-icon { font-size: 1.4rem; }
.pt-today { text-align: center; }
.pt-modal { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.7); display: grid; place-items: center; z-index: 50; padding: 12px; overflow-y: auto; }
.pt-modal[hidden] { display: none; }
.pt-modal-card { width: min(520px, 100%); max-height: 92vh; overflow-y: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 14px; display: grid; gap: 10px; align-content: start; }
.pt-modal-card.wide { width: min(380px, 100%); }
.pt-modal-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pt-close { min-height: 36px; padding: 4px 12px; }
.pt-item { display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 10px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; }
.pt-item.good { border-color: #4a8f5a; }
.pt-item.rare { border-color: #5a7fd6; }
.pt-item.epic { border-color: #c279e6; }
.pt-item-info { display: grid; gap: 2px; }
.pt-item-actions { display: flex; gap: 6px; }
.pt-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.pt-tab { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; color: var(--text); padding: 9px 4px; cursor: pointer; font-weight: 600; }
.pt-tab.on { background: #2a2f45; border-color: var(--gold); }
.pt-quest { display: grid; grid-template-columns: 1fr 70px 40px; align-items: center; gap: 8px; }
.pt-quest.done { opacity: 0.7; }
.pt-big { font-size: 1.6rem; font-weight: 800; margin: 0; }
.pt-hud { text-align: center; font-weight: 700; padding: 6px 0; }
.pt-canvas { width: 100%; border-radius: 12px; touch-action: none; background: #16223a; display: block; }
.pt-memory { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.pt-card-flip { position: relative; aspect-ratio: 1; background: #2a3a5e; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; padding: 0; font-size: 1.6rem; color: var(--text); }
.pt-card-flip .front { display: none; position: absolute; inset: 0; align-items: center; justify-content: center; }
.pt-card-flip.flipped { background: #f3ecd8; }
.pt-card-flip.flipped .back { display: none; }
.pt-card-flip.flipped .front { display: flex; }
.pt-card-flip.done { opacity: 0.55; }
@keyframes pt-idle { 0% { background-position: 0% 0; } 25% { background-position: 33.333% 0; } 50% { background-position: 66.667% 0; } 75% { background-position: 100% 0; } 100% { background-position: 0% 0; } }
@keyframes pt-float { from { transform: translateY(0); opacity: 1; } to { transform: translateY(-60px); opacity: 0; } }
@keyframes pt-wobble { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
@keyframes pt-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }
@media (min-width: 560px) { .pt-actions { grid-template-columns: repeat(4, 1fr); } }

@keyframes pt-toilet { 0% { transform: translateX(0); } 22% { transform: translateX(100px); } 30% { transform: translateX(100px) scaleY(0.92); } 75% { transform: translateX(100px) scaleY(0.92); } 82% { transform: translateX(100px); } 100% { transform: translateX(0); } }
@keyframes pt-bath { 0% { transform: translateY(0) scale(1); } 18% { transform: translateY(10px) scale(0.64); } 50% { transform: translateY(6px) scale(0.64) rotate(2deg); } 82% { transform: translateY(10px) scale(0.64); } 100% { transform: translateY(0) scale(1); } }
@keyframes pt-brush { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(2deg); } }
@keyframes pt-brush-move { 0%, 100% { transform: translateX(0) rotate(-12deg); } 50% { transform: translateX(14px) rotate(-12deg); } }
@keyframes pt-bob { 0%, 100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(-5px); } }
@keyframes pt-flash { 0% { box-shadow: inset 0 0 0 999px rgba(255, 255, 255, 0.95); } 100% { box-shadow: inset 0 0 0 999px rgba(255, 255, 255, 0); } }

.pt-sprite { position: relative; }
.pt-inner { position: relative; width: 100%; height: 100%; }
.pt-inner .pt-art { position: relative; z-index: 1; }
.pt-inner.dressed { animation: pt-sway 2.6s ease-in-out infinite; transform-origin: 50% 100%; }
.pt-wear { position: absolute; z-index: 2; pointer-events: none; max-width: none; user-select: none; }
.pt-wear.back { z-index: 0; }
/* Облеченият любимец е по-малък (0.86): шапките и кронките се нуждаят от място над главата. */
@keyframes pt-sway { 0%, 100% { transform: scale(0.86) rotate(-1.2deg) translateY(0); } 50% { transform: scale(0.86) rotate(1.2deg) translateY(-3px); } }

.pt-brush-tool { position: absolute; z-index: 4; width: 64px; height: 64px; margin: -52px 0 0 -8px; pointer-events: none; transform-origin: 90% 90%; animation: pt-brush-scrub 0.45s ease-in-out infinite; }
.pt-fx.loop.pt-brush-foam { position: absolute; z-index: 4; margin: -28px 0 0 -28px; pointer-events: none; }
@keyframes pt-brush-scrub { 0%, 100% { transform: translateX(-9px) rotate(-18deg); } 50% { transform: translateX(9px) rotate(-18deg); } }

.pt-flip { width: 100%; height: 100%; }

/* ---------- Сцена с фиксирана пропорция 16:9: всичко е в % от кадъра, затова изглежда еднакво на телефон и на широк екран ---------- */
.pt-stage { aspect-ratio: 16 / 9; height: auto; min-height: 0; max-height: none; width: 100%; display: block; }
.pt-stage .pt-sprite { position: absolute; left: 50%; bottom: 2%; width: 46%; height: auto; max-width: none; aspect-ratio: 1; margin: 0; transform: translateX(-50%); transform-origin: 50% 100%; }
.pt-stage .pt-sprite .pt-img { width: 100% !important; height: 100% !important; }
.pt-stage .pt-sprite .pt-img img { width: 100%; height: 100%; }
.pt-stage .pt-poop { bottom: 3%; width: 9%; }
.pt-stage .pt-poop .pt-img { width: 100% !important; height: auto !important; }
.pt-stage .pt-poop img { width: 100%; height: auto; }
.pt-stage .pt-tub { position: absolute; left: 50%; bottom: 3%; width: 62%; transform: translateX(-50%); z-index: 5; pointer-events: none; }
.pt-stage .pt-toilet { position: absolute; right: 5%; bottom: 5%; width: 24%; z-index: 1; pointer-events: none; }
.pt-stage .pt-fx.loop.pt-prop { width: 15%; height: auto; aspect-ratio: 1; }
.pt-stage .pt-thought { top: 4%; }
.pt-stage .pt-boarding { top: 4%; }
.pt-stage .pt-zzz { width: 14%; height: auto; aspect-ratio: 1; top: 8%; right: 24%; }
.pt-stage .pt-sprite.scene-bath { animation: pt-bath 3.6s ease-in-out 1 forwards; }
@keyframes pt-bath {
  0% { transform: translateX(-50%) translateY(0) scale(1); }
  18% { transform: translateX(-50%) translateY(-27%) scale(0.64); }
  50% { transform: translateX(-50%) translateY(-28%) scale(0.64) rotate(2deg); }
  82% { transform: translateX(-50%) translateY(-27%) scale(0.64); }
  100% { transform: translateX(-50%) translateY(0) scale(1); }
}
.pt-stage .pt-sprite.scene-toilet { animation: pt-toilet 5.2s ease-in-out 1 forwards; }
@keyframes pt-toilet {
  0% { transform: translateX(-50%); }
  20% { transform: translateX(calc(-50% + 30%)); }
  30% { transform: translateX(calc(-50% + 30%)) scaleY(0.94); }
  75% { transform: translateX(calc(-50% + 30%)) scaleY(0.94); }
  85% { transform: translateX(calc(-50% + 30%)); }
  100% { transform: translateX(-50%); }
}
.pt-stage .pt-sprite.scene-brush { animation: none; }
