/* ===== 峰径论坛样式（与地图页同一套深色玻璃风） ===== */
:root {
  --bg: rgba(15, 23, 42, 0.82);
  --bg2: rgba(30, 41, 59, 0.92);
  --line: rgba(255, 255, 255, 0.14);
  --txt: #f1f5f9;
  --muted: rgba(255, 255, 255, 0.55);
  --accent: #1677ff;
  --danger: #ff4d4f;
  --ok: #52c41a;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body {
  margin: 0; min-height: 100%;
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: radial-gradient(1200px 600px at 20% -10%, #16233f 0%, #0b1220 55%) fixed, #0b1220;
  color: var(--txt);
}
body { display: flex; flex-direction: column; }

/* ===== 顶栏 ===== */
.fh {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  background: rgba(11, 18, 32, 0.86);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.fh-logo {
  color: var(--txt); text-decoration: none; font-weight: 700; font-size: 15px;
  background: rgba(255, 255, 255, 0.08); border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 13px; transition: all 0.15s; white-space: nowrap;
}
.fh-logo:hover { background: rgba(255, 255, 255, 0.16); }
.fh-title { font-size: 14px; color: var(--muted); flex: 1; }
.fh-new {
  background: var(--accent); border: 1px solid var(--accent); color: #fff;
  border-radius: 999px; padding: 8px 16px; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all 0.15s; white-space: nowrap;
}
.fh-new:hover { background: #2f88ff; }
.fh-login {
  background: rgba(255, 255, 255, 0.1); border: 1px solid var(--line); color: var(--txt);
  border-radius: 999px; padding: 8px 15px; font-size: 12.5px; cursor: pointer; transition: all 0.15s;
  white-space: nowrap;
}
.fh-login:hover { background: rgba(255, 255, 255, 0.18); }
.fh-user { font-size: 13px; color: #ffc069; white-space: nowrap; text-decoration: none; cursor: pointer; }
.fh-logout {
  background: transparent; border: 1px solid var(--line); color: var(--muted);
  border-radius: 999px; padding: 6px 12px; font-size: 12px; cursor: pointer; white-space: nowrap;
}
.fh-logout:hover { color: var(--txt); border-color: var(--txt); }

/* ===== 登录弹窗 ===== */
#login-mask {
  position: fixed; inset: 0; z-index: 999;
  background: rgba(2, 6, 17, 0.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
}
.login-box {
  width: min(360px, 90vw); background: var(--bg2); border: 1px solid var(--line);
  border-radius: 16px; padding: 22px 24px; box-shadow: 0 18px 60px rgba(0, 0, 0, 0.5);
}
.login-box h3 { margin: 0 0 6px; font-size: 16px; }
.login-tip { margin: 0 0 14px; font-size: 12px; color: var(--muted); }
.lg-code-row { display: flex; gap: 8px; margin-top: 10px; }
.lg-code-row input { flex: 1; }
.lg-code-row .pill-btn { white-space: nowrap; }
.lg-code-row .pill-btn:disabled { opacity: 0.5; cursor: default; }
#lg-nick { margin-top: 10px; }
.login-btns { display: flex; gap: 8px; margin-top: 14px; }
.login-btns .pill-btn { flex: 1; }
#lg-pwd-view input, #lg-sms-view input, #lg-reg-view input { margin-top: 10px; }
.lg-toggle {
  margin-top: 14px; text-align: center; font-size: 12.5px; color: var(--muted);
}
.lg-toggle a {
  color: #7cb3ff; cursor: pointer; text-decoration: none; margin: 0 4px;
}
.lg-toggle a:hover { text-decoration: underline; }
.lg-sep { color: var(--muted); opacity: 0.5; }
.lg-seg { display: flex; gap: 6px; margin-top: 10px; }
.lg-seg .seg {
  flex: 1; background: rgba(255, 255, 255, 0.08); border: 1px solid var(--line); color: var(--muted);
  border-radius: 999px; padding: 8px 0; font-size: 12.5px; cursor: pointer; transition: all 0.15s;
}
.lg-seg .seg:hover { background: rgba(255, 255, 255, 0.15); }
.lg-seg .seg.on { background: rgba(22, 119, 255, 0.18); border-color: var(--accent); color: var(--txt); }

/* ===== 用户中心（#/me） ===== */
.me-card {
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px 18px; margin-bottom: 14px;
}
.me-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.me-avatar {
  width: 46px; height: 46px; border-radius: 50%; background: linear-gradient(135deg, #1677ff, #722ed1);
  display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 700; color: #fff;
  flex-shrink: 0; overflow: hidden;
}
.me-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.me-name { font-size: 16px; font-weight: 700; }
.me-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.me-row {
  display: flex; align-items: center; padding: 8px 0; font-size: 13.5px;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
}
.me-row:first-of-type { border-top: none; }
.me-k { width: 72px; color: var(--muted); flex-shrink: 0; }
.me-v { display: flex; gap: 8px; align-items: center; flex: 1; }
.me-v input { flex: 1; padding: 8px 10px; font-size: 13px; }
.me-card-title { font-size: 14px; font-weight: 700; margin-bottom: 10px; }
.me-card input[type="password"] { margin-top: 8px; }
.me-card > .pill-btn { margin-top: 10px; }
.me-thread {
  display: flex; align-items: center; gap: 10px; padding: 10px 4px;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
}
.me-thread:first-child { border-top: none; }
.me-thread a { flex: 1; min-width: 0; text-decoration: none; color: var(--txt); }
.me-thread .t-meta { display: flex; gap: 10px; font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.me-del {
  background: transparent; border: 1px solid rgba(255, 77, 79, 0.5); color: #ff7875;
  border-radius: 8px; padding: 5px 10px; font-size: 12px; cursor: pointer; flex-shrink: 0;
}
.me-del:hover { background: rgba(255, 77, 79, 0.15); }
/* 意见反馈 */
.me-card > textarea { margin-top: 4px; min-height: 80px; }
#fb-send { margin-top: 10px; }
.fb-item {
  padding: 10px 4px; border-top: 1px dashed rgba(255, 255, 255, 0.08); font-size: 13px;
}
.fb-item:first-of-type { border-top: none; }
.fb-meta { font-size: 11.5px; color: var(--muted); margin-bottom: 4px; }
.fb-body { line-height: 1.7; white-space: pre-wrap; word-break: break-word; }

/* ===== 主容器 ===== */
.fv {
  flex: 1; width: 100%; max-width: 880px; margin: 0 auto;
  padding: 16px 14px 40px;
}
.fv h1 { font-size: 18px; margin: 6px 0 14px; }
.ff {
  text-align: center; color: rgba(255, 255, 255, 0.32); font-size: 11.5px;
  padding: 14px; border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* ===== 通用控件 ===== */
.pill-btn {
  background: rgba(255, 255, 255, 0.1); border: 1px solid var(--line); color: var(--txt);
  border-radius: 999px; padding: 8px 15px; font-size: 12.5px; cursor: pointer; transition: all 0.15s;
}
.pill-btn:hover { background: rgba(255, 255, 255, 0.18); }
.pill-btn.primary { background: var(--accent); border-color: var(--accent); font-weight: 600; }
.pill-btn.primary:hover { background: #2f88ff; }
.pill-btn.danger:hover { background: var(--danger); border-color: var(--danger); }
input[type="text"], input[type="search"], input[type="password"], input[type="tel"], select, textarea {
  width: 100%; background: rgba(255, 255, 255, 0.08); border: 1px solid var(--line);
  color: var(--txt); border-radius: 10px; padding: 10px 12px; font-size: 13.5px;
  outline: none; font-family: inherit; transition: border-color 0.15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
input::placeholder, textarea::placeholder { color: var(--muted); }
select option { background: #1e293b; color: #fff; }
textarea { resize: vertical; min-height: 130px; line-height: 1.7; }
label { display: block; font-size: 12px; color: var(--muted); margin: 14px 0 6px; }

/* ===== 列表视图 ===== */
.route-tag {
  display: inline-block; background: rgba(22, 119, 255, 0.15); color: #7cb3ff;
  border: 1px solid rgba(22, 119, 255, 0.4); border-radius: 6px;
  padding: 2px 8px; font-size: 11.5px; margin-left: 6px; vertical-align: 1px;
}
.d-route { margin: 2px 0 8px; }
.d-route .route-tag { font-size: 12.5px; padding: 4px 10px; }
.guest-note {
  background: rgba(250, 140, 22, 0.12); border: 1px solid rgba(250, 140, 22, 0.4); color: #ffc069;
  border-radius: 10px; padding: 10px 14px; font-size: 13px; margin-bottom: 14px;
}
.guest-note .pill-btn { margin-left: 8px; padding: 4px 12px; font-size: 12px; color: #ffc069; border-color: rgba(250, 140, 22, 0.5); }
.guest-note .pill-btn:hover { background: rgba(250, 140, 22, 0.2); }
.fb-row { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
#f-search { flex: 1; min-width: 180px; }
#f-refresh { white-space: nowrap; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.chip {
  background: rgba(255, 255, 255, 0.07); border: 1px solid var(--line); color: var(--muted);
  border-radius: 999px; padding: 5px 12px; font-size: 12px; cursor: pointer; transition: all 0.15s;
}
.chip:hover { color: var(--txt); }
.chip.active { background: rgba(22, 119, 255, 0.22); border-color: var(--accent); color: #cfe3ff; font-weight: 600; }

.thread {
  display: block; background: var(--bg); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin-bottom: 10px;
  color: var(--txt); text-decoration: none; transition: all 0.15s;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
}
.thread:hover { border-color: rgba(22, 119, 255, 0.55); transform: translateY(-1px); }
.thread .t-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.cat {
  font-size: 11px; font-weight: 600; border-radius: 999px; padding: 2px 9px; white-space: nowrap;
  background: rgba(22, 119, 255, 0.18); color: #9ecbff; border: 1px solid rgba(22, 119, 255, 0.4);
}
.thread .t-title { font-size: 15px; font-weight: 700; line-height: 1.45; margin-bottom: 4px; }
.thread .t-ex { font-size: 12.5px; color: var(--muted); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.thread .t-meta { display: flex; gap: 12px; margin-top: 9px; font-size: 11.5px; color: var(--muted); flex-wrap: wrap; }
.thread .t-meta b { color: rgba(255, 255, 255, 0.75); font-weight: 600; }
.thread .t-meta .hot { color: #ffb03a; }

.empty {
  text-align: center; color: var(--muted); font-size: 13px; line-height: 2;
  padding: 60px 20px; border: 1px dashed rgba(255, 255, 255, 0.18); border-radius: 14px;
}
.err-box {
  background: rgba(255, 77, 79, 0.12); border: 1px solid rgba(255, 77, 79, 0.4);
  color: #ffb3b5; border-radius: 12px; padding: 16px 18px; font-size: 13px; line-height: 1.8;
}

/* ===== 发帖视图 ===== */
.new-form {
  background: var(--bg); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line); border-radius: 14px; padding: 16px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
}
.new-form h1 { margin-top: 0; }
.f-row { display: flex; gap: 10px; }
.f-row > div { flex: 1; }
#new-btn { margin-top: 18px; width: 100%; padding: 11px; font-size: 14px; }
.back-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }

/* ===== 详情视图 ===== */
.d-card {
  background: var(--bg); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; margin-top: 10px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
}
.d-card h1 { font-size: 19px; line-height: 1.4; margin: 8px 0 6px; word-break: break-word; }
.d-meta { font-size: 12px; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.d-meta b { color: rgba(255, 255, 255, 0.8); font-weight: 600; }
.d-body {
  margin-top: 14px; font-size: 14px; line-height: 1.85; white-space: pre-wrap; word-break: break-word;
  color: rgba(255, 255, 255, 0.92);
}
.d-del { margin-top: 12px; }

.r-head { display: flex; align-items: center; gap: 8px; margin: 22px 0 10px; font-size: 13.5px; font-weight: 600; }
.r-head .cnt { color: var(--muted); font-weight: 400; font-size: 12px; }
.reply {
  background: rgba(255, 255, 255, 0.045); border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px; padding: 13px 15px; margin-bottom: 9px;
}
.reply .r-meta { display: flex; gap: 10px; font-size: 11.5px; color: var(--muted); align-items: center; margin-bottom: 6px; }
.reply .r-meta b { color: rgba(255, 255, 255, 0.8); font-weight: 600; font-size: 12.5px; }
.reply .r-body { font-size: 13.5px; line-height: 1.8; white-space: pre-wrap; word-break: break-word; }
.r-del { margin-left: auto; background: transparent; border: none; color: rgba(255, 255, 255, 0.3);
  font-size: 11.5px; cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.r-del:hover { color: var(--danger); background: rgba(255, 77, 79, 0.12); }
.reply-form {
  margin-top: 16px; background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.09); border-radius: 12px; padding: 13px 15px;
}
.reply-form label { margin: 10px 0 5px; }
.reply-form .f-row { gap: 10px; }
#reply-send { margin-top: 12px; width: 100%; }

/* ===== Toast ===== */
#toast {
  position: fixed; top: 64px; left: 50%; transform: translateX(-50%); z-index: 1200;
  display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none;
}
.toast-item {
  background: rgba(15, 23, 42, 0.94); color: #fff; font-size: 13px;
  padding: 9px 18px; border-radius: 10px; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
  animation: fadeIn 0.25s ease; border: 1px solid var(--line); max-width: 84vw;
}
.toast-item.ok { border-color: rgba(82, 196, 26, 0.6); }
.toast-item.err { border-color: rgba(255, 77, 79, 0.6); }
.toast-item.out { opacity: 0; transition: opacity 0.3s; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-6px); } }

/* ===== 移动端 ===== */
@media (max-width: 640px) {
  .fh { padding: 8px 10px; }
  .fh-title { display: none; }
  .f-row { flex-direction: column; gap: 0; }
  .fv { padding: 12px 10px 30px; }
  .d-card { padding: 14px; }
  /* 触摸目标加大 */
  input[type="text"], input[type="search"], select, textarea { padding: 12px; font-size: 15px; }
  .pill-btn { padding: 10px 16px; font-size: 13.5px; }
  .fh-new, .fh-login, .fh-logout { padding: 10px 14px; font-size: 13px; }
  .reply { padding: 12px 13px; }
  #toast { top: 56px; }
}
