html, body {
  height: 100%;
}


:root {
      --bg-color: #fdfdfd;
      --header-bg: #ffffff;
      --header-text: #333333;
      --border-color: #e6e6e6;
      --user-msg-bg: #f5f5f5;
      --user-msg-text: #1a1a1a;
      --bot-msg-bg: #ffffff;
      --bot-msg-text: #262626;
      --bot-msg-border: #ebebeb;
      --input-bg: #f9f9f9;
      --input-border: #dddddd;
      --input-text: #2c2c2c;
      --button-bg: #d8f3dc;
      --button-hover-bg: #b7e4c7;
      --button-text: #1b4332;
    }

    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
      font-family: "Segoe UI", sans-serif;
    }

    body {
      background-color: var(--bg-color);
      display: flex;
      flex-direction: column;
      min-height: 100vh;
      position: relative;
      z-index: 0;
    }

    #particles-js {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      z-index: -1;
    }

    header {
      background: var(--header-bg);
      color: var(--header-text);
      text-align: center;
      padding: 1rem;
      font-size: 1.8rem;
      font-weight: bold;
      border-bottom: 1px solid var(--border-color);
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      z-index: 1;
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      z-index: 10;
    }

.chat-container {
  /* flex: 1; */
  flex: 1 1 0%;
  min-height: 0;
  padding: 5rem 1rem 4.5rem 1rem; /* Top padding adjusted for fixed header */
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  z-index: 1;
}





.message {
  max-width: 75%;
  padding: 0.75rem 1rem;
  border-radius: 20px;
  line-height: 1.4;
  font-size: 1rem;
  word-wrap: break-word;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Bot message bubble (left-aligned) */
.message.bot {
  align-self: flex-start;
  background-color: var(--bot-msg-bg);
  color: var(--bot-msg-text);
  border: 1px solid var(--bot-msg-border);
  border-top-left-radius: 0;
}

/* User message bubble (right-aligned) */
.message.user {
  align-self: flex-end;
  background-color: var(--user-msg-bg);
  color: var(--user-msg-text);
  text-align: right;
  border-top-right-radius: 0;
}



.input-area {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  display: flex;
  border-top: 1px solid var(--border-color);
  padding: 0.75rem;
  background: var(--input-bg);
  z-index: 2;
}

.input-area input {
  flex: 1;
  padding: 0.6rem 1rem;
  border: 1px solid var(--input-border);
  border-radius: 20px;
  outline: none;
  color: var(--input-text);
  background-color: var(--input-bg);
}

.input-area button {
  margin-left: 0.5rem;
  padding: 0.6rem 1.2rem;
  background-color: var(--button-bg);
  color: var(--button-text);
  border: none;
  border-radius: 20px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.input-area button:hover {
  background-color: var(--button-hover-bg);
}
    
.message.placeholder {
  opacity: 0.6;
  font-style: italic;
}


@media (max-width: 600px) {
  .input-area {
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.5rem;
  }

  .input-area button {
    width: 100%;
    margin-left: 0;
  }

  .chat-container {
    padding-bottom: 6.5rem; /* More space on small screens */
  }

  .message {
    max-width: calc(100% - 1rem); /* Stretch message bubbles with side margin */
    margin: 0.25rem 0.5rem;
    font-size: 0.95rem;
    }
  }
  .message ol,
  .message ul {
    list-style-position: outside;   /* Fixes number wrapping issue */
    padding-left: 1.5rem;           /* Creates space for bullets/numbers */
    margin: 0.5rem 0;
  }
  
  .message ul {
    list-style-type: disc;          /* Optional: make sure bullets are round dots */
  }
  
  .message li {
    margin-bottom: 0.3rem;
    word-wrap: break-word;          /* Ensure long text wraps correctly */
  }
  
  .message p {
    margin: 0.3rem 0;               /* Keep paragraph spacing clean */
  }
  .ai-logo {
    width: 35px;         /* Adjust size as needed */
    height: 35px;
    object-fit: contain;
    margin-right: 0.5rem;
    vertical-align: middle;
  }
  
  #floatingMenu {
  position: fixed;
  top: 10px; /* below your header */
  left: 0;
  z-index: 100;
    }
    
    #menuToggle {
      background: #d8f3dc;
      color: #1b4332;
      border: none;
      border-radius: 0 20px 20px 0;
      padding: 12px 18px;
      font-size: 22px;
      cursor: pointer;
      box-shadow: 1px 2px 8px rgba(0,0,0,0.08);
      transition: background 0.2s;
    }
    
    #menuToggle:hover {
      background: #b7e4c7;
    }
    
    #menuSidebar {
      width: 220px;
      background: #fff;
      border-right: 1px solid #e6e6e6;
      box-shadow: 2px 0 12px rgba(0,0,0,0.07);
      padding: 20px 18px 18px 18px;
      position: absolute;
      top: 0;
      left: -240px;
      transition: left 0.3s cubic-bezier(.4,2,.6,1);
      border-radius: 0 14px 14px 0;
    }
    
    #menuSidebar.open {
      left: 48px;
    }
    
    #menuSidebar h3 {
      margin-bottom: 16px;
      color: #1b4332;
      font-size: 1.1rem;
    }
    
    #menuSidebar label {
      display: block;
      margin-bottom: 4px;
      color: #333;
    }
    
    #menuSidebar select {
      width: 100%;
      padding: 6px 8px;
      border-radius: 6px;
      border: 1px solid #dddddd;
      margin-bottom: 10px;
      background: #f9f9f9;
      color: #2c2c2c;
    }
    
    
    #floatingInfo {
  position: fixed;
  top: 10px;
  right: 0;
  z-index: 100;
}

#infoToggle {
  background: #f1f3f4;
  color: #2563eb;
  border: none;
  border-radius: 20px 0 0 20px;
  padding: 12px 18px;
  font-size: 22px;
  cursor: pointer;
  box-shadow: -1px 2px 8px rgba(0,0,0,0.08);
  transition: background 0.2s;
}

#infoToggle:hover {
  background: #e0e7ef;
}

#infoSidebar {
  width: 280px;
  background: #fff;
  border-left: 1px solid #e6e6e6;
  box-shadow: -2px 0 12px rgba(0,0,0,0.07);
  padding: 20px 18px 18px 18px;
  position: absolute;
  top: 0;
  right: -300px;
  transition: right 0.3s cubic-bezier(.4,2,.6,1);
  border-radius: 14px 0 0 14px;
}

#infoSidebar.open {
  right: 48px;
}

#infoSidebar h3 {
  margin-bottom: 16px;
  color: #2563eb;
  font-size: 1.1rem;
}

#infoSidebar p {
  text-align: justify;
  text-align-last: center; /* Center last line */
}

.play-audio-btn {
  background: none;
  border: none;
  cursor: pointer;
  vertical-align: middle;
  padding-left: 8px;
  padding-right: 0;
  padding-top: 0;
  padding-bottom: 0;
  outline: none;
  transition: filter 0.15s;
}
.play-audio-btn:hover,
.play-audio-btn:focus {
  filter: brightness(0.85);
}
.message.bot {
  align-self: flex-start;
  background-color: var(--bot-msg-bg);
  color: var(--bot-msg-text);
  border: 1px solid var(--bot-msg-border);
  border-top-left-radius: 0;
  display: flex;
  align-items: center;
  gap: 0.5em;
}

.bot-text {
  flex: 1;
  min-width: 0;
  word-break: break-word;
}

.spinner {
  animation: spin 1s linear infinite;
  vertical-align: middle;
}
@keyframes spin {
  100% { transform: rotate(360deg); }
}
    
