/* ============================================================
   一键战绩 · 付费去水印导出 —— 前端注入层样式
   水印基于 .preview-canvas-wrap（2560×1440 逻辑像素），
   导出（html-to-image）与预览共用同一 DOM，自动生效。
   ============================================================ */

/* ---------- 战绩图水印（画布坐标系：2560×1440） ---------- */
.yj-watermark {
  position: absolute;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  overflow: hidden;
}

.yj-wm-grid {
  position: absolute;
  inset: -12%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 1fr;
  align-items: center;
  justify-items: center;
  transform: rotate(-24deg);
}

.yj-wm-grid span {
  font-size: 88px;
  font-weight: 800;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  color: rgba(255, 255, 255, 0.14);
  white-space: nowrap;
  letter-spacing: 8px;
  text-shadow: 0 0 3px rgba(0, 0, 0, 0.45);
  user-select: none;
}

.yj-wm-badge {
  position: absolute;
  right: 52px;
  bottom: 46px;
  padding: 12px 30px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: rgba(255, 255, 255, 0.8);
  font-size: 36px;
  font-weight: 600;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  letter-spacing: 2px;
}

/* ---------- 解锁按钮（追加在导出按钮旁） ---------- */
.yj-unlock-btn {
  background: linear-gradient(135deg, #8a6a2f, #d4a45a) !important;
  border: 1px solid #f0d49a !important;
  color: #1b1508 !important;
  font-weight: 700;
}

.yj-unlock-btn:hover {
  filter: brightness(1.08);
}

.yj-unlock-ok {
  background: linear-gradient(135deg, #1f5c3a, #3fa46a) !important;
  border: 1px solid #7fe0a8 !important;
  color: #08130c !important;
}

/* ---------- 弹窗 ---------- */
.yj-modal-mask {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(5, 8, 12, 0.72);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
}

.yj-modal {
  width: min(560px, 92vw);
  max-height: 88vh;
  overflow-y: auto;
  background: linear-gradient(180deg, #171c24, #10141a);
  border: 1px solid #2c3542;
  border-radius: 14px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.6);
  color: #dfe6ef;
}

.yj-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #232b36;
}

.yj-modal-head strong {
  font-size: 17px;
  color: #f0d49a;
  letter-spacing: 1px;
}

.yj-modal-close {
  cursor: pointer;
  border: none;
  background: transparent;
  color: #8894a5;
  font-size: 20px;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 6px;
}

.yj-modal-close:hover {
  color: #fff;
  background: #232b36;
}

.yj-modal-body {
  padding: 18px 20px 22px;
}

/* 套餐卡片 */
.yj-pack-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.yj-pack {
  cursor: pointer;
  border: 1px solid #2c3542;
  border-radius: 10px;
  padding: 14px 12px;
  text-align: center;
  background: #141922;
  transition: all 0.15s ease;
}

.yj-pack:hover {
  border-color: #d4a45a;
  background: #1a2029;
}

.yj-pack-title {
  font-size: 14px;
  color: #9aa4b2;
  margin-bottom: 6px;
}

.yj-pack-fee {
  font-size: 26px;
  font-weight: 800;
  color: #f0d49a;
}

.yj-pack-fee small {
  font-size: 13px;
  font-weight: 400;
}

.yj-pack-uses {
  font-size: 12px;
  color: #6f7b8b;
  margin-top: 4px;
}

/* 支付区 */
.yj-qr-box {
  text-align: center;
  padding: 6px 0 4px;
}

.yj-qr-box img {
  width: 220px;
  height: 220px;
  border-radius: 10px;
  border: 1px solid #2c3542;
  background: #fff;
}

.yj-pay-status {
  text-align: center;
  font-size: 13px;
  color: #9aa4b2;
  margin-top: 10px;
  line-height: 1.7;
}

.yj-pay-status .yj-spin {
  display: inline-block;
  animation: yj-blink 1.2s infinite;
  color: #f0d49a;
}

@keyframes yj-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

.yj-order-no {
  font-size: 12px;
  color: #6f7b8b;
  margin-top: 6px;
  user-select: all;
}

.yj-dev-tip {
  font-size: 12px;
  color: #e0a95c;
  background: rgba(224, 169, 92, 0.08);
  border: 1px dashed #6b5327;
  border-radius: 8px;
  padding: 8px 10px;
  margin-top: 12px;
  line-height: 1.6;
}

.yj-cancel-poll {
  display: block;
  margin: 14px auto 0;
}

/* 发码成功 */
.yj-code-box {
  text-align: center;
  padding: 10px 0;
}

.yj-code-box .yj-code {
  display: inline-block;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 3px;
  color: #7fe0a8;
  background: #0e2317;
  border: 1px dashed #2f6b4a;
  border-radius: 10px;
  padding: 12px 22px;
  margin: 8px 0 4px;
  user-select: all;
  cursor: pointer;
  font-family: Consolas, monospace;
}

.yj-code-box .yj-code-sub {
  font-size: 12px;
  color: #6f7b8b;
}

.yj-code-meta {
  font-size: 12px;
  color: #8894a5;
  margin-top: 10px;
  line-height: 1.8;
}

/* 解锁码输入 */
.yj-unlock-row {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.yj-unlock-row input {
  flex: 1;
  min-width: 0;
  border-radius: 8px;
  border: 1px solid #2c3542;
  background: #0d1117;
  color: #dfe6ef;
  padding: 9px 12px;
  font-size: 15px;
  letter-spacing: 1px;
  font-family: Consolas, monospace;
}

.yj-unlock-row input:focus {
  outline: none;
  border-color: #d4a45a;
}

.yj-btn {
  cursor: pointer;
  border: none;
  border-radius: 8px;
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 600;
  color: #1b1508;
  background: linear-gradient(135deg, #8a6a2f, #d4a45a);
  transition: filter 0.15s;
}

.yj-btn:hover {
  filter: brightness(1.1);
}

.yj-btn-ghost {
  cursor: pointer;
  border: 1px solid #2c3542;
  border-radius: 8px;
  padding: 9px 18px;
  font-size: 14px;
  color: #9aa4b2;
  background: transparent;
}

.yj-btn-ghost:hover {
  color: #dfe6ef;
  border-color: #48545f;
}

.yj-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #55606d;
  font-size: 12px;
  margin: 18px 0 12px;
}

.yj-divider::before,
.yj-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #232b36;
}

.yj-msg {
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.6;
  margin-top: 12px;
}

.yj-msg-err {
  color: #ff9c9c;
  background: rgba(255, 90, 90, 0.08);
  border: 1px solid #5b2626;
}

.yj-msg-info {
  color: #9ac8ff;
  background: rgba(90, 160, 255, 0.08);
  border: 1px solid #26405b;
}

.yj-foot {
  margin-top: 16px;
  font-size: 12px;
  color: #55606d;
  line-height: 1.7;
}

/* ---------- 轻提示 toast ---------- */
.yj-toast {
  position: fixed;
  left: 50%;
  top: 24px;
  transform: translateX(-50%);
  z-index: 100001;
  padding: 10px 22px;
  border-radius: 999px;
  font-size: 14px;
  font-family: "Microsoft YaHei", sans-serif;
  color: #e8f7ee;
  background: rgba(16, 42, 28, 0.95);
  border: 1px solid #2f6b4a;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
  animation: yj-toast-in 0.25s ease;
}

@keyframes yj-toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(-12px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ---------- 移动端 ---------- */
@media (max-width: 640px) {
  .yj-pack-grid {
    grid-template-columns: 1fr;
  }
}
