/* ============================================
   Miami Massage — Global Styles
   简约欧美白色风格 · CSS 变量定义
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Colors */
  --c-bg:           #FFFFFF;
  --c-bg-soft:      #F9FAFB;
  --c-bg-muted:     #F3F4F6;
  --c-border:       #E5E7EB;
  --c-border-light: #F3F4F6;
  --c-text:         #111111;
  --c-text-sub:     #374151;
  --c-text-mid:     #6B7280;
  --c-text-hint:    #9CA3AF;
  --c-text-disabled:#D1D5DB;
  --c-accent:       #0EA5E9;
  --c-accent-soft:  #E0F2FE;
  --c-green:        #10B981;
  --c-green-soft:   #D1FAE5;
  --c-red:          #EF4444;
  --c-red-soft:     #FEE2E2;
  --c-orange:       #F59E0B;
  --c-orange-soft:  #FEF3C7;
  --c-dark:         #111111;
  --c-dark-sub:     #1F2937;

  /* Radius */
  --r-xs:  6px;
  --r-sm:  8px;
  --r-md:  12px;
  --r-lg:  16px;
  --r-xl:  20px;
  --r-2xl: 24px;
  --r-full: 9999px;

  /* Shadows */
  --shadow-sm:  0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:  0 2px 8px rgba(0,0,0,0.06);
  --shadow-lg:  0 4px 16px rgba(0,0,0,0.08);
  --shadow-xl:  0 12px 40px rgba(0,0,0,0.12);

  /* Spacing */
  --safe-bottom: env(safe-area-inset-bottom, 0px);

  /* Font */
  --font: 'Inter', -apple-system, 'SF Pro Display', 'Helvetica Neue', Arial, sans-serif;
}

/* ── Reset ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; -webkit-tap-highlight-color: transparent; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font);
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.5;
  overflow-x: hidden;
  min-height: 100vh;
  min-height: 100dvh;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: inherit; outline: none; }
ul, ol { list-style: none; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 0; height: 0; }

/* ── App Shell ── */
.app-shell {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--c-bg);
  position: relative;
  overflow-x: hidden;
}


/* ── Top Navigation Bar ── */
.top-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px 14px;
  background: var(--c-bg);
  position: sticky;
  top: 0;
  z-index: 400;
  border-bottom: 1px solid var(--c-border-light);
}
.top-nav .back-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--c-bg-soft);
  border: 1px solid var(--c-border);
  flex-shrink: 0;
  transition: background 0.15s;
}
.top-nav .back-btn:active { background: var(--c-bg-muted); }
.top-nav .back-btn svg { width: 20px; height: 20px; color: var(--c-text); }
.top-nav .nav-title {
  flex: 1;
  font-size: 17px;
  font-weight: 700;
  color: var(--c-text);
}
.top-nav .nav-action {
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text-mid);
  padding: 6px 12px;
  border-radius: var(--r-md);
  transition: background 0.15s;
}
.top-nav .nav-action:active { background: var(--c-bg-soft); }

/* ── Bottom Tab Bar ── */
.tab-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: calc(72px + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--c-border-light);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 500;
}
.tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 8px;
  flex: 1;
  position: relative;
  transition: transform 0.15s;
}
.tab-item:active { transform: scale(0.92); }
.tab-item svg { width: 22px; height: 22px; color: var(--c-text-hint); transition: color 0.2s; }
.tab-item .tab-label { font-size: 9px; font-weight: 500; color: var(--c-text-hint); transition: color 0.2s; white-space: nowrap; }
.tab-item.active svg { color: var(--c-text); }
.tab-item.active .tab-label { color: var(--c-text); font-weight: 600; }
.tab-item.active::after {
  content: '';
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--c-text);
}

/* ── Page Content ── */
.page-content {
  padding-bottom: calc(72px + var(--safe-bottom));
  min-height: auto;
}
.page-content.has-tab {
  padding-bottom: calc(88px + var(--safe-bottom));
}

/* ── Section Title ── */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px 12px;
}
.section-header .sh-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--c-text);
}
.section-header .sh-action {
  font-size: 12px;
  font-weight: 600;
  color: var(--c-accent);
  display: flex;
  align-items: center;
  gap: 4px;
}
.section-header .sh-action svg { width: 14px; height: 14px; }

/* ── Cards ── */
.card {
  background: var(--c-bg);
  border: 1px solid var(--c-border-light);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s;
}
.card:active { transform: scale(0.985); box-shadow: var(--shadow-md); }

