:root {
  color-scheme: dark;
  --text: #fff8fb;
  --muted: rgba(255, 248, 251, 0.76);
  --soft: rgba(255, 255, 255, 0.13);
  --line: rgba(255, 255, 255, 0.22);
  --ink: #090708;
  --panel: rgba(13, 10, 12, 0.55);
  --accent: #ff6cab;
  --accent-strong: #ff3f91;
  --accent-soft: #ffd7e8;
  --green: #37d67a;
  --shadow: 0 26px 70px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--ink);
  overscroll-behavior: contain;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

a,
button {
  touch-action: manipulation;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.88);
  outline-offset: 4px;
}

.background-video {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: -3;
  transform: scale(1.02);
}

.page-shade {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 108, 171, 0.24), transparent 28rem),
    linear-gradient(180deg, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.58) 54%, rgba(0, 0, 0, 0.72)),
    rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(1px);
}

.page-shell {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 32px 24px;
}

.profile-panel {
  width: min(620px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-bottom: 104px;
}

.location-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 108, 144, 0.86);
  box-shadow: 0 14px 32px rgba(255, 73, 137, 0.27);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
}

.pin-icon {
  width: 16px;
  height: 16px;
  display: inline-block;
  border: 2px solid #fff;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
}

.pin-icon::after {
  content: "";
  position: absolute;
  width: 5px;
  height: 5px;
  margin: 3.5px;
  border-radius: 50%;
  background: #fff;
}

.avatar-wrap {
  position: relative;
  width: 128px;
  height: 128px;
  margin-top: 42px;
  padding: 7px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff9fc9, #ff4fa0 48%, #fff0f7);
  box-shadow: 0 18px 42px rgba(255, 77, 158, 0.35);
}

.avatar {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border: 4px solid rgba(255, 255, 255, 0.96);
  border-radius: 50%;
}

.online-dot {
  position: absolute;
  right: 3px;
  bottom: 14px;
  width: 30px;
  height: 30px;
  border: 4px solid #fff;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 7px rgba(55, 214, 122, 0.18);
}

h1 {
  margin: 25px 0 0;
  font-size: clamp(42px, 8vw, 74px);
  line-height: 0.96;
  letter-spacing: 0;
  font-weight: 800;
  text-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
}

.tagline {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: clamp(17px, 2.5vw, 22px);
  line-height: 1.45;
  font-weight: 700;
  max-width: 620px;
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.social-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 26px 0 32px;
}

.social-button {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px);
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.social-button:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.18);
}

.instagram-icon,
.telegram-icon {
  position: relative;
  display: block;
  width: 24px;
  height: 24px;
}

.instagram-icon {
  border: 2.4px solid currentColor;
  border-radius: 8px;
}

.instagram-icon::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 2.2px solid currentColor;
  border-radius: 50%;
}

.instagram-icon::after {
  content: "";
  position: absolute;
  top: 4px;
  right: 4px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.telegram-icon {
  border-radius: 50%;
  background: #24a8e8;
}

.telegram-icon::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 7px;
  width: 14px;
  height: 10px;
  background: #fff;
  clip-path: polygon(0 42%, 100% 0, 73% 100%, 49% 66%, 32% 83%);
}

.link-list {
  width: min(560px, 100%);
  display: grid;
  gap: 16px;
}

.link-card {
  min-height: 82px;
  display: grid;
  grid-template-columns: 52px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 14px 20px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  color: #2a141c;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.28), 0 0 0 7px rgba(255, 108, 171, 0.1);
  text-align: left;
  font-size: clamp(20px, 3vw, 25px);
  font-weight: 800;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.link-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 52px rgba(0, 0, 0, 0.34), 0 0 0 7px rgba(255, 108, 171, 0.16);
}

.link-card:active {
  transform: translateY(0) scale(0.99);
}

.link-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #fff, #ffe5f0);
  color: var(--accent-strong);
  box-shadow: inset 0 0 0 1px rgba(255, 63, 145, 0.14);
}

