/* =========================================================
 * 个人主页样式 —— 复用 style.css 的设计令牌
 * ======================================================= */

.home-body {
  background:
    radial-gradient(900px 480px at 50% -160px, var(--accent-soft), transparent 62%),
    radial-gradient(700px 420px at 92% 30%, color-mix(in srgb, var(--accent-soft) 55%, transparent), transparent 60%),
    var(--bg);
  min-height: 100vh;
}

/* ---------- 顶栏 ---------- */

.home-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 26px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
}
.home-topbar .theme-toggle { margin-left: auto; flex: none; }
.home-topbar .page-switch { flex: none; }
.home-topbar .brand { flex: none; }

/* ---------- 主体 ---------- */

.home-main {
  max-width: 880px;
  margin: 0 auto;
  padding: 56px 22px 80px;
}

/* ---------- Hero ---------- */

.home-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 56px;
}

.hero-avatar {
  position: relative;
  width: 96px;
  height: 96px;
  margin-bottom: 20px;
}
.avatar-img {
  position: absolute;
  inset: 7px;
  width: calc(100% - 14px);
  height: calc(100% - 14px);
  border-radius: 50%;
  object-fit: cover;
  background: #f4f1ec; /* 手绘图为浅底，深色模式下垫一层避免透边 */
  box-shadow: 0 14px 38px rgba(110, 86, 207, 0.5);
}
.avatar-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid color-mix(in srgb, var(--accent) 55%, transparent);
  border-top-color: transparent;
  animation: ring-spin 9s linear infinite;
}
@keyframes ring-spin { to { transform: rotate(360deg); } }

.home-hero h1 {
  font-size: 34px;
  font-weight: 900;
  letter-spacing: -0.03em;
  background: linear-gradient(120deg, var(--ink) 55%, var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-tagline { margin-top: 8px; color: var(--muted); font-size: 14.5px; }

/* CONTACT 小标题：与下方 CEX REFERRALS 同款、同左边线 */
.hero-eyebrow {
  align-self: stretch;
  text-align: left;
  margin-top: 26px;
}

.hero-contacts {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  /* 与下方邀请分组同一左边线 */
  align-self: stretch;
  justify-content: flex-start;
  margin-top: 10px;
}
.contact-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 16px 8px 9px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: var(--surface);
  text-decoration: none;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-soft);
  transition: transform 140ms ease, border-color 140ms ease;
}
.contact-chip:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.contact-chip .chip-glyph {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
}
.contact-chip small { color: var(--muted); font-weight: 500; }

/* ---------- 邀请分组 ---------- */

.referral-group { margin-bottom: 44px; }

.group-head { margin-bottom: 18px; }
.group-eyebrow {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: var(--accent);
}
.group-head h2 { font-size: 20px; margin-top: 4px; }
.group-head p { color: var(--muted); font-size: 13px; margin-top: 4px; }

.referral-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
}

.referral-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 13px;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}
.referral-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  box-shadow: var(--shadow);
}
.referral-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2.5px;
  background: linear-gradient(90deg, var(--card-accent, var(--accent)), transparent 75%);
  opacity: 0.85;
}

.referral-head { display: flex; align-items: center; gap: 11px; }
.referral-glyph {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  font-weight: 800;
  font-size: 14px;
  flex: none;
}
.referral-name { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.referral-name strong { font-size: 14.5px; }
.referral-name small { color: var(--muted); font-size: 11.5px; }

.referral-note { font-size: 12px; color: var(--muted); margin-top: -4px; }

.code-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
}
.code-row code {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--ink);
}
.code-row .code-label { font-size: 11px; color: var(--muted); }
.code-copy {
  margin-left: auto;
  padding: 5px 11px;
  border: 0;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  transition: all 130ms ease;
}
.code-copy:hover { background: var(--accent); color: #fff; }

.referral-actions { display: flex; gap: 8px; }
.referral-actions.primary-row { margin-top: auto; }

.referral-link.alt {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--ink-2);
  font-weight: 600;
}
.referral-link.alt:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: none;
}
.referral-link {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 12px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 130ms ease, box-shadow 130ms ease;
}
.referral-link:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(110, 86, 207, 0.4); }
.link-copy {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 600;
}
.link-copy:hover { border-color: var(--line-strong); color: var(--ink); background: var(--surface-2); }

/* ---------- 页脚 ---------- */

.home-foot {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 2;
}
.home-foot a { color: var(--accent); text-decoration: none; }
.home-foot a:hover { text-decoration: underline; }
.home-foot-dim { opacity: 0.75; }

/* ---------- 响应式 ---------- */

@media (max-width: 620px) {
  .home-topbar { padding: 12px 14px; gap: 10px; flex-wrap: wrap; }
  .home-topbar .brand-copy small { display: none; }
  .home-main { padding-top: 36px; }
  .home-hero h1 { font-size: 28px; }
  .referral-grid { grid-template-columns: 1fr; }
}
