/**
 * Creator.com.tw — 主要樣式表
 *
 * 設計風格：Apple / Stripe / Linear.app / Vercel
 * 特色：極簡、留白、現代、Professional
 *
 * 使用 CSS Variables 方便未來擴充
 * 所有 CSS / JS 採用 Version Query 方便 Cloudflare Cache 更新
 */

/* ============================================================
   CSS Variables — 全域設計權杖
   ============================================================ */
:root {
  /* 顏色系統 */
  --color-primary: #111827;
  --color-secondary: #4F46E5;
  --color-background: #F8FAFC;
  --color-card: #FFFFFF;
  --color-accent: #2563EB;
  --color-text: #1F2937;
  --color-text-secondary: #6B7280;
  --color-text-muted: #9CA3AF;
  --color-border: #E5E7EB;
  --color-white: #FFFFFF;

  /* 字體系統 */
  --font-family: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* 間距系統 */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-2xl: 4rem;
  --spacing-3xl: 6rem;

  /* 圓角 */
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;

  /* 陰影 */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);

  /* 轉場 */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;

  /* 最大寬度 */
  --max-width: 800px;
}

/* ============================================================
   Reset — 統一各瀏覽器預設樣式
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  background-color: var(--color-background);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================================
   Skip Link — 無障礙快捷鍵
   ============================================================ */
.skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--color-primary);
  color: var(--color-white);
  padding: var(--spacing-xs) var(--spacing-md);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  z-index: 1000;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: var(--spacing-sm);
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* ============================================================
   Main — 主要內容區域
   ============================================================ */
.main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-xl) var(--spacing-md);
}

.container {
  width: 100%;
  max-width: var(--max-width);
  text-align: center;
}

/* ============================================================
   Logo — 網站標誌
   ============================================================ */
.logo {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: -0.02em;
  margin-bottom: var(--spacing-xs);
  opacity: 0;
  animation: fadeIn 0.6s ease forwards;
}

/* ============================================================
   Subtitle — 副標題
   ============================================================ */
.subtitle {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--color-secondary);
  margin-bottom: var(--spacing-md);
  opacity: 0;
  animation: fadeIn 0.6s ease 0.15s forwards;
}

/* ============================================================
   Content — 內文區域
   ============================================================ */
.content {
  font-size: 1rem;
  color: var(--color-text-secondary);
  line-height: 1.8;
  margin-bottom: var(--spacing-lg);
  opacity: 0;
  animation: fadeIn 0.6s ease 0.3s forwards;
}

.content p + p {
  margin-top: var(--spacing-xs);
}

/* ============================================================
   Badge — 狀態徽章
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--spacing-xs) var(--spacing-md);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  box-shadow: var(--shadow-sm);
  opacity: 0;
  animation: fadeIn 0.6s ease 0.45s forwards;
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}

.badge:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.badge:focus-within {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.badge__icon {
  font-size: 1rem;
  line-height: 1;
}

.badge__text {
  line-height: 1.4;
}

/* ============================================================
   Footer — 頁尾
   ============================================================ */
.footer {
  text-align: center;
  padding: var(--spacing-lg) var(--spacing-md);
  border-top: 1px solid var(--color-border);
  opacity: 0;
  animation: fadeIn 0.6s ease 0.6s forwards;
}

.footer__copyright {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-bottom: var(--spacing-sm);
}

.footer__disclaimer {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto;
}

/* ============================================================
   Animations — 動畫定義
   ============================================================ */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================================
   Accessibility — 減少動畫偏好
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ============================================================
   Responsive — Tablet (768px 以下)
   ============================================================ */
@media (max-width: 768px) {
  .logo {
    font-size: 1.75rem;
  }

  .subtitle {
    font-size: 1.125rem;
  }

  .main {
    padding: var(--spacing-lg) var(--spacing-md);
  }
}

/* ============================================================
   Responsive — Mobile (480px 以下)
   ============================================================ */
@media (max-width: 480px) {
  .logo {
    font-size: 1.5rem;
  }

  .subtitle {
    font-size: 1rem;
  }

  .content {
    font-size: 0.9375rem;
  }

  .badge {
    font-size: 0.8125rem;
    padding: 0.375rem 0.875rem;
  }

  .footer__disclaimer {
    font-size: 0.6875rem;
  }
}

/* ============================================================
   Print — 列印樣式
   ============================================================ */
@media print {
  body {
    background-color: #fff;
    color: #000;
  }

  .badge {
    box-shadow: none;
    border: 1px solid #ccc;
  }

  .footer {
    border-top: 1px solid #ccc;
  }
}
