/* =====================================================================
   style.css — Giao diện trang link-in-bio
   Mọi màu / kích thước đọc từ biến CSS do main.js đặt theo config.js,
   KHÔNG cần sửa file này để đổi giao diện.
   ===================================================================== */

/* ---------- Biến mặc định (bị main.js ghi đè theo config) ---------- */
:root {
  --accent: #e2b3c7;
  --accent-rgb: 226, 179, 199;
  --accent2: #8fd3ff;
  --text: #ffffff;
  --muted: #c9b6c0;
  --card-bg: rgba(20, 14, 22, 0.55);
  --card-blur: 12px;
  --card-radius: 20px;
  --card-width: 640px;
  --enter-blur: 18px;
  --avatar-size: 120px;
  --u-size: 2.2rem;
  --u-color: var(--accent);
  --social-size: 36px;
  --font-body: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-username: var(--font-body);
  color-scheme: dark;
}

/* Góc quay cho viền cầu vồng / viền avatar xoay */
@property --angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html,
body {
  margin: 0;
  min-height: 100%;
}
body {
  background: #0d0a10;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
img {
  max-width: 100%;
}
button {
  font: inherit;
}
a {
  color: inherit;
}
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 8px;
}
html.has-custom-cursor,
html.has-custom-cursor * {
  cursor: var(--custom-cursor) !important;
}

/* ---------- Lớp nền ---------- */
#bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #0d0a10;
}
#bg-media {
  position: absolute;
  inset: 0;
  transition: filter 0.3s;
}
#bg-media img,
#bg-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
#bg-overlay {
  position: absolute;
  inset: 0;
  background: #000;
  opacity: 0.45;
}
#particles,
#cursor-fx {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
#particles {
  z-index: 1;
}
#cursor-fx {
  z-index: 100;
}

/* ---------- Bố cục chính ---------- */
#stage {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
}
#stack {
  position: relative;
  width: 100%;
  max-width: var(--card-width);
  transition: opacity 0.2s;
}
#stack-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}
body.is-locked #stack {
  opacity: 0;
}
#hud {
  position: relative;
  z-index: 20;
}

/* ---------- Kính mờ ---------- */
.glass {
  background: var(--card-bg);
  -webkit-backdrop-filter: blur(var(--card-blur)) saturate(140%);
  backdrop-filter: blur(var(--card-blur)) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

/* ---------- Thẻ profile ---------- */
.card {
  position: relative;
  width: 100%;
  border-radius: var(--card-radius);
  padding: 36px 32px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}
.card.has-views.views-bottom-left,
.card.has-views.views-bottom-right {
  padding-bottom: 46px;
}
.card-glare {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s;
  background: radial-gradient(circle at var(--glare-x, 50%) var(--glare-y, 50%), rgba(255, 255, 255, 0.1), transparent 55%);
}
#stack.is-tilting .card-glare {
  opacity: 1;
}

/* Viền phát sáng (card.borderGlow) */
.card.glow-soft {
  border-color: rgba(var(--accent-rgb), 0.3);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35), 0 0 26px rgba(var(--accent-rgb), 0.18);
}
.card.glow-pulse {
  border-color: rgba(var(--accent-rgb), 0.35);
  animation: glow-pulse 3.2s ease-in-out infinite;
}
@keyframes glow-pulse {
  0%,
  100% {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35), 0 0 12px rgba(var(--accent-rgb), 0.12);
  }
  50% {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35), 0 0 42px rgba(var(--accent-rgb), 0.42);
    border-color: rgba(var(--accent-rgb), 0.7);
  }
}
.card.glow-rainbow-rotate {
  border-color: transparent;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35), 0 0 30px rgba(var(--accent-rgb), 0.2);
}
.card.glow-rainbow-rotate::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 2px;
  pointer-events: none;
  background: conic-gradient(from var(--angle), var(--accent), var(--accent2), #ffe66d, #7cff9b, var(--accent2), var(--accent));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: spin-angle 4s linear infinite;
}
@keyframes spin-angle {
  to {
    --angle: 360deg;
  }
}

