html, body {
	height:100%; background:#000; color:#fff;
	background-image:linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)),url(../assets/img/k2lbackground.jpg);
	background-size: cover;
	background-repeat: no-repeat;
}
#board {
  position: relative;
  display: grid;
  gap: 2px;
  width: 100%;
  height: 85vh;
}

#grid-layer {
  display: grid;
  grid-template-columns: repeat(COLS, 1fr); /* ajusta dinámicamente */
  gap: 1px;
}

#players-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

#mesg-layer {
  width: 100%;
  min-height: 5vh;
  height: 5vh;
  pointer-events: none;
  padding: 5px;
}

#cycle-timer{
	font-size: 3rem;	
	color:red;
}

/* ------------------------- celdas -------------------------- */

.cell {
  position: relative;
  
  font-weight: bold;
  font-size: 1rem;
  color: black;
  
  border: 1px dashed #333;  
  transition: background-color 0.5s;
}

.terrain-life {
  position: absolute;
  top: -3px;
  left: 3px;
  
  color: grey;
  font-size: 1rem; 
  
  z-index: 1;
  opacity: 0.5;
}
.terrain-value {
  position: absolute;
  bottom: -3px;
  right: 3px; 
  
  font-size: 1rem; 
  color: black;
  
  z-index: 1;
  opacity: 0.75;
}

@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}

.blinking {
    animation: blink 1s infinite;
    font-weight: bold;
}

/* ------------------------- jugadores -------------------------- */

#player-box{
	width:100%;
}
.player {
  position: absolute;
  z-index: 10;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  text-align: center;
  
  width: 25px;
  height: 25px;
  
  margin-left:15px;
  margin-top:15px;

  font-size: 0.7rem;
  font-weight: bold;
  color: black;

  border-radius: 50%;

  background-color: transparent;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;

  transition: top 0.3s ease, left 0.3s ease;
}
.player-life {
  position: relative;
  top:30px;
  z-index: 11;
  
  margin-top:5px; 
  font-size: 0.65rem;
  opacity: 1;
  text-shadow: 1px 1px 3px black;
}
.player-avatar {
  position: relative;
  top:7px;
  width: 45px;
  filter: drop-shadow(2px 2px 3px rgba(0,0,0,1));
}
.player-name {
  position: relative;
  bottom:2px;
  
  font-size: 0.70rem;
  font-weight: bold;
  color:white;
  text-shadow: 2px 2px 2px black;
}
.player-self{
  z-index: 10;
}
.avatar-self {
  filter: drop-shadow(0 0 10px gold) drop-shadow(0 0 8px orange);
  animation: pulse 1.5s infinite;
}
@keyframes pulse-shadow {
  0%   { filter: drop-shadow(0 0 4px gold) drop-shadow(0 0 8px orange); }
  50%  { filter: drop-shadow(0 0 8px gold) drop-shadow(0 0 12px orange); }
  100% { filter: drop-shadow(0 0 4px gold) drop-shadow(0 0 8px orange); }
}

/* ------------------------- preguntas -------------------------- */

.question-modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}
.question-modal.hidden {
  display: none;
}
.question-content {
  background: #222;
  color: white;
  padding: 2rem;
  border-radius: 10px;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
  position: relative;
}
.close-btn {
  position: absolute;
  top: 10px; right: 15px;
  font-size: 1.5rem;
  cursor: pointer;
}
