@font-face {
  font-family: "Silkscreen";
  src: url("../assets/Silkscreen-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Silkscreen";
  src: url("../assets/Silkscreen-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --accent: #7260bf;
  --accent-soft: rgba(114, 96, 191, 0.65);
  --icon-color: #481c7d;
  --widget-bg: rgba(114, 96, 191, 0.07);
  --widget-border: rgba(114, 96, 191, 0.05);
  --player-bar: rgba(114, 96, 191, 0.3);
  --card-border: rgba(255, 255, 255, 0.3);
  --fade-duration: 280ms;
  --container-width: 44rem;
  --container-padding: 26px;
  --container-radius: 20px;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
  /* Match the main screen background: same poster, no blur, same shade. */
}

@property --fill {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 0%;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: #000;
  color: #fafafa;
  font-family: "Silkscreen", monospace;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  overflow-x: hidden;
  cursor: url("../assets/cursor.webp") 16 16, auto;
}

a,
button,
input[type="range"] {
  cursor: url("../assets/cursor.webp") 16 16, pointer;
}

::selection {
  background: #7260bf;
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  fill: currentColor;
  vertical-align: -0.125em;
}

/* Background */
.background-video {
  position: fixed;
  top: -6vh;
  left: -6vw;
  width: 112vw;
  height: 112vh;
  object-fit: cover;
  z-index: 0;
  background-color: #000;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 1400ms var(--ease-soft), transform 2400ms var(--ease-out-expo);
  will-change: opacity, transform;
}

.background-video.ready {
  opacity: 1;
  transform: scale(1);
}

.backdrop-shade {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.55);
}

/* Entry screen: transparent so the same video and .backdrop-shade that are
   used on the main page show through before the click. */
.entry-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  text-align: center;
  background: transparent;
  transition: opacity var(--fade-duration) ease,
    transform var(--fade-duration) ease, visibility var(--fade-duration) ease;
}

.entry-screen > * {
  position: relative;
  z-index: 1;
}

.entry-icon {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  object-fit: cover;
  animation: float 4s ease-in-out infinite, entryPop 900ms var(--ease-spring) backwards;
}

.entry-text {
  max-width: min(1200px, calc(100% - 40px));
  color: #fafafa;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
  animation: entryTextIn 900ms var(--ease-out-expo) backwards,
    softGlow 3.2s ease-in-out infinite 900ms;
}

.entry-screen:hover .entry-icon {
  animation: float 4s ease-in-out infinite, hoverLift 300ms var(--ease-out-expo) forwards;
}

.entry-screen.leaving {
  opacity: 0;
  visibility: hidden;
  transform: scale(1.02);
  pointer-events: none;
}

.entry-screen.leaving .entry-icon {
  animation: entryOut var(--fade-duration) var(--ease-out-expo) both;
}

.entry-screen.leaving .entry-text {
  animation: entryTextOut var(--fade-duration) var(--ease-out-expo) both;
}

.entry-screen[hidden] {
  display: none;
}

/* Page layout */
.page {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, var(--container-width));
  align-content: center;
  justify-content: center;
  gap: 24px;
  flex: 1 0 auto;
  min-height: 0;
  padding: 72px 16px 40px;
}

.page[hidden] {
  display: none;
}

.content-wrap {
  width: 100%;
  max-width: var(--container-width);
  display: flex;
  flex-direction: column;
  gap: 15px;
  transform: perspective(1000px) rotateX(0deg) rotateY(0deg);
  transition: none;
  will-change: transform;
}

.side-panel-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: stretch;
  min-width: 0;
  perspective: 1000px;
  transform-style: preserve-3d;
}

.side-panel {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  justify-self: center;
  padding: 14px;
  border: 2px solid var(--card-border);
  border-radius: var(--container-radius);
  background: rgba(18, 18, 26, 0.55);
  -webkit-backdrop-filter: blur(0);
  backdrop-filter: blur(0);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
  animation: none;
  transition: none;
  transform-origin: center center;
  will-change: transform;
}

