/* ======== 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 {
  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 ======== */
.titulo {
  text-align: center;
  margin-top: 1rem;
  letter-spacing: 3px;
}
.titulo h1 {
  color: #ff1100ff;
  font-size: 3rem;
  text-transform: uppercase;
  animation: glow 2s infinite alternate;
}
.titulo h2 {
  color: #fff;
  font-size: 2rem;
  margin-bottom: 2rem;
}

main {
  max-width: 1000px;
  margin: 40px auto;
  background: rgba(20, 20, 20, 0.9);
  padding: 25px;
  border-radius: 12px;
  border: 3px solid #ff1100ff;
  box-shadow: 0 0 20px rgba(255, 17, 0, 0.3);
}

button {
  padding: 12px 24px;
  font-size: 18px;
  border-radius: 8px;
  cursor: pointer;
  border: none;
  font-weight: bold;
  margin: 15px;
  transition: 0.2s;
  background: linear-gradient(to bottom, #ff0000, #990000);
  color: white;
}
button:hover:not(:disabled) {
  transform: scale(1.12);
  background: #ff2a2a;
  box-shadow: 0 6px 20px rgba(255, 0, 0, 0.7);
}
button:disabled {
  background: #552222;
  opacity: 0.5;
  cursor: not-allowed;
}

.div1 {
  text-align: center;
  padding: 20px;
  font-size: 1.5em;
}

/* ====== CARTAS ====== */
.carta {
  width: 110px;
  margin-right: 12px;
  margin-top: 12px;
  border-radius: 12px;
}

/* contenedores de cartas */
#banca-cartas,
#jugador-cartas {
  min-height: 180px;
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0px;
}

#ganador {
  text-align: center;
  font-weight: bold;
  color: #ffd700;
  font-size: 1.5em;
  margin-top: 12px;
}

@keyframes glow {
  from {
    text-shadow: 0 0 10px #ff1100ff, 0 0 20px #ff1100ff;
  }
  to {
    text-shadow: 0 0 25px #ff1100ff, 0 0 50px #ff1100ff;
  }
}

/* ====== PANEL APUESTAS ====== */
.panel-apuesta {
  border: 2px solid rgba(255, 17, 0, 0.6);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 18px;
  background: rgba(0, 0, 0, 0.25);
  box-shadow: 0 0 18px rgba(255, 17, 0, 0.15);
}

.panel-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.panel-apuesta .saldo,
.panel-apuesta .apuesta {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 10px;
  text-align: center;
  width: 100%;
}
.panel-top .saldo {
  width: auto;
  margin-bottom: 0;
}

#saldo {
  color: #00ff88;
}
#apuesta-actual {
  color: #ffd700;
}

.controles-apuesta {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

#input-apuesta {
  width: 240px;
  padding: 12px;
  border-radius: 10px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  background: rgba(20, 20, 20, 0.85);
  color: #fff;
  font-size: 16px;
  outline: none;
}
#input-apuesta:focus {
  border-color: rgba(255, 17, 0, 0.9);
  box-shadow: 0 0 12px rgba(255, 17, 0, 0.3);
}

.chips {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.chip,
#btn-allin,
#btn-limpiar,
#btn-apostar {
  padding: 10px 16px;
  font-size: 16px;
  margin: 6px;
}

#btn-limpiar {
  background: linear-gradient(to bottom, #444, #222);
}
#btn-limpiar:hover:not(:disabled) {
  background: #555;
}

#msg-apuesta {
  margin-top: 10px;
  text-align: center;
  font-weight: 700;
  min-height: 22px;
  color: #ffd700;
}

/* ====== BOTÓN SONIDO (SIN RAREZAS) ====== */
.btn-sonido {
  margin: 0;
  padding: 10px 14px;
  font-size: 15px;
  border-radius: 10px;
  background: linear-gradient(to bottom, #333, #111);
  border: 2px solid rgba(255, 255, 255, 0.15);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-sonido:hover:not(:disabled) {
  transform: scale(1.05);
  box-shadow: 0 0 14px rgba(255, 17, 0, 0.25);
}
.btn-sonido .icono {
  font-size: 16px;
  line-height: 1;
}
.btn-sonido.is-muted {
  opacity: 0.85;
  border-color: rgba(255, 17, 0, 0.5);
}

/* ====== HISTORIAL ====== */
.historial {
  margin-top: 22px;
  padding: 15px;
  background: rgba(0, 0, 0, 0.35);
  border: 2px solid rgba(255, 17, 0, 0.45);
  border-radius: 10px;
  box-shadow: inset 0 0 10px #000;
}
.historial h3 {
  color: #ff4444;
  margin-bottom: 10px;
  text-align: center;
  letter-spacing: 1px;
}
#historial-lista {
  max-height: 190px;
  overflow-y: auto;
  padding-right: 6px;
}
.hist-item {
  font-size: 15px;
  color: #ffdddd;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px 12px;
  margin: 8px 0;
}
.hist-item b {
  color: #ffd700;
}

/* ====== FOOTER ====== */
.pie {
  width: 100%;
  padding: 18px 10px;
  margin-top: 18px;
  background: linear-gradient(90deg, #000, #161616);
  border-top: 2px solid rgba(255, 17, 0, 0.45);
}
.pie-inner {
  max-width: 1000px;
  margin: 0 auto;
  color: #cfcfcf;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 14px;
}
.pie a {
  color: #cfcfcf;
}
.pie a:hover {
  color: #ff1100ff;
}
.sep {
  opacity: 0.5;
}