/**
 * H5 课件解锁浮层样式
 * 简约风格，适合移动端（宝妈群体）
 */

/* 遮罩层 */
.unlock-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 1;
  transition: opacity 0.3s ease;
  overflow-y: auto;
}

/* 弹窗容器 */
.unlock-modal {
  background: #ffffff;
  border-radius: 16px;
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
}

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

/* 弹窗头部 */
.unlock-header {
  padding: 24px 24px 16px;
  text-align: center;
  border-bottom: 1px solid #f0f0f0;
}

.unlock-header h2 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 600;
  color: #333333;
  line-height: 1.4;
}

.unlock-subtitle {
  margin: 0;
  font-size: 14px;
  color: #666666;
  line-height: 1.5;
}

/* 弹窗内容 */
.unlock-content {
  padding: 24px;
}

/* 爱发电信息区域 */
.afdian-info {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 24px;
}

.info-title {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 600;
  color: #333333;
}

.info-text {
  margin: 0 0 12px;
  font-size: 14px;
  color: #666666;
  line-height: 1.6;
}

.info-link {
  margin: 0;
}

.info-link a {
  color: #ff6b6b;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  transition: color 0.2s;
}

.info-link a:hover {
  color: #ff5252;
}

.info-link a:active {
  color: #e53935;
}

/* 购买区域 */
.purchase-section {
  margin-top: 16px;
  margin-bottom: 24px;
  padding-top: 16px;
  border-top: 1px solid #f0f0f0;
}

.purchase-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 16px 24px;
  background: linear-gradient(135deg, #ff6b6b 0%, #ff5252 100%);
  color: #ffffff;
  text-decoration: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
  -webkit-tap-highlight-color: transparent;
}

.purchase-btn:hover {
  background: linear-gradient(135deg, #ff5252 0%, #ff4444 100%);
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
  transform: translateY(-1px);
}

.purchase-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(255, 107, 107, 0.3);
}

.purchase-btn .btn-icon {
  font-size: 18px;
}

.purchase-btn .btn-text {
  flex: 1;
  text-align: center;
}

.purchase-tip {
  margin-top: 12px;
  font-size: 12px;
  color: #999999;
  text-align: center;
  line-height: 1.5;
}

/* 自动检测区域 */
.auto-verify-section {
  margin-top: 20px;
  margin-bottom: 20px;
  padding-top: 20px;
  border-top: 1px solid #f0f0f0;
}

.auto-verify-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 24px;
  background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
  -webkit-tap-highlight-color: transparent;
}

.auto-verify-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #45a049 0%, #3d8b40 100%);
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
  transform: translateY(-1px);
}

.auto-verify-btn:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(76, 175, 80, 0.3);
}

.auto-verify-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.auto-verify-btn .btn-icon {
  font-size: 16px;
}

.auto-verify-btn .btn-text {
  flex: 1;
  text-align: center;
}

.auto-verify-btn .btn-loading-auto {
  display: inline-block;
}

.auto-verify-tip {
  margin-top: 8px;
  font-size: 12px;
  color: #666666;
  text-align: center;
  line-height: 1.5;
}

/* 验证区域 */
.verify-section {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #f0f0f0;
}

.verify-divider {
  text-align: center;
  margin-bottom: 16px;
  position: relative;
}

.verify-divider::before,
.verify-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 30%;
  height: 1px;
  background: #e0e0e0;
}

.verify-divider::before {
  left: 0;
}

.verify-divider::after {
  right: 0;
}

.verify-divider span {
  background: #ffffff;
  padding: 0 12px;
  color: #999999;
  font-size: 12px;
  position: relative;
  z-index: 1;
}

.input-label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #333333;
}

.order-input {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  background: #ffffff;
  color: #333333;
  box-sizing: border-box;
  transition: border-color 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

.order-input:focus {
  outline: none;
  border-color: #ff6b6b;
}

.order-input::placeholder {
  color: #999999;
}

/* 错误提示 */
.error-message {
  display: none;
  margin-top: 8px;
  padding: 8px 12px;
  background: #fff3f3;
  border-left: 3px solid #ff6b6b;
  border-radius: 4px;
  font-size: 13px;
  color: #d32f2f;
  line-height: 1.5;
}

/* 验证按钮 */
.verify-btn {
  width: 100%;
  margin-top: 16px;
  padding: 14px 24px;
  background: linear-gradient(135deg, #ff6b6b 0%, #ff5252 100%);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
  -webkit-tap-highlight-color: transparent;
}

.verify-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #ff5252 0%, #ff4444 100%);
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
  transform: translateY(-1px);
}

.verify-btn:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(255, 107, 107, 0.3);
}

.verify-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.btn-loading {
  display: inline-block;
}

/* 移动端优化 */
@media (max-width: 480px) {
  .unlock-overlay {
    padding: 16px;
  }

  .unlock-modal {
    border-radius: 12px;
    max-width: 100%;
  }

  .unlock-header {
    padding: 20px 20px 14px;
  }

  .unlock-header h2 {
    font-size: 20px;
  }

  .unlock-content {
    padding: 20px;
  }

  .afdian-info {
    padding: 14px;
  }

  .order-input {
    padding: 12px 14px;
    font-size: 16px; /* 防止 iOS 自动缩放 */
  }

  .verify-btn {
    padding: 13px 20px;
    font-size: 15px;
  }
}

/* 防止背景滚动 */
body.unlock-overlay-active {
  overflow: hidden;
  position: fixed;
  width: 100%;
}

