/* Think按钮禁用状态 */
.think-btn.disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* 消息提示 */
.message-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.message {
  padding: 12px 20px;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  animation: slideIn 0.3s ease;
  color: white;
  min-width: 250px;
}

.message-success {
  background-color: #27ae60;
}

.message-error {
  background-color: #e74c3c;
}

.message-warning {
  background-color: #f39c12;
}

.message-info {
  background-color: #3498db;
}

.fade-out {
  opacity: 0;
  transition: opacity 0.5s ease;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Think模式对话框 */
.think-dialog {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.think-dialog-content {
  width: 800px;
  max-width: 90%;
  max-height: 90vh;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.think-dialog-header {
  padding: 15px 20px;
  background-color: #2d2d2d;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #ddd;
}

.think-dialog-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
}

.think-close-btn {
  background: none;
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.think-close-btn:hover {
  opacity: 1;
}

.think-dialog-body {
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* 输入区域样式 */
.think-description {
  margin-bottom: 15px;
  color: #555;
  font-size: 14px;
}

.think-input-container {
  margin-bottom: 15px;
}

#think-input {
  width: 100%;
  min-height: 100px;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  resize: vertical;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
}

#think-input:focus {
  outline: none;
  border-color: #4a7bff;
  box-shadow: 0 0 0 2px rgba(74, 123, 255, 0.2);
}

.think-controls {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

#think-submit-btn {
  background-color: #4a7bff;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 8px 16px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s;
}

#think-submit-btn:hover {
  background-color: #3a6bed;
}

.think-option {
  margin-left: 15px;
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 14px;
  color: #555;
}

.think-option input {
  margin-right: 5px;
}

/* 结果区域样式 */
.think-result-area {
  border: 1px solid #ddd;
  border-radius: 4px;
  min-height: 200px;
  max-height: 400px;
  overflow-y: auto;
  background-color: #fafafa;
  padding: 0;
  flex: 1;
}

.think-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #888;
  font-style: italic;
  padding: 20px;
  text-align: center;
}

.think-result {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.think-result-header {
  padding: 10px 15px;
  background-color: #f0f0f0;
  border-bottom: 1px solid #ddd;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.think-result-header h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
}

.think-progress {
  flex: 1;
  height: 6px;
  background-color: transparent;
  border-radius: 3px;
  margin-left: 15px;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 新的动态动画样式 */
.think-progress-animation {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.think-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #4a7bff;
  animation: think-dot-bounce 1.4s infinite ease-in-out;
}

.think-dot:nth-child(1) {
  animation-delay: -0.32s;
}

.think-dot:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes think-dot-bounce {
  0%, 80%, 100% { 
    transform: scale(0.6);
    opacity: 0.6;
  }
  40% { 
    transform: scale(1.2);
    opacity: 1;
    box-shadow: 0 0 10px rgba(74, 123, 255, 0.6);
  }
}

/* 移除原有的进度条样式 */
.think-progress-bar {
  display: none;
  /* 原来的样式被注释掉
  height: 100%;
  width: 0%;
  background-color: #4a7bff;
  background-image: linear-gradient(to right, #4a7bff, #5a8bff);
  transition: width 0.3s ease, background-color 0.3s ease;
  border-radius: 3px;
  position: relative;
  z-index: 2;
  box-shadow: 0 0 3px rgba(74, 123, 255, 0.5); 
  */
}

@keyframes progress-shine {
  0% {
    transform: translateX(0%);
  }
  100% {
    transform: translateX(400%);
  }
}

.think-result-content {
  padding: 15px;
  overflow-y: auto;
  flex: 1;
  font-size: 14px;
  line-height: 1.6;
  animation: content-fade-in 0.4s ease;
}

@keyframes content-fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.think-result-placeholder {
  color: #888;
  font-style: italic;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100px;
}

.think-result-actions {
  padding: 10px 15px;
  background-color: #f5f5f5;
  border-top: 1px solid #ddd;
  display: flex;
  gap: 10px;
}

.think-result-actions button {
  background-color: #f0f0f0;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
}

.think-result-actions button:hover {
  background-color: #e5e5e5;
}

.think-result-actions button i {
  font-size: 12px;
}

/* 思考过程容器 */
.think-process-container {
  margin-bottom: 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  overflow: hidden;
}

.think-process-header {
  padding: 8px 12px;
  background-color: #f0f0f0;
  border-bottom: 1px solid #ddd;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.think-process-header span {
  font-weight: 500;
  font-size: 14px;
  color: #555;
}

.think-process-toggle {
  background: none;
  border: none;
  color: #4a7bff;
  cursor: pointer;
  font-size: 13px;
}

.think-process-content {
  padding: 10px;
  max-height: 200px;
  overflow-y: auto;
  background-color: #f9f9f9;
  font-size: 13px;
  line-height: 1.5;
  color: #666;
}

/* 加载动画 */
.think-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  gap: 15px;
  animation: fadeIn 0.4s ease;
}

.think-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(74, 123, 255, 0.2);
  border-radius: 50%;
  border-top-color: #4a7bff;
  animation: think-spin 1s linear infinite;
  box-shadow: 0 0 15px rgba(74, 123, 255, 0.1);
  position: relative;
}

.think-spinner::before,
.think-spinner::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  opacity: 0.6;
}

.think-spinner::before {
  width: 48px;
  height: 48px;
  border: 1px solid rgba(74, 123, 255, 0.1);
  animation: think-pulse 2s ease-out infinite;
}

.think-spinner::after {
  width: 56px;
  height: 56px;
  border: 1px solid rgba(74, 123, 255, 0.1);
  animation: think-pulse 2s ease-out 0.5s infinite;
}

@keyframes think-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes think-pulse {
  0% {
    width: 40px;
    height: 40px;
    opacity: 0.8;
  }
  100% {
    width: 70px;
    height: 70px;
    opacity: 0;
  }
}

.think-loading p {
  color: #666;
  text-align: center;
  margin: 0;
  animation: text-pulse 1.5s infinite;
}

@keyframes text-pulse {
  0%, 100% {
    opacity: 0.7;
  }
  50% {
    opacity: 1;
  }
}

/* 错误状态 */
.think-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  color: #f44336;
  text-align: center;
}

.think-error i {
  font-size: 24px;
  margin-bottom: 10px;
}

.think-error p {
  margin: 5px 0;
}

.think-error-details {
  font-size: 12px;
  color: #888;
  margin-top: 10px;
}

.btn-copy-result {
  background-color: #f1f1f1;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-copy-result:hover {
  background-color: #e1e1e1;
}

/* 思考动画替代文字 */
.think-dots-animation {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  height: 16px;
}

.think-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #4a7bff;
  margin: 0 3px;
  opacity: 0.85;
  animation: think-dot-pulse 1.2s infinite ease-in-out;
}

.think-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.think-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes think-dot-pulse {
  0%, 100% {
    transform: scale(0.8);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.2);
    opacity: 1;
    box-shadow: 0 0 4px rgba(74, 123, 255, 0.6);
  }
} 