* {
  margin: 0;
  padding: 0;
  font-size: 15px;
  box-sizing: border-box;
  font-family: -apple-system, Arial, sans-serif;
}

body {
  background-color: #f5f5f5;
  color: #333;
  line-height: 1.6;
  position: relative;
}

.info-section {
  padding: 12px 15px;
  background-color: #f0f8ff;
  border-bottom: 1px solid #e0e0e0;
  font-size: 14px;
  color: #555;
  text-align: center;
}

.chat-container {
  max-width: 100%;
  height: 100vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background-color: #fff;
}

.chat-header {
  height: 50px;
  line-height: 50px;
  background-color: #0066ff;
  color: white;
  text-align: center;
  position: relative;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.chat-header h2 {
  font-size: 18px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.message {
  max-width: calc(90% - 50px);
  padding: 10px 15px;
  border-radius: 15px;
  word-break: break-word;
  animation: fadeIn 0.3s ease;
  position: relative;
  margin-bottom: 5px;
}

.message li {
  margin-left: 16px;
}

.user-message {
  align-self: flex-end;
  background-color: #0066ff;
  color: white;
  border-top-right-radius: 3px;
  margin-right: 50px;
}

.ai-message {
  align-self: flex-start;
  background-color: #f0f0f0;
  color: #333;
  border-top-left-radius: 5px;
  position: relative;
  margin-left: 50px;
}

.ai-message .think {
  color: #8b8b8b;
  border-left: 2px solid #dbdbdb;
  margin-bottom: 4px;
  padding: 0 0 0 10px;
}

.ai-message .think,
.ai-message .think p {
  font-size: 14px;
}

.message.ai-message:before {
  content: "";
  width: 40px;
  height: 40px;
  border: 1px solid #f0f0f0;
  border-radius: 3px;
  background: url(../img/ai.jpg) center center / cover no-repeat;
  position: absolute;
  left: -50px;
  top: 0;
}

.message.user-message:before {
  content: "";
  width: 40px;
  height: 40px;
  border: 1px solid #f0f0f0;
  border-radius: 3px;
  background: url(../img/user.jpg) center center / cover no-repeat;
  position: absolute;
  right: -50px;
  top: 0;
}

.loading svg {
  will-change: transform;
  width: 1em;
  height: 1em;
  animation: 0.6s linear infinite loading;
}

@keyframes loading {
  0% {
    transform: rotate(0);
  }
  100% {
    transform: rotate(360deg);
  }
}

.chat-input {
  display: flex;
  padding: 12px 15px 7px;
  border-top: 1px solid #eaeaea;
  background-color: #fff;
  position: sticky;
  bottom: 5px;
}

.chat-input input {
  width: 0;
  flex: 1;
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 30px;
  outline: none;
  font-size: 15px;
}

.chat-input button {
  margin-left: 10px;
  padding: 0 20px;
  background-color: #0066ff;
  color: white;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  font-size: 15px;
  transition: background-color 0.2s;
}

.chat-input button:disabled {
  background-color: #cccccc;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal {
  background-color: white;
  border-radius: 10px;
  padding: 25px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  animation: modalFadeIn 0.3s ease;
}

.modal-title {
  font-size: 18px;
  font-weight: bold;
  color: #0066ff;
  margin-bottom: 15px;
  text-align: center;
}

.modal-content {
  margin-bottom: 20px;
  line-height: 1.6;
  text-align: justify;
  word-break: break-all;
  max-height: 30vh;
  overflow: auto;
}

.checkbox-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 20px;
  user-select: none;
}

.checkbox-container input {
  margin-right: 6px;
  width: 18px;
  height: 18px;
}

.modal-button {
  width: 100%;
  padding: 10px;
  background-color: #0066ff;
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.modal-button:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
}

.xieyi {
  width: 100%;
  height: 100%;
  font-size: 14px;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 99999;
  background: #fff;
  padding: 10px 20px 20px 30px;
  line-height: 1.5;
  overflow: auto;
  padding-bottom: 60px;
}

.xieyi li {
  margin-bottom: 6px;
  list-style: decimal;
  text-align: justify;
  word-break: break-all;
}

.closeXY {
  width: 100%;
  height: 60px;
  background: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  bottom: 0;
  left: 0;
}

.closeXY button {
  padding: 7px 22px;
  background-color: #0066ff;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  margin-bottom: 5px;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes blink {
  50% {
    opacity: 1;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 768px) {
  .chat-container {
    max-width: 600px;
    height: 100vh;
    margin: 0 auto;
    border-left: 1px solid #eaeaea;
    border-right: 1px solid #eaeaea;
  }

  .info-section {
    max-width: 600px;
    margin: 0 auto;
    border-left: 1px solid #eaeaea;
    border-right: 1px solid #eaeaea;
  }

  .xieyi {
    max-width: 600px;
    left: 50%;
    transform: translateX(-50%);
  }
}
