@import url('https://fonts.googleapis.com/css?family=Montserrat:400,700');

:root {
  --color-bg1: rgb(8, 10, 15);
  --color-bg2: rgb(0, 17, 32);
  --color1: 18, 113, 255;
  --color2: 107, 74, 255;
  --color3: 100, 100, 255;
  --color4: 50, 160, 220;
  --color5: 80, 47, 122;
  --color-interactive: 140, 100, 255;
  --circle-size: 80%;
  --blending: screen;
  --primary-color: #6c1bee;
  --secondary-color:#00ffff;
  --text-color: #ffffff;
  --chat-background: rgba(255, 255, 255, 0.05);
  --input-background: rgba(255, 255, 255, 0.1);
  --chat-background: rgba(10, 14, 23, 0.8);
  --user-message-background: rgba(0, 255, 136, 0.1);
  --ai-message-background: rgba(0, 140, 255, 0.1);
  --modal-background: rgba(10, 14, 23, 0.9);
}

* {
  margin: 0;
  padding: 0;
  outline: none;
  list-style: none;
  text-decoration: none;
  box-sizing: border-box;
  color: var(--text-color);
  background: transparent;
  border: none;
}

html, body {
  font-family: 'Montserrat', sans-serif;
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
}

body {
  background: linear-gradient(40deg, var(--color-bg1), var(--color-bg2));
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

h1, h2, h3 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
}

.container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 20px;
}

header {
  text-align: center;
  margin-bottom: 20px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  margin-bottom: 20px;
}

#username {
  font-weight: bold;
}

.neon-button.small {
  padding: 5px 10px;
  font-size: 0.8em;
}

main {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.chat-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--chat-background);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(108, 27, 238, 0.5);
  border: 1px solid rgba(108, 27, 238, 0.2);
  max-height: calc(100vh - 200px); /* Adjust this value as needed */
}

#chat-container {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  scrollbar-width: thin;
  scrollbar-color: var(--primary-color) var(--chat-background);
}

#chat-container::-webkit-scrollbar {
  width: 8px;
}

#chat-container::-webkit-scrollbar-track {
  background: var(--chat-background);
}

#chat-container::-webkit-scrollbar-thumb {
  background-color: var(--primary-color);
  border-radius: 4px;
}

.controls {
  padding: 20px;
  background: rgba(255, 255, 255, 0.1);
}

#chat-form {
  display: flex;
  gap: 10px;
}

#user-input {
  flex-grow: 1;
  padding: 10px;
  border-radius: 4px;
  background: var(--input-background);
}

.neon-button {
  padding: 10px 20px;
  border-radius: 4px;
  background: var(--primary-color);
  color: var(--text-color);
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s, box-shadow 0.3s;
  box-shadow: 0 0 10px rgba(108, 27, 238, 0.5);
}

.neon-button:hover {
  background: var(--secondary-color);
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.7);
}

#config-modal {
  display: none;
  position: fixed;
  z-index: 2;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.4);
}

.modal-content {
  background-color: var(--modal-background);
  margin: 15% auto;
  padding: 20px;
  border: 1px solid rgba(108, 27, 238, 0.2);
  width: 80%;
  max-width: 500px;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(108, 27, 238, 0.5);
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover,
.close:focus {
  color: #fff;
  text-decoration: none;
  cursor: pointer;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 8px;
  border-radius: 4px;
  background: var(--input-background);
}

.toggle-container {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.toggle-label {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.toggle-label input {
  display: none;
}

.slider {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 20px;
  background-color: #ccc;
  border-radius: 20px;
  transition: all 0.3s;
  margin-right: 10px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  border-radius: 50%;
  transition: all 0.3s;
}

input:checked + .slider {
  background-color: var(--secondary-color);
}

input:checked + .slider:before {
  transform: translateX(20px);
}
