/* ============================================================
   渔夫帽 CLUB · 设计系统
   淡蓝色主调 / 海风质感 / 大圆角 / 轻玻璃
   ============================================================ */
:root {
  --blue-50: #f3f9ff;
  --blue-100: #e7f3ff;
  --blue-150: #dcedff;
  --blue-200: #c9e4ff;
  --blue-300: #9fd0ff;
  --blue-400: #6fb9fb;
  --blue-500: #3e90f4;
  --blue-600: #2a78dc;
  --blue-700: #1d5fae;
  --cyan: #58d4e8;
  --mint: #5ed6bf;
  --gold: #ffc65c;
  --gold-600: #e9a82f;
  --coral: #ff8b8b;
  --violet: #8d8cf2;
  --ink: #10263f;
  --ink-2: #304a66;
  --muted: #6f88a3;
  --muted-2: #94a9bf;
  --line: #e4effa;
  --line-2: #eef5fc;
  --card: #ffffff;
  --bg: #edf6ff;
  --bg-2: #f7fbff;
  --danger: #e85b6a;
  --success: #2fae8f;
  --shadow-sm: 0 2px 8px rgba(37, 92, 148, 0.06);
  --shadow: 0 10px 28px rgba(37, 92, 148, 0.1);
  --shadow-lg: 0 24px 60px rgba(30, 82, 135, 0.18);
  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 26px;
  --radius-xl: 34px;
  --ease: cubic-bezier(0.22, 0.8, 0.3, 1);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior-y: none;
}
h1, h2, h3, h4, p { margin: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: var(--blue-600); text-decoration: none; }
img { display: block; max-width: 100%; }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--blue-200); }
:focus-visible { outline: 2px solid var(--blue-400); outline-offset: 2px; }

