:root {
  --bg: #000;
  --ink: #fff;
  --muted: rgba(255, 255, 255, 0.62);
  --hair: rgba(255, 255, 255, 0.1);
  --of: #00aff0;
  --violet: #7b6bff;
  --radius: 22px;
  --w: min(100vw, 480px);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100svh;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img { display: block; }

/* Desktop: blurred photo behind a phone-width column */
.backdrop {
  position: fixed;
  inset: -60px;
  background-size: cover;
  background-position: center 30%;
  filter: blur(48px) brightness(0.32) saturate(1.3);
  transform: scale(1.1);
  z-index: 0;
  animation: drift 24s ease-in-out infinite alternate;
}
@keyframes drift { to { transform: scale(1.22) translate(2%, -2%); } }
@media (max-width: 520px) { .backdrop { display: none; } }

.page {
  position: relative;
  z-index: 1;
  max-width: 480px;
  min-height: 100svh;
  margin: 0 auto;
  background: var(--bg);
  overflow: hidden;
  padding-bottom: 32px;
}
@media (min-width: 521px) {
  .page { box-shadow: 0 0 0 1px var(--hair), 0 30px 120px rgba(0, 0, 0, 0.9); }
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding-top: calc(var(--w) * 0.9);
}
.hero__media {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: calc(var(--w) * 1.22);
  overflow: hidden;
}
.hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: 40% 25%;
  will-change: transform;
}
.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0) 14%),
    linear-gradient(to bottom, rgba(0,0,0,0) 46%, rgba(0,0,0,0.55) 68%, rgba(0,0,0,0.92) 86%, #000 100%);
}

.hero__info {
  position: relative;
  text-align: center;
  padding: 0 16px;
}

.name {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: clamp(34px, 10vw, 44px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.5);
}
.js-name { cursor: default; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.star {
  font-size: 0.55em;
  font-weight: 400;
  display: inline-block;
  animation: twinkle 3.2s ease-in-out 1.4s infinite;
}
@keyframes twinkle {
  0%, 70%, 100% { transform: rotate(0) scale(1); opacity: 0.9; }
  80% { transform: rotate(72deg) scale(1.35); opacity: 1; text-shadow: 0 0 12px #fff; }
}
.badge {
  width: 0.72em;
  height: 0.72em;
  flex: none;
  filter: drop-shadow(0 2px 8px rgba(123, 107, 255, 0.55));
  animation: glow 2.8s ease-in-out infinite;
}
@keyframes glow {
  0%, 100% { filter: drop-shadow(0 2px 8px rgba(123, 107, 255, 0.45)); }
  50% { filter: drop-shadow(0 0 14px rgba(143, 123, 255, 0.95)); }
}

.handle {
  margin-top: 8px;
  font-size: 18px;
  font-weight: 500;
  color: var(--muted);
}

.socials {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}
.social {
  --size: 52px;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: #f3f3f5;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  transition: transform 0.35s var(--spring), box-shadow 0.35s;
}
.social svg { width: 27px; height: 27px; }
.social--vip { box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 5.5px var(--of), 0 6px 20px rgba(0, 175, 240, 0.35); }
.social:hover { transform: translateY(-4px) scale(1.08); }
.social:active { transform: scale(0.92); }

.followers { margin-top: 24px; }
.followers__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.followers__btn strong { font-weight: 700; }
.followers__btn svg { width: 22px; height: 22px; transition: transform 0.4s var(--spring); }
.followers.open .followers__btn svg { transform: rotate(180deg); }
.followers__list {
  list-style: none;
  display: grid;
  grid-template-rows: 0fr;
  max-width: 300px;
  margin: 0 auto;
  overflow: hidden;
  transition: max-height 0.5s var(--ease), opacity 0.4s;
  max-height: 0;
  opacity: 0;
}
.followers.open .followers__list { max-height: 400px; opacity: 1; }
.followers__list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 4px;
  border-bottom: 1px solid var(--hair);
  font-size: 16px;
}
.followers__list li:first-child { margin-top: 12px; }
.followers__list b { margin-left: auto; }
.followers__icon { width: 28px; height: 28px; border-radius: 50%; background: #f3f3f5; display: grid; place-items: center; }
.followers__icon svg { width: 17px; height: 17px; }

.all-links {
  margin: 28px 0 18px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: rgba(255, 255, 255, 0.78);
}
.point { display: inline-block; margin-left: 4px; letter-spacing: 0; font-size: 15px; animation: bob 1.6s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }


/* ---------- cards ---------- */
.links { padding: 0 16px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.card {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  background: #121212;
  isolation: isolate;
  transform: translateZ(0);
  transition: transform 0.45s var(--spring), box-shadow 0.45s;
}
.card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease);
}
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.18) 0%, rgba(0,0,0,0) 30%, rgba(0,0,0,0) 52%, rgba(0,0,0,0.7) 100%);
  z-index: 1;
}
.card:hover img { transform: scale(1.06); }
.card:active { transform: scale(0.97); }

