/* ===== BACKGROUND ===== */
body {
  margin: 0;
  font-family: Arial;
  color: white;

  background: url("dayflite_Illust_Full.png") no-repeat center center fixed;
  background-size: cover;
}

/* overlay sombre */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: -1;
}

/* ===== LAYOUT GLOBAL ===== */
.main {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;

  padding: 5vh 0;
  box-sizing: border-box;
  text-align: center;
}

h1 {
  color: #00ffcc;
  margin: 0;
}

/* ===== CONTAINER BINGO ===== */
.container {
  width: min(95vw, 800px);
  max-height: 75vh;
  margin: 0 auto;
}

/* ===== GRID ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr); /* sera override en JS si besoin */
  gap: 1vh;
  margin-top: 10px;
}

/* ===== CASES ===== */
.cell {
  aspect-ratio: 1 / 1;
  max-height: calc(75vh / 5 - 10px);

  border: 2px solid #00ffcc;
  background: rgba(34, 34, 34, 0.85);
  backdrop-filter: blur(3px);

  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;

  padding: 4px;
  overflow: hidden;
  cursor: pointer;
}

/* TEXTE */
.cell span {
  width: 100%;
  word-break: break-word;
  line-height: 1.1;
}

/* CASE COCHÉE */
.cell.checked {
  background: #00ffcc;
  color: black;
  font-weight: bold;
}

/* ===== BOUTON ===== */
button {
  margin-top: 10px;
  padding: 10px 20px;
  background: #00ffcc;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
}

button:hover {
  background: #00ddb0;
}

/* ===== ANIMATION BINGO ===== */
.bingo-win {
  animation: glow 0.8s infinite alternate;
}

/* ===== TEXTE DANS LES CASES ===== */
.cell span {
  width: 100%;
  word-break: break-word;
  line-height: 1.1;

  /* BASE (fallback si JS ne passe pas) */
  font-size: 12px;
}

@keyframes glow {
  from { text-shadow: 0 0 10px #00ffcc; }
  to { text-shadow: 0 0 30px #00ffcc; }
}

/* TOAST */
#toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(0,0,0,0.8);
  color: white;
  padding: 10px 20px;
  border-radius: 8px;
  opacity: 0;
  transition: 0.3s;
}

#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
