.telegram {
  isolation: isolate;
  background:
    linear-gradient(90deg, rgba(3, 3, 18, .54), rgba(4, 5, 28, .22)),
    url("assets/bot-main-bg.webp") center center / cover no-repeat fixed !important;
}

.telegram::before {
  content: "" !important;
  position: fixed !important;
  inset: 0 !important;
  z-index: 0 !important;
  pointer-events: none !important;
  opacity: 1 !important;
  background: url("assets/bot-glow-overlay-v3.svg") center center / cover no-repeat fixed !important;
  mix-blend-mode: screen;
  mask-image: none !important;
}

.chat.bot-main-background {
  background: transparent !important;
}

.chat.bot-main-background::before {
  display: none !important;
}

.logo-header {
  position: relative;
  z-index: 3;
  flex: 0 0 auto;
  min-height: clamp(150px, 22vh, 220px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 1.2vh, 14px);
  padding: 16px 16px 4px;
  background: transparent !important;
  background-image: none !important;
  border: 0;
  box-shadow: none;
}

.bot-welcome {
  position: relative;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  max-width: min(92vw, 820px);
  margin: 0;
  text-align: center;
  color: #f7fbff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .75), 0 0 18px rgba(63, 199, 255, .22);
}

.bot-welcome strong {
  font-size: clamp(17px, 1.75vw, 25px);
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: .01em;
}

.bot-welcome span {
  color: #72ddff;
  font-size: clamp(14px, 1.35vw, 20px);
  line-height: 1.45;
  font-weight: 700;
}

.bot-logo-button {
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(142px, 15vw, 205px);
  aspect-ratio: 1;
  margin: 0;
  padding: 0;
  appearance: none;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  isolation: isolate;
  filter: drop-shadow(0 14px 30px rgba(3, 8, 28, .55));
  animation: g4k-logo-breathe 4.6s ease-in-out infinite;
}

.bot-logo-button::before {
  content: "";
  position: absolute;
  inset: 1.5%;
  z-index: 2;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 78%, rgba(255,255,255,.12) 81%, #fff 84%, #8ff7ff 86%, transparent 90% 100%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 9px), #000 calc(100% - 7px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 9px), #000 calc(100% - 7px));
  filter: drop-shadow(0 0 5px #fff) drop-shadow(0 0 11px #6feeff);
  animation: g4k-ring-crawl 2.8s linear infinite;
  pointer-events: none;
}

.bot-logo-button::after {
  content: "";
  position: absolute;
  z-index: 3;
  left: 42.5%;
  top: 42%;
  width: 15%;
  height: 6.5%;
  border: 0;
  border-bottom: clamp(2px, .22vw, 4px) solid rgba(133, 240, 255, .96);
  border-radius: 0 0 999px 999px;
  filter: drop-shadow(0 0 3px #5fdcff) drop-shadow(0 0 8px #39aaff);
  transform-origin: 50% 0;
  animation: g4k-smile 3.2s ease-in-out infinite;
  pointer-events: none;
}

.bot-logo-image {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.bot-logo-button:focus-visible {
  outline: 3px solid rgba(116, 226, 255, .9);
  outline-offset: 6px;
}

.logo-identity {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

@keyframes g4k-ring-crawl { to { transform: rotate(1turn); } }
@keyframes g4k-smile {
  0%, 100% { opacity: .55; transform: scaleX(.86) scaleY(.72); }
  45%, 60% { opacity: 1; transform: scaleX(1.12) scaleY(1.3); }
}
@keyframes g4k-logo-breathe {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-4px) scale(1.018); }
}

@media (max-width: 600px) {
  .telegram,
  .telegram::before {
    background-position: 63% center !important;
    background-attachment: scroll !important;
  }
  .logo-header { min-height: 190px; padding: 12px 12px 2px; }
  .bot-logo-button { width: 130px; }
  .bot-welcome { gap: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  .bot-logo-button,
  .bot-logo-button::before,
  .bot-logo-button::after { animation: none !important; }
}