/* ---------- Avatar ---------- */
.avatar-wrap {
  position: relative;
  width: var(--avatar-size);
  height: var(--avatar-size);
  flex: none;
  margin: 4px 0 6px;
  border-radius: 50%;
}
.avatar-wrap.shape-rounded {
  border-radius: 24%;
}
.avatar-wrap.shape-square {
  border-radius: 8px;
}
.avatar-frame {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}
.avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.avatar-wrap.has-border .avatar-frame {
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.85), 0 0 20px rgba(var(--accent-rgb), 0.35);
}
/* Ảnh trang trí lớn hơn avatar ~20% giống avatar decoration của Discord */
.avatar-deco {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 120%;
  height: 120%;
  max-width: none;
  transform: translate(-50%, -50%);
  pointer-events: none;
  object-fit: contain;
  z-index: 2;
}
.avatar-float {
  animation: avatar-float 4s ease-in-out infinite;
}
@keyframes avatar-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}
.avatar-bounce {
  animation: avatar-bounce 2.6s cubic-bezier(0.3, 0, 0.3, 1) infinite;
}
@keyframes avatar-bounce {
  0%,
  40%,
  100% {
    transform: translateY(0) scale(1);
  }
  15% {
    transform: translateY(-14px) scale(1.02, 0.98);
  }
  28% {
    transform: translateY(0) scale(1.04, 0.96);
  }
  34% {
    transform: translateY(-4px);
  }
}
.avatar-pulse-glow .avatar-frame {
  animation: avatar-glow 2.6s ease-in-out infinite;
}
@keyframes avatar-glow {
  0%,
  100% {
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.7), 0 0 10px rgba(var(--accent-rgb), 0.25);
  }
  50% {
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 1), 0 0 34px rgba(var(--accent-rgb), 0.75);
  }
}
.avatar-spin-border::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: inherit;
  padding: 3px;
  background: conic-gradient(from var(--angle), var(--accent), transparent 35%, var(--accent2), transparent 85%, var(--accent));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: spin-angle 2.4s linear infinite;
}
.avatar-wrap.shape-rounded.avatar-spin-border::before {
  border-radius: 28%;
}

