/* ==========================================================================
   茉莉吃瓜网 · 设计系统
   风格：清爽杂志风 + 玻璃拟态，参考 Medium / 即刻 / 小红书 的信息层次
   ========================================================================== */

:root {
  --brand: #10b981;
  --brand-dark: #059669;
  --brand-darker: #047857;
  --brand-soft: #ecfdf5;
  --brand-line: #a7f3d0;

  --ink: #0f172a;
  --ink-2: #334155;
  --ink-3: #64748b;
  --ink-4: #94a3b8;
  --line: #e8edf3;
  --line-2: #f1f5f9;
  --bg: #f7f9fb;
  --card: #ffffff;

  --danger: #ef4444;
  --danger-soft: #fef2f2;
  --warn: #f59e0b;
  --warn-soft: #fffbeb;
  --info: #3b82f6;

  --r-sm: 8px;
  --r: 14px;
  --r-lg: 20px;
  --r-full: 999px;

  --sd-1: 0 1px 2px rgba(15, 23, 42, .04), 0 1px 3px rgba(15, 23, 42, .03);
  --sd-2: 0 4px 14px rgba(15, 23, 42, .06);
  --sd-3: 0 12px 32px rgba(15, 23, 42, .10);
  --sd-brand: 0 8px 24px rgba(16, 185, 129, .28);

  --nav-h: 62px;
  --maxw: 1140px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 顶部渐变光晕 */
body::before {
  content: "";
  position: fixed;
  top: -260px;
  left: 50%;
  transform: translateX(-50%);
  width: 1100px;
  height: 520px;
  background: radial-gradient(circle at 50% 50%, rgba(16, 185, 129, .13), rgba(16, 185, 129, 0) 68%);
  pointer-events: none;
  z-index: 0;
}

a { color: var(--brand-dark); text-decoration: none; transition: color .18s var(--ease); }
a:hover { color: var(--brand-darker); }

img { max-width: 100%; display: block; }

h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.3; letter-spacing: -.01em; }

button, input, textarea, select { font-family: inherit; font-size: inherit; }

::selection { background: var(--brand-line); color: var(--brand-darker); }

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d5dde7; border-radius: 8px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #c1cbd8; }

/* ============================ 布局 ============================ */

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 18px; position: relative; z-index: 1; }

.page { min-height: calc(100vh - var(--nav-h) - 120px); padding: 26px 0 60px; }

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 26px;
  align-items: start;
}

/* ============================ 导航 ============================ */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(232, 237, 243, .9);
}

.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  height: 100%;
  padding: 0 18px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }
.logo:hover { color: inherit; }

.logo-mark {
  width: 34px; height: 34px;
  border-radius: 11px;
  background: linear-gradient(135deg, #34d399, #10b981 45%, #059669);
  display: grid; place-items: center;
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(16, 185, 129, .32);
  flex-shrink: 0;
}

.logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.logo-name { font-size: 16px; font-weight: 800; letter-spacing: -.2px; color: var(--ink); }
.logo-sub { font-size: 10.5px; color: var(--ink-4); letter-spacing: .6px; }

.nav-search {
  flex: 1;
  max-width: 380px;
  position: relative;
}
.nav-search input {
  width: 100%;
  height: 38px;
  padding: 0 14px 0 38px;
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  background: #f4f7fa;
  color: var(--ink);
  outline: none;
  transition: all .2s var(--ease);
  font-size: 13.5px;
}
.nav-search input::placeholder { color: var(--ink-4); }
.nav-search input:focus {
  background: #fff;
  border-color: var(--brand-line);
  box-shadow: 0 0 0 3.5px rgba(16, 185, 129, .12);
}
.nav-search svg {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--ink-4); pointer-events: none;
}

.nav-links { margin-left: auto; display: flex; align-items: center; gap: 6px; }

.nav-link {
  padding: 8px 12px;
  border-radius: var(--r-sm);
  color: var(--ink-3);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: all .18s var(--ease);
}
.nav-link:hover { background: var(--line-2); color: var(--ink); }
.nav-link.active { color: var(--brand-darker); background: var(--brand-soft); }

