/* =============================================================
   PREMIUM BIO-LINK  —  hero photo + animated chart behind
   Mobile-first. Lightweight. GPU-friendly animations.
   ============================================================= */

/* ---------- design tokens ---------- */
:root {
  --bg-0: #050507;
  --bg-1: #0a0a0d;
  --bg-2: #101015;

  --surface:        rgba(255, 255, 255, 0.05);
  --surface-strong: rgba(255, 255, 255, 0.08);
  --border:         rgba(255, 255, 255, 0.08);
  --border-strong:  rgba(255, 255, 255, 0.18);

  --text:    #f4f4f5;
  --text-2:  rgba(244, 244, 245, 0.66);
  --text-3:  rgba(244, 244, 245, 0.42);

  --gold-1: #f4d58d;
  --gold-2: #d4af37;
  --gold-3: #8a6a1d;

  --bull: #22c55e;
  --bear: #ef4444;

  --featured-1: #5b3fff;       /* deep purple/blue accent for featured button */
  --featured-2: #2a1f6e;

  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 10px;

  --shadow-soft: 0 10px 30px -10px rgba(0, 0, 0, 0.6);

  --easing: cubic-bezier(0.22, 1, 0.36, 1);

  --safe-top:    env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ---------- reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg-0);
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family:
    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, 'Apple Color Emoji', 'Segoe UI Emoji', sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background:
    radial-gradient(800px 500px at 50% 100%, #0c0c14 0%, transparent 60%),
    linear-gradient(180deg, var(--bg-1) 0%, var(--bg-0) 100%);
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

img { display: block; max-width: 100%; }

button {
  font: inherit;
  color: inherit;
  border: 0;
  background: transparent;
  cursor: pointer;
}

a { color: inherit; text-decoration: none; }

ul { list-style: none; padding: 0; margin: 0; }

::selection { background: rgba(244, 213, 141, 0.25); color: #fff; }

/* ---------- layout ---------- */
.page {
  position: relative;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ===========================================================
   HERO — large photo with animated chart behind it
   =========================================================== */
.hero {
  position: relative;
  width: 100%;
  height: 70vh;
  min-height: 520px;
  max-height: 760px;
  overflow: hidden;
  border-bottom-left-radius: 28px;
  border-bottom-right-radius: 28px;
  isolation: isolate;
  background: #0a0a10;
}

/* moving candlestick chart sits behind everything */
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  opacity: 0.95;
}

/* subtle vignette so the chart doesn't fight the photo */
.hero-vignette {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% 30%, transparent 0%, rgba(5, 5, 7, 0.55) 100%);
}

/* the photo:
   - sits centered, slightly inset so the chart "frames" it
   - rounded corners + soft drop shadow */
.hero-photo-wrap {
  position: absolute;
  inset: 26px 12px 0 12px;
  height: calc(100% - 26px);
  z-index: 3;
  border-radius: 24px;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.85);
}

.hero-photo {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  border-radius: 24px;
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, #000 8%, #000 100%);
          mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, #000 8%, #000 100%);
}

/* name + bio overlay — sits over the photo with a dark gradient mask */
.hero-info {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 0;
  z-index: 4;
  padding: 80px 18px 26px;
  text-align: center;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(0, 0, 0, 0.45) 35%,
    rgba(0, 0, 0, 0.85) 100%
  );
  border-bottom-left-radius: 24px;
  border-bottom-right-radius: 24px;
  pointer-events: none;
}

.hero-name {
  margin: 0 0 6px;
  font-size: clamp(28px, 7.4vw, 36px);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.15;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.7);
}

.verified {
  width: 0.85em;
  height: 0.85em;
  color: var(--gold-2);
  filter: drop-shadow(0 0 6px rgba(212, 175, 55, 0.55));
  flex-shrink: 0;
  transform: translateY(0.05em);
}

.hero-bio {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.88);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.7);
  max-width: 36ch;
  margin-inline: auto;
}

/* ===========================================================
   TOPBAR — floating buttons over the hero
   =========================================================== */