.side-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 14px;
}

.side-panel-title {
  color: #fafafa;
  font-family: "Silkscreen", monospace;
  font-size: 14px;
  letter-spacing: 0.04em;
}

.side-panel-subtitle {
  color: rgba(250, 250, 250, 0.6);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.side-panel-slot {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 220px;
}

.side-panel-fallback {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  min-width: 0;
}

.fallback-top {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.fallback-avatar {
  flex: 0 0 54px;
  width: 54px;
  height: 54px;
  border-radius: 14px;
  object-fit: cover;
}

.fallback-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.fallback-name {
  color: #fafafa;
  font-size: 18px;
  line-height: 1.2;
}

.fallback-stats {
  color: rgba(250, 250, 250, 0.6);
  font-size: 11px;
  line-height: 1.35;
}

.fallback-link {
  align-self: flex-start;
  margin-top: 2px;
  color: var(--accent);
  font-size: 12px;
  text-decoration: none;
}

.fallback-link:hover,
.fallback-link:focus-visible {
  text-decoration: underline;
}

.fallback-status {
  margin: 0;
  color: rgba(250, 250, 250, 0.6);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.side-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    320px circle at var(--spot-x, 50%) var(--spot-y, 50%),
    rgba(114, 96, 191, 0.08),
    transparent 55%
  );
  opacity: 0;
  pointer-events: none;
  transition: opacity 420ms ease;
  z-index: 0;
}

.side-panel:hover::before {
  opacity: 1;
}

.side-panel > * {
  position: relative;
  z-index: 1;
}

.side-panel .lastfm-now-widget {
  --widget-width: 100%;
  width: 100%;
  height: 100%;
  max-width: 100%;
  flex: 1;
  animation: widgetIn 720ms var(--ease-out-expo) 120ms backwards;
}

@keyframes widgetIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.99);
  }

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

.side-panel-placeholder {
  display: grid;
  place-items: center;
  min-height: 220px;
  margin: 0;
  color: rgba(250, 250, 250, 0.65);
  font-size: 13px;
  text-align: center;
}

.side-panel-placeholder.is-error {
  color: #df9b32;
}

/* The phone build keeps the same widget inside the profile card. */
.lastfm-widget {
  align-items: stretch;
}

.lastfm-widget .widget-label {
  justify-content: flex-start;
}

.lastfm-widget .widget-subtitle {
  margin-left: auto;
  color: rgba(250, 250, 250, 0.6);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: none;
}

.lastfm-widget-slot {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 220px;
}

.lastfm-widget .lastfm-now-widget {
  --widget-width: 100%;
  width: 100%;
  max-width: 100%;
  flex: 1;
  animation: widgetIn 720ms var(--ease-out-expo) 120ms backwards;
}

.lastfm-widget .side-panel-placeholder {
  min-height: 220px;
}

@keyframes sidePanelIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.97);
  }

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

