body {
  font-size: 16px;
  line-height: 1.6;
  margin: 20px;
}

.app-container {
  max-width: 600px;
}

input,
button,
textarea {
  display: block;
  width: 300px;
  padding: 5px;
  margin: 5px 0;
  box-sizing: border-box;
}

input[type="checkbox"] {
  display: inline;
  width: auto;
  margin: 0 5px 0 0;
}

label {
  display: inline;
}

a {
  display: block;
  margin: 5px 0;
  text-decoration: none;
}

.nav-menu {
  margin: 20px 0;
}

.nav-menu a {
  display: inline;
  margin: 0 10px 0 0;
  font-weight: normal;
  text-decoration: none;
}

.nav-menu a.active {
  font-weight: bold;
  pointer-events: none;
  color: #333;
}

.error {
  color: red;
}

.success {
  color: green;
}

.hidden {
  display: none;
}

.list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.list-item a {
  margin: 0;
  flex-grow: 1;
}

.delete-btn {
  background: #dc3545;
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 3px;
  cursor: pointer;
  width: auto;
  margin: 0 0 0 10px;
}

.delete-btn:hover {
  background: #c82333;
}

.delete-btn:disabled {
  background: #6c757d;
  cursor: not-allowed;
  opacity: 1;
}

.delete-btn:disabled:hover {
  background: #6c757d;
}

.edit-btn {
  background: #28a745;
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 3px;
  cursor: pointer;
  width: auto;
  margin: 0 0 0 10px;
}

.edit-btn:hover {
  background: #218838;
}

.create-options {
  display: flex;
  gap: 15px;
  margin: 20px 0;
  align-items: center;
}

.create-btn {
  background: #007bff;
  color: white;
  padding: 10px 20px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  display: inline-block;
  margin: 0;
}

.create-btn:hover {
  background: #0056b3;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

.ai-creator-btn {
  background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #ffd93d);
  background-size: 300% 300%;
  color: white;
  padding: 6px 12px;
  border-radius: 15px;
  text-decoration: none;
  font-weight: bold;
  font-size: 16px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.4s ease;
  animation: gradient-shift 3s ease infinite;
  display: inline-block;
  margin: 0;
  position: relative;
  overflow: hidden;
}

.ai-creator-btn:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  animation-duration: 1s;
}

.ai-creator-btn:active {
  transform: translateY(-1px) scale(1.02);
}

@keyframes gradient-shift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.image-container {
  width: 300px;
  height: 300px;
  border: 2px dashed #ccc;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 20px 0;
  background-color: #f9f9f9;
  color: #666;
  text-align: center;
}

input:disabled,
textarea:disabled {
  background-color: #ffffff;
  color: #000000;
  opacity: 1;
  border-color: #dee2e6;
}

button:disabled {
  opacity: 0.6;
}

.loading-dots::after {
  content: "";
  animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
  0%,
  20% {
    content: "";
  }
  40% {
    content: ".";
  }
  60% {
    content: "..";
  }
  80%,
  100% {
    content: "...";
  }
}

.card-link {
  display: flex;
  align-items: center;
  overflow: hidden;
  width: 100%;
}

.card-name {
  flex-shrink: 0;
  margin-right: 0;
}

.card-description {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.message-item {
  margin-bottom: 15px;
  padding: 10px;
  border-left: 3px solid;
  background-color: #f8f9fa;
  border-radius: 0 4px 4px 0;
}

.message-color-0 {
  border-left-color: #5a9bd5;
}
.message-color-1 {
  border-left-color: #6bb88a;
}
.message-color-2 {
  border-left-color: #d9914a;
}
.message-color-3 {
  border-left-color: #a76dba;
}

.message-content {
  white-space: pre-wrap;
}

.message-view-clickable {
  cursor: pointer;
}

/* Full width button for AI message generation */
div[x-show*="conversation-detail"] button[type="button"] {
  width: 100%;
}

/* User message textarea styling */
.user-message-textarea {
  width: 100%;
  height: auto;
}

/* Scenario prompt input styling */
.scenario-prompt-input {
  width: 100%;
  margin: 10px 0;
}

/* Message edit form styling */
.message-edit-textarea {
  width: 100%;
  margin: 5px 0;
  resize: vertical;
  min-height: 400px;
}

.message-edit-buttons {
  display: flex;
  gap: 10px;
}

.message-edit-buttons button {
  flex: 1;
}
