/* ==========================================================================
   粒粒满 · 公众号爆文系统  |  gate.css
   激活页（兑换码入口）样式 —— 复用 style.css 的令牌与基础组件
   ========================================================================== */

.auth {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.06fr .94fr;
}

/* ---------------- 左：品牌区 ---------------- */
.auth-brand {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 52px 56px 40px;
  color: #fff;
  background: linear-gradient(148deg, #1E1650 0%, #3A2C9E 44%, #2A6FE0 100%);
}
.auth-brand::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .055) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(120% 90% at 15% 5%, #000 30%, transparent 78%);
}
.auth-brand::after {
  content: "";
  position: absolute;
  width: 620px; height: 620px;
  right: -220px; bottom: -260px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .22), transparent 62%);
  pointer-events: none;
}

.ab-top { position: relative; display: flex; align-items: center; gap: 12px; }
.ab-mark {
  width: 42px; height: 42px; flex: none;
  border-radius: 13px;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .28);
  display: grid; place-items: center;
  font-size: 19px; font-weight: 700;
  backdrop-filter: blur(6px);
}
.ab-name { font-size: 15px; font-weight: 600; letter-spacing: .2px; }
.ab-name span { display: block; font-size: 11px; opacity: .62; letter-spacing: 1px; font-weight: 400; }

.ab-mid { position: relative; margin: auto 0; max-width: 560px; }
.ab-mid h1 {
  font-size: 40px; line-height: 1.28; font-weight: 700;
  letter-spacing: -.8px;
}
.ab-mid h1 em {
  font-style: normal;
  background: linear-gradient(100deg, #B9C4FF, #8FE3FF);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.ab-mid > p {
  margin-top: 16px;
  font-size: 15px; line-height: 1.8;
  color: rgba(255, 255, 255, .72);
  max-width: 40ch;
}
.ab-list {
  list-style: none; padding: 0;
  margin: 32px 0 0;
  display: flex; flex-direction: column; gap: 14px;
}
.ab-list li {
  display: flex; align-items: flex-start; gap: 11px;
  font-size: 14px; color: rgba(255, 255, 255, .88);
  line-height: 1.6;
}
.ab-list .dot {
  width: 22px; height: 22px; flex: none;
  border-radius: 7px;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .22);
  display: grid; place-items: center;
  margin-top: 1px;
}
.ab-list .dot svg { width: 13px; height: 13px; }

.ab-stats {
  position: relative;
  display: flex; gap: 34px; flex-wrap: wrap;
  padding-top: 30px;
  margin-top: 34px;
  border-top: 1px solid rgba(255, 255, 255, .16);
}
.ab-stats div strong {
  display: block;
  font-size: 24px; font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.4px;
}
.ab-stats div span { font-size: 12px; color: rgba(255, 255, 255, .6); }

.ab-foot {
  position: relative;
  margin-top: 30px;
  font-size: 12px;
  color: rgba(255, 255, 255, .5);
}

/* ---------------- 右：表单区 ---------------- */
.auth-panel {
  display: grid; place-items: center;
  padding: 44px 24px;
  background: var(--bg);
}
.auth-card { width: 100%; max-width: 404px; }

.ac-head { margin-bottom: 22px; }
.ac-head h2 {
  font-size: 27px; font-weight: 700;
  letter-spacing: -.5px;
}
.ac-head p { font-size: 14px; color: var(--text-3); margin-top: 6px; line-height: 1.6; }

.auth-tabs {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  background: var(--surface-3);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  margin-bottom: 22px;
}
.auth-tabs button {
  position: relative;
  height: 36px;
  border: 0; background: transparent;
  border-radius: var(--r-1);
  color: var(--text-2);
  font-size: 14px; font-weight: 500;
  cursor: pointer;
  transition: all var(--e-1);
}
.auth-tabs button:hover { color: var(--text); }
.auth-tabs button.on {
  background: var(--surface);
  color: var(--brand);
  font-weight: 600;
  box-shadow: var(--sh-1);
}
.auth-tabs button .tab-soon {
  display: inline-block;
  margin-left: 5px;
  padding: 1px 5px;
  font-size: 10px; font-weight: 600;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--text-4, var(--text-3));
  vertical-align: 1px;
}
.auth-tabs button.on .tab-soon { background: var(--brand-s); color: var(--brand); }

.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-form .field { gap: 7px; }

.btn-main { height: 46px; font-size: 15px; font-weight: 600; border-radius: var(--r-2); }

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- 兑换码输入 ---------------- */
.code-box {
  display: flex; align-items: center;
  height: 52px;
  padding: 0 6px 0 5px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  transition: border-color var(--e-1), box-shadow var(--e-1);
}
.code-box:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-s);
}
.code-box.err { border-color: var(--hot); box-shadow: 0 0 0 3px color-mix(in srgb, var(--hot) 14%, transparent); }

