/* styles.css - Slot Machine / Fruit Machine
   Cross-browser & mobile responsive — uses Unicode symbols, not emojis */

* {
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #0a0a0a 100%);
  color: #f0f0f0;
  min-height: 100vh;
  margin: 0;
  padding: 20px;
}

/* --- Game Container --- */
#game-container {
  max-width: 700px;
  width: 100%;
  margin: 0 auto;
  text-align: center;
  background: linear-gradient(180deg, #1a1a1a, #0d0d0d);
  border: 4px solid #444;
  border-radius: 20px;
  padding: 30px 20px;
  box-shadow:
    0 0 30px rgba(255, 215, 0, 0.15),
    inset 0 0 20px rgba(0, 0, 0, 0.5);
}

/* --- Buttons --- */
#spin-button,
#cash-out-button,
#reset-button,
#showhiscores {
  font-size: 16px;
  font-weight: bold;
  padding: 12px 24px;
  margin: 5px 8px;
  border: 2px solid #555;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  /* Prevent double-tap zoom on mobile */
  touch-action: manipulation;
}

/* Spin Button (bottom standalone) */
#spin-button {
  background: linear-gradient(180deg, #e74c3c, #c0392b);
  color: #fff;
  border-color: #e74c3c;
  box-shadow: 0 4px 0 #7b241c, 0 6px 15px rgba(231, 76, 60, 0.3);
  width: 180px;
  padding: 14px 20px;
  font-size: 18px;
  display: block;
  margin: 0 auto;
}
#spin-button:hover {
  background: linear-gradient(180deg, #f75c4c, #d0393b);
  box-shadow: 0 4px 0 #7b241c, 0 6px 25px rgba(231, 76, 60, 0.6);
  transform: translateY(-1px);
}
#spin-button:active {
  box-shadow: 0 2px 0 #7b241c, 0 3px 10px rgba(231, 76, 60, 0.3);
  transform: translateY(2px);
}
#spin-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

#cash-out-button {
  background: linear-gradient(180deg, #27ae60, #1e8449);
  color: #fff;
  border-color: #27ae60;
  box-shadow: 0 4px 0 #145a32, 0 6px 15px rgba(39, 174, 96, 0.3);
}
#cash-out-button:hover {
  background: linear-gradient(180deg, #2ecc71, #27ae60);
  box-shadow: 0 4px 0 #145a32, 0 6px 25px rgba(39, 174, 96, 0.6);
}
#cash-out-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#reset-button {
  background: linear-gradient(180deg, #555, #333);
  color: #fff;
  border-color: #666;
}
#reset-button:hover {
  background: linear-gradient(180deg, #666, #444);
}

#showhiscores {
  background: linear-gradient(180deg, #8e44ad, #6c3483);
  color: #fff;
  border-color: #8e44ad;
}
#showhiscores:hover {
  background: linear-gradient(180deg, #9b59b6, #8e44ad);
}

/* --- Bet Input --- */
#bet-input {
  font-size: 18px;
  width: 80px;
  padding: 10px;
  text-align: center;
  border: 2px solid #555;
  border-radius: 8px;
  background: #222;
  color: #ffd700;
  font-weight: bold;
  margin-right: 10px;
}
#bet-input:focus {
  outline: none;
  border-color: #ffd700;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

/* --- Displays --- */
#balance-display {
  font-size: 28px;
  font-weight: bold;
  color: #ffd700;
  margin: 20px 0 10px;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

#status-display {
  font-size: 18px;
  color: #ccc;
  min-height: 30px;
  margin-bottom: 10px;
}

/* --- Wheels / Reels --- */
.wheels {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-top: 25px;
  padding: 20px;
  background: linear-gradient(180deg, #111, #1a1a1a);
  border: 3px solid #333;
  border-radius: 15px;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.8);
}

.wheel {
  width: 120px;
  height: 120px;
  font-size: 4.5rem;
  font-weight: bold;
  text-align: center;
  line-height: 120px;
  border: 3px solid #ffd700;
  border-radius: 12px;
  background: linear-gradient(180deg, #2a2a2a, #1a1a1a);
  color: #fff;
  box-shadow:
    0 0 15px rgba(255, 215, 0, 0.3),
    inset 0 0 15px rgba(0, 0, 0, 0.5);
  transition: transform 0.7s ease-in-out;
  user-select: none;
  overflow: hidden;
}

/* Spin animation */
.spin-animation {
  animation: slotSpin 0.7s ease-in-out;
}

@keyframes slotSpin {
  0%   { transform: scaleY(1);   filter: blur(0); }
  20%  { transform: scaleY(0.1); filter: blur(3px); }
  50%  { transform: scaleY(0.05);filter: blur(5px); }
  80%  { transform: scaleY(0.1); filter: blur(3px); }
  100% { transform: scaleY(1);   filter: blur(0); }
}

/* --- Back Button --- */
.button-container {
  text-align: center;
  margin-top: 20px;
}

.back-button {
  text-decoration: none;
  background: linear-gradient(180deg, #3498db, #2980b9);
  color: #fff;
  padding: 10px 30px;
  font-size: 16px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 0 #1a5276, 0 4px 8px rgba(0, 0, 0, 0.3);
  display: inline-block;
}
.back-button:hover {
  background: linear-gradient(180deg, #5dade2, #3498db);
  box-shadow: 0 4px 0 #1a5276, 0 6px 15px rgba(52, 152, 219, 0.4);
  transform: translateY(-1px);
}
.back-button:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #1a5276;
}

/* ===========================================================
   MOBILE / SMALL SCREEN RESPONSIVE
   =========================================================== */
@media (max-width: 600px) {
  body {
    padding: 10px;
  }

  #game-container {
    padding: 20px 10px;
    border-radius: 12px;
    border-width: 3px;
  }

  .wheels {
    gap: 8px;
    padding: 12px 6px;
  }

  .wheel {
    width: 70px;
    height: 70px;
    font-size: 2.5rem;
    line-height: 70px;
    border-width: 2px;
    border-radius: 8px;
  }

  #balance-display {
    font-size: 22px;
  }

  #spin-button,
  #cash-out-button,
  #reset-button,
  #showhiscores {
    font-size: 14px;
    padding: 10px 14px;
    margin: 4px 4px;
  }

  #spin-button {
    width: 160px;
    padding: 12px 16px;
    font-size: 16px;
  }

  #bet-input {
    font-size: 16px;
    width: 65px;
    padding: 8px;
  }
}

@media (max-width: 360px) {
  .wheel {
    width: 60px;
    height: 60px;
    font-size: 2rem;
    line-height: 60px;
  }

  .wheels {
    gap: 6px;
    padding: 10px 4px;
  }

  #balance-display {
    font-size: 18px;
  }

  #spin-button {
    width: 140px;
    font-size: 15px;
  }
}
