body {
  margin: 0;
  padding: 0;
  font-family: sans-serif;
  background-color: #222;
  color: #fff;
  text-align: center;
}

.screen {
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}


/* 基本グリッド＋アニメ */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 100px);
  grid-gap: 10px;
  justify-content: center;
  margin-top: 20px;
}

.hole {
  width: 100px;
  height: 100px;
  background-color: #555;
  border-radius: 10px;
  position: relative;
}

.mole {
  width: 80px;
  height: 80px;
  background-color: brown;
  border-radius: 50%;
  position: absolute;
  bottom: -80px;
  left: 10px;
  transition: bottom 0.2s;
}

.mole.up {
  bottom: 10px;
  cursor: pointer;
}


/*吹き出しとキャラ演出*/
#character-box {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  transition: opacity 1s;
  margin: 20px;
}

#character-box.show {
  opacity: 1;
}

#character {
  width: 100px;
  height: auto;
  margin-right: 10px;
}

.balloon {
  background: #fff;
  color: #000;
  padding: 10px;
  border-radius: 10px;
  position: relative;
}
.balloon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: -10px;
  border: 10px solid transparent;
  border-right-color: #fff;
  transform: translateY(-50%);
}


/* モグラ出現にバウンド感を追加 */
.mole {
  transition: bottom 0.2s, transform 0.2s;
}

.mole.up {
  bottom: 10px;
  transform: scale(1.1); /* 少し大きくなる */
}

/* クリック時にスコア加算のアニメ演出 */
#score-effect .plus-one {
  position: absolute;
  color: yellow;
  font-weight: bold;
  font-size: 24px;
  animation: pop 0.6s ease-out forwards;
}

@keyframes pop {
  0% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-30px);
  }
}
