/* ===== 找搭子 H5 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

:root {
  --primary: #f43f5e;
  --primary-grad: linear-gradient(135deg, #f43f5e, #d946ef);
  --violet-grad: linear-gradient(135deg, #7c3aed, #d946ef);
  --bg1: #fff1f5;
  --bg2: #f5f3ff;
  --text: #3b2b3a;
  --text2: #8a7890;
  --card: #ffffff;
  --radius: 18px;
  --shadow: 0 8px 30px rgba(190, 60, 120, 0.10);
}

html, body { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: linear-gradient(160deg, var(--bg1), var(--bg2) 60%, #eef2ff);
  color: var(--text);
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}

#app {
  max-width: 520px;
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* 启动屏 */
.boot {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--text2);
  font-size: 14px;
}
.boot-heart { font-size: 44px; animation: beat 1s infinite ease-in-out; }
@keyframes beat { 0%,100% { transform: scale(1); } 50% { transform: scale(1.18); } }

/* 顶部栏 */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: calc(env(safe-area-inset-top) + 14px) 18px 12px;
  background: rgba(255, 241, 245, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topbar .title {
  font-size: 19px;
  font-weight: 700;
  background: var(--primary-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.topbar .sub { font-size: 12px; color: var(--text2); }

/* 微信提示条 */
.wx-tip {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 14px 0;
  padding: 9px 12px;
  background: rgba(7, 193, 96, 0.10);
  border: 1px solid rgba(7, 193, 96, 0.25);
  border-radius: 12px;
  font-size: 12px;
  color: #0a7a4a;
}
.wx-tip .close { margin-left: auto; cursor: pointer; opacity: 0.6; padding: 0 4px; }

/* 底部 Tab */
.tabbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 520px;
  display: flex;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(190, 60, 120, 0.10);
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 20;
}
.tabbar .tab {
  flex: 1;
  padding: 8px 0 6px;
  text-align: center;
  font-size: 11px;
  color: var(--text2);
  cursor: pointer;
  border: none;
  background: none;
  position: relative;
}
.tabbar .tab .ico { display: block; font-size: 21px; margin-bottom: 2px; transition: transform .15s; }
.tabbar .tab.on { color: var(--primary); font-weight: 600; }
.tabbar .tab.on .ico { transform: scale(1.15); }
.tabbar .tab .dot {
  position: absolute;
  top: 6px; left: 58%;
  min-width: 8px; height: 8px;
  border-radius: 99px;
  background: var(--primary);
}

.page {
  flex: 1;
  padding: 14px 14px calc(90px + env(safe-area-inset-bottom));
  overflow-y: auto;
}

/* ===== 模式切换（找对象/找伙伴）===== */
.mode-switch {
  display: flex;
  gap: 8px;
  background: #fff;
  border-radius: 14px;
  padding: 5px;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
  position: sticky;
  top: 8px;
  z-index: 5;
}
.ms-btn {
  flex: 1;
  border: none;
  background: none;
  border-radius: 10px;
  padding: 10px 0;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text2);
  cursor: pointer;
  transition: all .15s;
}
.ms-btn.on {
  background: var(--primary-grad);
  color: #fff;
  box-shadow: 0 4px 14px rgba(244, 63, 94, 0.3);
}

/* ===== 卡片 ===== */
.user-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 14px;
  animation: rise .35s ease both;
}
.user-card.tap-card { cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
.user-card.tap-card:active { transform: scale(0.98); box-shadow: 0 4px 16px rgba(190, 60, 120, 0.18); }
.tap-hint {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed #f2dce6;
  font-size: 12.5px;
  color: var(--primary);
  text-align: center;
  font-weight: 600;
}
.qr-img.qr-big { width: 260px; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.uc-head { display: flex; gap: 14px; align-items: center; }
.uc-avatar {
  width: 62px; height: 62px;
  border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 15px;
  color: #fff;
  letter-spacing: 0.5px;
  flex-shrink: 0;
  text-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.uc-name { font-size: 17px; font-weight: 700; }
.uc-tags { margin-top: 4px; font-size: 12.5px; color: var(--text2); line-height: 1.6; }
.uc-tags b { color: var(--text); font-weight: 600; }

.ring {
  margin-left: auto;
  width: 66px; height: 66px;
  flex-shrink: 0;
  position: relative;
}
.ring svg { transform: rotate(-90deg); }
.ring .track { stroke: #f3e2ea; }
.ring .bar { stroke: url(#ringGrad); stroke-linecap: round; transition: stroke-dashoffset .8s ease; }
.ring .val {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800;
  background: -webkit-linear-gradient(315deg, #f43f5e, #d946ef);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.mbti-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 99px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.10), rgba(217, 70, 239, 0.12));
  border: 1px solid rgba(124, 58, 237, 0.22);
  font-size: 12px;
  font-weight: 700;
  color: #7c3aed;
  margin: 10px 0 2px;
}
.mbti-badge .type { font-family: ui-monospace, Menlo, monospace; letter-spacing: 1px; }

.chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.chip {
  padding: 5px 11px;
  border-radius: 99px;
  background: #fdf2f7;
  border: 1px solid #f6dbe6;
  font-size: 12px;
  color: #b03a63;
}
.chip.reason { background: #f3f0ff; border-color: #e4dbff; color: #6d4fd8; }

.quote {
  margin-top: 12px;
  padding: 10px 12px;
  background: #fff8f4;
  border-left: 3px solid #fbbf77;
  border-radius: 8px;
  font-size: 13px;
  color: #9a6b3f;
  line-height: 1.6;
}

.uc-actions { display: flex; gap: 12px; margin-top: 16px; }
.btn {
  flex: 1;
  border: none;
  border-radius: 14px;
  padding: 13px 0;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .12s ease, opacity .12s;
}
.btn:active { transform: scale(0.96); }
.btn-love { background: var(--primary-grad); color: #fff; box-shadow: 0 6px 18px rgba(244, 63, 94, 0.35); }
.btn-skip { background: #f4f0f4; color: var(--text2); }
.btn-done { background: linear-gradient(135deg, #10b981, #059669); color: #fff; }
.btn-ghost { background: #fff; border: 1.5px solid #f0d6e1; color: var(--primary); }

/* ===== 表单向导 ===== */
.wizard { padding: 20px 20px calc(30px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; flex: 1; }
.wz-progress { display: flex; gap: 6px; margin-bottom: 22px; }
.wz-progress .pt { flex: 1; height: 5px; border-radius: 99px; background: #f3dce6; overflow: hidden; }
.wz-progress .pt i { display: block; height: 100%; background: var(--primary-grad); border-radius: 99px; }

.wz-step { flex: 1; display: flex; flex-direction: column; animation: rise .3s ease both; }
.wz-q { font-size: 21px; font-weight: 800; margin-bottom: 6px; }
.wz-hint { font-size: 13px; color: var(--text2); margin-bottom: 20px; }

.opt-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.opt-grid.cols2 { grid-template-columns: repeat(2, 1fr); }
.opt-grid.cols4 { grid-template-columns: repeat(4, 1fr); }
.opt {
  border: 1.5px solid #eed6e0;
  background: #fff;
  border-radius: 13px;
  padding: 14px 6px;
  text-align: center;
  font-size: 14px;
  cursor: pointer;
  transition: all .15s;
}
.opt .em { display: block; font-size: 22px; margin-bottom: 5px; }
.opt.on {
  border-color: var(--primary);
  background: #fff0f4;
  color: var(--primary);
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(244, 63, 94, 0.16);
}
.opt.small { padding: 10px 4px; font-size: 12.5px; }

select.input, textarea.input, input.input {
  width: 100%;
  border: 1.5px solid #eed6e0;
  border-radius: 13px;
  padding: 13px 14px;
  font-size: 15px;
  background: #fff;
  color: var(--text);
  outline: none;
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
}
select.input { background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23c8a9b8' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 14px center; }
textarea.input { resize: none; min-height: 88px; line-height: 1.6; }
.input:focus { border-color: var(--primary); }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13.5px; font-weight: 700; margin-bottom: 8px; }
.field .fh { font-size: 12px; color: var(--text2); font-weight: 400; margin-left: 6px; }

.wz-nav { display: flex; gap: 12px; margin-top: auto; padding-top: 22px; }
.btn.wz-next { flex: 2.4; }
.btn.wz-prev { flex: 1; }

.range-row { display: flex; align-items: center; gap: 10px; }
.range-row .input { flex: 1; width: auto; min-width: 0; }
.range-row span { color: var(--text2); font-size: 13px; flex-shrink: 0; }

.hobby-picked { margin-top: 12px; font-size: 12px; color: var(--primary); }

/* ===== 空状态 ===== */
.empty {
  text-align: center;
  padding: 60px 24px;
  color: var(--text2);
  font-size: 14px;
  line-height: 2;
}
.empty .big { font-size: 44px; display: block; margin-bottom: 8px; }

/* ===== 消息页 ===== */
.sec-title {
  font-size: 15px;
  font-weight: 800;
  margin: 6px 2px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.sec-title .cnt { font-size: 12px; color: var(--primary); background: #ffe4ec; padding: 1px 8px; border-radius: 99px; }

.mini-user {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border-radius: 15px;
  box-shadow: var(--shadow);
  padding: 13px 15px;
  margin-bottom: 10px;
  cursor: pointer;
  animation: rise .3s ease both;
}
.mini-user .uc-avatar { width: 46px; height: 46px; border-radius: 15px; font-size: 12.5px; }
.mini-user .info { flex: 1; min-width: 0; }
.mini-user .nm { font-size: 14.5px; font-weight: 700; }
.mini-user .ds { font-size: 12px; color: var(--text2); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-user .act { flex-shrink: 0; }
.btn.mini { padding: 8px 16px; font-size: 13px; border-radius: 99px; flex: none; }

/* ===== 活动 ===== */
.act-ico { font-size: 26px; }
.act-type {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  color: #7c3aed;
  background: #f3f0ff;
  border: 1px solid #e4dbff;
  padding: 4px 10px;
  border-radius: 99px;
}
.act-members {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.act-members .lbl { font-size: 12px; color: var(--text2); margin-right: 2px; }
.badge-avatar {
  min-width: 30px;
  height: 30px;
  padding: 0 6px;
  border-radius: 10px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.act-modal-head { display: flex; align-items: center; gap: 12px; justify-content: center; margin-bottom: 10px; }

/* ===== 微信二维码 ===== */
.qr-upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 130px;
  border: 2px dashed #f0c9d8;
  border-radius: 16px;
  color: var(--primary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  background: #fff8fb;
}
.qr-upload:active { background: #fff0f6; }
.qr-box { text-align: center; }
.qr-img {
  width: 200px;
  max-width: 100%;
  border-radius: 16px;
  border: 1px solid #f0d6e1;
  cursor: pointer;
  display: block;
  margin: 0 auto;
}
.qr-tip { font-size: 12px; color: var(--text2); margin-top: 8px; }

/* ===== 聊天 ===== */
.chat-wrap { display: flex; flex-direction: column; height: 100dvh; }
.chat-head {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 10px;
  padding: calc(env(safe-area-inset-top) + 12px) 14px 12px;
  background: rgba(255, 241, 245, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-weight: 700;
}
.chat-head .back { cursor: pointer; font-size: 18px; padding: 2px 8px; color: var(--primary); }
.chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bubble {
  max-width: 74%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 14.5px;
  line-height: 1.55;
  word-break: break-word;
  animation: rise .25s ease both;
}
.bubble.out {
  align-self: flex-end;
  background: var(--primary-grad);
  color: #fff;
  border-bottom-right-radius: 5px;
}
.bubble.in {
  align-self: flex-start;
  background: #fff;
  border-bottom-left-radius: 5px;
  box-shadow: var(--shadow);
}
.chat-input {
  position: sticky; bottom: 0;
  display: flex;
  gap: 10px;
  padding: 10px 14px calc(12px + env(safe-area-inset-bottom));
  background: rgba(255, 245, 248, 0.95);
  backdrop-filter: blur(10px);
}
.chat-input input { flex: 1; border-radius: 99px; }
.chat-input .btn { flex: none; padding: 12px 22px; border-radius: 99px; }

/* 我的页面 */
.me-card {
  background: linear-gradient(150deg, #fff, #fff 55%, #fdf3f8);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}
.me-rows { margin-top: 6px; }
.me-row { display: flex; padding: 7px 0; font-size: 14px; }
.me-row .k { width: 84px; color: var(--text2); flex-shrink: 0; }
.me-row .v { flex: 1; font-weight: 600; }

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 120px;
  transform: translateX(-50%) translateY(20px);
  background: rgba(40, 24, 34, 0.88);
  color: #fff;
  padding: 11px 20px;
  border-radius: 99px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: all .25s ease;
  z-index: 99;
  max-width: 80vw;
  text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 弹窗 */
.modal-mask {
  position: fixed; inset: 0;
  background: rgba(40, 20, 35, 0.45);
  z-index: 50;
  display: flex; align-items: center; justify-content: center;
  animation: fadein .2s ease both;
  padding: 30px;
}
@keyframes fadein { from { opacity: 0; } }
.modal {
  background: #fff;
  border-radius: 22px;
  padding: 28px 24px;
  text-align: center;
  max-width: 320px;
  width: 100%;
  animation: rise .28s ease both;
}
.modal .big { font-size: 52px; }
.modal h3 { margin: 10px 0 6px; font-size: 19px; }
.modal p { font-size: 13.5px; color: var(--text2); line-height: 1.7; margin-bottom: 18px; }
