:root {
  color-scheme: dark;
  --bg: #06070a;
  --panel: rgba(15, 17, 22, 0.62);
  --panel-solid: #101319;
  --line: rgba(255, 255, 255, 0.13);
  --line-strong: rgba(255, 255, 255, 0.22);
  --text: #f8fafc;
  --muted: #9aa5b1;
  --soft: #d9e0e8;
  --cyan: #28d9ff;
  --red: #ff3f5f;
  --acid: #c7ff45;
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.52);
  --mx: 50%;
  --my: 50%;
}

* {
  box-sizing: border-box;
}

html.copy-protected,
html.copy-protected * {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background: #050608;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.page-shell {
  min-height: 100vh;
  padding-bottom: 32px;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

.bg-video,
.glass-layer,
.noise-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.bg-video {
  z-index: -5;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.1) contrast(1.04) brightness(0.76);
}

.glass-layer {
  z-index: -4;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.1), transparent 34%),
    linear-gradient(245deg, rgba(40, 217, 255, 0.08), transparent 36%),
    rgba(5, 6, 8, 0.16);
  backdrop-filter: blur(4px) saturate(1.22);
}

.noise-layer {
  z-index: -2;
  opacity: 0.18;
  background-image:
    radial-gradient(circle at 18% 10%, rgba(255, 255, 255, 0.16), transparent 20rem),
    radial-gradient(circle at 82% 92%, rgba(255, 63, 95, 0.16), transparent 18rem);
}

.bio-layout {
  width: min(1120px, calc(100% - 36px));
  min-height: clamp(680px, 86vh, 780px);
  margin: 0 auto;
  padding: 32px 0 16px;
  display: grid;
  grid-template-columns: minmax(300px, 520px) var(--music-width, 0px);
  align-items: center;
  justify-content: center;
  gap: var(--music-gap, 0px);
  transition:
    grid-template-columns 1350ms cubic-bezier(0.19, 1, 0.22, 1),
    gap 1350ms cubic-bezier(0.19, 1, 0.22, 1);
}

body.music-open .bio-layout,
.bio-layout.is-open {
  grid-template-columns: minmax(300px, 520px) 560px;
  gap: 16px;
}

.bio-card,
.music-panel,
.dialog-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px) saturate(1.16);
}

.bio-card,
.music-panel {
  min-height: 640px;
  overflow: hidden;
  transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 180ms ease, border-color 180ms ease;
  animation: riseIn 700ms ease both;
  isolation: isolate;
}

.bio-card {
  width: 100%;
}

.music-shell {
  width: 100%;
  min-width: 0;
  opacity: 0;
  visibility: hidden;
  overflow: hidden;
  pointer-events: none;
  transform: translateX(-34px);
  transition:
    opacity 820ms ease,
    transform 1250ms cubic-bezier(0.19, 1, 0.22, 1),
    visibility 0ms linear 1250ms;
}

body.music-open .music-shell,
.music-shell.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0);
  transition:
    opacity 900ms ease 170ms,
    transform 1250ms cubic-bezier(0.19, 1, 0.22, 1),
    visibility 0ms linear;
}

.music-panel {
  width: 560px;
  padding: 24px;
}

.bio-card > *,
.music-panel > * {
  position: relative;
  z-index: 1;
}

.bio-card::before,
.music-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(40, 217, 255, 0.72), transparent 34%, rgba(255, 63, 95, 0.62));
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 180ms ease;
  pointer-events: none;
}

.bio-card:hover::before,
.music-panel:hover::before {
  opacity: 1;
}

.bio-card::after,
.music-panel::after {
  content: "";
  position: absolute;
  top: -42%;
  bottom: -42%;
  left: -22%;
  width: 18%;
  z-index: 0;
  border-radius: 999px;
  background:
    linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.055) 32%, rgba(255, 255, 255, 0.24) 49%, rgba(40, 217, 255, 0.09) 56%, transparent 78%),
    linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.035) 44%, transparent 74%);
  filter: blur(0.5px);
  mix-blend-mode: screen;
  transform: translate3d(-135%, 0, 0) rotate(18deg);
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
  animation: panelSweep 9.5s cubic-bezier(0.45, 0, 0.2, 1) infinite;
}

.music-panel::after {
  animation-delay: 1.8s;
}

