.hero-showcase {
  min-height: 428px;
}

.hero-showcase .screen-card {
  position: relative;
  animation: dashboardReveal 9s ease-in-out infinite;
  transform-origin: 50% 55%;
}

.hero-showcase .screen-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(112deg, transparent 0%, transparent 36%, rgba(255, 255, 255, 0.22) 48%, transparent 60%, transparent 100%);
  transform: translateX(-120%);
  opacity: 0;
  animation: dashboardShine 9s ease-in-out infinite;
}

.overlay-showcase {
  --live-accent: #b8ff1a;
  --live-name: #eaff9e;
  position: absolute;
  inset: auto -8px -26px 26px;
  min-height: 388px;
  pointer-events: none;
  opacity: 0;
  animation: overlayReveal 9s ease-in-out infinite;
}

.overlay-showcase[data-accent="lime"] {
  --live-accent: #b8ff1a;
  --live-name: #eaff9e;
}

.overlay-showcase[data-accent="pink"] {
  --live-accent: #ff2bd6;
  --live-name: #ffb4ef;
}

.overlay-showcase[data-accent="cyan"] {
  --live-accent: #25f4ee;
  --live-name: #c9fffd;
}

.overlay-showcase[data-accent="orange"] {
  --live-accent: #ffb13b;
  --live-name: #ffe0a6;
}

.chat-stream-demo {
  position: absolute;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 9px;
  width: min(510px, 92%);
  height: 378px;
  overflow: hidden;
  padding: 8px 0 8px 12px;
}

.demo-chat {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  column-gap: 11px;
  width: fit-content;
  min-width: min(320px, calc(100% - 16px));
  max-width: min(470px, calc(100% - 16px));
  min-height: 64px;
  max-height: 118px;
  margin: 0;
  padding: 11px 13px 11px 14px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-left: 4px solid var(--live-accent);
  border-radius: 10px;
  background: linear-gradient(110deg, rgba(10, 14, 12, 0.62), rgba(10, 14, 12, 0.42));
  color: #f5f8f4;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), inset 0 1px rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(9px);
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transform: translateY(14px) scale(0.94);
  transform-origin: left bottom;
  transition: filter 0.18s ease, opacity 0.18s ease;
}

.demo-chat.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.demo-chat.is-entering {
  animation: ajojinxPopIn 0.28s cubic-bezier(0.18, 0.9, 0.22, 1.18) both;
}

.demo-chat.is-old {
  opacity: 0.88;
  filter: saturate(0.88) brightness(0.92);
}

.demo-chat.is-latest {
  opacity: 1;
  filter: saturate(1.08) brightness(1.03);
  min-width: min(360px, calc(100% - 16px));
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.34), inset 0 1px rgba(255, 255, 255, 0.055);
}

.demo-content {
  min-width: 0;
  width: max-content;
  max-width: min(100%, 430px);
  overflow: hidden;
}

.demo-chat strong {
  display: block;
  min-width: 0;
  max-width: 100%;
  margin-bottom: 2px;
  color: var(--live-name);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: 0.1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: none;
}

.demo-chat p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  width: fit-content;
  max-width: min(100%, 430px);
  margin: 0;
  color: #ffffff;
  font-size: 16px;
  line-height: 1.35;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.65);
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
  text-overflow: ellipsis;
}

.demo-avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  min-width: 40px;
  border: 2px solid var(--live-accent);
  border-radius: 999px;
  color: var(--live-accent);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(17, 20, 18, 0.9));
  font-size: 15px;
  font-weight: 950;
  overflow: hidden;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.18);
  transition: none;
}

@keyframes ajojinxPopIn {
  0% {
    opacity: 0;
    transform: translateY(14px) scale(0.94);
  }

  72% {
    opacity: 1;
    transform: translateY(-1px) scale(1.018);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes dashboardReveal {
  0%,
  32% {
    opacity: 1;
    filter: brightness(1) saturate(1);
    transform: translateY(0) scale(1);
  }

  40%,
  82% {
    opacity: 0;
    filter: brightness(0.42) saturate(0.9);
    transform: translateY(-8px) scale(0.985);
  }

  91%,
  100% {
    opacity: 1;
    filter: brightness(1) saturate(1);
    transform: translateY(0) scale(1);
  }
}

@keyframes overlayReveal {
  0%,
  36% {
    opacity: 0;
    transform: translateY(22px) scale(0.985);
  }

  43%,
  82% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  90%,
  100% {
    opacity: 0;
    transform: translateY(18px) scale(0.99);
  }
}

@keyframes dashboardShine {
  0%,
  9% {
    opacity: 0;
    transform: translateX(-120%);
  }

  14% {
    opacity: 0.9;
  }

  26% {
    opacity: 0;
    transform: translateX(120%);
  }

  27%,
  100% {
    opacity: 0;
    transform: translateX(120%);
  }
}

@media (width <= 980px) {
  .hero-showcase {
    min-height: auto;
  }

  .overlay-showcase {
    inset: auto 0 -20px 0;
    min-height: 374px;
  }

  .chat-stream-demo {
    width: min(510px, 94%);
    height: 364px;
  }
}

@media (width <= 640px) {
  .overlay-showcase {
    position: relative;
    inset: auto;
    min-height: 366px;
    margin-top: 16px;
    opacity: 1;
    animation: none;
  }

  .hero-showcase .screen-card {
    animation: none;
  }

  .chat-stream-demo {
    position: relative;
    width: 100%;
    height: 356px;
    padding-left: 0;
  }
}
