@charset "utf-8";

/* コンテナ設定（1.8倍サイズ） */
#robot-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  /* ★変更：120px -> 216px */
  width: 180px; 
  height: auto;
  cursor: pointer;
  z-index: 9999;
  font-family: "GothicMB101", sans-serif;
  overflow: visible;
  transition: transform 0.2s;
}

/* 画像の設定 */
#robot-img {
  width: 100%;
  height: auto;
  display: block;
  image-rendering: -webkit-optimize-contrast; 
}

/* ホバー時のアクション */
#robot-container:hover {
  transform: translateY(-5px);
}

/* 浮遊アニメーション */
.floating {
  animation: floatBody 3s ease-in-out infinite;
}
@keyframes floatBody {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}

/* ▼▼▼ 激怒モード（画像用） ▼▼▼ */
.angry img {
  animation: angryShake 0.3s infinite;
  filter: sepia(1) hue-rotate(-50deg) saturate(3) contrast(1.2); 
}

@keyframes angryShake {
  0% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(-5px, 0) rotate(-5deg); }
  75% { transform: translate(5px, 0) rotate(5deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}

/* 考え中（軽く揺れる） */
.thinking img {
  animation: thinkShake 0.4s infinite;
}
@keyframes thinkShake {
  0% { transform: rotate(0deg); }
  25% { transform: rotate(2deg); }
  75% { transform: rotate(-2deg); }
  100% { transform: rotate(0deg); }
}

/* ▼▼▼ 吹き出し（位置調整なしでOK） ▼▼▼ */
#message-bubble {
  position: absolute;
  /* top: 0; を削除して、以下2行に変更 */
  top: 30%;  
  transform: translate(-10px, -50%); /* 左に10px隠しつつ、縦を真ん中に補正 */
  
  right: 110%; /* 本体の左側に配置 */
  width: auto;
  min-width: 120px;
  max-width: 60vw;
  white-space: nowrap;
  line-height: 1.1;
  
  background: white;
  border: 2px solid #333;
  color: #333;
  padding: 10px 15px;
  border-radius: 15px;
  font-size: 13px;
  font-weight: bold;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  pointer-events: none;
  z-index: 10000;
}
/* しっぽの位置調整（少し大きくした方がバランス良いかもだけど、そのままでOK） */
#message-bubble::after {
  content: '';
  position: absolute;
  right: -12px;
  top: 50%;
  transform: translateY(-50%);
  border-width: 10px 0 10px 12px;
  border-style: solid;
  border-color: transparent transparent transparent #333;
}
#message-bubble::before {
  content: '';
  position: absolute;
  right: -9px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  border-width: 8px 0 8px 10px;
  border-style: solid;
  border-color: transparent transparent transparent #333;
}

#robot-container:hover #message-bubble,
#message-bubble.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

/* ▼▼▼ スマホ対応（スマホでは非表示にする） ▼▼▼ */
@media screen and (max-width: 768px) {
  #robot-container {
    display: none !important; /* ★ここがポイント：強制的に消す！ */
  }
}