/* =============================================================
   澳洲打工度假 App — Design System
   調色板：澳洲沙漠夕陽 × 編輯設計風
   ============================================================= */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght,SOFT@9..144,400;9..144,500;9..144,600;9..144,700;9..144,800&family=DM+Sans:wght@400;500;600;700&display=swap');

:root {
  /* Colors */
  --bg:           #F4ECDC;           /* 暖奶油 */
  --bg-soft:      #EBE0CB;
  --surface:      #FBF7EF;
  --ink:          #1A1B1E;           /* 文字深炭 */
  --ink-muted:    #5C5A52;
  --ink-faint:    #9A968A;
  --line:         #DDD2BC;

  --teal:         #0E4A5C;           /* 深海洋藍綠 — 主色 */
  --teal-deep:    #082F3C;
  --teal-soft:    #C9DDE2;

  --sunset:       #C25538;           /* 夕陽橘紅 — 強調色 */
  --sunset-soft:  #F5D8CC;
  --ochre:        #C99A3F;           /* 赭黃 */
  --olive:        #6B7A4A;           /* 灌木橄欖 */

  /* Typography */
  --font-display: 'Fraunces', 'Noto Serif TC', Georgia, serif;
  --font-body:    'DM Sans', 'Noto Sans TC', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Spacing & Radius */
  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 28px;

  /* Shadow */
  --shadow-soft: 0 1px 2px rgba(26,27,30,.04), 0 8px 24px rgba(26,27,30,.06);
  --shadow-card: 0 2px 4px rgba(26,27,30,.04), 0 12px 32px rgba(26,27,30,.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse at 100% 0%, rgba(194,85,56,.08), transparent 50%),
    radial-gradient(ellipse at 0% 100%, rgba(14,74,92,.06), transparent 50%);
  background-attachment: fixed;
}

a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--sunset); }

/* Display headings */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 36, "SOFT" 50;
  color: var(--ink);
}

h1 { font-size: clamp(2rem, 6vw, 3.2rem); line-height: 1.05; font-weight: 700; }
h2 { font-size: clamp(1.4rem, 4vw, 2rem); line-height: 1.15; }
h3 { font-size: 1.15rem; line-height: 1.3; }

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sunset);
}

.muted { color: var(--ink-muted); }
.faint { color: var(--ink-faint); }

/* =============================================================
   Layout
   ============================================================= */
.app-shell {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px 120px;
}

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 0 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
}

.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  display: flex; align-items: center; gap: 8px;
  color: var(--teal-deep);
}

.brand .dot {
  width: 8px; height: 8px; border-radius: 999px;
  background: var(--sunset);
  display: inline-block;
}

.user-chip {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.85rem; color: var(--ink-muted);
}

.user-chip img { width: 28px; height: 28px; border-radius: 999px; object-fit: cover; }

/* Bottom nav (mobile-first) */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0;
  background: rgba(251,247,239,.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  z-index: 50;
}

.bottom-nav-inner {
  max-width: 720px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(5, 1fr);
}

.bottom-nav a {
  padding: 12px 6px 14px;
  text-align: center;
  color: var(--ink-faint);
  font-size: 0.7rem;
  font-weight: 500;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  border-top: 2px solid transparent;
  transition: color .2s, border-color .2s;
}

.bottom-nav a.active {
  color: var(--teal-deep);
  border-top-color: var(--sunset);
}

.bottom-nav svg { width: 22px; height: 22px; stroke-width: 1.6; }

/* =============================================================
   Cards & Surfaces
   ============================================================= */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-soft);
}

.card-tight { padding: 16px; }

.section-title {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 32px 0 14px;
}

/* =============================================================
   Forms
   ============================================================= */
.field { display: block; margin-bottom: 14px; }

.field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 6px;
}

input[type="text"], input[type="number"], input[type="email"],
input[type="date"], input[type="search"], select, textarea {
  width: 100%;
  background: var(--bg-soft);
  border: 1px solid transparent;
  border-radius: var(--r-md);
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  transition: border-color .15s, background .15s;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--teal);
  background: var(--surface);
}

textarea { resize: vertical; min-height: 80px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px;
  border: none; border-radius: 999px;
  font-family: var(--font-body); font-size: 0.95rem; font-weight: 600;
  cursor: pointer;
  transition: transform .1s, box-shadow .15s, background .15s;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--teal-deep); color: var(--bg);
}
.btn-primary:hover { background: var(--teal); }

.btn-accent {
  background: var(--sunset); color: var(--bg);
  box-shadow: 0 4px 14px rgba(194,85,56,.3);
}
.btn-accent:hover { background: #B14A30; }

.btn-ghost {
  background: transparent; color: var(--teal-deep);
  border: 1px solid var(--line);
}
.btn-ghost:hover { background: var(--bg-soft); }

.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 0.85rem; }

/* Google sign-in */
.btn-google {
  background: #fff; color: #1F1F23;
  border: 1px solid var(--line);
  padding: 12px 22px;
}

.btn-line {
  background: #06C755; color: #fff;
}

/* =============================================================
   Tags / Badges / Chips
   ============================================================= */
.tag {
  display: inline-flex; align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.02em;
  background: var(--teal-soft); color: var(--teal-deep);
}

