/* EcoBot page specific styles - completely isolated */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  background: #00ff41 !important;
  min-height: 100vh;
}

.ecobot-container {
  min-height: 100vh;
  background: #00ff41;
  padding: 2rem;
}

/* Header Section */
.header-section {
  display: flex;
  justify-content: center;
  margin-bottom: 3rem;
}

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

.ecobot-title {
  background: white;
  color: black;
  font-size: 1.8rem;
  font-weight: bold;
  padding: 1rem 2.5rem;
  border-radius: 3rem;
  border: 3px solid #000;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.ecobot-icon {
  background: white;
  color: #00ff41;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  border: 3px solid #000;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Main Layout */
.main-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

@media (max-width: 1024px) {
  .main-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .ecobot-container {
    padding: 1.5rem;
  }

  .chat-container {
    height: 500px;
    padding: 2rem;
  }

  .topics-sidebar {
    order: -1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
  }

  .topic-button {
    padding: 1rem 1.5rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 768px) {
  .ecobot-container {
    padding: 1rem;
  }

  .header-section {
    margin-bottom: 2rem;
  }

  .ecobot-title {
    font-size: 1.5rem;
    padding: 0.8rem 2rem;
  }

  .ecobot-icon {
    width: 3.5rem;
    height: 3.5rem;
    font-size: 1.5rem;
  }

  .chat-container {
    height: 450px;
    padding: 1.5rem;
  }

  .topics-sidebar {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .ecobot-container {
    padding: 1rem;
  }

  .ecobot-title {
    font-size: 1.3rem;
    padding: 0.7rem 1.5rem;
  }

  .ecobot-icon {
    width: 3rem;
    height: 3rem;
    font-size: 1.3rem;
  }

  .topics-sidebar {
    grid-template-columns: 1fr;
  }

  .message-bubble {
    max-width: 85%;
  }
}

/* Chat Container */
.chat-container {
  background: white;
  border-radius: 2rem;
  padding: 2.5rem;
  height: 600px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
  border: 2px solid rgba(0, 0, 0, 0.1);
}

/* Messages Area */
.messages-area {
  flex: 1;
  overflow-y: auto;
  margin-bottom: 2rem;
  padding-right: 1rem;
}

.message {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 2rem;
}

.user-message {
  flex-direction: row-reverse;
}

.message-avatar {
  width: 3rem;
  height: 3rem;
  background: #333;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.user-message .message-avatar {
  background: #00ff41;
  color: #333;
}

.message-bubble {
  background: #333;
  color: white;
  padding: 1.2rem 1.5rem;
  border-radius: 1.5rem;
  max-width: 75%;
  position: relative;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.user-message .message-bubble {
  background: #f5f5f5;
  color: #333;
}

.message-text {
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
}

.message-text strong {
  font-weight: 700;
}

/* Typing Indicator */
.typing-indicator .message-bubble {
  padding: 1.2rem 1.5rem;
}

.typing-dots {
  display: flex;
  gap: 0.3rem;
  align-items: center;
}

.typing-dots span {
  width: 0.6rem;
  height: 0.6rem;
  background: #9ca3af;
  border-radius: 50%;
  animation: ecobot-typing 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(1) {
  animation-delay: 0s;
}

.typing-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes ecobot-typing {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.5;
  }
  30% {
    transform: translateY(-10px);
    opacity: 1;
  }
}

/* Chat Input */
.chat-input {
  margin-top: auto;
}

.input-wrapper {
  display: flex;
  align-items: center;
  background: #e8e8e8;
  border-radius: 3rem;
  padding: 1rem 1.5rem;
  gap: 1rem;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
}

.message-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 1.1rem;
  color: #333;
}

.message-input::placeholder {
  color: #888;
  font-size: 1.1rem;
}

.send-button {
  background: #888;
  border: none;
  border-radius: 50%;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
  color: white;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.send-button:hover {
  background: #666;
  transform: scale(1.05);
}

.send-button:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
}

/* Topics Sidebar */
.topics-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.topic-button {
  background: white;
  border: none;
  border-radius: 3rem;
  padding: 1.2rem 1.8rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 1rem;
  font-weight: 500;
  color: #333;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  border: 2px solid rgba(0, 0, 0, 0.05);
}

.topic-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  background: #f8f8f8;
}

.topic-button:active {
  transform: translateY(-1px);
}

.topic-button i {
  color: #888;
  font-size: 1rem;
}

/* Navigation */
.nav-section {
  text-align: center;
  margin-top: 3rem;
}

.back-home {
  color: #333;
  text-decoration: none;
  font-weight: 600;
  padding: 1rem 2rem;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 3rem;
  transition: all 0.3s;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  border: 2px solid rgba(0, 0, 0, 0.1);
  display: inline-block;
}

.back-home:hover {
  background: rgba(255, 255, 255, 1);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* Scrollbar Styling */
.messages-area::-webkit-scrollbar {
  width: 8px;
}

.messages-area::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.messages-area::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

.messages-area::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}