/* 滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #cfe3f6; border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }
.no-scrollbar { scrollbar-width: none; -ms-overflow-style: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }

/* ---------- 排版 ---------- */
.h1 { font-size: 26px; font-weight: 800; letter-spacing: -0.4px; line-height: 1.25; }
.h2 { font-size: 20px; font-weight: 800; letter-spacing: -0.2px; }
.h3 { font-size: 17px; font-weight: 700; }
.h4 { font-size: 15px; font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.tiny { font-size: 11px; }
.strong { font-weight: 700; }
.caption { font-size: 12px; color: var(--muted); }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pre-wrap { white-space: pre-wrap; }

/* ---------- 布局 ---------- */
.row { display: flex; align-items: center; }
.row-between { display: flex; align-items: center; justify-content: space-between; }
.row-start { display: flex; align-items: flex-start; }
.col { display: flex; flex-direction: column; }
.grow { flex: 1; min-width: 0; }
.gap-4 { gap: 4px; } .gap-6 { gap: 6px; } .gap-8 { gap: 8px; } .gap-10 { gap: 10px; }
.gap-12 { gap: 12px; } .gap-14 { gap: 14px; } .gap-16 { gap: 16px; } .gap-20 { gap: 20px; }
.mt-4 { margin-top: 4px; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; } .mt-20 { margin-top: 20px; } .mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; } .mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; } .mb-20 { margin-bottom: 20px; } .mb-24 { margin-bottom: 24px; }
.p-16 { padding: 16px; } .p-20 { padding: 20px; } .p-24 { padding: 24px; }
.hide { display: none !important; }
.full { width: 100%; }
.divider { height: 1px; background: var(--line-2); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 44px; padding: 0 20px; border-radius: 14px;
  font-size: 15px; font-weight: 700; letter-spacing: 0.2px;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), background 0.18s var(--ease), opacity 0.18s;
  user-select: none; white-space: nowrap;
}
.btn:active { transform: scale(0.975); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #63c4ff 0%, var(--blue-500) 52%, #2f7fe8 100%);
  box-shadow: 0 12px 26px rgba(52, 138, 235, 0.3);
}
.btn-primary:hover { box-shadow: 0 14px 30px rgba(52, 138, 235, 0.38); }
.btn-soft { background: var(--blue-100); color: var(--blue-700); }
.btn-soft:hover { background: var(--blue-150); }
.btn-ghost { background: transparent; color: var(--ink-2); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--blue-50); }
.btn-white { background: #fff; color: var(--blue-700); box-shadow: var(--shadow-sm); }
.btn-gold { background: linear-gradient(135deg, #ffd989, var(--gold)); color: #6b4a10; box-shadow: 0 10px 24px rgba(233, 168, 47, 0.25); }
.btn-danger { background: #fff0f1; color: var(--danger); }
.btn-sm { height: 34px; padding: 0 14px; font-size: 13px; border-radius: 11px; }
.btn-xs { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 9px; gap: 4px; }
.btn-lg { height: 52px; padding: 0 28px; font-size: 16px; border-radius: 17px; }
.btn-block { width: 100%; }
.btn-round { border-radius: 999px; }
.btn-icon { width: 40px; height: 40px; padding: 0; border-radius: 50%; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.7); color: var(--ink-2);
  backdrop-filter: blur(10px); transition: background 0.18s, transform 0.18s;
}
.icon-btn:hover { background: #fff; }
.icon-btn:active { transform: scale(0.94); }
.icon-btn.glass { background: rgba(255, 255, 255, 0.25); color: #fff; border: 1px solid rgba(255, 255, 255, 0.35); }
.link { color: var(--blue-600); font-weight: 600; cursor: pointer; background: none; padding: 0; }
.link:hover { text-decoration: underline; }

/* ---------- 表单 ---------- */
.field { display: flex; flex-direction: column; gap: 7px; }
.field > label { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.input, .textarea, .select {
  width: 100%; border: 1px solid var(--line); background: #fbfdff;
  border-radius: 14px; padding: 12px 14px; font-size: 15px; color: var(--ink);
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
  outline: none;
}
.input::placeholder, .textarea::placeholder { color: #9bb0c6; }
.input:focus, .textarea:focus, .select:focus {
  border-color: var(--blue-300); background: #fff;
  box-shadow: 0 0 0 4px rgba(80, 166, 255, 0.12);
}
.input-lg { height: 52px; border-radius: 16px; font-size: 16px; }
.textarea { resize: vertical; min-height: 96px; line-height: 1.6; }
.input-group { position: relative; display: flex; align-items: center; }
.input-group .input { padding-left: 44px; }
.input-group > svg { position: absolute; left: 14px; color: #8ea8c2; pointer-events: none; }
.input-suffix { position: absolute; right: 12px; color: var(--muted); font-size: 13px; }
.checkbox { display: flex; align-items: flex-start; gap: 9px; cursor: pointer; font-size: 13px; color: var(--ink-2); }
.checkbox input { appearance: none; width: 19px; height: 19px; border-radius: 50%; border: 1.5px solid #b9cfe4; background: #fff; flex: none; margin-top: 1px; transition: all 0.16s; position: relative; }
.checkbox input:checked { background: var(--blue-500); border-color: var(--blue-500); }
.checkbox input:checked::after { content: ""; position: absolute; inset: 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center/12px no-repeat; }
.switch { position: relative; width: 46px; height: 27px; flex: none; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 2; }
.switch span { position: absolute; inset: 0; background: #dbe8f4; border-radius: 999px; transition: 0.2s; }
.switch span::after { content: ""; position: absolute; width: 21px; height: 21px; border-radius: 50%; background: #fff; top: 3px; left: 3px; box-shadow: 0 2px 6px rgba(30, 70, 110, 0.2); transition: 0.22s var(--ease); }
.switch input:checked + span { background: linear-gradient(135deg, #68c8ff, var(--blue-500)); }
.switch input:checked + span::after { transform: translateX(19px); }

/* ---------- 徽章 / 标签 ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 9px; border-radius: 7px; font-size: 11px; font-weight: 700; letter-spacing: 0.2px; }
.badge-blue { background: var(--blue-100); color: var(--blue-700); }
.badge-gold { background: #fff5dd; color: #a77413; }
.badge-coral { background: #fff0f0; color: #d4515e; }
.badge-mint { background: #e9fbf6; color: #1d8a75; }
.badge-violet { background: #f0efff; color: #5f5ec7; }
.badge-gray { background: #f1f6fb; color: #6f88a3; }
.verify-badge { display: inline-flex; width: 17px; height: 17px; flex: none; }
.tag { display: inline-flex; align-items: center; height: 26px; padding: 0 11px; border-radius: 999px; background: var(--blue-50); color: var(--blue-700); font-size: 12px; font-weight: 600; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--coral); display: inline-block; }
.divider-dot { width: 3px; height: 3px; border-radius: 50%; background: #b9cee2; display: inline-block; }

/* ---------- 卡片 ---------- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-sm); border: 1px solid rgba(225, 239, 251, 0.8); }
.card-pad { padding: 18px; }
.card-glass { background: rgba(255, 255, 255, 0.82); backdrop-filter: blur(18px); border: 1px solid rgba(255, 255, 255, 0.6); }
.section { margin-top: 22px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; padding: 0 2px; }
.section-title { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 800; letter-spacing: -0.2px; }
.section-title::before { content: ""; width: 4px; height: 16px; border-radius: 4px; background: linear-gradient(180deg, var(--cyan), var(--blue-500)); }
.section-more { display: inline-flex; align-items: center; gap: 3px; color: var(--muted); font-size: 12px; font-weight: 600; }
.section-more:hover { color: var(--blue-600); }

/* ---------- 头像 ---------- */
.avatar { position: relative; flex: none; border-radius: 50%; background: var(--blue-100); overflow: visible; }
.avatar > img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.avatar-frame { position: absolute; inset: -7px; width: calc(100% + 14px); height: calc(100% + 14px); pointer-events: none; }
.avatar-ring { box-shadow: 0 0 0 3px #fff, 0 0 0 5px rgba(103, 187, 255, 0.5); }
.avatar-status { position: absolute; right: 0; bottom: 0; width: 12px; height: 12px; border-radius: 50%; background: #45d6a8; border: 2.5px solid #fff; }

/* ---------- 弹层 ---------- */
.overlay { position: fixed; inset: 0; z-index: 80; background: rgba(16, 38, 63, 0.38); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; padding: 20px; animation: fade-in 0.2s var(--ease); }
.overlay.sheet-overlay { align-items: flex-end; padding: 0; }
.modal { width: min(420px, 100%); max-height: min(86vh, 760px); background: #fff; border-radius: 26px; box-shadow: var(--shadow-lg); overflow: hidden; display: flex; flex-direction: column; animation: modal-in 0.28s var(--ease); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 12px; }
.modal-title { font-size: 17px; font-weight: 800; }
.modal-body { padding: 4px 20px 20px; overflow-y: auto; }
.modal-foot { display: flex; gap: 10px; padding: 0 20px calc(18px + env(safe-area-inset-bottom)); }
.modal-foot .btn { flex: 1; }
.sheet { width: min(460px, 100%); max-height: 88vh; background: #fff; border-radius: 26px 26px 0 0; display: flex; flex-direction: column; animation: sheet-up 0.3s var(--ease); overflow: hidden; }
.sheet-handle { width: 38px; height: 4px; border-radius: 4px; background: #dbe8f4; margin: 10px auto 2px; flex: none; }
.sheet-head { padding: 10px 20px 12px; display: flex; align-items: center; justify-content: space-between; }
.sheet-body { padding: 4px 20px 20px; overflow-y: auto; }
.sheet-foot { padding: 12px 20px calc(18px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line-2); }
.close-btn { width: 30px; height: 30px; border-radius: 50%; background: var(--blue-50); color: var(--muted); display: flex; align-items: center; justify-content: center; }
.close-btn:hover { background: var(--blue-100); color: var(--ink); }
.menu-item { display: flex; align-items: center; gap: 13px; width: 100%; padding: 13px 6px; text-align: left; border-radius: 12px; font-size: 15px; font-weight: 600; color: var(--ink-2); }
.menu-item:hover { background: var(--blue-50); }
.menu-item .menu-icon { width: 38px; height: 38px; border-radius: 12px; background: var(--blue-50); display: flex; align-items: center; justify-content: center; color: var(--blue-600); }
.menu-item .chev { margin-left: auto; color: #b3c7da; }

/* ---------- 吐司 ---------- */
.toast-root { position: fixed; z-index: 200; left: 50%; top: 18px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: max-content; max-width: 90vw; }
.toast { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; background: rgba(16, 38, 63, 0.9); color: #fff; font-size: 13px; font-weight: 600; box-shadow: 0 12px 30px rgba(16, 38, 63, 0.22); backdrop-filter: blur(12px); animation: toast-in 0.26s var(--ease); max-width: 88vw; }
.toast.success { background: rgba(31, 138, 112, 0.94); }
.toast.error { background: rgba(196, 63, 78, 0.94); }
.toast.leaving { animation: toast-out 0.2s var(--ease) forwards; }

/* ---------- 空状态 / 加载 ---------- */
.empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 42px 20px; text-align: center; color: var(--muted); }
.empty img { width: 150px; opacity: 0.9; }
.empty p { font-size: 13px; max-width: 260px; }
.loading-state { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 50px 20px; color: var(--muted); font-size: 13px; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(62, 144, 244, 0.18); border-top-color: var(--blue-500); animation: spin 0.8s linear infinite; flex: none; }
.skeleton { background: linear-gradient(90deg, #eff6fd 25%, #f8fcff 37%, #eff6fd 63%); background-size: 400% 100%; animation: shimmer 1.3s ease infinite; border-radius: 10px; }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.pulse { animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.04); opacity: 0.85; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(14px) scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0.6; } to { transform: none; opacity: 1; } }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-6px); } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.rise { animation: rise 0.4s var(--ease) both; }

/* ---------- 通用头部 ---------- */
.page-head { display: flex; align-items: center; gap: 10px; height: 54px; padding: 0 4px; }
.back-btn { width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, 0.8); color: var(--ink); flex: none; transition: 0.18s; }
.back-btn:hover { background: #fff; transform: translateX(-1px); }
.page-title { font-size: 17px; font-weight: 800; }
.head-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }

/* ---------- 手机壳 ---------- */
.user-body {
  background:
    radial-gradient(900px 500px at 8% 4%, rgba(152, 213, 255, 0.55), transparent 60%),
    radial-gradient(800px 600px at 98% 95%, rgba(255, 207, 220, 0.4), transparent 62%),
    radial-gradient(700px 500px at 60% 20%, rgba(190, 243, 235, 0.45), transparent 60%),
    linear-gradient(135deg, #edf7ff 0%, #f6fbff 48%, #eef5ff 100%);
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  overflow-x: hidden;
}
.user-body::before {
  content: "FISHER CLUB";
  position: fixed; left: max(24px, calc(50vw - 620px)); top: 50%; transform: translateY(-50%) rotate(-90deg);
  font-size: 12px; letter-spacing: 10px; color: rgba(58, 118, 170, 0.28); font-weight: 700;
  pointer-events: none;
}
.user-body::after {
  content: "";
  position: fixed; right: max(20px, calc(50vw - 650px)); bottom: 10%;
  width: 210px; height: 210px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.9), rgba(130,197,255,.35));
  filter: blur(6px); pointer-events: none; z-index: 0;
}
.app-shell {
  position: relative; z-index: 1;
  width: 100%; max-width: 440px; height: min(920px, calc(100dvh - 48px)); min-height: 640px;
  background: linear-gradient(180deg, #f7fbff 0%, #ffffff 100%);
  border-radius: 42px; box-shadow: 0 40px 90px rgba(28, 76, 122, 0.22), 0 0 0 1px rgba(255, 255, 255, 0.9) inset, 0 0 0 10px rgba(255, 255, 255, 0.5);
  display: flex; flex-direction: column; overflow: hidden;
  isolation: isolate;
}
.app-loading { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: var(--muted); font-size: 13px; }
.app-loading img { width: 64px; }
@media (max-width: 640px) {
  .user-body { padding: 0; display: block; background: #fff; }
  .user-body::before, .user-body::after { display: none; }
  .app-shell { max-width: none; height: 100dvh; min-height: 0; border-radius: 0; box-shadow: none; }
}

/* ---------- 错误页 ---------- */
.error-page { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 30px; text-align: center; background: linear-gradient(180deg, #eaf6ff, #fff); }
.error-page h1 { font-size: 54px; color: var(--blue-600); letter-spacing: 2px; }
.error-page p { color: var(--muted); }

/* ---------- 登录 / 飞书公共 ---------- */
.login-art { position: relative; }
.login-art::before { content: ""; position: absolute; border-radius: 50%; filter: blur(2px); }

/* ---------- 飞书扫码页 ---------- */
.feishu-body { min-height: 100dvh; display: flex; align-items: center; justify-content: center; background: radial-gradient(700px 500px at 20% 10%, #d9efff, transparent 60%), linear-gradient(135deg, #f2f9ff, #ffffff); padding: 20px; }
.feishu-wrap { width: min(400px, 100%); }
.feishu-card { background: #fff; border-radius: 28px; box-shadow: var(--shadow-lg); padding: 26px; text-align: center; }
.feishu-logo { width: 58px; margin: 0 auto 12px; }
.feishu-title { font-size: 19px; font-weight: 800; }
.feishu-sub { color: var(--muted); font-size: 13px; margin-top: 5px; }
.feishu-identity { margin: 20px 0; padding: 16px; border-radius: 18px; background: var(--blue-50); }
.feishu-role { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--blue-700); font-weight: 700; }
.feishu-name { font-size: 22px; font-weight: 800; margin-top: 8px; }
.feishu-note { font-size: 12px; color: var(--muted); margin-top: 16px; line-height: 1.6; }

/* ---------- 动画减弱 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
