:root {
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --bg-dark: #111827;
  --bg-darker: #030712;
  --text-light: #f9fafb;
  --text-muted: #9ca3af;
  --bot-msg-bg: #1f2937;
  --user-msg-bg: #6366f1;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Inter', sans-serif;
}

body {
  background-color: var(--bg-darker);
  color: var(--text-light);
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Screens */
.screen {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease-in-out;
}

.screen.active {
  opacity: 1;
  pointer-events: auto;
}

/* Landing Screen */
#landing-screen {
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, #1f2937 0%, var(--bg-darker) 100%);
}

.start-btn {
  position: relative;
  background: var(--primary);
  color: white;
  border: none;
  padding: 16px 48px;
  font-size: 20px;
  font-weight: 600;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
  transition: transform 0.2s, box-shadow 0.2s;
}

.start-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(99, 102, 241, 0.6);
  background: var(--primary-hover);
}

.pulse-ring {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: 50px;
  border: 2px solid var(--primary);
  animation: pulsing 2s infinite;
  pointer-events: none;
}

@keyframes pulsing {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.3); opacity: 0; }
}

/* Chat Screen */
#chat-screen {
  background-color: var(--bg-dark);
}

.chat-header {
  padding: 20px 32px;
  background-color: rgba(17, 24, 39, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
}

.header-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.avatar {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 18px;
  box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
}

.chat-header h2 {
  font-size: 20px;
  margin-bottom: 2px;
}

.status {
  font-size: 13px;
  color: #10b981;
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-dot {
  width: 8px; height: 8px;
  background-color: #10b981;
  border-radius: 50%;
  animation: blink 2s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.action-btn {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.action-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: white;
}

.chat-box {
  flex: 1;
  padding: 32px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  scroll-behavior: smooth;
}

.chat-box::-webkit-scrollbar { width: 8px; }
.chat-box::-webkit-scrollbar-track { background: transparent; }
.chat-box::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 10px; }

.message {
  max-width: 70%;
  padding: 16px 20px;
  border-radius: 16px;
  font-size: 15px;
  line-height: 1.5;
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
  transform: translateY(10px);
  word-wrap: break-word;
}

.bot-message {
  background-color: var(--bot-msg-bg);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  border: 1px solid rgba(255,255,255,0.02);
}

.user-message {
  background-color: var(--user-msg-bg);
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

@keyframes slideUp {
  to { opacity: 1; transform: translateY(0); }
}

.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 16px 20px;
  background-color: var(--bot-msg-bg);
  align-self: flex-start;
  border-radius: 16px;
  border-bottom-left-radius: 4px;
  align-items: center;
}

.dot {
  width: 6px; height: 6px;
  background-color: var(--text-muted);
  border-radius: 50%;
  animation: bounce 1.4s infinite ease-in-out both;
}

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

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

.chat-footer {
  padding: 24px 32px;
  background-color: var(--bg-dark);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.input-wrapper {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  background: var(--bot-msg-bg);
  border-radius: 24px;
  padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: border-color 0.2s;
}

.input-wrapper:focus-within {
  border-color: var(--primary);
}

#chat-input {
  flex: 1;
  background: transparent;
  border: none;
  color: white;
  padding: 12px 0;
  font-size: 15px;
  outline: none;
  resize: none;
  max-height: 150px;
  min-height: 24px;
}

#chat-input::placeholder {
  color: #6b7280;
}

.send-btn {
  background: none;
  border: none;
  color: var(--primary);
  padding: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, color 0.2s;
}

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

.send-btn:disabled {
  color: #4b5563;
  cursor: not-allowed;
}

.send-btn svg {
  width: 24px; height: 24px;
  fill: currentColor;
}

@media (max-width: 768px) {
  .message { max-width: 85%; }
  .chat-header, .chat-box, .chat-footer { padding: 16px; }
}
