:root {
  --bg: #07060e;
  --bg-soft: #0b0a16;
  --ink: #f6f3ff;
  --muted: #9a94b8;
  --gold: #ffc857;
  --gold-soft: rgba(255, 200, 87, .14);
  --violet: #8b5cf6;
  --line: rgba(255, 255, 255, .08);
  --line-strong: rgba(255, 255, 255, .14);
  --radius: 20px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  min-height: 100dvh;
  font-family: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(255, 200, 87, .3); color: #fff; }

/* ---------- Background ---------- */

.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(1200px 800px at 50% -20%, rgba(110, 70, 220, .32) 0%, transparent 62%),
    radial-gradient(900px 620px at 100% 112%, rgba(255, 180, 60, .13) 0%, transparent 60%),
    radial-gradient(700px 500px at 0% 100%, rgba(60, 200, 255, .06) 0%, transparent 60%),
    linear-gradient(180deg, #0b0918 0%, var(--bg) 55%);
}

.bg__light {
  position: absolute;
  top: -35%;
  width: 55vw;
  height: 120vh;
  background: linear-gradient(180deg, rgba(139, 92, 246, .16), transparent 68%);
  filter: blur(12px);
  opacity: .7;
}
.bg__light--left  { left: -24vw; transform: rotate(12deg); }
.bg__light--right { right: -24vw; transform: rotate(-12deg); }

.bg__rune {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(1400px, 150vw);
  transform: translate(-50%, -46%);
  color: rgba(255, 200, 87, .55);
  -webkit-mask-image: radial-gradient(ellipse 55% 58% at 50% 50%, #000 0%, transparent 76%);
          mask-image: radial-gradient(ellipse 55% 58% at 50% 50%, #000 0%, transparent 76%);
  animation: spin-slow 90s linear infinite;
}

@keyframes spin-slow { to { transform: translate(-50%, -46%) rotate(360deg); } }

.bg__streak {
  position: absolute;
  height: 1px;
  width: 46vw;
  background: linear-gradient(90deg, transparent, rgba(255, 200, 87, .5), transparent);
  filter: blur(.5px);
  opacity: .5;
}
.bg__streak--a { left: -6vw;  top: 22%; transform: rotate(-24deg); }
.bg__streak--b { right: -8vw; bottom: 18%; transform: rotate(-24deg); background: linear-gradient(90deg, transparent, rgba(139, 92, 246, .6), transparent); }

.bg__grain {
  position: absolute;
  inset: 0;
  opacity: .22;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
  pointer-events: none;
}

.bg::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 200px;
  background: linear-gradient(to top, var(--bg) 12%, transparent);
  pointer-events: none;
}

/* ---------- Top bar ---------- */

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: max(18px, env(safe-area-inset-top)) clamp(20px, 5vw, 40px) 18px;
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}

.brand {
  font-family: "Archivo", sans-serif;
  font-weight: 900;
  font-size: 1rem;
  letter-spacing: .04em;
  text-decoration: none;
  color: var(--ink);
  transition: color .25s var(--ease);
}
.brand span { color: var(--gold); }
.brand:hover { color: var(--gold); }

.topbar__url { opacity: .75; }

/* ---------- Layout ---------- */

.shell {
  width: min(460px, 100%);
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(18px, 3vh, 34px);
  padding: calc(78px + env(safe-area-inset-top)) clamp(20px, 6vw, 28px) calc(32px + env(safe-area-inset-bottom));
}

/* ---------- Hero ---------- */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 15px;
  margin-bottom: 22px;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #ffe6ab;
  background: rgba(255, 200, 87, .07);
  border: 1px solid rgba(255, 200, 87, .25);
  border-radius: 999px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.pill__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 0 rgba(255, 200, 87, .6);
  animation: ping 2.4s var(--ease) infinite;
}

@keyframes ping {
  0%   { box-shadow: 0 0 0 0 rgba(255, 200, 87, .55); }
  70%  { box-shadow: 0 0 0 9px rgba(255, 200, 87, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 200, 87, 0); }
}

.avatar {
  position: relative;
  width: 116px;
  height: 116px;
  margin-bottom: 18px;
  display: grid;
  place-items: center;
}

.avatar__ring {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--gold), #6b3fd4, #fff2cf, var(--gold));
  animation: spin 7s linear infinite;
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 0);
          mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 0);
}

.avatar::after {
  content: "";
  position: absolute;
  inset: -18px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 200, 87, .26), rgba(139, 92, 246, .2) 55%, transparent 70%);
  filter: blur(16px);
  z-index: -1;
}

.avatar__img {
  width: 116px;
  height: 116px;
  border-radius: 50%;
  object-fit: cover;
  background: #0d0b1c;
  border: 3px solid #0a0814;
}

@keyframes spin { to { transform: rotate(360deg); } }

.title {
  font-family: "Archivo", sans-serif;
  font-weight: 900;
  font-size: clamp(2.5rem, 10vw, 3.35rem);
  line-height: 1.02;
  letter-spacing: -.035em;
  background: linear-gradient(180deg, #ffffff 20%, #ffd47a 100%);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}

.handle {
  margin-top: 8px;
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: .12em;
  color: var(--muted);
}

.bio {
  margin-top: 14px;
  max-width: 34ch;
  font-size: .94rem;
  line-height: 1.6;
  color: #b3aecb;
}

.bio strong { color: #f3e7c9; font-weight: 600; }

/* ---------- Social links ---------- */

.links {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.social {
  --brand: 255, 200, 87;
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px 14px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .02));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  text-decoration: none;
  color: var(--ink);
  overflow: hidden;
  transition: transform .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease);
}

.social[data-brand="youtube"]  { --brand: 255, 45, 85; }
.social[data-brand="tiktok"]   { --brand: 37, 244, 238; }
.social[data-brand="facebook"] { --brand: 24, 119, 242; }

.social::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), rgba(var(--brand), .20), transparent 62%);
  transition: opacity .4s var(--ease);
}

