:root {
  color-scheme: dark;
  --bg: #050506;
  --text: #f7f7fb;
  --muted: rgba(247, 247, 251, 0.62);
  --panel: rgba(12, 13, 17, 0.66);
  --panel-soft: rgba(255, 255, 255, 0.065);
  --line: rgba(255, 255, 255, 0.1);
  --blue: #5aa9ff;
  --red: #e94a64;
  --green: #54e18a;
  --shadow: rgba(0, 0, 0, 0.62);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
a {
  font: inherit;
}

.enter-screen {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  border: 0;
  background:
    radial-gradient(circle at 50% 42%, rgba(90, 169, 255, 0.2), transparent 28%),
    radial-gradient(circle at 60% 65%, rgba(233, 74, 100, 0.16), transparent 32%),
    rgba(0, 0, 0, 0.42);
  color: var(--text);
  cursor: pointer;
  backdrop-filter: blur(14px) brightness(0.78);
  transition: opacity 640ms ease, visibility 640ms ease, transform 640ms ease;
}

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

.enter-mark {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  color: rgba(247, 247, 251, 0.88);
  font-size: 1.35rem;
  transition: transform 220ms ease, background 220ms ease, box-shadow 220ms ease;
}

.enter-screen:hover .enter-mark {
  transform: translateY(-4px) scale(1.04);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 28px 95px rgba(0, 0, 0, 0.56), 0 0 34px rgba(90, 169, 255, 0.18);
}

.enter-title {
  font-size: clamp(2rem, 8vw, 4.4rem);
  font-weight: 900;
  line-height: 0.95;
}

.enter-subtitle {
  color: rgba(247, 247, 251, 0.58);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.stage {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  isolation: isolate;
}

.bg,
.bg video,
.bg::before,
.bg::after {
  position: fixed;
  inset: -8vh -8vw;
  z-index: -2;
}

.bg {
  overflow: hidden;
  background: #050506;
}

.bg video {
  width: 116vw;
  height: 116vh;
  object-fit: cover;
  filter: blur(18px) saturate(1.2) brightness(0.58) contrast(1.08);
  transform: scale(1.12);
}

.bg::before {
  content: "";
  z-index: -1;
  background:
    radial-gradient(circle at 22% 28%, rgba(90, 169, 255, 0.28), transparent 32%),
    radial-gradient(circle at 80% 78%, rgba(233, 74, 100, 0.24), transparent 30%),
    linear-gradient(rgba(0, 0, 0, 0.32), rgba(0, 0, 0, 0.7));
  mix-blend-mode: screen;
}

.bg::after {
  content: "";
  z-index: 0;
  background:
    radial-gradient(circle at center, transparent 0 38%, rgba(0, 0, 0, 0.48) 74%),
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: auto, 100% 4px;
  opacity: 0.72;
}

.profile-card {
  position: relative;
  overflow: hidden;
  width: min(420px, 100%);
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.105), rgba(255, 255, 255, 0.035) 42%, rgba(5, 6, 10, 0.58)),
    rgba(12, 13, 17, 0.62);
  box-shadow:
    0 32px 140px rgba(0, 0, 0, 0.7),
    0 0 60px rgba(90, 169, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(30px) saturate(1.16);
  opacity: 0;
  transform: translateY(14px) scale(0.98);
  pointer-events: auto;
  transition: opacity 760ms ease, transform 760ms cubic-bezier(0.2, 0.9, 0.2, 1), box-shadow 300ms ease;
}

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

.profile-card::before {
  content: none;
}

.profile-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 18px;
  right: 18px;
  z-index: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  opacity: 0.72;
}

.profile-card.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.profile-card:hover {
  box-shadow:
    0 38px 160px rgba(0, 0, 0, 0.76),
    0 0 78px rgba(90, 169, 255, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.topbar,
.identity,
.player,
.volume,
.games {
  display: flex;
  align-items: center;
}

.topbar {
  position: relative;
  justify-content: flex-start;
  gap: 14px;
  padding: 2px 2px 0;
}

.identity {
  min-width: 0;
  gap: 13px;
}

.avatar {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(90, 169, 255, 0.42), rgba(233, 74, 100, 0.26));
  box-shadow:
    inset 0 1px 14px rgba(255, 255, 255, 0.14),
    0 16px 38px rgba(0, 0, 0, 0.38),
    0 0 32px rgba(90, 169, 255, 0.12);
  overflow: visible;
}

.avatar span {
  font-weight: 900;
  letter-spacing: 0;
}

.avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 220ms ease;
}

.avatar img.loaded {
  opacity: 1;
}

.avatar-status {
  position: absolute;
  right: -4px;
  bottom: -2px;
  width: 16px;
  height: 16px;
  border: 4px solid rgba(12, 13, 17, 0.98);
  border-radius: 50%;
  background: #8a8f9c;
  box-shadow: 0 0 16px rgba(138, 143, 156, 0.35);
  box-sizing: content-box;
}

.avatar-status::before,
.avatar-status::after {
  content: "";
  position: absolute;
  display: none;
}

.avatar-status.status-online {
  background: #54e18a;
  box-shadow: 0 0 16px rgba(84, 225, 138, 0.45);
}

.avatar-status.status-idle {
  background: #f0b85a;
  box-shadow: 0 0 16px rgba(240, 184, 90, 0.45);
}

