/* ==================================================================
   AuthLink 门户样式 · v1.1.4 双主题（portal.css）
   ------------------------------------------------------------------
   站长要求（v1.1.4）：
   · 不要蓝黑配色 —— 两套主题都是浅色底；
   · 「毛玻璃」与「苹果风」可自由切换（topbar 的「外观」按钮，
     localStorage['authlink_theme'] 持久化，head 内联脚本防闪烁）；
   · 主页 = 左信息 + 右登录框；用户中心独立成页（user.html）。
   主题机制：所有颜色/阴影/模糊走令牌，html[data-theme] 切换，
   组件规则只引用令牌 —— 新增第三套主题只需再加一组令牌。
   无障碍：prefers-reduced-motion 全站降级（见文末）。
   ================================================================== */

/* ---------- 主题令牌 ---------- */
:root[data-theme="glass"] {
  --bg: #f4f2ec;               /* 暖米白，非蓝黑 */
  --bg-grad: radial-gradient(1200px 800px at 85% -10%, rgba(20, 184, 166, .12), transparent 60%),
             radial-gradient(1000px 700px at -10% 30%, rgba(240, 170, 110, .14), transparent 60%),
             radial-gradient(900px 900px at 50% 110%, rgba(180, 150, 220, .1), transparent 60%);
  --ink: #22302c;              /* 主文字：深青灰 */
  --ink-2: #5c6b66;            /* 次级文字 */
  --ink-3: #93a09a;            /* 弱文字 / 占位 */
  --card: rgba(255, 255, 255, .58);
  --card-strong: rgba(255, 255, 255, .82);
  --card-blur: blur(20px) saturate(160%);
  --line: rgba(34, 48, 44, .1);
  --line-strong: rgba(34, 48, 44, .18);
  --accent: #0d9488;           /* 青绿主色（避蓝） */
  --accent-2: #14b8a6;
  --accent-soft: rgba(20, 184, 166, .12);
  --accent-ink: #ffffff;
  --danger: #d9553b;
  --ok: #2f9e5f;
  --shadow: 0 24px 60px -28px rgba(34, 48, 44, .3);
  --shadow-sm: 0 8px 24px -14px rgba(34, 48, 44, .22);
  --radius: 20px;
  --radius-sm: 12px;
  --nav-bg: rgba(255, 255, 255, .55);
}
:root[data-theme="apple"] {
  --bg: #f5f5f7;               /* 苹果灰白 */
  --bg-grad: none;
  --ink: #1d1d1f;
  --ink-2: #6e6e73;
  --ink-3: #a1a1a6;
  --card: #ffffff;             /* 实心白卡，不要模糊 */
  --card-strong: #ffffff;
  --card-blur: none;
  --line: rgba(0, 0, 0, .08);
  --line-strong: rgba(0, 0, 0, .16);
  --accent: #0d9488;
  --accent-2: #10a599;
  --accent-soft: rgba(16, 165, 153, .1);
  --accent-ink: #ffffff;
  --danger: #e0442a;
  --ok: #34c759;
  --shadow: 0 4px 22px rgba(0, 0, 0, .08);
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, .06);
  --radius: 18px;
  --radius-sm: 10px;
  --nav-bg: rgba(255, 255, 255, .8);
}

/* ---------- 基础 ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { overflow-x: clip; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
               "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  overflow-x: clip;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  transition: background-color .35s ease, color .35s ease;
}
body::before {                       /* 主题底色渐层（苹果风为 none） */
  content: "";
  position: fixed;
  inset: 0;
  background: var(--bg-grad);
  z-index: 0;
  pointer-events: none;
}
a { color: var(--accent); text-decoration: none; }
code, .mono {
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .92em;
}
.hidden { display: none !important; }

/* ---------- 背景层 ---------- */
#bg-net { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.aurora { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.aurora i {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .5;
  animation: auroraDrift 26s ease-in-out infinite alternate;
}
.aurora .a1 { width: 46vw; height: 46vw; left: -12vw; top: -14vw; background: rgba(20, 184, 166, .32); }
.aurora .a2 { width: 38vw; height: 38vw; right: -10vw; top: 18vh; background: rgba(244, 162, 97, .26); animation-name: auroraDrift2; animation-duration: 32s; }
.aurora .a3 { width: 42vw; height: 42vw; left: 26vw; bottom: -22vw; background: rgba(178, 148, 224, .22); animation-name: auroraDrift1; animation-duration: 38s; }
@keyframes auroraDrift { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(6vw, 4vh, 0) scale(1.15); } }
@keyframes auroraDrift1 { from { transform: translate3d(0, 0, 0) scale(1.1); } to { transform: translate3d(-5vw, -4vh, 0) scale(.95); } }
@keyframes auroraDrift2 { from { transform: translate3d(0, 0, 0) scale(.95); } to { transform: translate3d(-4vw, 6vh, 0) scale(1.12); } }

