* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: "Inter", sans-serif;
  overflow-x: hidden;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Plus Jakarta Sans", sans-serif;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
.dark ::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 3px;
}
html:not(.dark) ::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #7c3aed;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}
.gradient-animate {
  background-size: 200% 200%;
  animation: gradientShift 4s ease infinite;
}
@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}
.float-animation {
  animation: float 3s ease-in-out infinite;
}
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.slide-down {
  animation: slideDown 0.3s ease forwards;
}
@keyframes livePulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.5);
    opacity: 0.5;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}
.live-dot {
  animation: livePulse 1.5s ease-in-out infinite;
}
@keyframes toastIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
.toast-in {
  animation: toastIn 0.4s ease forwards;
}
@keyframes zoomIn {
  from {
    transform: scale(0.95);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
.zoom-in {
  animation: zoomIn 0.3s ease forwards;
}
@keyframes messageIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.msg-in {
  animation: messageIn 0.3s ease forwards;
}
@keyframes typingDot {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  30% {
    transform: translateY(-8px);
    opacity: 1;
  }
}
.typing-dot {
  animation: typingDot 1.2s infinite;
}
.typing-dot:nth-child(2) {
  animation-delay: 0.15s;
}
.typing-dot:nth-child(3) {
  animation-delay: 0.3s;
}

.sidebar {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.sidebar-link {
  transition: all 0.2s ease;
}
.dark .sidebar-link:hover,
.dark .sidebar-link.active {
  background: linear-gradient(
    135deg,
    rgba(124, 58, 237, 0.15),
    rgba(6, 182, 212, 0.1)
  );
}
html:not(.dark) .sidebar-link:hover,
html:not(.dark) .sidebar-link.active {
  background: linear-gradient(
    135deg,
    rgba(124, 58, 237, 0.08),
    rgba(6, 182, 212, 0.05)
  );
}
.sidebar-link.active {
  border-right: 3px solid #7c3aed;
}

.conversation-item {
  transition: all 0.2s;
  cursor: pointer;
}
.conversation-item:hover {
  background: rgba(124, 58, 237, 0.05);
}
html:not(.dark) .conversation-item:hover {
  background: rgba(124, 58, 237, 0.05);
}
.conversation-item.active {
  background: linear-gradient(
    135deg,
    rgba(124, 58, 237, 0.15),
    rgba(6, 182, 212, 0.1)
  );
  border-left: 3px solid #7c3aed;
}

.filter-chip {
  transition: all 0.2s;
}
.filter-chip.active {
  background: linear-gradient(135deg, #7c3aed, #06b6d4);
  color: white;
  border-color: transparent;
}

/* Message bubble */
.msg-bubble-sent {
  background: linear-gradient(135deg, #7c3aed, #06b6d4);
  color: white;
  border-radius: 18px 18px 4px 18px;
}
.msg-bubble-received {
  border-radius: 18px 18px 18px 4px;
}
.dark .msg-bubble-received {
  background: #1e293b;
  color: white;
}
html:not(.dark) .msg-bubble-received {
  background: #f1f5f9;
  color: #111827;
}

.hide-scrollbar::-webkit-scrollbar {
  display: none;
}
.hide-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Chat bg pattern */
.chat-bg {
  background-image:
    radial-gradient(
      circle at 20% 30%,
      rgba(124, 58, 237, 0.03) 0%,
      transparent 30%
    ),
    radial-gradient(
      circle at 80% 70%,
      rgba(6, 182, 212, 0.03) 0%,
      transparent 30%
    );
}

/* Mobile: hide chat when list active */
@media (max-width: 767px) {
  .mobile-hide-list #convList {
    display: none;
  }
  .mobile-hide-list #chatArea {
    display: flex;
  }
  #chatArea {
    display: none;
  }
  #convList {
    display: block;
  }
}
