* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  font-family: Georgia, serif;
  color: gold;
  background:
    linear-gradient(rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.72)),
    url("/images/slot-bg.jpeg") center / cover no-repeat fixed;
}

.slots-page {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 18px 0 90px;
}

.machine {
  position: relative;
  width: min(100vw, 600px);
  filter: drop-shadow(0 30px 45px rgba(0, 0, 0, 0.75));
}

.machine-ui {
  width: 100%;
  display: block;
  user-select: none;
  pointer-events: none;
}

.reels-window {
  position: absolute;
  top: 25.1%;
  left: 15.2%;
  width: 69.6%;
  height: 23.4%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
  background: radial-gradient(circle, #2b062a 0%, #080008 75%);
  border-radius: 6px;
}

.reel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-left: 1px solid rgba(255, 215, 0, 0.45);
  border-right: 1px solid rgba(255, 215, 0, 0.45);
  overflow: hidden;
}

.reel img {
  width: 78%;
  max-height: 82%;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.35));
  transition: transform 0.15s ease, filter 0.15s ease;
}

.reel.spinning img {
  transform: translateY(8px) scale(1.05);
  filter: blur(1px) drop-shadow(0 0 10px rgba(255, 215, 0, 0.5));
}

.number-display {
  position: absolute;
  color: #ffd968;
  font-weight: 900;
  font-size: clamp(14px, 3.4vw, 24px);
  text-align: center;
  text-shadow: 0 2px 4px #000, 0 0 8px rgba(255, 215, 0, 0.55);
  pointer-events: none;
  line-height: 1;
}

#betDisplay {
  top: 54.8%;
  left: 14.2%;
  width: 17%;
}

#balanceDisplay {
  top: 54.8%;
  left: 39.2%;
  width: 23%;
}

#winDisplay {
  top: 54.8%;
  left: 69.5%;
  width: 17%;
}

.hit-btn {
  position: absolute;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

.hit-btn:active {
  transform: scale(0.96);
}

#minusBet {
  top: 61.7%;
  left: 12.8%;
  width: 18.5%;
  height: 6.8%;
}

#spinBtn {
  top: 60.8%;
  left: 36.5%;
  width: 27%;
  height: 8.7%;
  border-radius: 999px;
}

#plusBet {
  top: 61.7%;
  left: 69%;
  width: 18.5%;
  height: 6.8%;
}

#lobbyBtn {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 50;

  padding: 10px 14px;
  border: 1px solid rgba(255, 215, 0, 0.65);
  border-radius: 12px;

  background: rgba(0, 0, 0, 0.72);
  color: #ffd968;

  font-family: Georgia, serif;
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;

  box-shadow: 0 0 14px rgba(0, 0, 0, 0.75);
}

.status-box {
  position: fixed;
  left: 50%;
  bottom: 95px;
  transform: translateX(-50%);
  width: min(96vw, 600px);
  padding: 10px 14px;
  border: 1px solid rgba(255, 215, 0, 0.45);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.72);
  text-align: center;
  color: #ffd968;
  font-size: 14px;
  box-shadow: 0 0 18px rgba(0, 0, 0, 0.7);
  z-index: 30;
}

.good {
  color: #82ff91;
}

.bad {
  color: #ff7878;
}

@media (max-width: 520px) {
  .slots-page {
    align-items: center;
    padding: 6px;
  }

  .machine {
    width: 100vw;
  }

  .status-box {
    bottom: 6px;
    font-size: 12px;
  }
}