/* 用户菜单 */
.usermenu { position: relative; }
.usermenu-btn {
  display: flex; align-items: center; gap: 7px;
  padding: 4px 10px 4px 4px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--r-full);
  cursor: pointer;
  transition: all .18s var(--ease);
}
.usermenu-btn:hover { border-color: var(--brand-line); box-shadow: var(--sd-1); }
.usermenu-name { font-size: 13px; font-weight: 600; color: var(--ink-2); max-width: 88px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  object-fit: cover;
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  display: grid; place-items: center;
  color: var(--brand-darker);
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
  overflow: hidden;
}
.avatar.lg { width: 44px; height: 44px; font-size: 17px; }
.avatar.xl { width: 76px; height: 76px; font-size: 28px; }
.avatar.sm { width: 24px; height: 24px; font-size: 11px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

.dropdown {
  position: absolute;
  right: 0; top: calc(100% + 10px);
  min-width: 190px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--sd-3);
  padding: 6px;
  opacity: 0; visibility: hidden;
  transform: translateY(-6px) scale(.98);
  transition: all .18s var(--ease);
  z-index: 60;
}
.usermenu.open .dropdown { opacity: 1; visibility: visible; transform: none; }

.dropdown a, .dropdown button {
  display: flex; align-items: center; gap: 9px;
  width: 100%;
  padding: 9px 11px;
  border: 0; background: none;
  border-radius: var(--r-sm);
  color: var(--ink-2);
  font-size: 13.5px;
  text-align: left;
  cursor: pointer;
  transition: background .15s;
}
.dropdown a:hover, .dropdown button:hover { background: var(--line-2); color: var(--ink); }
.dropdown .danger { color: var(--danger); }
.dropdown .danger:hover { background: var(--danger-soft); color: var(--danger); }
.dropdown hr { border: 0; border-top: 1px solid var(--line-2); margin: 5px 3px; }
.dropdown .dd-head { padding: 9px 11px 7px; font-size: 12px; color: var(--ink-4); }

.badge-dot {
  min-width: 17px; height: 17px; padding: 0 5px;
  background: var(--danger); color: #fff;
  border-radius: var(--r-full);
  font-size: 10.5px; font-weight: 700;
  display: inline-grid; place-items: center;
  line-height: 1;
}

/* ============================ 按钮 ============================ */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 40px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--r-full);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all .18s var(--ease);
  user-select: none;
  text-decoration: none;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; }

.btn-primary {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  box-shadow: 0 4px 14px rgba(16, 185, 129, .3);
}
.btn-primary:hover:not(:disabled) {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 7px 20px rgba(16, 185, 129, .38);
}
.btn-primary:active { transform: translateY(0); }

.btn-ghost { background: #fff; border-color: var(--line); color: var(--ink-2); }
.btn-ghost:hover:not(:disabled) { border-color: var(--brand-line); color: var(--brand-darker); background: var(--brand-soft); }

.btn-soft { background: var(--brand-soft); color: var(--brand-darker); }
.btn-soft:hover:not(:disabled) { background: var(--brand-line); color: var(--brand-darker); }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #dc2626; color: #fff; }

.btn-sm { height: 32px; padding: 0 13px; font-size: 13px; }
.btn-lg { height: 48px; padding: 0 26px; font-size: 15px; }
.btn-block { width: 100%; }

/* ============================ 卡片 ============================ */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sd-1);
}
.card-pad { padding: 20px; }
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line-2);
}
.card-head h3 { font-size: 15px; font-weight: 700; }
.card-head .more { font-size: 12.5px; color: var(--ink-4); }
.card-head .more:hover { color: var(--brand-dark); }

/* ============================ 首页 Hero ============================ */

.hero {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  padding: 34px 30px;
  margin-bottom: 22px;
  background: linear-gradient(135deg, #0f766e 0%, #059669 42%, #10b981 100%);
  box-shadow: var(--sd-2);
  color: #fff;
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 88% 12%, rgba(255, 255, 255, .22), transparent 42%),
    radial-gradient(circle at 12% 92%, rgba(255, 255, 255, .12), transparent 46%);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; }
