/* ======== 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;
  padding-top: 80px;
}

/* ======== MENÚ ======== */
.links {
  display: flex;
  justify-content: center;
  background: linear-gradient(90deg, #000, #1a1a1a);
  border-bottom: 2px solid #ff1100ff;
  padding: 1rem 0;
  position: fixed;
  width: 100%;
  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);
}

/* ======== LAYOUT ======== */
.container {
  display: flex;
  gap: 35px;
  justify-content: center;
  align-items: flex-start;
  padding: 25px 20px 0;
  flex-wrap: wrap;
}

/* ====== RULETA ====== */
.ruleta-area {
  position: relative;
  width: 440px;
  height: 440px;
  display: flex;
  justify-content: center;
  align-items: center;
}

#ruleta {
  border-radius: 50%;
  background: radial-gradient(circle at center, #222 0%, #000 80%);
  border: 4px solid #ff1100ff;
  box-shadow: 0 0 30px rgba(255, 17, 0, 0.35);
}

.flecha {
  position: absolute;
  top: 405px;
  left: 48%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 16px solid transparent;
  border-right: 16px solid transparent;
  border-bottom: 24px solid #ff1100ff;
  filter: drop-shadow(0 0 10px rgba(255, 17, 0, 0.6));
  z-index: 10;
}

/* ====== PANEL ====== */
.panel {
  width: 560px;
  background: rgba(20, 20, 20, 0.9);
  border: 3px solid #ff1100ff;
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 0 20px rgba(255, 17, 0, 0.25);
}

.panel-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}

.panel h1 {
  color: #ff1100ff;
  text-transform: uppercase;
  letter-spacing: 2px;
  animation: glow 2s infinite alternate;
}

#balance {
  margin-top: 8px;
  font-weight: 700;
}
#balance strong {
  color: #00ff88;
}

/* ====== BOTÓN SONIDO ====== */
.btn-sonido {
  padding: 10px 14px;
  border-radius: 10px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  cursor: pointer;
  transition: 0.2s;
}
.btn-sonido:hover {
  transform: scale(1.05);
  border-color: rgba(255, 17, 0, 0.7);
}

/* ====== FICHAS ====== */
.fichas {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 14px 0 8px;
}

.chip {
  background: #000;
  color: #ff1100ff;
  border: 2px solid #ff1100ff;
  border-radius: 999px;
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 800;
  transition: 0.2s;
}
.chip:hover {
  background: #ff1100ff;
  color: #000;
  transform: scale(1.06);
}
.chip.active {
  background: #ff1100ff;
  color: #000;
  box-shadow: 0 0 18px rgba(255, 17, 0, 0.35);
}

.apuesta-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-weight: 700;
}
#chip-seleccionada {
  color: #ffd700;
}

.btn-limpiar {
  background: linear-gradient(to bottom, #444, #222);
  color: white;
  border: none;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.2s;
}
.btn-limpiar:hover {
  transform: scale(1.04);
  background: #555;
}

/* ====== TAPETE REALISTA ====== */
.tapete-wrap {
  border: 2px solid rgba(255, 17, 0, 0.55);
  border-radius: 12px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.25);
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.55);
}

.tapete {
  display: grid;
  grid-template-columns: 70px repeat(12, 1fr) 70px;
  grid-auto-rows: 46px;
  gap: 6px;
  user-select: none;
}

.celda {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: 900;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  transition:
    transform 0.12s,
    border 0.12s;
  background: #111;
  min-width: 0;
}
.celda:hover {
  transform: scale(1.03);
  border-color: rgba(255, 17, 0, 0.8);
}

.celda.rojo {
  background: #b30000;
}
.celda.negro {
  background: #0f0f0f;
}
.celda.verde {
  background: #006600;
}

.celda.outside {
  background: rgba(30, 30, 30, 0.9);
  color: #fff;
  font-size: 13px;
  letter-spacing: 0.5px;
}

.celda.zero {
  grid-column: 1 / 2;
  grid-row: 1 / 4;
  background: #006600;
  font-size: 18px;
  border: 2px solid rgba(255, 255, 255, 0.12);
}

/* CHIP VISUAL (importe) */
.badge {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(255, 215, 0, 0.95);
  color: #000;
  font-weight: 900;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 999px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.45);
}

/* ====== BOTÓN GIRAR ====== */
.btn-girar {
  width: 100%;
  margin-top: 14px;
  background: linear-gradient(90deg, #ff1100ff, #ff3b3b);
  border: none;
  padding: 12px 18px;
  border-radius: 25px;
  font-weight: 900;
  cursor: pointer;
  color: #000;
  transition:
    transform 0.2s,
    box-shadow 0.3s;
}
.btn-girar:hover {
  transform: scale(1.02);
  box-shadow: 0 0 25px rgba(255, 17, 0, 0.65);
}
.btn-girar:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ====== RESULTADO ====== */
.resultado {
  margin-top: 12px;
  text-align: center;
  font-weight: 800;
  color: #ffd700;
  min-height: 26px;
}

/* ====== FOOTER ====== */
.footer {
  margin-top: 30px;
  padding: 18px 12px;
  text-align: center;
  color: rgba(255, 255, 255, 0.85);
  border-top: 1px solid rgba(255, 17, 0, 0.35);
  background: rgba(0, 0, 0, 0.4);
}
.footer-links {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.7);
}

/* ====== ANIMACIÓN TÍTULO ====== */
@keyframes glow {
  from {
    text-shadow:
      0 0 10px #ff1100ff,
      0 0 20px #ff1100ff;
  }
  to {
    text-shadow:
      0 0 25px #ff1100ff,
      0 0 50px #ff1100ff;
  }
}
