* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Arial', sans-serif;
}

body {
  background-color: #f0f8ff;
  padding: 20px;
}

.container {
  max-width: 600px;
  margin: 0 auto;
  background-color: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

h1 {
  color: #4a6fa5;
  text-align: center;
  margin-bottom: 10px;
}

p {
  text-align: center;
  color: #666;
  margin-bottom: 20px;
}

.tab-container {
  display: flex;
  margin-bottom: 20px;
  border-bottom: 1px solid #ddd;
}

.tab-button {
  padding: 10px 20px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: #666;
  position: relative;
}

.tab-button.active {
  color: #4a6fa5;
  font-weight: bold;
}

.tab-button.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: #4a6fa5;
}

.chat-interface {
  margin-bottom: 20px;
}

.chat-history {
  height: 200px;
  overflow-y: auto;
  border: 1px solid #ddd;
  padding: 10px;
  border-radius: 5px;
  margin-bottom: 10px;
  background-color: #f9f9f9;
}

.message {
  margin-bottom: 10px;
  padding: 8px 12px;
  border-radius: 18px;
  max-width: 80%;
  word-wrap: break-word;
}

.user-message {
  background-color: #dcf8c6;
  margin-left: auto;
  border-bottom-right-radius: 5px;
}

.ai-message {
  background-color: #e5e5ea;
  margin-right: auto;
  border-bottom-left-radius: 5px;
}

.input-area {
  display: flex;
  gap: 10px;
  align-items: center;
}

#user-input {
  flex: 1;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 16px;
}

#send-button {
  padding: 10px 20px;
  background-color: #4a6fa5;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s;
}

#send-button:hover {
  background-color: #3a5a80;
}

.upload-label {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: #4a6fa5;
  color: white;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.upload-label:hover {
  background-color: #3a5a80;
}

.creation-options {
  margin-bottom: 20px;
}

.options-panel {
  display: none;
  background-color: #f5f5f5;
  padding: 15px;
  border-radius: 5px;
}

.options-panel.active {
  display: block;
}

.option-group {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
}

.option-group label {
  width: 100px;
  color: #555;
  font-size: 14px;
}

.option-group select, .option-group input {
  flex: 1;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.reference-images-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 15px;
}

.reference-image-container {
  position: relative;
  width: 100px;
}

.reference-preview {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 5px;
  display: block;
}

.remove-image-btn {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: rgba(255, 0, 0, 0.7);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.thinking-display {
  background-color: #f5f5f5;
  border-radius: 8px;
  padding: 15px;
  margin-top: 20px;
  display: none;
  line-height: 1.5;
  font-size: 0.9rem;
  color: #555;
  border-left: 3px solid #4a6fa5;
}

.image-display {
  text-align: center;
  margin-top: 20px;
  min-height: 200px;
}

.image-display img, .image-display video {
  max-width: 100%;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.loading {
  margin: 20px auto;
  text-align: center;
  color: #666;
}

.loading-dots {
  display: inline-block;
}

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

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

#duration-display {
  margin-left: 10px;
  font-size: 14px;
  color: #555;
}

@media (max-width: 768px) {
  .container {
    padding: 15px;
  }
  
  .chat-history {
    height: 180px;
  }
  
  #user-input, #send-button {
    font-size: 14px;
  }
  
  .reference-image-container {
    width: 80px;
  }
  
  .reference-preview {
    width: 80px;
    height: 80px;
  }
}