/* ---------- Username + badges ---------- */
.name-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  max-width: 100%;
}
.username {
  margin: 0;
  font-family: var(--font-username);
  font-size: var(--u-size);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.01em;
  color: var(--u-color);
  overflow-wrap: anywhere;
}
.u-text {
  display: inline-block;
  position: relative;
  min-height: 1.15em;
}
.badges {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.badge {
  position: relative;
  width: 22px;
  height: 22px;
  display: inline-flex;
  color: var(--accent);
  --badge-ink: #141018;
  outline-offset: 2px;
}
.badge svg,
.badge img {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 4px rgba(var(--accent-rgb), 0.45));
}
.badge img {
  object-fit: contain;
}
.badge-star {
  color: #ffe27a;
}
.badge-crown {
  color: #ffd25e;
}
.badge-heart {
  color: #ff6b9a;
}
.badge-flame {
  color: #ff8a3d;
}
.badge-gem {
  color: #7fdcff;
}
.badge-moon {
  color: #ffe9a8;
}
.badge-bolt {
  color: #ffd93d;
}
.badge-paw {
  color: #ffb3d1;
}
.badge-sparkle {
  color: #b9e6ff;
}
.badge-music {
  color: #9fd2ff;
}
.badge-code {
  color: #7fe0a6;
}
.badge-skull {
  color: #ececec;
}
.badge-flower {
  color: #ff9ad5;
}
.badge[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translate(-50%, 4px);
  padding: 4px 9px;
  border-radius: 7px;
  background: rgba(10, 8, 12, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  font: 500 12px/1.4 var(--font-body);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s, transform 0.18s;
  z-index: 5;
}
.badge:hover::after,
.badge:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- Hiệu ứng chữ (username / enter) — tốc độ: --fx-speed ---------- */
/* glitch: scanline + dải sáng chạy dọc + lệch kênh màu */
.fx-glitch {
  color: transparent;
  -webkit-text-fill-color: transparent;
  background-image:
    linear-gradient(180deg, transparent 0 40%, rgba(255, 255, 255, 0.95) 47% 53%, transparent 60% 100%),
    repeating-linear-gradient(180deg, rgba(0, 0, 0, 0.32) 0 1px, transparent 1px 3px),
    var(--u-fill, linear-gradient(var(--u-color), var(--u-color)));
  background-size: 100% 300%, 100% 100%, 100% 100%;
  background-repeat: no-repeat, repeat, no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 0 10px rgba(var(--accent-rgb), 0.45));
  animation:
    glitch-band calc(3.2s / var(--fx-speed, 1)) linear infinite,
    glitch-jitter calc(4.2s / var(--fx-speed, 1)) steps(1) infinite;
}
.fx-glitch::before,
.fx-glitch::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  background: none;
  -webkit-text-fill-color: currentColor;
  pointer-events: none;
  clip-path: inset(0 0 100% 0);
}
.fx-glitch::before {
  color: var(--accent2);
  animation: glitch-a calc(3s / var(--fx-speed, 1)) steps(1) infinite;
}
.fx-glitch::after {
  color: #ff4f9a;
  animation: glitch-b calc(3.7s / var(--fx-speed, 1)) steps(1) infinite;
}
@keyframes glitch-band {
  from {
    background-position: 0 100%, 0 0, 0 0;
  }
  to {
    background-position: 0 0%, 0 24px, 0 0;
  }
}
@keyframes glitch-jitter {
  0%,
  100% {
    transform: none;
  }
  3% {
    transform: skewX(-9deg) translateX(2px);
  }
  4% {
    transform: none;
  }
  49% {
    transform: translateX(-3px);
  }
  50% {
    transform: skewX(6deg);
  }
  51% {
    transform: none;
  }
}
@keyframes glitch-a {
  0%,
  12%,
  52%,
  100% {
    clip-path: inset(0 0 100% 0);
    transform: none;
  }
  2% {
    clip-path: inset(18% 0 62% 0);
    transform: translate(-3px, 0);
  }
  4% {
    clip-path: inset(62% 0 12% 0);
    transform: translate(3px, 0);
  }
  6% {
    clip-path: inset(40% 0 44% 0);
    transform: translate(-2px, 0);
  }
  8% {
    clip-path: inset(80% 0 4% 0);
    transform: translate(2px, 0);
  }
  10% {
    clip-path: inset(8% 0 78% 0);
    transform: translate(-3px, 0);
  }
  48% {
    clip-path: inset(30% 0 50% 0);
    transform: translate(4px, 0);
  }
  50% {
    clip-path: inset(70% 0 10% 0);
    transform: translate(-4px, 0);
  }
}
@keyframes glitch-b {
  0%,
  10%,
  70%,
  100% {
    clip-path: inset(0 0 100% 0);
    transform: none;
  }
  3% {
    clip-path: inset(50% 0 30% 0);
    transform: translate(3px, 0);
  }
  5% {
    clip-path: inset(10% 0 70% 0);
    transform: translate(-3px, 0);
  }
  7% {
    clip-path: inset(85% 0 2% 0);
    transform: translate(2px, 0);
  }
  64% {
    clip-path: inset(22% 0 58% 0);
    transform: translate(-4px, 0);
  }
  67% {
    clip-path: inset(55% 0 25% 0);
    transform: translate(4px, 0);
  }
}

