/* Existing styles */
body {
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background-color: #f4f7fc;
}
.container {
  background: white;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
  border-radius: 16px;
  max-width: 400px;
  width: 90%;
  padding: 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
  animation: glowPulse 4s ease-in-out infinite;
}
.container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, #ff0072, #ff6600, #ffcc00, #00ff00, #00ffcc, #0066ff, #8000ff);
  background-size: 400% 400%;
  animation: flowingBorder 3s ease infinite;
  z-index: -1;
  border-radius: 16px;
}
@keyframes flowingBorder {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.header-text {
  color: #14213d;
}
.input-area {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0;
}
.input-box {
  flex: 1;
  padding: 12px;
  border: 2px solid transparent;
  border-radius: 25px;
  outline: none;
  font-size: 1rem;
  background: transparent;
  position: relative;
  transition: all 0.3s ease-in-out;
  box-shadow: inset 0 0 0 0px rgba(0, 0, 0, 0.2);
  width: 50%;
  animation: pulseAnimation 3s ease-in-out infinite;
}
.input-box::before,
.input-box::after {
  content: '';
  position: absolute;
  height: 100%;
  width: 5px;
  top: 0;
  transition: all 0.4s ease-in-out;
}
.input-box::before {
  left: 0;
  background: linear-gradient(to bottom, #ff0072, #ff6600);
  border-radius: 25px;
}
.input-box::after {
  right: 0;
  background: linear-gradient(to bottom, #00ffcc, #0066ff);
  border-radius: 25px;
}
.input-box:focus {
  box-shadow: inset 0 0 15px rgba(0, 119, 182, 0.8);
  transform: scale(1.05);
}
.input-box:focus::before {
  background: linear-gradient(to bottom, #00ffcc, #0066ff);
}
.input-box:focus::after {
  background: linear-gradient(to bottom, #ff0072, #ff6600);
}
.input-box::placeholder {
  color: #c8b6ff;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}
.input-box:focus::placeholder {
  opacity: 0;
}
@keyframes pulseAnimation {
  0% {
    transform: scale(1);
    box-shadow: inset 0 0 0 0px rgba(0, 0, 0, 0.2), 0 0 20px rgba(0, 119, 182, 0.6);
  }
  50% {
    transform: scale(1.05);
    box-shadow: inset 0 0 0 0px rgba(0, 0, 0, 0.2),
      0 0 30px rgba(255, 0, 110, 0.8), 0 0 50px rgba(0, 119, 182, 0.6);
  }
  100% {
    transform: scale(1);
    box-shadow: inset 0 0 0 0px rgba(0, 0, 0, 0.2), 0 0 20px rgba(0, 119, 182, 0.6);
  }
}
.voice-btn {
  background: linear-gradient(120deg, #001f3f, #003366, #000080, #001f3f, #003366);
  background-size: 200% 200%;
  color: white;
  font-size: 1.5rem;
  padding: 15px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  animation: gradientShift 3s infinite linear;
  transition: box-shadow 0.5s ease, transform 0.2s ease;
}
.voice-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 0 15px 5px rgba(200, 182, 255, 0.8),
              0 0 25px 10px rgba(179, 157, 219, 0.6),
              0 0 35px 15px rgba(149, 117, 205, 0.5);
}
.voice-btn.listening .listening-indicator {
  display: block;
  position: absolute;
  top: 50%;
  right: 5px;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  background: #38b000;
  border-radius: 50%;
  animation: listeningPulse 1s infinite ease-in-out;
  z-index: 2;
}
@keyframes listeningPulse {
  0% { transform: translateY(-50%) scale(1); opacity: 1; }
  50% { transform: translateY(-50%) scale(1.3); opacity: 0.6; }
  100% { transform: translateY(-50%) scale(1); opacity: 1; }
}
.voice-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("https://app.travleisure.com/AI.gif") no-repeat center;
  background-size: cover;
  mix-blend-mode: screen;
  border-radius: 50%;
  z-index: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.voice-btn.speaking::after,
.voice-btn.listening::after {
  opacity: 1;
  animation: rotateAnimation 10s linear infinite;
}
@keyframes rotateAnimation {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.loader {
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background-color: rgba(255, 255, 255, 0.8);
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  z-index: 1000;
}
.loader img {
  width: 100px;
  height: auto;
}
iframe {
  width: 100%;
  height: 70vh;
  border: none;
}
@media screen and (max-width: 500px) {
  .container {
    max-width: 350px;
    padding: 15px;
  }
  .voice-btn {
    padding: 10px;
    font-size: 1.25rem;
  }
  iframe {
    height: 60vh;
  }
}
@keyframes glowPulse {
  0% { box-shadow: 0 0 15px rgba(0, 119, 182, 0.4); }
  50% { box-shadow: 0 0 30px rgba(255, 0, 110, 0.6), 0 0 40px rgba(0, 119, 182, 0.5); }
  100% { box-shadow: 0 0 15px rgba(0, 119, 182, 0.4); }
}
@keyframes organicWaves {
  0% { transform: translateX(-10%) translateY(-5%) scale(1); }
  50% { transform: translateX(10%) translateY(5%) scale(1.1); }
  100% { transform: translateX(-10%) translateY(-5%) scale(1); }
}
.container::after {
  content: '';
  position: absolute;
  width: 150%;
  height: 150%;
  top: -25%;
  left: -25%;
  background: radial-gradient(circle, rgba(255, 0, 110, 0.2), rgba(0, 119, 182, 0.1), transparent);
  opacity: 0.6;
  z-index: -1;
  animation: organicWaves 6s ease-in-out infinite alternate;
}
.chat-list {
  list-style: none;
  counter-reset: chat-counter;
  margin: 20px 0;
  padding: 0;
}
.chat-list li {
  position: relative;
  padding: 10px 10px 10px 2rem;
  margin-bottom: 10px;
  background: #f4f7fc;
  border-left: 3px solid #14213d;
  border-radius: 4px;
}
.chat-list li::before {
  counter-increment: chat-counter;
  content: counter(chat-counter) ".";
  position: absolute;
  left: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  font-weight: bold;
  color: #14213d;
}
.background-waves {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: -2;
  pointer-events: none;
}
.background-waves .wave {
  position: absolute;
  bottom: 0;
  width: 200%;
  height: 20%;
  background-repeat: repeat-x;
  background-size: cover;
  opacity: 0.3;
  animation: waveAnimation linear infinite;
}
.background-waves .wave.wave1 {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%23ffffff' fill-opacity='0.3' d='M0,96L48,112C96,128,192,160,288,170.7C384,181,480,171,576,149.3C672,128,768,96,864,96C960,96,1056,128,1152,138.7C1248,149,1344,139,1392,133.3L1440,128L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'%3E%3C/path%3E%3C/svg%3E");
  animation-duration: 15s;
  animation-delay: 0s;
}
.background-waves .wave.wave2 {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%23ffffff' fill-opacity='0.2' d='M0,160L48,170.7C96,181,192,203,288,192C384,181,480,139,576,138.7C672,139,768,181,864,192C960,203,1056,181,1152,154.7C1248,128,1344,96,1392,80L1440,64L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'%3E%3C/path%3E%3C/svg%3E");
  animation-duration: 20s;
  animation-delay: -5s;
}
@keyframes waveAnimation {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
