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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #10b981 0%, #047857 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.demo-container {
  display: flex;
  gap: 40px;
  max-width: 1200px;
  width: 100%;
  align-items: center;
}

/* Phone Frame */
.phone-frame {
  width: 375px;
  height: 750px;
  background: #000;
  border-radius: 40px;
  padding: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.phone-frame::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 150px;
  height: 25px;
  background: #000;
  border-radius: 20px;
  z-index: 10;
}

/* Status Bar */
.status-bar {
  background: #075e54;
  height: 44px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  color: white;
  font-size: 16px;
  font-weight: 600;
  border-radius: 32px 32px 0 0;
  flex-shrink: 0;
}

.status-icons {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 14px;
}

/* WhatsApp Header */
.whatsapp-header {
  background: #075e54;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  color: white;
  flex-shrink: 0;
}

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

.back-btn {
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
}

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

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #10b981;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.contact-name {
  font-weight: 500;
  font-size: 16px;
}

.contact-status {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  opacity: 0.9;
}

.online-dot {
  width: 8px;
  height: 8px;
  background: #4ade80;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.header-actions {
  display: flex;
  gap: 20px;
}

.header-btn {
  background: none;
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.3s;
}

.header-btn:hover {
  opacity: 1;
}

/* Chat Container */
.chat-container {
  background: #e5ddd5;
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="whatsapp-bg" width="50" height="50" patternUnits="userSpaceOnUse"><path d="M25 25L35 15M15 35L25 25M35 35L45 25M25 45L35 35" stroke="%23ffffff" stroke-width="0.5" stroke-opacity="0.1" fill="none"/></pattern></defs><rect width="100" height="100" fill="url(%23whatsapp-bg)"/></svg>');
  flex: 1;
  overflow-y: auto;
  padding: 20px 16px;
  position: relative;
}

/* Message Styles */
.message {
  margin-bottom: 12px;
  display: flex;
  animation: slideInMessage 0.4s ease-out;
}

.message.bot {
  justify-content: flex-start;
}

.message.user {
  justify-content: flex-end;
}

.message-bubble {
  max-width: 80%;
  padding: 8px 12px;
  border-radius: 18px;
  position: relative;
  word-wrap: break-word;
}

.message.bot .message-bubble {
  background: white;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  border-bottom-left-radius: 4px;
}

.message.user .message-bubble {
  background: #dcf8c6;
  border-bottom-right-radius: 4px;
}

.message-text {
  font-size: 14px;
  line-height: 1.4;
  color: #1f2937;
}

.message-time {
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
  text-align: right;
}

.message-status {
  display: inline-flex;
  margin-left: 4px;
  color: #059669;
}

/* Menu Items */
.menu-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #f1f5f9;
}

.menu-item:last-child {
  border-bottom: none;
}

.menu-item-name {
  font-weight: 500;
  color: #1f2937;
}

.menu-item-price {
  color: #10b981;
  font-weight: 600;
}

/* Order Summary */
.order-summary {
  background: #f8fafc;
  border-radius: 8px;
  padding: 12px;
  margin: 8px 0;
}

.order-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.order-total {
  border-top: 1px solid #e2e8f0;
  padding-top: 8px;
  margin-top: 8px;
  font-weight: 600;
  color: #10b981;
}

/* Typing Indicator */
.typing-indicator {
  display: none;
  padding: 0 0 10px 0;
  align-items: center;
  gap: 8px;
  background: transparent;
  margin-bottom: 12px;
  position: absolute;
  bottom: 10px;
  left: 16px;
  right: 16px;
}

.typing-indicator.active {
  display: flex;
  animation: fadeIn 0.3s ease;
}

.typing-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #10b981;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.typing-bubble {
  background: white;
  border-radius: 18px;
  padding: 12px 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.typing-dots {
  display: flex;
  gap: 4px;
}

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

.typing-dots span:nth-child(1) { animation-delay: 0ms; }
.typing-dots span:nth-child(2) { animation-delay: 200ms; }
.typing-dots span:nth-child(3) { animation-delay: 400ms; }

/* Input Area */
.input-area {
  background: #f0f0f0;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 0 0 32px 32px;
  flex-shrink: 0;
}

.input-btn {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.3s;
}

.input-btn:hover {
  opacity: 1;
}

.input-field {
  flex: 1;
}

.input-field input {
  width: 100%;
  padding: 10px 16px;
  border: none;
  border-radius: 20px;
  background: white;
  font-size: 14px;
  outline: none;
}

.send-btn {
  background: #10b981;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: white;
  font-size: 18px;
  cursor: pointer;
  transition: background 0.3s;
}

.send-btn:hover {
  background: #059669;
}

/* Control Panel */
.control-panel {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  max-width: 400px;
  text-align: center;
}

.control-panel h2 {
  color: #1f2937;
  margin-bottom: 8px;
  font-size: 24px;
  font-weight: 700;
}

.control-panel p {
  color: #6b7280;
  margin-bottom: 24px;
  line-height: 1.5;
}

.demo-btn {
  background: linear-gradient(135deg, #10b981 0%, #047857 100%);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 0 8px 16px;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.demo-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
}

.demo-btn.secondary {
  background: #6b7280;
  box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3);
}

.demo-btn.secondary:hover {
  background: #4b5563;
  box-shadow: 0 8px 20px rgba(107, 114, 128, 0.4);
}

.demo-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.demo-stats {
  margin-top: 24px;
  text-align: left;
}

.stat {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  padding: 8px 0;
  border-bottom: 1px solid #f1f5f9;
}

.stat:last-child {
  border-bottom: none;
}

.stat-label {
  color: #6b7280;
  font-size: 14px;
}

.stat-value {
  color: #10b981;
  font-weight: 600;
  font-size: 14px;
}

/* Animations */
@keyframes slideInMessage {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .demo-container {
    flex-direction: column;
    gap: 20px;
  }

  .phone-frame {
    width: 100%;
    max-width: 375px;
  }

  .control-panel {
    width: 100%;
    max-width: 375px;
  }
}

/* Scrollbar */
.chat-container::-webkit-scrollbar {
  width: 4px;
}

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

.chat-container::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 2px;
}