.topbar {
  position: absolute;
  top: calc(14px + var(--safe-top));
  left: 14px;
  right: 14px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: flex-start;     /* visual right in RTL, left in LTR */
  pointer-events: none;
}

.topbar > * { pointer-events: auto; }

.topbar-btn {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  transition: transform 220ms var(--easing), background 220ms var(--easing);
}
.topbar-btn:hover { background: rgba(0, 0, 0, 0.6); transform: translateY(-1px); }
.topbar-btn:active { transform: scale(0.94); }

/* ===========================================================
   CONTENT — link buttons, socials, footer
   =========================================================== */
.content {
  position: relative;
  z-index: 1;
  padding:
    18px
    18px
    calc(28px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* ---------- link buttons ---------- */
.link-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ---- standard link button (icon + label + arrow) ---- */
.link {
  --bg:   var(--surface);
  --bd:   var(--border);

  position: relative;
  display: grid;
  grid-template-columns: 44px 1fr 22px;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg);
  border: 1px solid var(--bd);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: var(--shadow-soft);
  color: var(--text);
  text-align: start;
  width: 100%;
  cursor: pointer;
  overflow: hidden;
  transition:
    transform 320ms var(--easing),
    background 320ms var(--easing),
    border-color 320ms var(--easing),
    box-shadow 320ms var(--easing);
  will-change: transform;
  animation: rise 600ms var(--easing) both;
  animation-delay: var(--d, 0ms);
}

.link::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.18),
    rgba(255, 255, 255, 0) 40%,
    rgba(255, 255, 255, 0.08) 100%
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}

.link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    220px 80px at var(--mx, 50%) var(--my, 50%),
    rgba(244, 213, 141, 0.12),
    transparent 70%
  );
  opacity: 0;
  transition: opacity 320ms var(--easing);
  pointer-events: none;
}

.link:hover {
  --bd: var(--border-strong);
  --bg: var(--surface-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft), 0 12px 40px -16px rgba(244, 213, 141, 0.25);
}
.link:hover::after { opacity: 1; }
.link:active { transform: translateY(0) scale(0.985); }
.link:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 2px; }

/* subtle gold tint for the featured (highlighted) button */
.link.featured {
  --bg: linear-gradient(180deg, rgba(244, 213, 141, 0.10), rgba(212, 175, 55, 0.04));
  --bd: rgba(244, 213, 141, 0.28);
  box-shadow:
    var(--shadow-soft),
    0 8px 30px -10px rgba(244, 213, 141, 0.22),
    inset 0 0 0 1px rgba(244, 213, 141, 0.08);
}

.link-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text);
  flex-shrink: 0;
}
.link-icon svg { width: 22px; height: 22px; }

