/* Universal Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Arial', sans-serif;
  background: radial-gradient(circle, rgba(255, 0, 204, 0.8), rgba(0, 204, 255, 0.8));
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  color: #fff;
  overflow: hidden;
  animation: backgroundAnimate 15s infinite linear;
}

@keyframes backgroundAnimate {
  0% {
    background: radial-gradient(circle, rgba(255, 0, 204, 0.8), rgba(0, 204, 255, 0.8));
  }
  50% {
    background: radial-gradient(circle, rgba(255, 215, 0, 0.8), rgba(0, 255, 255, 0.8));
  }
  100% {
    background: radial-gradient(circle, rgba(255, 0, 204, 0.8), rgba(0, 204, 255, 0.8));
  }
}

.chat-container {
  background-color: rgba(26, 26, 26, 0.85);
  width: 500px;
  height: 650px;
  border-radius: 15px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  backdrop-filter: blur(15px);
  animation: slideUp 0.5s ease-out;
}

.chat-box {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  border-bottom: 1px solid #444;
  background-color: rgba(0, 0, 0, 0.75);
  position: relative;
  animation: fadeIn 1s ease-out;
}

.input-box {
  display: flex;
  padding: 15px;
  background-color: rgba(33, 33, 33, 0.85);
  border-top: 1px solid #444;
  position: relative;
  animation: slideIn 0.5s ease-out;
}

input {
  flex: 1;
  padding: 14px;
  border-radius: 25px;
  border: 1px solid #444;
  font-size: 16px;
  background-color: #444;
  color: #fff;
  outline: none;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

input:focus {
  background-color: #555;
  box-shadow: 0 0 15px #ff62c3;
}

button {
  padding: 14px 20px;
  background-color: #ff62c3;
  color: #fff;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.3s ease, transform 0.2s ease;
  margin-left: 10px;
  animation: bounceIn 0.5s ease-out;
}

button:hover {
  background-color: #ff7b7b;
  transform: translateY(-3px);
}

.message {
  margin-bottom: 15px;
  padding: 14px 18px;
  border-radius: 25px;
  max-width: 80%;
  word-wrap: break-word;
  font-size: 16px;
  line-height: 1.5;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, background-color 0.3s ease;
  background-color: #444;
}

.message.user {
  background-color: #ff62c3;
  align-self: flex-end;
  border-radius: 25px 25px 0 25px;
}

.message.ai {
  background-color: #1e1e1e;
  align-self: flex-start;
  border-radius: 25px 25px 25px 0;
}

.message-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.message:hover {
  transform: translateY(-5px);
}

.message:active {
  transform: translateY(2px);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounceIn {
  0% {
    transform: scale(0.5);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

@media screen and (max-width: 500px) {
  .chat-container {
    width: 100%;
    height: 90vh;
  }
}