/* 苹果风：去掉粒子与色斑，回归干净灰白 */
:root[data-theme="apple"] #bg-net,
:root[data-theme="apple"] .aurora { display: none; }

/* v1.5.4：主页专属「科技网格」底纹（glass 专属，apple 保持干净灰白）——
   两层 1px 线性渐变画出 44px 方格，再用径向 mask 让它只在中上区域浮现，
   与粒子网络叠加出「坐标系」的空间感；纯装饰、pointer-events:none。 */
body.page-home::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(13, 148, 136, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(13, 148, 136, .05) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(900px 620px at 30% 18%, #000 30%, transparent 75%);
  mask-image: radial-gradient(900px 620px at 30% 18%, #000 30%, transparent 75%);
}
:root[data-theme="apple"] body.page-home::after { display: none; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--nav-bg);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border-bottom: 1px solid var(--line);
}
:root[data-theme="apple"] .topbar { backdrop-filter: none; -webkit-backdrop-filter: none; }
.topbar-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.brand-name { font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.brand-sub {
  font-style: normal;
  font-size: 12px;
  color: var(--ink-3);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 10px;
}
.topnav { display: flex; align-items: center; gap: 8px; }
.topnav > a {
  position: relative;
  color: var(--ink-2);
  font-size: 14px;
  padding: 7px 14px;
  border-radius: 999px;
  transition: color .2s, background-color .2s;
}
.topnav > a:hover { color: var(--ink); background: var(--accent-soft); }
/* v1.5.4：导航链接底部滑入主色短线（悬停动效语言与按钮流光一致） */
.topnav > a::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s ease;
}
.topnav > a:hover::after { transform: scaleX(1); }

/* ---------- 按钮（v1.5.3：三档层次 + 动效，与管理端 v1.5.1 同规） ----------
   .btn-primary  渐变实底 + 悬停上浮 + 流光扫过（每张卡只有一颗主操作）；
   .btn-ghost    卡片底 + 描边次级，悬停描边染色 + 上浮。
   动效统一走 transform / box-shadow（不触发重排）；prefers-reduced-motion 整体降级。 */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  appearance: none;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 22px;
  cursor: pointer;
  user-select: none;
  transition: transform .18s cubic-bezier(.2, .8, .3, 1.2), box-shadow .2s ease,
              background-color .2s, border-color .2s, color .2s;
}
.btn:active { transform: translateY(1px) scale(.98); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn:disabled, .btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-primary {
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: var(--accent-ink);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
/* 主按钮流光：悬停时一道高光从左扫到右一次（transform 实现，不触发重排） */
.btn-primary::after {
  content: '';
  position: absolute;
  top: -20%;
  bottom: -20%;
  left: -45%;
  width: 34%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .38), transparent);
  transform: skewX(-18deg);
  transition: left .5s ease;
  pointer-events: none;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px -10px rgba(13, 148, 136, .55);
}
.btn-primary:hover::after { left: 125%; }
.btn-primary:disabled, .btn-primary[disabled] { opacity: .6; cursor: wait; transform: none; }
.btn-primary:disabled::after, .btn-primary[disabled]::after { display: none; }
.btn-ghost {
  background: var(--card);
  color: var(--ink-2);
  border-color: var(--line);
}
.btn-ghost:hover {
  color: var(--ink);
  border-color: var(--line-strong);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.btn-block { width: 100%; }
.btn-theme { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }

/* ---------- 页面骨架 ---------- */
.page {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 48px 24px 64px;
  flex: 1;
}
.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, .9fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
  min-height: calc(100vh - 220px);
}

