* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.chat-container {
  width: 90%;
  max-width: 800px;
  height: 80vh;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-header {
  background: linear-gradient(90deg, #4facfe 0%, #00f2fe 100%);
  color: white;
  padding: 20px;
  text-align: center;
  font-size: 1.2em;
  font-weight: 600;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.message {
  max-width: 70%;
  padding: 15px 20px;
  border-radius: 20px;
  position: relative;
  animation: fadeInUp 0.3s ease;
}

.message.user {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 5px;
}

.message.assistant {
  background: #f8f9fa;
  color: #333;
  align-self: flex-start;
  border-bottom-left-radius: 5px;
  border: 1px solid #e9ecef;
}

.message.tool {
  background: linear-gradient(135deg, #ffeaa7 0%, #fab1a0 100%);
  color: #2d3436;
  align-self: flex-start;
  font-size: 0.9em;
  max-width: 80%;
}

.message-time {
  font-size: 0.8em;
  opacity: 0.7;
  margin-top: 5px;
}

.chat-input-container {
  padding: 20px;
  background: white;
  border-top: 1px solid #e9ecef;
  display: flex;
  gap: 10px;
}

.chat-input {
  flex: 1;
  padding: 15px 20px;
  border: 2px solid #e9ecef;
  border-radius: 25px;
  font-size: 16px;
  outline: none;
  transition: border-color 0.3s ease;
}

.chat-input:focus {
  border-color: #667eea;
}

.send-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.send-btn:hover {
  transform: scale(1.05);
}

.send-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.typing-indicator {
  display: none;
  padding: 15px 20px;
  background: #f8f9fa;
  border-radius: 20px;
  border-bottom-left-radius: 5px;
  align-self: flex-start;
  max-width: 70%;
}

.typing-dots {
  display: flex;
  gap: 4px;
}

.typing-dots span {
  width: 8px;
  height: 8px;
  background: #667eea;
  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;
}

.status-bar {
  padding: 10px 20px;
  background: #f8f9fa;
  font-size: 0.9em;
  color: #666;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tools-panel {
  background: #fff;
  border-left: 1px solid #e9ecef;
  width: 250px;
  padding: 20px;
  display: none;
}

.tool-button {
  width: 100%;
  padding: 10px;
  margin-bottom: 10px;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.tool-button:hover {
  background: #e9ecef;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes typing {
  0%, 60%, 100% {
    transform: translateY(0);
  }
  30% {
    transform: translateY(-10px);
  }
}

@media (max-width: 768px) {
  .chat-container {
    width: 95%;
    height: 90vh;
    border-radius: 10px;
  }

  .message {
    max-width: 85%;
  }

  .tools-panel {
    display: none !important;
  }
}
