/* Profilo pubblico (e anteprima nel dashboard). Tutto e' sotto .vp per non interferire con il resto del sito. */
.vp-body { margin: 0; background: #07060b; color-scheme: dark; }

.vp {
  --vp-accent: #a070c4;
  --vp-bgcolor: #07060b;
  --vp-dim: 0.35;
  --vp-blur: 16px;
  --vp-card: rgba(20, 17, 32, 0.55);
  --vp-font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --vp-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --vp-text: #f1edfb;
  --vp-soft: rgba(241, 237, 251, 0.62);
  position: relative;
  min-height: 100dvh;
  overflow: hidden;
  isolation: isolate;
  color: var(--vp-text);
  font-family: var(--vp-font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.vp *, .vp *::before, .vp *::after { box-sizing: border-box; }
.vp[data-font="mono"] { --vp-font: var(--vp-mono); }
.vp-preview { min-height: 0; height: 100%; border-radius: inherit; }

/* ---------- sfondo ---------- */
.vp-bg { position: absolute; inset: 0; z-index: -2; background: var(--vp-bgcolor); overflow: hidden; }
.vp-bg-aurora {
  position: absolute; inset: -25%;
  background:
    radial-gradient(42% 38% at 22% 28%, color-mix(in srgb, var(--vp-accent) 42%, transparent), transparent 70%),
    radial-gradient(38% 42% at 78% 24%, color-mix(in srgb, var(--vp-accent) 34%, #2b3cff 24%), transparent 72%),
    radial-gradient(46% 40% at 62% 82%, color-mix(in srgb, var(--vp-accent) 30%, #d13aa8 22%), transparent 72%),
    radial-gradient(30% 30% at 12% 86%, color-mix(in srgb, var(--vp-accent) 22%, transparent), transparent 70%);
  filter: blur(28px) saturate(1.1);
  animation: vp-drift 28s ease-in-out infinite alternate;
  will-change: transform;
}
.vp-bg-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vp-dim { position: absolute; inset: 0; background: rgba(5, 4, 9, var(--vp-dim)); }
.vp-stars { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.vp-scan {
  position: absolute; inset: 0; z-index: -1; pointer-events: none; mix-blend-mode: overlay;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 3px);
  animation: vp-scan 9s linear infinite;
}
@keyframes vp-drift { from { transform: translate3d(-3%, -2%, 0) scale(1.04); } to { transform: translate3d(3%, 2.5%, 0) scale(1.12); } }
@keyframes vp-scan { from { background-position: 0 0; } to { background-position: 0 24px; } }

/* ---------- scena e scheda ---------- */
.vp-stage {
  min-height: inherit; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  padding: 36px 16px 44px;
}
.vp[data-layout="left"] .vp-stage { align-items: flex-start; padding-left: clamp(16px, 9vw, 140px); }
.vp-preview .vp-stage { padding: 28px 14px 30px; min-height: 100%; overflow-y: auto; }

.vp-card {
  width: min(440px, 100%);
  padding: 30px 24px 22px;
  border-radius: 20px;
  background: var(--vp-card);
  -webkit-backdrop-filter: blur(var(--vp-blur)) saturate(1.2);
  backdrop-filter: blur(var(--vp-blur)) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 26px 70px rgba(0, 0, 0, 0.45);
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.14s ease-out, opacity 0.7s ease, translate 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
}
.vp[data-layout="left"] .vp-card { text-align: left; }
.vp[data-card="none"] .vp-card { background: transparent; border-color: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
@media (prefers-reduced-transparency: reduce) { .vp-card { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(16, 13, 26, 0.94); } }

/* entrata: si vede solo dopo il click sulla schermata iniziale */
.vp-card, .vp-player, .vp-brand { opacity: 0; translate: 0 14px; }
.vp.is-in .vp-card, .vp.is-in .vp-player, .vp.is-in .vp-brand { opacity: 1; translate: 0 0; }
.vp.is-in .vp-player { transition: opacity 0.7s ease 0.12s, translate 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.12s; }
.vp.is-in .vp-brand { transition: opacity 0.7s ease 0.24s, translate 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.24s; }

.vp-head { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.vp[data-layout="left"] .vp-head { align-items: flex-start; }
.vp-avatar {
  width: 104px; height: 104px; border-radius: 50%; object-fit: cover; margin-bottom: 10px;
  border: 2px solid color-mix(in srgb, var(--vp-accent) 60%, transparent); background: #15121f;
}
.vp-avatar-ph { display: grid; place-items: center; font-size: 42px; font-weight: 650; color: var(--vp-accent); }
.vp-namerow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; }
.vp[data-layout="left"] .vp-namerow { justify-content: flex-start; }
.vp-name { margin: 0; font-size: 26px; line-height: 1.15; font-weight: 650; letter-spacing: -0.02em; word-break: break-word; }
.vp-badges { display: inline-flex; gap: 5px; }
.vp-badge {
  display: grid; place-items: center; width: 22px; height: 22px; border-radius: 999px;
  color: color-mix(in srgb, var(--vp-accent) 70%, #fff); background: color-mix(in srgb, var(--vp-accent) 18%, transparent);
}
.vp-handle { font-family: var(--vp-mono); font-size: 13px; color: var(--vp-soft); }
.vp-bio { margin: 10px 0 0; font-size: 15px; line-height: 1.55; color: rgba(241, 237, 251, 0.84); min-height: 1.55em; overflow-wrap: anywhere; white-space: pre-line; }
.vp-typing::after { content: ""; display: inline-block; width: 2px; height: 1.05em; margin-left: 2px; vertical-align: -0.15em; background: currentColor; animation: vp-blink 1s steps(1) infinite; }
@keyframes vp-blink { 50% { opacity: 0; } }

.vp[data-glow] .vp-avatar { box-shadow: 0 0 0 5px color-mix(in srgb, var(--vp-accent) 16%, transparent), 0 0 46px color-mix(in srgb, var(--vp-accent) 60%, transparent); }
.vp[data-glow] .vp-name { text-shadow: 0 0 24px color-mix(in srgb, var(--vp-accent) 75%, transparent); }
.vp[data-glow] .vp-card { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 0 60px color-mix(in srgb, var(--vp-accent) 22%, transparent), 0 26px 70px rgba(0, 0, 0, 0.45); }

/* ---------- Discord ---------- */
.vp-presence {
  display: flex; align-items: center; gap: 10px; margin: 16px 0 0; padding: 9px 12px; text-align: left;
  border-radius: 14px; background: rgba(255, 255, 255, 0.045); border: 1px solid rgba(255, 255, 255, 0.08);
}
.vp-presence[hidden] { display: none; }
.vp-pr-av { position: relative; flex: none; width: 38px; height: 38px; }
.vp-pr-av img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; background: #15121f; }
.vp-pr-dot { position: absolute; right: -2px; bottom: -2px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid #15121f; background: #6d6884; }
.vp-pr-dot[data-s="online"] { background: #3ecf8e; }
.vp-pr-dot[data-s="idle"] { background: #e6b35c; }
.vp-pr-dot[data-s="dnd"] { background: #ff6b7d; }
.vp-pr-txt { min-width: 0; display: grid; }
.vp-pr-name { font-weight: 600; font-size: 14px; }
.vp-pr-act { font-size: 12.5px; color: var(--vp-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- link ---------- */
.vp-links { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 10px; }
.vp-link {
  display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-radius: 14px;
  background: rgba(255, 255, 255, 0.045); border: 1px solid rgba(255, 255, 255, 0.08);
  color: inherit; text-decoration: none; font-weight: 550; text-align: left;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s, border-color 0.2s;
}
.vp-link:hover { transform: translateY(-2px); background: color-mix(in srgb, var(--vp-accent) 16%, transparent); border-color: color-mix(in srgb, var(--vp-accent) 55%, transparent); }
.vp-link:active { transform: scale(0.985); }
.vp-link:focus-visible, .vp-splash:focus-visible, .vp-play:focus-visible { outline: 2px solid var(--vp-accent); outline-offset: 3px; }
.vp-link .vp-ico { display: grid; place-items: center; color: color-mix(in srgb, var(--vp-accent) 75%, #fff); }
.vp-link-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vp-link-go { color: var(--vp-soft); opacity: 0; transition: opacity 0.2s; }
.vp-link:hover .vp-link-go, .vp-link:focus-visible .vp-link-go { opacity: 1; }
.vp-empty { margin: 18px 0 0; color: var(--vp-soft); font-size: 14px; }

.vp-meta { margin-top: 18px; display: flex; justify-content: center; align-items: center; gap: 6px; font-family: var(--vp-mono); font-size: 12px; color: rgba(241, 237, 251, 0.5); }
.vp[data-layout="left"] .vp-meta { justify-content: flex-start; }

/* ---------- musica ---------- */
.vp-player {
  width: min(440px, 100%); display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 14px;
  background: var(--vp-card); border: 1px solid rgba(255, 255, 255, 0.09);
  -webkit-backdrop-filter: blur(var(--vp-blur)); backdrop-filter: blur(var(--vp-blur));
}
.vp-play {
  flex: none; width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 50%; cursor: pointer;
  background: var(--vp-accent); color: #0b0912;
}
.vp-play:active { transform: scale(0.94); }
.vp-track { flex: 1; min-width: 0; display: grid; gap: 1px; }
.vp-track-title { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vp-track-sub { font-family: var(--vp-mono); font-size: 11.5px; color: var(--vp-soft); }
.vp-vol { flex: none; width: 84px; accent-color: var(--vp-accent); }

.vp-brand { font-family: var(--vp-mono); font-size: 12px; color: rgba(241, 237, 251, 0.42); text-decoration: none; letter-spacing: 0.02em; }
.vp-brand:hover { color: var(--vp-accent); }

/* ---------- schermata iniziale ---------- */
.vp-splash {
  position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; width: 100%; border: 0; cursor: pointer;
  background: rgba(5, 4, 9, 0.62); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  color: var(--vp-text); font: 500 15px/1.4 var(--vp-mono); letter-spacing: 0.08em; text-transform: lowercase;
  transition: opacity 0.7s ease, visibility 0.7s;
}
.vp-splash span { animation: vp-pulse 2.4s ease-in-out infinite; padding: 14px 20px; }
.vp-splash.is-gone { opacity: 0; visibility: hidden; pointer-events: none; }
@keyframes vp-pulse { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }

@media (max-width: 480px) {
  .vp-card { padding: 26px 18px 20px; }
  .vp-vol { width: 64px; }
}
@media (prefers-reduced-motion: reduce) {
  .vp-bg-aurora, .vp-scan, .vp-splash span, .vp-typing::after { animation: none; }
  .vp-card, .vp-player, .vp-brand, .vp-link { transition: none; }
  .vp-card, .vp-player, .vp-brand { translate: 0 0; }
}