@keyframes panelSweep {
  from {
    opacity: 0;
    transform: translate3d(-135%, 0, 0) rotate(18deg);
  }
  16% {
    opacity: 0;
  }
  38% {
    opacity: 0.82;
  }
  58% {
    opacity: 0.52;
  }
  74% {
    opacity: 0;
    transform: translate3d(680%, 0, 0) rotate(18deg);
  }
  to {
    opacity: 0;
    transform: translate3d(680%, 0, 0) rotate(18deg);
  }
}

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

.bio-card {
  padding: 22px;
  display: flex;
  flex-direction: column;
}

.topline,
.panel-head,
.time-row,
.volume-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.topline {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.identity-row {
  margin: 28px 0 20px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.avatar-frame {
  width: 150px;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #101319;
  animation: avatarFloat 4.8s ease-in-out infinite;
}

.avatar-frame img,
.cover-tile img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

@keyframes avatarFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-7px);
  }
}

.kicker {
  margin: 0 0 10px;
  color: var(--acid);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  max-width: 100%;
  font-size: clamp(2.55rem, 5.2vw, 4.15rem);
  line-height: 0.9;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  text-shadow: 0 10px 36px rgba(0, 0, 0, 0.38);
}

h2 {
  margin-bottom: 0;
  font-size: 1.7rem;
  line-height: 1;
  letter-spacing: 0;
}

.name-block {
  margin: 12px 0 30px;
  padding: 0;
}

.contact-stack {
  margin-top: auto;
  display: grid;
  gap: 10px;
}

.contact-link,
.track-item,
.dialog-button,
.icon-button,
.play-button,
.dialog-close {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  cursor: pointer;
}

.contact-link::before,
.track-item::before,
.dialog-button::before,
.icon-button::before,
.play-button::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 0%, rgba(255, 255, 255, 0.16) 45%, transparent 62%);
  transform: translateX(-120%);
  transition: transform 420ms ease;
  pointer-events: none;
}

.contact-link:hover::before,
.track-item:hover::before,
.dialog-button:hover::before,
.icon-button:hover::before,
.play-button:hover::before {
  transform: translateX(120%);
}

.contact-link {
  min-height: 76px;
  padding: 13px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  text-align: left;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.contact-link:hover,
.contact-link:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(40, 217, 255, 0.62);
  background: rgba(40, 217, 255, 0.08);
  outline: none;
}

.track-item:hover,
.track-item:focus-visible {
  border-color: rgba(40, 217, 255, 0.62);
  background: rgba(40, 217, 255, 0.08);
  outline: none;
}

.contact-mark {
  width: 42px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 28px rgba(40, 217, 255, 0.12);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.contact-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.music-mark {
  position: relative;
  background: linear-gradient(135deg, rgba(40, 217, 255, 0.22), rgba(199, 255, 69, 0.18));
}

.music-note,
.music-note::before,
.music-note::after {
  content: "";
  position: absolute;
}

.music-note {
  width: 18px;
  height: 24px;
  top: 9px;
  left: 14px;
  border-right: 4px solid var(--cyan);
  border-top: 4px solid var(--cyan);
  border-radius: 2px 4px 0 0;
}

.music-note::before {
  right: -4px;
  bottom: -1px;
  width: 12px;
  height: 9px;
  border-radius: 999px;
  background: var(--acid);
  box-shadow: -12px 4px 0 rgba(40, 217, 255, 0.72);
}

.music-note::after {
  left: 0;
  top: 7px;
  width: 4px;
  height: 17px;
  border-radius: 999px;
  background: var(--cyan);
}

.contact-link:hover .contact-mark,
.contact-link:focus-visible .contact-mark {
  transform: scale(1.08) rotate(-2deg);
  box-shadow: 0 14px 34px rgba(40, 217, 255, 0.22);
}

.contact-link strong,
.contact-link small {
  display: block;
}

.contact-link strong {
  margin-bottom: 4px;
}

.contact-link small,
.now-copy span,
.track-item small {
  color: var(--muted);
}

.arrow {
  color: var(--cyan);
  font-size: 1.35rem;
  transition: transform 180ms ease;
}

.contact-link:hover .arrow,
.contact-link:focus-visible .arrow {
  transform: translateX(4px);
}

.panel-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.track-count {
  min-width: 82px;
  padding: 8px 10px;
  border: 1px solid rgba(199, 255, 69, 0.3);
  border-radius: 8px;
  color: var(--acid);
  background: rgba(199, 255, 69, 0.08);
  font-size: 0.82rem;
  font-weight: 900;
  text-align: center;
}

.music-close {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center;
}

.now-card {
  margin-top: 28px;
  min-height: 126px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.035));
  display: grid;
  grid-template-columns: 92px 1fr;
  align-items: center;
  gap: 14px;
}

