/* 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/396437/pexels-photo-396437.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;
}

/* ----------------------------------------------
   Realistic Aircraft Window Frame
---------------------------------------------- */
.main-wrapper {
  margin: auto;
  display: flex;
  flex-direction: row;
  width: 100%;
  max-width: 900px;
  height: 90dvh;

  /* AIRPLANE WINDOW SHAPE */
  border-radius: 130px / 90px;
  position: relative;
  overflow: hidden;

  /* OUTER WINDOW FRAME */
  padding: 20px;
  background: linear-gradient(145deg, #f4f5f7 0%, #d9dce1 100%);
  box-shadow:
    0 0 0 8px #ffffffcc,
    0 0 0 14px #d0d4dbcc,
    0 10px 35px rgba(0,0,0,0.25);
}

/* Inner curved layer */
.main-wrapper::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 115px / 80px;
  background: rgba(255,255,255,0.5);
  box-shadow:
    inset 0 0 45px rgba(0,0,0,0.25),
    inset 0 0 10px rgba(255,255,255,0.7);
  pointer-events: none;
}

/* Glass reflection */
.main-wrapper::after {
  content: "";
  position: absolute;
  top: 5%;
  left: 15%;
  width: 60%;
  height: 23%;
  border-radius: 80px / 40px;
  background: linear-gradient(
    to bottom right,
    rgba(255,255,255,0.8),
    rgba(255,255,255,0.05)
  );
  filter: blur(8px);
  opacity: 0.55;
  pointer-events: none;
}

/* ---------------------------------------------- */

/* 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;
  border-radius: 30px;
}

.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 */
.input-area {
  display: flex;
  gap: 10px;
  padding: 15px 0;
  position: sticky;
  bottom: 0;
  background: white;
  z-index: 2;
}

/* Input + button */
.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;
}

/* Message animation */
@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 */
.chat-box::-webkit-scrollbar {
  width: 6px;
}
.chat-box::-webkit-scrollbar-thumb {
  background-color: rgba(0,0,0,0.2);
  border-radius: 10px;
}

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

  .info-panel {
    display: none;
  }

  .container {
    padding: 0 10px;
  }

  .chat-box {
    max-height: calc(100dvh - 160px);
  }

  .input-area {
    flex-direction: column;
    padding: 10px 0;
  }

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