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

body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: #0f0f0f;
  color: #f5f7fb;
  line-height: 1.5;
  overflow-x: hidden;
}

.app {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.header {
  padding: 20px;
  text-align: center;
  border-bottom: 1px solid #222;
  background: linear-gradient(135deg, #000000 0%, #111111 100%);
}

.header h1 {
  font-size: 32px;
  font-weight: 600;
  background: linear-gradient(135deg, #4f8cff 0%, #7aa6ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
}

.main {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.chat-container {
  width: 100%;
  max-width: 800px;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: rgba(16, 16, 16, 0.6);
  border-radius: 0;
}

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

.welcome-message {
  text-align: center;
  padding: 40px 20px;
  color: #b6bdcf;
}

.welcome-message h2 {
  font-size: 24px;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #4f8cff 0%, #7aa6ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.message {
  max-width: 70%;
  padding: 12px 16px;
  border-radius: 12px;
  animation: fadeIn 0.3s ease;
  word-wrap: break-word;
  white-space: pre-wrap;
}

.user-message {
  align-self: flex-end;
  background: linear-gradient(135deg, #4f8cff 0%, #7aa6ff 100%);
  color: white;
}

.bot-message {
  align-self: flex-start;
  background: rgba(30, 30, 30, 0.9);
  color: #f5f7fb;
  border: 1px solid #2a2d34;
}

.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 12px 16px;
  max-width: 70px;
  background: rgba(30, 30, 30, 0.9);
  border: 1px solid #2a2d34;
  border-radius: 12px;
  align-self: flex-start;
}

.typing-indicator span {
  width: 8px;
  height: 8px;
  background: #4f8cff;
  border-radius: 50%;
  animation: bounce 1.4s infinite;
}

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

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

.typing-indicator span:nth-child(3) {
  animation-delay: 0.4s;
}

.input-container {
  padding: 16px;
  border-top: 1px solid #222;
  background: rgba(16, 16, 16, 0.8);
}

.input-wrapper {
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

#messageInput {
  flex: 1;
  padding: 12px 16px;
  background: rgba(30, 30, 30, 0.9);
  border: 1px solid #2a2d34;
  border-radius: 12px;
  color: #f5f7fb;
  font-size: 16px;
  font-family: inherit;
  resize: none;
  min-height: 48px;
  max-height: 200px;
  overflow-y: auto;
  transition: border-color 0.3s ease;
}

#messageInput:focus {
  outline: none;
  border-color: #4f8cff;
}

.send-button {
  padding: 12px 16px;
  background: linear-gradient(135deg, #4f8cff 0%, #7aa6ff 100%);
  border: none;
  border-radius: 12px;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 48px;
  transition: transform 0.2s ease, opacity 0.3s ease;
}

.send-button:hover {
  transform: scale(1.05);
}

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

.send-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.disclaimer {
  padding: 12px 20px;
  text-align: center;
  font-size: 12px;
  color: #b6bdcf;
  background: rgba(16, 16, 16, 0.8);
  border-top: 1px solid #222;
}

.messages::-webkit-scrollbar {
  width: 8px;
}

.messages::-webkit-scrollbar-track {
  background: rgba(30, 30, 30, 0.5);
}

.messages::-webkit-scrollbar-thumb {
  background: #4f8cff;
  border-radius: 4px;
}

.messages::-webkit-scrollbar-thumb:hover {
  background: #7aa6ff;
}

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

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

@media (max-width: 768px) {
  .header h1 {
    font-size: 24px;
  }
  
  .chat-container {
    border-radius: 0;
  }
  
  .message {
    max-width: 85%;
  }
}

.message-meta {
  font-size: 11px;
  color: #b6bdcf;
  margin-top: 4px;
  opacity: 0.7;
}

.internet-badge {
  display: inline-block;
  padding: 2px 6px;
  background: rgba(79, 140, 255, 0.2);
  border: 1px solid #4f8cff;
  border-radius: 4px;
  font-size: 10px;
  color: #4f8cff;
  margin-left: 4px;
}
