@font-face { font-family: "StatusFont"; src: url("../assets/fonts/fuente.otf") format("opentype"); font-display: swap; }
@font-face { font-family: "LL Circular"; font-weight: 500; font-display: swap;
  src: url("../assets/fonts/circular.woff2") format("woff2"), url("../assets/fonts/circular.otf") format("opentype"), url("../assets/fonts/circular.ttf") format("truetype"); }

:root {
  --bg:      #000000;
  --glass:   rgba(255, 255, 255, .035);
  --line:    rgba(255, 255, 255, .07);
  --text:    #e9e9ee;
  --muted:   #7b7b86;
  --glow:    0 0 14px rgba(255, 255, 255, .4);
  --perspective: 1000px;
  --card-max-width: 50rem;
  --card-min-height: 330px;
  --card-radius: 28px;
  --font-ui: "Unbounded", system-ui, sans-serif;
  --font: var(--font-ui);
  --font-status: "StatusFont", "Silkscreen", var(--font-ui);
  --font-count: "LL Circular", "Figtree", var(--font-ui);
  --font-name: "Syne", var(--font);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg); color: var(--text); font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  display: grid; place-items: center; padding: 24px; overflow: hidden;
}
:focus-visible { outline: 2px solid #fff; outline-offset: 4px; border-radius: 8px; }
html, body, * { -webkit-user-select: none; user-select: none; }
body { cursor: default; }

.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: var(--bg); pointer-events: none; }
#stars { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; opacity: 0; transition: opacity 3s ease; }
#stars.on { opacity: 1; }

.enter { position: fixed; inset: 0; z-index: 10; width: 100%; border: 0; display: grid; place-items: center;
  background: rgba(0,0,0,.72);
  color: var(--muted); font: 400 .95rem var(--font); letter-spacing: .04em; cursor: pointer;
  transition: opacity .8s ease, visibility .8s; }
.enter span { animation: breathe 2.6s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .35; } }
.enter.gone { opacity: 0; visibility: hidden; pointer-events: none; }

.card {
  position: relative;
  width: min(100%, var(--card-max-width)); min-height: var(--card-min-height);
  padding: 24px 38px 22px; display: flex; flex-direction: column; justify-content: space-between; gap: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,.052), rgba(255,255,255,.032) 38%, rgba(255,255,255,.03));
  border: 1px solid var(--line); border-radius: var(--card-radius);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.11), inset 0 -1px 0 rgba(0,0,0,.4),
              0 40px 90px -30px rgba(0,0,0,.85), 0 14px 32px -16px rgba(0,0,0,.7);
  transform: perspective(var(--perspective)) rotateX(0deg) rotateY(0deg);
  will-change: transform; touch-action: none;
  --gx: 50%; --gy: 50%;
}
.glow-clip { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; pointer-events: none; z-index: -1; }
.glow { position: absolute; left: 0; top: 0; width: 532px; height: 532px; border-radius: 50%; opacity: 0; will-change: transform, opacity;
  background: radial-gradient(closest-side, rgba(255,255,255,.07), rgba(255,255,255,0));
}

@keyframes unfold { from { opacity: 0; transform: translateY(-22px); } to { opacity: 1; transform: none; } }
.card > *:not(.glow-clip) { opacity: 0; }
body.ready .card > *:not(.glow-clip) { animation: unfold .7s cubic-bezier(.2,.72,.12,1) both; }
body.ready .card > :nth-child(2) { animation-delay: .6s; }
body.ready .card > :nth-child(3) { animation-delay: .9s; }

