/* ==========================================================
   ldnb.cn  Glassmorphism 移动端社区 UI
   ========================================================== */
:root {
  --grad-main: linear-gradient(135deg, #7c3aed 0%, #5b5bf0 48%, #2563eb 100%);
  --grad-soft: linear-gradient(135deg, rgba(167,139,250,.95), rgba(96,165,250,.95));
  --glass: rgba(255, 255, 255, .72);
  --glass-strong: rgba(255, 255, 255, .88);
  --glass-border: rgba(255, 255, 255, .65);
  --ink: #1e1b3a;
  --ink-2: #5b5878;
  --ink-3: #9793b5;
  --shadow-card: 0 18px 50px rgba(23, 15, 61, .22), 0 2px 8px rgba(23,15,61,.08);
  --shadow-btn: 0 12px 30px rgba(99, 102, 241, .42);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; min-height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  color: var(--ink);
  background: #14102e;
  overflow-x: hidden;
}

/* ---------- 背景光晕 ---------- */
.bg { position: fixed; inset: 0; z-index: 0; overflow: hidden;
  background: linear-gradient(160deg, #1a1140 0%, #2a1b5e 42%, #122144 100%); }
.orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .55; will-change: transform; }
.orb.a { width: 460px; height: 460px; background: #a855f7; top: -140px; left: -120px; animation: drift1 18s ease-in-out infinite alternate; }
.orb.b { width: 420px; height: 420px; background: #3b82f6; top: 28%; right: -160px; animation: drift2 22s ease-in-out infinite alternate; }
.orb.c { width: 380px; height: 380px; background: #ec4899; bottom: -150px; left: 8%; animation: drift3 20s ease-in-out infinite alternate; }
.orb.d { width: 300px; height: 300px; background: #22d3ee; bottom: 12%; right: 6%; opacity: .35; animation: drift1 26s ease-in-out infinite alternate-reverse; }
@keyframes drift1 { to { transform: translate(90px, 70px) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-110px, -60px) scale(1.2); } }
@keyframes drift3 { to { transform: translate(70px, -90px) scale(1.1); } }

/* ---------- 手机画布 ---------- */
.phone { position: relative; z-index: 1; width: 100%; max-width: 480px; margin: 0 auto;
  min-height: 100vh; padding: 0 0 108px; }

/* ---------- 通用玻璃卡片 ---------- */
.glass { background: var(--glass); border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(26px) saturate(160%); backdrop-filter: blur(26px) saturate(160%);
  box-shadow: var(--shadow-card); }
.card { border-radius: 28px; }

/* ---------- 登录页 ---------- */
.auth-wrap { min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 32px 22px; }
.brand { text-align: center; margin-bottom: 26px; animation: fadeUp .7s ease both; }
.brand-logo { width: 68px; height: 68px; border-radius: 22px; margin: 0 auto 16px;
  background: var(--grad-main); display: grid; place-items: center;
  box-shadow: 0 14px 34px rgba(124,58,237,.45); }
.brand-logo svg { width: 34px; height: 34px; fill: #fff; }
.brand h1 { font-size: 25px; margin: 0 0 6px; color: #fff; letter-spacing: 1px; font-weight: 700; }
.brand p { margin: 0; font-size: 13px; color: rgba(255,255,255,.7); }

.auth-card { width: 100%; padding: 22px; border-radius: 32px; animation: fadeUp .7s .08s ease both; }

/* 胶囊 Segmented Tab */
.segment { position: relative; display: flex; padding: 5px; border-radius: 999px;
  background: rgba(120,110,170,.13); margin-bottom: 24px; }
.segment .seg-pill { position: absolute; top: 5px; left: 5px; width: calc(50% - 5px); height: calc(100% - 10px);
  border-radius: 999px; background: #fff; box-shadow: 0 6px 18px rgba(60,40,120,.16);
  transition: transform .45s var(--spring); }
.segment .seg-pill.right { transform: translateX(100%); }
.segment button { position: relative; z-index: 1; flex: 1; border: 0; background: none;
  padding: 11px 0; font-size: 15px; font-weight: 600; color: var(--ink-3); cursor: pointer;
  transition: color .3s; }
.segment button.on { color: var(--ink); }

/* 输入框：白色悬浮大圆角卡片 + 左侧 Icon */
.field { display: flex; align-items: center; gap: 12px; background: #fff;
  border-radius: 20px; padding: 0 16px; height: 58px; margin-bottom: 14px;
  box-shadow: 0 6px 18px rgba(40,25,90,.08); transition: box-shadow .25s, transform .25s; }
.field:focus-within { box-shadow: 0 10px 26px rgba(99,102,241,.22); transform: translateY(-1px); }
.field svg { width: 20px; height: 20px; flex: none; stroke: #8b86b5; fill: none; stroke-width: 1.9; }
.field input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
  font-size: 15px; color: var(--ink); font-family: inherit; }
.field input::placeholder { color: #b4b0c8; }

/* 紫蓝渐变流光按钮 */
.btn-primary { position: relative; width: 100%; border: 0; border-radius: 20px; height: 56px;
  color: #fff; font-size: 16px; font-weight: 700; letter-spacing: .5px; cursor: pointer;
  background: var(--grad-main); background-size: 200% 200%;
  box-shadow: var(--shadow-btn); overflow: hidden;
  animation: gradFlow 6s ease infinite; transition: transform .2s, box-shadow .2s; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 38px rgba(99,102,241,.55); }
.btn-primary:active { transform: scale(.98); }
.btn-primary::after { content: ''; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent);
  transform: skewX(-20deg); animation: shine 3.6s ease-in-out infinite; }
@keyframes gradFlow { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes shine { 0%,60% { left: -60%; } 100% { left: 130%; } }

.helper { text-align: center; font-size: 12px; color: var(--ink-3); margin: 16px 0 2px; }
.err { text-align: center; font-size: 13px; color: #e11d48; min-height: 20px; margin-top: 10px; }

/* ---------- 主界面 ---------- */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px;
  padding: 16px 18px 14px; background: rgba(255,255,255,.55);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,.45); }
.topbar .t-title { font-size: 19px; font-weight: 800; letter-spacing: .5px; flex: 1; }
.score-chip { display: flex; align-items: center; gap: 5px; background: rgba(255,255,255,.85);
  border-radius: 999px; padding: 7px 13px; font-size: 13px; font-weight: 700; color: #6d28d9; }
.score-chip svg { width: 15px; height: 15px; fill: #f59e0b; }
.btn-mini { border: 0; border-radius: 999px; padding: 8px 14px; font-size: 12px; font-weight: 700;
  color: #fff; background: var(--grad-main); cursor: pointer; box-shadow: 0 6px 16px rgba(99,102,241,.35); }

/* 可滚动分类 Tab */
.tabs { display: flex; gap: 8px; overflow-x: auto; padding: 16px 18px 10px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: none; border: 0; border-radius: 999px; padding: 9px 17px; font-size: 13px;
  font-weight: 600; color: rgba(255,255,255,.78); background: rgba(255,255,255,.16);
  cursor: pointer; transition: all .3s; white-space: nowrap; }
.tabs button.on { color: var(--ink); background: #fff; box-shadow: 0 8px 20px rgba(20,10,60,.2); }

.feed { padding: 4px 14px 20px; }
.post { padding: 18px; margin-bottom: 14px; animation: fadeUp .5s ease both; }
.post-head { display: flex; align-items: center; gap: 11px; }
.avatar { width: 42px; height: 42px; border-radius: 15px; flex: none; display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 17px; background: var(--grad-soft);
  box-shadow: 0 6px 14px rgba(99,102,241,.3); }
.post-meta { flex: 1; min-width: 0; }
.post-name { display: flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 700; }
.role-chip { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 6px; color: #fff; }
.role-chip.admin { background: linear-gradient(135deg,#f59e0b,#ef4444); }
.role-chip.mod { background: linear-gradient(135deg,#06b6d4,#3b82f6); }
.role-chip.vip { background: linear-gradient(135deg,#fbbf24,#f59e0b); }
.post-time { font-size: 11px; color: var(--ink-3); margin-top: 3px; }
.more-btn { border: 0; background: rgba(120,110,170,.1); width: 30px; height: 30px;
  border-radius: 10px; cursor: pointer; color: var(--ink-2); font-size: 18px; line-height: 1; }
.post-title { font-size: 16px; font-weight: 700; margin: 14px 0 6px; }
.post-text { font-size: 14px; line-height: 1.65; color: var(--ink-2); white-space: pre-wrap; word-break: break-word; }
.topic { display: inline-block; margin-top: 10px; font-size: 12px; font-weight: 700; color: #6d28d9;
  background: rgba(139,92,246,.13); border-radius: 999px; padding: 5px 11px; }
.post-actions { display: flex; justify-content: space-between; margin-top: 16px;
  padding-top: 13px; border-top: 1px solid rgba(120,110,170,.14); }
.post-actions button { border: 0; background: none; display: flex; align-items: center; gap: 5px;
  font-size: 12px; color: var(--ink-3); cursor: pointer; font-family: inherit; transition: color .2s, transform .2s; }
.post-actions button:hover { color: #7c3aed; transform: translateY(-2px); }
.post-actions button.liked { color: #e11d48; }
.post-actions svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.8; }

.empty { text-align: center; padding: 60px 20px; color: rgba(255,255,255,.75); font-size: 14px; }
.empty svg { width: 52px; height: 52px; opacity: .55; display: block; margin: 0 auto 14px; }

/* FAB */
.fab { position: fixed; bottom: 100px; right: max(18px, calc(50vw - 220px)); z-index: 25;
  width: 56px; height: 56px; border-radius: 20px; border: 0; cursor: pointer;
  background: var(--grad-main); color: #fff; font-size: 30px; line-height: 1;
  box-shadow: 0 14px 30px rgba(99,102,241,.55); transition: transform .3s var(--spring); }
.fab:hover { transform: rotate(90deg) scale(1.08); }

/* ---------- 底部悬浮胶囊导航 ---------- */
.bottom-nav { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 30;
  width: calc(100% - 32px); max-width: 448px; height: 66px; border-radius: 999px;
  background: rgba(255,255,255,.78); border: 1px solid rgba(255,255,255,.8);
  -webkit-backdrop-filter: blur(24px) saturate(170%); backdrop-filter: blur(24px) saturate(170%);
  box-shadow: 0 18px 44px rgba(18,10,55,.32); display: flex; padding: 7px; }
.nav-pill { position: absolute; top: 7px; left: 7px; width: calc(25% - 3.5px); height: calc(100% - 14px);
  border-radius: 999px; background: var(--grad-main);
  box-shadow: 0 6px 20px rgba(124,58,237,.5), 0 0 22px rgba(124,58,237,.35);
  transition: transform .5s var(--spring); }
.nav-item { position: relative; z-index: 1; flex: 1; border: 0; background: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--ink-3); font-size: 10px; font-family: inherit; transition: color .3s; }
.nav-item.on { color: #fff; }
.nav-item svg { width: 21px; height: 21px; stroke: currentColor; fill: none; stroke-width: 1.9; }

/* ---------- 弹层 / Bottom Sheet ---------- */
.mask { position: fixed; inset: 0; z-index: 40; background: rgba(18,10,45,.5);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: fade .25s ease; }
.sheet { position: fixed; z-index: 41; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; border-radius: 32px 32px 0 0; padding: 22px 20px 30px;
  background: var(--glass-strong); border: 1px solid rgba(255,255,255,.8);
  -webkit-backdrop-filter: blur(30px); backdrop-filter: blur(30px);
  box-shadow: 0 -18px 50px rgba(18,10,55,.28); animation: sheetUp .4s var(--spring); max-height: 88vh; overflow-y: auto; }
@keyframes sheetUp { from { transform: translate(-50%, 100%); } to { transform: translate(-50%, 0); } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.sheet-head h3 { margin: 0; font-size: 18px; }
.sheet-head button { border: 0; background: rgba(120,110,170,.12); width: 30px; height: 30px;
  border-radius: 50%; cursor: pointer; font-size: 17px; color: var(--ink-2); }
.sheet label { display: block; font-size: 12px; font-weight: 700; color: var(--ink-2); margin: 14px 0 7px; }
.sheet input[type=text], .sheet textarea { width: 100%; border: 0; border-radius: 16px; padding: 13px 15px;
  background: #fff; font-size: 14px; font-family: inherit; color: var(--ink); outline: 0;
  box-shadow: 0 5px 16px rgba(40,25,90,.08); }
.sheet textarea { min-height: 110px; resize: vertical; line-height: 1.6; }
.sheet .btn-primary { margin-top: 20px; }

.media-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.media-box { border: 1.5px dashed rgba(124,58,237,.35); border-radius: 16px; padding: 14px 6px;
  text-align: center; font-size: 11px; color: var(--ink-2); background: rgba(139,92,246,.06); }
.media-box b { display: block; font-size: 18px; margin-bottom: 4px; color: #7c3aed; }
.media-note { font-size: 11px; color: var(--ink-3); margin-top: 9px; line-height: 1.6; }

/* 举报多选标签 */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button { border: 1px solid rgba(124,58,237,.25); background: #fff; border-radius: 999px;
  padding: 8px 13px; font-size: 12px; color: var(--ink-2); cursor: pointer; font-family: inherit; transition: all .2s; }
.chips button.on { background: var(--grad-main); color: #fff; border-color: transparent; box-shadow: 0 5px 14px rgba(99,102,241,.3); }
.counter { text-align: right; font-size: 11px; color: var(--ink-3); margin-top: 6px; }

/* ---------- 发现 / 消息 / 我的 ---------- */
.section-title { font-size: 15px; font-weight: 800; color: #fff; margin: 18px 18px 10px; }
.rank-row { display: flex; align-items: center; gap: 12px; padding: 13px 16px; margin: 0 14px 10px; }
.rank-no { width: 26px; height: 26px; border-radius: 9px; display: grid; place-items: center;
  font-size: 12px; font-weight: 800; color: #fff; background: rgba(139,92,246,.55); }
.rank-no.top { background: linear-gradient(135deg,#fbbf24,#f59e0b); }
.rank-name { flex: 1; font-size: 14px; font-weight: 700; }
.rank-score { font-size: 14px; font-weight: 800; color: #6d28d9; }

.profile-hero { margin: 16px 14px; padding: 22px; text-align: center; }
.profile-hero .avatar { width: 74px; height: 74px; border-radius: 26px; font-size: 28px; margin: 0 auto 12px; }
.profile-hero h2 { margin: 0 0 5px; font-size: 19px; }
.profile-hero p { margin: 0; font-size: 12px; color: var(--ink-3); }
.stats { display: flex; justify-content: space-around; margin-top: 20px; padding-top: 18px;
  border-top: 1px solid rgba(120,110,170,.15); }
.stats div { text-align: center; }
.stats b { display: block; font-size: 19px; }
.stats span { font-size: 11px; color: var(--ink-3); }

.matrix { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; margin: 0 14px 14px; }
.matrix button { border: 0; border-radius: 20px; padding: 17px 14px; text-align: left; cursor: pointer;
  font-family: inherit; background: var(--glass); color: var(--ink);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); box-shadow: var(--shadow-card);
  transition: transform .25s var(--spring); }
.matrix button:hover { transform: translateY(-3px); }
.matrix .mi { font-size: 20px; display: block; margin-bottom: 7px; }
.matrix b { font-size: 13px; }
.matrix small { display: block; font-size: 11px; color: var(--ink-3); margin-top: 3px; }

.vip-card { margin: 0 14px 14px; padding: 19px; border-radius: 24px; color: #fff;
  background: linear-gradient(135deg,#b45309,#f59e0b 45%,#fbbf24);
  box-shadow: 0 14px 34px rgba(245,158,11,.35); }
.vip-card h3 { margin: 0 0 5px; font-size: 16px; }
.vip-card p { margin: 0; font-size: 12px; opacity: .9; }
.vip-card button { margin-top: 14px; border: 0; border-radius: 999px; padding: 9px 18px;
  background: #fff; color: #b45309; font-weight: 800; font-size: 12px; cursor: pointer; font-family: inherit; }

.toast { position: fixed; z-index: 60; top: 22px; left: 50%; transform: translateX(-50%);
  background: rgba(30,20,60,.92); color: #fff; padding: 11px 20px; border-radius: 999px;
  font-size: 13px; box-shadow: 0 10px 30px rgba(0,0,0,.3); animation: fadeUp .3s ease;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }

@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.view-enter-active { animation: fadeUp .38s ease; }

@media (min-width: 520px) {
  .phone { box-shadow: 0 0 80px rgba(0,0,0,.28); background: rgba(255,255,255,.03); }
}
