@font-face {
  font-family: "Outfit";
  src: url("assets/outfit-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Space Grotesk";
  src: url("assets/space-grotesk-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --text-color: #d4d4d4;
  --theme-color: #ffffff;
  --glass-bg: rgba(0, 0, 0, 0.1);
  --glass-border: rgba(255, 255, 255, 0.05);
  --pill-bg: rgba(255, 255, 255, 0.05);
  --card-width: 700px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

html {
  scroll-behavior: smooth;
}

body {
  background: #000;
  color: var(--text-color);
  font-family: "Outfit", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

a {
  color: inherit;
}

/* ---------- Background ---------- */

.background {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: #000;
}

.background img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(35%) saturate(120%) contrast(105%);
}

/* ---------- Cursor canvas effect ---------- */

.cursor-canvas {
  position: fixed;
  inset: 0;
  display: block;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  pointer-events: none;
}

/* ---------- Layout ---------- */

.page {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100svh;
  padding: 128px 16px;
  font-family: "Space Grotesk", system-ui, sans-serif;
  pointer-events: none;
}

.profile-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  width: 100%;
  max-width: var(--card-width);
  pointer-events: auto;
}

.glass {
  background: var(--glass-bg);
  border: 2px solid var(--glass-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: none;
}

/* ---------- Speaker + volume control ---------- */

.volume-control {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: opacity 0.25s ease;
}

.mute-btn {
  display: grid;
  place-content: center;
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
  padding: 0;
  border: 2px solid var(--glass-border);
  border-radius: 30px;
  background: var(--glass-bg);
  color: #fff;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.mute-btn:hover {
  border-color: rgba(255, 255, 255, 0.16);
}

.mute-btn:active {
  transform: translateY(2px);
}

.mute-btn svg {
  width: 32px;
  height: 32px;
  filter: drop-shadow(0 0 6px var(--theme-color));
}

.mute-btn.is-muted .volume-waves {
  opacity: 0.18;
}

.volume-popover {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 150px;
  padding: 10px 12px;
  border: 2px solid var(--glass-border);
  border-radius: 99px;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transform: translateX(-8px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.volume-control:hover .volume-popover,
.volume-control:focus-within .volume-popover,
.volume-control.is-open .volume-popover {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.volume-slider {
  --volume-percent: 100%;
  width: 100%;
  height: 4px;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  border-radius: 99px;
  background: linear-gradient(to right, #fff var(--volume-percent), rgba(255, 255, 255, 0.24) var(--volume-percent));
  cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
  width: 12px;
  height: 12px;
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
}

.volume-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
}

.volume-popover .value {
  min-width: 24px;
  color: #fff;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  text-align: right;
  opacity: 0.7;
}

/* ---------- Profile card ---------- */

.profile-card {
  position: relative;
  width: 100%;
  border-radius: 35px;
  isolation: isolate;
  transform: translateZ(0);
}

.profile-card:focus {
  outline: none;
}

.banner {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 130px;
  object-fit: cover;
  object-position: center;
  border-radius: 33px 33px 0 0;
  background: #000;
  transform: translateZ(0);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, transparent 100%);
  pointer-events: none;
}

.profile-content {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 80px 24px 24px;
}

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

.avatar {
  position: relative;
  flex: 0 0 auto;
  width: 104px;
  height: 104px;
  border-radius: 100%;
  cursor: default;
  isolation: isolate;
}

.avatar-base {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  border-radius: 100%;
}

.avatar-base img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 100%;
}

.avatar-decoration {
  position: absolute;
  inset: -11%;
  z-index: 2;
  width: 122%;
  height: 122%;
  object-fit: contain;
  pointer-events: none;
}

.status-badge {
  position: absolute;
  right: -1px;
  bottom: 1px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border: 3px solid #0b0b0d;
  border-radius: 50%;
  background: #0b0b0d;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.7);
}

.status-badge::after {
  content: "";
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--status-color, #80848e);
  box-shadow: 0 0 8px var(--status-color, #80848e);
}

.status-badge[data-status="online"] { --status-color: #23a559; }
.status-badge[data-status="idle"] { --status-color: #f0b232; }
.status-badge[data-status="dnd"] { --status-color: #f23f43; }
.status-badge[data-status="offline"] { --status-color: #80848e; }

.status-badge[data-status="idle"]::after {
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
}

.status-badge[data-status="dnd"]::before {
  content: "";
  position: absolute;
  z-index: 1;
  width: 7px;
  height: 2px;
  border-radius: 2px;
  background: #fff;
}

.status-badge[data-status="offline"]::after {
  width: 6px;
  height: 6px;
  box-shadow: 0 0 0 3px rgba(128, 132, 142, 0.5);
}


.profile-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.name {
  margin: 0;
  color: #fff;
  font-size: 30px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  white-space: nowrap;
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.9);
}

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

.server-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px 3px 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.25);
}

.server-tag img {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  object-fit: cover;
}

.discord-note {
  margin: 0;
  color: #fff;
  font-size: 14px;
  line-height: 1.4;
  opacity: 0.72;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.9);
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  opacity: 0.7;
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.meta-item svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
  filter: drop-shadow(0 0 2px #fff);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border: 1px solid var(--glass-border);
  border-radius: 30px;
  background: var(--pill-bg);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
}

.socials {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 8px 0;
}

.social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 35px;
  height: 35px;
  color: #fff;
  transition: transform 0.3s ease;
}

.social:hover,
.social:focus-visible {
  transform: scale(1.1);
}

.social svg {
  width: 35px;
  height: 35px;
  fill: currentColor;
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.85));
}

.stats {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  width: 100%;
  font-size: 16px;
}

.stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.stat svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
  filter: drop-shadow(0 0 2px #fff);
}

/* ---------- Music card ---------- */

.music-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 76px;
  padding: 10px 12px 10px 10px;
  border-radius: 30px;
  isolation: isolate;
}

.music-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  border-radius: 28px;
  background: transparent;
}

.music-bg img {
  display: none;
}

.music-glow {
  position: absolute;
  inset: 0;
  border-radius: 28px;
  background: radial-gradient(circle at 30% 20%, rgba(192, 132, 252, 0.18), transparent 65%);
}

.music-shade {
  position: absolute;
  inset: 0;
  border-radius: 28px;
  background: transparent;
}

.track-cover-wrap {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  overflow: hidden;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 10px 24px -8px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(255, 255, 255, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.track-cover {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.track-cover.is-spinning {
  animation: record-spin 8s linear infinite;
}

@keyframes record-spin {
  to { transform: rotate(360deg); }
}

.track-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.track-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.track-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.equalizer {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  width: 13px;
  height: 12px;
  flex: 0 0 auto;
}

.equalizer span {
  width: 3px;
  height: 6px;
  border-radius: 99px;
  background: #fff;
  opacity: 0.9;
}

.equalizer span:nth-child(2) {
  height: 11px;
}

.equalizer.is-playing span:nth-child(1) {
  animation: bounce 0.9s ease-in-out infinite alternate;
}

.equalizer.is-playing span:nth-child(2) {
  animation: bounce 0.65s ease-in-out infinite alternate-reverse;
}

.equalizer.is-playing span:nth-child(3) {
  animation: bounce 0.8s ease-in-out infinite alternate;
  animation-delay: 0.2s;
}

@keyframes bounce {
  from { height: 4px; }
  to { height: 12px; }
}

.track-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.012em;
  text-align: left;
}

.controls {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}

.control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.control:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.control:active {
  transform: scale(0.9);
}

.control svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
}

.control.play {
  position: relative;
  width: 32px;
  height: 32px;
  background: #fff;
  color: #000;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 6px 16px -6px rgba(0, 0, 0, 0.6), inset 0 0 0 1px rgba(0, 0, 0, 0.06), inset 0 -1px 0 rgba(0, 0, 0, 0.12);
}

.control.play:hover {
  background: rgba(255, 255, 255, 0.85);
}

.control.play svg {
  width: 18px;
  height: 18px;
}

.control.play .icon-play {
  display: none;
}

.control.play .icon-pause {
  display: block;
}

.control.play.is-paused .icon-play {
  display: block;
}

.control.play.is-paused .icon-pause {
  display: none;
}

.progress-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 1px;
  color: #fff;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  opacity: 0.55;
}

.time {
  flex: 0 0 28px;
}

.time:last-child {
  text-align: right;
}

.slider {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  height: 18px;
  margin-block: -7px;
  cursor: pointer;
  touch-action: none;
}

.slider-bar {
  position: relative;
  width: 100%;
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.25);
  transition: height 0.2s ease;
}

