* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: #000;
  color: white;
  overflow-x: hidden;
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: #000;
  z-index: 1000;
  padding: 0;
  border-bottom: 1px solid #333;
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-left: 6rem;
}

.logo-image {
  height: 32px;
  width: auto;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  letter-spacing: 0.1em;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  flex: auto;
  justify-content: center;
}

.nav-link {
  color: white;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-link:hover {
  color: #22c55e;
}

.nav-dropdown .fas {
  font-size: 0.7rem;
  margin-left: 0.25rem;
}

.btn-gradient-border {
  position: relative !important;
  display: inline-block !important;
  padding: 20px 30px !important;
  font-size: 1rem !important;
  letter-spacing: 1.3px;
  font-weight: 100 !important;
  color: #fff !important;
  background: #000 !important;
  border: 3px solid transparent !important;
  background-clip: padding-box !important;
  border-radius: 35px !important;
  transition: all .3s ease-in-out !important;
}

.btn-gradient-border:before {
  content: "";
  position: absolute;
  inset: -2px;
  background: linear-gradient(90deg, #00ff08, #00fbff);
  border-radius: 35px;
  z-index: -1;
}

.banner-text {
  text-transform: uppercase;
  font-family: Inter, sans-serif;
  font-size: clamp(2.5rem, 5vw, 3rem);
  letter-spacing: 2.2px;
  text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5);
  margin-bottom: 15px;
}

/* Main Content */
.main-content {
  min-height: 100vh;
  background: linear-gradient(180deg, #000 0%, #1a5f3f 50%, #22c55e 100%);
  position: relative;
  padding-top: 65px;
}

.content-wrapper {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: calc(100vh - 80px);
  padding: 0 2rem;
  position: relative;
}

.content-wrapper::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("https://botonweb.com/media/Aichatbot-2-NYCU7PFX.png") no-repeat;
  background-size: cover;
  background-position: center right;
  opacity: 0.8;
  z-index: 1;
}

.hero-section {
  flex: 1;
  max-width: 60%;
  z-index: 2;
  position: relative;
}

.hero-buttons {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 3rem;
}

.btn {
  padding: 1rem 2.5rem;
  border: 2px solid white;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: none;
  letter-spacing: 0.02em;
  background: transparent;
  color: white;
}

.btn:hover {
  background: white;
  color: #1a5f3f;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(255, 255, 255, 0.2);
}

/* Chat Widget - ONLY MODIFIED THESE PARTS FOR SCROLLING */
.chat-widget {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 380px;
  height: 500px;
  background: #1a1a1a;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  display: none;
  flex-direction: column;
  z-index: 1001;
  border: 1px solid #333;
  overflow: hidden;
}

.chat-widget.open {
  display: flex;
  animation: slideUp 0.3s ease;
}

.chat-header {
  background: #22c55e;
  color: white;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0; /* Prevent header from shrinking */
}

.chat-title {
  font-weight: 600;
  font-size: 1rem;
}

.chat-close {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  font-size: 1.2rem;
  padding: 0.25rem;
  border-radius: 4px;
  transition: background 0.2s ease;
}

.chat-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

.chat-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #1a1a1a;
  min-height: 0; /* ADDED: This enables proper flex scrolling */
  overflow: hidden;
}

.chat-messages {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto; /* KEPT: This enables scrolling */
  overflow-x: hidden; /* ADDED: Prevent horizontal scroll */
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 0; /* ADDED: This is crucial for flex scrolling */
}

.message {
  display: flex;
  animation: fadeIn 0.3s ease;
}

.bot-message {
  justify-content: flex-start;
}

.user-message {
  justify-content: flex-end;
}

.message-content {
  max-width: 85%;
}

.message-text {
  background: #2a2a2a;
  color: #e5e5e5;
  padding: 0.875rem 1.125rem;
  border-radius: 18px;
  line-height: 1.5;
  font-size: 0.9rem;
  border: 1px solid #333;
}

.user-message .message-text {
  background: #22c55e;
  color: white;
  border-color: #22c55e;
}

.typing-indicator {
  padding: 0 1.5rem 1rem;
  flex-shrink: 0; /* ADDED: Prevent typing indicator from shrinking */
}

