@charset "UTF-8";
/* ==================== 首页悬浮卡（右下角注册 / Q 群卡 + 左侧客服卡） ====================
   两张卡都仅 view/index/gate/index.html 引入；
   右下卡规格见 docs/superpowers/specs/2026-09-10-官网首页注册悬浮卡与内容收敛-design.md
   - .float-card（右下角，注册 + 官方 Q 群）：right 16px / bottom 96px。
     bottom 96 为避让 .backtop（home.css：right:26px bottom:40px 44×44，占 bottom 40~84px）
   - .float-customer（左下角，联系客服）：left 16px / bottom 96px，≤768px 隐藏
   两卡 z-index 均为 40，低于导航（.mainnav 50 / .topbar 60）。 */

.float-card {
  position: fixed; right: 16px; bottom: 96px; z-index: 40;
  width: 216px;
  background: linear-gradient(180deg, #181c26, #12151d);
  border: 1px solid rgba(212, 175, 55, .38);
  border-radius: 10px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, .7);
  color: #e8e2d0;
  transition: transform .25s ease, opacity .25s ease;
}

/* 折叠态：整卡收成 30px 窄条，只留把手（把手始终在可视区内，可再点开） */
.float-card.folded { width: 30px; }
.float-card.folded .float-body { display: none; }