/* ---------- 左：产品信息（v1.5.4 改版：科技感 + 大气） ---------- */
/* kicker 改「终端胶囊」：等宽字 + 呼吸状态点（系统在线的心跳隐喻） */
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  color: var(--accent);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 15px;
  margin-bottom: 20px;
  backdrop-filter: var(--card-blur);
  -webkit-backdrop-filter: var(--card-blur);
}
.kicker-dot {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: kickerPulse 2.2s ease-out infinite;
}
@keyframes kickerPulse {
  0%   { box-shadow: 0 0 0 0 rgba(13, 148, 136, .45); }
  70%  { box-shadow: 0 0 0 9px rgba(13, 148, 136, 0); }
  100% { box-shadow: 0 0 0 0 rgba(13, 148, 136, 0); }
}
.hero h1 {
  font-size: clamp(32px, 4.2vw, 50px);
  line-height: 1.12;
  letter-spacing: -.028em;
  font-weight: 800;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(120deg, var(--accent-2), var(--accent) 55%, #b0895a);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: emFlow 6s ease-in-out infinite alternate;
}
@keyframes emFlow { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }
.hero-sub {
  margin-top: 18px;
  font-size: 15.5px;
  line-height: 1.75;
  color: var(--ink-2);
  max-width: 46ch;
}
/* 凭据芯片：一行等宽小字 + 闪烁光标 —— 把「加密凭据」变成看得见的东西 */
.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  font-size: 12px;
  color: var(--ink-2);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
}
.hero-chip i {
  font-style: normal;
  color: var(--accent);
  animation: caretBlink 1.1s steps(1) infinite;
}
@keyframes caretBlink { 50% { opacity: 0; } }
.hero-steps {
  list-style: none;
  margin: 30px 0 6px;
  display: grid;
  gap: 10px;
}
.hero-steps li {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 13px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  backdrop-filter: var(--card-blur);
  -webkit-backdrop-filter: var(--card-blur);
  /* v1.5.4：悬停右移 + 主色描边 —— 「这一步是活的」 */
  transition: transform .18s cubic-bezier(.2, .8, .3, 1.2), border-color .2s, box-shadow .2s;
}
.hero-steps li:hover {
  transform: translateX(4px);
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
}
.hero-steps b { flex: 0 0 auto; font-size: 14.5px; color: var(--accent); }
.hero-steps span { font-size: 13.5px; color: var(--ink-2); }
.hero-feats {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
/* v1.3.0：主页 hero 的「对接教程」入口 */
.hero-cta {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.hero-cta-note { font-size: 12.5px; color: var(--ink-3); }
.feat {
  position: relative;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--card);
  backdrop-filter: var(--card-blur);
  -webkit-backdrop-filter: var(--card-blur);
  display: grid;
  gap: 4px;
  overflow: hidden;
  /* v1.5.4：悬停上浮 + 顶部主色发丝线点亮（科技感边角语言） */
  transition: transform .18s cubic-bezier(.2, .8, .3, 1.2), border-color .2s, box-shadow .2s;
}
.feat::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-2), transparent 70%);
  opacity: 0;
  transition: opacity .2s;
}
.feat:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
}
.feat:hover::before { opacity: 1; }
.feat-ico { font-size: 20px; }
.feat strong { font-size: 13.5px; }
.feat span { font-size: 12.5px; line-height: 1.55; color: var(--ink-2); }

/* ---------- 右：登录卡 ---------- */
.auth-card {
  position: relative;
  overflow: hidden;
  background: var(--card-strong);
  backdrop-filter: var(--card-blur);
  -webkit-backdrop-filter: var(--card-blur);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px 28px 26px;
  animation: fadeUp .6s ease both;
}
/* v1.5.4：卡顶主色渐变发丝线 —— 与 .feat 的悬停 hairline 同一科技感语言 */
.auth-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-2), var(--accent), transparent 80%);
}
.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 5px;
  margin-bottom: 24px;
}
.tab {
  appearance: none;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
  padding: 9px 0;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color .2s, color .2s, box-shadow .2s;
}
.tab:hover { color: var(--ink); }
.tab.is-active {
  background: var(--card-strong);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.auth-form { display: grid; gap: 16px; }
.field { display: grid; gap: 7px; }
.field span { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field input {
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.field input::placeholder { color: var(--ink-3); }
.field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.form-hint { font-size: 12.5px; line-height: 1.7; color: var(--ink-3); }
/* v1.1.4 注册验证码：输入框 + 可点击刷新的 SVG 图片 */
.captcha-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: stretch; }
.captcha-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--card);
  overflow: hidden;
  cursor: pointer;
  min-width: 118px;
  min-height: 46px;
  transition: border-color .2s;
}
.captcha-box:hover { border-color: var(--accent); }
.captcha-box svg { display: block; }
.captcha-loading { font-style: normal; font-size: 12px; color: var(--ink-3); padding: 0 10px; }

/* v1.3.0：邮箱验证码行（输入框 + 获取验证码按钮），与 .captcha-row 同构 */
.code-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: stretch; }
.code-btn { white-space: nowrap; padding: 0 15px; min-height: 46px; }
.code-btn:disabled { opacity: .62; cursor: not-allowed; }
.form-msg {
  margin-top: 14px;
  font-size: 13.5px;
  color: var(--danger);
  text-align: center;
}
.form-msg.is-ok { color: var(--ok); }

