/* ============================================================
   Liquid Share — 共享设计系统（iOS 液态玻璃）
   管理端与接收端共用。无外部依赖、无字体 CDN、无框架。
   ============================================================ */

:root {
  --bg: #05060a;
  --bg-soft: #0b0d13;
  --glass: rgba(255, 255, 255, 0.055);
  --glass-2: rgba(255, 255, 255, 0.085);
  --glass-3: rgba(255, 255, 255, 0.13);
  --stroke: rgba(255, 255, 255, 0.13);
  --stroke-soft: rgba(255, 255, 255, 0.075);
  --hi: rgba(255, 255, 255, 0.42);          /* 边缘高光 */
  --text: #f3f5fa;
  --text-2: rgba(238, 241, 249, 0.72);
  --muted: rgba(235, 238, 246, 0.48);
  --muted-2: rgba(235, 238, 246, 0.30);
  --tint: #9db8ef;                           /* 克制的银蓝点缀 */
  --tint-2: #c6d4f2;
  --ok: #7fd8a6;
  --warn: #f2c97d;
  --err: #f19a9a;
  --rec: #ff6b6b;
  --r-lg: 28px;
  --r-md: 20px;
  --r-sm: 14px;
  --r-xs: 10px;
  --sp: 16px;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
          "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei",
          system-ui, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; padding: 0; min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior-y: none;
}

body {
  /* 极克制的深空环境光，不使用廉价渐变按钮 */
  background-image:
    radial-gradient(120% 60% at 12% -8%, rgba(120, 145, 200, .10), transparent 60%),
    radial-gradient(90% 55% at 100% 105%, rgba(90, 110, 165, .075), transparent 62%);
  background-attachment: fixed;
}

body::before {
  /* 细微银白反光层，固定不随滚动 */
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  background: linear-gradient(168deg, rgba(255,255,255,.035) 0%, transparent 26%);
  z-index: 0;
}