.tag-sunset { background: var(--sunset-soft); color: var(--sunset); }
.tag-olive { background: #DDE2C8; color: var(--olive); }

/* =============================================================
   List / Items
   ============================================================= */
.list-item {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  gap: 12px;
}
.list-item:last-child { border-bottom: none; }

.list-item .meta { font-size: 0.78rem; color: var(--ink-faint); }

/* =============================================================
   Hero / Login
   ============================================================= */
.hero {
  padding: 60px 0 30px;
  text-align: left;
}

.hero h1 em {
  font-style: italic;
  font-weight: 500;
  font-variation-settings: "opsz" 96, "SOFT" 100;
  color: var(--sunset);
}

.hero p { color: var(--ink-muted); margin-top: 16px; max-width: 540px; }

/* Feature grid on landing */
.feat-grid {
  display: grid; gap: 14px;
  grid-template-columns: 1fr 1fr;
  margin-top: 28px;
}

@media (max-width: 480px) {
  .feat-grid { grid-template-columns: 1fr; }
}

.feat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 18px;
  position: relative;
  overflow: hidden;
}

.feat .num {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 600;
  color: var(--sunset);
  line-height: 1;
  margin-bottom: 10px;
  font-variation-settings: "opsz" 144;
}

.feat h3 { margin-bottom: 6px; }
.feat p { font-size: 0.88rem; color: var(--ink-muted); }

/* =============================================================
   Specials grid
   ============================================================= */
.specials-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

.special-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  display: flex; flex-direction: column;
}

.special-card .thumb {
  aspect-ratio: 1;
  background: var(--bg-soft);
  background-size: contain; background-repeat: no-repeat; background-position: center;
}

.special-card .body { padding: 10px 12px 14px; }
.special-card .name { font-size: 0.85rem; font-weight: 500; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  margin-bottom: 6px;
}
.special-card .price-row { display: flex; align-items: baseline; gap: 8px; }
.special-card .sale {
  font-family: var(--font-display); font-weight: 700; font-size: 1.1rem;
  color: var(--sunset);
}
.special-card .orig { font-size: 0.78rem; color: var(--ink-faint); text-decoration: line-through; }

/* =============================================================
   Translate page specifics
   ============================================================= */
.camera-zone {
  position: relative;
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--r-xl);
  aspect-ratio: 4 / 5;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--ink);
}

.camera-zone video, .camera-zone img {
  width: 100%; height: 100%; object-fit: cover;
  display: block;
}

.camera-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  padding: 24px;
  pointer-events: none;
}

.shutter-btn {
  pointer-events: auto;
  width: 70px; height: 70px; border-radius: 999px;
  background: var(--bg);
  border: 5px solid rgba(255,255,255,.4);
  cursor: pointer;
  transition: transform .15s;
}
.shutter-btn:active { transform: scale(.94); }

.translate-result {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 18px;
  margin-top: 18px;
  border: 1px solid var(--line);
}

.translate-result .source { color: var(--ink-faint); font-size: 0.88rem; margin-bottom: 10px; }
.translate-result .translated {
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1.45;
  color: var(--ink);
}

/* =============================================================
   Exchange rate
   ============================================================= */
.rate-hero {
  background: linear-gradient(135deg, var(--teal-deep) 0%, var(--teal) 100%);
  color: var(--bg);
  border-radius: var(--r-xl);
  padding: 32px 24px;
  position: relative;
  overflow: hidden;
}
.rate-hero::before {
  content: ''; position: absolute; top: -40%; right: -20%;
  width: 280px; height: 280px; border-radius: 999px;
  background: radial-gradient(circle, rgba(194,85,56,.45), transparent 70%);
}

.rate-hero .label { opacity: .7; font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; }
.rate-hero .big {
  font-family: var(--font-display);
  font-size: clamp(3rem, 12vw, 4.6rem);
  font-weight: 700; line-height: 1;
  margin: 8px 0;
  font-variation-settings: "opsz" 144;
}
.rate-hero .delta { font-size: 0.92rem; }
.rate-hero .delta.up { color: #FFB37C; }
.rate-hero .delta.down { color: #8FD9C0; }

/* =============================================================
   Toast / Alert
   ============================================================= */
.toast {
  position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: var(--bg);
  padding: 12px 20px; border-radius: 999px;
  font-size: 0.9rem;
  z-index: 100;
  box-shadow: var(--shadow-card);
  animation: toast-in .3s ease-out;
}
@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 12px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--ink-faint);
}
.empty-state .ico { font-size: 2.4rem; margin-bottom: 12px; opacity: .5; }

/* Loading spinner */
.spinner {
  width: 22px; height: 22px;
  border: 2.5px solid var(--line);
  border-top-color: var(--teal);
  border-radius: 999px;
  animation: spin .8s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Stagger entry animation */
.stagger > * {
  opacity: 0; transform: translateY(8px);
  animation: rise .5s ease-out forwards;
}
.stagger > *:nth-child(1) { animation-delay: .05s; }
.stagger > *:nth-child(2) { animation-delay: .12s; }
.stagger > *:nth-child(3) { animation-delay: .19s; }
.stagger > *:nth-child(4) { animation-delay: .26s; }
.stagger > *:nth-child(5) { animation-delay: .33s; }
.stagger > *:nth-child(6) { animation-delay: .40s; }
@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

/* Helpers */
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }
.between { display: flex; align-items: center; justify-content: space-between; }
.gap-sm { gap: 8px; } .gap-md { gap: 14px; }
.mt-sm { margin-top: 8px; } .mt-md { margin-top: 16px; } .mt-lg { margin-top: 28px; }
.mb-sm { margin-bottom: 8px; } .mb-md { margin-bottom: 16px; }
.center { text-align: center; }
.hidden { display: none !important; }
