/* ============================================================
 * 聚合页（参考 VLink 风格）
 * ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { min-height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: #000;
  background: #eee;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* 参考页同款背景：中心灰 → 四周白 */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: #eee;
  background: content-box radial-gradient(#bbb, #fff);
  pointer-events: none;
}

.page {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 16px 0 calc(24px + env(safe-area-inset-bottom));
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ---------- 顶栏 ---------- */
.topbar {
  height: 40px;
  margin: 0 10px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #e2e2e2;
  background: rgba(240, 240, 240, .68);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s, transform .2s;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.icon-btn:hover { background: rgba(255, 255, 255, .9); }
.icon-btn:active { transform: scale(.94); }

/* ---------- 个人资料 ---------- */
.profile {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 20px;
  animation: fade-up .5s cubic-bezier(.22, .61, .36, 1) both;
}

.avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: #000 center / cover no-repeat;
  color: #fff;
  font-size: 32px;
  font-weight: 700;
  line-height: 96px;
  text-align: center;
  overflow: hidden;
  user-select: none;
  flex: none;
}

.name {
  margin-top: 16px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.45;
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  text-align: center;
  word-break: break-word;
}

.name .verified { flex: none; margin-top: 1px; }

.intro {
  margin-top: 8px;
  font-size: 15px;
  font-weight: 500;
  line-height: 21px;
  color: #222;
  text-align: center;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ---------- 链接按钮 ---------- */
.links {
  margin-top: 26px;
  padding: 0 13px;
  display: flex;
  flex-direction: column;
  animation: fade-up .55s .06s cubic-bezier(.22, .61, .36, 1) both;
}

.link-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 58px;
  padding: 16px 56px 16px 56px;
  margin-bottom: 16px;
  background: #fff;
  color: #000;
  border: 2px solid #fff;
  border-radius: 5px;
  box-shadow: rgba(28, 32, 93, .24) 0 2px 8px 0;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
  transition: transform .16s ease, box-shadow .16s ease;
}

.link-card:active { transform: scale(.985); box-shadow: rgba(28, 32, 93, .18) 0 2px 6px 0; }
.link-card:hover { box-shadow: rgba(28, 32, 93, .28) 0 4px 14px 0; }

.link-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
}
.link-icon svg { width: 26px; height: 26px; display: block; }
.link-icon img { width: 26px; height: 26px; object-fit: contain; display: block; }

.link-text { display: block; }

/* 让最后一个按钮与底部留白一致 */
.links .link-card:last-child { margin-bottom: 0; }

/* ---------- 分享面板 ---------- */
.sheet-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .38);
  z-index: 40;
  opacity: 0;
  transition: opacity .25s ease;
}
.sheet-mask.show { opacity: 1; }

.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  margin: 0 auto;
  max-width: 640px;
  padding: 8px 10px calc(12px + env(safe-area-inset-bottom));
  background: #f7f7f8;
  border-radius: 16px 16px 0 0;
  transform: translateY(105%);
  transition: transform .28s cubic-bezier(.22, .61, .36, 1);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, .12);
}
.sheet.show { transform: translateY(0); }

.sheet-handle {
  width: 38px;
  height: 4px;
  border-radius: 4px;
  background: #d9d9dd;
  margin: 4px auto 10px;
}

.sheet-title {
  font-size: 13px;
  color: #8a8a8e;
  text-align: center;
  padding: 2px 0 10px;
}

.sheet-item {
  width: 100%;
  height: 52px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  margin-bottom: 8px;
  background: #fff;
  border: 0;
  border-radius: 12px;
  font-size: 15px;
  color: #111;
  font-family: inherit;
  cursor: pointer;
}
.sheet-item:active { background: #f0f0f2; }
.sheet-item svg { color: #333; }

.sheet-cancel {
  width: 100%;
  height: 50px;
  margin-top: 6px;
  background: #fff;
  border: 0;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 500;
  color: #111;
  font-family: inherit;
  cursor: pointer;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(.94);
  z-index: 90;
  max-width: 78vw;
  padding: 12px 20px;
  border-radius: 10px;
  background: rgba(0, 0, 0, .82);
  color: #fff;
  font-size: 14px;
  line-height: 1.45;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }

@keyframes fade-up {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

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

/* 桌面端：内容居中、卡片略窄 */
@media (min-width: 720px) {
  .page { padding-top: 28px; }
  .links { padding: 0 40px; }
  .profile { margin-top: 18px; }
}
