
body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
}
h1, h3 {
  text-align: center;
}
.container {
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}
textarea {
  width: 100%;
  height: 200px;
  margin-bottom: 20px;
  padding: 10px;
  font-size: 15px;
  border-radius: 4px;
}
button {
  background-color: #3498db;
  color: #fff;
  border: none;
  padding: 10px 20px;
  cursor: pointer;
  border-radius: 4px;
  font-size: 16px;
  transition: background-color 0.3s;
}
button:hover {
  background-color: #2980b9;
}
#results, #compressed-content, #huffman-mapping {
  margin-top: 20px;
  padding: 20px;
  border-radius: 4px;
}
.chart-container {
  margin-top: 30px;
  height: 300px;
}
#huffman-tree {
  width: 100%;
  height: 550px;
  border: 1px solid #ddd;
  margin-top: 20px;
  overflow: auto;
}
.toggle-btn {
  position: fixed;
  top: 15px;
  right: 15px;
  background-color: #000000;
  color: white;
  border: none;
  padding: 10px 15px;
  cursor: pointer;
  border-radius: 20px;
  font-size: 14px;
}

/* Light mode styles */
body.light-mode {
  background-color: #f4f4f4;
  color: #333;
}
.light-mode .container {
  background-color: #fff;
}
.light-mode textarea, .light-mode #results, .light-mode #compressed-content, .light-mode #huffman-mapping {
  background-color: #ecf0f1;
  border-color: #ddd;
}

/* Dark mode styles */
body.dark-mode {
  background-color: #000000;
  color: #ecf0f1;
}
.dark-mode .container {
  background-color: transparent;
  color: white;
}
.dark-mode textarea{
  background-color: #000000;
  border-color: #ffffff;
  color: white;
}
.dark-mode #results, .dark-mode #compressed-content, .dark-mode #huffman-mapping , .dark-mode #huffman-tree, .dark-mode .chart-container{
  background-color: #ffffff;
  border-color: #ffffff;
  color: rgb(0, 0, 0);
}
.dark-mode button {
  background-color: #000000;
  color: rgb(255, 255, 255);
  border: 1px solid white;
}
.dark-mode button:hover {
  background-color: #ffffff;
  color: black;
}
.dark-mode .toggle-btn {
  background-color: #ffffff;
  color: black;
}
.scrollable-content {
  margin-top: 20px;
  padding: 20px;
  border-radius: 4px;
  background-color: #f4f4f4;
  max-height: 200px; /* Optional: Limit height if you want */
  overflow-x: auto; /* Enable horizontal scrolling */
  white-space: nowrap; /* Prevent line breaks */
  border: 1px solid #ddd;
}
