/* ============================================================
 * auth.css —— 登录弹窗（星空深色风格）
 * 响应式体系：PC 居中弹窗；移动端底部弹出（bottom sheet，行业标准）
 * 所有交互元素满足触控标准（≥44px），输入字号≥16px（防 iOS 自动缩放）
 * ============================================================ */
.bl-auth-mask {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 1000;
  background: rgba(6, 10, 24, 0.72);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: blAuthFade .18s ease;
  box-sizing: border-box;
}
@keyframes blAuthFade { from { opacity: 0; } to { opacity: 1; } }

.bl-auth-card {
  position: relative;
  width: 400px; max-width: 100%;
  background: linear-gradient(160deg, #171d33 0%, #10142a 100%);
  border: 1px solid rgba(214, 178, 106, 0.25);
  border-radius: 16px;
  padding: 30px 28px 26px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  box-sizing: border-box;
}

.bl-auth-close {
  position: absolute; top: 12px; right: 14px;
  background: none; border: none; color: #8b93a7;
  font-size: 18px; cursor: pointer; line-height: 1; padding: 6px;
}
.bl-auth-close:hover { color: #fff; }

.bl-auth-title {
  text-align: center; font-size: 19px; color: #f0e6d2;
  letter-spacing: 1px; margin-bottom: 22px;
}

/* ---- 选项卡 ---- */
.bl-auth-tabs { display: flex; gap: 10px; margin-bottom: 22px; }
.bl-auth-tab {
  flex: 1 1 0; min-width: 0;
  padding: 10px 0; border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: transparent; color: #8b93a7;
  cursor: pointer; font-size: 14px; white-space: nowrap;
}
.bl-auth-tab.on {
  color: #f0d9a8; border-color: rgba(214, 178, 106, .55);
  background: rgba(214, 178, 106, .08);
}

/* ---- 输入区 ---- */
.bl-auth-input {
  width: 100%; box-sizing: border-box;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  height: 46px; padding: 0 14px;
  color: #eef1f8; font-size: 16px;   /* ≥16px 防 iOS 聚焦自动缩放 */
  margin-bottom: 14px; outline: none;
}
.bl-auth-input:focus { border-color: rgba(214, 178, 106, 0.6); }
.bl-auth-input::placeholder { color: #5c6377; }

/* 验证码行：输入框弹性占满，按钮不收缩（修复截图中输入框被挤压问题） */
.bl-auth-row { display: flex; gap: 10px; }
.bl-auth-row .bl-auth-input { flex: 1 1 0; min-width: 0; }
.bl-auth-send {
  flex: 0 0 auto; white-space: nowrap;
  height: 46px; padding: 0 16px; margin-bottom: 14px;
  font-size: 14px;
}
.bl-auth-send:disabled { opacity: .5; cursor: default; }

.bl-auth-submit { width: 100%; height: 46px; font-size: 15px; }

.bl-auth-tip {
  margin-top: 14px; text-align: center;
  font-size: 12px; color: #8b93a7; line-height: 1.6;
}

/* ---- 二维码区 ---- */
.bl-auth-qrbox {
  display: flex; justify-content: center;
  padding: 14px; background: #fff; border-radius: 12px;
  width: fit-content; margin: 0 auto;
}

.bl-hidden { display: none !important; }

/* ============================================================
 * 移动端适配（APP / 手机浏览器）：底部弹出式，触控友好
 * ============================================================ */
@media (max-width: 480px) {
  .bl-auth-mask { align-items: flex-end; padding: 0; }
  .bl-auth-card {
    width: 100%; max-width: 100%;
    border-radius: 18px 18px 0 0;
    border-left: none; border-right: none; border-bottom: none;
    padding: 24px 22px calc(24px + env(safe-area-inset-bottom, 0px));
    animation: blAuthSlideUp .22s ease;
  }
  @keyframes blAuthSlideUp { from { transform: translateY(30px); opacity: .6; } to { transform: translateY(0); opacity: 1; } }
  .bl-auth-title { font-size: 18px; margin-bottom: 20px; }
  .bl-auth-tab { padding: 12px 0; font-size: 15px; }
  .bl-auth-input, .bl-auth-send, .bl-auth-submit { height: 48px; }   /* 触控标准 */
  .bl-auth-send { padding: 0 14px; }
}

/* ============================================================
 * onboarding —— 首次资料完善弹窗（清新精致风）
 * 顺序：昵称 → 性别 → 头像 → 出生信息 → 标签 → 提交
 * ============================================================ */
.ob-card {
  width: 540px; max-height: 88vh; overflow-y: auto;
  padding: 32px 32px 26px;
  border-radius: 20px;
  background: linear-gradient(165deg, rgba(26,32,58,.96) 0%, rgba(14,18,38,.97) 100%);
  border: 1px solid rgba(214,178,106,.22);
  box-shadow: 0 24px 70px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.05);
}
.ob-card::-webkit-scrollbar { width: 6px; }
.ob-card::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border-radius: 3px; }

.ob-title {
  text-align: center; font-size: 20px; color: #f3ead6;
  margin-bottom: 24px; letter-spacing: 1.5px; font-weight: 500;
}

/* 小标题：金色短线装饰 */
.ob-label {
  display: flex; align-items: center; gap: 8px;
  font-size: 13.5px; color: #b8bdd0; margin: 18px 0 9px; letter-spacing: .5px;
}
.ob-label::before { content: ""; width: 3px; height: 12px; border-radius: 2px; background: linear-gradient(180deg, #e8c87e, #b8965a); }
.ob-label-sub { font-size: 12px; color: #6d7490; margin-left: 2px; }

/* banner */
.ob-banner {
  background: rgba(214,178,106,.08); border: 1px solid rgba(214,178,106,.24);
  color: #e3d3a8; border-radius: 12px; padding: 11px 14px;
  font-size: 13px; text-align: center; margin: 20px 0 16px;
}
.ob-banner b { color: #f0d9a8; }

/* 农历 */
.ob-lunar {
  background: rgba(128,102,230,.12); border: 1px solid rgba(128,102,230,.26);
  color: #c9baf2; border-radius: 12px; padding: 9px 14px;
  font-size: 13px; margin-top: -6px;
}

/* 时间行 */
.ob-timerow { display: flex; align-items: center; gap: 14px; }
.ob-timerow .bl-auth-input { flex: 1 1 0; min-width: 0; margin-bottom: 0; }
.ob-timerow .picker-wrap { flex: 1 1 0; min-width: 0; }
.ob-timerow .picker-wrap .bl-auth-input { width: 100%; }
/* 复用主站 picker 组件在弹窗内的适配 */
.ob-card .picker-wrap { width: 100%; position: relative; }
.ob-card .picker-wrap .bl-auth-input { margin-bottom: 0; }

/* 夏令时提示 */
.ob-dst {
  background: rgba(214,178,106,.08); border: 1px solid rgba(214,178,106,.25);
  color: #d9c493; border-radius: 10px; padding: 8px 12px;
  font-size: 12px; line-height: 1.5; margin-top: 8px;
}
.ob-notime { white-space: nowrap; font-size: 13px; color: #9aa1b5; display: flex; align-items: center; gap: 6px; cursor: pointer; }
.ob-notime input { accent-color: #d6b26a; width: 15px; height: 15px; }

/* 省市区 */
.ob-regions { display: flex; gap: 10px; }
.ob-regions select {
  flex: 1 1 0; min-width: 0;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.10);
  border-radius: 12px; height: 46px; color: #eef1f8; font-size: 14px;
  padding: 0 12px; outline: none; cursor: pointer;
}
.ob-regions select:focus { border-color: rgba(214,178,106,.5); }
.ob-regions select:disabled { opacity: .4; }
.ob-regions select option { background: #1a2038; }

/* 性别：胶囊按钮 */
.ob-gender { display: flex; gap: 10px; }
.ob-gender button {
  flex: 1; height: 44px; border-radius: 12px;
  border: 1px solid rgba(255,255,255,.10); background: rgba(255,255,255,.04);
  color: #9aa1b5; cursor: pointer; font-size: 14px; transition: all .15s;
}
.ob-gender button:hover { border-color: rgba(214,178,106,.4); color: #cfd4e4; }
.ob-gender button.on {
  color: #f0d9a8; border-color: rgba(214,178,106,.6);
  background: rgba(214,178,106,.12);
  box-shadow: 0 0 0 1px rgba(214,178,106,.25), 0 2px 10px rgba(214,178,106,.12);
}

/* 头像 */
.ob-avatar-row { display: flex; align-items: center; gap: 18px; }
.ob-avatar {
  width: 76px; height: 76px; border-radius: 50%;
  background: rgba(214,178,106,.08); border: 1.5px dashed rgba(214,178,106,.4);
  display: flex; align-items: center; justify-content: center;
  color: #d6b26a; font-size: 26px; overflow: hidden; flex: 0 0 auto;
  transition: border-color .15s;
}
.ob-avatar:hover { border-color: rgba(214,178,106,.7); }
.ob-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ob-avatar-btn {
  height: 40px; padding: 0 20px; border-radius: 10px;
  border: 1px solid rgba(214,178,106,.4); background: rgba(214,178,106,.08);
  color: #e8cf95; font-size: 13.5px; cursor: pointer; transition: all .15s;
}
.ob-avatar-btn:hover { background: rgba(214,178,106,.16); }
.ob-hint { font-size: 12px; color: #6d7490; margin-top: 8px; }

/* 标签 chip：精致 pill（高特异性防污染） */
.ob-tags { display: flex; flex-wrap: wrap; gap: 9px; }
.ob-tags-mine { margin-top: 10px; }
.ob-card .ob-chip {
  padding: 8px 16px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.13); background: rgba(255,255,255,.04);
  color: #a7adbf; cursor: pointer; font-size: 13px; line-height: 1;
  transition: all .15s;
}
.ob-card .ob-chip:hover { border-color: rgba(214,178,106,.45); color: #d5dae8; transform: translateY(-1px); }
.ob-card .ob-chip.on {
  color: #f2dda6; border-color: rgba(214,178,106,.65);
  background: linear-gradient(160deg, rgba(214,178,106,.22), rgba(214,178,106,.10));
  box-shadow: 0 2px 10px rgba(214,178,106,.15);
}
.ob-card .ob-chip i { font-style: normal; margin-left: 5px; opacity: .65; font-size: 12px; }
/* 自定义标签添加行（输入框 + 添加按钮） */
.ob-tag-add { display: flex; gap: 8px; margin-top: 10px; }
.ob-tag-add .bl-auth-input { flex: 1 1 0; min-width: 0; margin-bottom: 0; }
.ob-tag-addbtn {
  flex: 0 0 auto; padding: 0 16px; height: 46px; border-radius: 10px;
  border: 1px solid rgba(214,178,106,.4); background: rgba(214,178,106,.10);
  color: #e8cf95; font-size: 13.5px; cursor: pointer; white-space: nowrap;
}
.ob-tag-addbtn:hover { background: rgba(214,178,106,.20); }

/* 已登录用户菜单 */
.bl-user-menu {
  position: absolute; z-index: 1400; min-width: 210px;
  background: linear-gradient(165deg, rgba(26,32,58,.98), rgba(14,18,38,.99));
  border: 1px solid rgba(214,178,106,.28); border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0,0,0,.55); overflow: hidden;
}
.bl-um-head { padding: 14px 16px 12px; border-bottom: 1px solid rgba(255,255,255,.08); }
.bl-um-nick { color: #f3ead6; font-size: 15px; margin-bottom: 5px; }
.bl-um-id { color: #9aa1b5; font-size: 12.5px; display: flex; align-items: center; gap: 8px; }
.bl-um-copy {
  background: rgba(214,178,106,.12); border: 1px solid rgba(214,178,106,.4);
  color: #e8cf95; border-radius: 6px; font-size: 11px; padding: 2px 8px; cursor: pointer;
}
.bl-um-city { color: #6d7490; font-size: 12px; margin-top: 6px; }
.bl-um-item {
  display: block; width: 100%; text-align: left; padding: 12px 16px;
  background: none; border: none; color: #e08a8a; font-size: 14px; cursor: pointer;
}
.bl-um-item.bl-um-edit { color: #cfd4e4; border-bottom: 1px solid rgba(255,255,255,.08); }
.bl-um-item:hover { background: rgba(255,255,255,.05); }

/* 提交/跳过 */
.ob-submit { width: 100%; height: 50px; font-size: 15.5px; margin-top: 26px; border-radius: 14px; letter-spacing: 1px; }
.ob-skip { display: block; margin: 14px auto 0; background: none; border: none; color: #6d7490; font-size: 13px; cursor: pointer; }
.ob-skip:hover { color: #a7adbf; }

/* ---- PC 端宽松化（>480px 显示区域更多）---- */
@media (min-width: 481px) {
  .ob-card { width: 540px; }
  .ob-gender button { height: 46px; font-size: 14.5px; }
}

/* ---- 移动端：底部弹出 ---- */
@media (max-width: 480px) {
  .ob-card {
    width: 100%; max-height: 92vh;
    border-radius: 20px 20px 0 0; padding: 26px 22px calc(22px + env(safe-area-inset-bottom, 0px));
  }
  /* 不用 :has()（Chrome 105+ 才支持，老鸿蒙/安卓 WebView 失效），JS 侧加 .ob-mask-bottom */
  .bl-auth-mask.ob-mask-bottom { align-items: flex-end; padding: 0; }
}

/* ============================================================
 * 头像圆形裁剪器（所见即所得：圆圈内 = 最终头像）
 * ============================================================ */
.ob-crop-mask {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 1300;
  background: rgba(6,8,16,.88);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; animation: blAuthFade .18s ease;
}
.ob-crop-card {
  width: 380px; max-width: 94vw;
  background: linear-gradient(165deg, rgba(26,32,58,.98), rgba(14,18,38,.99));
  border: 1px solid rgba(214,178,106,.25); border-radius: 18px;
  padding: 20px 20px 18px; box-shadow: 0 24px 70px rgba(0,0,0,.6);
}
.ob-crop-title { text-align: center; color: #f3ead6; font-size: 16px; margin-bottom: 14px; letter-spacing: 1px; }

/* 取景框：正方形，圆形可视区 */
.ob-crop-view {
  position: relative; width: 100%; aspect-ratio: 1/1;
  overflow: hidden; border-radius: 14px; background: #05060c;
  touch-action: none;            /* 允许手指拖动/捏合而不滚页 */
  cursor: grab; user-select: none; -webkit-user-select: none;
}
.ob-crop-view:active { cursor: grabbing; }
/* 老 WebView（Chrome<88）无 aspect-ratio：padding 比例 hack 兜底正方形取景框 */
@supports not (aspect-ratio: 1) {
  .ob-crop-view { height: 0; padding-bottom: 100%; }
}
.ob-crop-view img {
  position: absolute; left: 0; top: 0;
  transform-origin: 0 0;
  max-width: none; max-height: none;
  pointer-events: none; user-select: none; -webkit-user-drag: none;
}
/* 圆形取景孔：外圈压暗 + 金色描边（box-shadow 遮罩法） */
.ob-crop-circle {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0; border-radius: 50%;
  box-shadow: 0 0 0 999px rgba(6,8,16,.66);
  border: 1.5px solid rgba(240,217,168,.85);
  pointer-events: none;
}

/* 缩放控制条 */
.ob-crop-zoom { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.ob-crop-zoom button {
  width: 34px; height: 34px; border-radius: 50%; flex: 0 0 auto;
  border: 1px solid rgba(214,178,106,.4); background: rgba(214,178,106,.08);
  color: #e8cf95; font-size: 17px; line-height: 1; cursor: pointer;
}
.ob-crop-zoom button:hover { background: rgba(214,178,106,.18); }
.ob-crop-zoom input[type=range] { flex: 1; accent-color: #d6b26a; height: 4px; cursor: pointer; }

.ob-crop-hint { text-align: center; font-size: 12px; color: #6d7490; margin-top: 10px; }

.ob-crop-actions { display: flex; gap: 10px; margin-top: 14px; }
.ob-crop-cancel {
  flex: 1; height: 44px; border-radius: 12px;
  border: 1px solid rgba(255,255,255,.12); background: transparent;
  color: #9aa1b5; cursor: pointer; font-size: 14px;
}
.ob-crop-cancel:hover { color: #d5dae8; border-color: rgba(255,255,255,.25); }
.ob-crop-ok { flex: 1; height: 44px; margin-top: 0; border-radius: 12px; }

@media (max-width: 480px) {
  .ob-crop-mask { padding: 14px; }
  .ob-crop-card { width: 100%; max-width: 420px; }
}
