/* ============================================================
   user.css — 用户详情页
   蜂窝交互背景 + 杂志排版 + 统计卡片 + 图标
   ============================================================ */

:root {
  --up-avatar: 108px;
  --up-accent: #2d5a3d;
  --up-text: #1a1a1a;
  --up-muted: #888;
  --up-border: #e8e8e4;
}

/* 蜂窝网格背景 */
.hex-bg {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: auto;
  background: #f5f2eb;
}
.hex-block {
  fill: #fafaf7;
  stroke: rgba(45,90,61,0.12);
  stroke-width: 0;
  transition: stroke-width 0.3s ease-out, fill 0.3s ease-out, filter 0.3s ease-out;
}
.hex-block.active {
  stroke-width: 3;
  fill: rgba(45,90,61,0.04);
  filter: drop-shadow(0 0 3px rgba(45,90,61,0.15)) drop-shadow(0 0 6px rgba(45,90,61,0.08));
}

/* ----- Hero 背景（极淡渐变，去"素"感） ----- */
.profile-hero {
  text-align: center;
  padding: 72px 2rem 88px;
  max-width: 620px;
  margin: 0 auto;
  position: relative;
}

/* 顶部淡色带 */
.profile-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: 340px;
  background: linear-gradient(180deg, #f4f7f2 0%, transparent 100%);
  z-index: -1;
  pointer-events: none;
}

/* ----- 头像 ----- */
.profile-avatar-wrap {
  display: block;
  margin: 0 auto 28px;
  position: relative;
  width: fit-content;
}

/* 头像外圈淡色光环 */
.profile-avatar-wrap::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid rgba(45,90,61,0.10);
  pointer-events: none;
}

.profile-avatar {
  width: var(--up-avatar);
  height: var(--up-avatar);
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(45,90,61,0.12);
  transition: transform 0.4s ease, border-color 0.4s ease;
  display: block;
}

.profile-avatar:hover {
  transform: scale(1.03);
  border-color: rgba(45,90,61,0.35);
}

/* ----- 用户名 ----- */
.profile-name {
  font-size: clamp(1.55rem, 3.5vw, 2rem);
  font-weight: 600;
  color: var(--up-text);
  letter-spacing: -0.02em;
  margin: 0 auto;
  text-align: center;
}

/* 故障效果 */
.glitch-name {
  position: relative;
  cursor: pointer;
  display: inline-block;
  font-family: 'Bungee Shade', 'Impact', sans-serif;
  letter-spacing: 0.06em;
}
.glitch-layer {
  position: absolute;
  left: 0; top: 0;
  width: 100%;
  pointer-events: none;
  user-select: none;
  opacity: 0;
  white-space: nowrap;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  font-family: inherit;
  text-align: center;
}
.glitch-layer:first-child {
  position: relative;
  opacity: 1;
}
.glitch-name.glitching .glitch-layer {
  opacity: 1;
}
.glitch-name.glitching .glitch-layer:nth-child(1) { position: relative; color: inherit; opacity: 1; }
.glitch-name.glitching .glitch-layer:nth-child(2) { color: #2d5a3d; mix-blend-mode: multiply; transform: translate(2%,0); }
.glitch-name.glitching .glitch-layer:nth-child(3) { color: #c9b896; mix-blend-mode: screen; transform: translate(-2%,0); }
.glitch-name.glitching .glitch-layer:nth-child(4) { color: rgba(255,255,255,0.3); mix-blend-mode: overlay; transform: translate(3%,-1%); }
.glitch-name.glitching .glitch-layer:nth-child(5) { color: rgba(0,0,0,0.15); mix-blend-mode: overlay; transform: translate(-3%,1%); }

/* ----- 分隔线 ----- */
.profile-divider {
  width: 44px;
  height: 2px;
  background: var(--up-border);
  margin: 18px auto;
}

/* ----- 个性签名 ----- */
.profile-bio {
  font-size: 1rem;
  font-weight: 400;
  color: #666;
  line-height: 1.75;
  max-width: 460px;
  margin: 0 auto;
}

/* ----- 元信息行 ----- */
.profile-meta {
  margin-top: 12px;
  font-size: 0.82rem;
  color: var(--up-muted);
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-wrap: wrap;
}

.profile-meta a {
  color: var(--up-muted);
  text-decoration: none;
  transition: color 0.3s;
}

.profile-meta a:hover {
  color: var(--up-accent);
}

/* ----- 关注回显 ----- */
.profile-follows-you {
  margin-top: 10px;
  font-size: 0.78rem;
  color: var(--up-accent);
  background: rgba(45,90,61,0.06);
  display: inline-block;
  padding: 2px 14px;
  border-radius: 3px;
  letter-spacing: 0.03em;
}

/* 管理员邮箱 */
.profile-email {
  margin-top: 8px;
  font-size: 0.78rem;
}

.profile-email a {
  color: var(--up-accent);
  text-decoration: none;
  border-bottom: 1px dotted var(--up-accent);
}

/* ============================================================
   统计卡片
   ============================================================ */
.profile-stats {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
}

.stat-card {
  text-align: center;
  text-decoration: none;
  color: inherit;
  padding: 22px 28px 18px;
  border-radius: 6px;
  background: #fafaf8;
  border: 1px solid transparent;
  transition: all 0.3s ease;
  min-width: 120px;
}

.stat-card:hover {
  background: #fff;
  border-color: var(--up-border);
}

.stat-card:hover .stat-num {
  color: var(--up-accent);
}

.stat-card:hover .stat-icon {
  color: var(--up-accent);
  opacity: 0.7;
}

.stat-icon {
  display: block;
  font-size: 1rem;
  color: var(--up-muted);
  opacity: 0.45;
  margin-bottom: 6px;
  transition: all 0.3s ease;
}

.stat-num {
  display: block;
  font-size: 34px;
  font-weight: 400;
  color: var(--up-text);
  line-height: 1.15;
  transition: color 0.3s ease;
  letter-spacing: -0.01em;
}

.stat-label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: #aaa;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 5px;
}

/* ============================================================
   操作按钮
   ============================================================ */
.profile-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 36px;
  flex-wrap: wrap;
}