.card__title {
  position: absolute;
  left: 12px; right: 12px;
  bottom: 16px;
  z-index: 3;
  text-align: center;
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.6);
}
.card__chip {
  position: absolute;
  top: 14px; left: 14px;
  z-index: 3;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}
.card__chip svg { width: 20px; height: 20px; }
.card__chip--link { background: none; box-shadow: none; width: 46px; height: 46px; color: rgba(255,255,255,0.92); }
.card__chip--link svg { width: 40px; height: 40px; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4)); }

.card--vip {
  aspect-ratio: 4 / 5;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08), 0 16px 50px -14px rgba(0, 175, 240, 0.55);
  animation: vip-glow 3.6s ease-in-out infinite;
}
.card--vip .card__title { font-size: clamp(24px, 7vw, 30px); bottom: 18px; }
@keyframes vip-glow {
  0%, 100% { box-shadow: 0 0 0 1px rgba(255,255,255,0.08), 0 16px 50px -14px rgba(0, 175, 240, 0.45); }
  50% { box-shadow: 0 0 0 1px rgba(0,175,240,0.45), 0 18px 60px -10px rgba(0, 175, 240, 0.8); }
}
.card__shine {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,0.28) 48%, rgba(255,255,255,0.05) 56%, transparent 70%);
  transform: translateX(-120%);
  animation: shine 4.5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes shine { 0% { transform: translateX(-120%); } 38%, 100% { transform: translateX(120%); } }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.card--tile { aspect-ratio: 410 / 262; }
.card--tile .card__title { font-size: clamp(18px, 5.6vw, 24px); bottom: 12px; }
.grid .card--tile:only-child, .grid .card--tile:last-child:nth-child(odd) { grid-column: 1 / -1; aspect-ratio: 846 / 420; }

