* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  background: linear-gradient(135deg, #fff2f6 0%, #d1e1ff 100%);
  min-height: 100vh;
  padding: 20px;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 40px);
}

.main-content {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 30px;
  flex: 1;
  overflow: hidden;
}

.form-section {
  background: white;
  padding: 25px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #667eea;
}

.remark {
  margin-top: 20px;
  font-size: 12px;
  color: #666;
}

.btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: auto;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

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

.result-section {
  background: white;
  padding: 10px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  height: 100%;
  overflow: hidden;
}

.result-content {
  display: flex;
  flex-direction: column;
  gap: 15px;
  flex: 1;
  overflow-y: auto;
}

.state-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  text-align: center;
  color: #999;
  font-size: 14px;
  padding: 20px;
}

.loading-container {
  text-align: center;
  color: #666;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #e0e0e0;
  border-top: 4px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

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

.thinking-bubble-container {
  width: 100%;
  /* border: 1px solid #e0e0e0; */
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

.thinking-header {
  padding: 12px 16px;
  /* background: #f5f5f5; */
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s;
  /* border-bottom: 1px solid #e0e0e0; */
}

.thinking-header:hover {
  background: #f6f6f6;
}

.thinking-header .title {
  font-weight: 600;
  color: #333;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.thinking-header .arrow {
  transition: transform 0.3s;
  font-size: 12px;
}

.thinking-header.expanded .arrow {
  transform: rotate(180deg);
}

.thinking-content {
  padding: 5px 15px;
  font-family: "Consolas", "Monaco", monospace;
  font-size: 12px;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-y: auto;
  flex: 1;
  max-height: 150px;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.thinking-content.hidden {
  max-height: 0;
  padding: 0 15px;
  overflow: hidden;
}

.no-data {
  padding: 20px;
  background: #fff8e1;
  border: 1px solid #ffc107;
  border-radius: 8px;
  margin: 10px 0;
  color: #e65100;
  font-size: 14px;
  line-height: 1.6;
}

.answer-box {
  flex: 1;
  /* border: 1px solid #e0e0e0; */
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 70%;
}

.answer-header {
  padding: 10px;
  background: #f9f9f9;
  font-weight: 600;
  color: #333;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.answer-content {
  padding: 5px 25px;
  font-family: "Consolas", "Monaco", monospace;
  flex: 1;
  overflow-y: auto;
  font-size: 14px;
  white-space: pre-wrap;
  word-wrap: break-word;
  color: #333;
}

.hidden {
  display: none !important;
}

/* 自定义提示框样式 */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: white;
  padding: 12px 16px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  max-width: 300px;
  animation: slideIn 0.3s ease-out;
  border-left: 4px solid #667eea;
}

.toast.success {
  border-left-color: #4caf50;
}

.toast.error {
  border-left-color: #f44336;
}

.toast.info {
  border-left-color: #2196f3;
}

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

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

.toast.fade-out {
  animation: slideOut 0.3s ease-in;
}

@media (max-width: 900px) {
  .main-content {
    grid-template-columns: 1fr;
  }
  .container {
    height: auto;
  }
}

/* Mini 模式 - 隐藏表单后撑满宽度 */
.main-content.mini-mode {
  grid-template-columns: 1fr;
}