/* onelink 个人主页 */
@font-face { font-family: 'Unbounded'; font-weight: 500; font-display: swap; src: url(/fonts/unbounded-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Unbounded'; font-weight: 700; font-display: swap; src: url(/fonts/unbounded-latin-700-normal.woff2) format('woff2'); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  background: var(--base); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; }
button { font: inherit; color: inherit; }

/* ---------- 流动光斑背景 ---------- */
.sky { position: fixed; inset: 0; overflow: hidden; z-index: 0; }
.blob { position: absolute; border-radius: 50%; filter: blur(64px); opacity: .9; will-change: transform; }
.b1 { width: 70vmax; height: 70vmax; left: -25vmax; top: -30vmax; background: var(--b1); animation: drift1 24s ease-in-out infinite alternate; }
.b2 { width: 60vmax; height: 60vmax; right: -25vmax; bottom: -25vmax; background: var(--b2); animation: drift2 28s ease-in-out infinite alternate; }
.b3 { width: 38vmax; height: 38vmax; left: 30%; top: 35%; background: var(--b3); opacity: .7; animation: drift3 20s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate(18vmax, 14vmax) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-16vmax, -12vmax) scale(.9); } }
@keyframes drift3 { 0% { transform: translate(-10vmax, -6vmax); } 100% { transform: translate(8vmax, 10vmax) scale(1.3); } }

.bg-photo { position: fixed; inset: 0; z-index: 0; background-size: cover; background-position: center; }
.bg-veil { position: fixed; inset: 0; z-index: 0; }
.is-dark .bg-veil { background: linear-gradient(180deg, rgba(8,4,24,.25), rgba(8,4,24,.6)); }
.is-light .bg-veil { background: linear-gradient(180deg, rgba(255,255,255,.2), rgba(255,255,255,.55)); }
.has-photo .sky { opacity: 0; }

.grain {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .14; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- 内容 ---------- */
.page {
  position: relative; z-index: 1; max-width: 580px; margin: 0 auto;
  padding: max(64px, env(safe-area-inset-top)) 20px max(28px, env(safe-area-inset-bottom));
  min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
}
.is-preview .page { padding-top: 48px; }
.head { text-align: center; display: flex; flex-direction: column; align-items: center; }

.avatar-wrap {
  padding: 4px; border-radius: 50%;
  background: conic-gradient(from 210deg, var(--b1), var(--b3), var(--b2), var(--b1));
  box-shadow: 0 18px 40px -16px rgba(0,0,0,.45);
  animation: pop .7s cubic-bezier(.2,1.4,.4,1) both;
}
.avatar { display: block; width: 104px; height: 104px; border-radius: 50%; object-fit: cover; border: 3px solid var(--base); background: var(--base); }
.avatar-empty { display: grid; place-items: center; font: 700 40px/1 'Unbounded', sans-serif; color: var(--text); background: var(--card); }

.name { margin: 18px 0 2px; font-size: 24px; font-weight: 800; letter-spacing: .01em; line-height: 1.3; word-break: break-word; }
.handle { margin: 0; font: 500 13px/1.6 'Unbounded', sans-serif; color: var(--sub); letter-spacing: .02em; }
.bio { margin: 12px 0 0; max-width: 32em; font-size: 15px; line-height: 1.7; color: var(--sub); white-space: pre-line; word-break: break-word; }

.socials { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 20px; }
.social {
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%;
  background: var(--card); border: 1px solid var(--border); cursor: pointer; padding: 0;
  -webkit-backdrop-filter: blur(16px) saturate(160%); backdrop-filter: blur(16px) saturate(160%);
  transition: transform .2s cubic-bezier(.2,1.4,.4,1);
}
.social svg { width: 20px; height: 20px; }
.social:hover { transform: translateY(-3px) scale(1.06); }
.social:active { transform: scale(.94); }

/* ---------- 链接按钮 ---------- */
.links { display: grid; gap: 14px; margin-top: 30px; }
.link {
  position: relative; display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 62px; padding: 16px 58px; border-radius: 20px; text-decoration: none;
  font-size: 16px; font-weight: 650; line-height: 1.4; overflow: hidden; isolation: isolate;
  transition: transform .25s cubic-bezier(.2,1.2,.4,1), box-shadow .25s;
  animation: rise .6s cubic-bezier(.2,1,.3,1) both; animation-delay: calc(.25s + var(--i, 0) * 70ms);
}
.link-title { word-break: break-word; }
.link-arrow { position: absolute; right: 16px; top: 50%; width: 30px; height: 30px; margin-top: -15px; display: grid; place-items: center; border-radius: 50%; opacity: .55; transition: opacity .2s, transform .25s; }
.link-arrow svg { width: 16px; height: 16px; }
.link:hover { transform: translateY(-2px); }
.link:hover .link-arrow { opacity: 1; transform: translate(2px, -2px); }
.link:active { transform: scale(.98); }
.link:focus-visible, .social:focus-visible, .share:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* 玻璃 */
.btn-glass .link, .btn-soft .link {
  background: var(--card); border: 1px solid var(--border);
  -webkit-backdrop-filter: blur(20px) saturate(170%); backdrop-filter: blur(20px) saturate(170%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 14px 34px -18px rgba(0,0,0,.45);
}
/* 光泽：悬停时一道光扫过 */
.btn-glass .link::before, .btn-soft .link::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,.35) 48%, transparent 66%);
  transform: translateX(-110%); transition: transform .8s ease;
}
.btn-glass .link:hover::before, .btn-soft .link:hover::before { transform: translateX(110%); }
.btn-soft .link { border-radius: 999px; }
/* 实心 */
.btn-solid .link { background: var(--solid); color: var(--solid-text); box-shadow: 0 16px 30px -18px rgba(0,0,0,.6); }
/* 描边 */
.btn-outline .link { border: 2px solid var(--text); background: transparent; }
.btn-outline .link:hover { background: var(--text); color: var(--base); }

