* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.container {
  max-width: 600px;
  width: 100%;
  scale: .75;
}

.macbook-window {
  background: #f5f5f7;
  border-radius: .75rem;
  overflow: hidden;
  box-shadow: 0 1.25rem 4rem rgba(0, 0, 0, 0.3);
  margin-bottom: 1rem;
}

.window-header {
  background: #2d2d2d;
  padding: .75rem 1.25rem;
  display: flex;
  align-items: center;
}

.window-controls {
  display: flex;
  gap: .5rem;
}

.control {
  width: .75rem;
  height: .75rem;
  border-radius: 50%;
  display: inline-block;
}

.close { background: #ff5f57; }
.minimize { background: #ffbd2e; }
.maximize { background: #28ca42; }

.window-title {
  color: #fff;
  font-size: 14px;
  opacity: .8;
  flex: 1;
  text-align: center;
}

.window-body {
  display: flex;
  min-height: 475px;
}

.chat-container {
  position: relative;
  flex: 3;
  padding: 1rem 1rem 2rem;
  background: #fff;
  border-right: 1px solid #e0e0e0;
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid #e0e0e0;
  margin-bottom: 1rem;
}

.chatbot-avatar {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.chatbot-info h3 {
  color: #333;
  font-size: 1.125rem;
  margin-bottom: .25rem;
}

.chatbot-info p {
  color: #666;
  font-size: .85rem;
}

.status-dot {
  width: .75rem;
  height: .75rem;
  background: #28ca42;
  border-radius: 50%;
  display: block;
  animation: glow 1.5s infinite;
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 .25rem #28ca42; }
  50% { box-shadow: 0 0 1rem #28ca42; }
}

.chat-messages {
  overflow-y: auto;
}

.message {
  margin-bottom: 1.25rem;
  max-width: 95%;
  animation: slideIn .3s ease-out;
}

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

.message.bot {
  margin-right: auto;
}

.message.user {
  margin-left: auto;
}

.message-content {
  padding: 1rem 1.25rem;
  border-radius: 1.25rem;
  font-size: 1rem;
  line-height: 1.5;
  position: relative;
}

.message.bot .message-content {
  background: #f0f2f5;
  color: #333;
  border-top-left-radius: .25rem;
}

.message.user .message-content {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  border-bottom-right-radius: .25rem;
}

.message-time {
  font-size: .75rem;
  color: #999;
  margin-top: .25rem;
  text-align: right;
}

.typing {
  display: flex;
  align-items: center;
}

.typing-indicator {
  display: flex;
  gap: .25rem;
  padding: 1rem 1.25rem;
  background: #f0f2f5;
  border-radius: 1.25rem;
  border-top-left-radius: .25rem;
}

.typing-indicator span {
  width: .5rem;
  height: .5rem;
  background: #999;
  border-radius: 50%;
  animation: bounce 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
.typing-indicator span:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

.chat-input-area {
  background: #f8f9fa;
  padding: 1.25rem;
  border-radius: .75rem;
  border: 1px solid #e0e0e0;
}

.input-container {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.input-container input {
  width: 80%;
  flex: 1;
  padding: 1rem 1.25rem;
  border: 2px solid #e0e0e0;
  border-radius: 1.5rem;
  font-size: 1rem;
  outline: none;
  transition: border-color .3s;
}

.input-container input:focus {
  border-color: #667eea;
}

.send-btn {
  width: 3.25rem;
  height: 3.25rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 18px;
  cursor: pointer;
  transition: transform .3s;
}

.send-btn:hover {
  transform: scale(1.1);
}

.input-hint {
  font-size: .65rem;
  color: #666;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: .75rem 1.25rem;
  background: #eee;
}

.input-hint i {
  margin-right: .25rem;
  color: #667eea;
}

.window-footer {
  background: #fff;
  padding: 1.25rem;
  border-top: 1px solid #e0e0e0;
}

.stats {
  display: flex;
  justify-content: center;
  gap: 1.75rem;
  align-items: center;
}

.stats span {
  color: #fff;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.stats i {
  color: #fff;
}

/* Scrollbar styling */
.chat-messages::-webkit-scrollbar {
  width: 6px;
}

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

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

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

/* Responsive design */
@media (min-width: 415px) {
  .message {
    max-width: 85%;
  }
}

@media (min-width: 576px) {
  body {
    padding: 1.25rem;
  }
  
  .container {
    scale: 1;
  }

  .chat-container {
    padding: 2rem;
  }

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

  .chat-messages {
    height: 300px;
  }

  .message {
    max-width: 75%;
  }

  .input-hint {
    font-size: .75rem;
  }
}
