/* ============================================================
   表白墙 样式
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary: #ff4d88;
  --primary-deep: #e91e63;
  --primary-light: #ffb3cc;
  --bg: #fff5f7;
  --card: #ffffff;
  --text: #4a3b46;
  --text-light: #9c8b95;
  --radius: 16px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- 顶部 ---------- */
.hero {
  background: linear-gradient(135deg, #ff6b9d 0%, #ff8fae 45%, #ffb3c1 100%);
  padding: 46px 16px 66px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "💗";
  position: absolute; left: 8%; top: 22px; font-size: 26px; opacity: .5;
  animation: floaty 4s ease-in-out infinite;
}
.hero::after {
  content: "💘";
  position: absolute; right: 10%; bottom: 18px; font-size: 24px; opacity: .45;
  animation: floaty 5s ease-in-out infinite reverse;
}
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

.hero h1 { color: #fff; font-size: 30px; letter-spacing: 2px; text-shadow: 0 2px 8px rgba(233,30,99,.25); }
.hero-sub { color: rgba(255,255,255,.92); margin-top: 8px; font-size: 14px; }
.hero-stats { margin-top: 14px; }
.hero-stats span {
  display: inline-block; background: rgba(255,255,255,.2); color: #fff;
  border-radius: 20px; padding: 5px 16px; font-size: 12px; backdrop-filter: blur(4px);
}

/* ---------- 布局 ---------- */
.container { max-width: 640px; margin: 0 auto; width: 100%; padding: 0 16px; flex: 1; }

/* ---------- 发布表单 ---------- */
.publish-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 10px 34px rgba(233,30,99,.12);
  padding: 20px;
  margin-top: -38px;
  position: relative;
  overflow: hidden;
}
/* 发布卡片头部 */
.publish-head {
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(135deg,#fff1f6,#ffe7ef);
  margin: -20px -20px 16px;
  padding: 15px 20px;
  border-bottom: 1px solid #ffe0ec;
}
.publish-head-icon {
  width: 40px; height: 40px; border-radius: 12px;
  background: linear-gradient(135deg,#ff4d88,#ff7aa8);
  display: flex; align-items: center; justify-content: center;
  font-size: 19px; color: #fff; flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(255,77,136,.32);
}
.publish-head-txt { display: flex; flex-direction: column; line-height: 1.35; }
.publish-title { font-size: 16px; font-weight: 700; color: var(--primary-deep); letter-spacing: .5px; }
.publish-sub { font-size: 11px; color: var(--text-light); margin-top: 2px; }
.publish-head-emoji { margin-left: auto; font-size: 18px; opacity: .55; }
.form-row { display: flex; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.form-row input[type=text] {
  flex: 1; min-width: 120px; padding: 10px 14px; border: 1px solid #f0d7e0; border-radius: 12px; font-size: 14px; outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.form-row input[type=text]:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(255,77,136,.12); }
/* 分类下拉（自定义箭头） */
.cat-select-wrap { position: relative; }
.cat-select {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  padding: 10px 34px 10px 14px;
  border: 1px solid #f0d7e0; border-radius: 12px;
  font-size: 14px; color: var(--text);
  background: #fff; outline: none; cursor: pointer;
  transition: border-color .2s, box-shadow .2s;
}
.cat-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(255,77,136,.12); }
.cat-select-wrap::after {
  content: ""; position: absolute; right: 13px; top: 50%;
  width: 8px; height: 8px; transform: translateY(-70%) rotate(45deg);
  border-right: 2px solid #e98aa9; border-bottom: 2px solid #e98aa9;
  pointer-events: none;
}
.file-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 16px; border: 1px dashed var(--primary); color: var(--primary-deep);
  border-radius: 12px; font-size: 13px; cursor: pointer; white-space: nowrap; background: #fff5f8;
  transition: background .2s, transform .12s;
}
.file-btn:hover { background: #ffe9f1; transform: translateY(-1px); }
.file-btn .file-btn-ico { margin-right: 4px; }
textarea {
  width: 100%; padding: 10px 14px; border: 1px solid #f0d7e0; border-radius: 12px;
  font-size: 14px; resize: vertical; outline: none; font-family: inherit; line-height: 1.7; color: var(--text);
  transition: border-color .2s, box-shadow .2s;
}
textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(255,77,136,.12); }
.form-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.count-tip { font-size: 12px; color: var(--text-light); }
.btn-publish {
  border: none; background: linear-gradient(135deg, #ff4d88, #ff7aa2); color: #fff;
  padding: 10px 24px; border-radius: 22px; font-size: 14px; cursor: pointer;
  box-shadow: 0 4px 14px rgba(255,77,136,.35); display: inline-flex; align-items: center; gap: 5px;
  transition: transform .12s ease, box-shadow .2s;
}
.btn-publish:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(255,77,136,.42); }
.btn-publish:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.btn-publish .btn-publish-ico { font-size: 15px; }
.publish-tip { margin-top: 12px; font-size: 12px; color: #c9a0ae; background: #fff9fb; padding: 8px 10px; border-radius: 8px; }

.image-preview { position: relative; display: inline-block; margin-bottom: 12px; }
.image-preview img { max-width: 140px; max-height: 140px; border-radius: 10px; border: 1px solid #f0d7e0; }
.remove-img {
  position: absolute; top: -8px; right: -8px; width: 22px; height: 22px; border-radius: 50%;
  background: rgba(0,0,0,.6); color: #fff; text-align: center; line-height: 22px; font-size: 12px; cursor: pointer;
}

/* ---------- 帖子墙 ---------- */
.wall { margin-top: 20px; display: flex; flex-direction: column; gap: 14px; }

.post-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 6px 20px rgba(233,30,99,.07);
  padding: 16px 18px;
  animation: fadeUp .3s ease;
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.post-head { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg,#ffe3ec,#ffd6e7);
  display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0;
}
.post-meta { flex: 1; display: flex; flex-direction: column; line-height: 1.3; }
.post-meta .nick { font-size: 14px; font-weight: 600; color: var(--text); }
.post-meta .time { font-size: 11px; color: var(--text-light); }

.pin-badge {
  background: linear-gradient(135deg,#ffd54f,#ffb300); color: #5d4300; font-size: 11px;
  padding: 2px 9px; border-radius: 10px; font-weight: 600;
}

/* ---------- 分类筛选 tab ---------- */
.cat-tabs {
  margin: 20px 0 6px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 6px;
  padding: 4px 0 10px;
}
.cat-tab {
  display: inline-block;
  white-space: nowrap;
  border: 1px solid #f0d7e0; background: #fff; color: var(--text);
  padding: 6px 12px; border-radius: 20px; font-size: 12px; cursor: pointer;
  box-shadow: 0 2px 6px rgba(233,30,99,.06);
  transition: all .2s ease;
}
.cat-tab .cat-ico { font-size: 13px; margin-right: 4px; vertical-align: -1px; }
.cat-tab .cat-txt { white-space: nowrap; }
.cat-tab:hover { border-color: var(--primary-light); color: var(--primary-deep); transform: translateY(-1px); }
.cat-tab.active {
  background: linear-gradient(135deg,#ff4d88,#ff7aa8); color: #fff; border-color: transparent;
  box-shadow: 0 4px 12px rgba(255,77,136,.35);
}
.cat-tab.active .cat-ico { color: #fff; }
/* 各分类图标 */
.cat-ico-confession::before { content: '💌'; }
.cat-ico-lost_item::before { content: '🔑'; }
.cat-ico-lost_person::before { content: '👤'; }
.cat-ico-market::before { content: '🛒'; }
.cat-ico-recruit::before { content: '💼'; }

/* ---------- 分类徽章 ---------- */
.cat-badge {
  font-size: 11px; padding: 2px 9px; border-radius: 10px; font-weight: 600; flex-shrink: 0;
}
.cat-lost_item { background: #e3f2fd; color: #1565c0; }
.cat-lost_person { background: #fde8ef; color: #ad1457; }
.cat-market { background: #e8f5e9; color: #2e7d32; }
.cat-recruit { background: #fff3e0; color: #e65100; }

/* ---------- 火爆帖子（醒目样式） ---------- */
.hot-badge {
  background: linear-gradient(135deg,#ff5722,#ff9100); color: #fff; font-size: 11px;
  padding: 2px 9px; border-radius: 10px; font-weight: 700; letter-spacing: .5px;
  box-shadow: 0 2px 6px rgba(255,87,34,.4); animation: hotPulse 1.6s ease-in-out infinite;
}
@keyframes hotPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 2px 6px rgba(255,87,34,.4); }
  50% { transform: scale(1.06); box-shadow: 0 3px 12px rgba(255,87,34,.65); }
}
.post-card.hot {
  position: relative;
  border: 2px solid transparent;
  background:
    linear-gradient(#fff,#fff) padding-box,
    linear-gradient(135deg,#ff5722,#ff9100,#ff2d78) border-box;
  box-shadow: 0 8px 28px rgba(255,87,34,.18);
}
.post-card.hot::before {
  content: '🔥'; position: absolute; top: -10px; left: 14px; font-size: 20px;
  filter: drop-shadow(0 2px 3px rgba(255,87,34,.5)); animation: hotFlame 1.2s ease-in-out infinite;
}
@keyframes hotFlame {
  0%,100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-3px) scale(1.12); }
}
.post-card.hot .post-content { color: #5d2a00; }
.post-card.hot .post-head .nick { color: #e64a19; }

.post-content { margin-top: 10px; font-size: 14.5px; word-break: break-word; white-space: normal; }
.post-image { margin-top: 10px; }
.post-image img { max-width: 100%; max-height: 420px; border-radius: 12px; cursor: zoom-in; display: block; }

.empty-tip { text-align: center; color: var(--text-light); padding: 40px 0; font-size: 14px; }

/* ---------- 加载更多 ---------- */
.load-more-wrap { text-align: center; padding: 24px 0 10px; }
.btn-loadmore {
  border: 1px solid var(--primary); color: var(--primary-deep); background: #fff;
  padding: 9px 26px; border-radius: 20px; font-size: 13px; cursor: pointer;
}
.btn-loadmore:hover { background: #fff5f8; }
.loading-tip, .end-tip { font-size: 12px; color: var(--text-light); padding: 8px 0; }

/* ---------- 图片弹层 ---------- */
.lightbox {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,.82); z-index: 999;
  align-items: center; justify-content: center; padding: 20px;
}
.lightbox.show { display: flex; }
.lightbox img { max-width: 100%; max-height: 90vh; border-radius: 8px; }
.lightbox-close {
  position: absolute; top: 16px; right: 20px; color: #fff; font-size: 30px; cursor: pointer; line-height: 1;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 60px; transform: translateX(-50%) translateY(20px);
  background: rgba(0,0,0,.78); color: #fff; padding: 10px 20px; border-radius: 20px;
  font-size: 13px; opacity: 0; pointer-events: none; transition: all .25s ease; z-index: 1000; max-width: 86%;
  text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.footer { text-align: center; color: var(--text-light); font-size: 12px; padding: 30px 16px 40px; }

/* ---------- 公告横幅 ---------- */
.site-banner {
  background: linear-gradient(135deg, #ff6b9d, #ff8fae);
  color: #fff;
  text-align: center;
  padding: 10px 16px;
  font-size: 13px;
  letter-spacing: .5px;
}
.site-banner a { color: #fff; text-decoration: none; display: block; }
.site-banner a:hover { text-decoration: underline; }

/* ============================================================
   V2.3 互动：点赞 / 评论 / 浏览量
   ============================================================ */
.post-actions {
  display: flex; align-items: center; gap: 18px;
  margin-top: 12px; padding-top: 12px;
  border-top: 1px dashed #f3dfe7;
}
.act-btn {
  display: inline-flex; align-items: center; gap: 5px;
  background: none; border: none; cursor: pointer;
  font-size: 13px; color: var(--text-light);
  padding: 3px 6px; border-radius: 14px;
  transition: all .2s ease; user-select: none;
}
.act-btn:hover { color: var(--primary-deep); background: #fff0f5; }
.act-btn .act-ico { font-size: 15px; line-height: 1; }
.act-btn .act-num { font-size: 12px; min-width: 10px; text-align: center; }
.like-btn.liked { color: #e91e63; }
.like-btn.liked .act-ico { animation: likePop .3s ease; }
.like-btn.loading { opacity: .5; pointer-events: none; }
@keyframes likePop {
  0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); }
}
.views-btn { cursor: default; }
.views-btn:hover { background: none; color: var(--text-light); }

/* 评论区 */
.post-comments {
  margin-top: 12px; padding: 12px 14px;
  background: #fdf7f9; border-radius: 12px;
  border: 1px solid #f6e4ec;
}
.comment-form { display: flex; gap: 8px; margin-bottom: 12px; }
.comment-form .comment-nick { width: 30%; flex-shrink: 0; }
.comment-form .comment-input { flex: 1; }
.comment-form input {
  border: 1px solid #f0d7e0; background: #fff; border-radius: 10px;
  padding: 8px 12px; font-size: 13px; outline: none; color: var(--text);
  transition: border-color .2s, box-shadow .2s;
}
.comment-form input:focus { border-color: var(--primary-light); box-shadow: 0 0 0 3px rgba(255,77,136,.12); }
.comment-submit {
  border: none; background: linear-gradient(135deg,#ff4d88,#ff7aa8);
  color: #fff; font-size: 13px; border-radius: 10px; padding: 0 16px; cursor: pointer;
  box-shadow: 0 3px 8px rgba(255,77,136,.3); transition: all .2s ease; white-space: nowrap;
}
.comment-submit:hover { transform: translateY(-1px); box-shadow: 0 5px 12px rgba(255,77,136,.4); }
.comment-submit:disabled { opacity: .6; cursor: not-allowed; }
.comment-list { display: flex; flex-direction: column; gap: 10px; }
.comment-item { display: flex; gap: 8px; }
.comment-avatar {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg,#ffe3ec,#ffd6e7);
  display: flex; align-items: center; justify-content: center; font-size: 14px;
}
.comment-body { flex: 1; min-width: 0; }
.comment-meta { display: flex; align-items: baseline; gap: 8px; }
.comment-nick { font-size: 12.5px; font-weight: 600; color: var(--text); }
.comment-time { font-size: 10.5px; color: var(--text-light); }
.comment-text { font-size: 13px; color: #5a4a52; word-break: break-word; white-space: normal; margin-top: 1px; line-height: 1.6; }
.comment-empty { text-align: center; color: var(--text-light); font-size: 12.5px; padding: 6px 0; }
.comment-loading { text-align: center; color: var(--text-light); font-size: 12.5px; padding: 8px 0; }

/* ============================================================
   V2.4 验证码 + 评论点赞
   ============================================================ */
.captcha-row {
  display: flex; align-items: center; gap: 10px; margin-top: 10px;
}
.captcha-row input {
  flex: 1; border: 1px solid #f0d7e0; background: #fff; border-radius: 10px;
  padding: 8px 12px; font-size: 13px; outline: none; color: var(--text); text-align: center;
  letter-spacing: 3px; transition: border-color .2s, box-shadow .2s;
}
.captcha-row input:focus { border-color: var(--primary-light); box-shadow: 0 0 0 3px rgba(255,77,136,.12); }
.captcha-img {
  height: 36px; width: 100px; border-radius: 10px; cursor: pointer;
  border: 1px solid #f0d7e0; object-fit: cover;
}
/* 评论验证码 */
.comment-captcha-row { justify-content: flex-end; gap: 8px; margin-top: 6px; }
.cmt-captcha-img { height: 30px; width: 84px; border-radius: 8px; cursor: pointer; border: 1px solid #f0d7e0; }
.comment-captcha {
  width: 84px; border: 1px solid #f0d7e0; background: #fff; border-radius: 8px;
  padding: 6px 10px; font-size: 12px; outline: none; color: var(--text); text-align: center; letter-spacing: 2px;
}
.comment-captcha:focus { border-color: var(--primary-light); box-shadow: 0 0 0 3px rgba(255,77,136,.12); }
/* 评论点赞 */
.cmt-like {
  display: inline-flex; align-items: center; gap: 3px;
  background: none; border: none; cursor: pointer; margin-left: auto;
  font-size: 12px; color: var(--text-light); padding: 1px 5px; border-radius: 10px;
  transition: all .2s ease; user-select: none;
}
.cmt-like:hover { color: #e91e63; background: #fff0f5; }
.cmt-like.liked { color: #e91e63; }
.cmt-like.loading { opacity: .5; pointer-events: none; }
.cmt-like .cmt-like-ico { font-size: 13px; line-height: 1; }
.cmt-like .cmt-like-num { font-size: 11px; min-width: 8px; text-align: center; }
.comment-meta { display: flex; align-items: center; gap: 8px; }

/* ============================================================
   V2.5.1 前台统计展示（今日/累计 浏览、点赞）
   ============================================================ */
.hero-stats-detail {
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap; gap: 10px; margin-top: 12px;
}
.hs-item {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(255,255,255,.28); backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.4);
  padding: 5px 14px; border-radius: 20px;
  font-size: 12px; color: #fff;
}
.hs-item .hs-ico { font-size: 13px; line-height: 1; }
.hs-item .hs-num { font-weight: 700; font-size: 14px; min-width: 16px; text-align: center; }
.hs-item .hs-label { opacity: .85; font-size: 11px; }
@media (max-width: 480px) {
  .hero-stats-detail { gap: 6px; }
  .hs-item { padding: 4px 10px; font-size: 11px; }
  .hs-item .hs-num { font-size: 13px; }
}

/* ============================================================
   V5.2.0 公告栏优化（hero下方，精致卡片样式，可关闭）
   ============================================================ */
.site-banner {
  background: none;
  padding: 0;
  text-align: left;
  margin: -20px auto 0;
  max-width: 680px;
  position: relative;
  z-index: 5;
}
.site-banner .banner-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #ff6b9d 0%, #ff8fae 50%, #ffa07a 100%);
  color: #fff;
  padding: 14px 20px;
  border-radius: 14px;
  box-shadow: 0 6px 20px rgba(255,107,157,.35);
  position: relative;
  overflow: hidden;
}
.site-banner .banner-inner::before {
  content: '';
  position: absolute;
  top: -50%; left: -20%;
  width: 60%; height: 200%;
  background: rgba(255,255,255,.12);
  transform: rotate(15deg);
}
.site-banner .banner-ico {
  font-size: 22px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  animation: bannerPulse 2s ease-in-out infinite;
}
@keyframes bannerPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}
.site-banner .banner-content {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  position: relative;
  z-index: 1;
}
.site-banner .banner-content a {
  color: #fff;
  text-decoration: none;
  display: inline;
}
.site-banner .banner-content a:hover { text-decoration: underline; }
.site-banner .banner-close {
  background: rgba(255,255,255,.25);
  border: none;
  color: #fff;
  width: 26px; height: 26px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 12px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  transition: background .2s;
  display: flex; align-items: center; justify-content: center;
}
.site-banner .banner-close:hover { background: rgba(255,255,255,.45); }

/* 页脚作者信息 */
.footer .footer-sep { margin: 0 8px; opacity: .5; }
.footer .footer-author { opacity: .8; }
@media (max-width: 480px) {
  .site-banner { margin: -14px 12px 0; max-width: none; }
  .site-banner .banner-inner { padding: 12px 16px; }
  .site-banner .banner-content { font-size: 13px; }
}
