html, body {
  margin: 0;
  width: 100%;
  height: 100%;
}

body {
  background-color: black;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  min-height: 100vh;
}

h1 {
  color: white;
  font-family: "Lexend", sans-serif;
  position: relative;
  z-index: 1;
  font-size: 60px;
  opacity: 0;
  animation: fadeIn 1s ease-in 0.5s forwards;
  transition: transform 0.6s ease-out;
}

h1.top-title {
  position: fixed;
  top: 10px;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.glowthingy {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100vw;
  height: 0;
  pointer-events: none;
  box-shadow: 0 -20px 200px 50px rgba(0, 255, 0, 0.5);
  z-index: 0;
}

.typeee {
  padding: 20px;
  font-family: "Lexend", sans-serif;

  transform: translateY(100%);
  opacity: 0;

  animation: slide-up 1s ease-out 2s forwards;
  transition: transform 0.6s ease-out;
}

.typeee.fixed-bottom {
  position: fixed;
  bottom: 0;
  transform: translate(-50%, 0);
}

@keyframes slide-up {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform:translateY(0);
    opacity: 1;
  }
}

input[type="text"] {
  padding: 10px;
  font-size: 16px;
  border: 2px solid rgb(0, 155, 0);
  border-radius: 5px;
  width: 400px;
  outline: none;
  color:rgb(0, 155, 0);
  background-color: black;
  caret-color: rgb(0, 255, 0);
  caret-shape: block;
  caret-animation: manual;
  animation: carrot 4s infinite;
}

@keyframes carrot {
  0%   { caret-color:rgb(0, 155, 0); }
  17%  { caret-color:transparent ; }
  34%  { caret-color:rgb(0, 255, 0); }
  51%  { caret-color:transparent; }
  68%  { caret-color:white ; }
  85% { caret-color:transparent ; }
}

input[type="text"]:focus {
  border-color: rgb(0, 255, 0);
  color:rgb(0, 155, 0);
  background-color: black;
  caret-color: rgb(0, 255, 0);
  caret-shape: block;
}

input[type="submit"] {
  padding: 10px 20px;
  font-size: 16px;
  margin-left: 10px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  background-color: rgb(0, 155, 0);
  color: black;
  transition: transform 0.2s ease-in-out;
}

input[type="submit"]:hover {
  background-color: rgb(0, 255, 0);
  transform: scale(1.1);
}

input[type="text"]:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

input[type="submit"]:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

#NEWCHAT {
  position: fixed;
  top: 10px;
  right: 10px;
  margin-left: 0;
  z-index: 10;
}

button {
  padding: 10px 20px;
  font-size: 16px;
  margin-left: 10px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  background-color: rgb(0, 155, 0);
  color: black;
  transition: transform 0.2s ease-in-out;
}

button:hover {
  background-color: rgb(0, 255, 0);
  transform: scale(1.1);
}

#ai-response {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 600px;
  padding: 16px 20px;
  color: white;
  font-family: "lexend", sans-serif;
  text-align: center;

  opacity: 0;
  pointer-events: none;

  transition: opacity 0.3s ease-in-out;
}

#ai-response.visible {
  opacity: 1;
}

#chat-messages {
  position: fixed;
  top: 150px;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  width: min(800px, 90vw);

  overflow-y: auto;
  padding: 10px 16px;
  box-sizing: border-box;
}

#chat-messages::-webkit-scrollbar {
  width: 4px;
}

#chat-messages::-webkit-scrollbar-track {
  background:black;
}

#chat-messages::-webkit-scrollbar-thumb {
  background:rgb(0, 155, 0);
  border-radius: 4px;
}

#chat-messages::-webkit-scrollbar-thumb:hover {
  background:rgb(0, 255, 0)
}

.message {
  max-width: 75%;
  margin: 6px 0;
  padding: 8px 12px;
  border-radius: 8px;
  font-family: "lexend", sans-serif;
  font-size: 14px;
  line-height: 1.4;
}

.message.user {
  margin-left: auto;
  border: 1px solid rgb(0, 155, 0);
  color:rgb(0, 255, 0);
  background-color:black;
}

.message.ai {
  margin-right: auto;
  background-color:rgb(0, 155, 0);
  color:black; 
}

.message.system {
  margin: 10px auto;
  text-align: center;
  color: #888;
  font-size: 12px;
  max-width: 60%;
}