.avatar-status.status-idle::before {
  display: block;
  top: -1px;
  right: -1px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: rgba(12, 13, 17, 0.96);
}

.avatar-status.status-dnd {
  background: #e94a64;
  box-shadow: 0 0 16px rgba(233, 74, 100, 0.45);
}

.avatar-status.status-dnd::before {
  display: block;
  top: 6px;
  left: 4px;
  width: 9px;
  height: 4px;
  border-radius: 999px;
  background: #fff;
}

.avatar-status.status-offline {
  background: #8a8f9c;
  box-shadow: 0 0 16px rgba(138, 143, 156, 0.35);
}

.avatar-status.status-offline::before {
  display: block;
  inset: 3.5px;
  border-radius: 50%;
  background: rgba(12, 13, 17, 0.96);
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  overflow: hidden;
  font-size: 1.2rem;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 8px 26px rgba(0, 0, 0, 0.38);
}

.status {
  width: fit-content;
  max-width: 260px;
  display: flex;
  gap: 7px;
  align-items: center;
  margin-top: 6px;
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
  font-size: 0.78rem;
}

#statusText {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-icon {
  flex: 0 0 auto;
  width: 16px;
  min-width: 16px;
  color: rgba(247, 247, 251, 0.72);
  font-size: 0.92rem;
  line-height: 1;
  text-align: center;
}

.activity-icon.fa-spotify {
  color: #1db954;
}

.custom-status {
  overflow: hidden;
  max-width: 230px;
  margin-top: 4px;
  color: rgba(247, 247, 251, 0.54);
  font-size: 0.76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.divider {
  position: relative;
  overflow: hidden;
  height: 2px;
  margin: 18px 4px 16px;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
}

.divider::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -35%;
  width: 34%;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, rgba(247, 247, 251, 0.92), rgba(90, 169, 255, 0.95), rgba(233, 74, 100, 0.86), transparent);
  box-shadow: 0 0 18px rgba(90, 169, 255, 0.34), 0 0 22px rgba(233, 74, 100, 0.24);
  animation: separator-slide 3.8s ease-in-out infinite;
}

.player {
  position: relative;
  gap: 13px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.105);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.035)),
    rgba(255, 255, 255, 0.04);
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.cover {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.9), transparent 8%),
    conic-gradient(from 60deg, #101218, var(--blue), #18202b, var(--red), #101218);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.2),
    0 14px 30px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

#trackCover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 220ms ease;
}

#trackCover.loaded {
  opacity: 1;
}

#fallbackCover {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #050506;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.24);
}

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

.label {
  margin-bottom: 4px;
  color: rgba(247, 247, 251, 0.46);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.track h2 {
  overflow: hidden;
  font-size: 0.95rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track p:last-child {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
}

.icon-button {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.09);
  color: var(--text);
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease;
}

.icon-button:hover,
.games a:hover,
.contact:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.13);
}

.play-shape {
  width: 0;
  height: 0;
  margin-left: 3px;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 12px solid currentColor;
}

.pause-shape {
  position: relative;
  width: 15px;
  height: 16px;
}

.pause-shape::before,
.pause-shape::after {
  content: "";
  position: absolute;
  top: 0;
  width: 5px;
  height: 16px;
  border-radius: 2px;
  background: currentColor;
}

.pause-shape::before {
  left: 1px;
}

.pause-shape::after {
  right: 1px;
}

.volume {
  justify-content: space-between;
  margin: 16px 2px 8px;
  color: var(--muted);
  font-size: 0.78rem;
}

.volume strong {
  color: rgba(247, 247, 251, 0.8);
}

.range {
  width: 100%;
  height: 4px;
  accent-color: var(--blue);
  cursor: pointer;
}

.games {
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.105);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.035)),
    rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.075);
}

.games a {
  display: grid;
  place-items: center;
  width: 44px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 15px;
  color: var(--text);
  font-size: 1rem;
  text-decoration: none;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.18);
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.games a:hover {
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.26), 0 0 24px rgba(255, 255, 255, 0.06);
}

.games a:nth-child(1) {
  background: rgba(90, 169, 255, 0.24);
}

.games a:nth-child(2) {
  background: rgba(84, 225, 138, 0.22);
}

.games a:nth-child(3) {
  background: rgba(247, 247, 251, 0.1);
}

.games a:nth-child(4) {
  background: rgba(233, 74, 100, 0.24);
}

.games a:nth-child(5) {
  background: rgba(240, 184, 90, 0.24);
}

.contact {
  display: block;
  width: min(260px, 100%);
  margin: 14px auto 0;
  padding: 13px 16px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 16px;
  background:
    linear-gradient(90deg, rgba(90, 169, 255, 0.12), rgba(233, 74, 100, 0.12)),
    rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.contact:hover {
  box-shadow: 0 0 28px rgba(233, 74, 100, 0.23);
}

@keyframes separator-slide {
  0%,
  100% {
    transform: translateX(0);
    opacity: 0;
  }

  18%,
  82% {
    opacity: 0.95;
  }

  100% {
    transform: translateX(395%);
  }
}

@media (max-width: 460px) {
  .stage {
    padding: 16px;
  }

  .profile-card {
    padding: 15px;
    border-radius: 20px;
  }

  .games {
    gap: 8px;
  }

  .games a {
    width: 42px;
    height: 42px;
  }
}

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