/* Floating button and window */
#dc-chat {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 99999;
  font-family: Inter, system-ui, Arial, sans-serif;
}
#dc-toggle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  font-size: 26px;
  cursor: pointer;
  background: #5865f2;
  color: #fff;
  transition: transform 0.2s ease;
}
#dc-toggle:hover {
  transform: scale(1.05);
}
/* start hidden and no display override to prevent flicker */
#dc-window {
  display: none;
  width: 360px;
  max-width: 90vw;
  height: 520px;
  background: #2f3136;
  color: #fff;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  flex-direction: column;
  margin-bottom: 10px;
}
#dc-header {
  background: #202225;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #3a3c43;
}
#dc-header .title {
  font-weight: 700;
  font-size: 16px;
}
#dc-close {
  background: transparent;
  color: #fff;
  border: none;
  font-size: 18px;
  cursor: pointer;
}
#dc-body {
  flex: 1;
  background: #36393f;
  overflow: auto;
  padding: 12px;
}
#dc-messages {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dc-msg {
  display: flex;
  gap: 10px;
}
.dc-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #444;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.dc-bubble {
  background: #2f3136;
  border: 1px solid #3a3c43;
  border-radius: 10px;
  padding: 8px 10px;
  max-width: 85%;
}
.dc-username {
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 2px;
  color: #c9cdfb;
}
.dc-text {
  font-size: 13px;
  line-height: 1.4;
}
.dc-time {
  opacity: 0.6;
  font-size: 11px;
  margin-left: auto;
  padding-left: 6px;
  align-self: center;
}
#dc-username-wrap {
  display: flex;
  padding: 8px;
  background: #2b2d31;
  border-top: 1px solid #3a3c43;
  gap: 8px;
}
#dc-username {
  flex: 1;
  border-radius: 8px;
  border: 1px solid #444;
  background: #1e1f22;
  color: #fff;
  padding: 8px;
}
#dc-save-name {
  border: none;
  border-radius: 8px;
  background: #5865f2;
  color: #fff;
  padding: 8px 12px;
  cursor: pointer;
}
#dc-inputbar {
  display: flex;
  gap: 8px;
  padding: 10px;
  background: #2b2d31;
  border-top: 1px solid #3a3c43;
  flex-shrink: 0;
}
#dc-input {
  flex: 1;
  resize: none;
  min-height: 42px;
  max-height: 50px;
  border-radius: 10px;
  border: 1px solid #444;
  background: #1e1f22;
  color: #fff;
  padding: 10px;
}
#dc-send {
  border: none;
  border-radius: 10px;
  background: #5865f2;
  color: #fff;
  padding: 0 16px;
  min-width: 70px;
  cursor: pointer;
}
@media (max-width: 480px) {
  #dc-window {
    height: 70vh;
  }
}
