/* Change the main colours here */
:root { --ink: #eef2fa; --soft: #b9c4d8; --dim: #7d88a0; --blue: #4d8dff; --glass: rgba(8, 12, 24, .5); --edge: rgba(160, 190, 255, .16); --display: "Instrument Serif", Georgia, serif; --font: Archivo, "Helvetica Neue", sans-serif; }
*, *::before, *::after { box-sizing: border-box; } * { margin: 0; }
html { background: #000; color-scheme: dark; -webkit-text-size-adjust: 100%; }
body { background: #000; color: var(--ink); font: 400 1rem/1.5 var(--font); -webkit-font-smoothing: antialiased; overflow: hidden; }
button, input { font: inherit; color: inherit; } button { cursor: pointer; background: none; border: 0; padding: 0; }
canvas { display: block; } [hidden] { display: none !important; } ul { list-style: none; padding: 0; }
:focus-visible { outline: 1px solid var(--blue); outline-offset: 4px; }
::selection { background: var(--blue); color: #000; }

/* album cover. If images/cover.jpg is missing, a plain blue cover shows instead */
.cover { position: relative; flex: none; display: block; aspect-ratio: 1; overflow: hidden; background: #0b1f57; }
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover .fake { position: absolute; inset: 0; display: none; flex-direction: column; justify-content: space-between; padding: 14%; background: linear-gradient(160deg, #3f7cff, #0b1f57 75%); }
.cover.missing .fake { display: flex; } .cover.missing img { display: none; }
.cover .fake b { font: 400 1.05rem/.9 var(--display); }

/* the whole screen: blurred album cover at the back, 3D coins over it, the card on top */
.stage { position: relative; height: 100svh; min-height: 36rem; overflow: hidden; isolation: isolate; }
.stage::before { content: ""; position: absolute; inset: -12%; z-index: -2; background: url(../images/bg.jpg) center / cover; will-change: transform; }
.stage::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(circle at 50% 45%, rgba(45,90,230,.2), transparent 55%), radial-gradient(ellipse at center, transparent 30%, rgba(0,0,0,.75) 100%); }
@media (prefers-reduced-motion: no-preference) {
  .stage::before { content: ""; position: absolute; inset: -12%; z-index: -2; background: url(../images/bg.jpg) center / cover; will-change: transform; }
  @keyframes drift { to { transform: scale(1.12) translate(2%, -2%) rotate(2deg); } }
}
/* pulls the cover's colours toward blue, with a soft spotlight falling from the top */
.tint { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 38% 70% at 50% -8%, rgba(150,190,255,.22), rgba(80,130,255,.08) 55%, transparent 75%),
    linear-gradient(180deg, rgba(10,25,80,.35), rgba(5,10,30,.15) 50%, rgba(0,0,0,.5)); }
.tint::before { content: ""; position: absolute; inset: 0; background: #1b3fa8; mix-blend-mode: color; opacity: .38; }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: pan-y; cursor: grab; }
.stage canvas:active { cursor: grabbing; }
.loading { position: absolute; left: 50%; top: 20%; translate: -50% 0; color: var(--dim); transition: opacity .6s; }
.loading.done { opacity: 0; }

/* enter screen: the blurred site behind, and one line of text */
.enter { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(0,0,0,.45); -webkit-backdrop-filter: blur(26px); backdrop-filter: blur(26px); transition: opacity .9s, visibility .9s; }
.enter.gone { opacity: 0; visibility: hidden; }
.enter-in { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; }
.ring.enter-ring { width: 7.5rem; height: 7.5rem; margin-bottom: 1.2rem; box-shadow: 0 0 60px rgba(77,141,255,.35); transition: scale .5s cubic-bezier(.2,.7,.2,1), box-shadow .5s; }
.enter-ring::before { opacity: 1; }
.enter-in:hover .enter-ring { scale: 1.05; box-shadow: 0 0 90px rgba(77,141,255,.55); }
@media (prefers-reduced-motion: no-preference) {
  .enter-ring { animation: bob 5s ease-in-out infinite; }
  @keyframes bob { 50% { translate: 0 -.5rem; } }
}
.enter-text { font: 400 clamp(2.4rem, 6vw, 3.6rem)/1 var(--display); letter-spacing: -.02em; text-shadow: 0 0 30px rgba(77,141,255,.5); transition: letter-spacing .5s, text-shadow .5s; }
.enter-in:hover .enter-text { letter-spacing: .01em; text-shadow: 0 0 40px rgba(77,141,255,.85); }
.enter-in small { color: var(--soft); font-size: .9rem; }

/* volume, top left */
.sound { position: absolute; z-index: 3; top: 1.2rem; left: 1.2rem; display: flex; align-items: center; gap: .3rem; padding: .3rem; border-radius: 999px; background: rgba(12,22,56,.78); border: 1px solid var(--edge);  }
.mute { width: 2.4rem; height: 2.4rem; display: grid; place-items: center; border-radius: 50%; color: var(--soft); transition: color .2s, background .2s; }
.mute:hover { color: var(--ink); background: rgba(255,255,255,.06); }
.mute svg { width: 1.2rem; height: 1.2rem; fill: currentColor; }
.sound input { width: 0; opacity: 0; accent-color: var(--ink); cursor: pointer; transition: width .35s cubic-bezier(.2,.7,.2,1), opacity .25s, margin .35s; }
.sound:hover input, .sound:focus-within input { width: 6.5rem; opacity: 1; margin-right: .6rem; }
@media (hover: none) { .sound input { width: 5.5rem; opacity: 1; margin-right: .6rem; } }

/* the profile card */
.profile { position: absolute; z-index: 2; left: 50%; top: 50%; translate: -50% -50%; width: min(23rem, calc(100% - 2.4rem)); display: flex; flex-direction: column; align-items: center; text-align: center; padding: 2.4rem 1.4rem 1.3rem; border-radius: 1.5rem; background: linear-gradient(180deg, rgba(22,36,88,.82), rgba(10,18,48,.86)); border: 1px solid transparent; box-shadow: 0 40px 100px rgba(0,0,0,.55), 0 0 80px rgba(60,110,255,.08);  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .5s cubic-bezier(.2,.7,.2,1); will-change: transform; overflow: hidden; }
.profile > * { position: relative; }
.profile > .shine { position: absolute; left: -16rem; top: -16rem; width: 32rem; height: 32rem; border-radius: 50%; background: radial-gradient(circle, rgba(120,165,255,.14), transparent 60%); pointer-events: none; will-change: transform; animation: none !important; z-index: 0; }
.profile::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; padding: 1px; pointer-events: none; background: linear-gradient(180deg, rgba(190,215,255,.45), rgba(160,190,255,.08) 40%, rgba(160,190,255,.04) 70%, rgba(120,160,255,.2)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.views { position: absolute; top: .95rem; left: 1.05rem; display: flex; align-items: center; gap: .35rem; color: var(--dim); font-size: .8rem; font-variant-numeric: tabular-nums; }
.views svg { width: 1rem; height: 1rem; fill: currentColor; }
.views b { color: var(--ink); font-weight: 500; }

/* avatar with a slow blue ring that turns while the song plays */
.ring { position: relative; display: grid; place-items: center; width: 6.3rem; height: 6.3rem; border-radius: 50%; }
.ring::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(#4d8dff, #9ec0ff, #1d4bc4, #4d8dff); opacity: .5; transition: opacity .6s; }
@media (prefers-reduced-motion: no-preference) { .ring::before { animation: turn 6s linear infinite paused; } .playing .ring::before, .enter-ring::before { animation-play-state: running; } }
@keyframes turn { to { rotate: 360deg; } }
.playing .ring::before { opacity: 1; }
.avatar { width: calc(100% - 6px); border-radius: 50%; box-shadow: 0 0 0 3px #070b16; }
.profile h1 { margin-top: .9rem; font: 400 3.3rem/.9 var(--display); letter-spacing: -.03em; text-shadow: 0 0 26px rgba(77,141,255,.6); }
.by { margin-top: .25rem; color: var(--soft); font-size: .95rem; }

/* links to the song and socials, with a label on hover. Each lights up in its own colour. */
.links { display: flex; gap: .35rem; margin-top: .85rem; }
.links a { position: relative; width: 2.6rem; height: 2.6rem; display: grid; place-items: center; border-radius: 50%; color: #c7d6f5; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07); transition: translate .2s, color .2s, background .2s, border-color .2s; }
.links svg { width: 1.25rem; height: 1.25rem; fill: currentColor; }
.links a:hover, .links a:focus-visible { translate: 0 -2px; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); border-color: color-mix(in srgb, var(--c) 40%, transparent); }
.spotify { --c: #1ed760; } .apple { --c: #fa3c5a; } .telegram { --c: #2aabee; } .discord { --c: #7983f5; }
.links a::after { content: attr(data-tip); position: absolute; bottom: calc(100% + .5rem); left: 50%; translate: -50% .3rem; padding: .3rem .6rem; border-radius: .5rem; background: rgba(4,7,14,.92); border: 1px solid var(--edge); color: var(--ink); font-size: .78rem; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .2s, translate .2s; }
.links a:hover::after, .links a:focus-visible::after { opacity: 1; translate: -50% 0; }

.bio { margin-top: .75rem; min-height: 1.5em; color: var(--soft); font-size: .92rem; }
.bio.lyrics { min-height: 3em; display: grid; place-items: center; color: var(--ink); font-size: 1rem; line-height: 1.45; text-wrap: balance; }
.bio.lyrics span::after { display: none; }
.bio.lyrics .rest { color: var(--dim); }
@media (prefers-reduced-motion: no-preference) {
  .bio.lyrics span { animation: line .5s cubic-bezier(.2,.7,.2,1) both; }
  @keyframes line { from { opacity: 0; translate: 0 .4em; filter: blur(4px); } }
}
.bio span::after { content: ""; display: inline-block; width: 1px; height: 1em; margin-left: 2px; vertical-align: -.12em; background: var(--soft); }

/* player */
.player { width: 100%; margin-top: 1.1rem; display: flex; align-items: center; gap: .8rem; padding: .7rem .8rem .55rem .7rem; border-radius: 1rem; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.06); text-align: left; }
.play { flex: none; position: relative; width: 2.8rem; height: 2.8rem; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #000; transition: background .2s, scale .15s; }
.play:hover { background: var(--blue); }
.play:active { scale: .94; }
.play svg { width: 1.2rem; height: 1.2rem; fill: currentColor; }
.play::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid var(--blue); opacity: 0; scale: calc(1 + var(--beat, 0) * .16); transition: opacity .3s; pointer-events: none; }
.playing .play::after { opacity: calc(.15 + var(--beat, 0) * .85); }
.track { flex: 1; min-width: 0; }

/* waveform of the real song. White is what has played. */
.wave { display: flex; align-items: center; gap: 2px; height: 2rem; cursor: pointer; position: relative; overflow: hidden; }
.wave i { flex: 1; min-width: 1px; height: calc(var(--h, .2) * 100%); border-radius: 1px; background: rgba(170,190,230,.25); transition: background .15s; }
.wave i.done { background: var(--ink); }
.wave i.here { background: var(--blue); }
.wave.flat { background: linear-gradient(rgba(170,190,230,.25), rgba(170,190,230,.25)) center / 100% 1px no-repeat; }
.wave.flat i { display: none; }
.wave .flatfill { position: absolute; left: 0; top: calc(50% - 1.5px); height: 3px; width: 0; background: var(--ink); display: none; }
.wave.flat .flatfill { display: block; }
.wave .ghost { position: absolute; top: -.3rem; bottom: -.3rem; width: 1px; background: var(--soft); opacity: 0; pointer-events: none; }
.wave:hover .ghost { opacity: .7; }
.times { display: flex; justify-content: space-between; gap: .6rem; margin-top: .2rem; color: var(--dim); font-size: .76rem; font-variant-numeric: tabular-nums; }
.mid { display: flex; align-items: center; gap: .4rem; min-width: 0; }
.eq { display: none; align-items: end; gap: 2px; height: .7rem; }
.eq i { width: 2px; height: 100%; border-radius: 1px; background: #9ec0ff; transform-origin: bottom; scale: 1 .35; }
.playing .eq { display: flex; }
@media (prefers-reduced-motion: no-preference) {
  .playing .eq i { animation: eq .9s ease-in-out infinite alternate; }
  .playing .eq i:nth-child(2) { animation-duration: .7s; animation-delay: -.3s; } .playing .eq i:nth-child(3) { animation-duration: 1.1s; animation-delay: -.6s; }
  @keyframes eq { to { scale: 1 1; } }
}
#state { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.playing #state { color: #9ec0ff; }
.err { color: #ff9a9a !important; }

.fan { position: absolute; z-index: 2; left: 0; right: 0; bottom: 1rem; text-align: center; color: rgba(185,196,216,.45); font-size: .78rem; }

/* the name writes itself in, one letter at a time, after you click enter */
#name span { display: inline-block; white-space: pre; }
@media (prefers-reduced-motion: no-preference) {
  .in #name span { animation: letter .8s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(.25s + var(--i) * .045s); }
  @keyframes letter { from { opacity: 0; translate: 0 .35em; filter: blur(6px); } }
}

/* a soft blue light that follows the cursor (computers only) */
.glow { position: fixed; z-index: 1; left: 0; top: 0; width: 34rem; height: 34rem; margin: -17rem 0 0 -17rem; border-radius: 50%; background: radial-gradient(circle, rgba(77,141,255,.12), transparent 65%); pointer-events: none; opacity: 0; transition: opacity .6s; }
.in .glow.on { opacity: 1; }

/* fine film grain over everything, so it doesn't look flat */
body::after { content: ""; position: fixed; inset: 0; z-index: 40; pointer-events: none; opacity: .07; background: 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='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* one entrance after you click enter */
@media (prefers-reduced-motion: no-preference) {
  .in .profile { animation: card 1.1s cubic-bezier(.2,.7,.2,1) both; }
  .in .profile > * { animation: rise .9s cubic-bezier(.2,.7,.2,1) both; }
  .in .profile > :nth-child(3) { animation-delay: .08s; } .in .profile > :nth-child(4) { animation-delay: .12s; } .in .profile > :nth-child(5) { animation-delay: .16s; }
  .in .profile > :nth-child(6) { animation-delay: .2s; } .in .profile > :nth-child(7) { animation-delay: .24s; }
  .in .sound, .in .fan { animation: rise 1s .3s cubic-bezier(.2,.7,.2,1) both; }
  @keyframes card { from { opacity: 0; scale: .94; } }
  @keyframes rise { from { opacity: 0; translate: 0 .8rem; } }
}

@media (max-width: 800px) {
  .profile { top: 61%; padding: 2.2rem 1.1rem 1.1rem; }
  .ring { width: 5.4rem; height: 5.4rem; }
  .profile h1 { font-size: 2.9rem; }
}

/* lyrics timing tool, only shown with ?sync on the address */
.sync { position: fixed; z-index: 45; right: 1rem; bottom: 1rem; width: min(22rem, calc(100% - 2rem)); padding: 1rem; border-radius: 1rem; background: rgba(8,14,36,.95); border: 1px solid var(--edge); display: grid; gap: .6rem; font-size: .9rem; }
.sync-head { font-weight: 500; }
.sync-tip { color: var(--soft); }
.sync-next { color: #9ec0ff; min-height: 2.6em; }
.sync button { min-height: 2.6rem; border-radius: .7rem; background: var(--ink); color: #000; font-weight: 500; }
.sync button:hover { background: var(--blue); }
.sync textarea { height: 9rem; resize: vertical; background: #050a18; color: var(--ink); border: 1px solid var(--edge); border-radius: .6rem; padding: .6rem; font: .8rem/1.5 ui-monospace, Menlo, monospace; }