.link-icon::before {
  content: "";
  width: 19px;
  height: 19px;
  border: 3px solid currentColor;
  border-left-color: transparent;
  border-radius: 7px;
  transform: rotate(-42deg);
}

.info-icon::before {
  width: 8px;
  height: 22px;
  border: 0;
  border-radius: 999px;
  background: currentColor;
  transform: none;
  box-shadow: 0 -14px 0 -1px currentColor;
}

.link-badge {
  min-width: 60px;
  padding: 8px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff4e9d, #c45aff);
  color: #fff;
  text-align: center;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 12px 24px rgba(255, 63, 145, 0.28);
}

.subpage-shell {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 34px 22px;
}

.info-panel {
  width: min(720px, 100%);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.94);
  color: #2a141c;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42), 0 0 0 8px rgba(255, 108, 171, 0.09);
  overflow: hidden;
}

.info-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px;
  border-bottom: 1px solid rgba(42, 20, 28, 0.08);
}

.back-link {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #fff0f7;
  color: var(--accent-strong);
  box-shadow: inset 0 0 0 1px rgba(255, 63, 145, 0.14);
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease;
}

.back-link:hover {
  transform: translateY(-2px);
  background: #ffe0ee;
}

.back-link::before {
  content: "";
  width: 14px;
  height: 14px;
  border-left: 4px solid currentColor;
  border-bottom: 4px solid currentColor;
  transform: rotate(45deg);
  margin-left: 5px;
}

.info-panel-title {
  margin: 0;
  flex: 1;
  font-size: clamp(25px, 5vw, 38px);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: 0;
}

.info-panel-body {
  padding: clamp(26px, 6vw, 46px);
}

.info-panel-body p {
  margin: 0;
  color: #3a202a;
  font-size: clamp(23px, 5vw, 36px);
  line-height: 1.35;
  font-weight: 800;
}

.chat-window {
  position: fixed;
  right: max(22px, env(safe-area-inset-right));
  bottom: max(22px, env(safe-area-inset-bottom));
  z-index: 10;
  width: min(390px, calc(100vw - 32px));
  height: min(620px, calc(100svh - 44px));
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 30px;
  background: rgba(12, 9, 11, 0.76);
  box-shadow: var(--shadow);
  backdrop-filter: blur(28px) saturate(1.35);
  transform: translateY(18px) scale(0.96);
  opacity: 0;
  pointer-events: none;
  transition: transform 220ms ease, opacity 220ms ease;
}

.chat-window.is-open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.chat-header {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
}

.chat-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-profile img {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.86);
}

.chat-profile strong,
.chat-profile span {
  display: block;
  text-align: left;
}

.chat-profile strong {
  font-size: 16px;
}

.chat-profile span {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  font-weight: 700;
}

.icon-button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
  transition: background 180ms ease, transform 180ms ease;
}

.icon-button:hover {
  background: rgba(255, 255, 255, 0.18);
}

.icon-button:active {
  transform: scale(0.96);
}

