/* Profile page. Colors, blur and radius come from the owner's settings as CSS variables set by profile.js. */
html.mus-page, html.mus-page body { height: 100%; margin: 0; background: #000; }
html.mus-page #app { position: fixed; inset: 0; }

.mus {
  --accent: #8b7bff; --text: #fff; --bg: #0b0b16; --icon: #fff; --card: rgba(21, 21, 42, .55);
  --blur: 14px; --radius: 22px; --font: system-ui, sans-serif; --dim: .25; --bgblur: 0px;
  position: relative; width: 100%; height: 100%; overflow: hidden; isolation: isolate;
  background: var(--bg); color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.mus *, .mus *::before, .mus *::after { box-sizing: border-box; }
.mus a { color: inherit; text-decoration: none; }
.mus button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.mus :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.mus-bg { position: absolute; inset: calc(var(--bgblur) * -2); z-index: -4; background-size: cover; background-position: center; filter: blur(var(--bgblur)); }
.mus-bg video, .mus-bg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mus-dim { position: absolute; inset: 0; z-index: -3; background: #000; opacity: var(--dim); }
.mus-fx, .mus-cursorfx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.mus-fx { z-index: -2; }
.mus-cursorfx { z-index: 40; }

.mus-aurora { position: absolute; inset: -20%; z-index: -2; filter: blur(70px); opacity: .55; pointer-events: none; }
.mus-aurora i { position: absolute; width: 55%; height: 55%; border-radius: 50%; animation: mus-drift 18s ease-in-out infinite alternate; }
.mus-aurora i:nth-child(1) { background: var(--accent); left: 5%; top: 10%; }
.mus-aurora i:nth-child(2) { background: var(--grad-b, #ff6fb5); right: 0; top: 30%; animation-duration: 24s; animation-direction: alternate-reverse; }
.mus-aurora i:nth-child(3) { background: var(--grad-a, #4fd1c5); left: 30%; bottom: 0; animation-duration: 30s; }
@keyframes mus-drift { from { transform: translate(-8%, -6%) scale(1); } to { transform: translate(10%, 8%) scale(1.25); } }

.mus-scan { position: absolute; inset: 0; z-index: 30; pointer-events: none; mix-blend-mode: overlay; opacity: .5;
  background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, .55) 0 1px, transparent 1px 3px); }
.mus-scan::after { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, .7)); }

/* Stage and card */
.mus-stage { position: absolute; inset: 0; overflow-y: auto; display: flex; flex-direction: column; align-items: center; padding: 56px 16px 20px; perspective: 1200px; }
.mus-stage::before, .mus-stage::after { content: ''; flex: 1 0 0; }
.mus-card {
  position: relative; width: 100%; max-width: 620px; flex: none; padding: 32px 28px 26px; text-align: center;
  background: var(--card); border-radius: var(--radius);
  -webkit-backdrop-filter: blur(var(--blur)); backdrop-filter: blur(var(--blur));
  transition: transform .18s ease-out; transform-style: preserve-3d; will-change: transform;
}
.mus-card.has-border { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--text) 14%, transparent), 0 20px 60px rgba(0, 0, 0, .35); }

.mus-banner { height: 150px; margin: -32px -28px 0; border-radius: var(--radius) var(--radius) 0 0; background-size: cover; background-position: center; background-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.mus-avatar { width: 108px; height: 108px; border-radius: 50%; object-fit: cover; display: block; margin: 0 auto 14px; background: color-mix(in srgb, var(--accent) 30%, #000); }
.mus-avatar.is-blank { display: grid; place-items: center; font-size: 44px; font-weight: 700; background: var(--accent); color: #fff; }

.mus-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 12px; }
.mus-name { margin: 0; font-size: clamp(26px, 6vw, 34px); line-height: 1.15; font-weight: 700; letter-spacing: -.01em; overflow-wrap: anywhere; position: relative; }
.mus-handle { width: 100%; margin: 2px 0 0; font-size: 14px; opacity: .6; }
.mus-badges { display: inline-flex; flex-wrap: wrap; gap: 6px; padding: 5px 9px; border-radius: 999px; background: color-mix(in srgb, var(--text) 9%, transparent); }
.mus-badge { position: relative; width: 20px; height: 20px; display: grid; place-items: center; }
.mus-badge svg, .mus-badge img { width: 20px; height: 20px; display: block; object-fit: contain; }
.mus-badge b { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; color: #000; }
.mus.glow-badges .mus-badge { filter: drop-shadow(0 0 6px currentColor); }

.mus-bio { margin: 14px auto 0; max-width: 46ch; white-space: pre-wrap; overflow-wrap: anywhere; min-height: 1.5em; }
.mus-bio.is-typing::after { content: ''; display: inline-block; width: 2px; height: 1em; margin-left: 2px; vertical-align: -2px; background: currentColor; animation: mus-blink 1s steps(1) infinite; }
@keyframes mus-blink { 50% { opacity: 0; } }

.mus-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; margin-top: 12px; font-size: 13.5px; opacity: .75; }
.mus-meta span { display: inline-flex; align-items: center; gap: 5px; }
.mus-meta svg { width: 15px; height: 15px; fill: currentColor; }

.mus-socials { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 18px; }
.mus-social { position: relative; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; transition: transform .15s, background .15s; }
.mus-social:hover { transform: translateY(-3px); background: color-mix(in srgb, var(--text) 10%, transparent); }
.mus-ico { width: 26px; height: 26px; background: var(--ico, var(--icon)); -webkit-mask: var(--src) center / contain no-repeat; mask: var(--src) center / contain no-repeat; }
.mus.glow-socials .mus-ico { filter: drop-shadow(0 0 7px var(--ico, var(--icon))); }
.mus.glow-socials .mus-social { filter: drop-shadow(0 0 6px color-mix(in srgb, var(--icon) 70%, transparent)); }

[data-tip]:hover::after, [data-tip]:focus-visible::after {
  content: attr(data-tip); position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); z-index: 5;
  padding: 4px 9px; border-radius: 8px; background: rgba(0, 0, 0, .85); color: #fff; font: 500 12px/1.4 system-ui, sans-serif; white-space: nowrap; pointer-events: none;
}

.mus-links { display: grid; gap: 10px; margin-top: 18px; }
.mus-link { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 16px; border-radius: calc(var(--radius) * .6); text-align: left; font-weight: 600;
  background: color-mix(in srgb, var(--text) 8%, transparent); transition: background .15s, transform .15s; }
.mus-link:hover { background: color-mix(in srgb, var(--accent) 30%, transparent); transform: scale(1.015); }
.mus-link img { width: 34px; height: 34px; border-radius: 9px; object-fit: cover; flex: none; }
.mus-link span { flex: 1; overflow-wrap: anywhere; }
.mus-link svg { width: 16px; height: 16px; fill: currentColor; opacity: .5; flex: none; }

/* Widgets */
.mus-widgets { display: grid; gap: 10px; margin-top: 18px; }
.mus-widget { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: calc(var(--radius) * .6); text-align: left; background: color-mix(in srgb, var(--text) 8%, transparent); min-width: 0; }
.mus-widget > img, .mus-wimg { position: relative; width: 52px; height: 52px; border-radius: 14px; object-fit: cover; flex: none; }
.mus-wimg img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.mus-wimg i { position: absolute; right: -2px; bottom: -2px; width: 16px; height: 16px; border-radius: 50%; border: 3px solid #1c1c2b; background: #80848e; }
.mus-wimg i.online { background: #23a55a; } .mus-wimg i.idle { background: #f0b232; } .mus-wimg i.dnd { background: #f23f43; }
.mus-wtext { flex: 1; min-width: 0; }
.mus-wtext strong, .mus-wtext small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mus-wtext small { font-size: 13px; opacity: .72; }
.mus-wbtn { flex: none; padding: 7px 14px; border-radius: 10px; font-size: 14px; font-weight: 600; background: var(--accent); color: #fff; }
.mus-embed { display: block; width: 100%; border: 0; border-radius: calc(var(--radius) * .6); background: #000; }
.mus-hint { font-size: 13px; opacity: .7; }

/* Audio player */
.mus-player { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 6px 12px; margin-top: 18px; padding: 12px 14px; border-radius: calc(var(--radius) * .6); background: color-mix(in srgb, var(--text) 8%, transparent); text-align: left; }
.mus-ptitle { grid-column: 1 / -1; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mus-pbtns { display: flex; gap: 2px; }
.mus-pbtns button { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; }
.mus-pbtns button:hover { background: color-mix(in srgb, var(--text) 12%, transparent); }
.mus-pbtns svg { width: 18px; height: 18px; fill: currentColor; }
.mus-pbar { height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--text) 18%, transparent); cursor: pointer; overflow: hidden; }
.mus-pbar i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 3px; }
.mus-ptime { font-size: 12px; opacity: .7; font-variant-numeric: tabular-nums; }

/* Volume control */
.mus-vol { position: absolute; top: 14px; left: 14px; z-index: 20; display: flex; align-items: center; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(0, 0, 0, .4); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: #fff; }
.mus-vol button { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; }
.mus-vol svg { width: 19px; height: 19px; fill: currentColor; }
.mus-vol input { width: 0; opacity: 0; margin: 0; transition: width .2s, opacity .2s, margin .2s; accent-color: var(--accent); }
.mus-vol:hover input, .mus-vol:focus-within input { width: 90px; opacity: 1; margin-right: 10px; }

/* Click to enter */
.mus-enter { position: absolute; inset: 0; z-index: 50; display: grid; place-items: center; width: 100%; background: rgba(0, 0, 0, .55); -webkit-backdrop-filter: blur(22px); backdrop-filter: blur(22px);
  color: #fff; font: 600 clamp(18px, 4vw, 24px) var(--font); letter-spacing: .02em; transition: opacity .5s; }
.mus-enter.is-leaving { opacity: 0; pointer-events: none; }
.mus-enter span { animation: mus-pulse 2.4s ease-in-out infinite; }
@keyframes mus-pulse { 50% { opacity: .55; } }

.mus-foot { flex: none; margin-top: 18px; display: flex; gap: 14px; font-size: 12.5px; color: #fff; opacity: .55; text-shadow: 0 1px 4px rgba(0, 0, 0, .6); }
.mus-foot a:hover, .mus-foot button:hover { text-decoration: underline; }
.mus-toast { position: absolute; left: 50%; bottom: 26px; z-index: 60; transform: translateX(-50%); padding: 9px 16px; border-radius: 999px; background: rgba(0, 0, 0, .85); color: #fff; font: 500 14px system-ui, sans-serif; }

/* Layouts */
.mus.layout-banner .mus-card { text-align: left; }
.mus.layout-banner .mus-avatar { margin: -54px 0 12px; border: 5px solid color-mix(in srgb, var(--bg) 80%, transparent); }
.mus.layout-banner .mus-head, .mus.layout-banner .mus-meta, .mus.layout-banner .mus-socials { justify-content: flex-start; }
.mus.layout-banner .mus-bio { margin-left: 0; }
.mus.layout-banner .mus-socials { margin-left: -8px; }

.mus.layout-compact .mus-card { max-width: 700px; display: grid; grid-template-columns: auto 1fr; column-gap: 22px; text-align: left; align-items: start; }
.mus.layout-compact .mus-banner { grid-column: 1 / -1; margin-bottom: 22px; }
.mus.layout-compact .mus-avatar { grid-row: span 4; margin: 0; width: 120px; height: 120px; border-radius: calc(var(--radius) * .8); }
.mus.layout-compact .mus-head, .mus.layout-compact .mus-meta, .mus.layout-compact .mus-socials { justify-content: flex-start; }
.mus.layout-compact .mus-bio { margin: 8px 0 0; }
.mus.layout-compact .mus-socials { margin-left: -8px; }
.mus.layout-compact .mus-card > :not(.mus-avatar):not(.mus-banner) { grid-column: 2; min-width: 0; }
.mus.layout-compact .mus-links, .mus.layout-compact .mus-widgets, .mus.layout-compact .mus-player { grid-column: 1 / -1 !important; }

.mus.layout-minimal .mus-card { background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.mus.layout-minimal .mus-name, .mus.layout-minimal .mus-bio, .mus.layout-minimal .mus-meta { text-shadow: 0 2px 14px rgba(0, 0, 0, .6); }

/* Username effects */
.mus.glow-name .mus-name, .mus-name.fx-glow { text-shadow: 0 0 12px var(--accent), 0 0 30px var(--accent); }
.mus-name.fx-gradient, .mus-name.fx-rainbow { -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; text-shadow: none !important; }
.mus-name.fx-gradient { background-image: linear-gradient(90deg, var(--grad-a), var(--grad-b)); }
.mus-name.fx-rainbow { background-image: linear-gradient(90deg, #ff5f6d, #ffc371, #7cf0c8, #5aa9ff, #c79bff, #ff5f6d); background-size: 300% 100%; animation: mus-rainbow 6s linear infinite; }
@keyframes mus-rainbow { to { background-position: 300% 0; } }
.mus-name.fx-fuzzy { animation: mus-fuzzy 1.6s steps(8) infinite; }
@keyframes mus-fuzzy {
  0%, 100% { filter: blur(0); text-shadow: 1px 0 0 color-mix(in srgb, var(--accent) 70%, transparent), -1px 0 0 rgba(255, 255, 255, .4); }
  30% { filter: blur(.6px); text-shadow: -2px 0 3px var(--accent), 2px 1px 3px rgba(255, 255, 255, .5); }
  60% { filter: blur(1.1px); text-shadow: 2px -1px 4px var(--accent), -2px 0 4px rgba(255, 255, 255, .4); }
  80% { filter: blur(.3px); }
}
.mus-name.fx-glitch::before, .mus-name.fx-glitch::after { content: attr(data-text); position: absolute; inset: 0; overflow: hidden; }
.mus-name.fx-glitch::before { color: var(--accent); transform: translate(2px, 0); clip-path: inset(0 0 55% 0); animation: mus-glitch 2.2s steps(2) infinite; }
.mus-name.fx-glitch::after { color: #5af2ff; transform: translate(-2px, 0); clip-path: inset(55% 0 0 0); animation: mus-glitch 1.7s steps(2) infinite reverse; }
@keyframes mus-glitch { 0%, 86%, 100% { opacity: 0; } 88% { opacity: .9; transform: translate(-3px, 1px); } 92% { opacity: .9; transform: translate(3px, -1px); } 96% { opacity: .9; transform: translate(-1px, 0); } }
.mus-spark { position: absolute; width: 10px; height: 10px; pointer-events: none; background: var(--accent); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); animation: mus-spark 1.2s ease-out forwards; }
@keyframes mus-spark { from { transform: scale(0) rotate(0); opacity: 1; } 50% { transform: scale(1) rotate(90deg); opacity: 1; } to { transform: scale(0) rotate(180deg); opacity: 0; } }
.mus-cursor-glow { position: absolute; z-index: 39; width: 340px; height: 340px; margin: -170px 0 0 -170px; border-radius: 50%; pointer-events: none; mix-blend-mode: screen;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 45%, transparent), transparent 65%); left: -999px; top: -999px; }

/* Template bar and report form */
.mus-bar { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 58; display: flex; align-items: center; gap: 14px; max-width: calc(100% - 24px); padding: 10px 10px 10px 18px;
  border-radius: 999px; background: #fff; color: #17133a; font: 500 14px system-ui, sans-serif; box-shadow: 0 10px 40px rgba(0, 0, 0, .4); }
.mus-bar a { flex: none; padding: 8px 16px; border-radius: 999px; background: #3d2eff; color: #fff; font-weight: 600; }
.mus-report { position: absolute; inset: 0; z-index: 55; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, .6); }
.mus-report form { width: min(420px, 100%); padding: 22px; border-radius: 18px; background: #fff; color: #17133a; font: 15px system-ui, sans-serif; }
.mus-report h2 { margin: 0 0 6px; font-size: 18px; }
.mus-report p { margin: 0 0 12px; opacity: .75; }
.mus-report textarea { width: 100%; min-height: 90px; padding: 10px; border: 1.5px solid #c9c6e8; border-radius: 10px; font: inherit; resize: vertical; }
.mus-report div { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.mus-report button { padding: 8px 16px; border-radius: 999px; font-weight: 600; color: #17133a; }
.mus-report button[type=submit] { background: #3d2eff; color: #fff; }

@media (max-width: 560px) {
  .mus-stage { padding: 60px 10px 16px; }
  .mus-card { padding: 26px 18px 20px; }
  .mus-banner { margin: -26px -18px 0; height: 120px; }
  .mus.layout-compact .mus-card { display: block; text-align: center; }
  .mus.layout-compact .mus-avatar { margin: 0 auto 14px; }
  .mus.layout-compact .mus-head, .mus.layout-compact .mus-meta, .mus.layout-compact .mus-socials { justify-content: center; }
  .mus.layout-compact .mus-bio { margin: 12px auto 0; }
}
@media (prefers-reduced-motion: reduce) {
  .mus *, .mus *::before, .mus *::after { animation: none !important; transition: none !important; }
}

/* A custom cursor applies to links and buttons too. */
.mus.has-cursor a, .mus.has-cursor button, .mus.has-cursor .mus-pbar { cursor: inherit; }
