body {
    font-family: 'Segoe UI', sans-serif;
    background: linear-gradient(to right, #e0eafc, #cfdef3);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    transition: background 0.3s ease;
  }
  
  .dark-mode {
    background: linear-gradient(to right, #1e1e1e, #2b2b2b);
    color: white;
  }
  
  .chat-container {
    width: 95%;
    max-width: 600px;
    height: 90vh;
    background: #fff;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
  }
  
  .dark-mode .chat-container {
    background: #333;
  }
  
  .chat-header {
    background: #007BFF;
    color: white;
    padding: 15px;
    font-size: 20px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 2;
  }
  
  .chat-actions button {
    background: transparent;
    border: none;
    color: white;
    font-size: 18px;
    margin-left: 10px;
    cursor: pointer;
  }
  
  .chat-box {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #f8f8f8;
    display: flex;
    flex-direction: column;
  }
  
  .dark-mode .chat-box {
    background: #444;
  }
  
  .message {
    display: flex;
    align-items: flex-start;
    margin-bottom: 12px;
    animation: fadeIn 0.3s ease-in-out;
  }
  
  .avatar {
    font-size: 20px;
    margin-right: 10px;
  }
  
  .message-text {
    padding: 10px 15px;
    border-radius: 20px;
    max-width: 80%;
    line-height: 1.4;
    word-wrap: break-word;
  }
  
  .user-message .message-text {
    background: #cfe9ff;
    align-self: flex-end;
    text-align: right;
    margin-left: auto;
  }

  .user-message {
    flex-direction: row-reverse; /* Avatar goes to the right */
    justify-content: flex-end;
  }
  
  .user-message .avatar {
    margin-left: 10px;  /* space between message bubble and avatar */
    margin-right: 0;
  }
  
  .bot-message .message-text {
    background: #e6e6e6;
    text-align: left;
  }
  
  .dark-mode .user-message .message-text {
    background: #007BFF;
    color: white;
  }
  
  .dark-mode .bot-message .message-text {
    background: #555;
    color: white;
  }
  
  .input-area {
    display: flex;
    padding: 12px;
    border-top: 1px solid #ccc;
    background: #fff;
  }
  
  .dark-mode .input-area {
    background: #333;
  }
  
  input[type="text"] {
    flex: 1;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 30px;
    outline: none;
    font-size: 16px;
  }
  
  button {
    margin-left: 10px;
    padding: 10px 20px;
    background-color: #007BFF;
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s ease;
  }
  
  button:hover {
    background-color: #0056b3;
  }
  
  .prompt-buttons {
    display: flex;
    justify-content: space-around;
    padding: 10px;
    background: #f0f0f0;
    border-top: 1px solid #ddd;
  }
  
  .dark-mode .prompt-buttons {
    background: #222;
  }
  
  .prompt-buttons button {
    border-radius: 20px;
    padding: 8px 15px;
    font-size: 14px;
    border: none;
    cursor: pointer;
    background-color: #d3e5ff;
  }
  
  .dark-mode .prompt-buttons button {
    background-color: #555;
    color: white;
  }
  
  @keyframes fadeIn {
    to { opacity: 1; }
  }
  
  @keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
  }
  
  .fade {
    animation: fadeIn 0.5s forwards;
  }
  
  .fade-out {
    animation: fadeOut 0.5s forwards;
  }
  
  .city-prompt {
    margin-top: 10px;
    display: flex;
    gap: 10px;
    align-items: center;
  }
  
  .city-input {
    padding: 10px;
    border-radius: 20px;
    border: 1px solid #ccc;
    flex: 1;
    outline: none;
    font-size: 14px;
  }
  
  .submit-city-btn {
    padding: 10px 16px;
    border-radius: 20px;
    border: none;
    background-color: #28a745;
    color: white;
    cursor: pointer;
    font-size: 14px;
  }
  
  .submit-city-btn:hover {
    background-color: #218838;
  }
  
  /* Typing dots animation */
  .dot {
    animation: blink 1s infinite;
    animation-delay: calc(var(--i) * 0.2s);
  }
  
  @keyframes blink {
    0%, 80%, 100% { opacity: 0; }
    40% { opacity: 1; }
  }
  
  /* Mobile layout adjustments */
  @media screen and (max-width: 480px) {
    .chat-header {
      flex-direction: column;
      align-items: flex-start;
    }
  
    .chat-actions {
      margin-top: 10px;
      width: 100%;
      justify-content: flex-end;
    }
  
    .input-area {
      flex-direction: column;
      gap: 8px;
    }
  
    .input-area input,
    .input-area button {
      width: 100%;
    }
  
    .prompt-buttons {
      flex-direction: column;
      gap: 5px;
    }
  }

  @keyframes slideFadeOut {
    0% {
      opacity: 1;
      transform: translateY(0);
    }
    100% {
      opacity: 0;
      transform: translateX(100%) rotate(5deg);
    }
  }
  
  .clear-animate {
    animation: slideFadeOut 0.5s forwards;
  }
  