.main { display: flex; align-items: center; gap: 24px; }
.avatar { width: 96px; height: 96px; flex: none; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,.14); }
svg.avatar { border: 0; border-radius: 0; fill: #4d4d55; }
.who { min-width: 0; }
.name-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
h1 { margin: 0; font-family: var(--font-name); font-size: 2.6rem; font-weight: 800; letter-spacing: .02em; line-height: 1.1; color: var(--text); text-shadow: var(--glow); }
body:not(.ready) h1 { opacity: 0; }
body.ready h1 { animation: name-in 1.3s cubic-bezier(.2, .7, .2, 1) .25s backwards; }
@keyframes name-in {
  from { opacity: 0; filter: blur(12px); transform: translateY(12px); }
  60%  { filter: blur(2px); }
  to   { opacity: 1; filter: blur(0);    transform: none; }
}
.badges, .views { font-family: var(--font-ui); }
.badges { display: flex; align-items: center; gap: 9px; padding: 6px 13px; border-radius: 25px;
  background: rgba(255,255,255,.06); border: 2px solid rgba(255,255,255,.04); }
.badges svg { width: 22px; height: 22px; display: block; fill: #fff; stroke: none; color: #fff; }
.badge { position: relative; display: flex; cursor: default; }
.badge svg { transition: transform .2s ease; }
.badge:hover svg { transform: translateY(-1px) scale(1.12); }
.status { margin: 8px 0 0; font-family: var(--font-status); color: var(--muted); font-size: 1rem; letter-spacing: .06em; min-height: 1.3em; }
.status::after { content: "|"; margin-left: 1px; opacity: 1; animation: cursor-blink .35s ease-in-out infinite; }
.status.typing::after { animation: none; opacity: 1; }
@keyframes cursor-blink { 0%, 20% { opacity: 1; } 55%, 70% { opacity: 0; } 100% { opacity: 1; } }

.player { display: none; flex-direction: row; align-items: center; gap: 16px; padding: 10px 16px; border-radius: 20px;
  background: rgba(255,255,255,.045); border: 1px solid var(--line); box-shadow: inset 0 1px 0 rgba(255,255,255,.035); }
.player.available { display: flex; }
.cover { flex: none; width: 76px; height: 76px; border-radius: 10px; overflow: hidden; display: grid; place-items: center;
  background: linear-gradient(145deg, #1d1d26, #101015); border: 1px solid var(--line); color: var(--muted);
  box-shadow: 0 6px 14px -8px rgba(0,0,0,.8); }
.cover > * { grid-area: 1 / 1; }
.cover .fresh { animation: cover-in .4s ease both; }
@keyframes cover-in { from { opacity: 0; } to { opacity: 1; } }
.cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover svg { width: 34px; height: 34px; fill: currentColor; }
.player-main { flex: 1; min-width: 0; height: 76px; display: flex; flex-direction: column; justify-content: space-between; gap: 8px; }
.player-top { display: flex; align-items: center; gap: 14px; height: 52px; }
.track { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; }
.track-sub { flex: 1 1 0; min-width: 0; margin: 0; color: var(--muted); font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: opacity .18s ease; }
.track-sub.swap { opacity: 0; }
.controls { display: flex; align-items: center; gap: 0; flex: none; margin-right: 36px; }
.pbtn { display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: none; color: #fff;
  cursor: pointer; opacity: .8; transition: opacity .2s ease, transform .2s ease; }
.pbtn:hover { opacity: 1; transform: scale(1.1); }
.pbtn svg { width: 24px; height: 24px; fill: currentColor; stroke: none; }
.pbtn.play { width: 42px; height: 42px; background: #a6a6ad; color: #0b0b0e; opacity: 1; }
.pbtn.play:hover { transform: scale(1.07); }
.pbtn.play svg { width: 22px; height: 22px; }
.progress { display: flex; align-items: center; gap: 12px; }
.time { flex: none; min-width: 2.7em; color: var(--muted); font-size: .75rem; font-variant-numeric: tabular-nums; }
.time:last-child { text-align: right; }
.progress input { --fill: 0%; --buf: 0%; -webkit-appearance: none; appearance: none; flex: 1; width: 0; min-width: 0; height: 16px; margin: 0; background: transparent; cursor: default; outline: none; }
.progress input::-webkit-slider-runnable-track { height: 4px; border-radius: 4px;
  background: linear-gradient(to right, #fff var(--fill), rgba(255,255,255,.3) var(--fill), rgba(255,255,255,.3) var(--buf), rgba(255,255,255,.18) var(--buf)); }
.progress input::-moz-range-track { height: 4px; border-radius: 4px; background: linear-gradient(to right, rgba(255,255,255,.3) var(--buf), rgba(255,255,255,.18) var(--buf)); }
.progress input::-moz-range-progress { height: 4px; border-radius: 4px; background: #fff; }
.progress input::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; margin-top: -4px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 0 8px rgba(255,255,255,.4); transition: transform .15s ease; }
.progress input::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 0 8px rgba(255,255,255,.4); transition: transform .15s ease; }
.progress input:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px rgba(255,255,255,.25); }
.progress input:hover::-webkit-slider-thumb, .progress input:active::-webkit-slider-thumb { transform: scale(1.25); }
.progress input:hover::-moz-range-thumb, .progress input:active::-moz-range-thumb { transform: scale(1.25); }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes busy-pulse { 50% { opacity: .45; } }
.pbtn.play { position: relative; }
.pbtn.play svg { transition: opacity .15s ease; }
.pbtn.play::after { content: ""; position: absolute; top: 50%; left: 50%; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%;
  border: 2px solid rgba(11,11,14,.22); border-top-color: #0b0b0e; opacity: 0; pointer-events: none;
  animation: spin .8s linear infinite paused; transition: opacity .15s ease; }
.player.busy .pbtn.play svg { opacity: 0; }
.player.busy .pbtn.play::after { opacity: 1; animation-play-state: running; }
.player.busy .progress input { animation: busy-pulse 1.2s ease-in-out infinite; }

.foot { display: grid; grid-template-columns: 1fr auto; align-items: center; }
.foot .views { grid-column: 1; grid-row: 1; }
.foot .links { grid-column: 2; grid-row: 1; justify-self: end; margin-right: 17px; }
.views { position: relative; justify-self: start; display: inline-flex; align-items: center; gap: 10px; cursor: default;
  margin: 0 0 0 17px;
  color: #fff; font-size: 1.05rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums;
  transition: color .25s ease; }
.views svg { width: 26px; height: 26px; flex: none; color: inherit; stroke: none; }
.views:hover { color: #a7a7b1; }

.views::after, .badge::after {
  content: attr(data-tip);
  position: absolute; left: 50%; bottom: calc(100% + 12px); z-index: 20;
  padding: 9px 16px; border-radius: 14px; white-space: nowrap;
  background: rgba(18, 18, 22, .94); border: 1px solid var(--line);
  box-shadow: 0 12px 30px -8px rgba(0,0,0,.7);
  color: #fff; font-size: .85rem; font-weight: 500; letter-spacing: .01em;
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translate(-50%, 6px) scale(.96); transform-origin: 50% 100%;
  transition: opacity .2s ease, transform .25s cubic-bezier(.2,.8,.2,1), visibility 0s linear .25s;
}
.views:hover::after, .badge:hover::after { opacity: 1; visibility: visible; transform: translate(-50%, 0) scale(1); transition-delay: 0s; }
.views:not([data-tip])::after, .views[data-tip=""]::after, .badge:not([data-tip])::after, .badge[data-tip=""]::after { display: none; }

.links { display: flex; justify-content: flex-end; align-items: center; gap: 22px; }
.links a { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; color: #c4c4cc;
  background: linear-gradient(145deg, rgba(255,255,255,.08), rgba(255,255,255,.025)); border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
  transition: color .2s, background .2s, border-color .2s, box-shadow .2s, transform .2s; }
.links a:hover, .links a:focus-visible { color: #fff; transform: translateY(-2px); border-color: rgba(255,255,255,.24);
  background: linear-gradient(145deg, rgba(255,255,255,.15), rgba(255,255,255,.05));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 8px 18px -8px rgba(0,0,0,.8), 0 0 14px rgba(255,255,255,.07); }
.links svg { width: 22px; height: 22px; fill: currentColor; stroke: none; }

.sound-wrap { position: fixed; left: 16px; top: 16px; z-index: 5; display: none; align-items: center;
  border-radius: 16px; background: rgba(255,255,255,.04); color: var(--muted); transition: background .2s, color .2s; }
body.ready .sound-wrap.available { display: flex; }
.sound-wrap:hover { background: rgba(255,255,255,.08); color: var(--text); }
.sound { flex: none; width: 58px; height: 58px; display: grid; place-items: center; border: 0; border-radius: 16px; background: none; color: inherit; cursor: pointer; }
.sound svg { width: 26px; height: 26px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.volume { width: 0; opacity: 0; overflow: hidden; transition: width .3s cubic-bezier(.2,.8,.2,1) .15s, opacity .2s ease .15s; }
.sound-wrap:hover .volume, .sound-wrap:has(:focus-visible) .volume { width: 150px; opacity: 1; transition-delay: 0s; }
.volume input { --fill: 40%; -webkit-appearance: none; appearance: none; display: block; width: 110px; height: 20px; margin: 0 20px 0 2px; background: transparent; cursor: pointer; outline: none; }
.volume input::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(to right, #fff var(--fill), rgba(255,255,255,.18) var(--fill)); }
.volume input::-moz-range-track { height: 4px; border-radius: 4px; background: rgba(255,255,255,.18); }
.volume input::-moz-range-progress { height: 4px; border-radius: 4px; background: #fff; }
.volume input::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -5px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 0 8px rgba(255,255,255,.4); }
.volume input::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 0 8px rgba(255,255,255,.4); }
.volume input:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px rgba(255,255,255,.25); }
.volume input:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 4px rgba(255,255,255,.25); }

@media (max-width: 560px) {
  .links { gap: 12px; } .links a { width: 42px; height: 42px; } .links svg { width: 20px; height: 20px; }
  .foot .links { margin-right: 6px; }
}
@media (max-width: 480px) {
  .views { margin: 0 0 0 16px; }
  h1 { font-size: 1.7rem; } .avatar { width: 72px; height: 72px; } .main { gap: 16px; } .card { padding: 22px; min-height: 280px; }
  .player { gap: 12px; padding: 10px 12px; } .cover { width: 56px; height: 56px; }
  .player-main { height: auto; gap: 6px; } .player-top { height: auto; flex-wrap: wrap; row-gap: 2px; } .track { flex: 1 1 100%; }
  .controls { margin: 0 auto; }
  .badges { gap: 6px; padding: 6px 10px; } .name-row { gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .enter span { animation: none; }
  .cover .fresh { animation: none; }
  .track-sub { transition: none; }
  .player.busy .progress input { animation: none; }
}

.protected img, .protected .avatar { -webkit-user-drag: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }

.views, .views *, .views::after, .player, .player *, .badges, .badges *, .badge::after { font-family: var(--font-ui) !important; }
#viewCount { font-family: var(--font-count) !important; font-weight: 500; }