/* rainbow: dải cầu vồng chạy ngang */
.fx-rainbow {
  background-image: linear-gradient(90deg, #ff5f6d, #ffc371, #fff86b, #6bff9e, #5ee7ff, #8a7dff, #ff7ad9, #ff5f6d);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: fx-slide calc(3s / var(--fx-speed, 1)) linear infinite;
}
@keyframes fx-slide {
  to {
    background-position: 200% 0;
  }
}

/* gradient-shift: accent -> màu nhạt hơn, chuyển động chậm */
.fx-gradient {
  background-image: linear-gradient(90deg, var(--u-color), #ffffff, var(--accent2), var(--u-color));
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: fx-shift calc(6s / var(--fx-speed, 1)) ease-in-out infinite alternate;
}
@supports (color: color-mix(in srgb, red, blue)) {
  .fx-gradient {
    background-image: linear-gradient(90deg, var(--u-color), color-mix(in srgb, var(--u-color) 35%, #fff), var(--accent2), var(--u-color));
  }
}
@keyframes fx-shift {
  from {
    background-position: 0% 0;
  }
  to {
    background-position: 100% 0;
  }
}

/* neon-flicker: glow mạnh, thỉnh thoảng chập chờn */
.fx-neon {
  color: #fff;
  -webkit-text-fill-color: #fff;
  text-shadow: 0 0 4px #fff, 0 0 10px var(--u-color), 0 0 22px var(--u-color), 0 0 44px var(--u-color);
  animation: fx-neon calc(4s / var(--fx-speed, 1)) linear infinite;
}
@keyframes fx-neon {
  0%,
  17%,
  21%,
  25%,
  54%,
  58%,
  100% {
    opacity: 1;
    text-shadow: 0 0 4px #fff, 0 0 10px var(--u-color), 0 0 22px var(--u-color), 0 0 44px var(--u-color);
  }
  19%,
  23%,
  56% {
    opacity: 0.55;
    text-shadow: none;
  }
}

/* shake: rung nhẹ định kỳ */
.fx-shake {
  animation: fx-shake calc(2.6s / var(--fx-speed, 1)) ease-in-out infinite;
}
@keyframes fx-shake {
  0%,
  14%,
  100% {
    transform: none;
  }
  2% {
    transform: translate(-2px, 1px) rotate(-1.5deg);
  }
  4% {
    transform: translate(2px, -1px) rotate(1.5deg);
  }
  6% {
    transform: translate(-2px, 0) rotate(-1deg);
  }
  8% {
    transform: translate(2px, 1px) rotate(1deg);
  }
  10% {
    transform: translate(-1px, -1px);
  }
  12% {
    transform: translate(1px, 0);
  }
}

/* glow-pulse: glow sáng lên tối xuống */
.fx-glowpulse {
  animation: fx-glowpulse calc(2.4s / var(--fx-speed, 1)) ease-in-out infinite;
}
@keyframes fx-glowpulse {
  0%,
  100% {
    text-shadow: 0 0 2px rgba(var(--accent-rgb), 0.25);
  }
  50% {
    text-shadow: 0 0 10px var(--u-color), 0 0 24px var(--u-color), 0 0 42px rgba(var(--accent-rgb), 0.6);
  }
}

/* wave: từng ký tự nhấp nhô */
.fx-wave-ch {
  display: inline-block;
  animation-name: fx-wave;
  animation-iteration-count: infinite;
  animation-timing-function: ease-in-out;
}
@keyframes fx-wave {
  0%,
  60%,
  100% {
    transform: translateY(0);
  }
  30% {
    transform: translateY(-0.22em);
  }
}

/* sparkle: ngôi sao nhỏ quanh chữ */
.fx-sparkle-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.fx-star {
  position: absolute;
  display: block;
  filter: drop-shadow(0 0 4px currentColor);
  animation: fx-star 1s ease-in-out forwards;
}
.fx-star svg {
  display: block;
  width: 100%;
  height: 100%;
}
@keyframes fx-star {
  0% {
    transform: translate(-50%, -50%) scale(0) rotate(0);
    opacity: 0;
  }
  50% {
    transform: translate(-50%, -50%) scale(1) rotate(90deg);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(0) rotate(180deg);
    opacity: 0;
  }
}

/* typewriter: con trỏ nhấp nháy */
.tw-caret {
  display: inline-block;
  margin-left: 2px;
  color: var(--accent);
  font-weight: 300;
  animation: caret-blink 1s steps(1) infinite;
}
@keyframes caret-blink {
  50% {
    opacity: 0;
  }
}

/* pulse (chữ màn hình enter) */
.fx-pulse {
  animation: fx-pulse 2.2s ease-in-out infinite;
}
@keyframes fx-pulse {
  0%,
  100% {
    opacity: 0.45;
    transform: scale(0.98);
  }
  50% {
    opacity: 1;
    transform: scale(1.02);
  }
}

/* ---------- Bio & vị trí ---------- */
.bio {
  margin: 2px 0 0;
  max-width: 92%;
  min-height: 1.5em;
  color: var(--muted);
  font-size: 1rem;
}
.bio-line {
  display: block;
}
.bio-cycle {
  display: inline-block;
  transition: opacity 0.4s ease, transform 0.4s ease, filter 0.4s ease;
}
.bio-cycle.out {
  opacity: 0;
}
.bio-cycle.slide.out {
  transform: translateY(-10px);
}
.bio-cycle.in {
  transition: none;
  opacity: 0;
}
.bio-cycle.slide.in {
  transform: translateY(10px);
}
.location {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 0.9rem;
}
.location svg {
  width: 15px;
  height: 15px;
  color: var(--accent);
}

/* ---------- Thẻ Discord ---------- */
.discord-mount {
  width: 100%;
  margin-top: 6px;
}
.discord {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 12px 14px;
  border-radius: calc(var(--card-radius) * 0.7);
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.06);
  text-align: left;
}
.discord-avatar {
  position: relative;
  width: 64px;
  height: 64px;
  flex: none;
}
.discord-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: rgba(255, 255, 255, 0.06);
}
.discord-dot {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 3.5px solid #17121b;
  background: #80848e;
}
.discord-dot.status-online {
  background: #23a55a;
}
.discord-dot.status-idle {
  background: #f0b232;
}
.discord-dot.status-dnd {
  background: #f23f43;
}
.discord-info {
  flex: 1;
  min-width: 0;
}
.discord-name {
  font-weight: 700;
  font-size: 1.05rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.discord-activity {
  font-style: italic;
  font-size: 0.85rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.discord-art {
  width: 48px;
  height: 48px;
  flex: none;
  border-radius: 8px;
  object-fit: cover;
}

/* ---------- Mạng xã hội ---------- */
.socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 8px;
}
.social {
  width: var(--social-size);
  height: var(--social-size);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  border-radius: 10px;
  text-decoration: none;
}
.social svg {
  width: 100%;
  height: 100%;
  transition: transform 0.3s cubic-bezier(0.3, 1.4, 0.5, 1), filter 0.3s;
}
.social-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 6px;
  transition: transform 0.3s cubic-bezier(0.3, 1.4, 0.5, 1), filter 0.3s;
}
.hover-scale .social:hover .social-img {
  transform: scale(1.2);
}
.hover-lift .social:hover .social-img {
  transform: translateY(-6px);
}
.style-brand .social {
  color: var(--brand);
}
.style-accent .social {
  color: var(--accent);
}
.style-white .social {
  color: #fff;
}
.style-outline .social {
  color: #fff;
  width: calc(var(--social-size) * 1.45);
  height: calc(var(--social-size) * 1.45);
  padding: calc(var(--social-size) * 0.24);
  border: 1.5px solid rgba(var(--accent-rgb), 0.6);
  border-radius: 50%;
  transition: border-color 0.3s, background 0.3s;
}
.style-outline .social:hover {
  border-color: var(--accent);
  background: rgba(var(--accent-rgb), 0.12);
}
.has-glow .social svg {
  filter: drop-shadow(0 0 5px currentColor);
}
.style-brand .social-tiktok svg {
  filter: drop-shadow(-1.5px -1px 0 #25f4ee) drop-shadow(1.5px 1px 0 #fe2c55);
}
/* Hiệu ứng hover (socials.hover) */
.hover-scale .social:hover svg,
.hover-scale .social:focus-visible svg {
  transform: scale(1.2);
}
.hover-lift .social:hover svg,
.hover-lift .social:focus-visible svg {
  transform: translateY(-6px);
}
.hover-rotate .social:hover svg,
.hover-rotate .social:focus-visible svg {
  transform: rotate(360deg);
  transition-duration: 0.6s;
}
.hover-bounce .social:hover svg,
.hover-bounce .social:focus-visible svg {
  animation: icon-bounce 0.7s ease;
}
@keyframes icon-bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  30% {
    transform: translateY(-9px);
  }
  55% {
    transform: translateY(0);
  }
  75% {
    transform: translateY(-4px);
  }
}
.hover-glow .social:hover svg,
.hover-glow .social:focus-visible svg {
  filter: drop-shadow(0 0 8px currentColor) drop-shadow(0 0 18px currentColor);
}

/* ---------- Lượt xem ---------- */
.views {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.views svg {
  width: 17px;
  height: 17px;
}
.views.pos-bottom-left {
  left: 18px;
  bottom: 14px;
}
.views.pos-bottom-right {
  right: 18px;
  bottom: 14px;
}
.views.pos-top-right {
  right: 18px;
  top: 14px;
}

/* ---------- Trình phát nhạc (full) ---------- */
.player {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--card-radius);
}
.player-cover-wrap {
  width: 64px;
  height: 64px;
  flex: none;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06) center / 28px no-repeat;
}
.player-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.player-main {
  flex: 1;
  min-width: 0;
}
.player-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.player-title {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.player-viz {
  width: 64px;
  height: 18px;
  flex: none;
}
.player-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  font-size: 0.75rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.player-bar {
  flex: 1;
  height: 16px;
  display: flex;
  align-items: center;
  cursor: pointer;
  touch-action: none;
}
.player-bar-track {
  position: relative;
  width: 100%;
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.15);
}
.player-bar-fill {
  position: relative;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.5);
}
.player-bar-fill::after {
  content: "";
  position: absolute;
  right: -6px;
  top: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  transform: translateY(-50%) scale(0);
  transition: transform 0.15s;
}
.player-bar:hover .player-bar-fill::after,
.player-bar:focus-visible .player-bar-fill::after,
.player-bar.is-dragging .player-bar-fill::after {
  transform: translateY(-50%) scale(1);
}
.player-controls {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: none;
}
.icon-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  background: transparent;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}
.icon-btn svg {
  width: 18px;
  height: 18px;
}
.icon-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}
.icon-btn:active {
  transform: scale(0.92);
}
.player-play {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.1);
}
.player-play svg {
  width: 20px;
  height: 20px;
}

