body{
  font-family: 'Arial', sans-serif;
  background-color: #faf7f2;
  margin: 0;
  padding: 20px;
  min-height: 100vh;
}

.container {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
  background: white;
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

h1{
  color: #8B4513;
  font-size: 2.5em;
  margin-bottom: 30px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.cat-container {
  margin: 20px 0;
}

#cat-image {
  width: 300px;
  height: 300px;
  object-fit: contain; /* 縦横比を保持して画像全体を表示 */
  border-radius: 15px; /* 角を丸くする */
  cursor: pointer;
  transition: transform 0.3s ease;
  border: 5px dolid #ff9a56;
  position: relative;
}

#cat-image:hover {
  transform: scale(1.1);
}

.balloon-area {
  height: 120px; /* 吹き出しエリアの高さを固定 */
  display: flex;
  align-items: center; /* 縦方向中央揃え */
  justify-content: center; /* 横方向中央揃え */
  margin-bottom: 20px; /* ねことの間隔 */
}

.balloon {
  background: linear-gradient(135deg, #fff3cd, #ffeaa7);
  border: 3px solid #ff9a56;
  border-radius: 20px;
  padding: 20px;
  margin: 20px 0;
  position: relative;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: 0 4px 15px rgba(255, 154, 86, 0.3);
  backdrop-filter: blur(5px);
}

.balloon::before {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  border-top: 15px solid #ff9a56;
}

#balloon-text {
  margin: 0;
  font-size: 1.1em;
  color: #333;
  line-height: 1.5;
  text-align: center;
  width: 100%;
  font-weight: 500;
}

.balloon.short-text #balloon-text {
  font-size: 1.3em;
  font-weight: bold;
  color: #d63031;
}

.balloon.lomg-text {
  align-items: flex-start;
  padding-top: 25px;
}

.button-container {
  margin-top: 30px;
}

button {
  background: linear-gradient(45deg, #ff9a56, #ffad56);
  border: none;
  color: white;
  padding: 12px 24px;
  margin: 0 8px;
  border-radius: 25px;
  cursor: pointer;
  font-size: 1em;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 154, 86, 0.3);
}

button:hover {
  transform: translateX(-2px);
  box-shadow: 0 6px 20px rgba(255, 154, 86, 0.4);
}

button:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(255, 154, 86, 0.3);
}

.clock-container {
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    border: 2px solid #ff9a56;
    box-shadow: 0 4px 15px rgba(255, 154, 86, 0.2);
    backdrop-filter: blur(5px); 
}

.digital-clock {
    font-family: 'Courier New', monospace;
    font-size: 1.2em;
    font-weight: bold;
    color: #8B4513;
    text-align: center;
    letter-spacing: 1px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}


@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* レスポンシブデザイン */
@media screen and (max-width: 768px) {
  .container{
    margin: 10px;
    padding: 20px;
  }

  h1 {
    font-size: 1.5em;
  }

  #cat-image{
    width: 150px;
    height: 150px;
  }

  button {
    display: block;
    width: 100%;
    margin: 8px 0;
  }

  .balloon {
    margin: 15px 10px; /* 左右のmarginを調整 */
    padding: 15px;
    max-width: calc(100% - 40px); /* 画面幅に合わせて調整を追加 */
  }
  #balloon-text {
    font-size: 1.0em; /* モバイルでは少し小さめに設定 */
    line-height: 1,4;
  }

  .balloon.short-text #balloon-text {
    font-size: 1.2em;
  }

  .digital-clock {
    font-size: 1em;
    letter-spacing: 0.5px;
  }
    
  .clock-container {
    margin-bottom: 15px;
    padding: 12px;
  }
}