.social::after {
  content: "";
  position: absolute;
  left: 0;
  top: 18%;
  bottom: 18%;
  width: 2px;
  border-radius: 2px;
  background: rgb(var(--brand));
  opacity: 0;
  transform: scaleY(.4);
  transition: opacity .35s var(--ease), transform .35s var(--ease);
}

.social:hover,
.social:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(var(--brand), .38);
  box-shadow: 0 14px 34px -12px rgba(var(--brand), .35), 0 0 0 1px rgba(var(--brand), .10) inset;
  outline: none;
}

.social:hover::before,
.social:focus-visible::before { opacity: 1; }

.social:hover::after,
.social:focus-visible::after { opacity: 1; transform: scaleY(1); }

.social__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .07);
  color: #e6e1f7;
  transition: background .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease), transform .35s var(--ease);
}

.social__icon svg { width: 22px; height: 22px; }

.social:hover .social__icon,
.social:focus-visible .social__icon {
  background: rgb(var(--brand));
  border-color: transparent;
  color: #0a0814;
  transform: scale(1.04) rotate(-4deg);
}

.social[data-brand="tiktok"]:hover .social__icon,
.social[data-brand="tiktok"]:focus-visible .social__icon {
  color: #0a0814;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .25) inset;
}

.social__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.social__label {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -.01em;
}

.social__handle {
  font-size: .78rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.social__arrow {
  flex: none;
  width: 20px;
  height: 20px;
  color: var(--muted);
  opacity: .7;
  transition: transform .35s var(--ease), opacity .35s var(--ease), color .35s var(--ease);
}

.social:hover .social__arrow,
.social:focus-visible .social__arrow {
  transform: translate(2px, -2px);
  opacity: 1;
  color: rgb(var(--brand));
}

.social:active { transform: translateY(0) scale(.99); }

/* ---------- Actions ---------- */

.actions {
  display: flex;
  justify-content: center;
  margin-top: -8px;
}

.share {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 20px;
  font-family: inherit;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .04em;
  color: #c6c1db;
  background: rgba(255, 255, 255, .03);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  transition: color .3s var(--ease), border-color .3s var(--ease), background .3s var(--ease), transform .3s var(--ease);
}

.share svg { width: 16px; height: 16px; }

.share:hover {
  color: var(--ink);
  border-color: rgba(255, 200, 87, .35);
  background: rgba(255, 200, 87, .07);
}

.share:active { transform: scale(.97); }
.share:focus-visible { outline: 2px solid rgba(255, 200, 87, .5); outline-offset: 3px; }

/* ---------- Footer ---------- */

.footer {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: .72rem;
  letter-spacing: .05em;
  color: #736d92;
  text-align: center;
}

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(28px + env(safe-area-inset-bottom));
  z-index: 50;
  transform: translate(-50%, 16px);
  padding: 11px 20px;
  font-size: .82rem;
  font-weight: 600;
  color: #14100a;
  background: linear-gradient(180deg, #ffd47a, var(--gold));
  border-radius: 999px;
  box-shadow: 0 12px 30px -10px rgba(255, 200, 87, .6);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}

.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  animation: rise .8s var(--ease) forwards;
  animation-delay: var(--d, 0ms);
}

@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; opacity: 1; transform: none; }
  .avatar__ring, .pill__dot, .bg__rune { animation: none; }
  .social, .social__icon, .social__arrow, .share { transition: none; }
}

/* ---------- Small screens ---------- */

@media (max-height: 720px) {
  .shell { justify-content: flex-start; padding-top: calc(76px + env(safe-area-inset-top)); }
  .pill { margin-bottom: 18px; }
  .avatar { width: 96px; height: 96px; margin-bottom: 16px; }
  .avatar__img { width: 96px; height: 96px; }
  .title { font-size: 2.3rem; }
  .bio { margin-top: 12px; font-size: .88rem; }
}

@media (min-width: 768px) {
  .social { padding: 16px 20px 16px 16px; }
  .social__icon { width: 50px; height: 50px; }
}

@media (min-width: 1100px) {
  .shell { width: 520px; gap: 28px; }
  .title { font-size: 4rem; }
  .bio { font-size: 1rem; }
  .social { padding: 16px 22px 16px 18px; }
  .social__icon { width: 52px; height: 52px; }
  .social__label { font-size: 1.06rem; }

  body::before,
  body::after {
    content: "BLV Liên Quân Mobile";
    position: fixed;
    top: 50%;
    z-index: 1;
    font-size: .66rem;
    letter-spacing: .45em;
    text-transform: uppercase;
    color: rgba(154, 148, 184, .28);
    writing-mode: vertical-rl;
    pointer-events: none;
  }
  body::before { left: clamp(24px, 6vw, 72px); transform: translateY(-50%); }
  body::after  { right: clamp(24px, 6vw, 72px); transform: translateY(-50%) rotate(180deg); }
}