/* ---------- Trình phát mini ---------- */
.mini-player {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 60px;
  height: 60px;
  padding: 4px;
  border-radius: 50%;
  border-color: rgba(var(--accent-rgb), 0.45);
  cursor: pointer;
  color: #fff;
  box-shadow: 0 0 22px rgba(var(--accent-rgb), 0.3);
}
.mini-player img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  animation: spin 8s linear infinite;
  animation-play-state: paused;
}
.mini-player.is-playing img {
  animation-play-state: running;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.mini-icon {
  position: absolute;
  inset: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  opacity: 1;
  transition: opacity 0.25s;
}
.mini-player.is-playing .mini-icon {
  opacity: 0;
}
.mini-player:hover .mini-icon,
.mini-player:focus-visible .mini-icon {
  opacity: 1;
}
.mini-icon svg {
  width: 20px;
  height: 20px;
}

/* ---------- Nút âm lượng ---------- */
.vol-wrap {
  position: fixed;
  top: 20px;
  display: flex;
  align-items: center;
  height: 48px;
  border-radius: 14px;
  overflow: hidden;
}
.vol-wrap.pos-top-left {
  left: 20px;
}
.vol-wrap.pos-top-right {
  right: 20px;
  flex-direction: row-reverse;
}
.vol-btn {
  width: 46px;
  height: 46px;
  flex: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.vol-btn svg {
  width: 22px;
  height: 22px;
}
.vol-slider {
  width: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  transition: width 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.vol-wrap:hover .vol-slider,
.vol-wrap:focus-within .vol-slider {
  width: 124px;
}
.vol-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100px;
  height: 4px;
  margin: 0 12px;
  flex: none;
  border-radius: 4px;
  cursor: pointer;
  background: linear-gradient(to right, var(--accent) var(--val, 50%), rgba(255, 255, 255, 0.2) var(--val, 50%));
}
.vol-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #fff;
  border: 0;
}
.vol-range::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #fff;
  border: 0;
}

