@font-face {
  font-family: Satoshi;
  src: url("assets/satoshi.woff2") format("woff2");
  font-weight: 300 900;
  font-display: swap;
}

:root {
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.68);
  --soft: rgba(255, 255, 255, 0.42);
  --panel: rgba(20, 20, 22, 0.36);
  --panel-strong: rgba(20, 20, 20, 0.56);
  --border: rgba(255, 255, 255, 0.055);
  --border-soft: rgba(255, 255, 255, 0.105);
  --shadow: 0 18px 70px rgba(0, 0, 0, 0.2);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #080808;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family: Satoshi, Onest, Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
  cursor: url("assets/cursor.webp") 16 16, auto;
}

button,
input,
a {
  font: inherit;
}

button {
  cursor: inherit;
}

::selection {
  background: #ffffff;
  color: #080808;
}

.background {
  position: fixed;
  inset: -18px;
  z-index: -3;
  background: url("assets/background.webp") center / cover;
  filter: blur(7px);
  transform: scale(1.025);
}

.background::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 50% 49%, rgba(255, 255, 255, 0.04), transparent 29%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.64)),
    rgba(8, 8, 8, 0.26);
}

.page {
  width: min(100% - 32px, 640px);
  min-height: 100svh;
  margin: 0 auto;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.profile-card,
.player,
.volume {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.profile-card {
  position: relative;
  width: 100%;
  min-height: 508px;
  padding: 28px 15px 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border-color: rgba(255, 255, 255, 0.025);
  background: linear-gradient(180deg, rgba(12, 12, 13, 0.39), rgba(29, 27, 31, 0.46));
  box-shadow: 0 26px 90px rgba(0, 0, 0, 0.22);
  opacity: 0;
  transform: translateY(28px) scale(0.96);
  animation: reveal 0.75s ease 0.12s forwards;
}

.avatar-wrap {
  position: relative;
  width: 130px;
  height: 130px;
  margin-bottom: 7px;
}

.avatar,
.avatar-decoration {
  position: absolute;
  display: block;
}

.avatar {
  inset: 8px;
  width: calc(100% - 16px);
  height: calc(100% - 16px);
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(27, 27, 27, 0.4);
}

.avatar-decoration {
  width: 116%;
  left: -8%;
  top: -7%;
  z-index: 2;
  pointer-events: none;
}

h1,
h2,
p {
  margin: 0;
}

.profile-card h1 {
  font-size: 35px;
  line-height: 1.05;
  font-weight: 600;
  text-shadow: 0 0 16px #ffffff;
}

.tagline {
  margin-top: 10px;
  font-size: 18px;
  font-weight: 570;
  color: var(--text);
}

.location {
  margin-top: 23px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text);
  font-size: 15px;
  font-weight: 450;
}

.location svg {
  width: 18px;
  height: 18px;
  filter: drop-shadow(0 0 5px #ffffff);
}

.discord-card {
  width: min(100%, 304px);
  min-height: 98px;
  margin-top: 24px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.09);
  text-align: left;
}

.presence-avatar {
  position: relative;
  width: 62px;
  height: 62px;
  flex: 0 0 62px;
}

.presence-avatar > img:first-child {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(27, 27, 27, 0.15);
}

.presence-avatar .status {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 20px;
  height: 20px;
}

.presence-info {
  min-width: 0;
  flex: 1;
}

.discord-name {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-size: 18px;
  font-weight: 550;
  white-space: nowrap;
}

.discord-name > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.guild-tag {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 4px;
  border-radius: 8px;
  border: 2px solid rgba(255, 255, 255, 0.04);
  background: rgba(255, 255, 255, 0.08);
  font-size: 11px;
}

.guild-tag img {
  width: 15px;
  height: 15px;
}

.badge {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.presence-info p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

.socials {
  width: 100%;
  margin-top: 27px;
  display: flex;
  justify-content: center;
  gap: 16px;
}

.icon-button {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--text);
  transition: transform 0.18s ease, background 0.18s ease;
}

.icon-button:hover,
.icon-button:focus-visible {
  background: rgba(255, 255, 255, 0.07);
  transform: translateY(-2px);
  outline: none;
}

.icon-button svg {
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 0 8px #ffffff);
}

.player {
  width: 100%;
  min-height: 96px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 15px;
  border-color: rgba(255, 255, 255, 0.018);
  border-radius: 16px;
  background: rgba(24, 23, 26, 0.45);
  box-shadow: none;
  opacity: 0;
  transform: translateY(32px) scale(0.96);
  animation: reveal 0.75s ease 0.24s forwards;
}

.track-icon {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  display: grid;
  place-items: center;
  border-radius: calc(var(--radius) - 10px);
  background: rgba(255, 255, 255, 0.2);
}

.track-icon svg {
  width: 48px;
  height: 48px;
}

.track-main {
  min-width: 0;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "title title"
    "timeline controls";
  column-gap: 16px;
  align-items: center;
}

.track-main h2 {
  grid-area: title;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 17px;
  font-weight: 500;
}

.timeline {
  grid-area: timeline;
  margin-top: 11px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 16px;
  font-weight: 400;
}

.timeline span {
  width: 38px;
}

.timeline span:last-child {
  text-align: right;
}

input[type="range"] {
  width: 100%;
  height: 18px;
  margin: 0;
  appearance: none;
  background: transparent;
  accent-color: #ffffff;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffffff var(--progress, 0%), rgba(255, 255, 255, 0.3) var(--progress, 0%));
}

input[type="range"]::-webkit-slider-thumb {
  width: 9px;
  height: 9px;
  margin-top: -3.5px;
  appearance: none;
  border-radius: 50%;
  background: #ffffff;
  opacity: 0;
}

input[type="range"]:hover::-webkit-slider-thumb,
input[type="range"]:focus-visible::-webkit-slider-thumb {
  opacity: 1;
}

input[type="range"]::-moz-range-track {
  height: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.3);
}