.btn-profile {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 24px;
  font-size: 0.84rem;
  font-weight: 500;
  border-radius: 5px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.02em;
}

.btn-profile-fill {
  background: var(--up-text);
  color: #fff;
  border: 1px solid var(--up-text);
}

.btn-profile-fill:hover {
  background: #333;
  border-color: #333;
  transform: translateY(-1px);
}

.btn-profile-outline {
  background: transparent;
  color: #444;
  border: 1px solid #ddd;
}

.btn-profile-outline:hover {
  border-color: #999;
  color: var(--up-text);
  transform: translateY(-1px);
}

/* ============================================================
   文章区
   ============================================================ */
.profile-posts {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px 2rem 80px;
}

.profile-posts-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f0f0ec;
}

.profile-posts-label::before {
  content: '';
  width: 22px;
  height: 2px;
  background: var(--up-accent);
  opacity: 0.35;
  border-radius: 1px;
}

.profile-posts-label span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #999;
}

/* ============================================================
   入场动画（纯 CSS）
   ============================================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.profile-avatar-wrap { animation: fadeUp 0.55s 0s    ease forwards; }
.profile-name        { animation: fadeUp 0.55s 0.10s ease forwards; }
.profile-divider     { animation: fadeUp 0.45s 0.15s ease forwards; }
.profile-bio         { animation: fadeUp 0.55s 0.20s ease forwards; }
.profile-meta        { animation: fadeUp 0.50s 0.25s ease forwards; }
.profile-stats       { animation: fadeUp 0.55s 0.30s ease forwards; }
.profile-actions     { animation: fadeUp 0.50s 0.35s ease forwards; }
.profile-posts       { animation: fadeUp 0.55s 0.40s ease forwards; }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 768px) {
  .profile-hero { padding: 56px 1.5rem 64px; }
  .profile-hero::before { height: 240px; }
  .profile-avatar { width: 84px; height: 84px; }
  .stat-card { padding: 16px 18px 14px; min-width: 90px; }
  .stat-num { font-size: 28px; }
  .profile-stats { gap: 12px; }
  .profile-posts { padding: 0 1.5rem 56px; }
}

@media (max-width: 480px) {
  .profile-hero { padding: 44px 1rem 52px; }
  .profile-hero::before { height: 200px; }
  .profile-avatar { width: 72px; height: 72px; }
  .profile-stats { gap: 8px; }
  .stat-card { padding: 14px 12px 12px; min-width: 80px; }
  .stat-num { font-size: 24px; }
  .stat-icon { font-size: 0.85rem; }
  .profile-actions { flex-direction: column; align-items: center; }
  .profile-posts { padding: 0 1rem 48px; }
}

/* prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .profile-avatar-wrap,
  .profile-name,
  .profile-divider,
  .profile-bio,
  .profile-meta,
  .profile-stats,
  .profile-actions,
  .profile-posts {
    animation: none;
    opacity: 1;
  }
}
