body {
  font-family: "Noto Sans TC", sans-serif;
  background-color: #f5f7fa;
  text-align: center;
  margin: 0;
  padding: 30px;
}
h2 { color: #333; margin-bottom: 20px; }

button {
  font-size: 16px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
}
button:active { transform: scale(0.95); }
button:disabled { opacity: 0.6; cursor: not-allowed; }

#modeBtn {
  background: linear-gradient(45deg, #B47E7F, #B47E7F);
  color: white;
  padding: 10px 20px;
  border-radius: 30px;
  font-weight: 600;
}

/* 🎙 錄音按鈕 */
#recordBtn {
  justify-content: center;
  align-items: center;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: none;
  background: radial-gradient(circle at center, #8BBF9F, #8BBF9F);
  color: white;
  font-size: 12px; /* 🎙放大 */
  box-shadow: 0 0 15px rgba(76, 175, 80, 0.6);
  margin-top: 25px;
  transition: all 0.3s ease;
}
#recordBtn svg {
  width: 75px;
  height: 75px;
  fill: white;
}

#recordBtn:hover {
  transform: scale(1.08);
  box-shadow: 0 0 25px rgba(76, 175, 80, 0.9);
}
#recordBtn.recording {
  background: radial-gradient(circle at center, #f44336, #b71c1c);
  box-shadow: 0 0 30px rgba(244, 67, 54, 0.8);
  animation: pulse 1.2s infinite;
}
@keyframes pulse {
  0% { transform: scale(1); box-shadow: 0 0 20px rgba(244,67,54,0.8); }
  50% { transform: scale(1.1); box-shadow: 0 0 40px rgba(244,67,54,0.6); }
  100% { transform: scale(1); box-shadow: 0 0 20px rgba(244,67,54,0.8); }
}

/* 📤 提交按鈕 */
#submitBtn {
  background: linear-gradient(45deg, #F7D08A, #F7D08A);
  color: white;
  padding: 10px 22px;
  border-radius: 30px;
  margin-top: 20px;
  font-weight: 600;
}

textarea {
  width: 90%;
  height: 100px;
  margin: 10px auto;
  display: block;
  font-size: 16px;
  border-radius: 8px;
  padding: 8px;
  border: 1px solid #ccc;
}
audio {
  margin-top: 15px;
  width: 90%;
  border-radius: 8px;
}
/* .play-btn {
  font-size: 1.5em;
  padding: 10px 20px;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  background: linear-gradient(135deg, #4caf50, #81c784);
  color: white;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  transition: all 0.2s ease-in-out;
}

.play-btn:hover {
  background: linear-gradient(135deg, #43a047, #66bb6a);
  transform: scale(1.05);
} */

#resultArea {
  margin-top: 25px;
  background: white;
  padding: 20px;
  border-radius: 15px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
  text-align: left;
  display: inline-block;
  width: 100%;
  max-width: 600px;  
}

#playBtn {
  justify-content: center;
  align-items: center;
  width: 120px;
  height: 40px;
  border-radius: 30px;
  border: none;
  background: linear-gradient(45deg, #F7D08A, #F7D08A);
  color: white;
  font-size: 24px;
  font-weight: 600;
  box-shadow: 0 0 12px rgba(247, 208, 138, 0.6);
  margin-top: 25px;
  transition: all 0.3s ease;
  cursor: pointer;
}

/* hover 效果 */
#playBtn:hover {
  transform: scale(1.08);
  box-shadow: 0 0 22px rgba(247, 208, 138, 0.9);
}

/* 播放中動畫（紅色閃爍） */
#playBtn.playing {
  background: linear-gradient(45deg, #B47E7F, #B47E7F);
  box-shadow: 0 0 25px rgba(244, 67, 54, 0.8);
  animation: pulsePlay 1.2s infinite;
  font-size: 24px;
  font-weight: 600;
}

.play-btn .icon svg {
  justify-content: center;
  align-items: center;
  width: 30%;   /* 寬度佔按鈕 60% */
  height: auto; /* 高度自動保持比例 */
}

@keyframes pulsePlay {
  0%   { transform: scale(1);   box-shadow: 0 0 15px rgba(244,67,54,0.8); }
  50%  { transform: scale(1.07); box-shadow: 0 0 35px rgba(244,67,54,0.6); }
  100% { transform: scale(1);   box-shadow: 0 0 15px rgba(244,67,54,0.8); }
}
