/* 2048 게임 전용 스타일 (공통 패널/통계/결과 UI는 assets/css/common.css 참고) */

.game-2048-app {
  margin-top: 1rem;
}

.board-2048 {
  position: relative;
  width: min(92vw, 420px);
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  padding: 10px;
  box-sizing: border-box;
  background: #b8a48f;
  border-radius: 14px;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.25), 0 6px 18px rgba(0, 0, 0, 0.22);
}

.grid-bg,
.tile-layer {
  position: absolute;
  inset: 10px;
}

.grid-bg {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, 1fr);
  gap: 10px;
}

.grid-cell {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 8px;
}

.tile-layer {
  z-index: 2;
}

.tile {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-weight: 800;
  font-size: 1.7rem;
  color: #5c4a37;
  background: #eee4da;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.3), inset 0 -3px 0 rgba(0, 0, 0, 0.12), 0 3px 6px rgba(0, 0, 0, 0.2);
  transition: transform 110ms ease-in-out;
  will-change: transform;
}

.tile.tile-pop {
  animation: tilePop 140ms ease-out;
}

@keyframes tilePop {
  0% { transform: scale(0.5); }
  70% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

.tile.tile-merge-pop {
  animation: mergePop 140ms ease-out;
}

@keyframes mergePop {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

.tile-v2 { background: #eee4da; color: #5c4a37; }
.tile-v4 { background: #ede0c8; color: #5c4a37; }
.tile-v8 { background: #f2b179; color: #fff; }
.tile-v16 { background: #f59563; color: #fff; }
.tile-v32 { background: #f67c5f; color: #fff; }
.tile-v64 { background: #f65e3b; color: #fff; }
.tile-v128 { background: #edcf72; color: #fff; }
.tile-v256 { background: #edcc61; color: #fff; }
.tile-v512 { background: #edc850; color: #fff; }
.tile-v1024 { background: #edc53f; color: #fff; }
.tile-v2048 { background: #edc22e; color: #fff; box-shadow: 0 0 18px rgba(237, 194, 46, 0.75); }
.tile-super { background: #3c3a32; color: #f8f5f0; }

.tile.tile-len4 { font-size: 1.35rem; }
.tile.tile-len5 { font-size: 1.1rem; }

.score-row {
  display: flex;
  gap: 0.8rem;
}

.score-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem 0.9rem;
  text-align: center;
  min-width: 72px;
}

.score-box .stat-label {
  display: block;
}

.board-wrap {
  position: relative;
  margin: 1.2rem 0;
}

@media (max-width: 480px) {
  .tile {
    font-size: 1.3rem;
  }

  .tile.tile-len4 { font-size: 1.05rem; }
  .tile.tile-len5 { font-size: 0.9rem; }
}
