/* General Reset and Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter", sans-serif;
}

body,
html {
  height: 100%;
  background-color: #f5f7fa;
  color: #333;
  overflow: hidden;
}

/* App Container - Main Layout */
.app-container {
  display: flex;
  height: 100vh;
  width: 100%;
  overflow: hidden;
}

/* Sidebar Styles */
.sidebar {
  width: 280px;
  background-color: #10b981;
  color: white;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.logo-container {
  padding: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: white;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 20px;
  color: #10b981;
}

.sidebar h1 {
  font-size: 1.5rem;
  font-weight: 600;
  color: white;
}

.sidebar-content {
  flex: 1;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-section h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
  font-weight: 600;
}

.sidebar-section p {
  opacity: 0.8;
  font-size: 0.9rem;
}

.main-site-btn {
  background-color: rgba(255, 255, 255, 0.2);
  color: white;
  text-decoration: none;
  padding: 12px 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.3s ease;
  font-weight: 500;
  margin-top: auto;
}

.main-site-btn:hover {
  background-color: rgba(255, 255, 255, 0.3);
}

.sidebar-footer {
  padding: 16px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.8rem;
  opacity: 0.7;
  text-align: center;
}

/* Main Chat Area */
.chat-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  background-color: white;
  height: 100%;
  overflow: hidden;
}

/* Chat Header */
.chat-header {
  padding: 24px;
  background-color: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.chat-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #10b981;
  margin-bottom: 4px;
}

.chat-header p {
  color: #64748b;
  font-size: 0.9rem;
}

/* Messages Container */
.messages-container {
  flex: 1;
  overflow: hidden;
  position: relative;
  padding: 0 24px;
}

/* Chat Box */
.chat-box {
  height: 100%;
  overflow-y: auto;
  padding: 24px 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scrollbar-width: thin;
  scrollbar-color: rgba(16, 185, 129, 0.3) transparent;
}

.chat-box::-webkit-scrollbar {
  width: 6px;
}

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

.chat-box::-webkit-scrollbar-thumb {
  background-color: rgba(16, 185, 129, 0.3);
  border-radius: 6px;
}

/* Welcome Message */
.welcome-message {
  background: #f1f5f9;
  border-radius: 12px;
  padding: 20px;
  border-left: 4px solid #10b981;
  animation: fadeIn 0.5s ease;
  max-width: 90%;
}

.welcome-message h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: #334155;
}

.welcome-message p {
  color: #64748b;
  line-height: 1.5;
}

/* Message Styles */
.message {
  max-width: 80%;
  padding: 16px;
  border-radius: 12px;
  line-height: 1.5;
  position: relative;
  animation: fadeIn 0.3s ease;
  margin-bottom: 8px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.user-message {
  background: #10b981;
  color: white;
  align-self: flex-end;
  margin-left: auto;
  border-bottom-right-radius: 4px;
}

.bot-message {
  background: #f1f5f9;
  color: #334155;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  border-left: 3px solid #10b981;
}

.typing {
  color: #64748b;
  font-style: italic;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  gap: 8px;
}

.typing::after {
  content: "";
  width: 12px;
  height: 12px;
  background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cstyle%3E.spinner_P7sC%7Banimation:spinner_svv2 1.2s cubic-bezier(0.52,.6,.25,.99) infinite%7D.spinner_Km9P%7Banimation-delay:.6s%7D@keyframes spinner_svv2%7B0%25,66%25%7Btransform:scale(1)%7D33%25%7Btransform:scale(.5)%7D%7D%3C/style%3E%3Ccircle class='spinner_P7sC' cx='4' cy='12' r='3' fill='%2310b981'/%3E%3Ccircle class='spinner_P7sC spinner_Km9P' cx='12' cy='12' r='3' fill='%2310b981'/%3E%3Ccircle class='spinner_P7sC' cx='20' cy='12' r='3' fill='%2310b981'/%3E%3C/svg%3E");
  background-size: contain;
  opacity: 0.7;
}

/* Input Area */
.input-container {
  padding: 16px 24px;
  background-color: #f8fafc;
  border-top: 1px solid #e2e8f0;
}

.input-area {
  display: flex;
  gap: 12px;
  background: white;
  border-radius: 8px;
  padding: 4px 4px 4px 16px;
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.input-area:focus-within {
  border-color: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

input {
  flex: 1;
  padding: 12px 0;
  border: none;
  background-color: transparent;
  color: #334155;
  outline: none;
  font-size: 0.95rem;
}

input::placeholder {
  color: #94a3b8;
}

button {
  background: #10b981;
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

button:hover {
  background-color: #0d9668;
}

button svg {
  transition: transform 0.3s ease;
}

button:hover svg {
  transform: translateX(2px);
}

/* Responsive Design */
@media (max-width: 900px) {
  .sidebar {
    width: 240px;
  }
}

@media (max-width: 768px) {
  .app-container {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    height: auto;
    flex-direction: row;
    align-items: center;
    padding: 12px 16px;
  }

  .logo-container {
    padding: 0;
    border-bottom: none;
  }

  .sidebar-content {
    flex-direction: row;
    align-items: center;
    padding: 0 16px;
    gap: 16px;
  }

  .sidebar-section {
    display: none;
  }

  .main-site-btn {
    margin-top: 0;
    padding: 8px 12px;
    font-size: 0.8rem;
  }

  .sidebar-footer {
    display: none;
  }

  .chat-area {
    height: calc(100vh - 64px);
  }

  .welcome-message,
  .message {
    max-width: 90%;
  }
}

@media (max-width: 576px) {
  .sidebar {
    padding: 8px 12px;
  }

  .logo-icon {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }

  .sidebar h1 {
    font-size: 1.2rem;
  }

  .main-site-btn {
    padding: 6px 10px;
    font-size: 0.75rem;
  }

  .chat-header {
    padding: 16px;
  }

  .chat-header h2 {
    font-size: 1.3rem;
  }

  .messages-container {
    padding: 0 16px;
  }

  .input-container {
    padding: 12px 16px;
  }

  .welcome-message,
  .message {
    max-width: 95%;
    padding: 12px;
  }
}

