/* ============================================================
   天柱校园表白墙 - 前台样式（升级版：蓝紫→粉紫渐变 + 玻璃质感）
   ============================================================ */
:root {
  --primary: #7c4dff;
  --primary-2: #f06292;
  --accent: #ff6b9d;
  --grad: linear-gradient(135deg, #667eea 0%, #764ba2 45%, #f093fb 100%);
  --grad-soft: linear-gradient(135deg, rgba(102,126,234,.10), rgba(240,147,251,.12));
  --bg: #f5f6fb;
  --card: rgba(255,255,255,.92);
  --text: #2d3436;
  --text-2: #636e72;
  --border: rgba(236,239,245,.9);
  --radius: 18px;
  --shadow: 0 10px 34px rgba(108,77,255,.10);
  --shadow-hover: 0 18px 44px rgba(240,98,146,.18);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}
/* 背景柔光 */
body::before {
  content: ""; position: fixed; top: -120px; right: -120px; width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(240,147,251,.18), transparent 70%);
  border-radius: 50%; z-index: 0; pointer-events: none;
}
body::after {
  content: ""; position: fixed; bottom: -140px; left: -100px; width: 380px; height: 380px;
  background: radial-gradient(circle, rgba(102,126,234,.15), transparent 70%);
  border-radius: 50%; z-index: 0; pointer-events: none;
}
.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; position: relative; z-index: 1; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 9px 18px; border-radius: 999px; border: none; cursor: pointer;
  font-size: 14px; font-weight: 600; transition: .25s; line-height: 1.4; font-family: inherit;
}
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 6px 20px rgba(124,77,255,.35); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(240,98,146,.4); }
.btn-ghost { background: rgba(255,255,255,.8); color: var(--primary); border: 1.5px solid var(--primary); backdrop-filter: blur(8px); }
.btn-ghost:hover { background: var(--grad-soft); transform: translateY(-1px); }
.btn-lg { padding: 12px 30px; font-size: 15px; }