.hero h1 { font-size: 30px; letter-spacing: -.6px; margin-bottom: 8px; }
.hero p { margin: 0 0 18px; color: rgba(255, 255, 255, .88); font-size: 14.5px; max-width: 560px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; position: relative; z-index: 1; }
.hero .btn-white { background: #fff; color: var(--brand-darker); box-shadow: 0 4px 16px rgba(0, 0, 0, .13); }
.hero .btn-white:hover { background: #fff; color: var(--brand-darker); transform: translateY(-1px); }
.hero .btn-line { background: rgba(255, 255, 255, .13); color: #fff; border-color: rgba(255, 255, 255, .34); }
.hero .btn-line:hover { background: rgba(255, 255, 255, .22); color: #fff; border-color: rgba(255, 255, 255, .5); }

.hero-stats { display: flex; gap: 26px; margin-top: 24px; flex-wrap: wrap; position: relative; z-index: 1; }
.hero-stat b { display: block; font-size: 21px; font-weight: 800; letter-spacing: -.4px; }
.hero-stat span { font-size: 12px; color: rgba(255, 255, 255, .78); }

/* ============================ 筛选栏 ============================ */

.toolbar {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.tabs {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  background: #eef2f6;
  border-radius: var(--r-full);
}
.tab {
  padding: 7px 15px;
  border-radius: var(--r-full);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-3);
  transition: all .18s var(--ease);
  white-space: nowrap;
}
.tab:hover { color: var(--ink); }
.tab.active { background: #fff; color: var(--brand-darker); box-shadow: var(--sd-1); }

.tagcloud { display: flex; flex-wrap: wrap; gap: 7px; }
.tag-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 11px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  font-size: 12.5px;
  color: var(--ink-2);
  transition: all .18s var(--ease);
}
.tag-chip:hover { border-color: var(--brand-line); background: var(--brand-soft); color: var(--brand-darker); }
.tag-chip.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.tag-chip em { font-style: normal; color: var(--ink-4); font-size: 11px; }
.tag-chip.active em { color: rgba(255, 255, 255, .8); }

/* ============================ 帖子卡片 ============================ */

.feed { display: grid; gap: 16px; }

.post-card {
  display: flex;
  gap: 18px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sd-1);
  transition: all .22s var(--ease);
  position: relative;
  overflow: hidden;
}
.post-card:hover {
  border-color: var(--brand-line);
  box-shadow: var(--sd-2);
  transform: translateY(-2px);
}

.post-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.post-meta-top { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; flex-wrap: wrap; }

.post-title {
  font-size: 17.5px;
  font-weight: 700;
  line-height: 1.42;
  color: var(--ink);
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color .18s;
}
.post-card:hover .post-title { color: var(--brand-darker); }

.post-excerpt {
  font-size: 13.8px;
  color: var(--ink-3);
  line-height: 1.72;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 12px;
}

.post-foot {
  margin-top: auto;
  display: flex; align-items: center; gap: 14px;
  font-size: 12.5px;
  color: var(--ink-4);
  flex-wrap: wrap;
}
.post-foot .dot { width: 3px; height: 3px; border-radius: 50%; background: #cbd5e1; }

.metric { display: inline-flex; align-items: center; gap: 4px; }
.metric svg { width: 14px; height: 14px; }
.metric.liked { color: var(--danger); }

.author-mini { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-3); font-weight: 500; }
.author-mini:hover { color: var(--brand-darker); }

/* 卡片封面 */
.post-cover {
  width: 176px;
  height: 122px;
  border-radius: var(--r);
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
  position: relative;
  order: 2;
}
.post-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.post-card:hover .post-cover img { transform: scale(1.045); }

.cover-badge {
  position: absolute; left: 8px; bottom: 8px;
  padding: 3px 8px;
  background: rgba(15, 23, 42, .72);
  backdrop-filter: blur(6px);
  color: #fff;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  display: inline-flex; align-items: center; gap: 4px;
}
.cover-badge svg { width: 11px; height: 11px; }

/* 移动端单列 */
@media (max-width: 720px) {
  .post-card { gap: 12px; padding: 14px; }
  .post-cover { width: 104px; height: 86px; }
  .post-title { font-size: 15.5px; }
  .post-excerpt { -webkit-line-clamp: 2; font-size: 13px; }
}

/* ============================ 状态徽章 ============================ */

.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2.5px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}
.chip.ok { background: var(--brand-soft); color: var(--brand-darker); }
.chip.warn { background: var(--warn-soft); color: #b45309; }
.chip.bad { background: var(--danger-soft); color: #b91c1c; }
.chip.gray { background: var(--line-2); color: var(--ink-3); }
.chip.info { background: #eff6ff; color: #1d4ed8; }
.chip.pin { background: #fef3c7; color: #92400e; }
.chip svg { width: 11px; height: 11px; }

/* ============================ 侧栏 ============================ */

.side { display: grid; gap: 16px; position: sticky; top: calc(var(--nav-h) + 18px); }

.side-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sd-1); overflow: hidden; }
.side-head { padding: 14px 17px; border-bottom: 1px solid var(--line-2); font-size: 14px; font-weight: 700; display: flex; align-items: center; justify-content: space-between; }
.side-body { padding: 15px 17px; }

.side-notice {
  background: linear-gradient(135deg, #ecfdf5, #f0fdfa);
  border: 1px solid var(--brand-line);
  border-radius: var(--r-lg);
  padding: 15px 17px;
}
.side-notice h4 { font-size: 13.5px; color: var(--brand-darker); margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.side-notice p { margin: 0; font-size: 12.5px; color: #047857; line-height: 1.7; }

.hot-list { display: grid; gap: 2px; }
.hot-item {
  display: flex; gap: 9px; align-items: flex-start;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line-2);
  font-size: 13.2px;
  color: var(--ink-2);
  line-height: 1.5;
}
.hot-item:last-child { border-bottom: 0; padding-bottom: 0; }
.hot-item:hover { color: var(--brand-darker); }
.hot-rank {
  width: 17px; height: 17px;
  border-radius: 5px;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 800;
  background: var(--line-2); color: var(--ink-4);
  flex-shrink: 0; margin-top: 2px;
}
.hot-item:nth-child(1) .hot-rank { background: #ef4444; color: #fff; }
.hot-item:nth-child(2) .hot-rank { background: #f97316; color: #fff; }
.hot-item:nth-child(3) .hot-rank { background: #f59e0b; color: #fff; }

.stat-row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 13px; border-bottom: 1px dashed var(--line-2); }
.stat-row:last-child { border: 0; }
.stat-row span { color: var(--ink-3); }
.stat-row b { color: var(--ink); font-weight: 700; }

/* ============================ 分页 ============================ */

.pager { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 26px; flex-wrap: wrap; }
.pager a, .pager span {
  min-width: 36px; height: 36px;
  padding: 0 11px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: #fff;
  font-size: 13.5px;
  color: var(--ink-2);
  transition: all .16s;
}
.pager a:hover { border-color: var(--brand-line); background: var(--brand-soft); color: var(--brand-darker); }
.pager .active { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 700; }
.pager .disabled { opacity: .45; pointer-events: none; }

/* ============================ 空状态 ============================ */

.empty {
  text-align: center;
  padding: 62px 22px;
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: var(--r-lg);
}
.empty-icon {
  width: 66px; height: 66px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--brand-soft);
  display: grid; place-items: center;
  font-size: 27px;
}
.empty h3 { font-size: 16px; margin-bottom: 6px; }
.empty p { margin: 0 0 18px; color: var(--ink-3); font-size: 13.5px; }

/* ============================ 表单 ============================ */

.form-group { margin-bottom: 16px; }
.label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 7px;
}
.label .req { color: var(--danger); margin-left: 2px; }
.label .hint { font-weight: 400; color: var(--ink-4); font-size: 12px; margin-left: 6px; }

.input, .textarea, .select {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: #fff;
  color: var(--ink);
  outline: none;
  transition: all .18s var(--ease);
  font-size: 14px;
}
.input::placeholder, .textarea::placeholder { color: var(--ink-4); }
.input:focus, .textarea:focus, .select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3.5px rgba(16, 185, 129, .13);
}
.textarea { resize: vertical; min-height: 120px; line-height: 1.7; }

.input-icon-wrap { position: relative; }
.input-icon-wrap .input { padding-left: 42px; }
.input-icon-wrap svg {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 17px; height: 17px; color: var(--ink-4); pointer-events: none;
}
.input-icon-wrap:focus-within svg { color: var(--brand-dark); }

/* 验证码行 */
.code-row { display: grid; grid-template-columns: 1fr 118px; gap: 9px; }

.form-tip { font-size: 12.2px; color: var(--ink-4); margin-top: 6px; line-height: 1.6; }

.alert {
  padding: 11px 14px;
  border-radius: var(--r);
  font-size: 13.2px;
  margin-bottom: 16px;
  display: flex; align-items: flex-start; gap: 8px;
  line-height: 1.6;
}
.alert svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }
.alert-error { background: var(--danger-soft); color: #b91c1c; border: 1px solid #fecaca; }
.alert-success { background: var(--brand-soft); color: var(--brand-darker); border: 1px solid var(--brand-line); }
.alert-warn { background: var(--warn-soft); color: #b45309; border: 1px solid #fde68a; }
.alert-info { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }

/* ============================ 认证页 ============================ */

.auth-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  background: #fff;
}

.auth-side {
  position: relative;
  overflow: hidden;
  background: linear-gradient(150deg, #064e3b 0%, #047857 34%, #059669 66%, #10b981 100%);
  padding: 46px 52px;
  display: flex; flex-direction: column; justify-content: space-between;
  color: #fff;
}
.auth-side::before {
  content: "";
  position: absolute;
  width: 560px; height: 560px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .18), transparent 66%);
  top: -180px; right: -180px;
}
.auth-side::after {
  content: "";
  position: absolute;
  width: 420px; height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .13), transparent 68%);
  bottom: -160px; left: -120px;
}
.auth-side-inner { position: relative; z-index: 1; }

.auth-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 40px; }
.auth-brand .logo-mark { width: 42px; height: 42px; font-size: 21px; background: rgba(255, 255, 255, .18); box-shadow: none; backdrop-filter: blur(8px); }
.auth-brand-text b { display: block; font-size: 17.5px; letter-spacing: -.3px; }
.auth-brand-text span { font-size: 11.5px; color: rgba(255, 255, 255, .72); letter-spacing: .8px; }

.auth-headline { font-size: 33px; line-height: 1.32; letter-spacing: -.9px; margin-bottom: 14px; font-weight: 800; }
.auth-sub { font-size: 14.5px; color: rgba(255, 255, 255, .82); line-height: 1.8; max-width: 400px; margin-bottom: 34px; }

.auth-feats { display: grid; gap: 15px; max-width: 420px; }
.auth-feat { display: flex; gap: 12px; align-items: flex-start; }
.auth-feat-ico {
  width: 34px; height: 34px; border-radius: 10px;
  background: rgba(255, 255, 255, .15);
  display: grid; place-items: center;
  flex-shrink: 0;
  backdrop-filter: blur(6px);
}
.auth-feat-ico svg { width: 17px; height: 17px; }
.auth-feat-t b { display: block; font-size: 13.8px; margin-bottom: 2px; }
.auth-feat-t span { font-size: 12.5px; color: rgba(255, 255, 255, .72); line-height: 1.6; }

.auth-foot-note { font-size: 12px; color: rgba(255, 255, 255, .58); position: relative; z-index: 1; margin: 0; }

.auth-main {
  display: flex; align-items: center; justify-content: center;
  padding: 40px 28px;
  background: #fff;
  overflow-y: auto;
}
.auth-box { width: 100%; max-width: 396px; }
.auth-box-head { margin-bottom: 26px; }
.auth-box-head h2 { font-size: 24px; letter-spacing: -.5px; margin-bottom: 7px; }
.auth-box-head p { margin: 0; color: var(--ink-3); font-size: 13.8px; }

.auth-switch { margin-top: 22px; text-align: center; font-size: 13.5px; color: var(--ink-3); }
.auth-switch a { font-weight: 600; margin-left: 4px; }

.auth-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 20px 0;
  color: var(--ink-4); font-size: 12px;
}
.auth-divider::before, .auth-divider::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}

