:root {
  --color-primary: #88F26B;
  --color-secondary: #7AD95F;
  --color-tertiary: #34592A;
  --color-quaternary: #66A649;
  --color-background: #0D0D0D;
}

body {
  font-family: 'Arial', sans-serif;
  margin: 0;
  padding: 0;
  background-color: var(--color-background);
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}
input{
  outline: none;
}

#chat-container {
  width: 90%;
  max-width: 800px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}

h1 {
  position: fixed;
  top: 0;
  width: 100%;
  color: var(--color-primary);
  margin: 0;
  padding: 1.5rem 0;
  text-align: center;
  font-family: "Barrio", serif;
  font-weight: 400;
  font-style: normal;
  font-size: clamp(1.1rem, 5vw, 3rem);
}

#chat-messages {
  padding: 20px;
  height: 400px;
  overflow-y: auto;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  row-gap: 1rem;
}

#chat-input {
  position: fixed;
  bottom: 0;
  display: flex;
  padding: 10px;
  border-top: 1px solid var(--color-secondary);
}

#chat-input input {
  flex: 1;
  padding: 10px;
  background-color: #333;
  color: white;
  border: none;
  border-radius: 5px 0 0 5px;
}

#chat-input button {
  padding: 10px 15px;
  background-color: var(--color-primary);
  color: black;
  border: none;
  border-radius: 0 5px 5px 0;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#chat-input button:hover {
  background-color: var(--color-secondary);
}

.message-div {
  margin-bottom: 10px;
  padding: 10px;
  border-radius: 10px;
  max-width: 80%;
  word-wrap: break-word;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.message-div span:nth-of-type(1){
  color: var(--color-primary);
}
.message-div span:nth-of-type(3){
  color: var(--color-secondary);
}
.message-div span,
input,
button {
  font-family: "Montserrat", serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
  font-size: clamp(1rem, 3vw, 1.5rem);
}


.user-message {
  background-color: #2a2a2a;
  align-self: flex-end;
}

.gemini-message {
  background-color: #3a3a3a;
  align-self: flex-start;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message-div {
  animation: fadeIn 0.3s ease;
}

#chat-messages::-webkit-scrollbar {
  width: 8px;
}

#chat-messages::-webkit-scrollbar-track {
  background: #1a1a1a;
}

#chat-messages::-webkit-scrollbar-thumb {
  background: var(--color-secondary);
  border-radius: 4px;
}

#chat-messages::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary);
}

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  display: none; /* Initially hidden */
}

.loading-spinner {
  border: 8px solid rgba(255, 255, 255, 0.3);
  border-top: 8px solid var(--color-primary);
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}