h1, h2, h3, h4, p { margin: 0; }
a { color: var(--tint-2); text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
img, video { display: block; max-width: 100%; }

/* ---------- 玻璃卡片 ---------- */
.glass {
  position: relative;
  background:
    linear-gradient(158deg, rgba(255,255,255,.105) 0%, rgba(255,255,255,.045) 38%, rgba(255,255,255,.022) 100%);
  -webkit-backdrop-filter: blur(28px) saturate(170%);
  backdrop-filter: blur(28px) saturate(170%);
  border: 1px solid var(--stroke);
  border-radius: var(--r-lg);
  box-shadow:
    inset 0 1px 0 0 var(--hi),
    inset 0 -1px 0 0 rgba(255,255,255,.055),
    inset 1px 0 0 0 rgba(255,255,255,.085),
    0 18px 46px rgba(0,0,0,.42),
    0 2px 8px rgba(0,0,0,.22);
  overflow: hidden;
}
.glass::after {
  /* 细腻的斜向反光，不发光、不刺眼 */
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  background: linear-gradient(118deg, rgba(255,255,255,.085) 0%, rgba(255,255,255,0) 32%, rgba(255,255,255,0) 72%, rgba(255,255,255,.025) 100%);
  border-radius: inherit;
}
.glass > * { position: relative; z-index: 1; }
.glass.flat { box-shadow: inset 0 1px 0 0 var(--hi), inset 0 -1px 0 0 rgba(255,255,255,.04), 0 8px 24px rgba(0,0,0,.26); }
.glass.pad { padding: 18px; }

/* ---------- 排版 ---------- */
.t-title { font-size: 26px; font-weight: 650; letter-spacing: -.6px; line-height: 1.2; }
.t-h2 { font-size: 19px; font-weight: 620; letter-spacing: -.3px; }
.t-h3 { font-size: 15px; font-weight: 600; letter-spacing: -.1px; }
.t-sub { font-size: 13px; color: var(--text-2); }
.t-muted { font-size: 12.5px; color: var(--muted); line-height: 1.55; }
.t-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .2px; }
.t-center { text-align: center; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.col { display: flex; flex-direction: column; }
.gap4 { gap: 4px; } .gap8 { gap: 8px; } .gap12 { gap: 12px; } .gap16 { gap: 16px; }
.grow { flex: 1; min-width: 0; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
.divider { height: 1px; background: var(--stroke-soft); margin: 14px 0; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 44px; padding: 0 18px;
  border-radius: 14px;
  background: var(--glass-2);
  border: 1px solid var(--stroke);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 4px 14px rgba(0,0,0,.20);
  color: var(--text);
  font-size: 14.5px; font-weight: 560;
  transition: transform .16s var(--ease), background .2s, opacity .2s, box-shadow .2s;
  user-select: none; white-space: nowrap;
}
.btn:active { transform: scale(.965); background: var(--glass-3); }
.btn[disabled], .btn.disabled { opacity: .42; pointer-events: none; }
.btn.primary { background: rgba(157, 184, 239, .18); border-color: rgba(157,184,239,.42); color: #e8efff; box-shadow: inset 0 1px 0 rgba(255,255,255,.26), 0 6px 18px rgba(70,100,170,.18); }
.btn.primary:active { background: rgba(157, 184, 239, .28); }
.btn.danger { background: rgba(241, 154, 154, .12); border-color: rgba(241,154,154,.3); color: #ffd3d3; }
.btn.ghost { background: transparent; border-color: var(--stroke-soft); box-shadow: none; color: var(--text-2); }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: 12.5px; border-radius: 11px; }
.btn.xs { min-height: 30px; padding: 0 10px; font-size: 12px; border-radius: 9px; }
.btn.block { width: 100%; }
.btn.icon { width: 40px; min-height: 40px; padding: 0; border-radius: 12px; font-size: 16px; }
.btn.icon.sm { width: 32px; min-height: 32px; border-radius: 10px; font-size: 14px; }
.btn.rec { background: rgba(255,107,107,.16); border-color: rgba(255,107,107,.42); color: #ffd6d6; }

/* ---------- 表单 ---------- */
.field { display: block; margin-bottom: 14px; }
.field > .label { display: block; font-size: 12px; color: var(--muted); margin: 0 0 7px 3px; letter-spacing: .2px; }
.input, .textarea, .select {
  width: 100%; padding: 12px 14px;
  background: rgba(255,255,255,.045);
  border: 1px solid var(--stroke-soft);
  border-radius: 13px;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.22);
  outline: none; font-size: 15px;
  transition: border-color .2s, background .2s;
  -webkit-appearance: none; appearance: none;
}
.input:focus, .textarea:focus, .select:focus { border-color: rgba(157,184,239,.5); background: rgba(255,255,255,.07); }
.input::placeholder, .textarea::placeholder { color: var(--muted-2); }
.textarea { resize: vertical; min-height: 88px; line-height: 1.55; }
.select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23a8b0c4' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.select option { background: #161a24; color: #f3f5fa; }
.hint { font-size: 11.5px; color: var(--muted-2); margin-top: 6px; margin-left: 3px; }

.seg { display: flex; padding: 3px; gap: 3px; background: rgba(0,0,0,.24); border: 1px solid var(--stroke-soft); border-radius: 13px; }
.seg > button { flex: 1; min-height: 34px; padding: 0 6px; border-radius: 10px; font-size: 12.5px; color: var(--muted); transition: .2s var(--ease); }
.seg > button.on { background: var(--glass-3); color: var(--text); box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 2px 8px rgba(0,0,0,.24); font-weight: 570; }

.switch { position: relative; width: 48px; height: 29px; border-radius: 20px; background: rgba(255,255,255,.13); border: 1px solid var(--stroke-soft); transition: .25s var(--ease); flex: none; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 23px; height: 23px; border-radius: 50%; background: #f6f8fd; box-shadow: 0 2px 6px rgba(0,0,0,.3); transition: .25s var(--ease); }
.switch.on { background: rgba(127,216,166,.55); }
.switch.on::after { transform: translateX(19px); }

/* ---------- 徽标 / 状态 ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 560; border: 1px solid var(--stroke-soft); background: rgba(255,255,255,.05); color: var(--text-2); white-space: nowrap; }
.chip.ok { color: var(--ok); border-color: rgba(127,216,166,.28); background: rgba(127,216,166,.09); }
.chip.warn { color: var(--warn); border-color: rgba(242,201,125,.28); background: rgba(242,201,125,.09); }
.chip.err { color: var(--err); border-color: rgba(241,154,154,.28); background: rgba(241,154,154,.09); }
.chip.tint { color: var(--tint-2); border-color: rgba(157,184,239,.28); background: rgba(157,184,239,.09); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); flex: none; }
.dot.ok { background: var(--ok); box-shadow: 0 0 0 3px rgba(127,216,166,.12); }
.dot.warn { background: var(--warn); }
.dot.err { background: var(--err); }

/* ---------- 遮罩与抽屉 ---------- */
.mask { position: fixed; inset: 0; background: rgba(0,0,0,.58); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); opacity: 0; pointer-events: none; transition: opacity .3s var(--ease); z-index: 40; }
.mask.show { opacity: 1; pointer-events: auto; }

.sheet {
  position: fixed; left: 0; right: 0; bottom: 0;
  max-height: 94vh;
  display: flex; flex-direction: column;
  border-radius: 30px 30px 0 0;
  border: 1px solid var(--stroke);
  border-bottom: 0;
  background: linear-gradient(170deg, rgba(30,34,45,.94), rgba(14,16,23,.96));
  -webkit-backdrop-filter: blur(34px) saturate(175%);
  backdrop-filter: blur(34px) saturate(175%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 -20px 60px rgba(0,0,0,.55);
  transform: translateY(102%);
  transition: transform .38s var(--ease);
  z-index: 50;
  padding-bottom: calc(var(--sab) + 12px);
  visibility: hidden;
}
.sheet.show { transform: translateY(0); visibility: visible; }
.sheet.full { top: calc(var(--sat) + 8px); max-height: none; border-radius: 26px; margin: 0 8px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px 12px; flex: none; }
.sheet-head .grab { position: absolute; top: 7px; left: 50%; transform: translateX(-50%); width: 36px; height: 4px; border-radius: 3px; background: rgba(255,255,255,.22); }
.sheet-body { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 4px 18px 18px; flex: 1; }
.sheet-body.nopad { padding: 0 0 12px; }
.sheet-foot { padding: 12px 18px 4px; border-top: 1px solid var(--stroke-soft); flex: none; display: flex; gap: 10px; }
.sheet-foot .btn { flex: 1; }

/* ---------- 提示条 ---------- */
.toast-wrap { position: fixed; left: 0; right: 0; top: calc(var(--sat) + 12px); z-index: 90; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.toast {
  max-width: 92%; padding: 11px 16px; border-radius: 14px;
  background: rgba(36,40,52,.92); border: 1px solid var(--stroke);
  -webkit-backdrop-filter: blur(24px) saturate(170%); backdrop-filter: blur(24px) saturate(170%);
  box-shadow: 0 10px 30px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.2);
  font-size: 13.5px; color: var(--text);
  animation: toastIn .3s var(--ease);
}
.toast.err { color: #ffd6d6; } .toast.ok { color: #cdf3de; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-12px) scale(.96); } to { opacity: 1; transform: none; } }

/* ---------- 空状态 / 加载 ---------- */
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty .ico { font-size: 34px; opacity: .5; margin-bottom: 10px; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,.18); border-top-color: var(--tint-2); animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.progress { height: 5px; border-radius: 4px; background: rgba(255,255,255,.10); overflow: hidden; }
.progress > i { display: block; height: 100%; width: 0; background: var(--tint-2); border-radius: 4px; transition: width .2s linear; }

/* ---------- 列表项 ---------- */
.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--stroke-soft); }
.list-row:last-child { border-bottom: 0; }

/* ---------- 缩放动画 ---------- */
.fade-in { animation: fadeIn .35s var(--ease) both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.pulse { animation: pulse 1.2s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* 滚动条 */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }

/* 安全区 */
.safe-top { padding-top: calc(var(--sat) + 12px); }
.safe-bottom { padding-bottom: calc(var(--sab) + 12px); }
