/* ===== 卡密校验模态框 (quiz.php) =====
   不依赖 .modal-overlay (admin.v2.css),独立样式确保前台/后台不冲突
   通过 assets/style.css ?v= 缓存破坏同步加载
*/

.aq-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(15, 23, 42, .65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  animation: aqFadeIn .2s ease;
}
.aq-modal-overlay[hidden] {
  display: none;
}

.aq-modal-card {
  background: #fff;
  border-radius: 16px;
  width: min(460px, 100%);
  padding: 24px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .25);
  animation: aqScaleIn .25s ease;
  font-family: inherit;
  line-height: 1.5;
  position: relative;
  margin: auto 0;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.aq-modal-card h3 {
  margin: 0 0 12px;
  color: #1e293b;
  font-size: 18px;
  font-weight: 700;
}

.aq-modal-card p {
  color: #475569;
  margin: 0 0 16px;
  line-height: 1.6;
  font-size: 14px;
}

.aq-modal-card__input-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.aq-modal-card__input-row input {
  flex: 1;
  padding: 10px 12px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  transition: border-color .15s ease;
  min-width: 0;
}

.aq-modal-card__input-row input:focus {
  border-color: #5B5BF7;
}

.aq-modal-card__input-row .btn {
  white-space: nowrap;
  padding: 10px 18px;
  background: linear-gradient(135deg, #5B5BF7, #7C3AED);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .15s ease;
}

.aq-modal-card__input-row .btn:hover {
  opacity: .9;
}

.aq-modal-card__input-row .btn:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.aq-modal-card__err {
  color: #EF4444;
  background: #fef2f2;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 12px;
  line-height: 1.5;
}

.aq-modal-card__buy {
  background: linear-gradient(135deg, #fef9e7, #fff5d6);
  padding: 14px;
  border-radius: 8px;
  margin: 12px 0;
  font-size: 14px;
  line-height: 1.7;
  color: #1e293b;
}

.aq-modal-card__buy code {
  background: #1e293b;
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 700;
  font-family: monospace;
  letter-spacing: .5px;
}

.aq-modal-card__actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

.aq-modal-card__actions .btn--ghost {
  padding: 8px 18px;
  background: transparent;
  color: #475569;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: background .15s ease;
}

.aq-modal-card__actions .btn--ghost:hover {
  background: #f1f5f9;
}

@keyframes aqFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes aqScaleIn {
  from { transform: scale(.92); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

/* 移动端适配 */
@media (max-width: 480px) {
  .aq-modal-card {
    padding: 18px;
  }
  .aq-modal-card h3 { font-size: 16px; }
  .aq-modal-card p  { font-size: 13px; }
  .aq-modal-card__input-row {
    flex-direction: column;
  }
  .aq-modal-card__input-row .btn {
    width: 100%;
  }
}

/* ===== 关闭按钮 ===== */
.aq-modal-card__close {
  position: absolute;
  top: 8px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  transition: background .15s ease;
}
.aq-modal-card__close:hover {
  background: #f1f5f9;
  color: #475569;
}

/* ===== 价格表(3 套餐) ===== */
.aq-modal-card__pricing {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 14px 0 16px;
}

.aq-price-card {
  position: relative;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 8px;
  text-align: center;
  background: #f8fafc;
  transition: all .15s ease;
  cursor: default;
}

.aq-price-card--hot {
  border-color: #f97316;
  background: linear-gradient(135deg, #fff7ed, #fef3c7);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(249, 115, 22, .15);
}

.aq-price-card__badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #f97316, #ef4444);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 8px;
  white-space: nowrap;
}

.aq-price-card__head {
  font-size: 12px;
  color: #64748b;
  font-weight: 600;
  margin-bottom: 4px;
}

.aq-price-card__num {
  color: #1e293b;
  font-size: 16px;
  line-height: 1.2;
}
.aq-price-card__num b {
  font-size: 28px;
  font-weight: 800;
  color: #5B5BF7;
}
.aq-price-card--hot .aq-price-card__num b {
  color: #ea580c;
}

.aq-price-card__sub {
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
  line-height: 1.3;
}

/* ===== 收款码 ===== */
.aq-modal-card__buy {
  background: linear-gradient(135deg, #fef9e7, #fff5d6);
  padding: 14px;
  border-radius: 10px;
  margin: 12px 0;
  font-size: 14px;
  line-height: 1.7;
  color: #1e293b;
}

.aq-modal-card__buy-title {
  font-weight: 700;
  margin-bottom: 10px;
  font-size: 15px;
}

.aq-modal-card__buy-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.aq-modal-card__wxqr {
  flex-shrink: 0;
  width: 110px;
  height: 110px;
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.aq-modal-card__wxqr img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.aq-wxqr-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 12px;
  color: #94a3b8;
  background: linear-gradient(45deg, #f1f5f9 25%, #e2e8f0 25%, #e2e8f0 50%, #f1f5f9 50%, #f1f5f9 75%, #e2e8f0 75%);
  background-size: 12px 12px;
}

.aq-modal-card__buy-text {
  flex: 1;
  min-width: 0;
}
.aq-modal-card__buy-text strong {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
  color: #1e293b;
}
.aq-modal-card__buy-text ul {
  margin: 4px 0;
  padding-left: 18px;
  font-size: 12px;
  color: #475569;
  line-height: 1.7;
}
.aq-modal-card__buy-text ul li {
  list-style: none;
  position: relative;
}
.aq-modal-card__wxtip {
  font-size: 12px;
  color: #1e293b;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed #fbbf24;
}
.aq-modal-card__wxtip code {
  background: #1e293b;
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
  font-family: monospace;
  letter-spacing: .5px;
}

/* ===== 卖点 4 件套 ===== */
.aq-modal-card__features {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin: 12px 0 4px;
  font-size: 12px;
  color: #475569;
}

.aq-modal-card__sample {
  text-align: center;
  font-size: 12px;
  color: #64748b;
  margin: 8px 0 4px;
  padding: 8px;
  background: #f1f5f9;
  border-radius: 6px;
}
.aq-modal-card__sample a {
  color: #5B5BF7;
  font-weight: 700;
  text-decoration: none;
}
.aq-modal-card__sample a:hover {
  text-decoration: underline;
}
.aq-modal-card__features span {
  background: #f0fdf4;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid #bbf7d0;
}

@media (max-width: 480px) {
  .aq-modal-card__pricing {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .aq-price-card--hot {
    transform: none;
  }
  .aq-modal-card__buy-row {
    flex-direction: column;
    align-items: center;
  }
  .aq-modal-card__wxqr {
    width: 140px;
    height: 140px;
  }
}

/* ===== 报告试看版遮罩 (result.php?demo=1) ===== */
.aq-preview-wrap {
  position: relative;
  max-height: 540px;
  overflow: hidden;
}
.aq-preview-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,.6) 50%,
    rgba(255,255,255,.95) 80%,
    #fff 100%);
  pointer-events: none;
}
.aq-preview-gate {
  position: relative;
  margin-top: -180px;
  background: #fff;
  padding: 28px 20px;
  text-align: center;
  border-radius: 16px;
  box-shadow: 0 -8px 32px rgba(91, 91, 247, .12);
  z-index: 5;
}
.aq-preview-gate__icon {
  font-size: 36px;
  margin-bottom: 8px;
}
.aq-preview-gate__title {
  font-size: 18px;
  font-weight: 700;
  color: #1e293b;
  margin: 6px 0;
}
.aq-preview-gate__sub {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 16px;
  line-height: 1.6;
}
.aq-preview-gate__row {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 8px;
}
.aq-preview-gate__price {
  display: inline-block;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #92400e;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 13px;
  margin: 0 4px;
}
.aq-preview-gate__btn {
  display: inline-block;
  background: linear-gradient(135deg, #5B5BF7, #7C3AED);
  color: #fff !important;
  padding: 10px 24px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none !important;
  border: none;
  cursor: pointer;
  transition: opacity .15s;
}
.aq-preview-gate__btn:hover { opacity: .9; }
.aq-preview-gate__btn--ghost {
  background: #fff;
  color: #475569 !important;
  border: 1px solid #cbd5e1;
}
.aq-preview-banner {
  background: linear-gradient(135deg, #eef2ff, #ddd6fe);
  color: #4338ca;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 16px;
  border: 1px dashed #818cf8;
}