.tg-profile.tg-profile--template-night {
  --tg-profile-accent: #8ee7d7;
  --tg-profile-background: #070b18;
  --tg-profile-surface: #11182a;
  --tg-profile-text: #f4f7fb;
  --tg-profile-muted: #a8b4cc;
  --tg-profile-line: #28344f;
  --tg-profile-card-radius: 18px;
  --tg-profile-avatar-size: 7.25rem;
  --tg-profile-avatar-radius: 28px;
  --tg-profile-avatar-background: #121a2e;
  --tg-profile-avatar-border-width: 1px;
  --tg-profile-avatar-border-color: rgba(142, 231, 215, .42);
  --tg-profile-avatar-shadow: 0 22px 54px rgba(0, 0, 0, .38);
  --tg-profile-avatar-overlay-background: rgba(7, 11, 24, .64);
  --tg-profile-avatar-overlay-shadow: 0 12px 34px rgba(0, 0, 0, .34);
  --tg-profile-posts-block-background: transparent;
  --tg-profile-posts-block-border-width: 0;
  --tg-profile-posts-block-padding: 0;
  --tg-profile-post-card-background: rgba(15, 23, 42, .82);
  --tg-profile-post-card-border-width: 1px;
  --tg-profile-post-card-border-color: rgba(142, 231, 215, .18);
  --tg-profile-post-card-padding: 1rem;
  --tg-profile-post-card-radius: 18px;
  --tg-profile-post-social-background: rgba(7, 11, 24, .44);
  background:
    radial-gradient(circle at 14% 18%, rgba(255, 255, 255, .72) 0 1px, transparent 1.5px),
    radial-gradient(circle at 68% 12%, rgba(187, 222, 255, .58) 0 1px, transparent 1.5px),
    radial-gradient(circle at 86% 32%, rgba(142, 231, 215, .5) 0 1px, transparent 1.5px),
    linear-gradient(118deg, rgba(63, 223, 184, .22), transparent 30%, rgba(131, 92, 255, .18) 58%, transparent 76%),
    linear-gradient(180deg, #050714 0%, #0a1020 48%, #0f1729 100%);
  border: 1px solid rgba(142, 231, 215, .18);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .4);
  color: var(--tg-profile-text);
  overflow: hidden;
  padding: clamp(1rem, 2.6vw, 1.65rem);
  position: relative;
}

html:has(.tg-profile--template-night),
body.app-route-profile:has(.tg-profile--template-night),
body.app-route-profile-view:has(.tg-profile--template-night) {
  background-color: #050714 !important;
}

body.tg-profile-template-night.app-route-profile .app-shell-header--transparent,
body.tg-profile-template-night.app-route-profile-view .app-shell-header--transparent {
  background: rgba(5, 7, 20, .72);
  border-bottom-color: rgba(142, 231, 215, .12);
  backdrop-filter: blur(16px);
}

body.tg-profile-template-night.app-route-profile .header-icons,
body.tg-profile-template-night.app-route-profile-view .header-icons {
  background: transparent;
}

body.tg-profile-template-night.app-route-profile .header-icon,
body.tg-profile-template-night.app-route-profile-view .header-icon,
body.tg-profile-template-night.app-route-profile .app-header-route-link,
body.tg-profile-template-night.app-route-profile-view .app-header-route-link,
body.tg-profile-template-night.app-route-profile .app-header-quick-menu__toggle,
body.tg-profile-template-night.app-route-profile-view .app-header-quick-menu__toggle {
  color: #f4f7fb;
}

body.tg-profile-template-night.app-route-profile .centered-logo .logo,
body.tg-profile-template-night.app-route-profile-view .centered-logo .logo {
  filter: brightness(0) invert(1);
}

body.tg-profile-template-night.app-route-profile .app-header-route-link.is-active,
body.tg-profile-template-night.app-route-profile-view .app-header-route-link.is-active,
body.tg-profile-template-night.app-route-profile .app-header-route-link.is-active .header-icon,
body.tg-profile-template-night.app-route-profile-view .app-header-route-link.is-active .header-icon {
  background: rgba(142, 231, 215, .12);
  color: #8ee7d7;
}

body.tg-profile-template-night.app-route-profile .pfp-icon,
body.tg-profile-template-night.app-route-profile-view .pfp-icon {
  border-color: rgba(142, 231, 215, .5);
}

.tg-profile.tg-profile--template-night::before {
  background:
    linear-gradient(98deg, transparent 7%, rgba(83, 242, 194, .12) 22%, rgba(101, 87, 255, .08) 39%, transparent 57%),
    linear-gradient(74deg, transparent 46%, rgba(255, 214, 140, .08) 62%, rgba(129, 215, 255, .12) 76%, transparent 92%);
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
  z-index: 0;
}