.cover-tile {
  width: 92px;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel-solid);
}

.now-copy {
  min-width: 0;
}

.now-copy span {
  display: block;
  margin-bottom: 8px;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.now-copy strong {
  display: block;
  color: var(--text);
  font-size: 1.18rem;
  overflow-wrap: anywhere;
}

.timeline {
  margin-top: 26px;
}

.range {
  width: 100%;
  accent-color: var(--cyan);
}

.time-row {
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.86rem;
}

.controls {
  margin: 24px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

.icon-button,
.play-button,
.dialog-close {
  display: inline-grid;
  place-items: center;
  align-items: center;
  justify-items: center;
}

.icon-button {
  width: 50px;
  height: 50px;
  color: var(--soft);
}

.skip-icon {
  width: 11px;
  height: 11px;
  border-top: 2.5px solid currentColor;
  border-left: 2.5px solid currentColor;
  border-radius: 1px;
}

.skip-icon-prev {
  transform: rotate(-45deg);
}

.skip-icon-next {
  transform: rotate(135deg);
}

.play-button {
  width: 70px;
  height: 70px;
  border-color: rgba(255, 63, 95, 0.76);
  background: var(--red);
  color: #fff;
  font-size: 1.42rem;
  box-shadow: 0 16px 38px rgba(255, 63, 95, 0.28);
  animation: playGlow 2.8s ease-in-out infinite;
}

.play-icon {
  width: 0;
  height: 0;
  margin-left: 4px;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  border-left: 18px solid #fff;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.22));
}

body.is-playing .play-icon {
  width: 24px;
  height: 24px;
  margin-left: 0;
  border: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
}

body.is-playing .play-icon::before,
body.is-playing .play-icon::after {
  content: "";
  width: 7px;
  height: 24px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.22);
}

@keyframes playGlow {
  0%,
  100% {
    box-shadow: 0 16px 38px rgba(255, 63, 95, 0.26);
  }
  50% {
    box-shadow: 0 20px 52px rgba(255, 63, 95, 0.44);
  }
}

.volume-row {
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 0.84rem;
}

.volume-row span {
  flex: 0 0 auto;
  color: var(--acid);
  font-weight: 950;
}

.volume-icon {
  width: 28px;
  height: 24px;
  display: inline-grid;
  place-items: center;
}

.volume-icon svg {
  width: 24px;
  height: 24px;
  display: block;
}

.volume-icon path:first-child {
  fill: currentColor;
  stroke: none;
}

.volume-icon path:not(:first-child) {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.track-list {
  display: grid;
  gap: 8px;
  max-height: 216px;
  overflow: auto;
  padding-right: 2px;
}

.track-item,
.empty-track {
  min-height: 50px;
  border-radius: 8px;
}

.track-item {
  padding: 10px 12px;
  display: grid;
  grid-template-columns: 46px 1fr;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-align: left;
}

.track-thumb {
  position: relative;
  width: 42px;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
}

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

.track-thumb span {
  position: absolute;
  left: 4px;
  bottom: 4px;
  min-width: 22px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: rgba(7, 16, 21, 0.78);
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 900;
  backdrop-filter: blur(8px);
}

.track-name {
  min-width: 0;
  overflow-wrap: anywhere;
}

.track-item.is-active {
  border-color: rgba(40, 217, 255, 0.78);
  background: rgba(40, 217, 255, 0.12);
  animation: activeTrack 1.8s ease-in-out infinite alternate;
}

.track-item.is-active .track-thumb span {
  color: #071015;
  background: var(--cyan);
}

@keyframes activeTrack {
  from {
    box-shadow: 0 0 0 rgba(40, 217, 255, 0);
  }
  to {
    box-shadow: 0 0 24px rgba(40, 217, 255, 0.16);
  }
}

.empty-track {
  padding: 15px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
}

.action-dialog {
  width: min(420px, calc(100% - 28px));
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
}

.action-dialog::backdrop {
  background: rgba(0, 0, 0, 0.74);
}

.dialog-card {
  position: relative;
  padding: 22px;
}

.dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  color: var(--muted);
}

.close-icon {
  position: relative;
  width: 14px;
  height: 14px;
  display: block;
}

.close-icon::before,
.close-icon::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 1px;
  width: 2px;
  height: 12px;
  border-radius: 999px;
  background: currentColor;
}

