* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", sans-serif;
  background-color: #f5f5f5;
  padding: 20px;
}

h4 {
  margin: 0;
  font-weight: normal;
}

#root {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 95%;                /* Make content 75% of screen */
  max-width: 1394px;         /* Limit max size on large screens */
  margin: 0 auto;            /* Center horizontally */
}

/* Each conversation block */
.conversation {
  background: white;
  border-radius: 8px;
  border: 1px solid #ddd;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Each message inside a conversation */
.message {
  margin-bottom: 8px;
  padding: 12px 16px;
  background-color: #f0f2f5;
  border-radius: 6px;
  white-space: pre-wrap;
  line-height: 1.5;
}

/* Remove bottom spacing from last content block in a message */
.message > *:last-child {
  margin-bottom: 0 !important;
}

/* Message author label */
.author {
  font-weight: bold;
  color: #333;
  margin-bottom: 4px;
  text-transform: capitalize;
}

/* Compact Markdown formatting */
.message p {
  margin: 6px 0;
  line-height: 1.4;
}

.message ul {
  margin: 6px 0;
  padding-left: 20px;
}

.message li {
  margin-bottom: 4px;
}

.message h1,
.message h2,
.message h3,
.message h4,
.message h5,
.message h6 {
  margin: 8px 0 4px;
  line-height: 1.3;
  font-weight: bold;
}

.message blockquote {
  margin: 6px 0;
  padding-left: 12px;
  border-left: 3px solid #ccc;
  color: #555;
  font-style: italic;
}

.message pre {
  margin: 8px 0;
  padding: 10px;
  background: #f7f7f7;
  font-size: 14px;
  overflow-x: auto;
  border-radius: 4px;
}

/* Search bar */
#searchBar {
  margin-bottom: 20px;
  text-align: center;
}

#searchInput {
  padding: 10px 14px;
  width: 400px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 6px;
}

/* Responsive styles */
@media screen and (max-width: 600px) {
  body {
    padding: 10px;
  }

  #root {
    width: 100%;
    padding: 0 10px;
  }

  .conversation {
    padding: 16px;
  }

  .message {
    font-size: 15px;
    padding: 10px 14px;
  }

  #searchInput {
    width: 100%;
  }
}

#scrollButtons {
  position: fixed;
  right: 20px;
  bottom: 40px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 999;
}

#scrollButtons button {
  padding: 10px 12px;
  background-color: #333;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

#scrollButtons button:hover {
  opacity: 1;
}

/* Style for WebKit-based browsers */
::-webkit-scrollbar {
  width: 28px;  /* ← Increase this to make the scrollbar thicker */
}

::-webkit-scrollbar-track {
  background: #f0f0f0;
}

::-webkit-scrollbar-thumb {
  background-color: #888;
  border-radius: 14px;
  border: 6px solid #f0f0f0;  /* Creates a padded thumb */
}

::-webkit-scrollbar-thumb:hover {
  background-color: #555;
}