.tg-profile.tg-profile--template-night .tg-profile__region {
  gap: 1rem;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.tg-profile.tg-profile--template-night .tg-profile__region--hero {
  gap: 0;
  margin-bottom: .25rem;
  position: relative;
}

.tg-profile.tg-profile--template-night .tg-profile__block {
  background: rgba(17, 24, 42, .78);
  border-color: rgba(142, 231, 215, .16);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .26);
  color: var(--tg-profile-text);
  backdrop-filter: blur(18px);
}

.tg-profile.tg-profile--template-night .tg-profile__region--hero .tg-profile__block {
  border-radius: 20px;
}

.tg-profile.tg-profile--template-night .tg-profile__block--header {
  background: rgba(7, 11, 24, .42);
  border: 1px solid rgba(142, 231, 215, .18);
  overflow: hidden;
  padding: 0;
}

.tg-profile.tg-profile--template-night .tg-profile__header-media.header-picture {
  border-radius: 20px;
  min-height: var(--tg-profile-header-height);
}

.tg-profile.tg-profile--template-night .tg-profile__header-media.header-picture::after {
  background:
    linear-gradient(180deg, rgba(5, 7, 20, .04), rgba(5, 7, 20, .66)),
    linear-gradient(112deg, rgba(142, 231, 215, .18), transparent 42%, rgba(137, 108, 255, .18));
}

.tg-profile.tg-profile--template-night .tg-profile__block--identity-card {
  background: linear-gradient(135deg, rgba(13, 20, 38, .82), rgba(19, 28, 50, .7));
  border-color: rgba(142, 231, 215, .24);
  margin: -6.25rem clamp(.75rem, 2vw, 1.4rem) 0;
  position: relative;
  z-index: 2;
}

.tg-profile.tg-profile--template-night .tg-profile__identity {
  align-items: end;
  display: grid;
  gap: 1rem;
  grid-template-columns: auto minmax(0, 1fr);
}

.tg-profile.tg-profile--template-night .tg-profile__name.header-username {
  color: #ffffff;
  font-size: calc(clamp(2.15rem, 5.5vw, 4.6rem) * var(--tg-profile-heading-scale));
  font-weight: 900;
  line-height: .9;
  max-width: 13ch;
  overflow-wrap: anywhere;
  text-shadow: 0 8px 32px rgba(0, 0, 0, .42);
}

.tg-profile.tg-profile--template-night .tg-profile__intro,
.tg-profile.tg-profile--template-night .tg-profile__custom-text {
  color: #dbe5f5;
  font-size: 1.05em;
  line-height: 1.55;
}

.tg-profile.tg-profile--template-night .tg-profile__links .links,
.tg-profile.tg-profile--template-night .tg-profile__links #links-container {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.tg-profile.tg-profile--template-night .tg-profile__links .link-item {
  background: transparent;
  border: 0;
  padding: 0;
}

.tg-profile.tg-profile--template-night .tg-profile__links .saved-link,
.tg-profile.tg-profile--template-night .tg-profile__external-link {
  background: rgba(142, 231, 215, .1);
  border: 1px solid rgba(142, 231, 215, .24);
  border-radius: 999px;
  color: #d7fff7;
  font-weight: 800;
}

.tg-profile.tg-profile--template-night a {
  color: #a6f2e6;
}

.tg-profile.tg-profile--template-night .tg-profile-posts__header {
  border-color: rgba(142, 231, 215, .14);
}

.tg-profile.tg-profile--template-night .tg-profile-posts__filter,
.tg-profile.tg-profile--template-night .tg-visibility-pill,
.tg-profile.tg-profile--template-night .tg-circle-pill {
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(142, 231, 215, .18);
  color: #dbe5f5;
}