@media (max-width: 900px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .auth-main { padding: 30px 20px; min-height: 100vh; align-items: flex-start; padding-top: 54px; }
  .auth-box { max-width: 100%; }
  .auth-mobile-brand { display: flex !important; }
}
.auth-mobile-brand { display: none; align-items: center; gap: 10px; margin-bottom: 26px; }

/* ============================ 发帖页 ============================ */

.compose-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }

.dropzone {
  border: 2px dashed #d9e2ec;
  border-radius: var(--r-lg);
  padding: 30px 20px;
  text-align: center;
  background: #fbfdff;
  cursor: pointer;
  transition: all .2s var(--ease);
}
.dropzone:hover, .dropzone.hover {
  border-color: var(--brand);
  background: var(--brand-soft);
}
.dropzone svg { width: 34px; height: 34px; color: var(--brand); margin: 0 auto 10px; }
.dropzone b { display: block; font-size: 14px; margin-bottom: 5px; }
.dropzone span { font-size: 12.5px; color: var(--ink-4); }

.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.pv-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--r);
  overflow: hidden;
  background: var(--line-2);
  border: 1px solid var(--line);
}
.pv-item img { width: 100%; height: 100%; object-fit: cover; }
.pv-del {
  position: absolute; top: 5px; right: 5px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(15, 23, 42, .68);
  color: #fff; border: 0;
  display: grid; place-items: center;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  transition: background .15s;
}
.pv-del:hover { background: var(--danger); }
.pv-kind {
  position: absolute; left: 5px; bottom: 5px;
  padding: 1px 6px;
  border-radius: 5px;
  background: rgba(15, 23, 42, .7);
  color: #fff; font-size: 10px; font-weight: 600;
}

