:root {
  --primary: #6366f1;
  --bg-gradient: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  --chat-bg: rgba(255, 255, 255, 0.85);
  --bubble-me: #6366f1;
  --bubble-other: #ffffff;
  --text-main: #1f2937;
  --text-muted: #6b7280;
}

* {
  box-sizing: border-box;
}

body, html {
  height: 100vh;
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg-gradient);
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

#root {
  width: 100%;
  height: 100%;
  max-width: 900px;
  max-height: 800px;
  padding: 20px;
}

.chat-wrapper {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--chat-bg);
  backdrop-filter: blur(10px);
  border-radius: 24px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  border: 1px solid rgba(255,255,255,0.3);
  overflow: hidden;
}

.messages-list {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scroll-behavior: smooth;
}

/* Custom Scrollbar */
.messages-list::-webkit-scrollbar {
  width: 6px;
}
.messages-list::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.1);
  border-radius: 10px;
}

.message {
  display: flex;
  flex-direction: column;
  max-width: 80%;
}

.message.outgoing {
  align-self: flex-end;
}

.message.incoming {
  align-self: flex-start;
}

.message-bubble {
  padding: 12px 18px;
  border-radius: 20px;
  font-size: 15px;
  line-height: 1.5;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  word-break: break-word;
}

.incoming .message-bubble {
  background: var(--bubble-other);
  color: var(--text-main);
  border-bottom-left-radius: 4px;
}

.outgoing .message-bubble {
  background: var(--bubble-me);
  color: white;
  border-bottom-right-radius: 4px;
}

.user-label {
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.outgoing .user-label {
  text-align: right;
}

.chat-form {
  padding: 20px;
  background: white;
  display: flex;
  gap: 12px;
  align-items: center;
  border-top: 1px solid rgba(0,0,0,0.05);
}

.chat-form input {
  flex: 1;
  padding: 14px 20px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  outline: none;
  font-size: 15px;
  transition: border-color 0.2s;
}

.chat-form input:focus {
  border-color: var(--primary);
}

.chat-form button {
  background: var(--primary);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.1s, opacity 0.2s;
  height: 100%;
}

.chat-form button:hover {
  opacity: 0.9;
}

.chat-form button:active {
  transform: scale(0.95);
}

.chat-header {
  padding: 16px 20px;
  background: white;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
}
