/* РАХУНОК */
.score-box {
  background: #e8f0f8;
  padding: 8px 15px;
  border-radius: 12px;
  font-weight: 800;
  color: #1b3b5a;
  font-size: 16px;
}

/* ІГРОВЕ ПОЛЕ */
.board-2048 {
  width: 100%;
  max-width: 320px;
  background: #a9c2d9; /* Колір сітки (темніший блакитний) */
  border-radius: 15px;
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, 1fr);
  gap: 10px;
  margin: 0 auto;
  aspect-ratio: 1 / 1;
  position: relative;
}

/* Пусті клітинки фону */
.grid-cell {
  background: rgba(255, 255, 255, 0.4);
  border-radius: 10px;
}

#tiles-container-2048 {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  bottom: 10px;
  pointer-events: none; /* Щоб не блокувати свайпи */
}

/* КУБИКИ (ТАЙЛИ) */
.tile {
  position: absolute;
  width: calc(25% - 7.5px);
  height: calc(25% - 7.5px);
  border-radius: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: 900;
  font-size: 28px;
  color: #1b3b5a;
  /* ФІКС: Тепер анімується не тільки розмір, а й переміщення по екрану! */
  transition:
    top 0.15s ease-in-out,
    left 0.15s ease-in-out,
    transform 0.15s ease-in-out;
  z-index: 10;
}
/* ПАЛІТРА ВІДТІНКІВ БЛАКИТНОГО (Світла та приємна) */
.tile-2 {
  background: #f0f8ff;
  color: #1b3b5a;
} /* Майже білий */
.tile-4 {
  background: #e1f5fe;
  color: #1b3b5a;
}
.tile-8 {
  background: #b3e5fc;
  color: #1b3b5a;
}
.tile-16 {
  background: #81d4fa;
  color: #1b3b5a;
}
.tile-32 {
  background: #4fc3f7;
  color: white;
}
.tile-64 {
  background: #29b6f6;
  color: white;
}
.tile-128 {
  background: #03a9f4;
  color: white;
  font-size: 24px;
  box-shadow: 0 0 10px rgba(3, 169, 244, 0.3);
}
.tile-256 {
  background: #0288d1;
  color: white;
  font-size: 24px;
  box-shadow: 0 0 15px rgba(2, 136, 209, 0.4);
}
.tile-512 {
  background: #0277bd;
  color: white;
  font-size: 24px;
  box-shadow: 0 0 15px rgba(2, 119, 189, 0.5);
}
.tile-1024 {
  background: #01579b;
  color: white;
  font-size: 20px;
  box-shadow: 0 0 20px rgba(1, 87, 155, 0.6);
}
.tile-2048 {
  background: #1a237e;
  color: #ffd700;
  font-size: 20px;
  box-shadow: 0 0 25px rgba(26, 35, 126, 0.7);
}
/* Для кубиків 4096+ */
.tile-super {
  background: #000000;
  color: #ffd700;
  font-size: 18px;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
}

/* НАГОРОДИ ПІД ПОЛЕМ */
.milestones-container {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  background: #f5f7fa;
  padding: 15px;
  border-radius: 15px;
}

.milestone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}

/* Коли нагороду забрано - стає напівпрозорим */
.milestone.claimed {
  opacity: 0.3;
  filter: grayscale(100%);
}

.ms-tile {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: 900;
  font-size: 16px;
}

.ms-reward {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 14px;
  font-weight: 900;
  color: #b8860b;
}

.ms-reward img {
  width: 16px;
  height: 16px;
}