.code-box .pfx {
  flex: none;
  margin-right: 6px;
  padding: 0 9px;
  height: 34px;
  display: grid; place-items: center;
  border-radius: var(--r-1);
  background: var(--brand-s);
  color: var(--brand);
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 14px; font-weight: 700;
  letter-spacing: .5px;
}
.code-box .divide { flex: none; width: 1px; height: 22px; background: var(--line); margin-right: 10px; }
.code-box input {
  flex: 1 1 auto; min-width: 0;
  height: 46px;
  border: 0; outline: 0; background: transparent;
  color: var(--text);
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 17px; font-weight: 600;
  letter-spacing: 1.6px;
}
.code-box input::placeholder { color: var(--text-4, var(--text-3)); opacity: .6; letter-spacing: 1px; font-weight: 500; }

.hint.err-txt { color: var(--hot); }
.hint.ok-txt { color: var(--ok, #12A150); }

/* ---------------- 已激活状态卡 ---------------- */
.lic-card {
  padding: 18px 18px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  background: linear-gradient(180deg, var(--brand-s), transparent 78%), var(--surface);
}
.lic-top { display: flex; align-items: center; gap: 11px; }
.lic-badge {
  width: 40px; height: 40px; flex: none;
  border-radius: 12px;
  display: grid; place-items: center;
  background: var(--brand);
  color: #fff;
  font-size: 16px; font-weight: 700;
}
.lic-top h3 { font-size: 17px; font-weight: 700; letter-spacing: -.2px; }
.lic-top p { font-size: 12.5px; color: var(--text-3); margin-top: 3px; }

.lic-rows {
  margin-top: 15px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  display: flex; flex-direction: column; gap: 9px;
}
.lic-rows div { display: flex; justify-content: space-between; gap: 14px; font-size: 13px; }
.lic-rows div span:first-child { color: var(--text-3); flex: none; }
.lic-rows div span:last-child {
  color: var(--text); font-weight: 600;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 12.5px;
  overflow-wrap: anywhere; text-align: right;
}
.lic-rows div.warn span:last-child { color: var(--warn); }
.lic-rows div.hot span:last-child { color: var(--hot); }

.lic-acts { display: flex; gap: 10px; margin-top: 16px; }
.lic-acts .btn { flex: 1 1 0; }

/* 带按钮的提示条 */
.note {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 10px 13px;
  background: var(--warn-s);
  color: var(--warn);
  border-radius: var(--r-2);
  font-size: 12.5px; line-height: 1.6;
}
.note svg { width: 15px; height: 15px; flex: none; margin-top: 2px; }
.note a { color: var(--warn); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.note b { font-weight: 600; }
.note.calm { background: var(--surface-3); color: var(--text-3); }

.ac-foot {
  margin-top: 22px; padding-top: 18px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 13px; color: var(--text-3);
}
.ac-foot a { font-weight: 600; }

/* ---------------- 微信扫码（预留） ---------------- */
.qr-pane { display: none; flex-direction: column; align-items: center; gap: 14px; }
.qr-pane.on { display: flex; }
.qr-box {
  position: relative;
  width: 208px; height: 208px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  box-shadow: var(--sh-2);
}
.qr-grid {
  width: 100%; height: 100%;
  display: grid;
  grid-template-columns: repeat(25, 1fr);
  grid-template-rows: repeat(25, 1fr);
}
.qr-grid i { background: transparent; }
.qr-grid i.b { background: #14161F; }
.qr-box.locked .qr-grid { opacity: .3; filter: grayscale(1); }
.qr-scan {
  position: absolute; left: 12px; right: 12px; height: 2px;
  background: linear-gradient(90deg, transparent, #4C5BF0, transparent);
  animation: scan 2.6s ease-in-out infinite;
}
@keyframes scan {
  0%, 100% { top: 16px; opacity: .3; }
  50% { top: 190px; opacity: 1; }
}
.qr-lock {
  position: absolute; inset: 12px;
  display: grid; place-items: center;
  border-radius: var(--r-2);
  background: rgba(20, 22, 31, .06);
  backdrop-filter: blur(1.5px);
  color: #14161F;
  font-size: 13px; font-weight: 700;
  letter-spacing: .5px;
}
.qr-box.locked .qr-scan { display: none; }
.qr-tip { font-size: 13px; color: var(--text-3); text-align: center; line-height: 1.7; }
.qr-tip b { color: var(--text); font-weight: 600; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 980px) {
  .auth { grid-template-columns: 1fr; }
  .auth-brand { padding: 30px 24px 26px; }
  .ab-mid { margin: 22px 0 0; }
  .ab-mid h1 { font-size: 27px; }
  .ab-mid > p { font-size: 14px; margin-top: 12px; }
  .ab-list { display: none; }
  .ab-stats { gap: 24px; padding-top: 20px; margin-top: 22px; }
  .ab-stats div strong { font-size: 19px; }
  .ab-foot { margin-top: 18px; }
  .auth-panel { padding: 30px 20px 44px; }
  .ac-head h2 { font-size: 23px; }
}

@media (max-width: 420px) {
  .auth-brand { padding: 24px 20px 22px; }
  .ab-mid h1 { font-size: 23px; }
  .ab-stats { gap: 18px; }
  .ab-stats div strong { font-size: 17px; }
  .ab-stats div span { font-size: 11px; }
  .qr-box { width: 176px; height: 176px; }
  .code-box input { font-size: 16px; letter-spacing: 1px; }
}