.typing-dots {
  background: #2a2a2a;
  padding: 0.875rem 1.125rem;
  border-radius: 18px;
  display: inline-flex;
  gap: 4px;
  border: 1px solid #333;
}

.typing-dots span {
  width: 6px;
  height: 6px;
  background: #22c55e;
  border-radius: 50%;
  animation: typing 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

.chat-footer {
  background: #1a1a1a;
  padding: 1.5rem;
  border-top: 1px solid #333;
  flex-shrink: 0; /* ADDED: Prevent footer from shrinking */
}

.chat-input-container {
  display: flex;
  gap: 0.75rem;
  align-items: flex-end;
}

#messageInput {
  flex: 1;
  background: #2a2a2a;
  border: 1px solid #333;
  border-radius: 20px;
  padding: 0.875rem 1.125rem;
  color: #e5e5e5;
  font-size: 0.9rem;
  resize: none;
  outline: none;
  transition: border-color 0.3s ease;
  font-family: inherit;
  line-height: 1.4;
  max-height: 100px;
}

#messageInput::placeholder {
  color: #666;
  font-style: italic;
}

#messageInput:focus {
  border-color: #22c55e;
}

.send-btn {
  width: 44px;
  height: 44px;
  background: #22c55e;
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.send-btn:hover {
  background: #16a34a;
  transform: scale(1.05);
}

.send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Floating Chat Button */
.chat-float-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 60px;
  height: 60px;
  background: #22c55e;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(34, 197, 94, 0.4);
  transition: all 0.3s ease;
  z-index: 1000;
}

.chat-float-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 25px rgba(34, 197, 94, 0.6);
}

.chat-float-btn i {
  font-size: 24px;
  color: white;
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.loading-content {
  background: #1a1a1a;
  padding: 2rem;
  border-radius: 12px;
  text-align: center;
  border: 1px solid #333;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #333;
  border-top: 3px solid #22c55e;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

.loading-content p {
  color: #e5e5e5;
  font-size: 0.9rem;
}

/* Toast Notifications */
.toast {
  position: fixed;
  top: 2rem;
  right: 2rem;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  color: white;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  z-index: 2001;
  animation: slideInRight 0.3s ease;
  max-width: 400px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.error-toast {
  background: #dc2626;
  border: 1px solid #b91c1c;
}

.success-toast {
  background: #16a34a;
  border: 1px solid #15803d;
}

.toast-close {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 0.25rem;
  margin-left: auto;
  border-radius: 4px;
  transition: background 0.2s ease;
}

.toast-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes typing {
  0%,
  60%,
  100% {
    transform: translateY(0);
  }

  30% {
    transform: translateY(-8px);
  }
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
  }

  to {
    transform: translateX(0);
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Responsive Design */
@media (max-width: 1024px) {
  .content-wrapper::before {
    background-size: auto 50%;
    background-position: center right;
  }

  .hero-section {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .content-wrapper {
    flex-direction: column;
    text-align: center;
    justify-content: center;
  }

  .content-wrapper::before {
    background-size: auto 40%;
    background-position: center;
    opacity: 0.6;
  }

  .hero-text h1 {
    font-size: 2rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 280px;
  }

  .chat-widget {
    width: calc(100vw - 2rem);
    height: calc(100vh - 4rem);
    bottom: 1rem;
    right: 1rem;
    left: 1rem;
  }

  .chat-float-btn {
    bottom: 1rem;
    right: 1rem;
  }

  .toast {
    right: 1rem;
    left: 1rem;
    max-width: none;
  }
}

@media (max-width: 480px) {
  .content-wrapper {
    padding: 0 1rem;
  }

  .content-wrapper::before {
    background-size: auto 35%;
  }

  .hero-text h1 {
    font-size: 1.8rem;
  }
}

/* Scrollbar Styling */
.chat-messages::-webkit-scrollbar {
  width: 4px;
}

.chat-messages::-webkit-scrollbar-track {
  background: #2a2a2a;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: #22c55e;
  border-radius: 2px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
  background: #16a34a;
}
