.ai-page {
  min-height: 100vh;
  background: #f0f0f0;
  font-family: Arial, sans-serif;
}

.ai-shell {
  width: min(100%, 840px);
  margin: 0 auto;
  padding: 20px;
}

.ai-container {
  min-height: calc(100vh - 40px);
  padding: 20px;
  border-radius: 8px;
  background: white;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.ai-homebutton {
  float: right;
  padding: 10px 20px;
  border-radius: 4px;
  background: #4caf50;
  color: white;
  text-decoration: none;
}

.ai-homebutton:hover,
.ai-homebutton:focus-visible {
  background: #45a049;
}

.ai-container h1 {
  margin-top: 40px;
  text-align: center;
}

.ai-status-box {
  display: flex;
  width: min(100%, 300px);
  min-height: 42px;
  margin: 8px auto 20px;
  padding: 8px;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background: rgba(230, 136, 22, 0.588);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.ai-status-box p {
  margin: 0;
}

.ai-note {
  font-size: 0.9rem;
}

.ai-input-box {
  margin-bottom: 20px;
}

.ai-input-box textarea {
  width: 100%;
  min-height: 150px;
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  resize: vertical;
  font: inherit;
}

.ai-input-box button {
  padding: 10px 20px;
  border: 0;
  border-radius: 4px;
  background: #4caf50;
  color: white;
  font: inherit;
  cursor: pointer;
}

.ai-input-box button:hover,
.ai-input-box button:focus-visible {
  background: #45a049;
}

.ai-input-box button:disabled {
  opacity: 0.65;
  cursor: wait;
}

.chat-message {
  margin: 10px 0;
  padding: 10px;
  border-radius: 4px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.user-message {
  margin-left: 20%;
  background: #e3f2fd;
}

.ai-message {
  margin-right: 20%;
  background: #f5f5f5;
}

.ai-message.error {
  background: #ffd6d6;
  color: #721c24;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 600px) {
  .ai-shell {
    padding: 0;
  }

  .ai-container {
    min-height: 100vh;
    border-radius: 0;
  }

  .user-message {
    margin-left: 8%;
  }

  .ai-message {
    margin-right: 8%;
  }
}
