/* QTSQ 社区系统 - 全新 UI 样式 */
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { font-size: 16px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: #f5f6fa; color: #333; line-height: 1.5;
  padding-bottom: 70px; /* 底部导航高度 */
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
input, textarea, button, select { font-family: inherit; font-size: inherit; outline: none; border: none; }
ul, ol { list-style: none; }

/* ---------- 通用 ---------- */
.container { max-width: 640px; margin: 0 auto; padding: 0 12px; }
.card {
  background: #fff; border-radius: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,.04);
  margin-bottom: 10px; overflow: hidden;
}
.empty-state {
  text-align: center; padding: 60px 20px; color: #bbb; font-size: 14px;
}
.form-ok { background: #e8f9ee; color: #1a9e54; border-radius: 10px; padding: 10px 14px; font-size: 13px; margin-bottom: 12px; }
.form-err { background: #ffe4e4; color: #d44; border-radius: 10px; padding: 10px 14px; font-size: 13px; margin-bottom: 12px; }
.msg-warn { background: #fff7e8; border: 1px solid #ffd9a0; color: #d46b08; border-radius: 10px; padding: 10px 14px; font-size: 13px; margin-bottom: 12px; line-height: 1.7; }

/* ---------- 顶部栏 ---------- */
.top-bar {
  position: sticky; top: 0; z-index: 100;
  background: #fff; border-bottom: 1px solid #f0f0f0;
}
.top-bar-inner {
  max-width: 640px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; height: 52px;
}
.top-logo { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 18px; color: #333; }
.top-logo svg, .top-logo img { width: 28px; height: 28px; }
.top-tabs {
  display: flex; gap: 20px; align-items: center; justify-content: center; flex: 1;
}
.top-tab {
  font-size: 15px; color: #999; font-weight: 500; position: relative; padding: 4px 0;
}
.top-tab.on { color: #333; font-weight: 700; }
.top-tab.on::after {
  content: ''; position: absolute; bottom: -2px; left: 50%; transform: translateX(-50%);
  width: 20px; height: 3px; background: #ff6b8a; border-radius: 2px;
}
.top-action { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; color: #666; }

/* ---------- 底部导航 ---------- */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 200;
  background: #fff; border-top: 1px solid #f0f0f0;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.bottom-nav-inner {
  max-width: 640px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-around;
  height: 56px; padding: 0 8px;
}
.bn-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; color: #999; font-size: 11px; min-width: 48px;
}
.bn-item.on { color: #ff6b8a; }
.bn-item svg, .bn-item .bn-ico {
  width: 22px; height: 22px; display: flex; align-items: center; justify-content: center;
}
.bn-mid {
  width: 48px; height: 36px; background: #222;
  border-radius: 18px; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 20px; margin-top: -8px;
  box-shadow: 0 4px 12px rgba(0,0,0,.2);
}

/* ---------- 按钮 ---------- */
.btn-primary {
  display: block; width: 100%; padding: 14px;
  background: linear-gradient(135deg, #ff8fa3, #ff6b8a);
  color: #fff; font-size: 16px; font-weight: 600;
  border-radius: 28px; text-align: center; cursor: pointer;
}
.btn-primary:disabled { opacity: .6; }
.btn-dark {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 8px 18px; background: rgba(255,255,255,.15);
  color: #fff; font-size: 13px; border-radius: 18px;
  border: 1px solid rgba(255,255,255,.2); backdrop-filter: blur(4px);
}
.btn-gray {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 8px 18px; background: #f5f5f5;
  color: #666; font-size: 13px; border-radius: 18px;
}
.btn-small {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 4px 12px; background: #ff6b8a; color: #fff;
  font-size: 12px; border-radius: 12px;
}

/* ---------- 表单 ---------- */
.form-group { margin-bottom: 16px; }
.form-input {
  width: 100%; padding: 14px 16px;
  background: #f5f5f5; border-radius: 24px;
  font-size: 15px; color: #333;
  border: 1.5px solid transparent; transition: .2s;
}
.form-input:focus { border-color: #ff6b8a; background: #fff; }
.form-input::placeholder { color: #bbb; }
.form-row { display: flex; gap: 10px; }
.form-row .form-input { flex: 1; }
.code-btn {
  padding: 14px 16px; background: #222; color: #fff;
  border-radius: 24px; font-size: 13px; white-space: nowrap; cursor: pointer;
}
.code-btn:disabled { background: #ccc; }

/* ---------- 头像徽章 ---------- */
.avatar {
  width: 40px; height: 40px; border-radius: 50%;
  object-fit: cover; background: #eee;
}
.avatar-lg { width: 64px; height: 64px; }
.avatar-xl { width: 80px; height: 80px; }
.badge-level {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 2px 8px; background: linear-gradient(135deg, #7bb3ff, #4a8bff);
  color: #fff; font-size: 11px; border-radius: 10px; font-weight: 600;
}
.badge-vip {
  display: inline-flex; align-items: center;
  padding: 1px 6px; background: linear-gradient(135deg, #ffd700, #ffaa00);
  color: #fff; font-size: 10px; border-radius: 8px; font-weight: 700;
}

/* ---------- 首页 ---------- */
.home-header {
  background: #fff; padding: 12px 16px;
}
.home-logo-row {
  display: flex; align-items: center; gap: 8px; margin-bottom: 12px;
}
.home-logo-row .logo-star {
  width: 32px; height: 32px; background: linear-gradient(135deg, #4a8bff, #2f6bff);
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 18px;
}
.home-search {
  display: flex; align-items: center; gap: 8px;
  background: #f5f5f5; border-radius: 20px;
  padding: 8px 14px; color: #bbb; font-size: 14px;
}

/* ========== 轮播图 ========== */
.banner-slider {
  margin: 10px 12px; border-radius: 14px; overflow: hidden;
  position: relative; background: #fff; box-shadow: 0 2px 12px rgba(0,0,0,.04);
}
.banner-track {
  display: flex; transition: transform .4s ease; width: 100%;
}
.banner-slide {
  flex: 0 0 100%; min-width: 100%;
}
.banner-slide a { display: block; }
.banner-slide img {
  width: 100%; height: 180px; object-fit: cover; display: block;
}
.banner-slide .banner-placeholder {
  width: 100%; height: 180px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #ff8fa3, #ff6b8a);
  color: #fff; font-size: 18px; font-weight: 700;
}
.banner-dots {
  position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 6px;
}
.banner-dot {
  width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.5);
  cursor: pointer; transition: .2s;
}
.banner-dot.active { background: #fff; width: 18px; border-radius: 3px; }

/* ========== 圈子内标签切换 ========== */
.circle-tabs {
  display: flex; border-bottom: 1px solid #eee; background: #fff;
  position: sticky; top: 0; z-index: 10; margin-top: 2px;
}
.circle-tab {
  flex: 1; text-align: center; padding: 12px 0; font-size: 15px;
  color: #999; font-weight: 500; transition: .15s;
  border-bottom: 2px solid transparent;
}
.circle-tab.active { color: #ff6b8a; border-bottom-color: #ff6b8a; font-weight: 600; }

/* ========== 动态卡片 ========== */
.moment-card {
  background: #fff; margin: 8px 12px; border-radius: 14px;
  padding: 14px; box-shadow: 0 1px 8px rgba(0,0,0,.03);
}
.moment-header {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
}
.moment-user .name {
  font-size: 14px; font-weight: 600; color: #333;
}
.moment-user .time {
  font-size: 12px; color: #bbb; margin-top: 2px; display: flex; align-items: center; gap: 6px;
}
.moment-circle-tag {
  font-size: 11px; color: #ff6b8a; background: #fff0f3;
  padding: 1px 8px; border-radius: 10px;
}
.moment-title {
  font-size: 15px; font-weight: 600; color: #333; margin-bottom: 8px;
}
.moment-content {
  font-size: 14px; color: #555; line-height: 1.7; word-break: break-all;
}
.moment-images {
  display: grid; gap: 4px; margin-top: 10px; border-radius: 10px; overflow: hidden;
}
.moment-images img {
  width: 100%; object-fit: cover; border-radius: 6px;
}
.moment-grid-1 { grid-template-columns: 1fr; }
.moment-grid-1 img { max-height: 320px; }
.moment-grid-2 { grid-template-columns: 1fr 1fr; }
.moment-grid-2 img { height: 160px; }
.moment-grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.moment-grid-3 img { height: 120px; }

/* ========== 动态瀑布流 ========== */
.moments-waterfall {
  padding: 10px 8px 80px;
}
.waterfall-cols {
  columns: 2;
  column-gap: 8px;
}
.wf-card {
  break-inside: avoid;
  background: #fff; border-radius: 12px;
  overflow: hidden; margin-bottom: 8px;
  box-shadow: 0 1px 6px rgba(0,0,0,.04);
  cursor: pointer;
}
.wf-card-img {
  position: relative; width: 100%;
}
.wf-card-img img {
  width: 100%; display: block; object-fit: cover;
}
.wf-badge {
  position: absolute; top: 8px; right: 8px;
  background: rgba(0,0,0,.5); color: #fff;
  font-size: 10px; padding: 2px 8px; border-radius: 8px;
}
.wf-card-body {
  padding: 8px 10px;
}
.wf-card-title {
  font-size: 13px; color: #333; line-height: 1.5;
  margin-bottom: 8px; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; word-break: break-all;
}
.wf-card-footer {
  display: flex; justify-content: space-between; align-items: center;
}
.wf-user {
  display: flex; align-items: center; gap: 6px;
}
.wf-username {
  font-size: 12px; color: #999;
}
.wf-stats {
  display: flex; gap: 8px; align-items: center;
}
.wf-stat {
  font-size: 11px; color: #bbb;
  display: flex; align-items: center; gap: 2px;
}
.wf-ico { font-size: 12px; }

/* ========== 动态详情 ========== */
.moment-detail {
  background: #fff; margin: 10px 12px; border-radius: 14px;
  padding: 16px; min-height: 60vh;
}
.moment-detail-header {
  display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
}
.moment-detail-header .info { flex: 1; }
.moment-detail-header .name { font-size: 15px; font-weight: 600; color: #333; }
.moment-detail-header .time { font-size: 12px; color: #bbb; margin-top: 2px; }
.moment-circle-link {
  font-size: 12px; color: #ff6b8a; background: #fff0f3;
  padding: 3px 10px; border-radius: 12px; text-decoration: none;
}
.moment-detail-title {
  font-size: 18px; font-weight: 700; color: #333;
  margin: 0 0 12px; line-height: 1.4;
}
.moment-detail-content {
  font-size: 15px; color: #444; line-height: 1.8;
  margin-bottom: 16px; word-break: break-all;
}
.moment-detail-images img {
  width: 100%; border-radius: 10px; margin-bottom: 8px;
  display: block; cursor: zoom-in;
}
.moment-detail-actions {
  display: flex; gap: 24px; padding-top: 14px;
  border-top: 1px solid #f5f5f5; margin-top: 16px;
}
.md-action {
  font-size: 13px; color: #999;
  display: flex; align-items: center; gap: 4px;
  text-decoration: none;
}
.md-action.liked { color: #ff6b8a; }
.md-ico { font-size: 15px; }

/* ========== 动态评论区 ========== */
.moment-comments {
  background: #fff; margin: 0 12px 10px; border-radius: 14px;
  padding: 16px; min-height: 100px;
}
.mc-title {
  font-size: 15px; font-weight: 700; color: #333;
  margin: 0 0 14px; padding-bottom: 10px;
  border-bottom: 1px solid #f5f5f5;
}
.mc-input-area {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px; padding-bottom: 14px;
  border-bottom: 1px solid #f8f8f8;
}
.mc-input-wrap {
  flex: 1; display: flex; gap: 8px;
}
.mc-input-wrap input {
  flex: 1; border: 1px solid #eee; border-radius: 20px;
  padding: 8px 14px; font-size: 13px; outline: none;
  transition: border-color .2s;
}
.mc-input-wrap input:focus { border-color: #ff6b8a; }
.mc-input-wrap button {
  border: none; background: #ff6b8a; color: #fff;
  border-radius: 20px; padding: 8px 18px; font-size: 13px;
  cursor: pointer; white-space: nowrap;
}
.mc-list { display: flex; flex-direction: column; gap: 12px; }
.mc-item {
  display: flex; gap: 10px;
}
.mc-body { flex: 1; min-width: 0; }
.mc-user {
  font-size: 13px; font-weight: 600; color: #333; margin-bottom: 3px;
}
.mc-text {
  font-size: 13px; color: #555; line-height: 1.6;
  word-break: break-all;
}
.mc-time {
  font-size: 11px; color: #ccc; margin-top: 4px;
}
.mc-empty {
  text-align: center; color: #ddd; padding: 30px 0; font-size: 13px;
}

/* 免责声明 */
.disclaimer {
  background: #fff; border-radius: 14px; margin: 10px 12px;
  padding: 16px; position: relative; overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,.04);
}
.disclaimer h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.disclaimer p { font-size: 12px; color: #888; line-height: 1.7; }
.disclaimer-img {
  position: absolute; right: 0; top: 0; width: 140px; height: 100%;
  object-fit: cover; opacity: .9;
}

/* 快捷图标 */
.quick-icons {
  display: flex; justify-content: space-around;
  padding: 16px 8px; background: #fff;
  margin: 10px 12px; border-radius: 14px;
}
.qi-item {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.qi-ico {
  width: 48px; height: 48px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: #fff;
}
.qi-ico.purple { background: linear-gradient(135deg, #a78bfa, #8b5cf6); }
.qi-ico.green  { background: linear-gradient(135deg, #6ee7b7, #34d399); }
.qi-ico.orange { background: linear-gradient(135deg, #fdba74, #fb923c); }
.qi-ico.blue   { background: linear-gradient(135deg, #93c5fd, #60a5fa); }
.qi-ico.pink   { background: linear-gradient(135deg, #f9a8d4, #f472b6); }
.qi-name { font-size: 12px; color: #555; }

/* 置顶推荐 */
.pinned-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px; background: #fff; margin: 10px 12px 0;
  border-radius: 14px 14px 0 0; font-size: 13px;
}
.pinned-tag {
  padding: 2px 8px; background: #ff6b8a; color: #fff;
  border-radius: 4px; font-size: 11px; font-weight: 600;
}
.pinned-text { color: #ff6b8a; font-weight: 500; }

/* 内容标题 */
.section-title {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px; font-size: 16px; font-weight: 700;
}
.section-title .sub { font-size: 13px; color: #bbb; font-weight: 400; }

/* 帖子卡片 */
.post-card {
  background: #fff; padding: 14px 16px; margin: 0 12px 10px;
  border-radius: 14px; box-shadow: 0 2px 12px rgba(0,0,0,.04);
}
.post-header {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
}
.post-user { flex: 1; }
.post-user .name { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 4px; }
.post-user .time { font-size: 12px; color: #bbb; margin-top: 2px; }
.post-title {
  font-size: 16px; font-weight: 700; color: #ff4d6d;
  margin-bottom: 6px; line-height: 1.4;
}
.post-desc { font-size: 14px; color: #666; line-height: 1.6; margin-bottom: 10px; }
.post-images {
  display: grid; gap: 4px; margin-bottom: 10px;
}
.post-images.grid-1 { grid-template-columns: 1fr; }
.post-images.grid-2 { grid-template-columns: 1fr 1fr; }
.post-images.grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.post-images img { border-radius: 8px; aspect-ratio: 1; object-fit: cover; width: 100%; }
.post-images.grid-1 img { aspect-ratio: 16/9; }

/* ---------- 圈子页 ---------- */
.circle-tabs {
  display: flex; justify-content: center; gap: 24px;
  padding: 12px; background: #fff; border-bottom: 1px solid #f5f5f5;
}
.circle-tabs .tab { font-size: 15px; color: #999; padding: 4px 0; position: relative; }
.circle-tabs .tab.on { color: #333; font-weight: 700; }
.circle-tabs .tab.on::after {
  content: ''; position: absolute; bottom: -4px; left: 50%; transform: translateX(-50%);
  width: 16px; height: 3px; background: #ff6b8a; border-radius: 2px;
}
.circle-subtabs {
  display: flex; gap: 10px; padding: 10px 16px;
}
.circle-subtabs span {
  padding: 4px 12px; background: #f5f5f5; border-radius: 14px;
  font-size: 13px; color: #666;
}
.circle-subtabs span.on { background: #ff6b8a; color: #fff; }
.circle-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  padding: 0 12px 20px;
}
.circle-item {
  background: #fff; border-radius: 14px; padding: 14px;
  display: flex; align-items: center; gap: 10px;
  box-shadow: 0 2px 12px rgba(0,0,0,.04);
}
.circle-item .ci-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; background: #f5f5f5; flex-shrink: 0;
}
.circle-item .ci-info { flex: 1; min-width: 0; }
.circle-item .ci-name { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 4px; }
.circle-item .ci-desc { font-size: 12px; color: #999; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ci-top {
  display: inline-block; padding: 1px 5px; background: #ff6b8a;
  color: #fff; font-size: 10px; border-radius: 4px;
}

/* ---------- 消息页 ---------- */
.msg-quick {
  display: flex; justify-content: space-around; padding: 20px 12px; background: #fff;
}
.mq-item {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.mq-ico {
  width: 52px; height: 52px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; color: #fff;
}
.mq-ico.pink { background: linear-gradient(135deg, #ff8fa3, #ff6b8a); }
.mq-ico.blue  { background: linear-gradient(135deg, #93c5fd, #60a5fa); }
.mq-ico.green { background: linear-gradient(135deg, #6ee7b7, #34d399); }
.mq-ico.orange{ background: linear-gradient(135deg, #fdba74, #fb923c); }
.mq-name { font-size: 13px; color: #555; }

/* ---------- 个人中心 ---------- */
.profile-header {
  position: relative; margin: 10px 12px 0;
  border-radius: 16px; overflow: hidden;
}
.profile-cover {
  position: absolute; inset: 0;
  background: linear-gradient(160deg, #1a1a2e, #16213e);
  background-size: cover; background-position: center;
  border-radius: 16px;
}
.profile-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.35);
  border-radius: 16px;
}
.profile-content {
  position: relative; z-index: 1;
  color: #fff; padding: 30px 16px 20px;
}
.profile-top {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px;
}
.profile-user {
  display: flex; align-items: center; gap: 14px;
}
.profile-user .avatar { border: 2px solid rgba(255,255,255,.3); }
.profile-user .name { font-size: 18px; font-weight: 700; }
.profile-user .bio { font-size: 13px; color: rgba(255,255,255,.6); margin-top: 4px; }
.profile-actions {
  display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap;
}
.profile-stats {
  display: flex; justify-content: space-around;
  padding: 16px 0; background: #fff; margin: 8px 12px;
  border-radius: 14px;
}
.ps-item { text-align: center; }
.ps-item .num { font-size: 18px; font-weight: 700; color: #333; }
.ps-item .lab { font-size: 12px; color: #999; margin-top: 2px; }

.profile-tabs {
  display: flex; background: #fff; margin: 10px 12px 0;
  border-radius: 14px 14px 0 0; padding: 0 8px;
}
.profile-tabs .tab {
  flex: 1; text-align: center; padding: 14px 0;
  font-size: 14px; color: #999; position: relative;
}
.profile-tabs .tab.on { color: #333; font-weight: 700; }
.profile-tabs .tab.on::after {
  content: ''; position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%);
  width: 20px; height: 3px; background: #ff6b8a; border-radius: 2px;
}

/* ---------- 侧栏抽屉 ---------- */
.drawer-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 300;
  opacity: 0; visibility: hidden; transition: .3s;
}
.drawer-overlay.open { opacity: 1; visibility: visible; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 280px;
  background: #fff; z-index: 301; transform: translateX(100%);
  transition: .3s; overflow-y: auto;
}
.drawer.open { transform: translateX(0); }
.drawer-user {
  display: flex; align-items: center; gap: 12px;
  padding: 20px 16px; border-bottom: 1px solid #f5f5f5;
}
.drawer-user .info { flex: 1; }
.drawer-user .name { font-size: 16px; font-weight: 600; }
.drawer-user .bio { font-size: 12px; color: #999; margin-top: 2px; }
.drawer-menu { padding: 8px 0; }
.drawer-menu a {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; font-size: 15px; color: #333;
}
.drawer-menu a svg, .drawer-menu a .ico {
  width: 22px; height: 22px; display: flex; align-items: center; justify-content: center;
  color: #666;
}

/* ---------- 发布弹窗 ---------- */
.pub-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 400;
  opacity: 0; visibility: hidden; transition: .3s;
}
.pub-overlay.open { opacity: 1; visibility: visible; }
.pub-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 401;
  background: #fff; border-radius: 24px 24px 0 0;
  padding: 20px 16px 30px; transform: translateY(100%);
  transition: .3s; max-width: 640px; margin: 0 auto;
}
.pub-sheet.open { transform: translateY(0); }
.pub-sheet .head {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px;
}
.pub-sheet .head h3 { font-size: 18px; font-weight: 700; }
.pub-sheet .head p { font-size: 12px; color: #999; margin-top: 4px; }
.pub-sheet .close { width: 28px; height: 28px; border-radius: 50%; background: #f5f5f5; display: flex; align-items: center; justify-content: center; color: #999; }
.pub-card {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px; border-radius: 14px; margin-bottom: 10px; color: #fff;
}
.pub-card.red { background: linear-gradient(135deg, #ff8fa3, #ff6b8a); }
.pub-card.purple { background: linear-gradient(135deg, #c4b5fd, #a78bfa); }
.pub-card h4 { font-size: 16px; font-weight: 700; }
.pub-card p { font-size: 13px; opacity: .85; margin-top: 4px; }
.pub-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pub-grid .item {
  background: #fff5f0; border-radius: 14px; padding: 20px;
  text-align: center; border: 1px solid #ffe4d6;
}
.pub-grid .item.blue { background: #f0f7ff; border-color: #dbeafe; }
.pub-grid .item .ico { font-size: 28px; margin-bottom: 8px; }
.pub-grid .item .name { font-size: 14px; font-weight: 600; color: #d46b08; }
.pub-grid .item.blue .name { color: #2563eb; }
.pub-grid .item .desc { font-size: 12px; color: #999; margin-top: 2px; }

/* ---------- 发布页通用 ---------- */
.pub-page { background: #f5f6fa; min-height: 100vh; }
.pub-page-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; background: #fff; border-bottom: 1px solid #f0f0f0;
}
.pub-page-header h2 { font-size: 17px; font-weight: 700; }
.pub-page-header .back { color: #666; font-size: 14px; }
.pub-page-header .submit { color: #ff6b8a; font-size: 15px; font-weight: 600; }
.pub-body { padding: 16px; }
.pub-title-input {
  width: 100%; padding: 12px 0; font-size: 18px; font-weight: 700;
  background: transparent; border-bottom: 1px solid #f0f0f0;
}
.pub-title-input::placeholder { color: #ccc; }
.pub-content-input {
  width: 100%; padding: 12px 0; font-size: 15px;
  background: transparent; min-height: 120px; resize: none;
  line-height: 1.7;
}
.pub-content-input::placeholder { color: #bbb; }
.pub-image-upload {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  width: 80px; height: 80px; border: 1.5px dashed #ddd; border-radius: 10px;
  color: #bbb; font-size: 24px; cursor: pointer; margin-top: 10px;
}
.pub-image-preview {
  display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px;
}
.pub-image-preview img { width: 80px; height: 80px; border-radius: 10px; object-fit: cover; }
.pub-section {
  background: #fff; border-radius: 14px; padding: 14px 16px; margin-bottom: 10px;
}
.pub-section .row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px solid #f5f5f5;
}
.pub-section .row:last-child { border-bottom: none; }
.pub-section .label { font-size: 15px; color: #333; font-weight: 500; }
.pub-section .value { font-size: 14px; color: #999; }
.pub-section .required { color: #ff6b8a; font-size: 12px; margin-left: 4px; }
.toggle {
  width: 44px; height: 24px; background: #ddd; border-radius: 12px;
  position: relative; cursor: pointer; transition: .2s;
}
.toggle.on { background: #ff6b8a; }
.toggle::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 20px; height: 20px; background: #fff; border-radius: 50%;
  transition: .2s;
}
.toggle.on::after { left: 22px; }
.pub-bottom-btn {
  position: fixed; bottom: 0; left: 0; right: 0; padding: 12px 16px 20px;
  background: #fff; border-top: 1px solid #f0f0f0; z-index: 50;
}

/* ---------- 登录注册 ---------- */
.auth-page { background: #fff; min-height: 100vh; padding: 40px 24px; }
.auth-logo { text-align: center; margin-bottom: 30px; }
.auth-logo .star {
  width: 56px; height: 56px; background: linear-gradient(135deg, #4a8bff, #2f6bff);
  border-radius: 16px; display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 28px; margin-bottom: 16px;
}
.auth-logo h1 { font-size: 22px; font-weight: 700; }
.auth-logo p { font-size: 14px; color: #999; margin-top: 6px; }
.auth-form { max-width: 400px; margin: 0 auto; }
.auth-link { text-align: center; margin-top: 20px; font-size: 14px; color: #999; }
.auth-link a { color: #4a8bff; font-weight: 500; }

/* ---------- 商城 ---------- */
.mall-cats {
  display: flex; gap: 10px; padding: 10px 16px; overflow-x: auto;
  background: #fff; scrollbar-width: none;
}
.mall-cats::-webkit-scrollbar { display: none; }
.mall-cats span {
  padding: 6px 16px; background: #f5f5f5; border-radius: 16px;
  font-size: 13px; color: #666; white-space: nowrap;
}
.mall-cats span.on { background: #222; color: #fff; }
.mall-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  padding: 10px 12px;
}
.mall-item {
  background: #fff; border-radius: 14px; overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,.04);
}
.mall-item img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.mall-item .info { padding: 10px; }
.mall-item .name { font-size: 13px; color: #333; line-height: 1.4; }
.mall-item .price { font-size: 16px; color: #ff4d6d; font-weight: 700; margin-top: 6px; }
.mall-item .price::before { content: '¥'; font-size: 12px; }

/* ---------- 帖子详情 ---------- */
.detail-header {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; background: #fff;
}
.detail-actions {
  display: flex; gap: 16px; padding: 12px 16px; background: #fff;
  border-top: 1px solid #f5f5f5;
}
.detail-actions .act {
  display: flex; align-items: center; gap: 4px;
  font-size: 14px; color: #666;
}
.detail-actions .act.on { color: #ff6b8a; }

/* ---------- 设置页 ---------- */
.settings-list { background: #fff; border-radius: 14px; margin: 10px 12px; }
.settings-list a, .settings-list .row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid #f5f5f5;
  font-size: 15px; color: #333;
}
.settings-list a:last-child, .settings-list .row:last-child { border-bottom: none; }
.settings-list .arrow { color: #ccc; font-size: 18px; }

/* ---------- 响应式 ---------- */
@media (min-width: 768px) {
  body { background: #e8e8ec; }
  .container, .bottom-nav-inner, .top-bar-inner { max-width: 430px; }
}

/* =========================== */
/* ======  后台管理样式  ====== */
/* =========================== */
body.admin-body {
  padding-bottom: 0; display: flex; min-height: 100vh;
  background: #f0f2f5; font-size: 14px;
}

/* 侧边导航 */
.admin-side {
  width: 220px; background: #1e1e2d; color: #a2a3b7;
  display: flex; flex-direction: column; position: fixed;
  top: 0; left: 0; bottom: 0; z-index: 100;
  overflow-y: auto;
}
.as-logo {
  padding: 20px 18px; font-size: 18px; font-weight: 700; color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.as-logo span { display: block; font-size: 12px; color: #6d6d80; font-weight: 400; margin-top: 2px; }
.as-nav { flex: 1; padding: 12px 0; }
.as-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 20px; font-size: 14px; color: #8c8ea0;
  transition: .15s; border-left: 3px solid transparent;
  margin: 2px 0;
}
.as-nav a:hover { color: #fff; background: rgba(255,255,255,.04); }
.as-nav a.on {
  color: #fff; background: rgba(255,107,138,.15);
  border-left-color: #ff6b8a;
}
.as-nav a .ico { width: 20px; text-align: center; }
.as-ver { padding: 12px 20px; font-size: 12px; color: #4a4a60; border-top: 1px solid rgba(255,255,255,.06); }

/* 主内容区 */
.admin-main {
  flex: 1; margin-left: 220px; display: flex; flex-direction: column; min-height: 100vh;
}
.admin-top {
  background: #fff; padding: 14px 24px; border-bottom: 1px solid #e8e8ed;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 50;
}
.admin-top b { font-size: 17px; }
.admin-top a { color: #ff6b8a; }
.admin-content { padding: 20px 24px; flex: 1; }

/* 统计卡片 */
.stat-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px; margin-bottom: 20px;
}
.stat-card {
  background: #fff; border-radius: 12px; padding: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,.04); text-align: center;
}
.stat-card b { display: block; font-size: 32px; font-weight: 700; color: #333; }
.stat-card span { font-size: 13px; color: #999; margin-top: 4px; display: block; }
.stat-card.green b { color: #2fbf71; }
.stat-card.blue b { color: #4a8bff; }

/* 双栏布局 */
.admin-cols {
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px;
}
.admin-card {
  background: #fff; border-radius: 12px; padding: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,.04); margin-bottom: 18px;
}
.admin-card h3 { font-size: 16px; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid #f0f0f5; }

/* 表格 */
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th {
  text-align: left; padding: 10px 12px; font-size: 12px; color: #999;
  font-weight: 500; border-bottom: 1px solid #f0f0f5; background: #fafafc;
}
.admin-table td {
  padding: 10px 12px; font-size: 13px; color: #555;
  border-bottom: 1px solid #f5f5f8;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: #fafafc; }
.admin-table td a { color: #4a8bff; }

/* 操作区域 */
.ops button, .ops .op-link {
  padding: 4px 10px; border-radius: 6px; font-size: 12px;
  border: 1px solid #e0e0e5; background: #fff; color: #666; cursor: pointer;
}
.ops button:hover { border-color: #ccc; }
.ops button.danger { color: #e55; border-color: #fdd; }
.ops button.danger:hover { background: #fff5f5; }
.ops .op-link { display: inline-block; text-decoration: none; vertical-align: middle; }
.inline-form { display: inline-flex; align-items: center; gap: 4px; }
.inline-form button { padding: 3px 10px; font-size: 12px; }

/* 标签 */
.tag { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-style: normal; }
.tag.blue { background: #e8f0fe; color: #4a8bff; }
.tag.green { background: #e8f9ee; color: #1a9e54; }
.tag.red { background: #ffe4e4; color: #d44; }
.tag.orange { background: #fff3e0; color: #f5870b; }

/* 分页 */
.admin-pager { margin-top: 16px; text-align: center; }
.admin-pager a {
  display: inline-block; padding: 6px 16px; border-radius: 6px;
  background: #fff; border: 1px solid #e0e0e5; color: #666; text-decoration: none;
  margin: 0 4px; font-size: 13px;
}
.admin-pager a:hover { border-color: #ff6b8a; color: #ff6b8a; }
.admin-pager span { font-size: 13px; color: #999; }

/* 搜索 */
.admin-search {
  display: flex; gap: 8px; margin-bottom: 16px; max-width: 400px;
}
.admin-search input {
  flex: 1; padding: 8px 14px; border: 1px solid #e0e0e5;
  border-radius: 8px; font-size: 14px;
}
.admin-search button {
  padding: 8px 18px; background: #ff6b8a; color: #fff;
  border-radius: 8px; font-size: 14px; cursor: pointer;
}

/* 表单 */
.admin-form label {
  display: block; margin-top: 14px; margin-bottom: 4px;
  font-size: 13px; color: #666; font-weight: 500;
}
.admin-form label:first-child { margin-top: 0; }
.admin-form input[type="text"],
.admin-form input[type="number"],
.admin-form input[type="file"],
.admin-form input[type="url"],
.admin-form textarea,
.admin-form select {
  width: 100%; padding: 9px 12px; border: 1px solid #e0e0e5;
  border-radius: 8px; font-size: 14px; background: #fafafc;
}
.admin-form input:focus, .admin-form textarea:focus, .admin-form select:focus {
  border-color: #ff6b8a; background: #fff;
}
.admin-form textarea { min-height: 100px; resize: vertical; }
.admin-form .check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #333; margin-top: 14px; }
.admin-form .check input[type="checkbox"] { width: auto; }

/* 大按钮 */
.btn-publish {
  display: inline-block; padding: 10px 24px; background: linear-gradient(135deg, #ff8fa3, #ff6b8a);
  color: #fff; border-radius: 10px; font-size: 14px; font-weight: 600;
  cursor: pointer; border: none; text-decoration: none; text-align: center;
}
.btn-publish.wide { display: block; width: 100%; }
.btn-publish.gray { background: #f0f0f5; color: #666; }
.btn-publish:hover { opacity: .9; }

/* 提示文本 */
.hint-text { font-size: 12px; color: #aaa; margin-top: 8px; line-height: 1.6; }

/* 更新状态 */
.update-status {
  display: flex; gap: 40px; margin-bottom: 16px; padding: 16px 20px;
  background: #fafafc; border-radius: 10px;
}
.update-ver { font-size: 24px; font-weight: 700; }
.update-new {
  background: linear-gradient(135deg, #fff3e0, #ffe8cc);
  color: #d46b08; padding: 12px 16px; border-radius: 10px;
  font-size: 15px; font-weight: 600; margin-bottom: 14px;
}
.update-latest { color: #2fbf71; font-size: 15px; font-weight: 500; margin-bottom: 12px; }
.changelog {
  background: #fafafc; padding: 14px 16px; border-radius: 10px;
  font-size: 13px; color: #666; margin-bottom: 14px; line-height: 1.7;
}

/* 头像文字版 */
.avatar-text {
  display: inline-flex; align-items: center; justify-content: center;
  background: #ff6b8a; color: #fff; border-radius: 50%;
}

/* 图片预览网格 */
.img-grid {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.img-grid img {
  width: 80px; height: 80px; border-radius: 8px; object-fit: cover;
}

/* 通用状态组件 */
.status-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 20px; font-size: 12px;
}
.status-badge.active { background: #e8f9ee; color: #1a9e54; }
.status-badge.inactive { background: #ffe4e4; color: #d44; }

/* 移动端响应式 */
@media (max-width: 768px) {
  body.admin-body { flex-direction: column; }
  .admin-side {
    position: relative; width: 100%; height: auto;
    flex-shrink: 0;
  }
  .as-nav {
    display: flex; flex-wrap: wrap; padding: 8px 10px; gap: 4px;
  }
  .as-nav a {
    padding: 7px 12px; font-size: 12px; border-left: none;
    border-radius: 6px; margin: 0;
  }
  .as-nav a.on { background: rgba(255,107,138,.2); }
  .admin-main { margin-left: 0; }
  .admin-top { padding: 12px 16px; }
  .admin-content { padding: 14px; }
  .admin-cols { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
}
