:root {
  --bg: #000;
  --fg: #f4f4f5;
  --muted: rgba(244, 244, 245, 0.48);
  --line: rgba(255, 255, 255, 0.12);
  --glass: rgba(18, 18, 20, 0.58);
  --music: linear-gradient(160deg, rgba(78, 24, 56, 0.92), rgba(18, 10, 18, 0.88) 55%, rgba(10, 10, 12, 0.9));
}

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

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--fg);
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

img,
canvas,
audio,
video {
  -webkit-user-drag: none;
  user-drag: none;
  pointer-events: auto;
}

body {
  min-height: 100dvh;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  text-transform: lowercase;
}

.fx {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.07;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px;
}

.gate {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(18px) saturate(1.1);
  transition: opacity 0.55s ease, visibility 0.55s ease;
}

.gate.is-gone {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.gate-hit {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  display: grid;
  gap: 0.55rem;
  justify-items: center;
  padding: 2rem;
}

.gate-kicker {
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  color: var(--muted);
  font-weight: 600;
}

.gate-title {
  font-family: "Archivo Black", Inter, sans-serif;
  font-size: clamp(2rem, 7vw, 3.4rem);
  letter-spacing: -0.04em;
  line-height: 1;
  animation: pulse 1.8s ease-in-out infinite;
}

.gate-sub {
  font-size: 0.9rem;
  color: var(--muted);
}

@keyframes pulse {
  0%, 100% { opacity: 0.72; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.015); }
}

.page {
  position: relative;
  z-index: 2;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

.shell {
  width: min(96vw, 920px);
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 1.1rem;
  padding: 1.25rem;
  border-radius: 34px;
  background: var(--glass);
  border: 1px solid var(--line);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 30px 90px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(26px) saturate(1.2);
  -webkit-backdrop-filter: blur(26px) saturate(1.2);
  opacity: 0;
  transform: translateY(18px) scale(0.985);
  transition: 0.7s ease;
}

.page.is-in .shell {
  opacity: 1;
  transform: none;
}

.left {
  padding: 0.55rem 0.35rem 0.35rem 0.55rem;
}

.avatar {
  width: 92px;
  height: 92px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #111;
  border: 1px solid var(--line);
  font-family: "Archivo Black", Inter, sans-serif;
  font-size: 2.4rem;
  margin-bottom: 1rem;
}

.name {
  margin: 0;
  font-family: "Archivo Black", Inter, sans-serif;
  font-size: clamp(2.4rem, 5vw, 3.2rem);
  letter-spacing: -0.05em;
  line-height: 0.95;
}

.handle {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-weight: 600;
}

.bio {
  margin: 0.85rem 0 0;
  max-width: 18rem;
  color: var(--soft, #ddd);
  color: rgba(244, 244, 245, 0.78);
  font-size: 0.98rem;
  line-height: 1.4;
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1rem;
}

.pill {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 600;
}

.note {
  margin: 0.9rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.socials {
  display: flex;
  gap: 0.55rem;
  margin-top: 1.2rem;
}

.social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 5.5rem;
  padding: 0.7rem 0.95rem;
  border-radius: 12px;
  background: #fff;
  color: #000;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.88rem;
  border: 1px solid transparent;
}

.social.soft {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border-color: var(--line);
}

.social:hover { filter: brightness(1.05); }

.presence {
  margin-top: 1rem;
  width: min(100%, 18.5rem);
  padding: 0.85rem;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.38);
  border: 1px solid var(--line);
  display: grid;
  gap: 0.75rem;
}

.presence-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.presence-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.presence-main {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.presence-avatar {
  flex: 0 0 auto;
  width: 72px;
  height: 72px;
  line-height: 0;
}

.presence-meta {
  min-width: 0;
}

.presence-name {
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: -0.02em;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.presence-user {
  margin-top: 0.12rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.presence-line {
  margin-top: 0.28rem;
  color: rgba(244, 244, 245, 0.72);
  font-size: 0.78rem;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.presence-activity {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.6rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  min-width: 0;
}

.presence-art {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  background: #222;
  flex: 0 0 auto;
}

.presence-act-copy {
  min-width: 0;
}

.presence-kicker {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #1db954;
}

.presence-kicker.is-game { color: #b5bac1; }

.presence-title {
  margin-top: 0.12rem;
  font-size: 0.84rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.presence-sub {
  margin-top: 0.08rem;
  color: var(--muted);
  font-size: 0.76rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.right {
  display: grid;
  gap: 0.85rem;
  align-content: start;
}

.music {
  border-radius: 22px;
  padding: 1rem 1rem 0.95rem;
  background: var(--music);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.music-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.music-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.cover {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  object-fit: cover;
  background: #222;
  flex: 0 0 auto;
}

.song {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.artist {
  margin-top: 0.12rem;
  color: rgba(244, 244, 245, 0.55);
  font-size: 0.9rem;
}

.controls {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.ghost,
.play {
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  font-size: 0.85rem;
}

.ghost {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  opacity: 0.8;
}

.ghost:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.08);
}

.play {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: #fff;
  color: #000;
  font-size: 0.78rem;
  font-weight: 700;
}

.hidden { display: none !important; }

.progress-row {
  margin-top: 0.9rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.55rem;
  align-items: center;
  color: rgba(244, 244, 245, 0.5);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  cursor: pointer;
  touch-action: none;
  position: relative;
  display: flex;
  align-items: center;
}

.bar i {
  display: block;
  height: 4px;
  width: 0%;
  background: #fff;
  border-radius: inherit;
  pointer-events: none;
}

.lyrics {
  margin-top: 0.85rem;
  height: 11.5rem;
  overflow: hidden;
  position: relative;
  mask-image: linear-gradient(transparent 0%, #000 14%, #000 78%, transparent 100%);
  -webkit-mask-image: linear-gradient(transparent 0%, #000 14%, #000 78%, transparent 100%);
}

.lyrics-track {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  will-change: transform;
  transition: transform 0.75s cubic-bezier(0.2, 0.75, 0.2, 1);
  text-align: center;
}

.lyrics .line {
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.015em;
  padding: 0.55rem 0.35rem;
  cursor: pointer;
  opacity: 0.5;
  filter: blur(var(--b, 0px));
  transform: scale(0.97);
  transition: opacity 0.5s, filter 0.5s, transform 0.5s;
}

.lyrics .line.active {
  opacity: 1;
  filter: none;
  transform: scale(1);
  color: #fff;
}

.lyrics .line:hover {
  opacity: 0.85;
  filter: none;
}

@media (max-width: 820px) {
  body { overflow: auto; }
  .page { padding: 1rem 0.75rem 2rem; }
  .shell {
    grid-template-columns: 1fr;
    width: min(96vw, 460px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .gate-title { animation: none; }
  .shell { transition: none; }
  .lyrics-track { transition: none; }
}
