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

body {
  background-color: #1e1e2e;
  height: 100vh;
  display: flex;
  color: #e0e0e0;
}

.container {
  display: flex;
  width: 100%;
  height: 100%;
}

.sidebar {
  width: 260px;
  background-color: #0f0f17;
  color: #e0e0e0;
  padding: 20px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 30px;
}

.logo img {
  width: 24px;
  height: 24px;
}

.logo h1 {
  font-size: 20px;
  font-weight: 500;
}

.new-chat-button {
  background-color: #1e1e2e;
  color: #e0e0e0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  padding: 12px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.3s;
  margin-bottom: 20px;
  text-align: left;
}

.new-chat-button:hover {
  background-color: #2d2d3a;
}

.account-button {
  background-color: #2d2d3a;
  color: #e0e0e0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  padding: 12px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.3s;
  margin-bottom: 20px;
  text-align: left;
}

.account-button:hover {
  background-color: #3d3d4a;
}

.group-chat-button {
  display: none;
  background-color: #2d2d3a;
  color: #e0e0e0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  padding: 12px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.3s;
  margin-bottom: 20px;
  text-align: left;
}

.group-chat-button:hover {
  background-color: #3d3d4a;
}

.group-chat-button.active {
  background-color: #ff8a3c;
  color: white;
}

.sidebar-divider {
  height: 1px;
  background-color: #383846;
  margin: 10px 0 20px 0;
}

.chat-history-container {
  flex: 1;
  overflow-y: auto;
}

.chat-history-list {
  margin-top: 10px;
}

.chat-history-container h3 {
  font-size: 14px;
  font-weight: 500;
  color: #a0a0b0;
  margin-bottom: 10px;
}

.chat-history-item {
  padding: 10px 12px;
  margin-bottom: 6px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-history-item:hover {
  background-color: #2d2d3a;
}

.chat-history-item.active {
  background-color: #ff8a3c;
  color: white;
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  background-color: #1e1e2e;
}

.header {
  padding: 15px 20px;
  background-color: #1e1e2e;
  border-bottom: 1px solid #383846;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.model-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

.ai-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.model-info h2 {
  font-size: 16px;
  font-weight: 600;
  color: #e0e0e0;
}

.model-info p {
  font-size: 13px;
  color: #a0a0b0;
}

.chat-container {
  flex: 1;
  padding: 40px 10%;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
  background-color: #1e1e2e;
}

.chat-message {
  display: flex;
  max-width: 100%;
}

.chat-message.user {
  justify-content: flex-end;
}

.chat-message.assistant {
  justify-content: flex-start;
}

.message-content {
  padding: 14px 18px;
  border-radius: 12px;
  max-width: 80%;
  word-wrap: break-word;
  font-size: 15px;
  line-height: 1.5;
}

.user .message-content {
  background-color: #ff8a3c;
  color: white;
}

.assistant .message-content {
  background-color: #2d2d3a;
  color: #e0e0e0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

pre {
  background-color: #1e1e2e;
  border-radius: 6px;
  padding: 12px;
  margin: 10px 0;
  overflow-x: auto;
}

code {
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 13px;
}

.copy-button {
  position: absolute;
  top: 8px;
  right: 8px;
  background-color: rgba(255, 255, 255, 0.1);
  color: #a0a0b0;
  border: none;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 12px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s;
}

.code-block-wrapper {
  position: relative;
}

.code-block-wrapper:hover .copy-button {
  opacity: 1;
}

.copy-button:hover {
  background-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.chat-input-container {
  padding: 20px 10%;
  background-color: #1e1e2e;
  border-top: 1px solid #383846;
}

.chat-input {
  display: flex;
  background-color: #2d2d3a;
  border: 1px solid #383846;
  border-radius: 8px;
  padding: 8px 16px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.chat-input textarea {
  flex: 1;
  padding: 8px 0;
  border: none;
  resize: none;
  font-size: 15px;
  outline: none;
  max-height: 200px;
  background-color: transparent;
  color: #e0e0e0;
}

.chat-controls {
  display: flex;
  align-items: center;
}

.chat-input-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.file-upload {
  margin-right: 10px;
  cursor: pointer;
  color: #a0a0b0;
  display: flex;
  align-items: center;
}

.file-upload:hover {
  color: #e0e0e0;
}

.file-upload input {
  display: none;
}

.image-preview {
  max-width: 100%;
  max-height: 200px;
  margin: 10px 0;
  border-radius: 8px;
  cursor: pointer;
}

.message-image {
  max-width: 100%;
  max-height: 300px;
  border-radius: 8px;
  margin-top: 10px;
}

.send-button {
  width: 32px;
  height: 32px;
  background-color: #ff8a3c;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s;
}

.send-button:hover {
  background-color: #ff9d5c;
}

.send-button:disabled {
  background-color: #383846;
  cursor: not-allowed;
}

.send-button svg {
  width: 18px;
  height: 18px;
}

.status-info {
  margin-top: 10px;
  font-size: 13px;
  color: #a0a0b0;
}

.usage-bar-container {
  width: 180px;
  background-color: #2d2d3a;
  border-radius: 6px;
  padding: 6px 10px;
}

.usage-bar {
  height: 6px;
  background-color: #ff8a3c;
  border-radius: 3px;
  width: 0%;
  transition: width 0.5s ease-in-out;
}

.usage-text {
  font-size: 11px;
  color: #a0a0b0;
  margin-top: 4px;
  text-align: right;
}

.multiplayer-container {
  display: none;
  flex: 1;
  display: flex;
  flex-direction: column;
  background-color: #1e1e2e;
  overflow: hidden;
}

#multiplayerChatContainer {
  flex: 1;
  padding: 40px 10%;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
  background-color: #1e1e2e;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}

.user-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
}

.user-info .username {
  font-size: 12px;
  font-weight: 500;
  color: #a0a0b0;
}

.lobby-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.lobby-message {
  margin-bottom: 10px;
  font-size: 14px;
  line-height: 1.4;
}

.lobby-message .username {
  font-weight: 600;
  color: #ff8a3c;
  margin-right: 6px;
}

.lobby-message .timestamp {
  font-size: 11px;
  color: #a0a0b0;
  margin-left: 6px;
}

.lobby-input-container {
  display: flex;
  padding: 10px;
  border-top: 1px solid #444456;
}

.lobby-input-container input {
  flex: 1;
  background-color: #1e1e2e;
  border: 1px solid #383846;
  border-radius: 4px;
  padding: 8px 12px;
  font-size: 14px;
  color: #e0e0e0;
  outline: none;
}

.lobby-input-container button {
  background-color: #ff8a3c;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 8px 12px;
  margin-left: 8px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.lobby-input-container button:hover {
  background-color: #ff9d5c;
}

.image-caption {
  font-size: 12px;
  color: #a0a0b0;
  margin-top: 4px;
  text-align: center;
}

@media (max-width: 768px) {
  .sidebar {
    display: none;
  }
  
  .chat-container {
    padding: 20px 5%;
  }
  
  .chat-input-container {
    padding: 10px 5%;
  }
  
  .message-content {
    max-width: 90%;
  }
}