.captcha-page {
  width: 100%;
  min-height: 100vh;
  height: 100vh;
  padding: 0;
  box-sizing: border-box;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.captcha-loading {
  color: var(--muted);
  font-size: 14px;
}

.captcha-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.captcha-panel {
  display: none;
  width: 100%;
  height: 100%;
}

.captcha-panel.is-active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.captcha-box {
  width: 80%;
  max-width: 420px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  padding: 24px 22px;
  box-sizing: border-box;
  backdrop-filter: blur(10px);
}

.captcha-box--wide {
  max-width: 520px;
}

.captcha-box--tall {
  max-width: 520px;
  height: 70vh;
  max-height: 600px;
  display: flex;
  flex-direction: column;
}

.captcha-title {
  text-align: center;
  margin-bottom: 24px;
}

.captcha-title h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.captcha-row {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: center;
}

.captcha-canvas-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.captcha-canvas {
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  background: #fff;
}

.refresh-hint {
  font-size: 11px;
  color: #999;
  white-space: nowrap;
}

.input-section {
  flex: 1;
  min-width: 120px;
}

.captcha-input {
  width: 100%;
  padding: 10px 12px;
  font-size: 16px;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-sizing: border-box;
}

.loading-tip {
  margin-top: 16px;
  color: var(--accent);
  font-size: 14px;
  text-align: center;
}

.slide-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.puzzle-area {
  position: relative;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.background-canvas,
.puzzle-canvas {
  display: block;
  width: 100%;
  height: auto;
}

.puzzle-canvas {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
}

.refresh-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #ddd;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  font-size: 14px;
  cursor: pointer;
}

.slide-track {
  position: relative;
  height: 50px;
  border: 2px solid #e0e0e0;
  border-radius: 25px;
  background: #f5f5f5;
  overflow: hidden;
  touch-action: none;
}

.track-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--muted);
  font-size: 14px;
}

.slider {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  touch-action: none;
}

.click-captcha {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.verify-prompt {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 80px;
  box-sizing: border-box;
}

.floating-text {
  max-width: 90%;
  font-size: 20px;
  font-weight: 600;
  color: var(--accent);
  text-align: center;
  background: #fff;
  padding: 12px 18px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.question-captcha {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.captcha-page .question-captcha .chat-container {
  flex: 1;
  overflow-y: auto;
  margin-bottom: 20px;
}

.captcha-page .question-captcha .chat-history {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 10px 0;
}

.captcha-page .question-captcha .chat-message {
  display: flex;
}

.captcha-page .question-captcha .message-content {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  max-width: 80%;
}

.captcha-page .question-captcha .bot-message {
  justify-content: flex-start;
}

.captcha-page .question-captcha .user-message {
  justify-content: flex-end;
  margin-left: auto;
}

.captcha-page .question-captcha .user-message .message-content {
  flex-direction: row-reverse;
}

.captcha-page .question-captcha .bot-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.captcha-page .question-captcha .message-bubble {
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.4;
}

.captcha-page .question-captcha .bot-message .message-bubble {
  background: #f0f8ff;
  color: var(--text);
  border-bottom-left-radius: 8px;
}

.captcha-page .question-captcha .user-message .message-bubble {
  background: var(--accent);
  color: #fff;
  border-bottom-right-radius: 8px;
}

.captcha-page .question-captcha .options-container {
  border-top: 1px solid #eee;
  padding-top: 20px;
  text-align: center;
}

.captcha-page .question-captcha .options-title {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 12px;
}

.captcha-page .question-captcha .options-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.captcha-page .question-captcha .option-button {
  min-width: 80px;
  border-radius: 20px;
  padding: 10px 18px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
}
