/* ========== 下载弹窗样式 ========== */

/* 跳动摇晃的二维码边框动画 - 柔和版 */
@keyframes qrBorderJump {
  0%, 100% {
    box-shadow: 0 0 0 2px #3B82F6, 0 0 8px rgba(59,130,246,0.3);
    transform: scale(1);
  }
  25% {
    box-shadow: 0 0 0 3px #10B981, 0 0 12px rgba(16,185,129,0.4);
    transform: scale(1.03);
  }
  50% {
    box-shadow: 0 0 0 2px #F59E0B, 0 0 8px rgba(245,158,11,0.3);
    transform: scale(1);
  }
  75% {
    box-shadow: 0 0 0 3px #3B82F6, 0 0 12px rgba(59,130,246,0.4);
    transform: scale(1.03);
  }
}

.qr-jump-border {
  animation: qrBorderJump 2.5s ease-in-out infinite;
  border-radius: 12px;
  padding: 6px;
  display: inline-block;
  background: linear-gradient(135deg, #f0f9ff, #f0fdf4);
}

.qr-jump-border img {
  border-radius: 8px;
  display: block;
}

/* 弹窗遮罩 */
#dlModal, #dlFreeModal, #dlBackupModal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background: rgba(15,23,42,0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
}

#dlModal.active, #dlFreeModal.active, #dlBackupModal.active {
  display: flex;
}

/* 弹窗主体 */
.dl-modal-box {
  background: #fff;
  border-radius: 20px;
  max-width: 520px;
  width: 92%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 0;
  position: relative;
  box-shadow: 0 25px 60px rgba(0,0,0,0.25);
  animation: modalIn 0.35s cubic-bezier(0.16,1,0.3,1);
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(30px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* 关闭按钮 */
.dl-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.06);
  color: #64748B;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 2;
}
.dl-modal-close:hover {
  background: rgba(239,68,68,0.1);
  color: #EF4444;
}

/* 弹窗头部 */
.dl-modal-header {
  background: linear-gradient(135deg, #1E40AF, #3B82F6);
  color: #fff;
  padding: 28px 32px 22px;
  border-radius: 20px 20px 0 0;
  text-align: center;
}
.dl-modal-header h3 {
  font-size: 1.35rem;
  font-weight: 800;
  margin: 0 0 6px;
}
.dl-modal-header p {
  font-size: 0.88rem;
  opacity: 0.85;
  margin: 0;
  line-height: 1.6;
}

/* 安全标签 */
.dl-safe-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 0.8rem;
  margin-top: 10px;
}

/* 弹窗内容区 */
.dl-modal-body {
  padding: 28px 32px 32px;
}

/* 网盘选项卡片 */
.dl-option {
  border: 2px solid #E2E8F0;
  border-radius: 14px;
  padding: 22px;
  margin-bottom: 18px;
  transition: all 0.25s;
  text-align: center;
}
.dl-option:hover {
  border-color: #3B82F6;
  background: #F8FAFC;
}
.dl-option:last-child {
  margin-bottom: 0;
}

.dl-option-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.dl-option-title .icon-quark { color: #3B82F6; }
.dl-option-title .icon-baidu { color: #2563EB; }

.dl-option-desc {
  font-size: 0.82rem;
  color: #64748B;
  margin-bottom: 16px;
  line-height: 1.6;
}

/* 二维码区域 */
.dl-qr-area {
  margin: 14px auto;
  text-align: center;
}

.dl-qr-area .qr-label {
  font-size: 0.8rem;
  color: #64748B;
  margin-bottom: 8px;
  font-weight: 600;
}

/* 提示文字 */
.dl-tip {
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 0.82rem;
  color: #166534;
  line-height: 1.7;
  margin-top: 16px;
  text-align: left;
}
.dl-tip strong {
  color: #15803D;
}
.dl-tip-warn {
  background: #FFFBEB;
  border-color: #FDE68A;
  color: #92400E;
}
.dl-tip-warn strong {
  color: #B45309;
}

/* 移动端直达链接 */
.dl-mobile-link {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 12px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.2s;
}
.dl-mobile-link.quark {
  background: linear-gradient(135deg, #3B82F6, #2563EB);
  color: #fff;
}
.dl-mobile-link.quark:hover {
  background: linear-gradient(135deg, #2563EB, #1D4ED8);
}
.dl-mobile-link.baidu {
  background: #F8FAFC;
  color: #2563EB;
  border: 2px solid #DBEAFE;
}
.dl-mobile-link.baidu:hover {
  background: #EFF6FF;
}

/* 响应式 */
@media (max-width: 540px) {
  .dl-modal-box {
    width: 96%;
    border-radius: 16px;
  }
  .dl-modal-header {
    padding: 22px 20px 18px;
    border-radius: 16px 16px 0 0;
  }
  .dl-modal-header h3 { font-size: 1.15rem; }
  .dl-modal-body { padding: 20px 18px 24px; }
  .dl-option { padding: 16px 14px; }
}
