/* ============================================================
   宇华社区 · 液态玻璃设计系统 (Liquid Glass)
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-tap-highlight-color: transparent; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  color: #1f2937; background: #f8fafc;
}
img { max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ------- 玻璃卡片 ------- */
.glass-card {
  background: rgba(255,255,255,.62);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 20px;
  box-shadow: 0 12px 36px rgba(15,23,42,.08);
}
.glass-card.liquid {
  position: relative; overflow: hidden;
}
.glass-card.liquid::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 20% 0%, rgba(255,255,255,.85), transparent 42%);
  border-radius: inherit;
}

/* ------- 按钮 ------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 12px 20px; border: none; border-radius: 14px; font-size: 15px; font-weight: 700;
  color: #fff; cursor: pointer; background: linear-gradient(120deg,#ec4899,#8b5cf6);
  box-shadow: 0 10px 24px rgba(139,92,246,.28); transition: transform .15s, box-shadow .15s;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.ghost { background: rgba(255,255,255,.75); color: #7c3aed; border: 1px solid rgba(167,139,250,.45); box-shadow: none; }
.btn.sm { padding: 8px 14px; font-size: 13px; border-radius: 11px; }
.btn.danger { background: linear-gradient(120deg,#f43f5e,#ef4444); box-shadow: 0 10px 24px rgba(239,68,68,.28); }
.btn.success { background: linear-gradient(120deg,#10b981,#059669); box-shadow: 0 10px 24px rgba(16,185,129,.28); }

/* ------- 头像 + 头像框 ------- */
.avatar {
  position: relative; width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: #e5e7eb; overflow: visible;
}
.avatar .av-img, .avatar .av-init {
  position: absolute; inset: 2px; border-radius: 50%; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.avatar .av-img img { width: 100%; height: 100%; object-fit: cover; }
.avatar .av-img { width: 100%; height: 100%; inset: 0; }
.avatar .av-init { color: #fff; font-weight: 700; font-size: 17px; }
.avatar.sm { width: 32px; height: 32px; } .avatar.sm .av-init { font-size: 13px; }
.avatar.lg { width: 72px; height: 72px; } .avatar.lg .av-init { font-size: 30px; }
.avatar.xl { width: 96px; height: 96px; } .avatar.xl .av-init { font-size: 40px; }

/* VIP 黄金框 */
.avatar.avf-vip { padding: 3px; background: linear-gradient(135deg,#fbbf24,#d97706,#f59e0b,#fbbf24); background-size: 300% 300%; animation: frameSpin 3s linear infinite; }
/* SVIP 钻石/彩虹框 */
.avatar.avf-svip { padding: 3px; background: linear-gradient(135deg,#22d3ee,#a855f7,#ec4899,#22d3ee); background-size: 300% 300%; animation: frameSpin 2.4s linear infinite; }
@keyframes frameSpin { 0% { background-position: 0% 50%; } 100% { background-position: 300% 50%; } }

/* ------- VIP 徽章 ------- */
.vip-badge { display: inline-flex; align-items: center; gap: 3px; font-size: 10px; font-weight: 800; padding: 2px 7px;
  border-radius: 999px; color: #fff; letter-spacing: .5px; vertical-align: middle; }
.vip-badge.vip { background: linear-gradient(120deg,#f59e0b,#d97706); }
.vip-badge.svip { background: linear-gradient(120deg,#22d3ee,#7c3aed); }

/* ------- 发布字体样式 ------- */
.font-default { font-family: inherit; }
.font-serif { font-family: "Songti SC", "SimSun", Georgia, serif; }
.font-hand { font-family: "Kaiti SC", "KaiTi", cursive; }
.font-mono { font-family: "SFMono-Regular", Consolas, monospace; }
.font-fancy { font-family: "STKaiti", "KaiTi", serif; font-style: italic; font-weight: 600; }
.font-bold { font-weight: 800; letter-spacing: .5px; }

/* ------- 玻璃输入框 ------- */
.glass-input {
  width: 100%; padding: 12px 15px; border-radius: 13px; border: 1px solid rgba(255,255,255,.9);
  background: rgba(255,255,255,.65); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  font-size: 15px; color: #111827; outline: none; transition: .2s;
}
.glass-input:focus { border-color: #a78bfa; box-shadow: 0 0 0 3px rgba(167,139,250,.18); background: rgba(255,255,255,.9); }
textarea.glass-input { resize: vertical; min-height: 90px; }

/* ------- 徽章 / 标签 ------- */
.tag { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: rgba(139,92,246,.12); color: #7c3aed; }
.tag.pink { background: rgba(236,72,153,.12); color: #db2777; }
.tag.blue { background: rgba(37,99,235,.1); color: #2563eb; }

/* ============================================================
   纯 CSS 表情（聊天室表情包）
   ============================================================ */
.cemo { width: 56px; height: 56px; border-radius: 50%; background: #fcd34d; position: relative; flex-shrink: 0;
  display: inline-block; box-shadow: inset -4px -6px 0 rgba(0,0,0,.06); }
.cemo::before, .cemo::after { content: ""; position: absolute; width: 7px; height: 9px; background: #1f2937; border-radius: 50%; top: 17px; }
.cemo::before { left: 15px; } .cemo::after { right: 15px; }

/* 大笑 */
.cemo-haha::before, .cemo-haha::after { height: 6px; border-radius: 0 0 50% 50%; transform: rotateX(30deg); background: transparent; box-shadow: 0 0 0 2px #1f2937 inset; }
.cemo-haha .mouth { position: absolute; left: 50%; top: 27px; transform: translateX(-50%); width: 26px; height: 18px;
  background: #7c2d12; border-radius: 0 0 50% 50%; overflow: hidden; }
.cemo-haha .mouth::after { content:""; position:absolute; left:0; right:0; top:0; height:8px; background:#fca5a5; border-radius:0 0 50% 50%; }

/* 微笑 */
.cemo-smile .mouth { position: absolute; left: 50%; top: 28px; transform: translateX(-50%); width: 22px; height: 12px; border: 3px solid #1f2937; border-top: none; border-radius: 0 0 50% 50%; }

/* 爱心眼 */
.cemo-heart::before, .cemo-heart::after { background: transparent; width: 12px; height: 12px; background: #ef4444; border-radius: 0; transform: rotate(-45deg); }
.cemo-heart::before { left: 12px; top: 15px; box-shadow: 5px 5px 0 #ef4444; }
.cemo-heart::after { right: 12px; top: 15px; box-shadow: -5px 5px 0 #ef4444; }
.cemo-heart .mouth { position: absolute; left: 50%; top: 30px; transform: translateX(-50%); width: 20px; height: 10px; border: 3px solid #1f2937; border-top: none; border-radius: 0 0 50% 50%; }

/* 哭泣 */
.cemo-cry::before, .cemo-cry::after { height: 7px; background: transparent; box-shadow: 0 0 0 2px #1f2937 inset; border-radius: 0 0 50% 50%; transform: rotateX(40deg); }
.cemo-cry .mouth { position: absolute; left: 50%; top: 30px; transform: translateX(-50%); width: 18px; height: 14px; border: 3px solid #1f2937; border-top: none; border-radius: 0 0 50% 50%; }
.cemo-cry .tear { position: absolute; top: 24px; width: 6px; height: 12px; background: #60a5fa; border-radius: 0 0 50% 50%; animation: tear 1s infinite; }
.cemo-cry .tear.l { left: 15px; } .cemo-cry .tear.r { right: 15px; animation-delay: .4s; }
@keyframes tear { 0% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(10px); opacity: 0; } }

/* 生气 */
.cemo-angry::before, .cemo-angry::after { height: 6px; border-radius: 0; background: #1f2937; }
.cemo-angry::before { transform: rotate(20deg); }
.cemo-angry::after { transform: rotate(-20deg); }
.cemo-angry .mouth { position: absolute; left: 50%; top: 30px; transform: translateX(-50%); width: 18px; height: 8px; border: 3px solid #1f2937; border-bottom: none; border-radius: 50% 50% 0 0; }

/* 尴尬/汗 */
.cemo-sweat .mouth { position: absolute; left: 50%; top: 31px; transform: translateX(-50%); width: 16px; height: 8px; border: 3px solid #1f2937; border-top: none; border-radius: 0 0 50% 50%; }
.cemo-sweat .tear { position: absolute; right: 8px; top: 12px; width: 7px; height: 11px; background: #60a5fa; border-radius: 50%; }

/* 炫酷墨镜 */
.cemo-cool::before, .cemo-cool::after { width: 12px; height: 12px; background: #111827; box-shadow: 0 0 0 2.5px #111827; top: 14px; }
.cemo-cool::before { left: 11px; } .cemo-cool::after { right: 11px; }
.cemo-cool .mouth { position: absolute; left: 50%; top: 32px; transform: translateX(-50%); width: 20px; height: 7px; border: 3px solid #1f2937; border-top: none; border-radius: 0 0 50% 50%; }

/* 惊讶 */
.cemo-wow::before, .cemo-wow::after { width: 10px; height: 12px; border-radius: 50%; background: transparent; box-shadow: 0 0 0 2px #1f2937 inset; }
.cemo-wow .mouth { position: absolute; left: 50%; top: 29px; transform: translateX(-50%); width: 15px; height: 16px; background: #7c2d12; border-radius: 50%; }

/* 眨眼 */
.cemo-wink::after { height: 5px; border-radius: 0 0 50% 50%; background: transparent; box-shadow: 0 0 0 2px #1f2937 inset; transform: rotateX(40deg); }
.cemo-wink .mouth { position: absolute; left: 50%; top: 28px; transform: translateX(-50%); width: 20px; height: 11px; border: 3px solid #1f2937; border-top: none; border-radius: 0 0 50% 50%; }
