/* ---- Variables ---- */
:root {
  --bg-dark: #0d0b14;
  --bg-panel: #16121f;
  --border-gold: #c9a227;
  --gold-light: #e8d48b;
  --accent-red: #c41e3a;
  --neon-cyan: #00f5ff;
  --text: #e8e4ef;
  --text-muted: #8a8499;
  --reel-bg: #0a0810;
  --win-glow: rgba(0, 245, 255, 0.4);
  --reel-height: 240px;
  --symbol-height: 80px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: 'Exo 2', sans-serif;
  background: var(--bg-dark);
  color: var(--text);
  overflow-x: hidden;
  overflow-y: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.75rem;
  box-sizing: border-box;
}

.bg-glow {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(201, 162, 39, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 50% 100%, rgba(196, 30, 58, 0.08) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* Главная рамка: заполняет окно без скролла, история прокручивается внутри */
.slot-cabinet {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: row;
  width: 100%;
  max-width: 960px;
  height: calc(100vh - 1.5rem);
  height: calc(100dvh - 1.5rem);
  min-height: 420px;
  max-height: calc(100vh - 1.5rem);
  max-height: calc(100dvh - 1.5rem);
  background: var(--bg-panel);
  border: 3px solid var(--border-gold);
  border-radius: 20px;
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.5) inset,
    0 0 0 2px rgba(201, 162, 39, 0.15),
    0 0 50px rgba(201, 162, 39, 0.1),
    0 18px 50px rgba(0,0,0,0.5);
  overflow: hidden;
  flex-shrink: 0;
}

.history-container {
  flex-shrink: 0;
  width: 200px;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 2px solid rgba(201, 162, 39, 0.35);
}

.history-sidebar {
  position: relative;
  z-index: 1;
  width: 100%;
  flex: 1;
  min-height: 0;
  background: transparent;
  border: none;
  display: flex;
  flex-direction: column;
  padding: 1rem 0;
  overflow: hidden;
}

.history-title {
  font-family: 'Orbitron', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--gold-light);
  margin: 0 1rem 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.history-list {
  list-style: none;
  margin: 0;
  padding: 0 0.5rem 0 1rem;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(201, 162, 39, 0.5) rgba(0, 0, 0, 0.35);
}

.history-list::-webkit-scrollbar {
  width: 8px;
}

.history-list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.35);
  border-radius: 4px;
  margin: 4px 0;
}

.history-list::-webkit-scrollbar-thumb {
  background: rgba(201, 162, 39, 0.45);
  border-radius: 4px;
}

.history-list::-webkit-scrollbar-thumb:hover {
  background: rgba(201, 162, 39, 0.65);
}

.history-list::-webkit-scrollbar-thumb:active {
  background: var(--gold-light);
}

.history-item {
  padding: 0.4rem 0.5rem;
  margin-bottom: 0.35rem;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 8px;
  border-left: 3px solid rgba(201, 162, 39, 0.4);
  font-size: 0.75rem;
}

.history-item.win {
  border-left-color: var(--neon-cyan);
  background: rgba(0, 245, 255, 0.06);
}

.history-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  margin-bottom: 0.2rem;
  font-size: 1rem;
}

.history-grid span {
  text-align: center;
}

.history-win {
  text-align: center;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.7rem;
  color: var(--neon-cyan);
  font-weight: 600;
}

.history-empty {
  margin: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.4;
}

.history-empty.hidden {
  display: none;
}

.game-area {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  justify-content: center;
  align-items: stretch;
  padding: 0.75rem;
  overflow: hidden;
}