@keyframes pop-in {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(18px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes float {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -6px;
  }
}

@keyframes entryTextIn {
  from {
    opacity: 0;
    transform: translateY(14px);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes entryPop {
  from {
    opacity: 0;
    transform: scale(0.7) rotate(-8deg);
  }
  to {
    opacity: 1;
    transform: scale(1) rotate(0);
  }
}

@keyframes hoverLift {
  to {
    scale: 1.06;
    filter: drop-shadow(0 0 18px rgba(114, 96, 191, 0.75));
  }
}

@keyframes softGlow {
  0%,
  100% {
    text-shadow: 0 0 8px rgba(250, 250, 250, 0.2);
  }
  50% {
    text-shadow: 0 0 22px rgba(114, 96, 191, 0.9);
  }
}

@keyframes entryOut {
  to {
    opacity: 0;
    transform: scale(1.25) rotate(6deg);
    filter: blur(6px);
  }
}

@keyframes entryTextOut {
  to {
    opacity: 0;
    transform: translateY(-14px);
    filter: blur(4px);
  }
}

@keyframes windowIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
    filter: blur(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

.page.entered .volume-control {
  animation: fadeIn 260ms ease 20ms backwards;
}

.page.entered .profile-card {
  animation: windowIn 340ms var(--ease-out-expo) 40ms backwards;
}

.page.entered .avatar-wrap {
  animation: headIn 300ms var(--ease-spring) 70ms backwards;
}

.page.entered .identity {
  animation: headIn 300ms var(--ease-out-expo) 110ms backwards;
}

.page.entered .player-card {
  animation: windowIn 340ms var(--ease-out-expo) 150ms backwards;
}

.page.entered .widget {
  animation: windowIn 320ms var(--ease-out-expo) 100ms backwards;
}

.page.entered .widget:nth-child(2) {
  animation-delay: 140ms;
}

.page.entered .side-panel-wrap {
  animation: windowIn 360ms var(--ease-out-expo) 190ms backwards;
}

.page.entered .social-link {
  animation: iconIn 280ms var(--ease-spring) 150ms backwards;
}

.page.entered .social-link:nth-child(1) { animation-delay: 150ms; }
.page.entered .social-link:nth-child(2) { animation-delay: 190ms; }
.page.entered .social-link:nth-child(3) { animation-delay: 230ms; }
.page.entered .social-link:nth-child(4) { animation-delay: 270ms; }
.page.entered .social-link:nth-child(5) { animation-delay: 310ms; }
.page.entered .social-link:nth-child(6) { animation-delay: 350ms; }

.page.entered .profile-footer {
  animation: fadeIn 300ms ease 240ms backwards;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes headIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes iconIn {
  from {
    opacity: 0;
    transform: scale(0.4) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Volume */
.volume-control {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  transition: background 200ms ease, box-shadow 200ms ease;
}

.volume-control:hover,
.volume-control:focus-within {
  background: rgba(0, 0, 0, 0.55);
  box-shadow: 0 0 18px rgba(114, 96, 191, 0.35);
}

.volume-control[hidden] {
  display: none;
}

.volume-button {
  width: 34px;
  height: 34px;
  transition: transform 220ms var(--ease-spring), color 220ms ease;
}

.volume-button:hover,
.volume-button:focus-visible {
  transform: scale(1.12);
  color: var(--accent);
}

.volume-button .icon {
  width: 20px;
  height: 20px;
}

.volume-slider {
  width: 0;
  opacity: 0;
  transition: width 300ms var(--ease-out-expo), opacity 300ms ease;
}

.volume-control:hover .volume-slider,
.volume-control:focus-within .volume-slider {
  width: 96px;
  opacity: 1;
}

/* Cards */
.profile-card,
.player-card {
  background: rgba(18, 18, 26, 0.55);
  -webkit-backdrop-filter: blur(0);
  backdrop-filter: blur(0);
  border: 2px solid var(--card-border);
  border-radius: var(--container-radius);
  padding: var(--container-padding);
  transition: border-color 300ms ease, box-shadow 400ms ease, transform 500ms var(--ease-out-expo);
}

.profile-card {
  position: relative;
  overflow: hidden;
}

.profile-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    420px circle at var(--spot-x, 50%) var(--spot-y, 50%),
    rgba(114, 96, 191, 0.16),
    transparent 60%
  );
  opacity: 0;
  transition: opacity 400ms ease;
  pointer-events: none;
  z-index: 0;
}

.profile-card:hover::before {
  opacity: 1;
}

.profile-card > * {
  position: relative;
  z-index: 1;
}

.profile-card:hover {
  transform: translateY(-4px);
  border-color: rgba(114, 96, 191, 0.75);
  box-shadow: 0 0 36px rgba(114, 96, 191, 0.18);
}

.profile-head {
  display: flex;
  align-items: flex-start;
  gap: 18px;
}

.avatar-wrap {
  position: relative;
  flex: 0 0 88px;
  width: 88px;
  height: 88px;
}

.avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 35%;
  transition: transform 500ms var(--ease-spring), filter 500ms ease;
}

.profile-head:hover .avatar {
  transform: scale(1.05) rotate(-2deg);
  filter: drop-shadow(0 0 16px rgba(114, 96, 191, 0.7));
}

.avatar-decoration {
  position: absolute;
  inset: -9%;
  width: 118%;
  height: 118%;
  pointer-events: none;
  transition: transform 700ms var(--ease-out-expo);
}

.profile-head:hover .avatar-decoration {
  transform: rotate(8deg) scale(1.04);
}

.identity {
  min-width: 0;
  flex: 1;
}

.username-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.username {
  display: inline-flex;
  align-items: baseline;
  font-size: 36px;
  font-weight: 600;
  line-height: 41px;
  color: #fafafa;
  text-shadow: 0 0 16.5px #7260bf;
}

.username-text {
  white-space: nowrap;
}

.username-cursor {
  color: #fafafa;
  font-weight: 600;
  margin-left: 1px;
  animation: blink 1s infinite;
}

@keyframes blink {
  0% {
    opacity: 0;
  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

.description {
  margin: 10px 0 6px;
  font-size: 15px;
  line-height: 1.5;
  color: #e6e6e6;
}

.joined {
  margin: 0;
  font-size: 13px;
  color: var(--accent-soft);
}

/* Widgets */
.widgets {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 22px;
}

.widget {
  position: relative;
  min-width: 0;
  padding: 14px;
  border: 2px solid var(--widget-border);
  border-radius: 16px;
  background: var(--widget-bg);
  transition: transform 400ms var(--ease-out-expo), border-color 350ms ease,
    background 350ms ease, box-shadow 400ms ease;
}

.widget:hover {
  transform: translateY(-5px);
  border-color: rgba(114, 96, 191, 0.55);
  background: rgba(114, 96, 191, 0.12);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35),
    0 0 24px rgba(114, 96, 191, 0.16);
}

.widget-label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 8px;
  color: var(--accent-soft);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.widget-label .icon {
  width: 12px;
  height: 12px;
  color: var(--accent);
}

.widget-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar-with-status {
  position: relative;
  flex: 0 0 65px;
  width: 65px;
  height: 65px;
}

.widget-avatar {
  width: 65px;
  height: 65px;
  min-width: 65px;
  object-fit: cover;
  border-radius: 12px;
  transition: transform 450ms var(--ease-spring);
}

.widget:hover .widget-avatar {
  transform: scale(1.06) rotate(2deg);
}

.status-dot {
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  border: 2px solid #000;
  object-fit: contain;
  animation: statusPulse 2.5s ease-in-out infinite;
}

@keyframes statusPulse {
  0%,
  100% {
    filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.5));
  }
  50% {
    filter: drop-shadow(0 0 7px rgba(114, 96, 191, 0.9));
  }
}

.widget-info {
  min-width: 0;
}

.widget-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.widget-title {
  font-size: 16px;
  font-weight: 700;
}

.guild-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 12px;
  transition: background 250ms ease, transform 250ms var(--ease-spring);
}

.widget:hover .guild-tag {
  background: rgba(114, 96, 191, 0.25);
  transform: translateY(-1px);
}

.guild-tag[hidden] {
  display: none;
}

.guild-tag img {
  width: 14px;
  height: 14px;
  object-fit: contain;
}

.widget-status,
.widget-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 6px 0 0;
  font-size: 13px;
  color: #c9c9d4;
}

.widget-activity {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 0;
  padding: 4px 8px;
  border: 1px solid rgba(114, 96, 191, 0.28);
  border-radius: 9px;
  background: rgba(114, 96, 191, 0.12);
  color: #e8e4ff;
  font-size: 11px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.widget-activity[hidden] {
  display: none;
}

.widget-activity .activity-label {
  color: var(--accent-soft);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.widget-activity .activity-emoji {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  object-fit: contain;
  font-size: 14px;
  line-height: 1;
}

.widget-activity .activity-image {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
  object-fit: cover;
}

.widget-stats .icon {
  width: 12px;
  height: 12px;
  color: var(--accent);
}

.lastfm-button {
  display: inline-block;
  margin-top: 10px;
  padding: 6px 14px;
  border-radius: 999px;
  background: #e51024;
  color: #fff;
  font-size: 12px;
  text-decoration: none;
  transition: transform 300ms var(--ease-spring), box-shadow 300ms ease, filter 200ms ease;
}

.lastfm-button:hover,
.lastfm-button:focus-visible {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 6px 18px rgba(229, 16, 36, 0.45);
  filter: brightness(1.15);
}

.lastfm-corner {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 20px;
  height: 20px;
  opacity: 0.8;
  transition: transform 400ms var(--ease-spring), opacity 300ms ease;
}

.widget:hover .lastfm-corner {
  transform: rotate(15deg) scale(1.12);
  opacity: 1;
}

@media (min-width: 721px) {
  .widgets {
    flex-direction: row;
  }

  .widget {
    flex: 1 1 0;
  }
}

@media (min-width: 1180px) {
  .page {
    grid-template-columns: minmax(0, var(--container-width)) 320px;
    column-gap: 24px;
  }

  .side-panel-wrap {
    align-self: stretch;
  }
}

/* Socials */
.socials {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin: 26px 0 35px;
}

.social-link {
  display: inline-flex;
  flex: 0 0 44px;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  color: var(--icon-color);
  filter: drop-shadow(#481c7d 1px 0 7px);
  transform: translate(var(--mag-x, 0px), var(--mag-y, 0px));
  transition: transform 350ms var(--ease-spring), filter 350ms ease, color 350ms ease;
}

.social-link .icon,
.social-link img {
  display: block;
  width: 28px;
  height: 28px;
}

.social-link:hover,
.social-link:focus-visible {
  transform: translate(var(--mag-x, 0px), var(--mag-y, 0px)) scale(1.22) rotate(-5deg);
  filter: drop-shadow(#481c7d 1px 0 16px);
  color: var(--accent);
}

.site-footer {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
  padding: 0 16px 24px;
}

.site-footer[hidden] {
  display: none;
}

.page.entered + .site-footer {
  animation: fadeIn 300ms ease 280ms backwards;
}

.site-footer .joined {
  font-size: 13px;
  letter-spacing: 0.01em;
}

/* Footer */
.profile-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 15px;
  font-weight: 450;
  color: #dddddd;
}

.footer-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 300ms ease;
}

.footer-item:hover {
  color: var(--accent-soft);
}

.footer-item .icon {
  width: 16px;
  height: 16px;
  color: var(--accent);
}

#views {
  display: inline-block;
  min-width: 2ch;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

#views.views-bump {
  animation: viewsBump 650ms var(--ease-spring);
  color: var(--accent);
}

@keyframes viewsBump {
  0% {
    transform: scale(1);
    filter: brightness(1);
  }
  35% {
    transform: scale(1.28);
    filter: brightness(1.6);
  }
  100% {
    transform: scale(1);
    filter: brightness(1);
  }
}

.footer-divider {
  width: 1px;
  height: 16px;
  background: rgba(255, 255, 255, 0.35);
}

/* Audio player */
.player-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.track-cover {
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  border-radius: 10px;
  object-fit: cover;
  transition: transform 500ms var(--ease-spring), box-shadow 500ms ease;
}

.player-card:hover .track-cover {
  transform: rotate(-4deg) scale(1.06);
  box-shadow: 0 0 22px rgba(114, 96, 191, 0.5);
}

.player-body {
  flex: 1;
  min-width: 0;
}

.track-title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
}

.visualizer {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 18px;
  margin: -2px 0 8px;
  opacity: 0;
  transition: opacity 350ms ease;
}

.visualizer.active {
  opacity: 0.9;
}

.visualizer span {
  width: 3px;
  height: 20%;
  min-height: 2px;
  border-radius: 2px;
  background: linear-gradient(to top, var(--accent), #b9a8ff);
  box-shadow: 0 0 6px rgba(114, 96, 191, 0.55);
  transition: height 90ms linear;
}

.time-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.time {
  min-width: 36px;
  font-size: 12px;
  color: #bbbbbb;
}

.range {
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 999px;
  border: 0;
  background: linear-gradient(
    to right,
    var(--accent) 0 var(--fill, 0%),
    var(--player-bar) var(--fill, 0%) 100%
  );
  outline: none;
  transition: filter 250ms ease, --fill 140ms linear;
}

.range:hover,
.range:focus-visible {
  filter: brightness(1.25);
}

.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 0;
  transition: transform 250ms var(--ease-spring), box-shadow 250ms ease;
}

.range::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 0;
  transition: transform 250ms var(--ease-spring), box-shadow 250ms ease;
}

