/* Eng Flash v3 樣式 */

* {
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC",
    "Microsoft JhengHei", "Noto Sans TC", sans-serif;
  overscroll-behavior-y: none;
}

/* 錄音按鈕 pulse */
.animate-pulse {
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  animation: ring 1.2s infinite;
}

@keyframes ring {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { box-shadow: 0 0 0 20px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* iPhone 安全區 */
@supports (padding: env(safe-area-inset-top)) {
  header {
    padding-top: env(safe-area-inset-top);
  }
}

/* 可點單字 */
.clickable-word {
  transition: all 0.15s ease;
}

.english-text {
  line-height: 1.7;
  word-break: break-word;
}

/* 錯誤標示 (波浪紅底線) - 已用 Tailwind 的 decoration-wavy + decoration-red-500 */

/* popup 滑入 */
#word-popup:not(.hidden) > div {
  animation: slideUp 0.2s ease-out;
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* 點擊優化 */
button, [data-action], [data-word] {
  touch-action: manipulation;
}

/* 展開/收合旋轉 */
.rotate-180 {
  transform: rotate(180deg);
}
