/* Reset and base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI',
    Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue',
    sans-serif;
  background: linear-gradient(135deg, #dde7f0, #f7f9fc);
  color: #1a1a1a;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 2rem 1rem;
}

/* Container */
.container {
  background: #ffffff;
  max-width: 720px;
  width: 100%;
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
  padding: 2rem 2.5rem;
  display: flex;
  flex-direction: column;
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.8rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.logo {
  font-weight: 600;
  font-size: 1.875rem;
  color: #2c3e50;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  user-select: none;
}

.logo-icon {
  font-size: 2.5rem;
  line-height: 1;
  display: inline-block;
  transform: translateY(-2px);
}

/* Language dropdown */
.language-container {
  flex-shrink: 0;
}

.language-select {
  font-size: 1rem;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1.8px solid #ccc;
  background: #fefefe;
  cursor: pointer;
  transition: border-color 0.3s ease;
  min-width: 160px;
}

.language-select:hover,
.language-select:focus {
  outline: none;
  border-color: #4caf50;
  box-shadow: 0 0 6px #4caf50aa;
}

/* Main chat container */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Chat container */
.chat-container {
  display: flex;
  flex-direction: column;
  background: #fafafa;
  border: 1.5px solid #e2e3e5;
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1.8rem;
  max-height: 450px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
}

/* Chat box */
.chat-box {
  flex: 1;
  overflow-y: auto;
  scroll-behavior: smooth;
  padding-right: 8px;
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

/* Scrollbar Styling */
.chat-box::-webkit-scrollbar {
  width: 8px;
}

.chat-box::-webkit-scrollbar-thumb {
  background-color: #a0aec0;
  border-radius: 10px;
}

.chat-box::-webkit-scrollbar-track {
  background: #f0f2f5;
}

/* Messages */
.message {
  max-width: 75%;
  padding: 12px 16px;
  border-radius: 16px;
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.4;
  font-size: 1rem;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.07);
  word-wrap: break-word;
  user-select: text;
  animation: fadeInUp 0.4s ease forwards;
}

/* User message */
.message.user {
  align-self: flex-end;
  background: #e0f7e9; /* light green */
  color: #2f5233;
  border-bottom-right-radius: 4px;
}

/* Bot message */
.message.bot {
  align-self: flex-start;
  background: #e3e5e8;
  color: #353a40;
  border-bottom-left-radius: 4px;
}

/* Message icon */
.message-icon {
  font-size: 1.5rem;
  user-select: none;
  margin-top: 4px;
}

/* Chat form */
.chat-form {
  display: flex;
  gap: 10px;
}

.chat-form input[type="text"] {
  flex: 1;
  padding: 12px 14px;
  font-size: 1rem;
  border-radius: 10px;
  border: 1.8px solid #ccc;
  transition: border-color 0.3s ease;
}

.chat-form input[type="text"]:focus {
  outline: none;
  border-color: #4caf50;
  box-shadow: 0 0 8px #4caf5080;
}

.btn {
  cursor: pointer;
  font-weight: 600;
  border-radius: 10px;
  user-select: none;
  white-space: nowrap;
  transition: background-color 0.25s ease, box-shadow 0.3s ease;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.4rem;
  font-size: 1rem;
  min-height: 44px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.btn-primary {
  background: #4caf50;
  color: white;
  box-shadow: 0 6px 14px #4caf5070;
}

.btn-primary:hover,
.btn-primary:focus {
  background: #43a047;
  box-shadow: 0 8px 20px #43a047bb;
  outline: none;
}

.btn-secondary {
  background: #2196f3;
  color: white;
  box-shadow: 0 6px 14px #2196f370;
}

.btn-secondary:hover,
.btn-secondary:focus {
  background: #1e88e5;
  box-shadow: 0 8px 20px #1e88e5bb;
  outline: none;
}

/* Upload section */
.upload-section {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: space-between;
}

.file-upload,
.url-upload {
  display: flex;
  gap: 0.75rem;
  flex: 1 1 320px;
  align-items: center;
}

/* Hidden file input label as button */
.file-upload-label {
  cursor: pointer;
  user-select: none;
  border-radius: 10px;
  padding: 0.55rem 1.1rem;
  background: #007bff;
  color: white;
  font-weight: 600;
  box-shadow: 0 4px 12px #007bff70;
  transition: background-color 0.3s ease;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.file-upload-label:hover,
.file-upload-label:focus {
  background: #0069d9;
  box-shadow: 0 6px 18px #0069d9bb;
  outline: none;
}

.file-upload input[type="file"] {
  display: none;
}

.file-upload button,
.url-upload button {
  min-width: 130px;
}

/* Inputs */
.url-upload input[type="url"] {
  flex: 1;
  padding: 12px 14px;
  font-size: 1rem;
  border-radius: 10px;
  border: 1.8px solid #ccc;
  transition: border-color 0.3s ease;
}

.url-upload input[type="url"]:focus {
  border-color: #007bff;
  box-shadow: 0 0 6px #007bff80;
  outline: none;
}

/* Footer */
footer {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: #888;
  text-align: center;
  user-select: none;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translate3d(0, 12px, 0);
  }
  to {
    opacity: 1;
    transform: translateZ(0);
  }
}

/* Responsive */
@media (max-width: 480px) {
  .header {
    flex-direction: column;
    align-items: flex-start;
  }
  .language-container {
    width: 100%;
  }
  .language-select {
    width: 100%;
  }
  .upload-section {
    flex-direction: column;
  }
  .file-upload,
  .url-upload {
    flex: 1 1 100%;
  }
  .chat-box {
    max-height: 300px;
  }
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.company-logo {
  height: 46px; /* Adjust as needed */
  width: auto;
  border-radius: 6px;
  background: white;
  object-fit: contain;
}