/* Base setup */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background: url('https://images.pexels.com/photos/1856488/pexels-photo-1856488.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1') no-repeat center center;
  background-size: cover;
  overflow: hidden;
}

/* Header */
header {
  background-color: #001d3d;
  color: white;
  padding: 10px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.logo img {
  height: 50px;
}

.menu ul {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
}

.menu ul li {
  margin-left: 20px;
}

.menu ul li a {
  color: white;
  text-decoration: none;
  font-size: 16px;
  transition: color 0.3s;
}

.menu ul li a:hover {
  color: #00c6ff;
}

/* Main layout */
.main-wrapper {
  margin: auto;
  display: flex;
  flex-direction: row;
  width: 100%;
  max-width: 900px;
  height: 90dvh;
  border-radius: 10px;
  background-color: white;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

/* Info panel (left side) */
.info-panel {
  background: linear-gradient(135deg, #0072ff 0%, #00c6ff 100%);
  color: white;
  width: 280px;
  padding: 30px 25px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-sizing: border-box;
}

.info-panel h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 20px;
  letter-spacing: 1px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.5);
  padding-bottom: 8px;
}

.info-panel p {
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: 12px;
  opacity: 0.9;
}

/* Container (right side) */
.container {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0 20px;
  box-sizing: border-box;
  height: 100%;
  position: relative;
  overflow: hidden;
}

/* Chat area */
.chat-box {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px 5px 10px 0;
  scroll-behavior: smooth;
}

/* Input area fixed at bottom */
.input-area {
  display: flex;
  gap: 10px;
  padding: 15px 0;
  position: sticky;
  bottom: 0;
  background: white;
  z-index: 2;
}

/* Input + button styles */
.input-box {
  flex: 1;
  padding: 12px 15px;
  border-radius: 50px;
  border: 1px solid #ccc;
  outline: none;
  font-size: 1rem;
}

.send-btn {
  background-color: #0072ff;
  color: white;
  padding: 12px 25px;
  border-radius: 50px;
  cursor: pointer;
  font-size: 1rem;
  white-space: nowrap;
  border: none;
  transition: background-color 0.3s ease;
}

.send-btn:hover {
  background-color: #005fcc;
}

/* Chat bubbles */
.chat-message {
  padding: 10px 15px;
  border-radius: 10px;
  max-width: 80%;
  word-wrap: break-word;
  white-space: pre-wrap;
  animation: fadeInUp 0.3s ease;
}

.chat-message.user {
  align-self: flex-end;
  background-color: #0072ff;
  color: white;
}

.chat-message.bot {
  align-self: flex-start;
  background-color: #e5e7eb;
  color: black;
}

.chat-message.bot strong {
  font-weight: 600;
  color: #1f2937;
}

/* Smooth animation for messages */
@keyframes fadeInUp {
  from {
    transform: translateY(10px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Loading overlay */
.loader {
  display: none;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  background-color: rgba(255, 255, 255, 0.8);
  z-index: 10;
}

.loader .plane {
  width: 80px;
  height: 80px;
  animation: fly 1.5s linear infinite;
}

@keyframes fly {
  0% {
    transform: translateX(-100px) translateY(0) rotate(0deg);
  }
  50% {
    transform: translateX(50px) translateY(-30px) rotate(15deg);
  }
  100% {
    transform: translateX(100px) translateY(0) rotate(0deg);
  }
}

/* Scrollbar styling */
.chat-box::-webkit-scrollbar {
  width: 6px;
}
.chat-box::-webkit-scrollbar-thumb {
  background-color: rgba(0,0,0,0.2);
  border-radius: 10px;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .main-wrapper {
    flex-direction: column;
    max-width: 100%;
    height: 100dvh;
    border-radius: 0;
  }

  .info-panel {
    display: none; /* Hides info panel on mobile */
  }

  .container {
    flex: 1;
    width: 100%;
    height: 100%;
    padding: 0 10px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
  }

  .chat-box {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
    max-height: calc(100dvh - 160px); /* Adjusts height for input bar + header */
  }

  .input-area {
    flex-direction: column;
    padding: 10px 0;
    background: white;
    z-index: 100;
  }

  .send-btn,
  .input-box {
    width: 100%;
  }
}
