/* 即梦活动页 · 福利领取表单
 * 只写自有 .lead* 类，不覆盖官方 challenge-activity-detail CSS。
 * 尺寸全 rem（页面根字号 = 屏宽 50/375，375 屏下 1rem = 50px）。
 * 状态一律用属性表达（data-ready / data-state / data-lead-locked；aria-disabled 只用于真正不可交互态），
 * 不用 disabled 伪类选择器。
 */

.leadRoot {
  width: 100%;
  box-sizing: border-box;
}

.leadForm {
  position: relative;
  width: 100%;
  margin-top: .24rem;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

.leadField {
  width: 100%;
  display: flex;
  box-sizing: border-box;
}

.leadInput {
  width: 100%;
  height: 1.04rem;
  box-sizing: border-box;
  padding: 0 .48rem;
  border: none;
  border-radius: 19.98rem;
  background: hsla(0, 0%, 100%, .06);
  box-shadow: inset 0 0 0 .01rem hsla(0, 0%, 100%, .12);
  color: #fff;
  font-size: .28rem;
  font-weight: 500;
  line-height: 1.04rem;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  font-family: inherit;
}

.leadInput::placeholder {
  color: hsla(0, 0%, 100%, .4);
  font-weight: 400;
}

.leadInput:focus {
  background: hsla(0, 0%, 100%, .1);
  box-shadow: inset 0 0 0 .01rem hsla(0, 0%, 100%, .24);
}

/* 锁定态（频控锁定）：JS 打 data-lead-locked，同时仍设原生 disabled 保证不可编辑 */
.leadInput[data-lead-locked="1"] {
  color: hsla(0, 0%, 100%, .4);
  cursor: not-allowed;
}

/* 验证码行：靠 hidden 属性真正从渲染树与无障碍树里摘掉（JS 同时设 inert） */
.leadCodeRow {
  width: 100%;
  margin-top: .16rem;
  display: flex;
  align-items: center;
  gap: .16rem;
  box-sizing: border-box;
}

.leadCodeRow[hidden],
.leadCodeRow[data-lead-inert="1"] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.leadInput--code {
  flex: 1 1 auto;
  min-width: 0;
}

.leadSendBtn {
  flex: 0 0 auto;
  width: 2.6rem;
  height: 1.04rem;
  padding: 0 .32rem;
  box-sizing: border-box;
  border: none;
  border-radius: 19.98rem;
  background: #fff;
  color: #111;
  font-size: .28rem;
  font-weight: 500;
  line-height: 1.04rem;
  white-space: nowrap;
  text-align: center;
  cursor: pointer;
  font-family: inherit;
  transition: background .2s linear, color .2s linear;
}

.leadSendBtn[aria-disabled="true"],
.leadSendBtn[data-state="countdown"],
.leadSendBtn[data-state="fail-cooldown"],
.leadSendBtn[data-state="locked"],
.leadSendBtn[data-state="sending"],
.leadSendBtn[data-state="loading"],
.leadSendBtn[data-state="phone-pending"] {
  background: hsla(0, 0%, 100%, .12);
  color: hsla(0, 0%, 100%, .6);
  cursor: default;
}

/* 冷却中仍可点（点了给「多少秒后重试」的提示），但视觉上要明确不可发码 */
.leadSendBtn[data-state="countdown"],
.leadSendBtn[data-state="fail-cooldown"] {
  color: hsla(0, 0%, 100%, .45);
  font-variant-numeric: tabular-nums;
}

/* ---------------- 本地服务未连通：顶部弱提示条 ---------------- */

.leadOffline {
  width: 100%;
  margin-bottom: .16rem;
  padding: .16rem .32rem;
  box-sizing: border-box;
  border-radius: .16rem;
  background: rgba(255, 107, 107, .12);
  box-shadow: inset 0 0 0 .01rem rgba(255, 107, 107, .32);
  color: #ffb3b3;
  font-size: .22rem;
  line-height: .32rem;
  font-weight: 400;
  text-align: center;
}

/* ---------------- 立即领取：白底黑字 + 常驻扫光 + 常驻呼吸 ---------------- */

.leadClaimBtn {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 1.04rem;
  margin-top: .24rem;
  padding: 0 .32rem;
  box-sizing: border-box;
  border: none;
  border-radius: 19.98rem;
  background: #fff;
  color: #111;
  font-size: .3rem;
  font-weight: 600;
  line-height: 1.04rem;
  text-align: center;
  cursor: pointer;
  font-family: inherit;
  transition: background .2s linear, color .2s linear;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  /* 呼吸常驻：与就绪状态无关，页面一加载就跑。
   * 缩放挂在按钮本体（scale 1 → 1.012），外发光同步呼吸；文字层不参与，
   * 避免父级与子级双重缩放叠加。 */
  animation: leadBreath 2.6s ease-in-out infinite;
  transform-origin: 50% 50%;
  will-change: transform, box-shadow;
}

/* 文字在扫光层之上，保证可读；缩放由按钮本体承载，这里不再挂动画 */
.leadClaimText {
  position: relative;
  z-index: 1;
  display: inline-block;
  pointer-events: none;
  transform-origin: 50% 50%;
  animation: none;
}

/* 扫光层：45° 斜向高光 + 极淡深色伴随层（白底上靠后者保证肉眼可见） */
.leadClaimBtn::after {
  content: "";
  position: absolute;
  top: -25%;
  left: 0;
  width: 1.6rem;
  height: 150%;
  background:
    linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .85) 48%, transparent 66%),
    linear-gradient(105deg, transparent 38%, rgba(17, 17, 17, .14) 48%, rgba(17, 17, 17, .14) 50%, transparent 60%);
  transform: translateX(-160%);
  animation: leadSweep 3.2s cubic-bezier(.4, 0, .2, 1) infinite;
  pointer-events: none;
  z-index: 0;
  will-change: transform;
}