/* ============================ 帖子详情 ============================ */

.article-head { margin-bottom: 22px; }
.article-title {
  font-size: 30px;
  line-height: 1.34;
  letter-spacing: -.7px;
  margin-bottom: 16px;
  word-break: break-word;
}

.article-byline {
  display: flex; align-items: center; gap: 11px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.byline-info { display: flex; flex-direction: column; line-height: 1.35; }
.byline-name { font-size: 13.8px; font-weight: 700; color: var(--ink); }
.byline-sub { font-size: 12px; color: var(--ink-4); display: flex; align-items: center; gap: 6px; }

.article-body {
  font-size: 16px;
  line-height: 1.9;
  color: #1e293b;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.article-body p { margin: 0 0 18px; }
.article-body a { color: var(--brand-dark); text-decoration: underline; text-decoration-color: var(--brand-line); text-underline-offset: 3px; }
.article-body a:hover { text-decoration-color: var(--brand); }
.article-body .tag-inline { color: var(--brand-dark); font-weight: 600; text-decoration: none; }

.article-media { display: grid; gap: 12px; margin: 22px 0; }
.media-single { border-radius: var(--r-lg); overflow: hidden; background: #0f172a; }
.media-single img { width: 100%; height: auto; }
.media-single video { width: 100%; display: block; max-height: 78vh; background: #000; }

.media-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.media-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.media-tile {
  border-radius: var(--r);
  overflow: hidden;
  background: var(--line-2);
  aspect-ratio: 1;
  cursor: zoom-in;
  position: relative;
}
.media-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s var(--ease); }
.media-tile:hover img { transform: scale(1.05); }
.media-tile.video-tile { cursor: pointer; display: grid; place-items: center; background: #0f172a; }
.media-tile.video-tile img { opacity: .76; }
.play-btn {
  position: absolute;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  display: grid; place-items: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .3);
}
.play-btn svg { width: 18px; height: 18px; color: var(--brand-darker); margin-left: 2px; }

@media (max-width: 640px) {
  .media-grid-3 { grid-template-columns: 1fr 1fr; }
  .article-title { font-size: 22px; }
  .article-body { font-size: 15.5px; }
}

/* 文章操作条 */
.article-actions {
  display: flex; align-items: center; gap: 10px;
  margin: 26px 0;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}

.like-btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 42px; padding: 0 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  background: #fff;
  color: var(--ink-2);
  font-size: 14px; font-weight: 600;
  cursor: pointer;
  transition: all .2s var(--ease);
}
.like-btn svg { width: 18px; height: 18px; }
.like-btn:hover { border-color: #fca5a5; color: var(--danger); background: var(--danger-soft); }
.like-btn.liked {
  background: var(--danger-soft);
  border-color: #fca5a5;
  color: var(--danger);
}
.like-btn.liked svg { fill: currentColor; animation: pop .35s var(--ease); }

@keyframes pop {
  0% { transform: scale(1); }
  42% { transform: scale(1.32); }
  100% { transform: scale(1); }
}

.stat-pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 42px; padding: 0 16px;
  border-radius: var(--r-full);
  background: var(--line-2);
  color: var(--ink-3);
  font-size: 13px;
  font-weight: 600;
}
.stat-pill svg { width: 16px; height: 16px; }

/* ============================ 评论 ============================ */

.comment-sec { margin-top: 32px; }
.comment-sec h3 { font-size: 17px; margin-bottom: 18px; display: flex; align-items: center; gap: 8px; }
.comment-sec h3 .num { font-size: 13px; color: var(--ink-4); font-weight: 600; }

.comment-form { display: flex; gap: 12px; margin-bottom: 26px; }
.comment-form-body { flex: 1; }
.comment-form textarea {
  width: 100%;
  min-height: 88px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  resize: vertical;
  outline: none;
  font-size: 14px;
  line-height: 1.7;
  transition: all .18s;
  font-family: inherit;
}
.comment-form textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3.5px rgba(16, 185, 129, .12); }
.comment-form-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 9px; gap: 10px; }
.comment-form-foot .tip { font-size: 12px; color: var(--ink-4); }