/* ---------- 头部导航 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.82); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 18px; height: 64px; }
.logo { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 17px; }
.logo-icon {
  width: 34px; height: 34px; border-radius: 11px; background: var(--grad);
  color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 16px;
  box-shadow: 0 4px 14px rgba(124,77,255,.35);
}
.logo-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.main-nav { display: flex; gap: 4px; margin-left: 8px; flex: 1; }
.main-nav a { padding: 7px 14px; border-radius: 999px; font-size: 14px; color: var(--text-2); font-weight: 600; transition: .2s; }
.main-nav a:hover { background: var(--grad-soft); color: var(--primary); }
.main-nav a.active { background: var(--grad); color: #fff; box-shadow: 0 4px 14px rgba(124,77,255,.3); }
.btn-publish { font-size: 13px; padding: 8px 16px; }
.nav-toggle { display: none; background: none; border: none; font-size: 22px; cursor: pointer; color: var(--text); }

/* ---------- 首屏横幅 ---------- */
.hero {
  background: var(--grad); color: #fff; text-align: center;
  padding: 70px 20px 62px; border-radius: 0 0 36px 36px; position: relative; overflow: hidden;
}
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%;
}
.hero::before {
  width: 280px; height: 280px; top: -130px; left: -90px;
  background: radial-gradient(circle, rgba(255,255,255,.18), transparent 70%);
  animation: float1 8s ease-in-out infinite;
}
.hero::after {
  width: 340px; height: 340px; bottom: -170px; right: -110px;
  background: radial-gradient(circle, rgba(255,255,255,.14), transparent 70%);
  animation: float2 10s ease-in-out infinite;
}
@keyframes float1 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(20px,15px)} }
@keyframes float2 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(-25px,-10px)} }
.hero-inner { position: relative; z-index: 1; }
.hero h1 { font-size: clamp(24px, 5vw, 38px); margin-bottom: 10px; font-weight: 800; letter-spacing: .5px; }
.hero p { opacity: .94; font-size: 15px; margin-bottom: 24px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero .btn-primary { background: #fff; color: var(--primary); box-shadow: 0 8px 22px rgba(0,0,0,.18); }
.hero .btn-ghost { background: rgba(255,255,255,.18); color: #fff; border-color: rgba(255,255,255,.7); backdrop-filter: blur(6px); }

/* ---------- 工具栏 ---------- */
.wall-toolbar {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; flex-wrap: wrap; margin: 26px 0 18px;
}
.filter-tabs, .sort-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tab {
  padding: 7px 15px; border-radius: 999px; background: rgba(255,255,255,.85); border: 1px solid var(--border);
  font-size: 13px; font-weight: 600; color: var(--text-2); transition: .2s; backdrop-filter: blur(6px);
}
.tab:hover { color: var(--primary); border-color: var(--primary); background: #fff; }
.tab.active { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 4px 14px rgba(124,77,255,.3); }

/* ---------- 瀑布流卡片 ---------- */
.wall-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px; padding-bottom: 30px;
}
.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  border: 1px solid var(--border); backdrop-filter: blur(10px);
}
.post-card { padding: 18px; position: relative; transition: .3s; }
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: rgba(240,98,146,.3); }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.badge-cat { background: var(--grad-soft); color: var(--primary); }
.badge-school { background: rgba(255,107,157,.12); color: #d63384; margin-left: 4px; }
.badge-top { background: #ffeaa7; color: #8a6d1a; margin-left: 6px; }
.post-head { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.post-nick { font-weight: 700; font-size: 14px; }
.post-time { margin-left: auto; font-size: 12px; color: var(--text-2); }
.post-target { background: var(--grad-soft); color: var(--primary); padding: 6px 12px; border-radius: 10px; font-size: 13px; margin-bottom: 10px; font-weight: 600; }
.post-content { font-size: 15px; white-space: pre-wrap; word-break: break-word; margin-bottom: 12px; }
.post-imgs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin-bottom: 12px; }
.post-imgs.one { grid-template-columns: 1fr; }
.post-imgs img, .detail-imgs img { width: 100%; height: 150px; object-fit: cover; border-radius: 10px; cursor: zoom-in; }
.post-imgs.one img { height: 230px; }
.post-actions { display: flex; gap: 4px; align-items: center; border-top: 1px solid var(--border); padding-top: 12px; flex-wrap: wrap; }
.act {
  display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px;
  border-radius: 999px; border: none; background: #f2f4fa; cursor: pointer;
  font-size: 13px; color: var(--text-2); font-weight: 600; transition: .2s; font-family: inherit;
}
.act:hover { background: var(--grad-soft); color: var(--primary); transform: translateY(-1px); }
.act.on { background: var(--grad); color: #fff; box-shadow: 0 3px 10px rgba(124,77,255,.3); }
.count { font-variant-numeric: tabular-nums; }

/* ---------- 详情页 ---------- */
.main-wrap { flex: 1; padding-top: 22px; padding-bottom: 40px; }
.detail-card { padding: 28px; margin-bottom: 20px; }
.detail-content { font-size: 16px; white-space: pre-wrap; word-break: break-word; margin: 14px 0; line-height: 1.85; }
.detail-imgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; margin-bottom: 14px; }
.detail-imgs img { height: 230px; }
.detail-actions { border-top: none; padding-top: 0; }
.comments { padding: 26px; }
.section-title { font-size: 17px; margin-bottom: 16px; }
.comment-list { display: flex; flex-direction: column; gap: 14px; margin-bottom: 18px; }
.comment { background: #f8f9fd; border-radius: 12px; padding: 12px 14px; transition: .2s; }
.comment:hover { background: #f3f0ff; }
.comment-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.comment-nick { font-weight: 700; font-size: 13px; color: var(--primary); }
.comment-time { font-size: 11px; color: var(--text-2); }
.comment-content { font-size: 14px; white-space: pre-wrap; word-break: break-word; }
.reply-btn { border: none; background: none; color: var(--text-2); font-size: 12px; cursor: pointer; margin-top: 6px; }
.reply-btn:hover { color: var(--accent); }
.reply-list { border-left: 2px solid rgba(124,77,255,.2); margin: 8px 0 0 8px; padding-left: 12px; display: flex; flex-direction: column; gap: 8px; }
.reply { font-size: 13px; }
.reply-text { color: var(--text); }
.comment-form { display: flex; flex-direction: column; gap: 10px; }
.comment-form input[type=text], .comment-form textarea {
  border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px;
  font-size: 14px; font-family: inherit; resize: vertical; background: #fff; transition: .2s;
}
.comment-form input:focus, .comment-form textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(124,77,255,.12); }

/* ---------- 发布页 ---------- */
.publish-wrap { padding: 28px; max-width: 740px; margin: 0 auto; }
.publish-head { text-align: center; margin-bottom: 26px; }
.publish-head h2 { font-size: 24px; margin-bottom: 6px; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.form-row { margin-bottom: 18px; }
.form-row label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.form-row .req { color: var(--accent); }
.cat-picker { display: flex; gap: 8px; flex-wrap: wrap; }
.cat-option input { display: none; }
.cat-option span {
  display: inline-block; padding: 8px 16px; border-radius: 999px; border: 1.5px solid var(--border);
  font-size: 13px; font-weight: 600; color: var(--text-2); cursor: pointer; transition: .2s; background: #fff;
}
.cat-option input:checked + span { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 4px 14px rgba(124,77,255,.3); }
.form-row input[type=text], .form-row textarea, .form-row select {
  width: 100%; border: 1px solid var(--border); border-radius: 12px; padding: 11px 14px;
  font-size: 14px; font-family: inherit; resize: vertical; background: #fff; transition: .2s;
}
.form-row input[type=text]:focus, .form-row textarea:focus, .form-row select:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(124,77,255,.12);
}
.inline-label { display: flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; }
.inline-label input { width: 17px; height: 17px; accent-color: var(--primary); }
.char-count { display: block; text-align: right; font-size: 12px; color: var(--text-2); margin-top: 4px; }
.upload-area {
  border: 2px dashed rgba(124,77,255,.3); border-radius: 14px; padding: 20px; text-align: center;
  cursor: pointer; transition: .25s; background: rgba(255,255,255,.6);
}
.upload-area:hover { border-color: var(--primary); background: var(--grad-soft); transform: translateY(-1px); }
.upload-tip { color: var(--text-2); font-size: 14px; }
.upload-previews { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.preview-item { position: relative; }
.preview-item img { width: 100%; height: 80px; object-fit: cover; border-radius: 8px; }
.preview-del {
  position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent); color: #fff; border: none; cursor: pointer; font-size: 14px; line-height: 1;
}
.form-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; flex-wrap: wrap; gap: 10px; }
.form-tip { font-size: 12px; color: var(--text-2); }

/* ---------- 扫码投稿页 ---------- */
.qrcode-wrap { padding: 34px 28px; max-width: 520px; margin: 0 auto; text-align: center; }
.qrcode-wrap h2 { font-size: 24px; margin-bottom: 8px; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.qrcode-wrap .sub { color: var(--text-2); margin-bottom: 24px; }
.qrcode-box {
  display: inline-block; padding: 22px; background: #fff; border-radius: 20px;
  box-shadow: var(--shadow); border: 1px solid var(--border); margin-bottom: 18px;
}
.qrcode-box img, .qrcode-box canvas { display: block; border-radius: 8px; }
.qrcode-url {
  display: inline-block; background: var(--grad-soft); color: var(--primary);
  padding: 8px 18px; border-radius: 999px; font-size: 13px; font-weight: 600; word-break: break-all;
  max-width: 100%;
}
.qrcode-tip { margin-top: 20px; font-size: 13px; color: var(--text-2); line-height: 1.8; }

/* ---------- 关于页 ---------- */
.about-wrap { padding: 32px; max-width: 780px; margin: 0 auto; }
.about-wrap h2 { text-align: center; margin-bottom: 20px; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.about-content { white-space: pre-wrap; line-height: 1.9; color: var(--text); }
.about-actions { display: flex; gap: 12px; margin-top: 26px; justify-content: center; flex-wrap: wrap; }

/* ---------- 空状态 / 分页 ---------- */
.empty-state { text-align: center; padding: 60px 20px; }
.empty-icon { font-size: 52px; margin-bottom: 10px; }
.empty-state p { font-size: 17px; font-weight: 700; }
.empty-sub { font-size: 13px; color: var(--text-2); margin: 6px 0 18px; font-weight: 400; }
.pagination { display: flex; gap: 8px; justify-content: center; padding: 10px 0 30px; }
.page {
  width: 36px; height: 36px; border-radius: 10px; background: rgba(255,255,255,.85); border: 1px solid var(--border);
  display: inline-flex; align-items: center; justify-content: center; font-size: 14px; color: var(--text-2); transition: .2s;
}
.page:hover { border-color: var(--primary); color: var(--primary); }
.page.active { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 4px 14px rgba(124,77,255,.3); }

/* ---------- 图片预览 & 弹窗 ---------- */
.img-modal {
  display: none; position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.88);
  align-items: center; justify-content: center; padding: 20px; cursor: zoom-out;
}
.img-modal img { max-width: 92%; max-height: 92%; border-radius: 10px; }
.modal-mask {
  display: none; position: fixed; inset: 0; z-index: 110; background: rgba(0,0,0,.5);
  align-items: center; justify-content: center; padding: 20px;
}
.modal { background: #fff; border-radius: 18px; padding: 24px; width: 100%; max-width: 420px; box-shadow: 0 20px 50px rgba(0,0,0,.2); }
.modal h3 { margin-bottom: 12px; }
.modal textarea {
  width: 100%; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px;
  font-size: 14px; font-family: inherit; resize: vertical;
}
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }

/* ---------- 页脚 ---------- */
.site-footer { background: rgba(255,255,255,.85); border-top: 1px solid var(--border); padding: 24px 0; text-align: center; backdrop-filter: blur(10px); position: relative; z-index: 1; }
.site-footer p { font-size: 13px; color: var(--text-2); }
.site-footer .footer-sub { font-size: 12px; margin-top: 4px; opacity: .8; }

/* ---------- 移动端 ---------- */
@media (max-width: 768px) {
  .main-nav {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    background: rgba(255,255,255,.97); flex-direction: column; padding: 10px 16px; gap: 6px;
    border-bottom: 1px solid var(--border); box-shadow: var(--shadow); backdrop-filter: blur(16px);
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 14px; }
  .nav-toggle { display: block; }
  .btn-publish { display: none; }
  .hero { padding: 50px 16px 46px; }
  .wall-grid { grid-template-columns: 1fr; }
  .upload-previews { grid-template-columns: repeat(2, 1fr); }
}

/* 分享海报按钮 */
.act.share-btn{display:inline-flex;align-items:center;gap:4px;background:linear-gradient(135deg,#ff6b9d,#c44569);color:#fff;border:none;border-radius:20px;padding:6px 14px;font-size:13px;cursor:pointer;text-decoration:none;transition:opacity .2s;}
.act.share-btn:hover{opacity:.85;}
