/* FlightWatch 自訂樣式 */
/* 補充 Tailwind CSS 未涵蓋的樣式 */

/* 全域設定 */
* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans TC',
    'Microsoft JhengHei', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 輸入框焦點樣式增強 */
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* 按鈕按下效果 */
button:active {
  transform: scale(0.98);
}

/* 載入動畫 */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(59, 130, 246, 0.3);
  border-radius: 50%;
  border-top-color: #3b82f6;
  animation: spin 1s linear infinite;
}

/* 價格變動動畫 */
@keyframes priceChange {
  0% {
    background-color: rgba(34, 197, 94, 0.2);
  }
  100% {
    background-color: transparent;
  }
}

.price-change-highlight {
  animation: priceChange 2s ease-out;
}

/* 卡片 hover 效果增強 */
.watch-card {
  transition: all 0.2s ease-in-out;
}

.watch-card:hover {
  transform: translateY(-2px);
}

/* 響應式調整 */
@media (max-width: 640px) {
  body {
    font-size: 14px;
  }

  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.25rem;
  }
}

/* PWA 安裝提示樣式 */
.install-prompt {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  padding: 16px 24px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  max-width: 90%;
}

/* 無障礙設計：跳過導覽連結 */
.skip-to-content {
  position: absolute;
  top: -40px;
  left: 0;
  background: #3b82f6;
  color: white;
  padding: 8px;
  text-decoration: none;
  border-radius: 0 0 4px 0;
}

.skip-to-content:focus {
  top: 0;
}

/* 深色模式支援（Phase 2 功能，先預留） */
@media (prefers-color-scheme: dark) {
  /* 未來實作深色模式時啟用 */
  /*
  body {
    background-color: #1f2937;
    color: #f9fafb;
  }
  */
}
