/* ==========================================================================
   易旅官方吐槽旅游景点 —— 全站样式（深色「抖音风」）
   主色 #fe2c55，辅色 #25f4ee，底色 #0b0b0f，卡片 #161823
   纯手写 CSS，不引入 Bootstrap / Layui 等任何第三方 UI 框架。
   ========================================================================== */

:root {
  /* 配色 */
  --bg: #0b0b0f;
  --card: #161823;
  --card-2: #1d1f2c;
  --line: #272838;
  --line-soft: #20212e;
  --text: #f2f3f7;
  --muted: #9aa0b4;
  --main: #fe2c55;
  --main-dark: #e01e46;
  --accent: #25f4ee;
  --ok: #2fd07a;
  --err: #ff5c6c;
  --star: #ffcc33;

  --radius: 16px;
  --shadow: 0 12px 32px rgba(0, 0, 0, .45);

  color-scheme: dark;   /* 让原生控件（select / 滚动条）走深色 */
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(920px 500px at 10% -10%, rgba(254, 44, 85, .16), transparent 62%),
    radial-gradient(760px 440px at 94% -14%, rgba(37, 244, 238, .12), transparent 64%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font: 15px/1.7 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* ---------- 头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 11, 15, .88);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}
.header-inner { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-logo {
  width: 40px; height: 40px; flex: none;
  border-radius: 12px;
  padding: 3px;
  background: linear-gradient(135deg, rgba(254, 44, 85, .95), rgba(37, 244, 238, .9));
  box-shadow: 0 6px 18px rgba(254, 44, 85, .28);
  object-fit: contain;
}
.brand-text { min-width: 0; }
.brand h1 { margin: 0; font-size: 20px; letter-spacing: .4px; color: #fff; }
.slogan { margin: 3px 0 0; font-size: 13px; color: var(--muted); }
.nav { display: flex; gap: 8px; flex-wrap: wrap; }
.nav a {
  color: var(--text); text-decoration: none; font-size: 13.5px;
  padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .03);
}
.nav a:hover { border-color: var(--main); color: #fff; }
.nav a.active {
  background: linear-gradient(135deg, var(--main), #ff5f7e);
  border-color: transparent; color: #fff; font-weight: 600;
}

/* ---------- 登录态 ---------- */
.header-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.auth-bar { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.auth-bar b { color: #fff; }
.auth-bar a {
  color: var(--text); text-decoration: none;
  padding: 5px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .03);
}
.auth-bar a:hover { border-color: var(--accent); color: #fff; }
.inline-form { display: inline; margin: 0; }
.link-btn {
  background: none; border: 0; padding: 0 2px;
  font: inherit; font-size: 13px; color: var(--accent);
  cursor: pointer; text-decoration: underline;
}
.link-btn:hover { color: #fff; }
.link-btn.danger { color: #ff7c93; }

/* ---------- 布局 ---------- */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  margin-top: 20px;
  margin-bottom: 26px;
  align-items: start;
}
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px 20px;
  box-shadow: 0 8px 26px rgba(0, 0, 0, .3);
}
.panel h2 { margin: 0 0 12px; font-size: 17px; color: #fff; }
.panel h2.list-title { margin-top: 24px; }
.desc { color: var(--muted); font-size: 13px; margin: -6px 0 14px; }
.desc a, .tip a { color: var(--accent); }
code {
  background: rgba(255, 255, 255, .07);
  padding: 1px 6px; border-radius: 6px;
  font-size: 12.5px; color: var(--accent);
}
.muted { color: var(--muted); font-weight: 400; font-size: 13px; }

/* ---------- 表单 ---------- */
.post-form { display: flex; flex-direction: column; gap: 10px; }
.form-row { display: flex; gap: 10px; }
.form-row input, .form-row select { flex: 1; min-width: 0; }
input[type="text"], input[type="password"], textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  color: var(--text);
  background: #101119;
}
input[type="text"]::placeholder, input[type="password"]::placeholder, textarea::placeholder { color: #6b7186; }
input[type="text"]:focus, input[type="password"]:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--main);
  background: #141621;
  box-shadow: 0 0 0 3px rgba(254, 44, 85, .16);
}
textarea { min-height: 92px; resize: vertical; }
.form-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.form-errors {
  margin: 0 0 12px; padding: 10px 14px 10px 30px;
  border-radius: 10px; font-size: 13px;
  background: rgba(255, 92, 108, .12);
  border: 1px solid rgba(255, 92, 108, .32);
  color: #ff9aa6;
}
.form-errors li { margin: 2px 0; }
.post-as { margin: 0; font-size: 13px; color: var(--muted); }
.post-as b { color: #fff; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--main), #ff5f7e);
  color: #fff; border: 0; border-radius: 10px;
  padding: 10px 22px; font: inherit; font-weight: 600;
  cursor: pointer; text-decoration: none;
}
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: .55; cursor: default; }
.btn-danger { background: linear-gradient(135deg, var(--main-dark), #ff4d6d); }
.btn-ghost {
  background: transparent; border: 1px solid var(--line); color: var(--text); font-weight: 400;
}
.btn-ghost:hover { border-color: var(--main); color: #fff; filter: none; }
.tip { font-size: 13px; color: var(--muted); }
.tip.ok { color: #6ff0ab; }
.tip.err { color: #ff9aa6; }

/* 小号按钮 / 行内操作 */
.btn-mini {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 11px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card-2);
  color: var(--text); font: inherit; font-size: 12.5px; line-height: 1.7;
  cursor: pointer; text-decoration: none;
}
.btn-mini:hover { border-color: var(--main); color: #fff; }
.btn-mini.danger { border-color: rgba(254, 44, 85, .45); color: #ff8fa3; }
.btn-mini.danger:hover { background: var(--main); border-color: var(--main); color: #fff; }
.btn-mini.active { background: rgba(37, 244, 238, .14); border-color: rgba(37, 244, 238, .4); color: var(--accent); }
.sect-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ---------- 首页吐槽搜索 ---------- */
.search-form { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; }
.search-form input[type="text"] { flex: 1; min-width: 0; }
.search-form .btn { padding: 10px 18px; white-space: nowrap; }
.search-state { margin: 0 0 10px; font-size: 13px; color: var(--muted); }
.search-state b { color: var(--accent); font-weight: 600; }

/* ---------- 消息列表（吐槽 / 留言） ---------- */
.msg-list { display: flex; flex-direction: column; gap: 10px; }
.msg {
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--main);
  border-radius: 12px;
  padding: 12px 14px;
  background: var(--card-2);
}
.msg.is-new { animation: msg-in .45s ease; }
@keyframes msg-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.msg-head { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; flex-wrap: wrap; }
.msg-head-left { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.msg-name { font-weight: 600; color: #fff; }
.msg-time { color: var(--muted); }
.msg-body { margin: 6px 0 0; white-space: pre-wrap; word-break: break-word; color: #e6e8f0; }
.msg-meta { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-size: 12px; padding: 2px 9px; border-radius: 999px;
  background: rgba(255, 255, 255, .07); color: #b9c0d4;
}
.tag-offer { background: rgba(255, 204, 51, .14); color: #ffd873; }
.tag-member { background: rgba(37, 244, 238, .14); color: var(--accent); }
.stars { display: inline-block; margin-top: 5px; color: var(--star); font-size: 13px; letter-spacing: 1px; }
.loading, .empty { color: var(--muted); font-size: 14px; margin: 6px 0; }
.empty a { color: var(--accent); }

/* 帖子底栏：完整 IP + 操作按钮 */
.msg-foot {
  display: flex; justify-content: space-between; align-items: center;
  gap: 10px; flex-wrap: wrap;
  margin-top: 10px; padding-top: 9px;
  border-top: 1px dashed var(--line-soft);
}
.msg-ip {
  font-size: 12px; color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: rgba(255, 255, 255, .045);
  border: 1px solid var(--line-soft);
  padding: 2px 8px; border-radius: 8px;
  word-break: break-all;
}
.quote {
  margin: 8px 0 0; padding: 8px 12px;
  border-left: 3px solid var(--line);
  background: rgba(255, 255, 255, .03);
  border-radius: 0 8px 8px 0;
  color: var(--muted); font-size: 13px;
}
.list-note { margin: 10px 0 0; text-align: center; }

/* ---------- 作者联系方式（吐槽卡片内，可一键复制） ---------- */
.msg-contact {
  margin-top: 9px;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.msg-contact-label { font-size: 12px; color: var(--muted); }
.copy-chip {
  display: inline-flex; align-items: center; gap: 6px;
  max-width: 100%;
  padding: 3px 10px; border-radius: 999px;
  border: 1px solid rgba(37, 244, 238, .3);
  background: rgba(37, 244, 238, .1);
  color: var(--accent); font: inherit; font-size: 12.5px;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.copy-chip:hover { border-color: var(--accent); }
.copy-chip-label { color: #9fe9e6; }
.copy-chip-value {
  font-weight: 600; color: #fff; max-width: 180px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.copy-chip-state { color: var(--muted); font-size: 11.5px; }
.copy-chip.is-copied { border-color: rgba(47, 208, 122, .5); background: rgba(47, 208, 122, .14); }
.copy-chip.is-copied .copy-chip-label,
.copy-chip.is-copied .copy-chip-state { color: #6ff0ab; }
.copy-chip.is-failed { border-color: rgba(255, 92, 108, .5); background: rgba(255, 92, 108, .14); }
.copy-chip.is-failed .copy-chip-label,
.copy-chip.is-failed .copy-chip-state { color: #ff9aa6; }

/* 加载更多（无限滚动兜底按钮） */
.more-wrap { display: flex; justify-content: center; margin: 14px 0 2px; }
.more-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 140px;
  padding: 9px 20px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card-2);
  color: var(--text); font: inherit; font-size: 13.5px; cursor: pointer;
}
.more-btn:hover { border-color: var(--main); color: #fff; }
.more-btn:disabled { opacity: .6; cursor: default; }

/* ---------- 评论 ---------- */
.cmt-panel {
  margin-top: 12px; padding-top: 12px;
  border-top: 1px solid var(--line-soft);
}
.cmt-list { display: flex; flex-direction: column; gap: 8px; }
.cmt {
  background: rgba(255, 255, 255, .028);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 9px 11px;
}
.cmt-head { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 12.5px; }
.cmt-name { font-weight: 600; color: var(--accent); }
.cmt-time { color: var(--muted); }
.cmt-body { margin: 4px 0 0; font-size: 14px; white-space: pre-wrap; word-break: break-word; color: #e6e8f0; }
.cmt-foot {
  display: flex; justify-content: space-between; align-items: center;
  gap: 8px; flex-wrap: wrap; margin-top: 6px;
}
.cmt-empty, .cmt-loading { color: var(--muted); font-size: 13px; margin: 4px 0; }
.cmt-more-wrap { display: flex; justify-content: center; margin: 8px 0 0; }
.cmt-form { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.cmt-form textarea { min-height: 64px; }
.cmt-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.cmt-count { font-size: 12px; color: var(--muted); }
.cmt-count.over { color: #ff9aa6; }
.cmt-login { font-size: 13px; color: var(--muted); margin: 10px 0 0; }
.cmt-login a { color: var(--accent); }

/* ---------- 自定义确认弹层 ---------- */
.confirm-mask {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 20250930;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, .68);
}
.confirm-card {
  width: 340px; max-width: 100%;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  box-shadow: var(--shadow);
}
.confirm-title { margin: 0 0 8px; font-size: 16px; color: #fff; }
.confirm-text { margin: 0 0 16px; font-size: 14px; color: var(--muted); line-height: 1.7; }
.confirm-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }

/* ---------- 联系方式 ---------- */
.contact-list { list-style: none; margin: 0 0 14px; padding: 0; }
.contact-list li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 0; border-bottom: 1px dashed var(--line-soft);
}
.contact-list li:last-child { border-bottom: 0; }
.contact-list span { color: var(--muted); font-size: 13px; }
.contact-list b { font-size: 15px; letter-spacing: .3px; color: #fff; }

/* 侧栏「我的联系方式」：登录用户自己的 QQ / 微信，可一键复制 */
.my-contact {
  margin: 2px 0 14px; padding: 12px 12px 10px;
  border: 1px solid var(--line-soft); border-radius: 12px;
  background: var(--card-2);
}
.my-contact h3 { margin: 0 0 8px; font-size: 14px; color: #fff; }
.my-contact p { margin: 8px 0 0; }
.my-contact-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.my-contact-list li { display: flex; align-items: center; gap: 8px; }
.my-contact-label { flex: none; min-width: 30px; font-size: 12px; color: var(--muted); }
.my-contact-value {
  flex: 1; min-width: 0; font-size: 14px; color: #fff;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.copy-btn { flex: none; }
.copy-btn.is-copied { border-color: rgba(47, 208, 122, .5); color: #6ff0ab; }
.copy-btn.is-failed { border-color: rgba(255, 92, 108, .5); color: #ff9aa6; }
.qr-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.qr-grid figure {
  margin: 0 auto;
  width: 100%;
  max-width: 248px;
  padding: 14px 12px 12px;
  text-align: center;
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.qr-grid figure:hover {
  border-color: rgba(254, 44, 85, .45);
  box-shadow: 0 10px 26px rgba(254, 44, 85, .18);
  transform: translateY(-2px);
}
.qr-grid img {
  display: block; width: 200px; max-width: 100%; height: auto;
  margin: 0 auto; border-radius: 8px; background: #fff; padding: 6px;
}
.qr-grid figcaption { font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.notice {
  margin: 16px 0 0; padding: 10px 12px; border-radius: 10px;
  background: rgba(37, 244, 238, .08);
  border: 1px solid rgba(37, 244, 238, .22);
  font-size: 13px; color: #c9f6f4;
}
.notice a { color: var(--accent); }

/* ---------- 首页访客 UV（公告下方，口径见 config.php uv_count()） ---------- */
.uv-stats {
  list-style: none; margin: 12px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
.uv-stats li {
  padding: 8px 4px; text-align: center;
  background: var(--card-2); border: 1px solid var(--line); border-radius: 10px;
}
.uv-label { display: block; font-size: 12px; color: var(--muted); }
.uv-value { display: block; margin-top: 2px; font-size: 18px; line-height: 1.2; color: var(--accent); }

/* ---------- 页脚 ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 16px 0; }
.site-footer p { margin: 2px 0; font-size: 13px; text-align: center; color: var(--muted); }

/* ---------- 移动端底部导航 ---------- */
.tabbar { display: none; }

/* ---------- 滑块安全验证（纯原生实现，不依赖任何第三方 UI 库） ---------- */
.risk-lock { overflow: hidden; }

/* 遮罩：铺满视口；内容高于视口时可滚动，卡片始终完整可见 */
.risk-mask {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 20250928;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  overflow-y: auto;
  background: rgba(0, 0, 0, .68);
  -webkit-overflow-scrolling: touch;
}

.risk-card {
  position: relative;
  width: 360px; max-width: 100%;
  margin: auto;                 /* 与 flex 配合：内容超高时上下不裁切 */
  box-sizing: border-box;
  padding: 20px 20px 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  color: var(--text);
  -webkit-user-select: none; user-select: none;
}

/* 内联 SVG 图标：尺寸随场景覆盖，不再依赖图标字体 */
.risk-ico { display: block; width: 1em; height: 1em; flex: none; }

/* 右上角关闭按钮（移动端也够点） */
.risk-close {
  position: absolute; top: 8px; right: 8px;
  width: 32px; height: 32px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: 50%;
  background: transparent; color: #7c8399;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.risk-close:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.risk-close .risk-ico { width: 16px; height: 16px; }

/* 标题区 */
.risk-head { margin-bottom: 14px; padding-right: 30px; }
.risk-title { display: flex; align-items: center; gap: 6px; font-size: 16px; font-weight: 600; letter-spacing: .2px; color: #fff; }
.risk-title .risk-ico { width: 18px; height: 18px; color: var(--main); }
.risk-desc { margin: 6px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.5; }

/* 拼图区 */
.risk-stage {
  position: relative;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0f1017;
  line-height: 0;
}
.risk-bg { display: block; width: 100%; height: auto; }
.risk-piece { position: absolute; left: 0; top: 0; pointer-events: none; }
.risk-loading {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  background: #0f1017; font-size: 13px; color: var(--muted); line-height: 1;
}
.risk-spinner {
  width: 14px; height: 14px; flex: none;
  border: 2px solid #33364a; border-top-color: var(--main); border-radius: 50%;
  animation: risk-spin .8s linear infinite;
}
@keyframes risk-spin { to { transform: rotate(360deg); } }

/* 滑块条 */
.risk-track {
  position: relative;
  height: 44px; margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #101119;
  overflow: hidden;
  cursor: pointer;
}
.risk-fill {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0;
  background: rgba(254, 44, 85, .18);
}
.risk-tip {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: var(--muted); pointer-events: none;
}
.risk-handle {
  position: absolute; left: 2px; top: 2px;
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--main), #ff5f7e);
  color: #fff;
  box-shadow: 0 4px 12px rgba(254, 44, 85, .38);
  cursor: grab;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  will-change: transform;
}
.risk-handle .risk-ico { width: 18px; height: 18px; }
.risk-handle.is-active { cursor: grabbing; }
.risk-handle:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* 状态 */
.risk-card[data-state="busy"] .risk-tip { color: #dfe3ee; }
.risk-card[data-state="ok"] .risk-fill { background: rgba(47, 208, 122, .22); }
.risk-card[data-state="ok"] .risk-handle { background: linear-gradient(135deg, #16a34a, #2fd07a); box-shadow: 0 4px 12px rgba(47, 208, 122, .35); }
.risk-card[data-state="ok"] .risk-tip { color: #6ff0ab; font-weight: 600; }
.risk-card[data-state="err"] .risk-fill { background: rgba(255, 92, 108, .2); }
.risk-card[data-state="err"] .risk-tip { color: #ff9aa6; }
.risk-card[data-state="err"] { animation: risk-shake .4s ease; }
@keyframes risk-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

/* 底部 */
.risk-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-top: 10px; min-height: 32px;
}
.risk-status { font-size: 12.5px; color: var(--muted); }
.risk-status.ok { color: #6ff0ab; }
.risk-status.err { color: #ff9aa6; }
.risk-refresh {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 10px; border: 1px solid transparent; border-radius: 15px;
  font: inherit; font-size: 12.5px; color: var(--muted);
  background: transparent; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.risk-refresh:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.risk-refresh .risk-ico { width: 14px; height: 14px; }

/* ---------- 星级评价 ---------- */
.rate { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.rate-label { font-size: 13px; color: var(--muted); margin-right: 4px; }
.rate-star {
  background: none; border: 0; padding: 0 2px;
  font-size: 22px; line-height: 1; color: #3a3d4d; cursor: pointer;
}
.rate-star.on { color: var(--star); }
.rate-reset {
  background: none; border: 0; margin-left: 8px;
  font: inherit; font-size: 12px; color: var(--muted);
  cursor: pointer; text-decoration: underline;
}

/* ---------- 登录 / 注册页 ---------- */
.auth-panel { max-width: 460px; margin: 0 auto; }

/* ---------- 个人中心 ---------- */
.member-main { padding-top: 20px; padding-bottom: 26px; }
.member-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.member-stats { list-style: none; display: flex; gap: 10px; margin: 0; padding: 0; flex-wrap: wrap; }
.member-stats li {
  min-width: 76px; text-align: center;
  background: var(--card-2); border: 1px solid var(--line-soft);
  border-radius: 12px; padding: 8px 12px;
}
.member-stats span { display: block; font-size: 12px; color: var(--muted); }
.member-stats b { font-size: 20px; color: var(--main); }
.member-tabs { margin-top: 14px; }
.member-item { border-left-color: var(--accent); }
.member-edit { margin-top: 10px; }
.member-edit summary {
  list-style: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 4px;
}
.member-edit summary::-webkit-details-marker { display: none; }
.member-edit[open] summary { border-color: var(--main); color: #fff; }
.edit-form { margin-top: 10px; }

/* 账号设置（可折叠）：资料 / 改密两张表单，宽屏并排、窄屏堆叠 */
.panel.settings-panel { padding: 0; overflow: hidden; }
.settings-summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  padding: 16px 20px;
}
.settings-summary::-webkit-details-marker { display: none; }
.settings-title { font-size: 17px; font-weight: 600; color: #fff; }
.panel.settings-panel[open] .settings-summary { border-bottom: 1px solid var(--line-soft); }
.settings-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px; padding: 16px 20px 20px;
}
.settings-form { gap: 12px; }
.settings-grid .edit-form { margin-top: 0; }
.settings-form h3 { margin: 0; font-size: 15px; color: #fff; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12.5px; color: var(--muted); }
.form-row > .field { flex: 1; min-width: 0; }
.field-hint { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.6; }
.field-hint a { color: var(--accent); }

/* ---------- 后台管理 ---------- */
.admin-main { padding-top: 20px; padding-bottom: 26px; }
.admin-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.admin-tabs a {
  text-decoration: none; font-size: 14px; color: var(--text);
  background: var(--card-2); border: 1px solid var(--line);
  padding: 7px 16px; border-radius: 999px;
}
.admin-tabs a:hover { border-color: var(--main); }
.admin-tabs a.active {
  background: linear-gradient(135deg, var(--main), #ff5f7e);
  border-color: transparent; color: #fff; font-weight: 600;
}
.admin-flash { margin: 0 0 14px; padding: 10px 14px; border-radius: 10px; font-size: 13.5px; }
.admin-flash.ok { background: rgba(47, 208, 122, .14); color: #6ff0ab; border: 1px solid rgba(47, 208, 122, .3); }
.admin-flash.err { background: rgba(255, 92, 108, .14); color: #ff9aa6; border: 1px solid rgba(255, 92, 108, .32); }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat-card {
  display: flex; flex-direction: column; gap: 4px;
  background: var(--card-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px;
}
.stat-card span { font-size: 13px; color: var(--muted); }
.stat-card b { font-size: 22px; color: var(--main); }
.stat-card em { font-style: normal; font-size: 12px; color: var(--muted); }
.admin-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.admin-table th, .admin-table td {
  text-align: left; padding: 8px 10px;
  border-bottom: 1px solid var(--line-soft); vertical-align: top;
}
.admin-table th { background: #1b1c28; color: var(--muted); font-weight: 600; white-space: nowrap; }
.admin-table tbody tr:hover td { background: rgba(255, 255, 255, .025); }
.admin-list { display: flex; flex-direction: column; gap: 12px; }
.admin-item { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--card-2); }
.admin-item-head {
  display: flex; justify-content: space-between; gap: 10px;
  flex-wrap: wrap; font-size: 13px;
}
.admin-item-head > div { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.admin-item-body { margin: 8px 0; white-space: pre-wrap; word-break: break-word; color: #e6e8f0; }
.badge-ok { font-size: 12px; background: rgba(47, 208, 122, .16); color: #6ff0ab; padding: 2px 9px; border-radius: 999px; }
.badge-off { font-size: 12px; background: rgba(255, 92, 108, .16); color: #ff9aa6; padding: 2px 9px; border-radius: 999px; }
.pager { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.pager a, .pager .cur {
  min-width: 32px; text-align: center; padding: 5px 8px;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--card-2); color: var(--text); font-size: 13px; text-decoration: none;
}
.pager a:hover { border-color: var(--main); }
.pager .cur { background: var(--main); border-color: var(--main); color: #fff; font-weight: 600; }
td.actions { white-space: nowrap; }
td.actions form { display: inline; margin-right: 8px; }

/* ---------- 响应式 ---------- */
@media (max-width: 820px) {
  .layout { grid-template-columns: 1fr; }
  .header-inner { flex-direction: column; align-items: flex-start; }
  .form-row { flex-direction: column; }
  .auth-bar { flex-wrap: wrap; }
  .rate-star { font-size: 24px; padding: 0 3px; }

  /* 底部导航：仅小屏显示 */
  .tabbar {
    display: flex;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: rgba(13, 13, 18, .95);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
  }
  .tabbar-item {
    flex: 1;
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 5px 0; border-radius: 10px;
    color: var(--muted); text-decoration: none; font-size: 11.5px;
  }
  .tabbar-item.active { color: var(--main); }
  .tabbar-ico { width: 22px; height: 22px; fill: currentColor; }
  body { padding-bottom: 68px; }
}

/* 小屏手机：验证弹层改用整宽卡片，避免贴边；输入框 16px 防 iOS 自动放大 */
@media (max-width: 420px) {
  .panel { padding: 14px 14px 16px; }
  .risk-mask { padding: 10px; }
  .risk-card { width: 100%; padding: 16px 14px 10px; }
  .risk-title { font-size: 15px; }
  .risk-track { height: 42px; }
  .risk-handle { width: 38px; height: 38px; }
  input[type="text"], input[type="password"], textarea, select { font-size: 16px; }
  .btn { width: 100%; padding: 11px 22px; }
  .form-foot { gap: 8px; }
  .settings-summary { padding: 14px; }
  .settings-grid { padding: 14px 14px 16px; gap: 16px; }
}
