.slots-wrapper {
  width: min(1100px, 100%);
  margin: 0 auto;
}

.slots-stage {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(8, 8, 18, 0.55);
  border: 2px solid rgba(255, 212, 92, 0.65);
  background: #160d06;
}

#slotsCanvas {
  display: block;
  width: 100%;
  height: auto;
}

.slots-overlay {
  position: absolute;
  right: 18px;
  top: 48%;
  transform: translateY(-50%);
  display: grid;
  gap: 12px;
}

.slots-btn {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 2px solid rgba(255, 242, 168, 0.72);
  background: radial-gradient(circle at 30% 25%, #2f6027, #173315 68%);
  color: #fff8ca;
  font-weight: 900;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.35);
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.slots-btn:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.44), 0 0 12px rgba(255, 214, 103, 0.5);
}

.slots-btn:active {
  transform: scale(0.97);
}

.slots-btn.active {
  filter: saturate(1.3);
  box-shadow: 0 0 0 2px rgba(255, 230, 138, 0.5), 0 0 14px rgba(255, 224, 122, 0.6);
}

.slots-btn.spin {
  position: absolute;
  right: 137px;
  bottom: 40px;
  width: 172px;
  height: 168px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  color: transparent;
  font-size: 0;
  z-index: 3;
  transition: transform 0.12s ease, background-color 0.14s ease, box-shadow 0.18s ease;
}

.slots-btn.spin::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(255, 232, 150, 0);
  transition: box-shadow 0.18s ease, opacity 0.18s ease;
  opacity: 0.7;
  pointer-events: none;
}

.slots-btn.spin:hover::after {
  box-shadow: 0 0 0 3px rgba(255, 232, 150, 0.2);
}

.slots-btn.spin:active {
  transform: scale(0.96);
  background: rgba(0, 0, 0, 0.14);
}

.slots-btn.spin:active::after {
  box-shadow: 0 0 0 6px rgba(255, 232, 150, 0.28);
}

.slots-status {
  margin-top: 14px;
  border: 1px solid #ccad63;
  border-radius: 14px;
  background: linear-gradient(180deg, #2c1a0f, #1a0e07);
  color: #ffe9ab;
  padding: 12px 14px;
  font-weight: 700;
}

.slots-hud {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.slots-hud-item {
  border: 1px solid #d4b46a;
  border-radius: 12px;
  background: linear-gradient(180deg, #2f1f11, #1b1109);
  color: #ffe4a2;
  padding: 10px;
}

.slots-hud-item span {
  display: block;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  opacity: 0.85;
}

.slots-hud-item strong {
  font-size: 1.1rem;
}

.slots-btn.sound {
  position: absolute;
  right: 370px;
  bottom: 33px;
  width: 70px;
  height: 70px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  color: transparent;
  font-size: 0;
  z-index: 3;
  transition: transform 0.12s ease, background-color 0.14s ease, box-shadow 0.18s ease;
}

.slots-btn.sound::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(255, 232, 150, 0);
  transition: box-shadow 0.18s ease, opacity 0.18s ease;
  opacity: 0.7;
  pointer-events: none;
}

.slots-btn.sound:hover::after {
  box-shadow: 0 0 0 3px rgba(255, 232, 150, 0.2);
}

.slots-btn.sound:active {
  transform: scale(0.94);
  background: rgba(0, 0, 0, 0.14);
}

.slots-btn.sound:active::after {
  box-shadow: 0 0 0 5px rgba(255, 232, 150, 0.26);
}

.win-popup {
  position: fixed;
  inset: 0;
  background: rgba(8, 4, 1, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 60;
}

.win-popup.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.win-popup-card {
  width: min(92vw, 440px);
  border-radius: 20px;
  border: 2px solid #ffd578;
  background: radial-gradient(circle at 30% 20%, #543113, #220d00 68%);
  color: #ffeab8;
  padding: 22px 18px 18px;
  text-align: center;
  position: relative;
  box-shadow: 0 26px 50px rgba(0, 0, 0, 0.55), 0 0 24px rgba(255, 205, 96, 0.35);
  transform: scale(0.9) translateY(12px);
}

.win-popup.open .win-popup-card {
  animation: winPopIn 0.35s ease forwards;
}

.win-popup-kicker {
  margin: 0;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #f3c861;
}

.win-popup h3 {
  margin: 6px 0 8px;
  font-size: 2rem;
  line-height: 1.04;
  color: #ffe7b2;
}

.win-popup-text {
  margin: 0 0 16px;
  font-size: 1.05rem;
}

.win-popup-text strong {
  color: #ffd14b;
  font-size: 1.28em;
}

.win-popup-btn {
  min-width: 140px;
  border: 0;
  border-radius: 999px;
  padding: 11px 20px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #2f1700;
  background: linear-gradient(180deg, #ffd95e, #efb534);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.35);
  cursor: pointer;
}

.win-popup-burst {
  position: absolute;
  inset: -12px;
  pointer-events: none;
}

.win-popup-burst span {
  position: absolute;
  width: 8px;
  height: 22px;
  border-radius: 99px;
  background: linear-gradient(180deg, #ffe27c, #ffbf40);
  animation: confettiDrop 0.85s ease-out infinite;
}

.win-popup-burst span:nth-child(1) { left: 10%; top: 8%; transform: rotate(-20deg); animation-delay: 0.05s; }
.win-popup-burst span:nth-child(2) { left: 24%; top: -2%; transform: rotate(14deg); animation-delay: 0.15s; }
.win-popup-burst span:nth-child(3) { left: 39%; top: 4%; transform: rotate(28deg); animation-delay: 0.22s; }
.win-popup-burst span:nth-child(4) { right: 36%; top: 0%; transform: rotate(-20deg); animation-delay: 0.1s; }
.win-popup-burst span:nth-child(5) { right: 20%; top: 6%; transform: rotate(16deg); animation-delay: 0.18s; }
.win-popup-burst span:nth-child(6) { right: 8%; top: -4%; transform: rotate(-30deg); animation-delay: 0.28s; }

@keyframes winPopIn {
  from { transform: scale(0.9) translateY(12px); opacity: 0.2; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

@keyframes confettiDrop {
  0% { opacity: 0.3; transform: translateY(-8px) rotate(0deg); }
  100% { opacity: 0.95; transform: translateY(18px) rotate(35deg); }
}

@media (max-width: 980px) {
  .slots-overlay {
    right: 8px;
    top: 46%;
    gap: 8px;
  }

  .slots-btn {
    width: 58px;
    height: 58px;
    font-size: 0.88rem;
  }

  .slots-btn.spin {
    right: 25px;
    bottom: 8px;
    width: 86px;
    height: 84px;
  }

  .slots-btn.sound {
    right: 136px;
    bottom: 16px;
    width: 36px;
    height: 36px;
  }

  .slots-hud {
    grid-template-columns: 1fr 1fr;
  }

  .win-popup h3 {
    font-size: 1.65rem;
  }
}
