body {
  margin: 0;
  background-color: #f3e2ca;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

/* 게임판 캔버스 스타일 */
canvas {
  background-color: #fff4e6;
  border: 2px solid #ffcc99;
}

/* ✅ 추가 시작: 게임판 + 우측 UI 래퍼 */
#gameWrapper {
  position: relative;
  display: inline-block;
}

#nextFruitUI {
  position: absolute;
  top: 5px;       /* 캔버스를 살짝 덮도록 */
  right: -90px;    /* 오른쪽으로 살짝 튀어나오게 */
  width: 128px;
  height: 92px;
  pointer-events: none; /* 클릭 차단 */
}

#nextFruitUI img {
  position: absolute;
  top: 0;
  left: 0;
  width: 128px;
  height: 92px;
}

#nextCanvas {
  position: absolute;
  top: 15px;      /* 이미지 기준 중앙 보정 */
  left: 55px;
  width: 140px;   /* 60 * 1.5 */
  height: 140px;
  background: transparent;
  border: none;
}

#scoreUI {
  position: absolute;
  top: 120px;        /* 미리보기 아래에 붙이기 */
  right: -90px;
  width: 128px;
  height: 92px;
}

#scoreUI img {
  width: 128px;
  height: 92px;
}

#scoreText {
  position: absolute;
  top: 44px;
  left: 40px; /* 중앙에 오도록 왼쪽 여백 조정 */
  right: auto;
  font-family: 'ONE Mobile POP', sans-serif;
  font-size: 26px;
  font-weight: bold;
  color: #333;
  text-align: center;  /* 중앙 정렬 */
  width: 80px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


#scoreText.updated {
  animation: pop 0.2s ease;
}

@keyframes pop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.3); }
  100% { transform: scale(1); }
}

#leftUI {
  position: absolute;
  top: 0;
  left: -569px; /* ✅ 이미지 오른쪽이 게임판 왼쪽에 딱 붙게 */
  width: 569px;
  height: 720px;
  z-index: 10;
}

#leftUI img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* 또는 cover, 필요 시 */
}


#leftUI,
#scoreUI,
#nextFruitUI {
  display: none;
}

button:focus {
  outline: none;
}


#audioControls {
  margin-top: 16px;
  display: flex;
  justify-content: center;
  gap: 12px;
}

#audioControls button {
  font-size: 18px;
  padding: 8px 16px;
  border: 2px solid #ffa;
  background-color: #fff8dc;
  border-radius: 8px;
  cursor: pointer;
  font-family: 'ONE Mobile POP', sans-serif;
}

#audioControls button:hover {
  background-color: #fff2b5;
}

button:focus {
  outline: none;
}



#rightUI {
  position: absolute;
  bottom: 70px;       /* ✅ 아래에서 40px 위로 */
  right: 150px;      /* ✅ 게임판 오른쪽 바깥으로 */
  width: 140px;
  height: auto;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;          /* 버튼 간 간격 */
}


#rightUI button {
  width: 120px;
  font-size: 16px;
  padding: 10px 12px;        /* ✅ 패딩 살짝 넓게 */
  background-color: #ffffcc;
  border: 2px solid #999;
  border-radius: 8px;
  font-family: 'ONE Mobile POP', sans-serif;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);  /* ✅ 약간 입체감 부여 */
}

#rightUI button:hover {
  background-color: #fff2b5;
}


#rightUI2 {
  position: absolute;
  bottom: 30px;       /* ✅ 아래에서 40px 위로 */
  right: 0px;      /* ✅ 게임판 오른쪽 바깥으로 */
  width: 140px;
  height: auto;
  z-index: 10;
  display: flex;
  flex-direction: coluDAmn;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;          /* 버튼 간 간격 */
}


#rightUI2 button {
  width: 120px;
  font-size: 16px;
  padding: 10px 12px;        /* ✅ 패딩 살짝 넓게 */
  background-color: #ffffcc;
  border: 2px solid #999;
  border-radius: 8px;
  font-family: 'ONE Mobile POP', sans-serif;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);  /* ✅ 약간 입체감 부여 */
}

#rightUI2 button:hover {
  background-color: #fff2b5;
}

#manualUI {
  position: absolute;
  bottom: 40px;       /* ✅ 하단에서 위로 띄우기 */
  right: -150px;      /* ✅ 게임판 오른쪽 바깥으로 */
  width: 140px;
  z-index: 5;
}

#manualUI img {
  width: 100%;        /* 부모에 맞게 리사이징 */
  height: auto;
  object-fit: contain;
}


#rightUI,
#rightUI2,
#manualUI {
  display: none;
}