.comment-list { display: grid; gap: 4px; }
.comment-item { display: flex; gap: 11px; padding: 14px 0; }
.comment-item + .comment-item { border-top: 1px solid var(--line-2); }
.comment-body { flex: 1; min-width: 0; }
.comment-top { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; flex-wrap: wrap; }
.comment-name { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.comment-time { font-size: 11.5px; color: var(--ink-4); }
.comment-text { font-size: 14px; color: var(--ink-2); line-height: 1.72; word-break: break-word; overflow-wrap: anywhere; }
.comment-text .reply-to { color: var(--brand-dark); font-weight: 600; }
.comment-acts { display: flex; gap: 14px; margin-top: 7px; }
.comment-acts button {
  background: none; border: 0; padding: 0;
  font-size: 12.2px; color: var(--ink-4);
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 4px;
  transition: color .15s;
}
.comment-acts button:hover { color: var(--brand-dark); }
.comment-acts button.liked { color: var(--danger); font-weight: 600; }
.comment-acts button.del:hover { color: var(--danger); }

.reply-list {
  margin-top: 10px;
  padding: 10px 12px;
  background: #fafbfc;
  border-radius: var(--r);
  border-left: 2px solid var(--brand-line);
  display: grid; gap: 10px;
}
.reply-item { display: flex; gap: 9px; }

/* ============================ 个人中心 ============================ */

.profile-hero {
  display: flex; align-items: center; gap: 20px;
  padding: 26px;
  border-radius: var(--r-lg);
  background: linear-gradient(135deg, #fff, #f7fdfa);
  border: 1px solid var(--line);
  box-shadow: var(--sd-1);
  flex-wrap: wrap;
}
.profile-info { flex: 1; min-width: 200px; }
.profile-name { font-size: 21px; font-weight: 800; letter-spacing: -.4px; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.profile-bio { font-size: 13.5px; color: var(--ink-3); line-height: 1.65; margin-bottom: 10px; word-break: break-word; }
.profile-meta { display: flex; gap: 16px; font-size: 12.5px; color: var(--ink-4); flex-wrap: wrap; }
.profile-meta b { color: var(--ink); font-weight: 700; }

.menu-list { display: grid; gap: 2px; }
.menu-item {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px;
  border-radius: var(--r);
  color: var(--ink-2);
  font-size: 14px;
  transition: all .16s;
}
.menu-item:hover { background: var(--line-2); color: var(--ink); }
.menu-item.active { background: var(--brand-soft); color: var(--brand-darker); font-weight: 600; }
.menu-item svg { width: 17px; height: 17px; color: var(--ink-4); flex-shrink: 0; }
.menu-item.active svg { color: var(--brand-dark); }
.menu-item .arrow { margin-left: auto; color: var(--ink-4); font-size: 16px; }

/* ============================ 管理后台 ============================ */

.admin-wrap { display: grid; grid-template-columns: 216px minmax(0, 1fr); gap: 22px; align-items: start; }

.admin-nav {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 10px;
  box-shadow: var(--sd-1);
  position: sticky; top: calc(var(--nav-h) + 18px);
}
.admin-nav-title { font-size: 11.5px; color: var(--ink-4); font-weight: 700; letter-spacing: .6px; padding: 9px 12px 6px; text-transform: uppercase; }
.admin-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  font-size: 13.8px;
  color: var(--ink-2);
  transition: all .16s;
}
.admin-link:hover { background: var(--line-2); color: var(--ink); }
.admin-link.active { background: var(--brand-soft); color: var(--brand-darker); font-weight: 600; }
.admin-link svg { width: 17px; height: 17px; }
.admin-link .badge-dot { margin-left: auto; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat-card {
  padding: 17px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--sd-1);
}
.stat-card .k { font-size: 12.5px; color: var(--ink-3); margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.stat-card .v { font-size: 25px; font-weight: 800; letter-spacing: -.7px; line-height: 1.2; }
.stat-card .sub { font-size: 11.5px; color: var(--ink-4); margin-top: 3px; }

.table-wrap { overflow-x: auto; border-radius: var(--r); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 560px; }
table.tbl th {
  text-align: left;
  padding: 11px 13px;
  background: #f8fafc;
  color: var(--ink-3);
  font-weight: 600;
  font-size: 12.5px;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
table.tbl td { padding: 12px 13px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.tbl tr:last-child td { border-bottom: 0; }
table.tbl tbody tr:hover { background: #fbfdfe; }
table.tbl .t-title { font-weight: 600; color: var(--ink); max-width: 320px; }
table.tbl .t-title:hover { color: var(--brand-darker); }
table.tbl .t-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.tbl .thumb { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; background: var(--line-2); }

.review-card {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 18px;
  margin-bottom: 14px;
  background: #fff;
  box-shadow: var(--sd-1);
}
.review-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 10px; flex-wrap: wrap; }
.review-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.review-meta { font-size: 12.2px; color: var(--ink-4); display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.review-content {
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.75;
  background: #fafbfc;
  border-radius: var(--r);
  padding: 12px 14px;
  margin-bottom: 12px;
  max-height: 220px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
}
.review-media { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.review-media a {
  width: 76px; height: 76px;
  border-radius: 9px;
  overflow: hidden;
  border: 1px solid var(--line);
  position: relative;
  background: var(--line-2);
}
.review-media img { width: 100%; height: 100%; object-fit: cover; }
.review-media .k { position: absolute; bottom: 0; left: 0; right: 0; background: rgba(15,23,42,.7); color: #fff; font-size: 9.5px; text-align: center; padding: 1px 0; }
.review-acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.review-acts .note-input {
  flex: 1; min-width: 160px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-size: 13px;
  outline: none;
}
.review-acts .note-input:focus { border-color: var(--brand); }

/* ============================ 灯箱 ============================ */

.lightbox {
  position: fixed; inset: 0;
  z-index: 200;
  background: rgba(9, 13, 20, .93);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  backdrop-filter: blur(6px);
}
.lightbox.show { display: flex; }
.lightbox img { max-width: 94vw; max-height: 88vh; object-fit: contain; border-radius: 10px; }
.lightbox video { max-width: 94vw; max-height: 88vh; border-radius: 10px; background: #000; }
.lightbox-close {
  position: absolute; top: 18px; right: 20px;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, .16);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: grid; place-items: center;
  transition: background .18s;
}
.lightbox-close:hover { background: rgba(255, 255, 255, .3); }

/* ============================ Toast ============================ */

.toast-wrap {
  position: fixed;
  top: 78px; left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  display: flex; flex-direction: column; gap: 9px;
  align-items: center;
  pointer-events: none;
  width: max-content;
  max-width: 92vw;
}
.toast {
  padding: 11px 19px;
  border-radius: var(--r-full);
  background: rgba(15, 23, 42, .93);
  color: #fff;
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: var(--sd-3);
  animation: toastIn .28s var(--ease);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; gap: 8px;
}
.toast.success { background: linear-gradient(135deg, #10b981, #059669); }
.toast.error { background: linear-gradient(135deg, #ef4444, #dc2626); }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(-12px) scale(.96); }
  to { opacity: 1; transform: none; }
}

/* ============================ 页脚 ============================ */

.foot {
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 28px 0;
  margin-top: 20px;
  position: relative; z-index: 1;
}
.foot-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 18px;
  display: flex; justify-content: space-between; align-items: center;
  gap: 14px; flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--ink-4);
}
.foot-links { display: flex; gap: 16px; flex-wrap: wrap; }
.foot-links a { color: var(--ink-3); }
.foot-links a:hover { color: var(--brand-dark); }

/* ============================ 骨架屏 ============================ */

.skel {
  background: linear-gradient(90deg, #eef2f6 25%, #f6f9fb 50%, #eef2f6 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 6px;
}
@keyframes shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

/* ============================ 工具类 ============================ */

.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.text-sm { font-size: 13px; }
.text-xs { font-size: 12px; }
.muted { color: var(--ink-3); }
.muted-2 { color: var(--ink-4); }
.nowrap { white-space: nowrap; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

@media (max-width: 960px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; }
  .compose-grid { grid-template-columns: minmax(0, 1fr); }
  .admin-wrap { grid-template-columns: minmax(0, 1fr); }
  .admin-nav { position: static; display: flex; overflow-x: auto; gap: 4px; padding: 8px; }
  .admin-nav-title { display: none; }
  .admin-link { white-space: nowrap; }
}

@media (max-width: 720px) {
  .nav-search { display: none; }
  .nav-links .nav-link.hide-sm { display: none; }
  .hero { padding: 26px 20px; }
  .hero h1 { font-size: 23px; }
  .hero p { font-size: 13.5px; }
  .hero-stats { gap: 18px; margin-top: 18px; }
  .hero-stat b { font-size: 18px; }
  .logo-sub { display: none; }
  .article-title { font-size: 21px; letter-spacing: -.3px; }
  .card { border-radius: var(--r); }
  .page { padding: 18px 0 40px; }
  .profile-hero { padding: 18px; gap: 14px; }
  .avatar.xl { width: 60px; height: 60px; font-size: 22px; }
  .profile-name { font-size: 18px; }
}