input[type="range"]::-moz-range-progress {
  height: 2px;
  border-radius: 999px;
  background: #ffffff;
}

input[type="range"]::-moz-range-thumb {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 50%;
  background: #ffffff;
}

.controls {
  grid-area: controls;
  margin-top: 0;
  margin-left: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.controls button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.18s ease, transform 0.18s ease;
}

.controls button:hover,
.controls button:focus-visible {
  color: #ffffff;
  transform: translateY(-1px);
  outline: none;
}

.controls svg {
  width: 26px;
  height: 26px;
}

.controls .play {
  width: 42px;
  height: 42px;
  color: #ffffff;
}

.controls .play svg {
  width: 34px;
  height: 34px;
}

.pause-icon,
.is-playing .play-icon {
  display: none;
}

.is-playing .pause-icon {
  display: block;
}

.volume {
  position: fixed;
  top: 15px;
  left: 15px;
  z-index: 5;
  width: 60px;
  height: 60px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 15px;
  overflow: hidden;
  border-color: rgba(255, 255, 255, 0.035);
  background: rgba(10, 10, 10, 0.48);
  transition: width 0.32s ease;
}

.volume:hover,
.volume:focus-within {
  width: 172px;
}

.volume svg {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
}

.volume input {
  min-width: 90px;
}

.views {
  position: absolute;
  left: 15px;
  bottom: 15px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text);
  font-size: 14px;
  font-weight: 550;
}

.views svg {
  width: 19px;
  height: 19px;
}

.uid {
  position: fixed;
  right: 15px;
  bottom: 12px;
  z-index: 4;
  display: none;
  padding: 8px 11px;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  background: rgba(20, 20, 20, 0.39);
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.enter-screen {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  border: 0;
  background: rgba(8, 8, 8, 0.92);
  color: #ffffff;
  transition: opacity 0.38s ease, visibility 0.38s ease;
}

.enter-screen span {
  font-size: clamp(22px, 4vw, 30px);
  font-weight: 700;
}

.enter-screen.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  z-index: 20;
  max-width: calc(100vw - 32px);
  padding: 10px 14px;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  background: var(--panel-strong);
  color: #ffffff;
  font-size: 13px;
  opacity: 0;
  transform: translate(-50%, 14px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@keyframes reveal {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 560px) {
  .page {
    width: min(100% - 24px, 420px);
    padding-top: 86px;
  }

  .profile-card {
    padding: 28px 13px;
  }

  .profile-card h1 {
    font-size: 36px;
  }

  .tagline {
    font-size: 17px;
  }

  .discord-card,
  .player {
    align-items: flex-start;
  }

  .track-icon {
    width: 56px;
    height: 56px;
    flex-basis: 56px;
  }

  .track-icon svg {
    width: 39px;
    height: 39px;
  }

  .timeline {
    gap: 7px;
    font-size: 14px;
  }

  .volume:hover,
  .volume:focus-within {
    width: 58px;
  }

  .uid {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
