* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Open Sans', sans-serif;
  background: linear-gradient(to bottom right, #f0f4f8, #d9e2ec);
}

h1,
h2 {
  font-weight: 700;
  color: #102a43;
  text-align: center;
}

h1 {
  font-size: 32px;
  margin-top: 20px;
}

h2 {
  font-size: 24px;
  margin-bottom: 36px;
}

p {
  font-size: 18px;
  font-weight: 600;
  line-height: 28px;
  margin: 0;
  color: #334e68;
}

input {
  border: 1px solid #bcccdc;
  border-radius: 8px 0 0 8px;
  background: #fff;
  color: #102a43;
  padding: 16px;
  font-size: 16px;
  flex: 1;
  width: 100%;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

main {
  margin: 0 auto;
  width: 100%;
  max-width: 700px;
  height: 600px;
  border-radius: 16px;
  background: #fff;
  padding: 20px 24px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.chat {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding-bottom: 16px;
}

.bot-msg,
.user-msg {
  display: flex;
  margin-top: 16px;
}

.bot-msg {
  align-items: flex-start;
}

.user-msg {
  align-items: flex-end;
  justify-content: flex-end;
}

.bot-msg img,
.user-msg img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
}

.bubble {
  background: #f0f4f8;
  font-weight: 500;
  font-size: 16px;
  line-height: 24px;
  padding: 12px 20px;
  color: #102a43;
  max-width: 60%;
}

.bot-bubble {
  border-radius: 12px 12px 12px 0;
  margin-left: 12px;
}

.user-bubble {
  background: #d9e2ec;
  border-radius: 12px 12px 0 12px;
  margin-right: 12px;
}

.input-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 16px;
}

.input-wrapper form {
  width: 100%;
  display: flex;
  align-items: center;
}

label {
  font-size: 16px;
  font-weight: 500;
  color: #102a43;
  margin-right: 16px;
}

button {
  background-color: #3e7cb1;
  color: white;
  border: none;
  border-radius: 0 8px 8px 0;
  padding: 16px 24px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: #2a6f97;
}

button:focus,
input:focus {
  outline: none;
  border-color: #3e7cb1;
}

/* Media Queries for Responsiveness */
@media (max-width: 768px) {
  h1 {
    font-size: 1.75em;
  }

  h2 {
    font-size: 1.25em;
  }

  .bubble {
    font-size: 0.95em;
    padding: 0.65em 0.9em;
  }

  input,
  button {
    padding: 0.65em;
    font-size: 0.95em;
  }

  .bot-msg img,
  .user-msg img {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 480px) {
  main {
    width: 95%;
    margin: 0.5em auto;
    padding: 1em;
  }

  h1 {
    font-size: 1.5em;
  }

  h2 {
    font-size: 1.1em;
  }

  .bubble {
    font-size: 0.9em;
    padding: 0.5em 0.8em;
  }

  input,
  button {
    padding: 0.5em;
    font-size: 0.9em;
  }

  .bot-msg img,
  .user-msg img {
    width: 35px;
    height: 35px;
  }
}

@media (min-width: 1200px) {
  main {
    max-width: 1200px;
  }

  h1 {
    font-size: 2.5em;
  }

  h2 {
    font-size: 2em;
  }

  .bubble {
    font-size: 1.1em;
    padding: 1em 1.5em;
  }

  input,
  button {
    padding: 1em;
    font-size: 1.1em;
  }

  .bot-msg img,
  .user-msg img {
    width: 60px;
    height: 60px;
  }
}