/**
 * 文章「隐藏内容」前端样式（v1.6.126）
 * 与 hide-content.js 配套，单独 CSS 文件避免被主题/缓存插件剥离内联 style。
 */

/* ---------- 隐藏内容块（未解锁时的遮罩卡片） ---------- */
.lxn-hide {
  position: relative;
  margin: 18px 0;
  border: 1px dashed rgba(235, 80, 85, 0.45);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(235, 80, 85, 0.03);
}

.lxn-hide-mask {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 34px 22px 30px;
}

.lxn-hide-mask::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 80% at 50% 0%, rgba(235, 80, 85, 0.10), transparent 65%);
  pointer-events: none;
}

.lxn-hide-lock {
  font-size: 30px;
  line-height: 1;
  margin-bottom: 10px;
  filter: drop-shadow(0 4px 10px rgba(235, 80, 85, 0.25));
}

.lxn-hide-title {
  position: relative;
  font-size: 17px;
  font-weight: 800;
  color: #222;
  margin-bottom: 6px;
}

/* 防止主题用 ::before/::after 加装饰性符号 */
.lxn-hide-title::before,
.lxn-hide-title::after {
  display: none !important;
  content: "" !important;
}

.lxn-hide-desc {
  position: relative;
  font-size: 13px;
  line-height: 1.7;
  color: #8a8a8a;
  max-width: 320px;
  margin-bottom: 18px;
}

.lxn-hide-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 26px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #eb5055, #ff6b6b);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(235, 80, 85, 0.28);
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.lxn-hide-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(235, 80, 85, 0.34);
}

.lxn-hide-btn:active {
  transform: translateY(0) scale(0.98);
}

.lxn-hide-body {
  position: relative;
  padding: 4px 2px;
}

.lxn-hide.is-revealed {
  border-style: dashed;
  border-color: #2bb673;
  background: rgba(43, 182, 115, 0.04);
}

.lxn-hide.is-revealed .lxn-hide-body {
  padding: 18px 20px;
}

/* ---------- 验证码弹窗 ---------- */
.lxn-hide-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lxn-hide-modal[hidden] {
  display: none;
}

.lxn-hide-modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(20, 16, 16, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.lxn-hide-modal-card {
  position: relative;
  width: 100%;
  max-width: 380px;
  background: #fff;
  border-radius: 20px;
  padding: 30px 26px 26px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
  animation: lxnHidePop 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes lxnHidePop {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.lxn-hide-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  color: #bbb;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.15s, color 0.15s;
}

.lxn-hide-modal-close:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #666;
}

.lxn-hide-modal-title {
  font-size: 19px;
  font-weight: 800;
  color: #222;
  margin: 0 0 8px;
}

.lxn-hide-modal-title::before,
.lxn-hide-modal-title::after {
  display: none !important;
  content: "" !important;
}

.lxn-hide-modal-desc {
  font-size: 13px;
  line-height: 1.7;
  color: #8a8a8a;
  margin: 0 0 16px;
}

.lxn-hide-modal-qr {
  margin: 0 auto 16px;
  max-width: 160px;
}

.lxn-hide-modal-qr img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid #eee;
}

.lxn-hide-code {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 0 0 18px;
}

.lxn-hide-digit {
  box-sizing: border-box;
  width: 52px;
  height: 60px;
  text-align: center;
  font-size: 26px;
  font-weight: 800;
  color: #222;
  border: 2px solid #eee;
  border-radius: 12px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  font-variant-numeric: tabular-nums;
}

.lxn-hide-digit:focus {
  border-color: #eb5055;
  box-shadow: 0 0 0 3px rgba(235, 80, 85, 0.15);
}

.lxn-hide-modal-submit {
  width: 100%;
  padding: 13px 0;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #eb5055, #ff6b6b);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(235, 80, 85, 0.28);
  transition: transform 0.15s ease, filter 0.2s ease;
}

.lxn-hide-modal-submit:hover {
  filter: brightness(1.04);
}

.lxn-hide-modal-submit:active {
  transform: scale(0.98);
}

.lxn-hide-modal-submit[disabled] {
  opacity: 0.6;
  cursor: default;
}

.lxn-hide-modal-msg {
  min-height: 18px;
  margin-top: 12px;
  font-size: 13px;
  color: #eb5055;
}

.lxn-hide-modal-msg.ok {
  color: #2bb673;
}

.lxn-hide-modal-msg a {
  color: #eb5055;
  font-weight: 700;
  text-decoration: underline;
}

.lxn-hide-error {
  color: #eb5055;
  font-size: 13px;
}

/* ---------- 暗色主题（跟随系统） ---------- */
@media (prefers-color-scheme: dark) {
  .lxn-hide {
    border-color: rgba(235, 80, 85, 0.4);
    background: rgba(235, 80, 85, 0.06);
  }

  .lxn-hide-title {
    color: #f2f2f2;
  }

  .lxn-hide-desc {
    color: #a8a8a8;
  }

  .lxn-hide-modal-card {
    background: #1f1b1b;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  }

  .lxn-hide-modal-title {
    color: #f2f2f2;
  }

  .lxn-hide-modal-desc {
    color: #a8a8a8;
  }

  .lxn-hide-modal-close:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ccc;
  }

  .lxn-hide-digit {
    background: #2a2020;
    color: #f2f2f2;
    border-color: #3a2a2a;
  }

  .lxn-hide-digit:focus {
    border-color: #ff6b6b;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.18);
  }
}

/* ---------- 减少动画（无障碍） ---------- */
@media (prefers-reduced-motion: reduce) {
  .lxn-hide-modal-card {
    animation: none;
  }

  .lxn-hide-btn,
  .lxn-hide-modal-submit {
    transition: none;
  }
}
