:root {
  --primary-color: #6e40c9;
  --primary-light: #8d6bd8;
  --primary-dark: #5a32b0;
  --bg-color: #ffffff;
  --sidebar-bg: #f7f7f8;
  --chat-bg: #ffffff;
  --user-bg: #f7f7f8;
  --bot-bg: #f7f7f8;
  --text-color: #1a1a1a;
  --text-secondary: #666666;
  --input-bg: #ffffff;
  --border-color: #e5e5e6;
  --border-radius: 12px;
  --box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  height: 100vh;
  overflow: hidden;
}

.app-container {
  display: flex;
  height: 100vh;
  width: 100%;
}
.sidebar {
  width: 260px;
  background-color: var(--sidebar-bg);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform 0.3s ease;
  z-index: 10;
}

.sidebar-header {
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.new-chat-btn {
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

.new-chat-btn:hover {
  background-color: var(--primary-dark);
}

.sidebar-toggle {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 16px;
  padding: 8px;
  border-radius: 6px;
  display: none;
}

.sidebar-toggle:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.chat-history {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.history-item {
  padding: 10px 12px;
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  margin-bottom: 4px;
}

.history-item:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.history-item.active {
  background-color: rgba(110, 64, 201, 0.1);
  color: var(--primary-color);
}

.history-item i {
  font-size: 16px;
}

.sidebar-footer {
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-color);
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.settings-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 16px;
  padding: 6px;
  border-radius: 6px;
}
.settings-btn:hover {
  background-color: rgba(0, 0, 0, 0.05);
}
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.model-info {
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-bottom: 1px solid var(--border-color);
  background-color: var(--bg-color);
  z-index: 1;
}

.model-tag {
  background-color: var(--primary-light);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.chat-container {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.chat-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  padding-bottom: 0;
  scroll-behavior: smooth;
}
.welcome-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 0;
}

.welcome-logo {
  margin-bottom: 24px;
}

.logo-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(110, 64, 201, 0.2);
}

.welcome-message h1 {
  font-size: 32px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-color);
}

.welcome-message p {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 32px;
  max-width: 600px;
}

.suggestions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  width: 100%;
  max-width: 600px;
  margin-top: 24px;
}

.suggestion-card {
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.suggestion-card:hover {
  background-color: var(--user-bg);
  border-color: var(--primary-light);
}

.suggestion-card i {
  color: var(--primary-color);
  font-size: 18px;
}

.suggestion-card span {
  font-size: 14px;
  font-weight: 500;
}
.chat-message {
  display: flex;
  max-width: 800px;
  margin: 0 auto 24px;
  padding: 16px 0;
}

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

.bot-message {
  justify-content: flex-start;
}

.user-avatar, .bot-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 16px;
  flex-shrink: 0;
  font-weight: 600;
}

.user-avatar {
  background-color: var(--primary-color);
  color: white;
}

.bot-avatar {
  background-color: var(--primary-light);
  color: white;
}
.message-content {
  max-width: calc(100% - 60px);
}

.user-message .message-content {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
.bot-message .message-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.message-text {
  padding: 12px 16px;
  border-radius: var(--border-radius);
  font-size: 15px;
  line-height: 1.5;
  word-wrap: break-word;
}
.user-message .message-text {
  background-color: var(--primary-color);
  color: white;
  border-top-right-radius: 4px;
}

.bot-message .message-text {
  background-color: var(--bot-bg);
  color: var(--text-color);
  border-top-left-radius: 4px;
}
.message-time {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 6px;
}
.input-container {
  padding: 16px;
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-color);
}
.input-box {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}
.input-box textarea {
  width: 100%;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 12px 50px 12px 16px;
  font-size: 15px;
  resize: none;
  outline: none;
  background-color: var(--input-bg);
  color: var(--text-color);
  min-height: 50px;
  max-height: 200px;
  transition: border-color 0.2s;
}
.input-box textarea:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 2px rgba(110, 64, 201, 0.1);
}
.input-actions {
  position: absolute;
  right: 12px;
  bottom: 12px;
}
.send-button {
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s;
}
.send-button:hover {
  background-color: var(--primary-dark);
}
.send-button:disabled {
  background-color: var(--text-secondary);
  cursor: not-allowed;
}
.disclaimer {
  text-align: center;
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 12px;
  padding: 0 20px;
}
@media (max-width: 768px) {
  .sidebar {
    position: absolute;
    transform: translateX(-100%);
  }
  
  .sidebar.open {
    transform: translateX(0);
  }
  
  .sidebar-toggle {
    display: block;
  }
  
  .suggestions {
    grid-template-columns: 1fr;
  }
  
  .chat-message {
    margin-bottom: 16px;
  }
  
  .message-text {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .welcome-message h1 {
    font-size: 24px;
  }
  
  .welcome-message p {
    font-size: 14px;
  }
  
  .input-box {
    padding: 0 8px;
  }
}
.settings-popup {
  position: absolute;
  bottom: 80px;
  left: 20px;
  background: #fff;
  border: 1px solid #ccc;
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  z-index: 1000;
  width: 150px;
}

.popup-btn {
  display: block;
  width: 100%;
  padding: 8px 10px;
  margin-bottom: 5px;
  background-color: #f7f7f7;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  font-family: 'Inter', sans-serif;
}

.popup-btn:hover {
  background-color: #e5e5e5;
}

.hidden {
  display: none;
}
body.theme-dark {
  --bg-color: #1a1a1a;
  --text-color: #fff;
  --bg-color: #121212;
  --sidebar-bg: #1e1e1e;
  --chat-bg: #1a1a1a;
  --user-bg: #222;
  --bot-bg: #2a2a2a;
  --text-color: #f0f0f0;
  --text-secondary: #aaa;
  --input-bg: #1e1e1e;
  --border-color: #333;
  --box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}
body.theme-light {
  --bg-color: #fff;
  --text-color: #111;
}
