@tailwind base;
@tailwind components;
@tailwind utilities;

/* 基本樣式重置和全局樣式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* 統一字體大小系統 */
  --text-xs: 0.75rem;      /* 12px */
  --text-sm: 0.875rem;     /* 14px */
  --text-base: 1rem;       /* 16px */
  --text-lg: 1.125rem;     /* 18px */
  --text-xl: 1.25rem;      /* 20px */
  --text-2xl: 1.5rem;      /* 24px */
  --text-3xl: 1.875rem;    /* 30px */
  --text-4xl: 2.25rem;     /* 36px */
  
  /* 統一間距系統 - 現代緊湊設計 */
  --spacing-1: 0.25rem;    /* 4px */
  --spacing-2: 0.5rem;     /* 8px */
  --spacing-3: 0.75rem;    /* 12px */
  --spacing-4: 1rem;       /* 16px */
  --spacing-6: 1.5rem;     /* 24px */
  --spacing-8: 2rem;       /* 32px */
  
  /* 統一按鈕高度 - 現代緊湊設計 */
  --btn-sm: 2rem;          /* 32px - 小按鈕 */
  --btn-md: 2.25rem;       /* 36px - 中按鈕 */
  --btn-lg: 2.5rem;        /* 40px - 大按鈕 */
  
  /* 統一圓角 - 現代設計 */
  --radius-sm: 0.5rem;     /* 8px */
  --radius-md: 0.75rem;    /* 12px */
  --radius-lg: 1rem;       /* 16px */
}

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  font-size: var(--text-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#root {
  width: 100%;
  min-height: 100vh;
}

/* 響應式字體大小 */
@media (max-width: 640px) {
  body {
    font-size: 0.875rem; /* 14px on mobile */
  }
}

@media (min-width: 1024px) {
  body {
    font-size: 1rem; /* 16px on desktop */
  }
}

/* 動畫工具類 */
@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slide-in-from-bottom-4 {
  from {
    transform: translateY(1rem);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes zoom-in-95 {
  from {
    transform: scale(0.95);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.animate-in {
  animation-duration: 0.3s;
  animation-timing-function: ease-out;
  animation-fill-mode: both;
}

.fade-in {
  animation-name: fade-in;
}

.slide-in-from-bottom-4 {
  animation-name: slide-in-from-bottom-4;
}

.zoom-in-95 {
  animation-name: zoom-in-95;
}

.duration-500 {
  animation-duration: 500ms;
}

/* 滾動條隱藏 */
.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

/* 動畫工具類補充 */
@keyframes slide-in-from-right {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.slide-in-from-right {
  animation-name: slide-in-from-right;
}

@keyframes slide-in-from-top-4 {
  from {
    transform: translateY(-1rem);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.slide-in-from-top-4 {
  animation-name: slide-in-from-top-4;
}