/* ---------- Màn hình "click to enter" ---------- */
.enter {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.35);
  -webkit-backdrop-filter: blur(var(--enter-blur));
  backdrop-filter: blur(var(--enter-blur));
  cursor: pointer;
  text-align: center;
  outline: none;
}
.enter-text {
  position: relative;
  display: inline-block;
  --u-color: var(--text);
  color: var(--text);
  font-size: clamp(1.05rem, 2.4vw, 1.4rem);
  font-weight: 500;
  letter-spacing: 0.06em;
}

/* ---------- Bảng chỉnh sửa (editor) ---------- */
.editor {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  width: 390px;
  max-width: 100vw;
  display: flex;
  flex-direction: column;
  background: rgba(16, 12, 20, 0.86);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: -20px 0 50px rgba(0, 0, 0, 0.4);
  color: #ece8ef;
  font: 13px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif;
  transform: translateX(105%);
  visibility: hidden;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s 0.35s;
}
.editor.is-open {
  transform: none;
  visibility: visible;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}
/* Màn hình đủ rộng: dời thẻ sang trái để editor không che thẻ */
@media (min-width: 900px) {
  #stage {
    transition: padding-right 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  body.editor-open #stage {
    padding-right: 410px;
  }
}
.ed-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.ed-head strong {
  display: block;
  font-size: 15px;
}
.ed-sub {
  display: block;
  font-size: 12px;
  color: #a99fb0;
}
.ed-body {
  flex: 1;
  overflow-y: auto;
  padding: 10px 16px 24px;
  overscroll-behavior: contain;
}
.ed-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.ed-preset {
  padding: 8px 0 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.ed-preset .ed-label {
  display: block;
  margin-bottom: 6px;
}
.ed-hint {
  margin: 6px 0 0;
  font-size: 12px;
  color: #a99fb0;
}
.ed-group {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.ed-group summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 2px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  list-style: none;
  border-radius: 6px;
}
.ed-group summary::-webkit-details-marker {
  display: none;
}
.ed-group summary svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s;
  opacity: 0.7;
}
.ed-group[open] summary svg {
  transform: rotate(90deg);
}
.ed-group[open] {
  padding-bottom: 10px;
}
.ed-section-title {
  margin: 12px 0 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}