.empty { text-align: center; color: var(--sub); font-size: 14px; padding: 24px 0; }

/* ---------- 页脚 ---------- */
.foot { margin-top: auto; padding-top: 48px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.made {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
  font-size: 12px; font-weight: 600; text-decoration: none; color: var(--sub);
  background: var(--card); border: 1px solid var(--border);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.made-dot { width: 10px; height: 10px; border-radius: 50%; background: conic-gradient(var(--b1), var(--b2), var(--b3), var(--b1)); }
.beian { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; font-size: 12px; }
.beian a { color: var(--sub); text-decoration: none; }

/* ---------- 分享 / 弹窗 / 提示 ---------- */
.share {
  position: fixed; z-index: 3; top: max(16px, env(safe-area-inset-top)); right: 16px;
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: var(--card); border: 1px solid var(--border);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
.share svg { width: 20px; height: 20px; }

.sheet { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; padding: 20px; background: rgba(10,6,30,.45); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: fade .2s both; }
.sheet[hidden] { display: none; }
.sheet-card { position: relative; width: min(340px, 100%); padding: 28px 24px 24px; border-radius: 28px; background: #fff; color: #1b0f3d; text-align: center; box-shadow: 0 30px 80px -20px rgba(0,0,0,.5); animation: pop .35s cubic-bezier(.2,1.4,.4,1) both; }
.sheet-x { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: #f1eefb; font-size: 22px; line-height: 1; cursor: pointer; }
.sheet-body img { display: block; width: 100%; max-width: 260px; margin: 8px auto 14px; border-radius: 16px; }
.sheet-body h2 { margin: 0 0 4px; font-size: 18px; }
.sheet-body p { margin: 0; font-size: 13px; color: #6d6589; line-height: 1.6; }

.toast {
  position: fixed; z-index: 20; left: 50%; bottom: max(28px, env(safe-area-inset-bottom)); transform: translate(-50%, 20px);
  padding: 12px 18px; border-radius: 999px; background: rgba(20,12,48,.9); color: #fff; font-size: 14px;
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; white-space: nowrap;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 举报 ---------- */
.report-btn { border: 0; background: none; padding: 4px 8px; font-size: 12px; color: var(--sub); cursor: pointer; opacity: .75; }
.report-btn:hover { opacity: 1; text-decoration: underline; text-underline-offset: 3px; }
.report-form { text-align: left; }
.report-form h2 { text-align: center; }
.report-form > p { text-align: center; margin-bottom: 16px !important; }
.reasons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.reasons label { position: relative; }
.reasons input { position: absolute; opacity: 0; }
.reasons span { display: block; padding: 11px 6px; border-radius: 14px; background: #f4f1ff; border: 2px solid transparent; font-size: 13px; font-weight: 650; text-align: center; cursor: pointer; }
.reasons input:checked + span { border-color: #6c4bff; background: #ebe5ff; color: #3d22c9; }
.reasons input:focus-visible + span { outline: 3px solid #6c4bff; outline-offset: 2px; }
.report-form textarea, .report-form input[type="text"] { width: 100%; padding: 12px 14px; margin-bottom: 10px; border: 1px solid #e3dcff; border-radius: 14px; background: #f8f6ff; font: inherit; font-size: 14px; color: #1b0f3d; outline: none; resize: none; }
.report-form textarea:focus, .report-form input[type="text"]:focus { border-color: #6c4bff; }
.report-submit { width: 100%; height: 48px; border: 0; border-radius: 999px; background: #1b0f3d; color: #fff; font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; }
.report-submit:disabled { opacity: .5; }
.report-err { min-height: 1.4em; margin: 0 0 6px !important; color: #e0335f !important; text-align: center; }
.report-done { font-size: 40px; margin: 6px 0 10px; }

.admin-bar { position: fixed; z-index: 4; top: 0; left: 0; right: 0; padding: 10px 16px; text-align: center; font-size: 13px; font-weight: 700; background: #f3ff6b; color: #170b3b; }

/* 审核中 */
.pending-ring { width: 96px; height: 96px; margin: 0 auto 8px; border-radius: 50%; padding: 6px; background: conic-gradient(var(--b1), var(--b2), var(--b3), var(--b1)); animation: spin 6s linear infinite; }
.pending-ring span { display: block; width: 100%; height: 100%; border-radius: 50%; background: var(--base); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 404 ---------- */
.page-404 { text-align: center; justify-content: center; }
.big404 { font: 700 clamp(96px, 30vw, 160px)/1 'Unbounded', sans-serif; letter-spacing: -.04em; background: linear-gradient(120deg, #fff, var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }

@keyframes pop { from { transform: scale(.6); opacity: 0; } }
@keyframes rise { from { transform: translateY(16px) scale(.97); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .blob, .link, .avatar-wrap { animation: none !important; }
  .link::before { display: none; }
}
@media (max-width: 400px) {
  .link { padding: 14px 50px; font-size: 15px; min-height: 58px; }
}
