:root {
  --gold: #ffd700;
  --neon-pink: #ff007f;
  --bg-dark: #1a1a1a;
}

body {
  background-color: var(--bg-dark);
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/*        СЛОТ МАШИНА           */

.slot-machine {
  background: linear-gradient(145deg, #2c2c2c, #000);
  padding: 40px;
  border-radius: 30px;
  border: 4px solid var(--gold);
  box-shadow: 0 0 50px rgba(255, 215, 0, 0.2);
  text-align: center;
  max-width: 95%;
  width: 450px;
}

/* Заголовок казино */
.casino-title {
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 5px;
  margin-bottom: 30px;
  text-shadow: 0 0 10px var(--gold);
}

/* Контейнер барабанов */
.reels-container {
  display: flex;
  gap: 15px;
  background: #000;
  padding: 20px;
  border-radius: 15px;
  border: 2px solid #444;
  margin-bottom: 30px;
  overflow: hidden;
  justify-content: center;
}

/* Каждый барабан */
.reel {
  width: 100px;
  height: 120px;
  overflow: hidden;
  position: relative;

  background: linear-gradient(to bottom, #333, #111, #333);
  border-radius: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 3rem;
  border: 1px solid #555;
}

/* Трек барабана */
.reel-track {
  display: flex;
  flex-direction: column;
  transform: translateY(0);
}

/* Символы слотов */
.item {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

/* Баланс игрока */
.balance {
  font-family: 'Segoe UI', Roboto, sans-serif;
  font-size: 1.2rem;
  font-weight: bold;
  color: #fff;
  background: rgba(255, 0, 127, 0.05);
  padding: 12px 24px;
  border-radius: 12px;
  border: 2px solid var(--neon-pink);
  box-shadow: 0 0 10px rgba(255, 0, 127, 0.3),
    inset 0 0 10px rgba(255, 0, 127, 0.2);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 25px;
  transition: all 0.3s ease;
}

.current-balance {
  color: #fff;
  text-shadow: 0 0 10px var(--neon-pink), 0 0 20px var(--neon-pink);
  font-size: 1.5rem;
}

/* Кнопка SPIN (старта) */
.start {
  background: var(--neon-pink);
  color: white;
  border: none;
  padding: 15px 40px;
  font-size: 1.5rem;
  font-weight: bold;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 0 20px var(--neon-pink);
  text-transform: uppercase;
}

.start:hover {
  transform: scale(1.05);
  box-shadow: 0 0 35px var(--neon-pink);
}

.start:active {
  transform: scale(0.95);
}

.start:disabled {
  background: #444;
  color: #888;
  box-shadow: none;
  cursor: not-allowed;
  transform: scale(1);
  opacity: 0.6;
}

/* Модалка выиграша */
.win-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
  z-index: 100;
}

.win-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.win-modal {
  background: linear-gradient(145deg, #222, #000);
  padding: 50px;
  border-radius: 30px;
  border: 3px solid var(--gold);
  text-align: center;
  box-shadow: 0 0 100px rgba(255, 215, 0, 0.5);
  transform: scale(0.7);
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.win-overlay.is-open .win-modal {
  transform: scale(1);
}

.win-modal h2 {
  color: var(--gold);
  font-size: 3rem;
  margin: 10px 0;
  text-shadow: 0 0 20px var(--gold);
}

.win-modal .congrats {
  color: var(--neon-pink);
  padding: 15px 40px;
  font-size: 1.5rem;
}

.win-amount {
  font-size: 2.5rem;
  color: #fff;
  margin: 20px 0;
  font-weight: bold;
}

.confetti-icon {
  font-size: 4rem;
  animation: bounce 1s infinite;
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}

.close-modal {
  background: var(--gold);
  color: #000;
  border: none;
  padding: 12px 30px;
  font-size: 1.2rem;
  font-weight: bold;
  border-radius: 10px;
  cursor: pointer;
  margin-top: 20px;
}

/* Модалка недостаток средств */
.noCash-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.noCash-overlay.is-open {
  opacity: 1;
  pointer-events: all;
}

.noCash-modal {
  position: relative;
  background: #111;
  padding: 30px 25px 25px 25px;
  border-radius: 15px;
  width: 320px;
  max-width: 90%;
  text-align: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
  color: #fff;
}

.noCash-modal h2 {
  font-size: 1.8rem;
  margin-bottom: 10px;
  color: var(--neon-pink);
}

.noCash-modal p {
  font-size: 1rem;
  margin-bottom: 20px;
  line-height: 1.4;
}

/* Кнопка пополнения счета в модалке о нехватке средтв на счету */
.recharge-btn {
  padding: 10px 20px;
  font-size: 1rem;
  border-radius: 10px;
  border: none;
  background: var(--gold);
  color: #000;
  cursor: pointer;
  transition: background 0.2s ease;
}

.recharge-btn:hover {
  background: var(--gold);
}

.close-circle {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: #333;
  color: #fff;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  line-height: 30px;
  text-align: center;
  transition: background 0.2s ease;
}

.close-circle:hover {
  background: #555;
}
