:root {
  color-scheme: dark;
  --accent: #fff;
  --accent-dim: rgba(255, 255, 255, 0.45);
  --accent-line: rgba(255, 255, 255, 0.75);
  --bg: #080808;
  --overlay: 0.45;
  --bg-blur: 0px;
  --card-opacity: 0.5;
  --card-blur: 14px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Helvetica, Arial, sans-serif;
  color: #fff;
  background: #080808;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; color: inherit; }
::selection { background: var(--accent); color: #080808; }
[hidden] { display: none !important; }

.stage { position: relative; min-height: 100vh; min-height: 100dvh; }
.bg, .overlay, .splash, .views, .player, .cursor-glow { position: fixed; }
.stage.contained .bg,
.stage.contained .overlay,
.stage.contained .splash,
.stage.contained .views,
.stage.contained .player,
.stage.contained .cursor-glow { position: absolute; }
.stage.contained { overflow: hidden; min-height: 100%; height: 100%; }

.bg { inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.bg-media {
  position: absolute;
  left: -6%;
  top: -6%;
  width: 112%;
  height: 112%;
  object-fit: cover;
  background: center / cover no-repeat;
}
.bg-color {
  background-color: var(--bg);
  background-image: radial-gradient(ellipse at 50% 40%, rgba(255, 255, 255, 0.06), transparent 58%);
}
.overlay {
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: rgba(0, 0, 0, var(--overlay));
}
.overlay.blur {
  -webkit-backdrop-filter: blur(var(--bg-blur));
  backdrop-filter: blur(var(--bg-blur));
}

.center {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(24px + env(safe-area-inset-top)) 0 calc(108px + env(safe-area-inset-bottom));
  perspective: 900px;
}
.stage.contained .center { min-height: 100%; height: 100%; overflow: auto; }

.card {
  width: min(460px, calc(100vw - 28px));
  max-width: 100%;
  padding: 34px 18px 28px;
  border-radius: 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform-style: preserve-3d;
  will-change: transform;
}
.stage.contained .card { width: min(460px, calc(100% - 28px)); }
.card.glass {
  background: rgba(27, 27, 27, var(--card-opacity));
  border: 2px solid rgba(255, 255, 255, 0.16);
  -webkit-backdrop-filter: blur(var(--card-blur));
  backdrop-filter: blur(var(--card-blur));
}
.card.solid {
  background: rgba(8, 8, 8, var(--card-opacity));
  border: 2px solid rgba(255, 255, 255, 0.1);
}
.card.outline {
  background: transparent;
  border: 2px solid var(--accent-line);
}
.card.glow { box-shadow: 0 0 46px var(--accent-dim); }

.avatar {
  position: relative;
  width: 118px;
  height: 118px;
  margin-bottom: 14px;
  display: grid;
  place-items: center;
}
.avatar img, .avatar .ph {
  width: 118px;
  height: 118px;
  border-radius: 50%;
  object-fit: cover;
  display: grid;
  place-items: center;
  user-select: none;
  -webkit-user-select: none;
}
.avatar .ph {
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(255, 255, 255, 0.18);
  font-size: 46px;
  font-weight: 600;
  letter-spacing: -0.04em;
}
.avatar.glow img, .avatar.glow .ph {
  box-shadow: 0 0 18px var(--accent), 0 0 2px var(--accent);
}
.avatar.ring::before {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  background: conic-gradient(from 20deg, var(--accent), transparent 42%, var(--accent) 78%, transparent);
  z-index: 0;
  animation: spin 3.6s linear infinite;
}
.avatar.ring img, .avatar.ring .ph { position: relative; z-index: 1; }

.name {
  position: relative;
  margin: 0;
  max-width: 100%;
  color: #fff;
  font-size: clamp(32px, 8vw, 40px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
  overflow-wrap: anywhere;
}
.name.fx-glow { text-shadow: 0 0 16px var(--accent), 0 0 2px var(--accent); }
.name.fx-sparkle { text-shadow: 0 0 14px var(--accent); }
.name.fx-sparkle::before,
.name.fx-sparkle::after {
  content: "";
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 8px #fff, 7px -8px 0 -1px #fff, -9px 4px 0 -1.5px var(--accent);
  animation: twinkle 1.5s ease-in-out infinite;
}
.name.fx-sparkle::before { top: -2px; right: -12px; }
.name.fx-sparkle::after { left: -10px; bottom: 2px; animation-delay: .6s; }

.handle {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.5);
  font-size: 14px;
}
.bio {
  margin: 8px 0 0;
  max-width: 34rem;
  color: #fff;
  font-size: 19px;
  font-weight: 500;
  line-height: 1.35;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.caret {
  display: inline-block;
  width: 2px;
  height: 0.9em;
  margin-left: 2px;
  background: #fff;
  vertical-align: text-bottom;
  animation: blink 1s steps(1) infinite;
}
.loc {
  margin: 10px 0 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 13.5px;
}
.loc svg { font-size: 15px; width: 1em; height: 1em; }

.socials {
  width: 100%;
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 11px 9px;
}
.socials a {
  display: flex;
  color: #fff;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.socials svg {
  font-size: 35px;
  width: 1em;
  height: 1em;
  filter: drop-shadow(0 0 7px var(--accent));
  transition: transform .2s ease;
}
.socials a:active svg { transform: scale(0.94); }

.links {
  width: 100%;
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.link-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.22);
  border: 2px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  overflow-wrap: anywhere;
  -webkit-tap-highlight-color: transparent;
}
.link-btn:active { background: rgba(255, 255, 255, 0.32); }

@media (hover: hover) and (pointer: fine) {
  .socials a:hover svg { transform: scale(1.1); }
  .link-btn:hover {
    background: rgba(255, 255, 255, 0.32);
    border-color: rgba(255, 255, 255, 0.25);
  }
}

.views {
  z-index: 5;
  left: 16px;
  bottom: calc(14px + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  font-size: 14px;
  font-weight: 550;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.7);
  pointer-events: none;
}
.views svg { width: 18px; height: 18px; }
.stage.has-player .views { bottom: calc(78px + env(safe-area-inset-bottom)); }
@media (min-width: 760px) {
  .stage.has-player .views { bottom: calc(14px + env(safe-area-inset-bottom)); }
}

.player {
  z-index: 6;
  left: 50%;
  bottom: calc(12px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(420px, calc(100% - 24px));
  padding: 8px 12px 10px;
  border-radius: 18px;
  background: rgba(27, 27, 27, 0.55);
  border: 2px solid rgba(255, 255, 255, 0.14);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.seek {
  height: 4px;
  margin-bottom: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  overflow: hidden;
  cursor: pointer;
}
.seek span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
}
.player-row { display: flex; align-items: center; gap: 10px; }
.track-title {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.icon-btn, .player-vol {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  color: #fff;
  padding: 0;
}
.icon-btn { width: 36px; height: 36px; }
.player-vol input, .splash-vol input {
  -webkit-appearance: none;
  appearance: none;
  width: 92px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  margin: 0;
}
.player-vol input::-webkit-slider-thumb,
.splash-vol input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
}

.splash {
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: rgba(0, 0, 0, 0.775);
  -webkit-backdrop-filter: blur(15px);
  backdrop-filter: blur(15px);
  transition: opacity .7s ease;
  user-select: none;
  -webkit-user-select: none;
}
.splash.hide { opacity: 0; pointer-events: none; }
.enter {
  margin: 0;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.splash-vol {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
}
.splash-vol input { width: 160px; }
.vol-num { min-width: 2.2em; font-size: 14px; font-weight: 600; }

.cursor-glow {
  z-index: 3;
  width: 280px;
  height: 280px;
  margin: -140px 0 0 -140px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, var(--accent-dim), transparent 68%);
  mix-blend-mode: screen;
  opacity: 0.55;
}

@media (max-width: 380px) {
  .avatar, .avatar img, .avatar .ph { width: 100px; height: 100px; }
  .avatar .ph { font-size: 40px; }
  .bio { font-size: 17px; }
  .enter { font-size: 26px; }
  .socials svg { font-size: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  .avatar.ring::before,
  .name.fx-sparkle::before,
  .name.fx-sparkle::after,
  .caret { animation: none; }
  .splash { transition: none; }
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes twinkle {
  0%, 100% { opacity: 0.25; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1); }
}
@keyframes blink { 50% { opacity: 0; } }