.range:hover::-webkit-slider-thumb,
.range:focus-visible::-webkit-slider-thumb {
  transform: scale(1.3);
  box-shadow: 0 0 12px rgba(114, 96, 191, 0.9);
}

.range:hover::-moz-range-thumb,
.range:focus-visible::-moz-range-thumb {
  transform: scale(1.3);
  box-shadow: 0 0 12px rgba(114, 96, 191, 0.9);
}

.range::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: transparent;
}

.progress {
  flex: 1;
  min-width: 80px;
  /* rAF drives this continuously; a transition would only add lag. */
  transition: filter 250ms ease;
}

.player-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 10px;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fafafa;
  transition: transform 300ms var(--ease-spring), color 300ms ease, filter 300ms ease;
}

.icon-button:hover,
.icon-button:focus-visible {
  transform: scale(1.16);
  color: var(--accent);
  filter: drop-shadow(0 0 10px rgba(114, 96, 191, 0.9));
}

.icon-button:active {
  transform: scale(0.94);
}

.play-button {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(114, 96, 191, 0.18);
}

.play-button:hover,
.play-button:focus-visible {
  background: rgba(114, 96, 191, 0.35);
}

.play-button.is-playing::after {
  content: "";
  position: absolute;
  inset: -4px;
  border: 1px solid rgba(114, 96, 191, 0.7);
  border-radius: 50%;
  animation: playRing 1.8s ease-out infinite;
  pointer-events: none;
}