/* ---------- 用户中心 ---------- */
.portal-card {
  background: var(--card-strong);
  backdrop-filter: var(--card-blur);
  -webkit-backdrop-filter: var(--card-blur);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px 30px 28px;
  animation: fadeUp .5s ease both;
}
.portal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}
.portal-head h2 { font-size: 22px; letter-spacing: -.02em; }
.portal-sub { margin-top: 6px; font-size: 13.5px; color: var(--ink-2); }
.portal-quota {
  font-size: 13px;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 6px 14px;
  white-space: nowrap;
}
/* v1.5.1：我的授权码卡重排 —— 旧版 .portal-grid 左表单(380px) 右表格两列布局
   把 6 列表格挤得授权码 / 日期全部折行（站长截图反馈）。改为纵向流：
   领取表单横向成条 → 提示 → 表格占满整卡宽度；窄屏自然折行。 */
.portal-side { min-width: 0; }
/* v1.5.3：领取条三件（分段控件 / 输入框 / 按钮）**等高对齐** ——
   align-items:stretch 让三者取同一行高（输入框最高、其余跟着撑满），
   解决旧版「按域名」折成两行、控件高矮不一的不协调。 */
.claim-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 10px;
}
.claim-bar .claim-mode { margin-bottom: 0; flex: none; }
.claim-bar input[type="text"] {
  flex: 1 1 240px;
  min-width: 0;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.claim-bar input[type="text"]::placeholder { color: var(--ink-3); }
.claim-bar input[type="text"]:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.claim-bar .btn { flex: none; }
.portal-side .form-hint { margin-top: 10px; }
.panel-title { font-size: 15px; margin-bottom: 14px; }
/* v1.5.3：领取方式改「分段控件」—— 一条圆角容器 + 两枚等宽分段，
   选中段浮起（与登录卡 .tabs 同一视觉语言）；文字绝不折行。
   单选点隐藏（选中态由「浮起的段」表达，不再出现挤在一旁的小圆圈），
   键盘焦点落在段上描环（:has(input:focus-visible)）。 */
.claim-mode {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  padding: 4px;
  background: var(--accent-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.claim-mode-item {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-2);
  background: transparent;
  border: 0;
  border-radius: 999px;
  padding: 8px 16px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .2s, color .2s, box-shadow .2s;
}
.claim-mode-item:has(input:checked) {
  background: var(--card-strong);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.claim-mode-item input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.claim-mode-item:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.claim-row { display: grid; gap: 10px; }
.claim-row input {
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  outline: none;
  width: 100%;
  transition: border-color .2s, box-shadow .2s;
}
.claim-row input::placeholder { color: var(--ink-3); }
.claim-row input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.claim-result {
  margin-top: 16px;
  border: 1px dashed var(--accent);
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  padding: 14px;
}
.claim-result-head { font-size: 13.5px; font-weight: 600; margin-bottom: 10px; }
.claim-code-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.claim-code-row .mono {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .04em;
  word-break: break-all;
}

/* ---------- 授权码表格 ---------- */
.table-scroll { overflow-x: auto; }
/* v1.5.1：表格不再被压 —— 给最小宽度，列排得下就铺满，排不下横向滚
   （旧版列被压到授权码 / 时间全部折行）。空态行同宽，横向滚动属预期。 */
.data-table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 13.5px; }
.data-table td .mono { word-break: break-all; }
.data-table th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  color: var(--ink-3);
  border-bottom: 1px solid var(--line-strong);
  padding: 8px 12px;
  white-space: nowrap;
}
.data-table td {
  border-bottom: 1px solid var(--line);
  padding: 12px;
  vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr { transition: background-color .15s; }
.data-table tbody tr:hover { background: var(--accent-soft); }
.table-empty { text-align: center; color: var(--ink-3); padding: 28px 12px !important; }
.badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
}
.badge-on { color: var(--ok); background: rgba(47, 158, 95, .12); }
.badge-bad { color: var(--danger); background: rgba(217, 85, 59, .12); }
.badge-off { color: var(--ink-3); background: var(--accent-soft); }
.badge-warn { color: #b07f2e; background: rgba(176, 127, 46, .14); }
/* v1.5.1：未绑定授权码的「待激活」弱化文案 */
.bind-dim { color: var(--ink-3); font-size: 12.5px; }
/* v1.5.2 补：表格「操作」列 + 「继续支付」按钮
   ⚠ 顺手修的样式缺失 —— portal.js 用的是 .cell-dim，而这里此前只定义了 .bind-dim
   ⇒ v1.5.1 的「未绑定（激活时绑定）」一直是默认色（不是弱化灰）。
   两个类名都留着（老代码仍引用 .bind-dim），新代码统一用 .cell-dim。
   按钮沿用全站 .btn 圆角胶囊体系，只缩小内边距。 */
.cell-dim { color: var(--ink-3); font-size: 12.5px; }
.btn-sm { padding: 6px 15px; font-size: 12.5px; }
.data-table td.order-acts { white-space: nowrap; }
.order-repay { font-weight: 600; }
.order-repay:disabled { opacity: .6; cursor: default; }

/* ---------- 购买授权码 / 我的订单（v1.5.0） ----------
   用户中心现在是三张卡：我的授权码 → 购买授权码 → 我的订单。
   卡片之间用相邻兄弟选择器给间距（.page 本身不是 grid，没有 gap）。 */
.portal-card + .portal-card { margin-top: 24px; }

.portal-meta {
  margin-top: 10px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--ink-3);
}
.portal-meta b { color: var(--ink-2); font-weight: 600; }

/* v1.5.3：align-items:center —— 左（表单）右（步骤）两栏高度差较大时居中对齐，
   视觉重心一致；窄屏折行后不受影响。 */
.buy-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 380px);
  gap: 28px;
  align-items: center;
}
.buy-form { min-width: 0; }
/* v1.5.3：主行动按钮放大一档（卡片级 CTA），与右侧步骤面板形成明确主次；
   说明文案去重（buy-desc 与卡片头 sub 重复，已删，细节留在 #buy-hint）。 */
