/* ══════════════════════════════════════
   像素恐龙跳跃验证码 - 样式
   ══════════════════════════════════════ */

/* 遮罩层 */
.dino-captcha-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0);
  backdrop-filter: blur(0px);
  transition: background 0.3s, backdrop-filter 0.3s;
  padding: 16px;
}
.dino-captcha-overlay.is-open {
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

/* 弹窗 */
.dino-captcha-modal {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  transform: translateY(20px) scale(0.95);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s;
}
.dino-captcha-overlay.is-open .dino-captcha-modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* 头部 */
.dino-captcha-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid #f0f0f0;
}
.dino-captcha-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: #333;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.dino-captcha-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  color: #999;
  transition: background 0.15s, color 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dino-captcha-close:hover {
  background: #f5f5f5;
  color: #333;
}

/* Canvas 容器 */
.dino-captcha-canvas-wrap {
  width: 100%;
  height: 160px;
  background: #fafafa;
  position: relative;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.dino-captcha-canvas {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
}

/* 进度条 */
.dino-captcha-progress {
  height: 3px;
  background: #f0f0f0;
  position: relative;
  overflow: hidden;
}
.dino-captcha-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #3b82f6, #6366f1);
  transition: width 0.1s linear;
  border-radius: 0 2px 2px 0;
}
.dino-captcha-progress-bar.success {
  background: linear-gradient(90deg, #16a34a, #22c55e);
  transition: width 0.3s ease;
}
.dino-captcha-progress-bar.fail {
  background: #ef4444;
}

/* 提示文字 */
.dino-captcha-hint {
  padding: 12px 18px;
  text-align: center;
  font-size: 12px;
  color: #888;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  border-top: 1px solid #f0f0f0;
}
.dino-captcha-hint kbd {
  display: inline-block;
  padding: 1px 6px;
  font-size: 11px;
  font-family: "Courier New", monospace;
  background: #f0f0f0;
  border: 1px solid #ddd;
  border-radius: 4px;
  color: #555;
  line-height: 1.4;
}

/* 移动端适配 */
@media (max-width: 520px) {
  .dino-captcha-modal {
    max-width: 100%;
    border-radius: 12px;
  }
  .dino-captcha-canvas-wrap {
    height: 140px;
  }
  .dino-captcha-hint {
    padding: 10px 14px;
    font-size: 11px;
  }
}