.float-fold {
  position: absolute; left: -2px; top: 50%; transform: translate(-100%, -50%);
  width: 24px; height: 46px; line-height: 46px; text-align: center;
  background: #181c26; border: 1px solid rgba(212, 175, 55, .38); border-right: none;
  border-radius: 6px 0 0 6px; color: #d4af37; font-size: 14px;
  cursor: pointer; user-select: none;
}
.float-fold:hover { color: #f0d68a; }
/* 折叠时把手贴到窄条右侧（卡片已收窄，不能再往外挂） */
.float-card.folded .float-fold {
  position: static; transform: none; display: block;
  width: 100%; height: 46px; border: none; border-radius: 10px;
}

/* 小屏胶囊：默认只在 ≤768px 显示 */
.float-caps { display: none; }

.float-body { padding: 10px 12px 12px; }

.float-title {
  text-align: center; font-size: 12px; letter-spacing: 2px; font-weight: 700;
  color: #d4af37; margin-bottom: 8px;
}

/* ---------- 表单 ---------- */
.float-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 5px; }
.float-label { width: 56px; flex: none; text-align: right; font-size: 10px; color: #9a937f; }
.float-input { flex: 1; min-width: 0; position: relative; }
.float-input input {
  width: 100%; box-sizing: border-box;
  font-size: 11px; color: #e8e2d0; background: #0f1219;
  border: 1px solid rgba(212, 175, 55, .3); border-radius: 3px;
  padding: 4px 6px; outline: none; transition: border-color .2s;
}
.float-input input:focus { border-color: rgba(212, 175, 55, .75); }
.float-input input.field-valid { border-color: #7fd18b; }
.float-input input.field-invalid { border-color: #e07a7a; }

/* 字段提示（register-form.js 动态插入到字段所在行内，靠 .float-row 的 flex-wrap 换行） */
.float-row .field-tip { flex: none; width: 100%; font-size: 10px; color: #e07a7a; margin-top: 2px; }

.float-sms { display: flex; gap: 4px; }
.float-sms input { flex: 1; min-width: 0; }
.float-btn-mini {
  flex: none; font-size: 10px; color: #d4af37; background: none;
  border: 1px solid rgba(212, 175, 55, .5); border-radius: 3px;
  padding: 4px 6px; cursor: pointer; white-space: nowrap;
}
.float-btn-mini:disabled { opacity: .55; cursor: not-allowed; }

.float-protocol {
  font-size: 10px; color: #9a937f; line-height: 1.5;
  margin: 7px 0 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 2px;
}
.float-protocol input { margin: 0 3px 0 0; vertical-align: middle; }
.float-protocol a { color: #d4af37; text-decoration: none; }
.float-protocol a:hover { color: #f0d68a; }

/* ---------- 按钮 ---------- */
.float-btn {
  display: block; width: 100%; box-sizing: border-box; text-align: center;
  font-size: 11px; padding: 6px 0; border-radius: 3px; cursor: pointer;
  text-decoration: none; transition: filter .2s, color .2s, border-color .2s;
}
.float-btn.gold {
  background: linear-gradient(180deg, #e8c860, #b8892a); color: #1a1408; font-weight: 700;
}
.float-btn.gold:hover { filter: brightness(1.1); color: #1a1408; text-decoration: none; }
.float-submit { border: none; font-family: inherit; }
.float-btn:not(.gold) {
  color: #d4af37; border: 1px solid rgba(212, 175, 55, .5); background: none;
}
.float-btn:not(.gold):hover { color: #f0d68a; border-color: #d4af37; text-decoration: none; }

/* ---------- 已登录 / 未开放 占位 ---------- */
.float-note { text-align: center; font-size: 11px; color: #9a937f; line-height: 1.7; }
.float-note p { margin: 0 0 8px; }

/* ---------- 官方 Q 群 ---------- */
.float-group {
  margin-top: 10px; padding-top: 10px;
  border-top: 1px solid rgba(212, 175, 55, .22); text-align: center;
}
.float-group-title { font-size: 10px; color: #d4af37; letter-spacing: 1px; margin-bottom: 6px; }
.float-qr { display: block; width: 104px; margin: 0 auto; }
.float-qr img { display: block; width: 104px; height: 104px; border-radius: 4px; background: #fff; }
.float-group-tip { font-size: 9px; color: #9a937f; line-height: 1.5; margin: 6px 0; }
.float-group .float-btn { margin-top: 2px; }

/* ==================== 响应式：≤768px 恒为胶囊态 ==================== */
@media (max-width: 768px) {
  .float-card {
    width: auto; right: 12px; bottom: 96px;
    background: none; border: none; box-shadow: none; border-radius: 0;
    transform: none;
  }
  .float-card.folded { transform: none; }
  .float-fold { display: none; }

  .float-caps { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
  .float-caps a {
    display: block; font-size: 12px; padding: 8px 16px; border-radius: 20px;
    background: linear-gradient(180deg, #e8c860, #b8892a); color: #1a1408;
    font-weight: 700; text-decoration: none; box-shadow: 0 4px 14px rgba(212, 175, 55, .4);
  }
  .float-caps a[data-float-open="group"] {
    background: #151821; color: #d4af37; border: 1px solid rgba(212, 175, 55, .5);
  }

  /* 展开后回到完整卡片外观 */
  .float-card.open {
    width: 216px; left: auto;
    background: linear-gradient(180deg, #181c26, #12151d);
    border: 1px solid rgba(212, 175, 55, .38);
    border-radius: 10px; box-shadow: 0 12px 34px rgba(0, 0, 0, .7);
  }
  .float-card.open .float-caps { display: none; }
  .float-card.open .float-body {
    opacity: 1; pointer-events: auto;
    max-height: 70vh; overflow-y: auto; -webkit-overflow-scrolling: touch;
  }
  /* 未展开时隐藏卡体（胶囊态）：必须 display:none 而非 opacity:0——
     opacity:0 不脱离布局，会留下隐形却可命中（吞点击）的矩形 */
  .float-card:not(.open) .float-body { display: none; }
}

/* ===== 首页左侧客服悬浮卡 =====
   定位要点：left 16px / bottom 96px —— 与右下角 .float-card 对称；
   z-index 40 与右卡一致（低于导航 .mainnav 50 / .topbar 60）。
   ≤768px 隐藏：右卡在小屏变胶囊，左侧再来一个会挤。 */
.float-customer {
  position: fixed;
  left: 16px;
  bottom: 96px;
  z-index: 40;
  width: 216px;
  padding: 12px;
  background: linear-gradient(180deg, #181c26, #12151d);
  border: 1px solid rgba(212, 175, 55, .38);
  border-radius: 10px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, .7);
  color: #e8e2d0;
  text-align: center;
}
.float-customer-title {
  font-size: 12px;
  letter-spacing: 2px;
  font-weight: 700;
  color: #d4af37;
  margin-bottom: 8px;
}
.float-customer-qr img {
  display: block;
  width: 120px;
  height: 120px;
  margin: 0 auto;
  border-radius: 4px;
  background: #fff;
}
.float-customer-tip {
  font-size: 10px;
  color: #9a937f;
  line-height: 1.5;
  margin: 6px 0 8px;
}
.float-customer-btn {
  display: block;
  font-size: 11px;
  padding: 6px 0;
  border-radius: 3px;
  text-decoration: none;
  background: linear-gradient(180deg, #e8c860, #b8892a);
  color: #1a1408;
  font-weight: 700;
}
.float-customer-btn:hover { color: #1a1408; text-decoration: none; }

@media (max-width: 768px) {
  .float-customer { display: none; }
}