.link-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.link-label {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.005em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.link-tagline {
  font-size: 12.5px;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.link-arrow {
  color: var(--text-3);
  transition: transform 280ms var(--easing), color 280ms var(--easing);
}
.link-arrow svg { width: 16px; height: 16px; }
.link:hover .link-arrow { color: var(--gold-1); transform: translateX(3px); }

/* per-platform icon tints */
.link[data-type="telegram"]  .link-icon { color: #29a9ea; }
.link[data-type="whatsapp"]  .link-icon { color: #25d366; }
.link[data-type="youtube"]   .link-icon { color: #ff3b3b; }
.link[data-type="discord"]   .link-icon { color: #7289da; }
.link[data-type="website"]   .link-icon { color: var(--gold-1); }
.link[data-type="custom"]    .link-icon { color: var(--gold-1); }

/* ---- featured "thumb" link (matches the screenshot) ---- */
.link-thumb {
  display: grid;
  grid-template-columns: 56px 1fr 28px;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, var(--featured-1) 0%, var(--featured-2) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  width: 100%;
  text-align: start;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 14px 40px -16px rgba(91, 63, 255, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.04);
  transition:
    transform 320ms var(--easing),
    box-shadow 320ms var(--easing),
    filter 320ms var(--easing);
  animation: rise 600ms var(--easing) both;
}

.link-thumb::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0) 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}

.link-thumb:hover { transform: translateY(-2px); filter: brightness(1.08); }
.link-thumb:active { transform: translateY(0) scale(0.985); }
.link-thumb:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.link-thumb .thumb {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: cover;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.link-thumb .thumb-text {
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.45;
  color: #fff;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.link-thumb .thumb-menu {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.7);
}

/* ---------- social row ---------- */
.socials { display: flex; justify-content: center; }
.social-list {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
}

.social {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-2);
  transition:
    transform 280ms var(--easing),
    color 280ms var(--easing),
    background 280ms var(--easing),
    border-color 280ms var(--easing),
    box-shadow 280ms var(--easing);
  cursor: pointer;
}
.social svg { width: 20px; height: 20px; }
.social:hover {
  transform: translateY(-3px);
  color: var(--text);
  background: var(--surface-strong);
  border-color: var(--border-strong);
}
.social:active { transform: translateY(-1px) scale(0.95); }
.social:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 3px; }

.social[data-type="instagram"]:hover { box-shadow: 0 8px 24px -10px #e1306c; color: #ff4f8b; }
.social[data-type="tiktok"]:hover    { box-shadow: 0 8px 24px -10px #25f4ee; color: #fff; }
.social[data-type="twitter"]:hover   { box-shadow: 0 8px 24px -10px #ffffff; color: #fff; }
.social[data-type="youtube"]:hover   { box-shadow: 0 8px 24px -10px #ff3b3b; color: #ff5757; }
.social[data-type="telegram"]:hover  { box-shadow: 0 8px 24px -10px #29a9ea; color: #5fc0f5; }
.social[data-type="discord"]:hover   { box-shadow: 0 8px 24px -10px #7289da; color: #97a8ff; }
.social[data-type="whatsapp"]:hover  { box-shadow: 0 8px 24px -10px #25d366; color: #4eea88; }
.social[data-type="email"]:hover     { box-shadow: 0 8px 24px -10px #f4d58d; color: var(--gold-1); }
.social[data-type="github"]:hover    { box-shadow: 0 8px 24px -10px #ffffff; color: #fff; }
.social[data-type="linkedin"]:hover  { box-shadow: 0 8px 24px -10px #0a66c2; color: #4a9bff; }
.social[data-type="snapchat"]:hover  { box-shadow: 0 8px 24px -10px #fffc00; color: #fffc00; }
.social[data-type="website"]:hover   { box-shadow: 0 8px 24px -10px #f4d58d; color: var(--gold-1); }

/* ---------- footer ---------- */
.footer {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}
.footer-divider {
  width: 60px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
  margin-bottom: 4px;
}
.footer-brand   { margin: 0; font-size: 12px; color: var(--text-2); letter-spacing: 0.06em; }
.footer-tagline { margin: 0; font-size: 11px; color: var(--text-3); letter-spacing: 0.16em; text-transform: uppercase; }

/* ===========================================================
   MODAL + TOAST + BUTTONS  (unchanged from previous design)
   =========================================================== */
.modal {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: center;
  padding: 20px;
  animation: fade 220ms var(--easing) both;
}
.modal[hidden] { display: none; }
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.modal-card {
  position: relative;
  width: 100%; max-width: 380px;
  padding: 24px 22px 20px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(20, 20, 25, 0.95), rgba(10, 10, 14, 0.96));
  border: 1px solid var(--border-strong);
  box-shadow:
    0 30px 80px -20px rgba(0, 0, 0, 0.8),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 60px -20px rgba(244, 213, 141, 0.25);
  text-align: center;
  animation: pop 320ms var(--easing) both;
}
.modal-close {
  position: absolute; top: 10px; right: 10px;
  width: 36px; height: 36px;
  display: grid; place-items: center; border-radius: 50%;
  color: var(--text-2);
  transition: background 200ms var(--easing), color 200ms var(--easing);
}
.modal-close:hover { background: var(--surface-strong); color: var(--text); }
.modal-icon {
  width: 56px; height: 56px;
  margin: 0 auto 12px;
  display: grid; place-items: center; border-radius: 50%;
  background: linear-gradient(180deg, rgba(244, 213, 141, 0.18), rgba(244, 213, 141, 0.04));
  color: var(--gold-1);
  border: 1px solid rgba(244, 213, 141, 0.25);
}
.modal-title { margin: 0 0 6px; font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.modal-text  { margin: 0 0 14px; font-size: 14px; color: var(--text-2); line-height: 1.55; }
.modal-steps { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; text-align: start; }
.step {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 13.5px; color: var(--text-2);
}
.step-num {
  width: 22px; height: 22px;
  display: grid; place-items: center; border-radius: 50%;
  background: linear-gradient(180deg, var(--gold-1), var(--gold-3));
  color: #1a1308; font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.step-dots {
  display: inline-flex; align-items: center; gap: 2px;
  color: var(--gold-1); font-weight: 800;
}
.modal-url {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px; color: var(--text-3);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px; margin-bottom: 14px;
  word-break: break-all; text-align: left;
  user-select: all;
}
.modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: transform 200ms var(--easing), background 200ms var(--easing),
              border-color 200ms var(--easing), color 200ms var(--easing);
}
.btn:active { transform: scale(0.97); }
.btn-secondary {
  background: var(--surface); border: 1px solid var(--border-strong); color: var(--text);
}
.btn-secondary:hover { background: var(--surface-strong); }
.btn-primary {
  background: linear-gradient(180deg, var(--gold-1), var(--gold-2));
  color: #1a1308; border: 1px solid rgba(244, 213, 141, 0.4);
  box-shadow: 0 6px 20px -8px rgba(244, 213, 141, 0.6);
}
.btn-primary:hover { filter: brightness(1.08); }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%;
  bottom: calc(28px + var(--safe-bottom));
  transform: translate(-50%, 30px);
  z-index: 60;
  padding: 10px 16px;
  background: rgba(20, 20, 25, 0.95); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: 999px;
  font-size: 13.5px; font-weight: 500;
  box-shadow: 0 14px 30px -10px rgba(0, 0, 0, 0.8);
  opacity: 0; pointer-events: none;
  transition: opacity 240ms var(--easing), transform 240ms var(--easing);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  max-width: calc(100vw - 40px);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- animations ---------- */
@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%   { opacity: 0.7; transform: scale(0.8); }
  70%  { opacity: 0;   transform: scale(2); }
  100% { opacity: 0;   transform: scale(2); }
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop {
  from { opacity: 0; transform: translateY(8px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)   scale(1);    }
}

/* ---------- responsive tweaks ---------- */
@media (min-width: 520px) {
  .content { padding-left: 24px; padding-right: 24px; }
  .hero { border-bottom-left-radius: 32px; border-bottom-right-radius: 32px; }
}
@media (max-width: 360px) {
  .content { padding-left: 14px; padding-right: 14px; }
  .link { grid-template-columns: 40px 1fr 18px; gap: 12px; padding: 13px 14px; }
  .link-icon { width: 40px; height: 40px; }
  .link-icon svg { width: 20px; height: 20px; }
  .link-thumb { grid-template-columns: 48px 1fr 24px; gap: 12px; padding: 12px 14px; }
  .link-thumb .thumb { width: 48px; height: 48px; border-radius: 12px; }
}

/* ---------- RTL adjustments ---------- */
[dir="rtl"] body { line-height: 1.6; }

[dir="rtl"] .footer-tagline {
  letter-spacing: 0.04em; text-transform: none; font-size: 12px;
}
[dir="rtl"] .footer-brand { letter-spacing: 0; }

[dir="rtl"] .link-arrow svg { transform: scaleX(-1); }
[dir="rtl"] .link:hover .link-arrow { transform: translateX(-3px); }
[dir="rtl"] .btn-primary svg { transform: scaleX(-1); }

[dir="rtl"] .modal-close { right: auto; left: 10px; }
[dir="rtl"] .modal-url   { direction: ltr; text-align: left; }
[dir="rtl"] .link-label,
[dir="rtl"] .link-tagline { unicode-bidi: plaintext; }
[dir="rtl"] .live-badge { letter-spacing: 0.16em; }

/* ---------- accessibility ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .hero-canvas { display: none; }
}