.tg-profile.tg-profile--template-night .tg-profile-posts__filter.is-active,
.tg-profile.tg-profile--template-night .tg-visibility-pill.is-active,
.tg-profile.tg-profile--template-night .tg-circle-pill.is-active {
  background: linear-gradient(135deg, #8ee7d7, #9fa8ff);
  border-color: transparent;
  color: #07101f;
}

.tg-profile.tg-profile--template-night .tg-composer,
.tg-profile.tg-profile--template-night .tg-profile__block--plugin .bento,
.tg-profile.tg-profile--template-night .tg-profile__block--plugin .tg-profile-module-card,
.tg-profile.tg-profile--template-night .tg-profile__block--plugin .tg-upto-card {
  background: rgba(10, 16, 32, .68);
  border: 1px solid rgba(142, 231, 215, .14);
  box-shadow: none;
  color: var(--tg-profile-text);
}

.tg-profile.tg-profile--template-night .tg-post-comment-composer__textarea,
.tg-profile.tg-profile--template-night .tg-composer__form .tg-post-comment-composer__textarea,
.tg-profile.tg-profile--template-night textarea.input-field {
  background: rgba(5, 7, 20, .62);
  border: 1px solid rgba(142, 231, 215, .22);
  color: #f4f7fb;
}

.tg-profile.tg-profile--template-night .tg-post-comment-composer__textarea::placeholder,
.tg-profile.tg-profile--template-night .tg-composer__form .tg-post-comment-composer__textarea::placeholder,
.tg-profile.tg-profile--template-night textarea.input-field::placeholder {
  color: rgba(219, 229, 245, .62);
}

.tg-profile.tg-profile--template-night .tg-post-comment-composer__submit,
.tg-profile.tg-profile--template-night .tg-composer__form .tg-post-comment-composer__submit {
  background: linear-gradient(135deg, #8ee7d7, #b2b7ff);
  border: 0;
  color: #07101f;
}

.tg-profile.tg-profile--template-night .tg-post-social {
  background: rgba(7, 11, 24, .48);
  border-color: rgba(142, 231, 215, .12);
}

.tg-profile.tg-profile--template-night .tg-post-social__like-button,
.tg-profile.tg-profile--template-night .tg-post-social__message-button,
.tg-profile.tg-profile--template-night .tg-post-social__share-button,
.tg-profile.tg-profile--template-night .tg-post-social__comment-toggle {
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(142, 231, 215, .18);
  color: #dbe5f5;
}

.tg-profile.tg-profile--template-night .tg-post-social__like-button:hover,
.tg-profile.tg-profile--template-night .tg-post-social__like-button:focus-visible,
.tg-profile.tg-profile--template-night .tg-post-social__message-button:hover,
.tg-profile.tg-profile--template-night .tg-post-social__message-button:focus-visible,
.tg-profile.tg-profile--template-night .tg-post-social__share-button:hover,
.tg-profile.tg-profile--template-night .tg-post-social__share-button:focus-visible,
.tg-profile.tg-profile--template-night .tg-post-social__comment-toggle:hover,
.tg-profile.tg-profile--template-night .tg-post-social__comment-toggle:focus-visible,
.tg-profile.tg-profile--template-night .tg-post-social__comment-toggle[aria-expanded="true"],
.tg-profile.tg-profile--template-night .tg-post-social__like-button.is-liked {
  background: rgba(142, 231, 215, .16);
  color: #8ee7d7;
}

.tg-profile.tg-profile--template-night .tg-post-comment,
.tg-profile.tg-profile--template-night [data-posts][data-profile-posts="1"] .tg-post-comment {
  border-top-color: rgba(142, 231, 215, .12);
}

.tg-profile.tg-profile--template-night .tg-profile__block--plugin h4 {
  color: #f4f7fb;
}

.tg-profile.tg-profile--template-night .tg-profile__block--plugin .tg-upto-card--icon-list {
  --tg-upto-icon-background: rgba(255, 255, 255, .06);
  --tg-upto-icon-border-color: rgba(142, 231, 215, .18);
  --tg-upto-icon-border-width: 1px;
  --tg-upto-icon-color: #d7fff7;
  --tg-upto-icon-focus-color: rgba(142, 231, 215, .25);
  --tg-upto-icon-gap: .55rem;
  --tg-upto-icon-grid-min: 6.25rem;
  --tg-upto-icon-hover-background: rgba(142, 231, 215, .14);
  --tg-upto-icon-hover-border-color: rgba(142, 231, 215, .42);
  --tg-upto-icon-padding: .48rem;
  --tg-upto-icon-radius: 14px;
  --tg-upto-icon-subtitle-color: #a8b4cc;
  --tg-upto-icon-thumb-background: rgba(7, 11, 24, .65);
  --tg-upto-icon-thumb-border-color: rgba(142, 231, 215, .18);
  --tg-upto-icon-thumb-border-width: 1px;
  --tg-upto-icon-thumb-radius: 12px;
}

@media (max-width: 767px) {
  .tg-profile.tg-profile--template-night {
    padding: .75rem;
  }

  .tg-profile.tg-profile--template-night .tg-profile__block--identity-card {
    margin: -4.75rem .6rem 0;
  }

  .tg-profile.tg-profile--template-night .tg-profile__identity {
    align-items: start;
    grid-template-columns: minmax(0, 1fr);
  }

  .tg-profile.tg-profile--template-night .tg-profile__name.header-username {
    font-size: calc(2.55rem * var(--tg-profile-heading-scale));
  }
}
