.chat-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  border-radius: 24px;
  background: #1f6feb;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  transition: transform 0.15s, background 0.15s;
  z-index: 1000;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

.chat-toggle:hover {
  transform: scale(1.04);
  background: #388bfd;
}

.chat-toggle svg {
  fill: #fff;
}

.chat-window {
  position: fixed;
  bottom: 72px;
  right: 24px;
  width: 360px;
  max-height: 480px;
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 12px;
  display: none;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  z-index: 1000;
}

.chat-window.open {
  display: flex;
}

.chat-header {
  padding: 14px 16px;
  border-bottom: 1px solid #21262d;
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-header .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3fb950;
}

.chat-header span {
  font-size: 13px;
  font-weight: 600;
  color: #e6edf3;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 280px;
  max-height: 340px;
}

.chat-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.5;
  word-wrap: break-word;
}

.chat-msg.bot {
  background: #21262d;
  color: #c9d1d9;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.chat-msg.user {
  background: #1f6feb;
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.chat-msg.typing {
  color: #8b949e;
  font-style: italic;
}

.chat-input-area {
  display: flex;
  border-top: 1px solid #21262d;
  padding: 10px;
  gap: 8px;
}

.chat-input-area input {
  flex: 1;
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 8px 12px;
  color: #c9d1d9;
  font-size: 13px;
  outline: none;
}

.chat-input-area input::placeholder {
  color: #484f58;
}

.chat-input-area input:focus {
  border-color: #58a6ff;
}

.chat-input-area button {
  background: #1f6feb;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: background 0.15s;
}

.chat-input-area button:hover {
  background: #388bfd;
}

.chat-input-area button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.chat-input-area button svg {
  width: 16px;
  height: 16px;
  fill: #fff;
}

@media (max-width: 440px) {
  .chat-window {
    width: calc(100vw - 32px);
    right: 16px;
    bottom: 72px;
  }

  .chat-toggle span {
    display: none;
  }

  .chat-toggle {
    padding: 14px;
    border-radius: 50%;
  }
}
