/* Osnovni reset i font */
body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f4f7fc;
  color: #333;
}

/* Glavni kontejner */
#chat-container {
  max-width: 800px;
  margin: 80px auto;
  background: white;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border-radius: 16px;
  overflow: hidden;
  padding: 20px;
}

/* Naslov */
#chat-header {
  font-size: 1.8rem;
  font-weight: bold;
  margin-bottom: 20px;
}

/* Poruke */
.chat-message {
  padding: 12px 16px;
  margin-bottom: 10px;
  border-radius: 12px;
  max-width: 80%;
  line-height: 1.5;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.user-message {
  background-color: #d1e7dd;
  align-self: flex-end;
  text-align: right;
}

.ai-message {
  background-color: #e2e3e5;
  align-self: flex-start;
  text-align: left;
}

/* Input i gumb */
#chat-input {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

#messageInput {
  flex: 1;
  padding: 12px 16px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 12px;
}

#sendButton {
  background-color: #007bff;
  color: white;
  padding: 12px 20px;
  font-size: 1rem;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

#sendButton:hover {
  background-color: #0056b3;
}

/* Mobilni meni */
#mobileMenu {
  display: none;
  background: #333;
  color: white;
  padding: 10px 20px;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 999;
}

#mobileMenuToggle {
  display: block;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Responsive dizajn */
@media screen and (max-width: 600px) {
  #chat-container {
    margin: 100px 10px;
    padding: 15px;
  }

  #chat-header {
    font-size: 1.5rem;
  }

  #mobileMenu {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  #chat-input {
    flex-direction: column;
  }

  #sendButton {
    width: 100%;
  }

  #messageInput {
    width: 100%;
  }
}

/* Prikaz poruka u stilu WhatsApp (novije dolje) */
#chat-box {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow-y: auto;
  height: 400px;
  padding: 10px;
  gap: 10px;
}

/* Animirane točkice za "Buddy is thinking" */
.typing-dots span {
  animation: blink 1.2s infinite;
  font-weight: bold;
}
.typing-dots span:nth-child(2) {
  animation-delay: 0.2s;
}
.typing-dots span:nth-child(3) {
  animation-delay: 0.4s;
}
@keyframes blink {
  0% { opacity: 0; }
  50% { opacity: 1; }
  100% { opacity: 0; }
}