.ed-field {
  display: grid;
  grid-template-columns: 118px 1fr;
  align-items: center;
  gap: 10px;
  margin: 8px 0;
}
.ed-label {
  color: #cfc6d6;
}
.ed-control {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.ed-control > * {
  flex: 1;
  min-width: 0;
}
.ed-input {
  width: 100%;
  padding: 7px 9px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
  font: inherit;
}
.ed-input:focus {
  border-color: var(--accent);
  outline: none;
}
select.ed-input option {
  background: #1b1520;
}
.ed-textarea {
  resize: vertical;
  min-height: 80px;
}
.ed-range-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ed-range {
  flex: 1;
  min-width: 0;
  accent-color: var(--accent);
}
.ed-out {
  min-width: 46px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: #cfc6d6;
}
.ed-color-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}
.ed-color {
  width: 34px;
  height: 30px;
  flex: none;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background: none;
  cursor: pointer;
}
.ed-color-text {
  flex: 1;
  min-width: 0;
}
.ed-switch {
  -webkit-appearance: none;
  appearance: none;
  flex: none !important;
  position: relative;
  width: 40px;
  height: 22px;
  margin: 0;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.18);
  cursor: pointer;
  transition: background 0.2s;
}
.ed-switch::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s;
}
.ed-switch:checked {
  background: var(--accent);
}
.ed-switch:checked::before {
  transform: translateX(18px);
}
.ed-override {
  flex: none !important;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font-size: 12px;
}
.ed-chip,
.ed-btn,
.ed-icon-btn {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.ed-chip {
  flex: none !important;
  padding: 5px 8px;
  border-radius: 7px;
  font-size: 12px;
}
.ed-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 9px;
  font-size: 13px;
}
.ed-btn svg {
  width: 14px;
  height: 14px;
}
.ed-btn:hover,
.ed-chip:hover,
.ed-icon-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}
.ed-btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #120e14;
  font-weight: 600;
}
.ed-btn.primary:hover {
  filter: brightness(1.08);
}
.ed-btn.danger,
.ed-icon-btn.danger {
  color: #ff9b9b;
}
.ed-icon-btn {
  width: 30px;
  height: 30px;
  flex: none;
  padding: 6px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ed-icon-btn:disabled {
  opacity: 0.35;
  cursor: default;
}
.ed-icon-btn svg {
  width: 100%;
  height: 100%;
}
.ed-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ed-list-item {
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.18);
}
.ed-subfield {
  display: grid;
  grid-template-columns: 64px 1fr;
  align-items: center;
  gap: 8px;
}
.ed-sublabel {
  font-size: 12px;
  color: #a99fb0;
}
.ed-list-tools {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}
.ed-add {
  align-self: flex-start;
}
.ed-field:has(.ed-list) {
  grid-template-columns: 1fr;
}
.ed-pill {
  position: fixed;
  left: 50%;
  bottom: 16px;
  z-index: 55;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--text);
  font: 12.5px/1.2 system-ui, -apple-system, "Segoe UI", sans-serif;
  cursor: pointer;
}
.ed-pill svg {
  width: 15px;
  height: 15px;
}
.ed-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.6);
  font: 13px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #ece8ef;
}
.ed-modal-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(780px, 100%);
  max-height: 90vh;
  padding: 16px;
  border-radius: 16px;
  background: rgba(20, 16, 24, 0.92);
}
.ed-modal-head,
.ed-modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.ed-modal-actions {
  justify-content: flex-end;
}
.ed-status {
  margin-right: auto;
  color: #9fe3b4;
}
.ed-export {
  flex: 1;
  min-height: 50vh;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.45);
  color: #f3eef6;
  font: 12px/1.5 ui-monospace, "Cascadia Code", Consolas, monospace;
  white-space: pre;
  resize: none;
}