.buy-form .btn-primary {
  padding: 12px 30px;
  font-size: 15px;
}
.buy-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
#buy-price { font-weight: 700; }
.buy-form .form-hint { margin-top: 12px; }

/* 右侧流程说明：与左侧表单并列，不用列表符号而用圆形序号（更整齐） */
.buy-steps {
  list-style: none;
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 18px 20px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
}
.buy-steps li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-2);
}
.buy-steps b {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--accent-ink);
  background: var(--accent);
}

/* 订单状态徽章（复用 .badge，仅补两色） */
.badge-pending { color: #b07f2e; background: rgba(176, 127, 46, .14); }
.badge-done { color: var(--ok); background: rgba(47, 158, 95, .12); }
.badge-closed { color: var(--ink-3); background: var(--accent-soft); }

/* ---------- toast ---------- */
#toast-box {
  position: fixed;
  top: 74px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  display: grid;
  gap: 8px;
  justify-items: center;
}
.toast {
  font-size: 13.5px;
  color: var(--ink);
  background: var(--card-strong);
  backdrop-filter: var(--card-blur);
  -webkit-backdrop-filter: var(--card-blur);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 20px;
  box-shadow: var(--shadow);
  animation: fadeUp .3s ease both;
  transition: opacity .3s;
}
.toast.is-err { color: var(--danger); border-color: rgba(217, 85, 59, .4); }

/* ---------- 页脚 ---------- */
.foot {
  position: relative;
  z-index: 1;
  text-align: center;
  font-size: 12.5px;
  color: var(--ink-3);
  padding: 26px 16px 34px;
}

/* ---------- 动画 ---------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
  .home-grid { grid-template-columns: 1fr; align-items: start; min-height: 0; gap: 34px; }
  .hero-feats { grid-template-columns: 1fr; }
  .buy-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .topbar-inner { padding: 10px 14px; }
  .brand-sub { display: none; }
  .page { padding: 30px 16px 48px; }
  .auth-card, .portal-card { padding: 22px 18px; }
  .topnav { gap: 4px; }
  .topnav > a { padding: 7px 10px; }
  .theme-label { display: none; }
}

/* ---------- 减动效降级 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .aurora i { animation: none !important; }
  /* v1.5.3：按钮动效一并降级 —— 上浮 / 按压归零，流光整条撤掉 */
  .btn { transition: none; }
  .btn:hover, .btn-ghost:hover, .btn-primary:hover { transform: none; }
  .btn-primary::after { display: none; }
  /* v1.5.4：主页动效降级 —— 呼吸点 / 渐变流动 / 闪烁光标全停，悬停位移归零 */
  .kicker-dot, .hero-chip i, .hero h1 em { animation: none !important; }
  .hero-steps li:hover, .feat:hover { transform: none; }
  .topnav > a::after { transition: none; }
}