.icon-button span {
  width: 15px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.chat-body {
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding: 18px 16px;
  overflow: auto;
  scrollbar-width: thin;
}

.message {
  max-width: 82%;
  display: flex;
}

.message span {
  padding: 12px 14px;
  border-radius: 18px;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 650;
}

.message.received {
  align-self: flex-start;
}

.message.received span {
  border-bottom-left-radius: 6px;
  background: rgba(255, 255, 255, 0.13);
  color: rgba(255, 255, 255, 0.92);
}

.message.sent {
  align-self: flex-end;
}

.message.sent span {
  border-bottom-right-radius: 6px;
  background: linear-gradient(135deg, #ff6cab, #ff3f91);
  color: #fff;
}

.chat-form {
  display: grid;
  grid-template-columns: 1fr 48px;
  gap: 10px;
  padding: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
}

.chat-form input {
  width: 100%;
  min-width: 0;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  outline: 0;
  padding: 0 17px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 15px;
}

.chat-form input::placeholder {
  color: rgba(255, 255, 255, 0.54);
}

.chat-form input:focus {
  border-color: rgba(255, 108, 171, 0.85);
  box-shadow: 0 0 0 4px rgba(255, 108, 171, 0.16);
}

.chat-form button {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff77b3, #ff3f91);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(255, 63, 145, 0.28);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.chat-form button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(255, 63, 145, 0.34);
}

.chat-form button:active {
  transform: scale(0.97);
}

.send-icon {
  width: 21px;
  height: 16px;
  display: block;
  background: currentColor;
  clip-path: polygon(0 0, 100% 50%, 0 100%, 18% 58%, 52% 50%, 18% 42%);
}

.chat-launcher {
  position: fixed;
  right: max(24px, env(safe-area-inset-right));
  bottom: max(24px, env(safe-area-inset-bottom));
  z-index: 9;
  min-width: 100px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #24131a;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  font-size: 15px;
  font-weight: 800;
  opacity: 1;
  transition: opacity 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.chat-launcher:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 42px rgba(0, 0, 0, 0.34);
}

.chat-launcher.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
}

.chat-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(55, 214, 122, 0.16);
}

@media (max-width: 720px) {
  .background-video {
    object-position: center top;
  }

  .page-shell {
    align-items: start;
    padding: 24px 18px;
  }

  .profile-panel {
    min-height: 100svh;
    justify-content: center;
    padding-bottom: 210px;
  }

  .avatar-wrap {
    width: 116px;
    height: 116px;
    margin-top: 34px;
  }

  .location-pill {
    min-height: 43px;
    font-size: 16px;
  }

  .link-card {
    min-height: 76px;
    grid-template-columns: 48px 1fr auto;
    gap: 14px;
    padding: 13px 16px;
    border-radius: 24px;
    font-size: 21px;
  }

  .link-icon {
    width: 48px;
    height: 48px;
  }

  .chat-window {
    right: 10px;
    bottom: 10px;
    width: calc(100vw - 20px);
    height: min(520px, calc(100svh - 20px));
    border-radius: 28px;
  }
}

@media (min-width: 1060px) {
  body.chat-open .page-shell {
    place-items: center start;
    padding-right: 450px;
    padding-left: max(42px, calc((100vw - 1260px) / 2 + 42px));
  }

  body.chat-open .profile-panel {
    padding-bottom: 0;
  }
}

@media (max-width: 420px) {
  .link-card {
    font-size: 20px;
  }

  .link-badge {
    min-width: 52px;
    padding-inline: 10px;
  }
}

@media (max-width: 720px) and (max-height: 720px) {
  .page-shell {
    padding-top: 24px;
    padding-bottom: 92px;
  }

  .profile-panel {
    min-height: auto;
    justify-content: flex-start;
    padding-bottom: 0;
  }

  .location-pill {
    min-height: 40px;
    padding-inline: 19px;
  }

  .avatar-wrap {
    width: 106px;
    height: 106px;
    margin-top: 30px;
  }

  .online-dot {
    width: 27px;
    height: 27px;
    bottom: 10px;
  }

  h1 {
    margin-top: 18px;
    font-size: 42px;
  }

  .tagline {
    margin-top: 12px;
    font-size: 16px;
    line-height: 1.35;
  }

  .social-row {
    margin: 18px 0 22px;
  }

  .social-button {
    width: 46px;
    height: 46px;
  }

  .link-list {
    gap: 11px;
  }

  .link-card {
    min-height: 68px;
    grid-template-columns: 44px 1fr auto;
    gap: 12px;
    padding: 10px 13px;
    border-radius: 22px;
  }

  .link-icon {
    width: 44px;
    height: 44px;
  }

  .chat-launcher {
    right: max(14px, env(safe-area-inset-right));
    bottom: max(12px, env(safe-area-inset-bottom));
    min-width: 88px;
    height: 46px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
