* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ========================================
   BODY
======================================== */

body {
  min-height: 100vh;

  font-family: Arial, Helvetica, sans-serif;

  background: radial-gradient(
    circle at 75% 30%,
    #132b63 0%,
    #071737 35%,
    #030b1d 75%
  );

  color: #ffffff;

  display: flex;

  justify-content: center;
  align-items: center;

  padding: 30px;
}

/* ========================================
   CONTENEDOR PRINCIPAL
======================================== */

.bingo-container {
  width: 100%;

  max-width: 1450px;
}

/* ========================================
   HEADER
======================================== */

.bingo-header {
  margin-bottom: 25px;
}

.title-container {
  display: flex;

  align-items: baseline;

  gap: 15px;
}

.title-container h1 {
  font-size: 56px;

  font-weight: 900;

  letter-spacing: 3px;

  /* text-shadow: 0 0 12px rgba(252, 250, 250, 0.967); */
}

.title-container span {
  font-size: 56px;

  font-weight: 900;

  color: #ffd52e;

  text-shadow: 
    3px 3px 0px #000000,      /* Borde de contraste negro */
    5px 5px 15px rgba(255, 208, 41, 0.8); /* Sombra brillante desplazada */
}

/* ========================================
   LAYOUT PRINCIPAL
======================================== */

.bingo-game {
  display: grid;

  grid-template-columns: minmax(0, 1fr) 430px;

  gap: 25px;

  align-items: stretch;
}

/* ========================================
   TABLERO
======================================== */

.board-container {
  background: linear-gradient(
    145deg,
    rgba(17, 43, 91, 0.95),
    rgba(5, 17, 42, 0.95)
  );

  border: 2px solid #163d80;

  border-radius: 20px;

  padding: 25px;

  box-shadow:
    0 15px 45px rgba(0, 0, 0, 0.35),
    inset 0 0 30px rgba(20, 70, 150, 0.12);
}

.board {
  display: grid;

  grid-template-columns: repeat(10, 1fr);

  gap: 12px;
}

/* ========================================
   NÚMEROS DEL TABLERO
======================================== */