/* 压感：按下略缩并暂停呼吸（扫光照旧跑，避免"停住"的突兀感） */
.leadClaimBtn:active {
  transform: scale(.985);
  animation-play-state: paused;
}

.leadClaimBtn:active .leadClaimText {
  animation-play-state: paused;
}

@keyframes leadSweep {
  0% {
    transform: translateX(-160%);
  }
  100% {
    transform: translateX(320%);
  }
}

/* 按钮本体呼吸：整颗按钮轻微放大 + 同步外发光 */
@keyframes leadBreath {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 rgba(255, 255, 255, 0);
  }
  50% {
    transform: scale(1.012);
    box-shadow: 0 0 .48rem rgba(255, 255, 255, .42);
  }
}

/* 终态 / 提交中：只换底色，扫光/呼吸继续（不靠状态关动画） */
.leadClaimBtn[data-state="loading"],
.leadClaimBtn[data-state="success"],
.leadClaimBtn[data-state="failed"] {
  background: hsla(0, 0%, 100%, .12);
  color: hsla(0, 0%, 100%, .6);
  cursor: default;
}

/* 动效敏感用户：扫光与呼吸全部关掉 */
@media (prefers-reduced-motion: reduce) {
  .leadClaimBtn,
  .leadClaimBtn .leadClaimText,
  .leadClaimBtn::after {
    animation: none !important;
  }
  .leadClaimBtn::after {
    content: none;
  }
  .leadClaimBtn:active {
    transform: none;
  }
}

/* 蜜罐字段：视觉不可见、不占位、不被 Tab 到 */
.leadHoneypot {
  position: absolute !important;
  left: -9999rem;
  top: -9999rem;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}

.leadTip {
  margin: .16rem 0 0;
  padding: 0 .16rem;
  min-height: .4rem;
  font-size: .24rem;
  line-height: .34rem;
  font-weight: 400;
  color: hsla(0, 0%, 100%, .6);
  text-align: center;
  word-break: break-all;
}

.leadTip[data-kind="ok"] {
  color: hsla(0, 0%, 100%, .8);
}

.leadTip[data-kind="warn"] {
  color: hsla(0, 0%, 100%, .6);
}

.leadTip[data-kind="error"] {
  color: #ff6b6b;
}

/* ==========================================================================
   导航接回：本快照把 <button> 换成 <a> 后所需的最小覆盖（追加段）
   --------------------------------------------------------------------------
   用途 1：.openButton-RMKkaI / .iconBtn-jMp3Ws 由 <button> 改为 <a>，
           UA 给 <a> 的链接色与下划线必须抵消，保持与改前 button 完全一致的呈现
           （实测改前 .openButton-RMKkaI: background #fff, color rgb(0,0,0),
             border-radius 14.56px, height 29.1094px）。
   用途 2：作品卡 .card-coLMkP、banner 角标 .bannerMark-YSYvSj 在原站由 JS 打开详情，
           本快照未实现该逻辑，显式声明 cursor:default，避免"看起来能点却没反应"。
   用途 3：分享兜底提示（navigator.share 不可用 → 复制链接后提示），仅本页内联脚本使用。
   注：不修改官方 challenge-activity-detail.ef6d582f.css，全部覆盖集中在本段。
   ========================================================================== */
a.openButton-RMKkaI,
a.iconBtn-jMp3Ws {
  text-decoration: none;
}

a.openButton-RMKkaI {
  color: #000;
}

a.iconBtn-jMp3Ws {
  color: #fff;
}

.card-coLMkP,
.bannerMark-YSYvSj {
  cursor: default;
}

.navToast {
  position: fixed;
  left: 50%;
  bottom: 1.6rem;
  transform: translateX(-50%);
  z-index: 99;
  max-width: 5.6rem;
  padding: .12rem .24rem;
  border-radius: .12rem;
  background: rgba(0, 0, 0, .78);
  color: #fff;
  font-size: .24rem;
  line-height: .36rem;
  text-align: center;
  opacity: 0;
  transition: opacity .2s ease;
  pointer-events: none;
}

.navToast.is-show {
  opacity: 1;
}