/* ---------- Mobile (< 600px) ---------- */
@media (max-width: 599px) {
  #stage {
    align-items: flex-start;
    padding: 76px 0 28px;
  }
  #stack {
    width: 92vw;
    max-width: 92vw;
  }
  .card {
    padding: 28px 18px 22px;
    gap: 8px;
  }
  .card.has-views.views-bottom-left,
  .card.has-views.views-bottom-right {
    padding-bottom: 42px;
  }
  .avatar-wrap {
    width: min(var(--avatar-size), 96px);
    height: min(var(--avatar-size), 96px);
  }
  .username {
    font-size: min(var(--u-size), 1.85rem);
  }
  .bio {
    font-size: 0.95rem;
    max-width: 100%;
  }
  .discord {
    gap: 12px;
    padding: 10px 12px;
  }
  .discord-avatar {
    width: 52px;
    height: 52px;
  }
  .discord-dot {
    width: 16px;
    height: 16px;
    border-width: 3px;
  }
  .discord-art {
    width: 40px;
    height: 40px;
  }
  .socials {
    gap: 12px;
  }
  .player {
    gap: 10px;
    padding: 10px 12px;
  }
  .player-cover-wrap {
    width: 48px;
    height: 48px;
    border-radius: 10px;
  }
  .player-viz {
    width: 44px;
  }
  .icon-btn {
    width: 32px;
    height: 32px;
  }
  .player-play {
    width: 38px;
    height: 38px;
  }
  .vol-wrap {
    top: 14px;
    height: 44px;
  }
  .vol-wrap.pos-top-left {
    left: 4vw;
  }
  .vol-wrap.pos-top-right {
    right: 4vw;
  }
  .vol-btn {
    width: 42px;
    height: 42px;
  }
  .mini-player {
    right: 14px;
    bottom: 14px;
    width: 52px;
    height: 52px;
  }
  .editor {
    width: 100vw;
  }
  .ed-field {
    grid-template-columns: 104px 1fr;
  }
}

/* ---------- Giảm chuyển động: tắt hiệu ứng chạy liên tục, chỉ giữ fade nhẹ ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
  .bio-cycle {
    transition: opacity 0.4s ease !important;
    transform: none !important;
  }
}

.noscript {
  position: relative;
  z-index: 5;
  padding: 2rem;
  text-align: center;
  color: #fff;
}