@keyframes playRing {
  0% {
    opacity: 0.8;
    transform: scale(0.85);
  }
  100% {
    opacity: 0;
    transform: scale(1.35);
  }
}

.icon-button .icon {
  width: 22px;
  height: 22px;
}

.play-button .icon {
  width: 30px;
  height: 30px;
}

.lyrics {
  margin-top: 10px;
  max-height: 80px;
  overflow: auto;
  font-size: 12px;
  line-height: 1.5;
  color: #cccccc;
  transition: opacity 300ms ease;
}

.lyrics[hidden] {
  display: none;
}

@media (max-width: 480px) {
  .page {
    padding: 64px 10px 28px;
  }

  .profile-card,
  .player-card {
    padding: 18px;
  }

  .avatar-wrap {
    flex-basis: 72px;
    width: 72px;
    height: 72px;
  }

  .username {
    font-size: 30px;
    line-height: 35px;
  }

  .player-card {
    gap: 12px;
  }

  .socials {
    gap: 16px;
  }
}

@media (max-height: 800px) {
  .page {
    padding-top: 40px;
    padding-bottom: 20px;
  }

  .site-footer {
    padding-bottom: 16px;
  }

  .socials {
    margin: 18px 0 22px;
  }

  .widgets {
    margin-top: 14px;
  }
}

@media (min-width: 1180px) and (max-height: 740px) {
  .page {
    gap: 12px;
    padding-top: 28px;
    padding-bottom: 8px;
  }

  .site-footer {
    padding-bottom: 8px;
  }

  .socials {
    margin: 12px 0 14px;
  }

  .side-panel {
    padding: 14px;
  }
}

html.no-motion *,
html.no-motion *::before,
html.no-motion *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
  scroll-behavior: auto !important;
}

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

/* Tuqo content-editor source fields stay in the DOM but never render. */
.tuqo-field,
.tuqo-playlist {
  display: none;
}