.number {
  aspect-ratio: 1;

  display: flex;

  justify-content: center;

  align-items: center;

  border-radius: 50%;

  background: radial-gradient(circle at 35% 30%, #31599d, #173873 55%, #0d2757);

  border: 1px solid #31599d;

  box-shadow:
    inset 0 3px 5px rgba(255, 255, 255, 0.12),
    inset 0 -5px 8px rgba(0, 0, 0, 0.35),
    0 4px 8px rgba(0, 0, 0, 0.25);

  font-size: 22px;

  font-weight: 800;

  color: #ffffff;

  transition:
    transform 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.number.drawn {
  background: radial-gradient(circle at 35% 25%, #fff45a, #ffc400 55%, #ed8500);

  border-color: #ffd52e;

  color: #071737;

  box-shadow:
    inset 0 3px 6px rgba(255, 255, 255, 0.45),
    inset 0 -6px 10px rgba(180, 80, 0, 0.35),
    0 5px 15px rgba(255, 193, 7, 0.35);

  transform: scale(1.06);
}

/* ========================================
   PANEL DERECHO
======================================== */

.display-container {
  position: relative;

  height: 100%;
}

/* ========================================
   PANEL DERECHO COMPLETO
======================================== */

.right-panel {
  height: 100%;

  min-height: 100%;

  display: flex;

  flex-direction: column;

  align-items: center;

  background: linear-gradient(
    145deg,
    rgba(17, 43, 91, 0.95),
    rgba(5, 17, 42, 0.95)
  );

  border: 2px solid #163d80;

  border-radius: 20px;

  padding: 20px 25px 25px;

  box-shadow:
    0 15px 45px rgba(0, 0, 0, 0.35),
    inset 0 0 35px rgba(20, 70, 150, 0.12);
}

/* ========================================
   CONTROLES
======================================== */

.controls {
  position: absolute;

  right: 0;

  top: -78px;

  display: flex;

  justify-content: flex-end;

  gap: 12px;

  z-index: 10;
}

.control-button {
  width: 58px;

  height: 58px;

  border: none;

  border-radius: 50%;

  display: flex;

  justify-content: center;

  align-items: center;

  font-size: 25px;

  font-weight: bold;

  color: #ffffff;

  cursor: pointer;

  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.control-button:hover {
  transform: translateY(-3px) scale(1.04);
}

.control-button:active {
  transform: scale(0.96);
}

/* PLAY */

.control-button.play {
  background: radial-gradient(circle at 35% 25%, #5cffb0, #0acb79 55%, #008c55);

  box-shadow:
    0 7px 18px rgba(0, 200, 120, 0.35),
    inset 0 3px 5px rgba(255, 255, 255, 0.35);
}

/* PAUSA */

.control-button.pause {
  background: radial-gradient(circle at 35% 25%, #fff16b, #ffbf00 55%, #e68700);

  color: #432700;

  box-shadow:
    0 7px 18px rgba(255, 180, 0, 0.3),
    inset 0 3px 5px rgba(255, 255, 255, 0.4);
}

/* REINICIAR */

.control-button.reset {
  background: radial-gradient(circle at 35% 25%, #ff6b87, #ed3156 55%, #a80e31);

  box-shadow:
    0 7px 18px rgba(220, 30, 70, 0.35),
    inset 0 3px 5px rgba(255, 255, 255, 0.3);
}

/* ========================================
   CONTENEDOR DE LA PELOTA
======================================== */

.bingo-ball-container {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  margin-top: 10px;
}

/* ========================================
   PELOTA PRINCIPAL
======================================== */

.bingo-ball {
  width: min(300px, 78%);

  aspect-ratio: 1;

  border-radius: 50%;

  display: flex;

  justify-content: center;

  align-items: center;

  position: relative;

  background: radial-gradient(
    circle at 30% 20%,
    #fff875 0%,
    #ffe600 25%,
    #ffbd00 58%,
    #ef8500 82%,
    #bd5700 100%
  );

  box-shadow:
    inset -18px -22px 30px rgba(120, 50, 0, 0.28),
    inset 12px 10px 20px rgba(255, 255, 255, 0.45),
    0 15px 25px rgba(0, 0, 0, 0.35),
    0 0 35px rgba(255, 190, 0, 0.25);
}

/* Brillo principal */

.bingo-ball::before {
  content: "";

  position: absolute;

  width: 28%;

  height: 15%;

  top: 13%;

  left: 19%;

  border-radius: 50%;

  background: rgba(255, 255, 255, 0.55);

  transform: rotate(-35deg);

  filter: blur(2px);
}

/* Brillo secundario */

.bingo-ball::after {
  content: "";

  position: absolute;

  width: 10%;

  height: 6%;

  top: 27%;

  left: 27%;

  border-radius: 50%;

  background: rgba(255, 255, 255, 0.5);
}

/* ========================================
   CÍRCULO BLANCO DE LA PELOTA
======================================== */

.ball-inner {
  width: 63%;

  height: 63%;

  border-radius: 50%;

  background: radial-gradient(circle at 40% 35%, #ffffff, #f4f4f4 70%, #d6d6d6);

  display: flex;

  justify-content: center;

  align-items: center;

  position: relative;

  z-index: 2;

  box-shadow:
    inset 0 5px 8px rgba(255, 255, 255, 0.9),
    inset 0 -8px 12px rgba(0, 0, 0, 0.12),
    0 3px 8px rgba(0, 0, 0, 0.25);
}

/* ========================================
   NÚMERO DE LA PELOTA
======================================== */

#currentNumber {
  color: #071737;

  font-size: clamp(75px, 8vw, 135px);

  line-height: 1;

  font-weight: 900;

  text-shadow: 0 3px 2px rgba(0, 0, 0, 0.12);
}

/* ========================================
   ANIMACIÓN DE LA PELOTA
======================================== */

.bingo-ball.animate {
  animation: ballAppear 0.5s ease;
}

@keyframes ballAppear {
  0% {
    transform: scale(0.65) rotate(-10deg);

    opacity: 0.2;
  }

  65% {
    transform: scale(1.08) rotate(3deg);

    opacity: 1;
  }

  100% {
    transform: scale(1) rotate(0);

    opacity: 1;
  }
}

/* ========================================
   ÚLTIMOS 5
======================================== */

.last-numbers {
  width: 100%;

  margin-top: 35px;

  padding-top: 10px;
}

.display-label {
  display: block;

  text-align: center;

  color: #9bb1df;

  font-size: 14px;

  font-weight: 800;

  letter-spacing: 3px;
}

.last-balls {
  display: flex;

  justify-content: center;

  gap: 14px;

  margin-top: 18px;
}

.last-balls span {
  width: 58px;

  height: 58px;

  flex-shrink: 0;

  display: flex;

  justify-content: center;

  align-items: center;

  border-radius: 50%;

  background: radial-gradient(circle at 35% 25%, #fff45a, #ffc400 55%, #e98400);

  color: #071737;

  font-size: 18px;

  font-weight: 900;

  box-shadow:
    inset 0 3px 5px rgba(255, 255, 255, 0.45),
    inset 0 -5px 8px rgba(170, 80, 0, 0.3),
    0 4px 10px rgba(0, 0, 0, 0.3);
}

/* ========================================
   RESPONSIVE
======================================== */

@media (max-width: 1000px) {
  .bingo-game {
    grid-template-columns: 1fr;
  }

  .display-container {
    height: auto;
  }

  .controls {
    position: static;

    margin-bottom: 15px;
  }

  .right-panel {
    min-height: 600px;
  }
}

@media (max-width: 650px) {
  body {
    padding: 15px;
  }

  .title-container h1 {
    font-size: 34px;
  }

  .board-container {
    padding: 12px;
  }

  .board {
    gap: 6px;
  }

  .number {
    font-size: 14px;
  }

  .control-button {
    width: 50px;

    height: 50px;

    font-size: 21px;
  }

  .right-panel {
    padding: 15px;
  }

  .bingo-ball {
    width: 250px;
  }

  .last-balls {
    gap: 8px;
  }

  .last-balls span {
    width: 50px;

    height: 50px;

    font-size: 16px;
  }
}
