/* General Body Styling */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden; /* Prevent multiple scrollbars */
  background-color: #f4f5f7;
  color: #000;
}

/* Header Styling */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #ffffff;
  padding: 10px 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  height: 60px;
}

.logo {
  width: 100px;
  height: auto;
}

.app-title {
  font-size: 1em;
  font-weight: 550;
  font-style: italic;
  color: #686b71;
}
/* Each section takes full space but is hidden by default */
.section {
  display: none; /* Hide all sections initially */
}

.section.active {
  display: block; /* Only display the active section */
}
/* Main Container */
.main-container {
  display: flex;
  width: 100vw;
  height: calc(100vh - 60px); /* Full height minus header */
  overflow: hidden;
}

/* Sidebar */
.menu-container {
  flex: 0 0 200px;
  background-color: #ffffff;
  display: flex;
  flex-direction: column;
  padding: 20px;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
}

.menu-button {
  font-size: 1.15em;
  font-weight: 500;
  font-family: Arial, Helvetica, sans-serif;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.menu-button.active {
  text-decoration: underline;
  text-decoration-color: green;
  text-decoration-thickness: 2px;
}

.menu-button i {
  margin-right: 10px;
}

#settings {
  margin-top: auto;
  padding: 15px;
  cursor: pointer;
}

/* Character Creation Container */
.character-creation-container {
  width: 60%;
  margin: 0;
  padding: 20px 40px;
  background-color: white;
  border-radius: 8px;
  text-align: left;
}

.character-creation-container h2 {
  text-align: left;
  margin-bottom: 30px;
  color: #333;
}

.input-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
  width: 80%;
}

.input-group label {
  font-weight: bold;
  margin-bottom: 5px;
}

.input-field {
  padding: 10px;
  font-size: 1em;
  border: 3px solid #4caf50;
  border-radius: 5px;
  width: 100%;
}

#character-background {
  height: 150px;
  font-size: 1em;
  resize: none;
  overflow-y: scroll;
  max-height: 150px;
}

.traits-container {
  display: flex;
  justify-content: flex-start;
  gap: 20px;
  margin-bottom: 20px;
}

.submit-button {
  background-color: #4caf50;
  color: white;
  padding: 12px 25px;
  border-radius: 5px;
  border: none;
  font-weight: bold;
  cursor: pointer;
  margin-top: 20px;
  display: block;

  font-size: 1em;
}

.submit-button:hover {
  background-color: #45a049;
}

.menu-container {
  background-color: #e6e6e6;
  padding: 20px 10px;
  border-right: 1px solid #ddd;
}

#settings-section {
  padding: 10px;
}

.chat-input {
  display: none;
}

/* Content Section (Chat/Data/Settings) */
.content-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 20px;
  overflow-y: auto;
}

/* Chat Section */
.chat-container {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding-bottom: 60px;
  overflow-y: auto;
}

#chat-box {
  display: flex;
  flex-direction: column;
  flex: 1; /* Takes all available space */
  overflow-y: auto; /* Enable scrolling for the chat messages */
  background-color: #f5f5f5;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 60px;
}

/* Chat Messages */
.chat-message {
  display: flex;
  align-items: flex-start;
  margin-bottom: 15px;
}

.chat-message.user {
  justify-content: flex-end;
}

.chat-message.user .message-bubble {
  background-color: #d1f7c4;
  border-radius: 20px;
  padding: 10px;
  max-width: 60%;
  margin-right: 10px;
}

.chat-message.bot .message-bubble {
  background-color: #82d182;
  border-radius: 20px;
  padding: 10px;
  max-width: 60%;
  margin-left: 10px;
}

.timestamp {
  align-self: center;
  margin-left: 10px;
  font-size: 0.8em;
  color: #4e4e4e;
}

/* Avatar Styles */
.avatar {
  width: 40px;
  height: 40px;
  margin-right: 10px;
}

.chat-message.user .avatar {
  margin-left: 10px;
}

.chat-message.bot .avatar {
  margin-right: 10px;
}

/* Chat Input */
#chat-input-container {
  display: flex;
  position: fixed;
  bottom: 0;
  left: 225px;
  right: 0;
  background-color: white;
  padding: 15px;

  box-sizing: border-box;
  z-index: 10;
  transition: left 0.3s ease;

  transition: left 0.3s ease;
}

#chat-input {
  flex: 1;
  padding: 10px;
  border-radius: 25px;
  border: 1px solid #ddd;
  margin-right: 10px;
}

.send-button {
  background-color: #4caf50;
  color: white;
  padding: 10px 20px;
  border-radius: 25px;
  border: none;
  cursor: pointer;
}

/* Data Section */
.collection-list-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 20px;
  background-color: #ffffff;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.upload-button {
  padding: 10px 20px;
  background-color: green;
  border-radius: 8px;
  border: none;
  color: white;
  font-weight: bold;
  font-size: 1.1em;
  cursor: pointer;
  margin-bottom: 20px;
}

.upload-button:hover {
  background-color: rgb(10, 46, 10);
}

/* Collection Table Styling */
.collection-list {
  width: 100%;
  border-collapse: collapse;
}

.collection-list th,
.collection-list td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}

.collections-table {
  border-collapse: collapse;
  width: 80%;
  text-align: left;
}

.collections-table th,
.collections-table td {
  border-bottom: 1px solid #121111;
  padding: 12px;
}

.collections-table tr:nth-child(even) {
  background-color: #f9f9f9;
}

/* Button Styles */
button {
  padding: 8px 12px;
  margin: 5px;
  cursor: pointer;
  font-size: 0.9em;
  font-weight: bold;
  color: white;
}

button.connected {
  background-color: #10b981;
}

button.connect {
  background-color: #d1d5db;
  color: #374151;
}

button.remove {
  background-color: #ef4444;
}

button:hover {
  opacity: 0.9;
}

#collections-container {
  display: flex;
  justify-content: left;
  margin-top: 20px;
}

/* Chart Container */
#chart-container {
  margin-top: 20px;
}

#performance-chart,
#streaming-performance-chart {
  max-width: 100%;
}

/* Reset Button */
#reset-button {
  background-color: #ef4444;
  color: white;
  border: none;
  padding: 10px;
  margin-top: 20px;
  cursor: pointer;
}

#reset-button:hover {
  background-color: #d12d2d;
}

/* Avatar Section Styles */
.avatar-container {
  display: flex;
  flex-direction: column;
  align-items: left;
  justify-content: flex-start;
  height: 100%;
  width: 80%;
  margin: 0;
}

.avatar-table {
  width: 100%;
  border-collapse: collapse;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.avatar-table th,
.avatar-table td {
  padding: 15px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

.avatar-table th {
  background-color: #f0f0f0;
  font-size: 18px;
  font-weight: 600;
}

.avatar-table tbody tr:hover {
  background-color: #f9f9f9;
}

.avatar-image img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
}

.chat-button {
  padding: 8px 16px;
  background-color: #28a745;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: background-color 0.3s ease-in-out;
}

.chat-button:hover {
  background-color: #218838;
}

.download-progress-container {
  display: none;
  align-items: center;
}

progress {
  width: 150px;
  height: 10px;
  margin-right: 10px;
}