/* ── Chips / Pills ── */
.chip-row {
  display: flex;
  gap: 8px;
  padding: 12px 20px;
  overflow-x: auto;
}
.chip-row::-webkit-scrollbar { display: none; }
.chip {
  padding: 7px 16px;
  border-radius: var(--r-full);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s;
}
.chip.active {
  background: var(--c-dark);
  color: #fff;
}
.chip:not(.active) {
  background: var(--c-bg-soft);
  color: var(--c-text-mid);
  border: 1px solid var(--c-border);
}
.chip:not(.active):active { background: var(--c-bg-muted); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  letter-spacing: 0.3px;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--c-dark);
  color: #fff;
  border-radius: var(--r-lg);
  padding: 14px 24px;
  font-size: 15px;
}
.btn-primary:active { background: var(--c-dark-sub); }
.btn-secondary {
  background: var(--c-bg-soft);
  color: var(--c-text-sub);
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 14px 24px;
  font-size: 15px;
}
.btn-accent {
  background: var(--c-accent);
  color: #fff;
  border-radius: var(--r-lg);
  padding: 14px 24px;
  font-size: 15px;
}
.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
  border-radius: var(--r-md);
}
.btn-full { width: 100%; }
.btn-danger { background: var(--c-red); color: #fff; }
.btn-success { background: var(--c-green); color: #fff; }

/* ── Form Inputs ── */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--c-text-sub);
  margin-bottom: 8px;
}
.form-input {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-md);
  font-size: 14px;
  color: var(--c-text);
  background: var(--c-bg);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input:focus {
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px var(--c-accent-soft);
}
.form-input::placeholder { color: var(--c-text-disabled); }
textarea.form-input { resize: vertical; min-height: 80px; }

/* ── Badge / Status Pill ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--r-xs);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.badge-green  { background: var(--c-green-soft);  color: #065F46; }
.badge-blue   { background: var(--c-accent-soft); color: #0369A1; }
.badge-orange { background: var(--c-orange-soft); color: #92400E; }
.badge-red    { background: var(--c-red-soft);    color: #991B1B; }
.badge-gray   { background: var(--c-bg-muted);    color: var(--c-text-mid); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: var(--r-full);
  font-size: 12px;
  font-weight: 600;
}
.pill-green  { background: var(--c-green-soft);  color: var(--c-green); }
.pill-blue   { background: var(--c-accent-soft);  color: var(--c-accent); }
.pill-orange { background: var(--c-orange-soft); color: var(--c-orange); }
.pill-red    { background: var(--c-red-soft);     color: var(--c-red); }

/* ── Empty State ── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 40px;
  text-align: center;
}
.empty-state svg { width: 64px; height: 64px; color: var(--c-text-disabled); margin-bottom: 16px; }
.empty-state h3 { font-size: 16px; font-weight: 700; color: var(--c-text-sub); margin-bottom: 6px; }
.empty-state p { font-size: 13px; color: var(--c-text-hint); }

/* ── Loading Spinner ── */
.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--c-bg-muted);
  border-top-color: var(--c-text-hint);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Toast ── */
.toast-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}
.toast {
  padding: 12px 20px;
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s ease;
  pointer-events: auto;
  max-width: 90vw;
}
.toast-success { background: var(--c-dark); color: #fff; }
.toast-error   { background: var(--c-red);   color: #fff; }
.toast-info    { background: var(--c-text-sub); color: #fff; }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Skeleton ── */
.skeleton {
  background: linear-gradient(90deg, var(--c-bg-muted) 25%, var(--c-border-light) 50%, var(--c-bg-muted) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--r-sm);
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Utilities ── */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-accent { color: var(--c-accent); }
.text-green  { color: var(--c-green); }
.text-red    { color: var(--c-red); }
.text-orange { color: var(--c-orange); }
.text-hint   { color: var(--c-text-hint); }
.text-mid    { color: var(--c-text-mid); }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8  { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.p-16  { padding: 16px; }
.p-20  { padding: 20px; }
.px-20 { padding-left: 20px; padding-right: 20px; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-1 { flex: 1; }
.w-full { width: 100%; }
.hidden { display: none !important; }

/* ── Language Switcher ── */
.lang-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 0;
}
.lang-opt {
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 20px;
  cursor: pointer;
  color: var(--c-text-mid);
  transition: all 0.2s;
  white-space: nowrap;
}
.lang-opt:active {
  transform: scale(0.95);
}
.lang-opt.active {
  background: var(--c-dark);
  color: #fff;
}

/* 语言切换弹窗 */
.lang-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.lang-overlay.show {
  opacity: 1;
  pointer-events: auto;
}
.lang-sheet {
  background: var(--c-bg);
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 420px;
  padding: 20px;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}
.lang-overlay.show .lang-sheet {
  transform: translateY(0);
}
.lang-sheet-title {
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 16px;
}
.lang-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s;
}
.lang-option:active {
  background: var(--c-bg-muted);
}
.lang-option.active {
  background: var(--c-bg-soft);
}
.lang-option .lo-flag {
  font-size: 24px;
}
.lang-option .lo-info {
  flex: 1;
}
.lang-option .lo-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--c-text);
}
.lang-option .lo-check {
  font-size: 18px;
  color: var(--c-accent);
  opacity: 0;
}
.lang-option.active .lo-check {
  opacity: 1;
}
