* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Microsoft YaHei", Arial, sans-serif;
  background: #f3f6fb;
  color: #111827;
}

.page {
  min-height: 100vh;
  padding: 30px 0;
}

.container {
  width: 90%;
  max-width: 900px;
  margin: 0 auto;
}

h1 {
  text-align: center;
  color: #1e3a8a;
  margin-bottom: 24px;
}

.intro {
  background: #eaf1ff;
  padding: 18px 22px;
  border-radius: 12px;
  line-height: 1.8;
  font-size: 17px;
  margin-bottom: 22px;
}

.card {
  background: #ffffff;
  padding: 22px;
  margin-bottom: 22px;
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

label {
  display: block;
  font-weight: bold;
  font-size: 18px;
  margin-bottom: 10px;
}

input,
textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 13px;
  font-size: 16px;
  outline: none;
}

input:focus,
textarea:focus {
  border-color: #2563eb;
}

textarea {
  height: 180px;
  resize: vertical;
  line-height: 1.7;
}

.tip {
  color: #6b7280;
  font-size: 14px;
  margin-top: 10px;
}

.btn-row {
  margin-top: 18px;
  display: flex;
  gap: 14px;
}

button {
  border: none;
  padding: 12px 22px;
  font-size: 16px;
  border-radius: 10px;
  cursor: pointer;
  color: white;
  background: #2563eb;
}

button:hover {
  background: #1d4ed8;
}

button:disabled {
  background: #93c5fd;
  cursor: not-allowed;
}

.gray-btn {
  background: #6b7280;
}

.gray-btn:hover {
  background: #4b5563;
}

.loading {
  background: #fff7d6;
  color: #92400e;
  border-left: 5px solid #f59e0b;
  padding: 14px 18px;
  border-radius: 10px;
  margin-bottom: 20px;
  font-weight: bold;
}

.error {
  background: #ffe4e6;
  color: #be123c;
  border-left: 5px solid #e11d48;
  padding: 14px 18px;
  border-radius: 10px;
  margin-bottom: 20px;
  font-weight: bold;
  white-space: pre-wrap;
}

.hidden {
  display: none;
}

.chat-box {
  min-height: 200px;
  line-height: 1.8;
}

.message {
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 16px;
  white-space: pre-wrap;
  word-break: break-word;
}

.user-message {
  background: #eaf1ff;
  border-left: 5px solid #2563eb;
}

.ai-message {
  background: #f3f4f6;
  border-left: 5px solid #4b5563;
}

.empty-text {
  color: #9ca3af;
}