.page {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 640px;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.header {
  flex-shrink: 0;
  text-align: center;
  margin-bottom: 0.75rem;
}

.logo {
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  font-size: 2rem;
  letter-spacing: 0.12em;
  margin: 0;
  color: var(--gold-light);
  text-shadow: 0 0 30px rgba(201, 162, 39, 0.5);
}

.logo span {
  color: var(--accent-red);
  text-shadow: 0 0 20px rgba(196, 30, 58, 0.5);
}

.subtitle {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.machine-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  overflow: auto;
}

.machine {
  flex-shrink: 0;
  background: linear-gradient(180deg, #241c30 0%, var(--bg-panel) 12%, var(--bg-panel) 88%, #120e18 100%);
  border: 2px solid rgba(201, 162, 39, 0.5);
  border-radius: 16px;
  padding: 1rem;
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.4) inset,
    0 0 30px rgba(201, 162, 39, 0.1),
    0 10px 40px rgba(0,0,0,0.5);
}

.machine-top {
  background: linear-gradient(180deg, #0c0a12 0%, var(--reel-bg) 50%, #0c0a12 100%);
  border-radius: 14px;
  padding: 0.65rem;
  margin-bottom: 0.85rem;
  border: 2px solid rgba(201, 162, 39, 0.4);
  box-shadow: inset 0 0 40px rgba(0,0,0,0.6);
  position: relative;
}

.reels-wrap {
  position: relative;
  height: 240px;
  min-height: 240px;
}

.reels-container {
  display: flex;
  gap: 0.35rem;
  justify-content: center;
  height: 240px;
  min-height: 240px;
  position: relative;
  z-index: 1;
}

.lines-overlay {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.lines-overlay .line-path {
  fill: none;
  stroke: rgba(201, 162, 39, 0.25);
  stroke-width: 0.06;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: opacity 0.08s ease-out;
  opacity: 0;
}

/* Скрытые defs для фильтров */
.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

.lines-overlay .line-path.win {
  stroke: rgba(255, 255, 255, 0.95);
  stroke-width: 0.12;
  opacity: 1;
  stroke-dasharray: 0.25 0.2;
  stroke-linecap: round;
  filter: url(#electric-glow);
  animation: line-electric 0.4s ease-out forwards, line-flow 0.6s linear infinite, line-jitter 0.18s ease-in-out infinite;
  transform-origin: center center;
}

.lines-overlay.show-all .line-path {
  opacity: 0.4;
}

.lines-overlay.show-all .line-path.win {
  opacity: 1;
  animation: line-electric 0.4s ease-out forwards, line-flow 0.6s linear infinite, line-jitter 0.18s ease-in-out infinite;
}

/* Появление линии */
@keyframes line-electric {
  0%   { opacity: 0; stroke-width: 0.02; }
  40%  { opacity: 1; stroke-width: 0.14; }
  100% { opacity: 1; stroke-width: 0.12; }
}

/* Бегущий ток по линии (движение пунктира) */
@keyframes line-flow {
  from { stroke-dashoffset: 0; }
  to   { stroke-dashoffset: 0.5; }
}

/* Едва заметное дребезжание */
@keyframes line-jitter {
  0%, 100% { transform: translate(0, 0); }
  25%      { transform: translate(0.05px, -0.04px); }
  50%      { transform: translate(-0.04px, 0.04px); }
  75%      { transform: translate(0.04px, 0.03px); }
}

.symbol .symbol-content {
  display: inline-block;
  transform-origin: center center;
  transition: opacity 0.35s ease, filter 0.35s ease;
}

.reels-wrap.has-win .symbol:not(.win-cell) .symbol-content {
  opacity: 0.45;
  filter: brightness(0.55);
}

.symbol.win-cell {
  z-index: 10;
}

.symbol.win-cell .symbol-content {
  animation: symbol-content-win 1.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  filter: drop-shadow(0 0 12px rgba(201, 162, 39, 0.6));
}

@keyframes symbol-content-win {
  0%    { transform: scale(1) translateY(0); opacity: 1; filter: drop-shadow(0 0 8px rgba(201, 162, 39, 0.3)); }
  12%   { transform: scale(1.15) translateY(-6px); opacity: 1; filter: drop-shadow(0 0 16px rgba(201, 162, 39, 0.7)); }
  28%   { transform: scale(1.12) translateY(4px); opacity: 0.95; filter: drop-shadow(0 0 14px rgba(201, 162, 39, 0.5)); }
  42%   { transform: scale(1.35) translateY(-4px); opacity: 1; filter: drop-shadow(0 0 20px rgba(232, 212, 139, 0.8)); }
  55%   { transform: scale(1.3) translateY(3px); opacity: 1; filter: drop-shadow(0 0 18px rgba(201, 162, 39, 0.6)); }
  70%   { transform: scale(1.7) translateY(-3px); opacity: 1; filter: drop-shadow(0 0 24px rgba(232, 212, 139, 0.9)); }
  85%   { transform: scale(2.12) translateY(-2px); opacity: 1; filter: drop-shadow(0 0 28px rgba(201, 162, 39, 0.9)); }
  100%  { transform: scale(2) translateY(0); opacity: 1; filter: drop-shadow(0 0 20px rgba(201, 162, 39, 0.7)); }
}

.btn-lines {
  position: absolute;
  bottom: 0.35rem;
  left: 0.5rem;
  right: auto;
  font-size: 0.7rem;
  padding: 0.25rem 0.5rem;
  background: rgba(201, 162, 39, 0.2);
  border: 1px solid rgba(201, 162, 39, 0.4);
  color: var(--gold-light);
  border-radius: 6px;
  cursor: pointer;
  font-family: 'Exo 2', sans-serif;
  transition: background 0.2s;
  z-index: 3;
}

.btn-lines:hover {
  background: rgba(201, 162, 39, 0.35);
}

.btn-lines.active {
  background: rgba(0, 245, 255, 0.15);
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
}

/* Подсказка по линиям: при наведении и при первом визите — сразу под кнопкой */
.tooltip-lines {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 0.35rem;
  padding: 0.4rem 0.6rem;
  max-width: 200px;
  font-size: 0.7rem;
  line-height: 1.35;
  color: var(--text);
  background: rgba(0, 0, 0, 0.9);
  border: 1px solid var(--border-gold);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  pointer-events: none;
  z-index: 10;
}
.btn-lines:hover + .tooltip-lines,
.tooltip-lines.show-first-visit {
  opacity: 1;
  visibility: visible;
}
.machine-top {
  position: relative;
}

.reel {
  flex: 1;
  min-width: 52px;
  max-width: 90px;
  height: var(--reel-height);
  border-radius: 8px;
  overflow: hidden;
  background: transparent;
  position: relative;
}

.reel-strip {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 240px;
  width: 100%;
  transform-origin: 0 0;
  transition: none;
}

.symbol {
  flex-shrink: 0;
  width: 100%;
  height: 80px;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold-light);
  text-shadow: 0 0 8px rgba(201, 162, 39, 0.5);
  background: transparent;
  border: 1px solid rgba(201, 162, 39, 0.12);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2) inset;
}

.symbol[data-symbol="seven"] {
  color: #ffd700;
  font-family: 'Orbitron', sans-serif;
  font-size: 1.6rem;
}

.symbol[data-symbol="bar"] {
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  color: var(--neon-cyan);
}

.symbol[data-symbol="wild"] {
  color: #ff6b9d;
  font-size: 0.9rem;
}

.symbol[data-symbol="scatter"] {
  color: #c9a227;
  font-size: 0.85rem;
}

.symbol[data-symbol="cherry"],
.symbol[data-symbol="lemon"],
.symbol[data-symbol="grape"] {
  font-size: 1.6rem;
}

.panel-wrap {
  width: 100%;
  flex-shrink: 0;
}

.panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 3.5rem;
}

.freespins-under {
  margin: 0.4rem 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}

.freespins-under strong {
  color: var(--gold-light);
  margin-left: 0.2rem;
}

.freespins-under[hidden] {
  display: none !important;
}

.btn-turbo {
  font-size: 0.75rem;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.btn-turbo input { width: auto; margin: 0; }

/* Блок Авто: единый тёмный стиль, без белых полей */
.auto-wrap {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.6rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(201, 162, 39, 0.25);
  border-radius: 10px;
  color-scheme: dark;
}

.btn-auto {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-family: 'Exo 2', sans-serif;
  font-weight: 600;
  color: var(--gold-light);
  background: rgba(201, 162, 39, 0.2);
  border: 1px solid rgba(201, 162, 39, 0.45);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.btn-auto:hover {
  background: rgba(201, 162, 39, 0.35);
  border-color: rgba(201, 162, 39, 0.6);
}

.auto-select {
  padding: 0.25rem 1.6rem 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-family: 'Exo 2', sans-serif;
  color: var(--gold-light);
  background-color: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(201, 162, 39, 0.35);
  border-radius: 6px;
  min-width: 4rem;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23e8d48b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.4rem center;
  cursor: pointer;
}
.auto-select option {
  background: var(--bg-panel);
  color: var(--text);
}

.auto-stop-wrap {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.auto-stop-wrap input[type="checkbox"] {
  width: 1em;
  height: 1em;
  margin: 0;
  accent-color: var(--border-gold);
  cursor: pointer;
}
.auto-stop-value {
  width: 3.2rem;
  padding: 0.2rem 0.35rem;
  font-size: 0.72rem;
  font-family: 'Orbitron', sans-serif;
  color: var(--gold-light);
  background-color: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(201, 162, 39, 0.35);
  border-radius: 4px;
  box-sizing: border-box;
}
.auto-stop-value::-webkit-outer-spin-button,
.auto-stop-value::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.auto-stop-value[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}
.auto-stop-value:focus {
  outline: none;
  border-color: rgba(201, 162, 39, 0.6);
  box-shadow: 0 0 0 2px rgba(201, 162, 39, 0.15);
}

.btn-stats {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(201, 162, 39, 0.4);
  background: rgba(201, 162, 39, 0.15);
  color: var(--gold-light);
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-stats:hover { background: rgba(201, 162, 39, 0.3); }

.overlay-stats .overlay-stats-box { max-width: 280px; }
.overlay-stats .overlay-text { margin-bottom: 0.4rem; }

.balance-panel,
.bet-panel,
.win-panel {
  display: flex;
  align-items: baseline;
  gap: 0.3rem;
  background: rgba(0,0,0,0.35);
  padding: 0.45rem 0.6rem;
  border-radius: 10px;
  border: 1px solid rgba(201, 162, 39, 0.2);
}

.win-panel {
  flex-shrink: 0;
  min-width: 9rem;
  min-height: 2.5rem;
  box-sizing: border-box;
}

.win-panel .value.win-amount {
  min-width: 6ch;
  display: inline-block;
  text-align: right;
  color: var(--neon-cyan);
  visibility: visible;
  opacity: 1;
  font-variant-numeric: tabular-nums;
}

.label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.balance-panel .value,
.win-panel .value {
  font-family: 'Orbitron', sans-serif;
  font-weight: 600;
  font-size: 1rem;
}

.win-panel.won .value.win-amount {
  animation: win-pulse 0.6s ease-out;
  color: var(--gold-light);
}

.win-panel.lose {
  animation: lose-sigh 0.5s ease-out;
}

@keyframes lose-sigh {
  0%, 100% { opacity: 1; transform: scale(1); }
  30%      { opacity: 0.7; filter: brightness(0.85); }
  60%      { opacity: 0.9; }
}

@keyframes win-pulse {
  0% { transform: scale(1); opacity: 1; }
  40% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

.bet-controls {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.bet-controls .value {
  min-width: 2ch;
  text-align: center;
  font-family: 'Orbitron', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
}

.btn-bet {
  width: 26px;
  height: 26px;
  border: 1px solid var(--border-gold);
  background: rgba(201, 162, 39, 0.15);
  color: var(--gold-light);
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-bet:hover {
  background: rgba(201, 162, 39, 0.3);
}

.btn-bet:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-spin {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.1em;
  padding: 0.8rem 2rem;
  border: none;
  border-radius: 14px;
  background: linear-gradient(180deg, #e62e4a 0%, var(--accent-red) 40%, #8b1530 100%);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 24px rgba(196, 30, 58, 0.5), 0 2px 0 rgba(0,0,0,0.2) inset;
  transition: transform 0.15s, box-shadow 0.2s;
  text-transform: uppercase;
}

.btn-spin:hover:not(:disabled) {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 32px rgba(196, 30, 58, 0.6), 0 2px 0 rgba(0,0,0,0.2) inset;
}

.btn-spin:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-sound {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(201, 162, 39, 0.4);
  background: rgba(201, 162, 39, 0.15);
  color: var(--gold-light);
  border-radius: 10px;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, opacity 0.2s;
}
.btn-sound:hover {
  background: rgba(201, 162, 39, 0.3);
}
.btn-sound:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--border-gold);
}

.lines-info {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ---- Оверлеи фриспинов ---- */
.machine {
  position: relative;
}

.overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.82);
  border-radius: inherit;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.overlay[hidden] {
  display: none !important;
}

.overlay:not([hidden]) {
  display: flex;
  opacity: 1;
  visibility: visible;
}

.overlay-box {
  text-align: center;
  padding: 2rem;
  max-width: 320px;
  background: linear-gradient(180deg, rgba(30, 22, 40, 0.98) 0%, rgba(20, 15, 28, 0.98) 100%);
  border: 2px solid var(--border-gold);
  border-radius: 20px;
  box-shadow: 0 0 40px rgba(201, 162, 39, 0.25), 0 0 0 1px rgba(0,0,0,0.3) inset;
}

.overlay-title {
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  font-size: 1.6rem;
  color: var(--gold-light);
  margin: 0 0 1rem;
  text-shadow: 0 0 20px rgba(201, 162, 39, 0.5);
}

.overlay-text {
  font-size: 1.1rem;
  color: var(--text);
  margin: 0 0 0.5rem;
}

.overlay-text strong {
  color: var(--neon-cyan);
}

.overlay-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 1.25rem;
}

.btn-overlay {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.7rem 2rem;
  border: none;
  border-radius: 12px;
  background: linear-gradient(180deg, #e62e4a 0%, var(--accent-red) 50%, #8b1530 100%);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(196, 30, 58, 0.4);
  transition: transform 0.15s, box-shadow 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn-overlay:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 28px rgba(196, 30, 58, 0.5);
}

.paytable {
  flex-shrink: 0;
  background: var(--bg-panel);
  border: 1px solid rgba(201, 162, 39, 0.25);
  border-radius: 12px;
  padding: 0.6rem 0.9rem;
}

.paytable h3 {
  margin: 0 0 0.5rem;
  font-family: 'Orbitron', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--gold-light);
}

.paytable ul {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.paytable li {
  display: flex;
  justify-content: space-between;
  padding: 0.2rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.footer {
  flex-shrink: 0;
  text-align: center;
  margin-top: 0.5rem;
}

.footer p {
  margin: 0;
  font-size: 0.7rem;
  color: var(--text-muted);
}

@media (max-width: 780px) {
  body {
    padding: 0.5rem;
    align-items: flex-start;
  }
  .slot-cabinet {
    flex-direction: column;
    max-width: 100%;
    height: calc(100vh - 1rem);
    height: calc(100dvh - 1rem);
    min-height: 380px;
    max-height: calc(100vh - 1rem);
    max-height: calc(100dvh - 1rem);
  }
  .history-container {
    width: 100%;
    min-width: 0;
    max-height: 140px;
    flex-shrink: 0;
    border-right: none;
    border-bottom: 2px solid rgba(201, 162, 39, 0.35);
  }
  .history-sidebar {
    min-height: 0;
  }
  .game-area {
    padding: 0.5rem;
  }
  .machine-wrap {
    gap: 0.5rem;
  }
  .machine {
    padding: 0.75rem;
  }
}

/* Telegram Mini App и низкий viewport: слоты помещаются без обрезки */
@media (max-height: 600px) {
  .slot-cabinet {
    min-height: 320px;
    height: calc(100dvh - 0.5rem);
    max-height: calc(100dvh - 0.5rem);
  }
  .history-container {
    max-height: 100px;
  }
}
