/* ======== Estilos generales ======== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
a {
  text-decoration: none;
}
body {
  font-family: 'Poppins', sans-serif;
  background: radial-gradient(circle at top, #1a1a1a, #000);
  color: #f5f5f5;
  overflow-x: hidden;
}

/* ======== Menú de navegación ======== */
.links {
  display: flex;
  justify-content: center;
  background: linear-gradient(90deg, #000, #1a1a1a);
  border-bottom: 2px solid #ff1100ff;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 10;
}

.links div {
  margin: 0 1.5rem;
}

.links a {
  text-decoration: none;
  color: #f5f5f5;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: color 0.3s ease, transform 0.3s ease;
}

.links a:hover {
  color: #ff1100ff;
  transform: scale(1.1);
}

/* ======== Títulos principales ======== */
h1, h2 {
  text-align: center;
  margin-top: 1rem;
  letter-spacing: 3px;
}

h1 {
  color: #ff1100ff;
  font-size: 3rem;
  text-transform: uppercase;
  animation: glow 2s infinite alternate;
}

h2 {
  color: #fff;
  font-size: 2rem;
  margin-bottom: 2rem;
}

/* ====== Contenedor principal ====== */
.app {
  max-width: 900px;
  margin: 40px auto;
  background: #250000cc;
  padding: 25px;
  border-radius: 12px;
  border: 2px solid #b00000;
  box-shadow: 0 0 25px #ff000050, inset 0 0 20px #300000aa;
}

/* ====== Cabecera ====== */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 15px;
  border-bottom: 2px solid #700000;
}

.brand {
  font-size: 46px;
  font-weight: 900;
  color: #ff2a2a;
  text-shadow: 0 0 20px #ff0000aa;
}

.balance strong {
  color: #ffe066;
  text-shadow: 0 0 10px #ffdd00;
}

/* ====== Slot/Reels ====== */
.slot {
  display: flex;
  justify-content: center;
  gap: 25px;
  margin: 40px 0;
}

.reel {
  width: 120px;
  height: 225px;
  overflow: hidden;
  background: linear-gradient(180deg, #5a0000, #200000);
  border: 3px solid #ff3b3b;
  border-radius: 10px;
  box-shadow: 0 0 20px #ff000050, inset 0 0 15px #000000bb;
  display: flex;
  flex-direction: column;
  transition: .2s;
}

.symbol {
  height: 75px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 48px;
  text-shadow: 0 0 6px #000;
}

.reel.spinning {
  animation: reelSpin .14s linear infinite;
}

@keyframes reelSpin {
  0%   { transform: translateY(0); }
  100% { transform: translateY(-12px); }
}

/* ====== Controles ====== */
.controls {
  text-align: center;
}

.bet__group {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
}

.bet__input {
  width: 90px;
  padding: 7px;
  text-align: center;
  font-size: 20px;
  border-radius: 6px;
  background: #3d0000;
  border: 2px solid #990000;
  color: #fff;
  box-shadow: inset 0 0 6px #000;
}

/* ====== Botones ====== */
.btn {
  padding: 12px 24px;
  font-size: 18px;
  border-radius: 8px;
  cursor: pointer;
  border: none;
  font-weight: bold;
  margin: 5px;
  transition: .2s;
}

.btn--primary {
  background: #d40000;
  color: white;
  box-shadow: 0 0 10px #ff000050;
}
.btn--primary:hover {
  background: #ff1a1a;
  box-shadow: 0 0 15px #ff000090;
}

.btn--secondary {
  background: #660000;
  color: #ffdddd;
  border: 2px solid #aa0000;
}
.btn--secondary:hover {
  background: #990000;
}

.btn--ghost {
  background: transparent;
  border: 2px solid #ff5555;
  color: #ffdddd;
}
.btn--ghost:hover {
  background: #5a0000;
  border-color: #ff9999;
}

/* ====== Botón Sonido (estilo casino) ====== */
#mute{
  background: #1b1b1b;
  color: #f5f5f5;
  border: 2px solid #ff1100ff;
  border-radius: 10px;
  padding: 12px 18px;
  font-weight: 700;
  box-shadow: 0 0 10px rgba(255, 17, 0, 0.25);
}
#mute:hover{
  background: #2a0000;
  transform: translateY(-1px);
}
#mute:active{
  transform: translateY(0);
}

#autoSpin.active {
  background: #00d000;
  color: #fff;
  box-shadow: 0 0 12px #00ff00aa;
}

/* ====== Mensajes ====== */
.message {
  text-align: center;
  margin-top: 20px;
  font-size: 22px;
  color: #ff9999;
  text-shadow: 0 0 8px #ff000080;
}

/* ====== Efecto al ganar ====== */
.win-flash {
  animation: flashWin .7s ease-out forwards;
}

@keyframes flashWin {
  0%   { box-shadow: 0 0 30px #00ff00; }
  50%  { box-shadow: 0 0 55px #00ff00aa; }
  100% { box-shadow: 0 0 0 transparent; }
}

/* ====== Texto grande ====== */
.big-win-text {
  position: fixed;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 85px;
  padding: 25px 45px;
  color: #00ff00;
  background: rgba(0,0,0,0.75);
  border: 4px solid #00ff00;
  border-radius: 14px;
  opacity: 0;
  text-shadow: 0 0 25px #00ff00;
  z-index: 9999;
  pointer-events: none;
  animation: bigWinPop 1.4s ease-out forwards;
}

@keyframes bigWinPop {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(.3); }
  40%  { opacity: 1; transform: translate(-50%, -50%) scale(1.15); }
  70%  { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1); }
}

/* ====== Monedas ====== */
.coin {
  position: fixed;
  width: 35px;
  height: 35px;
  background-image: url('https://i.imgur.com/2XcMqSJ.png');
  background-size: contain;
  pointer-events: none;
  z-index: 9998;
}

/* ====== Historial ====== */
.historial {
  margin-top: 25px;
  padding: 15px;
  background: #2a0000aa;
  border: 2px solid #700000;
  border-radius: 10px;
  max-height: 220px;
  overflow-y: auto;
  box-shadow: inset 0 0 10px #000;
}

.historial h3 {
  color: #ff4444;
  margin-bottom: 10px;
  text-align: center;
}

.historial p {
  margin: 5px 0;
  font-size: 16px;
  color: #ffdddd;
}

@keyframes glow {
  from {
    text-shadow: 0 0 10px #ff1100ff, 0 0 20px #ff1100ff;
  }
  to {
    text-shadow: 0 0 25px #ff1100ff, 0 0 50px #ff1100ff;
  }
}

/* ====== Footer ====== */
.footer{
  margin-top: 30px;
  padding: 16px 10px;
  border-top: 2px solid #ff1100ff;
  background: linear-gradient(90deg, #000, #1a1a1a);
  color: #ddd;
  font-size: 13px;
  text-align: center;
}
.footer-links{
  margin-top: 6px;
  opacity: .9;
}