/* 客户自助页 /customer/{卡密} —— 对齐参考系统（深色玻璃拟态） */
.cv-page, .cv-page * { box-sizing: border-box; }

.cv-page {
  background: #0b1020;   /* 老浏览器兜底（不支持渐变时至少是深色） */
  background:
    radial-gradient(880px 520px at 8% -4%, #409eff4d, #0000 62%),
    radial-gradient(760px 480px at 96% 100%, #7c5cff42, #0000 60%),
    linear-gradient(158deg, #070b16 0%, #121a33 48%, #070a15 100%);
  min-height: 100vh;
  padding: 16px 16px 36px;
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  position: relative;
  color: #fff;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ---------------- 背景装饰 ---------------- */
.cv-bg { pointer-events: none; position: absolute; inset: 0; overflow: hidden; }
.cv-grid {
  pointer-events: none;
  background-image: linear-gradient(#ffffff0d 1px, #0000 1px), linear-gradient(90deg, #ffffff0d 1px, #0000 1px);
  background-size: 48px 48px;
  position: absolute; inset: 0;
  -webkit-mask-image: radial-gradient(circle at 50% 30%, #000 0%, #0000 70%);
  mask-image: radial-gradient(circle at 50% 30%, #000 0%, #0000 70%);
}
.cv-orb {
  filter: blur(90px); pointer-events: none; border-radius: 50%;
  animation: cv-drift 12s ease-in-out infinite alternate;
  position: absolute;
}
.cv-orb-a { opacity: .46; background: radial-gradient(circle, #2f7bff, #0000 70%); width: 380px; height: 380px; top: -120px; left: -80px; }
.cv-orb-b { opacity: .34; background: radial-gradient(circle, #7c5cff, #0000 70%); width: 420px; height: 420px; animation-delay: -5s; top: 120px; right: -140px; }
.cv-orb-c { opacity: .2; background: radial-gradient(circle, #00c8ff, #0000 70%); width: 300px; height: 300px; animation-duration: 15s; animation-delay: -8s; bottom: -120px; left: 40%; }
@keyframes cv-drift { 0% { transform: translate(0) scale(1); } to { transform: translate(26px, -20px) scale(1.06); } }

/* ---------------- 容器 ---------------- */
.cv-shell { width: 100%; min-width: 0; max-width: 620px; margin: 0 auto; position: relative; }

.cv-header { justify-content: center; align-items: center; gap: 12px; margin-bottom: 20px; padding: 0 4px; display: flex; }
.cv-brand { align-items: center; gap: 11px; min-width: 0; display: flex; }
.cv-brand-mark {
  color: #fff; background: linear-gradient(135deg, #2a6ff0, #00b6ff);
  border-radius: 12px; flex: none; justify-content: center; align-items: center;
  width: 38px; height: 38px; display: flex; box-shadow: 0 8px 20px #0084ff66;
}
.cv-brand-text { flex-direction: column; min-width: 0; display: flex; }
.cv-brand-text b { color: #fff; letter-spacing: .4px; font-size: 15px; font-weight: 600; }

.cv-panel {
  background: #fffffff7; border-radius: 16px; padding: 16px 20px 14px;
  box-shadow: 0 30px 70px -28px #0009;
  color: #16233c;
}
.cv-panel + .cv-panel, .cv-vipcard + .cv-panel { margin-top: 10px; }

.cv-primary-btn {
  letter-spacing: 2px;
  background: linear-gradient(135deg, #2a6ff0 0%, #1a9bff 55%, #00c2ff 100%);
  border: none; border-radius: 11px; width: 100%; height: 40px; margin-top: 10px;
  font-size: 14.5px; font-weight: 600; color: #fff; font-family: inherit; cursor: pointer;
  transition: transform .22s, box-shadow .22s, filter .22s;
  box-shadow: 0 10px 24px #1a7aff4d;
}
.cv-primary-btn:hover:not(:disabled) { filter: brightness(1.05); transform: translateY(-1px); box-shadow: 0 14px 30px #1a7aff66; }
.cv-primary-btn:disabled { color: #9aa3b2; box-shadow: none; background: #dfe4ec; cursor: not-allowed; }

/* ---------------- 卡密卡片（VIP 卡） ---------------- */
.cv-vipcard {
  background: linear-gradient(140deg, #17203f 0%, #24305e 46%, #3b2c63 100%);
  border: 1px solid #ffffff1f; border-radius: 18px; padding: 15px 20px 14px;
  position: relative; overflow: hidden;
  box-shadow: 0 34px 70px -26px #000000b8, inset 0 0 0 1px #f6d9a01a;
}
.vc-sheen {
  pointer-events: none;
  background: linear-gradient(100deg, #0000 38%, #ffffff21 47%, #0000 56%);
  animation: vc-sheen 7s ease-in-out infinite;
  position: absolute; inset: -60% -30%;
}
@keyframes vc-sheen { 0%, 62% { transform: translate(-42%); } to { transform: translate(42%); } }
.vc-ring { pointer-events: none; border: 1px solid #ffffff17; border-radius: 50%; position: absolute; }
.vc-ring-1 { width: 260px; height: 260px; top: -120px; right: -90px; }
.vc-ring-2 { border-color: #f6d9a024; width: 180px; height: 180px; top: -110px; right: 20px; }

.vc-top { justify-content: space-between; align-items: center; gap: 10px; display: flex; position: relative; }
.vc-brand { letter-spacing: 2.6px; color: #ffffff70; font-size: 10px; }
.vc-state {
  color: #0f1a2e; background: linear-gradient(135deg, #f7dfa8, #e6b968);
  border-radius: 999px; flex: none; padding: 4px 11px; font-size: 12px;
  box-shadow: 0 4px 12px #e6b96852;
}
.vc-state.is-dead { color: #ffd9d9; box-shadow: none; background: #f56c6c3d; }
.vc-state.is-idle { color: #d8e6ff; box-shadow: none; background: #78a0ff3d; }

.vc-code {
  letter-spacing: 4px; font-variant-numeric: tabular-nums; color: #f6d9a0;
  text-shadow: 0 2px 18px #f6d9a047; -webkit-user-select: all; user-select: all;
  word-break: break-all; margin: 11px 0 0; font-size: 22px; font-weight: 600; position: relative;
  line-height: 1.35;
}

.vc-stats { border-top: 1px solid #ffffff1a; flex-wrap: wrap; gap: 8px 0; margin-top: 11px; padding-top: 11px; display: flex; position: relative; }
.vc-stat { flex-direction: column; flex: 33.333%; gap: 2px; min-width: 108px; display: flex; }
.vc-stat span { letter-spacing: .6px; color: #ffffff70; font-size: 10.5px; }
.vc-stat b { color: #fff; font-size: 14px; font-weight: 600; line-height: 1.4; }
.vc-stat i { color: #f6d9a0; font-size: 10.5px; font-style: normal; line-height: 1.4; }

/* ---------------- 步骤 ---------------- */
.cv-steps { counter-reset: step; flex-direction: column; gap: 6px; margin: 0 0 12px; padding: 0; list-style: none; display: flex; }
.cv-steps li { color: #5b667c; padding-left: 28px; font-size: 12.5px; line-height: 1.55; position: relative; }
.cv-steps li:before {
  counter-increment: step; content: counter(step); color: #fff;
  background: linear-gradient(135deg, #2a6ff0, #00b6ff);
  border-radius: 50%; justify-content: center; align-items: center;
  width: 20px; height: 20px; font-size: 11px; font-weight: 600; display: flex;
  position: absolute; top: 0; left: 0;
}

.cv-result { border-radius: 10px; margin-top: 10px; padding: 10px 14px; font-size: 12.5px; line-height: 1.65; }
.cv-result.ok { background: #f0f9eb; border: 1px solid #c2e7b0; color: #4e8a35; }
.cv-result.err { background: #fef0f0; border: 1px solid #fbc4c4; color: #c45656; }
.cv-result.warn { background: #fdf6ec; border: 1px solid #f5dab1; color: #b88230; }

/* 分享失效 —— 百度原话，大字醒目 */
.cv-result.dead {
  background: linear-gradient(180deg, #fff5f5, #fef0f0);
  border: 2px solid #fbc4c4;
  padding: 22px 20px 18px;
  text-align: center;
  box-shadow: 0 6px 20px -8px #f56c6c5c;
}
.cv-result.dead .dead-icon {
  width: 46px; height: 46px; margin: 0 auto 14px; border-radius: 50%;
  background: #f56c6c; color: #fff;
  font-size: 26px; font-weight: 700; line-height: 46px;
  box-shadow: 0 6px 16px -4px #f56c6c99;
}
.cv-result.dead .dead-text {
  color: #d9363e;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: .5px;
  word-break: break-word;
}
.cv-result.dead .dead-hint {
  color: #b08283;
  font-size: 12.5px;
  line-height: 1.7;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed #f5c6c6;
}

.cv-pane-title { color: #16233c; border-bottom: 1px solid #eef1f6; margin: 0 0 11px; padding-bottom: 9px; font-size: 14px; font-weight: 600; }
.cv-files { padding-top: 22px; }

/* ---------------- 文件列表 ---------------- */
.file-row { border-top: 1px solid #eef1f6; flex-wrap: wrap; align-items: center; gap: 12px; padding: 13px 2px; display: flex; }
.file-row:first-of-type { border-top: none; }
.file-mark {
  color: #fff; background: linear-gradient(135deg, #2a6ff0, #00b6ff);
  border-radius: 11px; flex: none; justify-content: center; align-items: center;
  width: 34px; height: 34px; display: flex; font-size: 16px;
}
.file-main { flex-direction: column; flex: 1 1 0; gap: 3px; min-width: 0; display: flex; }
.file-main b { color: #16233c; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; overflow: hidden; }
.file-main i { color: #97a1b3; font-size: 12px; font-style: normal; }
.file-get { flex: none; width: 104px; }
.file-list {
  background: #f6f8fc; border-left: 2px solid #d7e2f5; border-radius: 0 12px 12px 0;
  flex: 100%; margin: 8px 0 2px 11px; padding: 2px 12px 2px 67px;
}
.file-item { border-top: 1px solid #e8edf6; align-items: center; gap: 12px; padding: 9px 0; display: flex; }
.file-item:first-child { border-top: none; }
.file-item .file-main b { font-size: 13px; font-weight: 400; }
.file-head { border-radius: 12px; flex: 1 1 0; align-items: center; gap: 12px; min-width: 0; margin: -6px -10px; padding: 6px 10px; display: flex; }
.file-head.is-foldable { cursor: pointer; }
.file-head.is-foldable:hover { background: #f2f6fd; }
.file-caret {
  border-radius: 50%; flex: none; justify-content: center; align-items: center;
  width: 22px; height: 22px; font-size: 13px; transition: transform .2s; display: flex;
}
.file-caret.is-foldable { color: #2a6ff0; background: #e8f0fe; }
.file-caret.is-open { transform: rotate(180deg); }

/* 小按钮（下载） */
.btn-sm {
  flex: none; height: 32px; padding: 0 16px; border-radius: 8px; border: 1px solid #2a6ff0;
  background: #2a6ff0; color: #fff; font-size: 13px; font-family: inherit; cursor: pointer;
  transition: all .18s; white-space: nowrap;
}
.btn-sm:hover:not(:disabled) { background: #1f5fd8; border-color: #1f5fd8; }
.btn-sm:disabled { background: #f4f4f5; border-color: #e9e9eb; color: #a8abb2; cursor: not-allowed; }

/* ---------------- 卡密入口（gate） ---------------- */
.gate-title { letter-spacing: 1px; color: #101a2e; margin: 0; font-size: 20px; font-weight: 600; }
.gate-sub { color: #8d97ab; margin: 6px 0 16px; font-size: 12.5px; }
.gate-chips { flex-wrap: wrap; gap: 7px; margin: 14px 0 0; padding: 0; list-style: none; display: flex; }
.gate-chips li {
  color: #3f6ba8; background: #eef4fd; border-radius: 999px;
  align-items: center; gap: 5px; padding: 5px 10px; font-size: 12px; display: flex;
}
.gate-chips .ic { color: #2a9df0; font-size: 13px; }
.gate-tip { text-align: center; color: #a3abbb; margin: 14px 0 0; font-size: 12px; }

/* 输入框 */
.cv-input {
  width: 100%; background: #f2f5fa; border: 1px solid transparent; border-radius: 11px;
  padding: 10px 13px; font-family: inherit; font-size: 14px; color: #16233c;
  outline: none; transition: box-shadow .22s, background .22s;
  line-height: 1.55;
}
.cv-input::placeholder { color: #a8b0c0; }
.cv-input:hover { box-shadow: inset 0 0 0 1px #cdd8ea; }
.cv-input:focus { background: #fff; box-shadow: inset 0 0 0 1px #2a6ff0, 0 0 0 4px #2a6ff01f; }
textarea.cv-input { resize: vertical; line-height: 1.6; }
.cv-key-input {
  letter-spacing: 4px; text-transform: uppercase; font-size: 17px; font-weight: 600;
  height: 46px;
}

/* ================= 下载直链卡片（转存成功后） ================= */
.dl-card {
  background: linear-gradient(180deg, #1c2544 0%, #1a2238 100%);
  border: 1px solid #ffffff1f;
  border-radius: 16px;
  padding: 18px 20px 20px;
  box-shadow: 0 20px 46px -22px #000000a6;
}

.dl-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.dl-head b { color: #fff; font-size: 15px; font-weight: 600; }
.dl-head .dl-meta {
  margin-left: auto;
  color: #ffffff7a;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}
.dl-head .dl-meta em { font-style: normal; color: #ffffffb8; }
.dl-check {
  flex: none;
  width: 26px; height: 26px; border-radius: 8px;
  background: linear-gradient(135deg, #2a6ff0, #00b6ff);
  color: #fff; font-size: 14px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px #1a7aff5c;
}

.dl-body {
  background: #ffffff0a;
  border: 1px solid #ffffff14;
  border-radius: 12px;
  padding: 16px 18px 18px;
}

.dl-sum {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.dl-sum .dl-box {
  flex: none;
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, #3a4770, #2b3557);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px;
}
.dl-sum b { color: #fff; font-size: 14.5px; font-weight: 600; }
.dl-sum b em { font-style: normal; color: #7fb0ff; }
.dl-sum .dl-size {
  margin-left: auto;
  color: #ffffff8f;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.dl-tip {
  color: #ffffff8a;
  font-size: 12.5px;
  line-height: 1.85;
  margin: 0 0 16px;
}
.dl-tip em { font-style: normal; color: #ffffffcc; }
.dl-tip b { color: #f6c26b; font-weight: 600; }

.dl-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.dl-btn {
  height: 36px;
  padding: 0 18px;
  border-radius: 9px;
  border: 1px solid #ffffff24;
  background: #ffffff12;
  color: #ffffffcc;
  font-size: 13.5px;
  font-family: inherit;
  cursor: pointer;
  transition: all .16s;
  white-space: nowrap;
}
.dl-btn:hover { background: #ffffff1f; color: #fff; }
.dl-btn:disabled { opacity: .5; cursor: not-allowed; }

.dl-btn.main {
  background: linear-gradient(135deg, #22a06b, #2ec27e);
  border-color: transparent;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 6px 16px -6px #22a06bb8;
}
.dl-btn.main:hover { filter: brightness(1.08); }

.dl-list {
  margin-top: 16px;
  padding-top: 4px;
  border-top: 1px solid #ffffff14;
}
.dl-list .file-row { border-top-color: #ffffff12; }
.dl-list .file-main b { color: #ffffffdd; }
.dl-list .file-main i { color: #ffffff7a; }
.dl-list .file-mark { background: linear-gradient(135deg, #2a6ff0, #00b6ff); }

/* 下载直链条目里的小按钮 */
.dl-list .btn-sm {
  background: #2a6ff0; border-color: #2a6ff0;
}
.dl-list .btn-sm:disabled { background: #ffffff14; border-color: #ffffff1a; color: #ffffff59; }

/* ---------------- 转存进度条（无文字版） ---------------- */
.pg {
  margin-top: 12px;
  padding: 12px 14px;
  background: #f4f8ff;
  border: 1px solid #d6e4ff;
  border-radius: 11px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.pg-track {
  flex: 1;
  height: 8px;
  background: #e2eaf8;
  border-radius: 99px;
  overflow: hidden;
}
.pg-bar {
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: linear-gradient(90deg, #2a6ff0, #1a9bff 60%, #00c2ff);
  transition: width .45s cubic-bezier(.22, .61, .36, 1);
  position: relative;
  overflow: hidden;
}
/* 进度条上跑一道高光，让它看起来在动 */
.pg-bar:after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, #0000 30%, #ffffff70 50%, #0000 70%);
  animation: pg-shine 1.4s linear infinite;
}
@keyframes pg-shine {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
.pg-pct {
  flex: none;
  min-width: 42px;
  text-align: right;
  color: #2a6ff0;
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* 完成：整条变绿 */
.pg.done { background: #f0f9eb; border-color: #c2e7b0; }
.pg.done .pg-pct { color: #22a06b; }
.pg.done .pg-bar { background: linear-gradient(90deg, #22a06b, #2ec27e); }
.pg.done .pg-bar:after { animation: none; }

/* 卡住了：变橙色，高光停下 */
.pg.stalled { background: #fdf6ec; border-color: #f5dab1; }
.pg.stalled .pg-pct { color: #e08a1e; }
.pg.stalled .pg-bar { background: linear-gradient(90deg, #e08a1e, #f0a83c); }
.pg.stalled .pg-bar:after { animation: none; }

/* ---------------- 卡密失效面板 ---------------- */
.cv-dead {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 20px 22px;
}
.cv-dead .dead-mark {
  width: 56px; height: 56px; border-radius: 50%;
  background: #fdeeee; color: #e5484d;
  font-size: 26px; line-height: 56px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.cv-dead .dead-title {
  letter-spacing: .3px; color: #101a2e;
  font-size: 17px; font-weight: 600; line-height: 1.5;
}
.cv-dead .dead-sub {
  color: #8d97ab; font-size: 13px; line-height: 1.7;
  margin: 7px 0 0; max-width: 340px;
}

/* 蓝色→现在是多色可选，具体颜色由 .c-xxx 决定（后台「提示设置」里选） */
.cv-dead .dead-btn {
  display: block;
  width: 100%;
  max-width: 380px;
  height: 48px;
  line-height: 48px;
  margin-top: 20px;
  padding: 0 18px;
  border-radius: 12px;
  color: #fff;
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: 1px;
  text-align: center;
  text-decoration: none;
  transition: transform .18s, box-shadow .18s, filter .18s;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: linear-gradient(135deg, #ff7a18 0%, #ff4d4f 100%);
  box-shadow: 0 10px 24px -8px #ff4d4fc4;
}
.cv-dead .dead-btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  text-decoration: none;
}
.cv-dead .dead-btn:active { transform: translateY(0); }

/* ---- 可选颜色（后台里选）---- */
.cv-dead .dead-btn.c-orange { background: linear-gradient(135deg, #ff7a18 0%, #ff4d4f 100%); box-shadow: 0 10px 24px -8px #ff4d4fc4; }
.cv-dead .dead-btn.c-red    { background: linear-gradient(135deg, #ff4d4f 0%, #d92b3a 100%); box-shadow: 0 10px 24px -8px #e5303ac4; }
.cv-dead .dead-btn.c-blue   { background: linear-gradient(135deg, #2a6ff0 0%, #1a9bff 55%, #00c2ff 100%); box-shadow: 0 10px 24px -8px #1a7affc4; }
.cv-dead .dead-btn.c-green  { background: linear-gradient(135deg, #22a06b 0%, #2ec27e 100%); box-shadow: 0 10px 24px -8px #22a06bc4; }
.cv-dead .dead-btn.c-purple { background: linear-gradient(135deg, #7c5cff 0%, #a855f7 100%); box-shadow: 0 10px 24px -8px #7c5cffc4; }
.cv-dead .dead-btn.c-gold   { background: linear-gradient(135deg, #e6b968 0%, #c9932f 100%); box-shadow: 0 10px 24px -8px #c9932fc4; }
.cv-dead .dead-btn.c-gray   { background: linear-gradient(135deg, #9aa6b8 0%, #77839a 100%); box-shadow: 0 10px 24px -8px #77839ac4; }

/* 第二个按钮离第一个近一点，看起来是一组 */
.cv-dead .dead-btn + .dead-btn { margin-top: 11px; }

/* 没配网址时：保留颜色但灰掉，一眼能看出「还没配好」 */
.cv-dead .dead-btn.off {
  filter: grayscale(.72) opacity(.55);
  box-shadow: none;
  cursor: not-allowed;
  pointer-events: none;
}

.cv-dead .dead-note {
  color: #8d97ab;
  font-size: 12.5px;
  line-height: 1.7;
  margin-top: 12px;
  max-width: 380px;
  word-break: break-all;
}

/* 底部一行小字：卡密 / 到期时间 */
.cv-dead .dead-meta {
  color: #b3bccb;
  font-size: 11.5px;
  line-height: 1.7;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #eef1f6;
  width: 100%;
  max-width: 380px;
  font-variant-numeric: tabular-nums;
}
.cv-dead .dead-meta em { font-style: normal; color: #8d97ab; }

/* ---------------- 加载 ---------------- */
.cv-loading { text-align: center; padding: 90px 0; color: #ffffff9c; font-size: 13px; }
.cv-spinner {
  width: 26px; height: 26px; margin: 0 auto 14px; border-radius: 50%;
  border: 2px solid #ffffff26; border-top-color: #fff; animation: cv-spin .8s linear infinite;
}
@keyframes cv-spin { to { transform: rotate(360deg); } }

.hidden { display: none !important; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 620px) {
  .cv-panel { padding: 20px 18px; }
  .file-list { padding-right: 10px; }
  .cv-vipcard { padding: 20px 18px; }
  .vc-code { letter-spacing: 3px; font-size: 22px; }
}
@media (max-width: 560px) {
  .vc-stat { flex-basis: 50%; }
}
@media (prefers-reduced-motion: reduce) {
  .cv-orb, .vc-sheen { animation: none; }
}