.slider:hover .slider-bar,
.slider:focus-visible .slider-bar {
  height: 6px;
}

.slider-fill {
  position: absolute;
  inset-block: 0;
  left: 0;
  width: 0%;
  border-radius: 99px;
  background: #fff;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.95);
}

.slider-thumb {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.5);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.slider:hover .slider-thumb,
.slider:focus-visible .slider-thumb,
.slider.is-dragging .slider-thumb {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* ---------- Entry gate (Frail Iris style) ---------- */

body.is-locked .profile-stack {
  filter: blur(8px);
  opacity: 0.32;
  transform: scale(0.97);
  pointer-events: none;
}

body.is-locked .volume-control {
  opacity: 0;
  pointer-events: none;
}

.enter-gate {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 32px;
  color: #fff;
  text-align: center;
  font-family: "Outfit", system-ui, sans-serif;
  cursor: pointer;
  opacity: 1;
  transition: opacity 0.35s cubic-bezier(0.65, 0, 0.35, 1);
}

.enter-gate:focus-visible {
  outline: none;
}

.enter-gate.is-exiting {
  pointer-events: none;
}

body:not(.is-locked) .enter-gate {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.gate-backdrop-orb {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 0;
  width: 150vmax;
  height: 150vmax;
  border-radius: 50%;
  background: radial-gradient(circle at center, #000 0%, transparent 58%), rgb(0 0 0 / 20%);
  box-shadow: 0 0 70px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  transform: translate(-50%, -50%) scale(1);
  transform-origin: center;
  will-change: transform;
  pointer-events: none;
  transition: transform 0.7s cubic-bezier(0.65, 0, 0.35, 1);
}

.enter-gate.is-exiting .gate-backdrop-orb {
  transform: translate(-50%, -50%) scale(0);
}

.gate-center {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  width: 100%;
  max-width: 448px;
  isolation: isolate;
}

.gate-avatar-stage {
  position: relative;
}

.gate-avatar-shell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  opacity: 0;
  filter: blur(8px);
  transform: translateY(20px) scale(0.94);
  animation: gateAvatarIn 0.95s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.gate-avatar {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  animation: gateAvatarPulse 1.4s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

@keyframes gateAvatarIn {
  0% { opacity: 0; filter: blur(8px); transform: translateY(20px) scale(0.94); }
  28% { opacity: 1; filter: blur(4px); transform: translateY(10px) scale(0.97); }
  68% { opacity: 1; filter: blur(0); transform: translateY(0) scale(1); }
  100% { opacity: 1; filter: blur(0); transform: translateY(0) scale(1); }
}

@keyframes gateAvatarPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.enter-gate.is-exiting .gate-avatar-shell {
  animation: none;
  opacity: 0;
  filter: blur(8px);
  transform: translateY(0) scale(0);
  transition: opacity 0.7s cubic-bezier(0.65, 0, 0.35, 1), filter 0.7s cubic-bezier(0.65, 0, 0.35, 1), transform 0.7s cubic-bezier(0.65, 0, 0.35, 1);
}

.gate-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0;
  transform: translateY(10px);
  animation: gateCopyIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.35s forwards;
}

.gate-name {
  margin: 0;
  color: #fff;
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 30px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  white-space: nowrap;
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.9);
}

.gate-enter-text {
  margin: 8px 0 0;
  color: #fff;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.4;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.5);
}

@keyframes gateCopyIn {
  from { opacity: 0; filter: blur(8px); transform: translateY(10px); }
  to { opacity: 1; filter: blur(0); transform: translateY(0); }
}

.enter-gate.is-exiting .gate-copy {
  animation: none;
  opacity: 0;
  filter: blur(0);
  transform: translateY(-18px) scale(0.72);
  transition: opacity 0.3s cubic-bezier(0.65, 0, 0.35, 1), transform 0.3s cubic-bezier(0.65, 0, 0.35, 1);
}

/* ---------- Responsive ---------- */

@media (max-width: 760px) {
  :root {
    --card-width: 100%;
  }

  .page {
    padding: 96px 12px 28px;
    justify-content: center;
  }

  .profile-stack {
    gap: 20px;
  }

  .profile-card {
    border-radius: 28px;
  }

  .banner {
    height: 110px;
    border-radius: 26px 26px 0 0;
  }

  .profile-content {
    gap: 14px;
    padding: 74px 18px 20px;
  }

  .profile-head {
    gap: 14px;
  }

  .avatar {
    width: 88px;
    height: 88px;
  }

  .name {
    font-size: 26px;
  }

  .meta-row {
    gap: 8px;
    font-size: 14px;
  }

  .music-card {
    min-height: 72px;
    padding: 8px 10px 8px 8px;
    border-radius: 26px;
  }

  .track-cover-wrap {
    width: 44px;
    height: 44px;
  }

  .track-title {
    font-size: 15px;
  }
}

@media (max-width: 420px) {
  .profile-head {
    flex-direction: column;
  }

  .avatar {
    width: 96px;
    height: 96px;
  }

  .controls {
    gap: 2px;
  }

  .control {
    width: 24px;
    height: 24px;
  }

  .control.play {
    width: 30px;
    height: 30px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0ms !important;
  }

  /* Keep the icon image spinning even when the OS reduces motion. */
  .track-cover.is-spinning {
    animation-duration: 8s !important;
    animation-iteration-count: infinite !important;
  }
}