.close-icon::before {
  transform: rotate(45deg);
}

.close-icon::after {
  transform: rotate(-45deg);
}

.dialog-value {
  margin: 10px 0 18px;
  color: var(--soft);
  overflow-wrap: anywhere;
}

.dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.dialog-actions.is-copy-only {
  grid-template-columns: 1fr;
}

.dialog-button {
  min-height: 48px;
  color: var(--text);
}

.dialog-button-primary {
  border-color: rgba(40, 217, 255, 0.65);
  background: var(--cyan);
  color: #061017;
  font-weight: 900;
}

.ripple {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.34);
  transform: translate(-50%, -50%) scale(0);
  pointer-events: none;
  animation: ripple 520ms ease-out forwards;
}

@keyframes ripple {
  to {
    opacity: 0;
    transform: translate(-50%, -50%) scale(16);
  }
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 20;
  min-width: 180px;
  max-width: calc(100% - 32px);
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #14181d;
  color: var(--text);
  box-shadow: var(--shadow);
  text-align: center;
  opacity: 0;
  transform: translate(-50%, 18px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

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

.is-playing .cover-tile,
.is-playing .avatar-frame {
  animation: coverPulse 1.8s ease-in-out infinite alternate;
}

@keyframes coverPulse {
  from {
    border-color: var(--line);
    filter: saturate(1);
  }
  to {
    border-color: rgba(40, 217, 255, 0.76);
    filter: saturate(1.22);
  }
}

@media (max-width: 860px) {
  .bio-layout {
    width: min(100% - 24px, 560px);
    min-height: auto;
    padding: 20px 0;
    flex-direction: column;
    gap: 0;
  }

  body.music-open .bio-layout,
  .bio-layout.is-open {
    gap: 12px;
  }

  .bio-card,
  .music-panel {
    min-height: auto;
    width: 100%;
  }

  .music-shell {
    width: 100%;
    flex-basis: auto;
    max-height: 0;
    opacity: 0;
    transform: translateY(-24px);
    transition:
      max-height 1250ms cubic-bezier(0.19, 1, 0.22, 1),
      opacity 760ms ease,
      transform 1250ms cubic-bezier(0.19, 1, 0.22, 1),
      visibility 0ms linear 1250ms;
  }

  body.music-open .music-shell,
  .music-shell.is-open {
    width: 100%;
    max-height: 920px;
    opacity: 1;
    transform: translateY(0);
    transition:
      max-height 1250ms cubic-bezier(0.19, 1, 0.22, 1),
      opacity 900ms ease 170ms,
      transform 1250ms cubic-bezier(0.19, 1, 0.22, 1),
      visibility 0ms linear;
  }

  .music-panel {
    width: 100%;
    padding: 14px;
  }

  .identity-row {
    margin: 28px 0 26px;
  }
}

@media (max-width: 520px) {
  .bio-layout {
    width: calc(100% - 18px);
    padding: 9px 0;
    gap: 10px;
  }

  .bio-card,
  .music-panel {
    padding: 14px;
  }

  .avatar-frame {
    width: 122px;
  }

  .now-card {
    grid-template-columns: 72px 1fr;
  }

  .cover-tile {
    width: 72px;
  }

  .dialog-actions {
    grid-template-columns: 1fr;
  }

}

@media (hover: none), (pointer: coarse) {
  .bio-card,
  .music-panel {
    transform: none !important;
    transition: border-color 160ms ease;
  }

  .bio-card::after,
  .music-panel::after {
    filter: none;
    animation-duration: 13s;
  }

  .contact-link:hover,
  .contact-link:focus-visible {
    transform: none;
  }

  .ripple {
    display: none;
  }

  .glass-layer {
    backdrop-filter: blur(2px) saturate(1.08);
  }
}

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