/* ============================================================
   H5「WPS会员兑换页」UI 覆盖样式
   纯 CSS：不改 JS、不改业务、不改文案
   方向：WPS 官方产品感 + 现代 H5 + 简洁商务
   主色：白 / 浅灰 / 浅蓝；操作蓝 #315EFB；成功绿 #10B981；品牌红 Logo
   ============================================================ */

:root {
  --km-blue: #315EFB;
  --km-blue-2: #4F6EF5;
  --km-text: #111827;
  --km-body: #4B5563;
  --km-muted: #98A2B3;
  --km-line: #EEF1F6;
  --km-green: #10B981;
}

html, body {
  background: #FFFFFF !important;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif !important;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden !important;
}
body, .ant-app, .ant-app * {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif !important;
}

.ant-app > div {
  background: linear-gradient(180deg, #FFFFFF 0%, #F4F8FF 100%) !important;
  padding: 12px 12px calc(20px + env(safe-area-inset-bottom)) !important;
  min-height: 100vh !important;
  align-items: flex-start !important;
}

.ant-card {
  border-radius: 18px !important;
  background: #FFFFFF !important;
  border: 1px solid var(--km-line) !important;
  box-shadow: 0 10px 30px rgba(16, 24, 40, 0.06) !important;
  overflow: hidden !important;
}
.ant-card-body:has(> div:first-child h1) { padding: 0 !important; }

/* ---------- 顶部会员 Banner ---------- */
.ant-card-body > div:first-child {
  position: relative !important;
  overflow: hidden !important;
  min-height: 148px !important;
  padding: 24px 18px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  background: linear-gradient(135deg, #FFFFFF 0%, #F3F7FF 55%, #E9F1FF 100%) !important;
  border-bottom: 1px solid var(--km-line) !important;
}
.ant-card-body > div:first-child > div:first-child {
  background: radial-gradient(circle at 88% 12%, rgba(49, 94, 251, 0.10) 0%, rgba(49, 94, 251, 0.04) 38%, transparent 62%) !important;
  top: -30% !important;
  right: -20% !important;
  width: 120% !important;
  height: 160% !important;
}
.ant-card-body > div:first-child > div:nth-child(2) {
  position: absolute !important;
  right: 18px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 56px !important;
  height: 56px !important;
  margin: 0 !important;
  border-radius: 14px !important;
  background: #FFFFFF url("/assets/wps-logo.png") center / 34px 34px no-repeat !important;
  border: 1px solid var(--km-line) !important;
  box-shadow: 0 6px 18px rgba(16, 24, 40, 0.06) !important;
}
.ant-card-body > div:first-child > div:nth-child(2) .anticon,
.ant-card-body > div:first-child > div:nth-child(2) svg { display: none !important; }
.ant-card-body > div:first-child h1 {
  color: var(--km-text) !important;
  font-size: 21px !important;
  font-weight: 700 !important;
  letter-spacing: -0.2px !important;
  margin: 0 0 6px !important;
  padding-right: 76px !important;
  text-align: left !important;
}
.ant-card-body > div:first-child > div:last-child {
  color: #6B7280 !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  padding-right: 76px !important;
  text-align: left !important;
}

.ant-card-body > div:nth-child(2) { padding: 18px 16px 20px !important; }

/* ---------- 温馨提示 ---------- */
.ant-card-body > div:nth-child(2) > div:first-child:not(:has(> svg)) {
  background: #FFFFFF !important;
  border: 1px solid var(--km-line) !important;
  border-left: 3px solid var(--km-blue) !important;
  border-radius: 14px !important;
  box-shadow: 0 4px 14px rgba(16, 24, 40, 0.04) !important;
  padding: 14px 16px !important;
  color: var(--km-body) !important;
  font-size: 13.5px !important;
  line-height: 1.95 !important;
  white-space: pre-line !important;
}
.ant-card-body > div:nth-child(2) > div:first-child:not(:has(> svg))::first-line {
  font-weight: 700 !important;
  color: var(--km-text) !important;
}

/* ---------- 登录方式：分段控件 ---------- */
.ant-card-body > div:nth-child(2) > div:nth-child(2):has(> button) {
  background: #F2F4F7 !important;
  border-radius: 12px !important;
  padding: 4px !important;
  margin-bottom: 18px !important;
  display: flex !important;
  gap: 4px !important;
}
.ant-card-body > div:nth-child(2) > div:nth-child(2):has(> button) > button {
  border-radius: 10px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  padding: 10px 8px !important;
  transition: color .18s ease, background .18s ease, box-shadow .18s ease !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
}
.ant-card-body > div:nth-child(2) > div:nth-child(2):has(> button) > button[style*="rgb(255, 255, 255)"] {
  background: #FFFFFF !important;
  color: var(--km-blue) !important;
  font-weight: 600 !important;
  box-shadow: 0 2px 8px rgba(16, 24, 40, 0.08) !important;
  position: relative !important;
}
.ant-card-body > div:nth-child(2) > div:nth-child(2):has(> button) > button[style*="rgb(255, 255, 255)"]::after {
  content: "" !important;
  position: absolute !important;
  left: 50% !important;
  bottom: 3px !important;
  transform: translateX(-50%) !important;
  width: 20px !important;
  height: 2px !important;
  border-radius: 2px !important;
  background: var(--km-blue) !important;
}
.ant-card-body > div:nth-child(2) > div:nth-child(2):has(> button) > button[style*="transparent"] {
  background: transparent !important;
  color: #8B9BB4 !important;
  box-shadow: none !important;
}

/* ---------- 表单标签 / 输入框 ---------- */
.ant-card-body form > div[style*="font-weight: 600"] {
  color: var(--km-body) !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
}
.ant-input,
.ant-input-outlined,
.ant-input-affix-wrapper,
.ant-input-outlined.ant-input-lg {
  height: 54px !important;
  border-radius: 12px !important;
  background: #FFFFFF !important;
  border: 1px solid #E4E7EC !important;
  box-shadow: none !important;
  color: var(--km-text) !important;
  font-size: 15px !important;
  padding: 0 14px !important;
  min-width: 0 !important;
}
.ant-input::placeholder { color: var(--km-muted) !important; }
.ant-input:hover { border-color: #D6DBE5 !important; }
.ant-input:focus,
.ant-input-focused,
.ant-input-outlined:focus {
  border-color: var(--km-blue) !important;
  box-shadow: 0 0 0 3px rgba(49, 94, 251, 0.12) !important;
  background: #FFFFFF !important;
}
.ant-form-item { margin-bottom: 0 !important; }
.ant-form-item-row, .ant-form-item-control { min-width: 0 !important; }

/* ---------- 获取验证码 ---------- */
.ant-card-body button[style*="min-width: 96px"] {
  background: #FFFFFF !important;
  color: var(--km-blue) !important;
  border: 1px solid var(--km-blue) !important;
  border-radius: 12px !important;
  height: 54px !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  padding: 0 12px !important;
  box-shadow: none !important;
  white-space: nowrap !important;
}
.ant-card-body button[style*="min-width: 96px"]:disabled {
  background: #F7F9FC !important;
  color: var(--km-muted) !important;
  border-color: #E4E7EC !important;
}

/* ---------- 确认兑换 ---------- */
.ant-card-body button[style*="width: 100%"] {
  background: linear-gradient(135deg, var(--km-blue) 0%, var(--km-blue-2) 100%) !important;
  color: #FFFFFF !important;
  border: none !important;
  border-radius: 13px !important;
  height: 54px !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  letter-spacing: 0.3px !important;
  box-shadow: 0 8px 20px rgba(49, 94, 251, 0.24) !important;
  margin-top: 14px !important;
  transition: transform .12s ease, box-shadow .18s ease, opacity .18s ease !important;
}
.ant-card-body button[style*="width: 100%"]:active {
  transform: scale(0.98) !important;
  box-shadow: 0 4px 12px rgba(49, 94, 251, 0.20) !important;
}
.ant-card-body button[style*="width: 100%"]:disabled {
  background: linear-gradient(135deg, #A9BCFF 0%, #B9C6FF 100%) !important;
  box-shadow: none !important;
}

/* ---------- 微信扫码区 ---------- */
.ant-card-body > div:nth-child(2) > div > div:has(> img) {
  background: #FFFFFF !important;
  border: 1px solid var(--km-line) !important;
  border-radius: 18px !important;
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.06) !important;
  padding: 8px !important;
}
.ant-card-body > div:nth-child(2) > div > div:has(> img) > img {
  border-radius: 12px !important;
  display: block !important;
}
.ant-card-body > div:nth-child(2) > div:has(> img) button {
  background: #FFFFFF !important;
  color: var(--km-blue) !important;
  border: 1px solid #E4E7EC !important;
  border-radius: 12px !important;
  font-weight: 600 !important;
  box-shadow: none !important;
  height: 42px !important;
}
.ant-card-body > div:nth-child(2) > div:has(> img) button:hover { border-color: var(--km-blue) !important; }

/* ---------- 成功页：绿色实心圆 + 白色对号 ---------- */
.ant-card-body > div:nth-child(2) > div:first-child:has(> svg) {
  position: relative !important;
  width: 96px !important;
  height: 96px !important;
  margin: 4px auto 18px !important;
}
.ant-card-body > div:nth-child(2) > div:first-child:has(> svg) > svg { visibility: hidden !important; }
.ant-card-body > div:nth-child(2) > div:first-child:has(> svg)::before {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  border-radius: 50% !important;
  background: var(--km-green) !important;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.15) !important;
}
.ant-card-body > div:nth-child(2) > div:first-child:has(> svg)::after {
  content: "" !important;
  position: absolute !important;
  left: 50% !important;
  top: 46% !important;
  width: 30px !important;
  height: 15px !important;
  border-left: 6px solid #FFFFFF !important;
  border-bottom: 6px solid #FFFFFF !important;
  border-radius: 2px !important;
  transform: translate(-50%, -50%) rotate(-45deg) !important;
}
.ant-card-body > div:nth-child(2) > h2 {
  font-size: 30px !important;
  font-weight: 700 !important;
  color: var(--km-text) !important;
  margin: 0 0 8px !important;
  letter-spacing: -0.3px !important;
}
.ant-card-body > div:nth-child(2) > h2 + div {
  color: #667085 !important;
  font-size: 14px !important;
  margin-bottom: 18px !important;
}

/* ---------- 成功页信息卡 ---------- */
.ant-card-body > div:nth-child(2) > div:has(h4) {
  background: #FFFFFF !important;
  border: 1px solid var(--km-line) !important;
  border-radius: 16px !important;
  box-shadow: 0 6px 20px rgba(16, 24, 40, 0.05) !important;
  padding: 0 !important;
  overflow: hidden !important;
  margin-top: 4px !important;
}
.ant-card-body > div:nth-child(2) > div:has(h4) > div:first-child {
  padding: 16px !important;
  border-bottom: 1px solid #F2F4F7 !important;
  background: linear-gradient(180deg, #FBFDFF 0%, #FFFFFF 100%) !important;
}
.ant-card-body > div:nth-child(2) > div:has(h4) h4 {
  color: var(--km-text) !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  margin: 0 0 4px !important;
}
.ant-card-body > div:nth-child(2) > div:has(h4) img { border-radius: 16px !important; }
.ant-card-body > div:nth-child(2) > div:has(h4) > div:last-child > div {
  background: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  border-bottom: 1px solid #F2F4F7 !important;
  padding: 0 16px !important;
  height: 50px !important;
  margin: 0 !important;
}
.ant-card-body > div:nth-child(2) > div:has(h4) > div:last-child > div:last-child { border-bottom: none !important; }
.ant-card-body > div:nth-child(2) > div:has(h4) > div:last-child > div > span:first-child,
.ant-card-body > div:nth-child(2) > div:has(h4) > div:last-child > div > div > span:last-child {
  color: #6B7280 !important;
  font-size: 13.5px !important;
}
.ant-card-body > div:nth-child(2) > div:has(h4) > div:last-child > div > span:last-child {
  color: var(--km-text) !important;
  font-weight: 600 !important;
  font-size: 14px !important;
}
.ant-card-body > div:nth-child(2) > div:has(h4) > div:last-child > div:nth-child(2) > span:last-child {
  color: var(--km-green) !important;
}
.ant-card-body > div:nth-child(2) > div:has(h4) span[style*="rgb(230, 244, 255)"] {
  color: var(--km-blue) !important;
  border: 1px solid rgba(49, 94, 251, 0.16) !important;
}

/* ---------- 移动端与安全区 ---------- */
@media (max-width: 360px) {
  .ant-card-body > div:first-child { min-height: 138px !important; padding: 20px 14px !important; }
  .ant-card-body > div:first-child h1 { font-size: 19px !important; }
  .ant-card-body > div:nth-child(2) { padding: 16px 14px 18px !important; }
  .ant-card-body > div:first-child > div:nth-child(2) {
    width: 50px !important;
    height: 50px !important;
    right: 14px !important;
    background-size: 30px 30px !important;
  }
}

.ant-app, .ant-app > div, .ant-card, .ant-card-body { max-width: 100% !important; box-sizing: border-box !important; }
img, svg, input, button { max-width: 100% !important; }


/* ============================================================
   卡密校验失败页 —— 轻拟物 + WPS 官方产品感
   ============================================================ */

.ant-app > div:has(h3) {
  background:
    radial-gradient(760px 420px at 10% -8%, rgba(49, 94, 251, 0.06) 0%, rgba(49, 94, 251, 0) 60%),
    radial-gradient(640px 400px at 94% 106%, rgba(49, 94, 251, 0.05) 0%, rgba(49, 94, 251, 0) 58%),
    #F6F9FD !important;
  padding: 16px 12px calc(26px + env(safe-area-inset-bottom)) !important;
  align-items: flex-start !important;
}
.ant-card:has(h3) {
  border-radius: 22px !important;
  border: 1px solid rgba(220, 230, 242, 0.8) !important;
  box-shadow: 0 18px 40px rgba(70, 110, 180, 0.08) !important;
  animation: km-rise .45s ease both;
}
.ant-card-body:has(h3) {
  padding: 36px 22px 30px !important;
  text-align: center !important;
}

/* 轻拟物主视觉：中心 WPS Logo + 白色柔光圆 + 淡蓝椭圆轨道 + 右下红色错误圆 */
.ant-card-body:has(h3) > div:first-child {
  position: relative !important;
  width: 176px !important;
  height: 160px !important;
  margin: 0 auto 18px !important;
  animation: km-float 7s ease-in-out infinite;
}
/* 椭圆轨道（1~2 条，极淡）+ 少量装饰圆点 */
.ant-card-body:has(h3) > div:first-child::before {
  content: "" !important;
  position: absolute !important;
  left: 50% !important;
  top: 50% !important;
  width: 176px !important;
  height: 132px !important;
  transform: translate(-50%, -50%) !important;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 176 132'%3E%3Cg fill='none' stroke='rgb(80,130,240)' stroke-opacity='0.12' stroke-width='1.3'%3E%3Cellipse cx='88' cy='66' rx='84' ry='40' transform='rotate(-16 88 66)'/%3E%3Cellipse cx='88' cy='66' rx='68' ry='54' transform='rotate(14 88 66)'/%3E%3C/g%3E%3Ccircle cx='30' cy='44' r='3.2' fill='rgb(239,68,68)' fill-opacity='0.45'/%3E%3Ccircle cx='148' cy='90' r='2.6' fill='rgb(80,130,240)' fill-opacity='0.35'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: contain !important;
  pointer-events: none !important;
}
/* 中心柔光圆（白色玻璃球 + 极淡红色光晕）+ 红色 WPS 官方 Logo */
.ant-card-body:has(h3) > div:first-child > span.anticon {
  position: absolute !important;
  left: 50% !important;
  top: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: 118px !important;
  height: 118px !important;
  border-radius: 50% !important;
  background-color: #FFFFFF !important;
  background-image: url("/assets/wps-logo.png"), radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0) 50%, rgba(239, 68, 68, 0.04) 66%, rgba(239, 68, 68, 0.08) 82%, rgba(239, 68, 68, 0) 93%) !important;
  background-repeat: no-repeat !important;
  background-size: 60px 60px, cover !important;
  background-position: center, center !important;
  border: 1px solid rgba(255, 255, 255, 0.9) !important;
  box-shadow: 0 0 0 10px rgba(239, 68, 68, 0.04), 0 10px 28px rgba(70, 110, 180, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
  display: block !important;
  font-size: 0 !important;
}
.ant-card-body:has(h3) > div:first-child > span.anticon svg { display: none !important; }
/* 右下角红色错误圆 + 白色感叹号 */
.ant-card-body:has(h3) > div:first-child::after {
  content: "" !important;
  position: absolute !important;
  left: 50% !important;
  top: 50% !important;
  width: 50px !important;
  height: 50px !important;
  border-radius: 50% !important;
  background-color: #EF4444 !important;
  background-image: url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 4.2c1.15 0 2 .95 1.87 2.1l-.62 7.6a1.25 1.25 0 0 1-2.5 0l-.62-7.6c-.13-1.15.72-2.1 1.87-2.1Z' fill='%23ffffff'/><circle cx='12' cy='18.1' r='2.1' fill='%23ffffff'/></svg>") !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: 26px 26px !important;
  border: 3px solid #FFFFFF !important;
  box-shadow: 0 6px 16px rgba(239, 68, 68, 0.28) !important;
  transform: translate(24px, 24px) !important;
}

/* 标题与说明 */
.ant-card-body:has(h3) > h3 {
  font-size: 30px !important;
  font-weight: 700 !important;
  color: #111827 !important;
  margin: 0 0 10px !important;
  letter-spacing: -0.4px !important;
}
.ant-card-body:has(h3) > div:nth-child(3) {
  color: #667085 !important;
  font-size: 16px !important;
  line-height: 1.6 !important;
  margin-bottom: 24px !important;
}

/* 温馨提示卡 */
.ant-card-body:has(h3) > div:nth-child(4) {
  position: relative !important;
  background: #F8FAFD !important;
  border: 1px solid rgba(220, 230, 242, 0.8) !important;
  border-radius: 17px !important;
  box-shadow: 0 6px 20px rgba(50, 80, 120, 0.05) !important;
  padding: 16px 18px 16px 48px !important;
  text-align: left !important;
}
.ant-card-body:has(h3) > div:nth-child(4)::before {
  content: "" !important;
  position: absolute !important;
  left: 16px !important;
  top: 16px !important;
  width: 20px !important;
  height: 20px !important;
  border-radius: 50% !important;
  background-color: #E8EFFF !important;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 10.2c.7 0 1.2.5 1.2 1.2v5.4a1.2 1.2 0 0 1-2.4 0v-5.4c0-.7.5-1.2 1.2-1.2Z' fill='%23315EFB'/%3E%3Ccircle cx='12' cy='7.4' r='1.5' fill='%23315EFB'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: 12px 12px !important;
}
.ant-card-body:has(h3) > div:nth-child(4) span {
  color: #111827 !important;
  font-weight: 700 !important;
  font-size: 14px !important;
}
.ant-card-body:has(h3) > div:nth-child(4) div {
  color: #5B6B84 !important;
  font-size: 13.5px !important;
  line-height: 1.75 !important;
  margin-top: 8px !important;
}

/* 重新校验按钮 */
.ant-card-body:has(h3) > div:last-child { margin-top: 26px !important; }
.ant-card-body:has(h3) > div:last-child button {
  width: 100% !important;
  height: 54px !important;
  border-radius: 15px !important;
  background: linear-gradient(180deg, #3B66F5 0%, #315EFB 100%) !important;
  color: #FFFFFF !important;
  border: none !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  box-shadow: 0 8px 22px rgba(49, 94, 251, 0.18) !important;
  transition: transform .12s ease, box-shadow .18s ease !important;
}
.ant-card-body:has(h3) > div:last-child button .anticon,
.ant-card-body:has(h3) > div:last-child button svg { color: #FFFFFF !important; fill: #FFFFFF !important; }
.ant-card-body:has(h3) > div:last-child button:active {
  transform: scale(0.98) !important;
  box-shadow: 0 4px 12px rgba(49, 94, 251, 0.16) !important;
}

@keyframes km-rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
@keyframes km-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

@media (max-width: 360px) {
  .ant-card-body:has(h3) { padding: 30px 18px 26px !important; }
  .ant-card-body:has(h3) > h3 { font-size: 27px !important; }
  .ant-card-body:has(h3) > div:nth-child(3) { font-size: 15px !important; }
  .ant-card-body:has(h3) > div:nth-child(4) { padding: 15px 16px 15px 44px !important; }
}

/* PHASE48：统一充值前后卡片宽度 —— 修复充值成功后卡片被撑满整屏 */
.ant-card {
  width: 100% !important;
  max-width: 440px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