/* ---------- connect ---------- */
.connect {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 6px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255,255,255,0.18);
  transition: box-shadow 0.4s;
}
.connect:focus-within { box-shadow: 0 0 0 4px rgba(123, 107, 255, 0.55), 0 0 40px rgba(123, 107, 255, 0.35); }
.connect__input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #111;
  font: inherit;
  font-size: 17px;
  padding: 0 2px 0 14px;
}
.connect__input::placeholder { color: #9a9a9f; }
.connect__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 5px 5px 14px;
  border-radius: 999px;
  background: #9b9b9f;
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  transition: background 0.4s, transform 0.3s var(--spring);
}
.connect.valid .connect__btn { background: linear-gradient(120deg, #6c5cff, #00aff0); background-size: 200% 100%; animation: flow 3s linear infinite; }
.connect__btn:active { transform: scale(0.95); }
@keyframes flow { to { background-position: -200% 0; } }
.connect__msg { min-height: 0; text-align: center; color: var(--muted); font-size: 15px; margin-top: -6px; }
.connect.done { animation: done 0.6s var(--spring); }
@keyframes done { 50% { transform: scale(1.03); } }

.avatar { display: inline-block; width: 44px; height: 44px; border-radius: 50%; overflow: hidden; flex: none; box-shadow: 0 0 0 2px rgba(255,255,255,0.85); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--sm { width: 34px; height: 34px; }
.avatar--lg { width: 76px; height: 76px; box-shadow: 0 0 0 3px #fff, 0 0 0 6px rgba(123,107,255,0.6); }

/* ---------- footer ---------- */
.footer { margin-top: 36px; text-align: center; color: var(--muted); font-size: 15px; }
.footer a { text-decoration: underline; text-underline-offset: 3px; margin: 0 6px; }
.footer p { margin-top: 10px; font-size: 13px; opacity: 0.7; }

/* ---------- sticky top bar ---------- */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 20;
  pointer-events: none;
}
.topbar__inner {
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: calc(env(safe-area-inset-top) + 12px) 18px 12px;
  background: rgba(10, 10, 10, 0.72);
  -webkit-backdrop-filter: blur(18px) saturate(1.6);
  backdrop-filter: blur(18px) saturate(1.6);
  border-bottom: 1px solid var(--hair);
  transform: translateY(-110%);
  transition: transform 0.5s var(--ease);
}
.topbar.show .topbar__inner { transform: none; pointer-events: auto; }
.topbar__name { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; margin-left: 6px; }
.topbar .star { font-size: 16px; }
.topbar .badge { width: 24px; height: 24px; animation: none; }

.card:active { transform: scale(0.97); }

/* ---------- login modal ---------- */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal__scrim { position: absolute; inset: 0; background: rgba(0,0,0,0.6); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); animation: fade 0.35s both; }
.modal__card {
  position: relative;
  width: 100%;
  max-width: 360px;
  padding: 30px 24px 24px;
  border-radius: 28px;
  background: linear-gradient(160deg, rgba(40,40,48,0.92), rgba(16,16,20,0.96));
  box-shadow: 0 0 0 1px rgba(255,255,255,0.1), 0 40px 100px rgba(0,0,0,0.7);
  text-align: center;
  animation: modal-in 0.55s var(--spring) both;
}
.modal__card h2 { margin-top: 14px; font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.modal__card > p { margin: 4px 0 18px; color: var(--muted); font-size: 15px; }
.modal__card label { display: block; text-align: left; margin-top: 12px; }
.modal__card label span { display: block; font-size: 13px; color: var(--muted); margin: 0 0 6px 4px; }
.modal__card input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: #fff;
  font: inherit;
  font-size: 16px;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.modal__card input:focus { border-color: var(--violet); box-shadow: 0 0 0 4px rgba(123,107,255,0.25); }
.modal__submit {
  width: 100%;
  margin-top: 20px;
  padding: 15px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 16px;
  background: linear-gradient(120deg, #7b6bff, #00aff0);
  transition: transform 0.25s var(--spring), opacity 0.2s;
}
.modal__submit:active { transform: scale(0.97); }
.modal__submit[disabled] { opacity: 0.6; }
.modal__err { min-height: 20px; margin-top: 10px; color: #ff7a7a; font-size: 14px; }
.modal__x { position: absolute; top: 10px; right: 14px; font-size: 28px; color: var(--muted); line-height: 1; padding: 4px; }
.modal.shake .modal__card { animation: shake 0.45s; }
@keyframes modal-in { from { opacity: 0; transform: translateY(20px) scale(0.92); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }


/* ---------- open-in-browser sheet (in-app browsers) ---------- */
.escape { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; }
.escape[hidden] { display: none; }
.escape__scrim { position: absolute; inset: 0; background: rgba(0,0,0,0.55); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); animation: fade 0.35s both; }
.escape__card {
  position: relative;
  width: 100%;
  max-width: 480px;
  padding: 26px 22px calc(env(safe-area-inset-bottom) + 18px);
  border-radius: 28px 28px 0 0;
  background: linear-gradient(160deg, rgba(40,40,48,0.96), rgba(16,16,20,0.98));
  box-shadow: 0 0 0 1px rgba(255,255,255,0.1), 0 -30px 80px rgba(0,0,0,0.6);
  text-align: center;
  animation: sheet-in 0.55s var(--spring) both;
}
.escape__card h2 { margin-top: 12px; font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.escape__card > p { margin: 4px 0 18px; color: var(--muted); font-size: 15px; }
.escape__btn {
  display: block;
  padding: 16px;
  border-radius: 16px;
  font-weight: 700;
  font-size: 17px;
  background: linear-gradient(120deg, #7b6bff, #00aff0);
  transition: transform 0.25s var(--spring);
}
.escape__btn:active { transform: scale(0.97); }
.escape__card > .escape__hint { margin: 14px 0 4px; font-size: 13px; line-height: 1.45; }
.escape__stay { padding: 10px; font-size: 14px; color: var(--muted); }
@keyframes sheet-in { from { transform: translateY(100%); } to { transform: none; } }

/* ---------- legal ---------- */
.legal { padding: 32px 20px 48px; line-height: 1.6; color: rgba(255,255,255,0.85); }
.legal h1 { font-size: 30px; margin: 18px 0 14px; color: #fff; }
.legal h2 { font-size: 20px; margin: 26px 0 8px; color: #fff; }
.legal p { margin-bottom: 12px; }
.legal__back { color: var(--muted); }

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