/* Global Styles */
body, html, button, input, textarea {
    font-family: Arial, sans-serif;
    border: none;
    outline: none;
}

/* Dark & Light Mode */
body.dark-mode {
    background: #121212;
    color: #e0e0e0;
}

body.light-mode {
    background: #f7f7f7;
    color: #333;
}

/* Container */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Header */
header.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* ---------------- Custom Dropdown ---------------- */
.dropdown-container {
    position: relative;
    display: inline-block;
  }
  #sourceDropdownBtn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    background: transparent;
    transition: background 0.3s;
  }
  body.dark-mode #sourceDropdownBtn {
    background: #2c2c2c;
    color: #e0e0e0;
  }
  body.light-mode #sourceDropdownBtn {
    background: #f0f0f0;
    color: #333;
    border: none;
  }
  #sourceDropdownBtn svg {
    width: 24px;
    height: 24px;
  }
  #sourceDropdownMenu {
    display: none;
    position: absolute;
    top: 110%;
    left: 0;
    background: #2c2c2c;
    color: #e0e0e0;
    border: none;
    border-radius: 8px;
    padding: 0.5rem 0;
    z-index: 1000;
    min-width: 150px;
  }
  body.light-mode #sourceDropdownMenu {
    background: #f0f0f0;
    color: #333;
  }
  #sourceDropdownMenu button {
    display: block;
    width: 100%;
    padding: 0.5rem 1rem;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    font-size: 1rem;
    color: inherit;
  }
  #sourceDropdownMenu button:hover {
    background: rgba(0,0,0,0.1);
  }

/* Theme Toggle Button */
#themeToggleBtn {
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s, color 0.3s;
  }
  /* In dark mode, button uses dark background */
  body.dark-mode #themeToggleBtn {
    background: #2c2c2c;
    color: #e0e0e0;
  }
  /* In light mode, button uses light background */
  body.light-mode #themeToggleBtn {
    background: #f0f0f0;
    color: #333;
  }
  #themeToggleBtn:hover {
    background: rgba(0,0,0,0.1);
  }

/* Chat Form */
.question-container {
    position: relative;
    width: 100%;
  }
  #chatForm {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
  }
  #questionInput {
    width: 100%;
    padding: 1rem;
    font-size: 1.2rem;
    border: none;
    border-radius: 10px;
    background: rgba(255,255,255,0.1);
    color: inherit;
    outline: none;
    resize: vertical;
    min-height: 3rem;
    transition: background 0.2s;
  }
  body.light-mode #questionInput {
    background: #f0f0f0;
  }
  #questionInput:focus {
    outline: none;
    background: rgba(255,255,255,0.15);
  }
  #questionInput::placeholder {
    color: lightgrey;
  }

/* Submit Button */
#submitBtn {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background-color: #4285f4;
    color: #fff;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  #submitBtn:hover {
    background-color: #357ae8;
  }
  /* Submit Button Icon: Down arrow */
  #submitBtn svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
  }

/* Response Box */
#responseBox {
    padding: 1rem;
    min-height: 150px;
    font-size: 1.1rem;
    line-height: 1.6;
    width: 100%;
  }
  #responseBox > *:first-child {
    margin-top: 0;
  }
  /* Remove box shadows everywhere */
  input, textarea, button, #responseBox {
    box-shadow: none;
  }
  @media (max-width: 600px) {
    #questionInput {
      font-size: 1rem;
      padding: 0.8rem;
    }
    #responseBox {
      padding: 1rem;
    }
  }
