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

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

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  background: #1e1e2e;
  overflow-x: hidden;
  padding-bottom: 44px;
}

#page-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 5, 40, 0.45);
  z-index: 0;
  pointer-events: none;
}

canvas#bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  filter: blur(40px) saturate(1.6);
  opacity: 1;
  z-index: 0;
}

.page {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.glass {
  background: rgba(24, 24, 37, 0.90);
  border: 1px solid rgba(205, 214, 244, 0.10);
  border-radius: 20px;
  padding: 36px 40px;
  width: 100%;
  max-width: 420px;
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  box-shadow: 0 8px 48px rgba(0,0,0,0.4);
  animation: card-in 0.45s cubic-bezier(0, 0.57, 0.25, 1) both;
}

/* Avatar */
.avatar-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid rgba(203, 166, 247, 0.5);
  background: #313244;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.avatar-placeholder {
  font-size: 28px;
  color: #cba6f7;
  font-weight: 500;
  line-height: 1;
}

/* Text */
.name {
  text-align: center;
  font-size: 24px;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.02em;
  margin-bottom: 4px;
}

.bio {
  text-align: center;
  font-size: 14px;
  color: rgba(255,255,255,0.38);
  margin-bottom: 30px;
  letter-spacing: 0.03em;
  line-height: 1.6;
}

/* Music Player */
.player {
  position: relative;
  height: 116px;
  border-radius: 14px;
  border: 1px solid rgba(203, 166, 247, 0.12);
  margin-top: 30px;
  background: rgba(24, 24, 37, 0.60);
  transition: transform 0.22s cubic-bezier(0, 0.57, 0.25, 1), box-shadow 0.22s cubic-bezier(0, 0.57, 0.25, 1), border-color 0.22s cubic-bezier(0, 0.57, 0.25, 1);
}

.player.has-track:hover {
  border-color: rgba(29, 185, 84, 0.35);
  transform: scale(1.025) translateY(-1px);
  box-shadow: 0 6px 24px rgba(29, 185, 84, 0.12), 0 2px 8px rgba(0,0,0,0.3);
}

.player:not(.has-track) .player-spotify-icon {
  opacity: 0;
  pointer-events: none;
}

.player-inner {
  position: absolute;
  inset: 0;
  border-radius: 14px;
  overflow: hidden;
}

.player-art {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: 0.6s ease;
  opacity: 0;
}

.player-art.loaded { opacity: 1; }

.player-spotify-icon {
  position: absolute;
  top: 10px;
  left: 12px;
  font-size: 20px;
  color: #1db954;
  opacity: 0.7;
  z-index: 2;
  pointer-events: none;
  transition: opacity 0.3s;
}

.player-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.25) 100%);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.player-silence {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: rgba(255,255,255,0.20);
  letter-spacing: 0.08em;
  font-style: italic;
}

.player-content {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 12px 14px;
}

.player-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
  padding-right: 10px;
}

.player-title {
  font-size: 14px;
  color: rgba(255,255,255,0.85);
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 6px rgba(0,0,0,0.8);
}

.player-artist {
  font-size: 12px;
  color: rgba(255,255,255,0.65);
  letter-spacing: 0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 6px rgba(0,0,0,0.8);
}

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

.player-btn {
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.85);
  cursor: pointer;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 12px;
  line-height: 1;
  transition: 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.player-btn:hover { background: rgba(203,166,247,0.25); color: #fff; }

/* Volume */
.player-volume {
  position: relative;
  display: flex;
  align-items: center;
}

.player-slider-wrap {
  overflow: hidden;
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  left: auto;
  transform: none;
  width: 30px;
  height: 0;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s ease;
  transition-delay: 0s, 0s;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 20, 30, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
}

.player-volume:hover .player-slider-wrap {
  height: 56px;
  opacity: 1;
  pointer-events: all;
  transition-delay: 0s;
}

.player-slider-wrap {
  transition-delay: 0.4s;
}

/* transparent bridge on the button extends upward to fill the 8px gap */
#player-vol-btn {
  position: relative;
}
#player-vol-btn::after {
  content: '';
  position: absolute;
  top: -8px;
  left: 0;
  width: 100%;
  height: 8px;
}

.player-slider {
  -webkit-writing-mode: vertical-lr;
  writing-mode: vertical-lr;
  direction: rtl;
  -webkit-appearance: slider-vertical;
  width: 3px;
  height: 46px;
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  accent-color: #cba6f7;
  background: rgba(255,255,255,0.15);
}

.player-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #cba6f7;
  cursor: pointer;
}

.player-slider::-moz-range-thumb {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #cba6f7;
  border: none;
  cursor: pointer;
}

/* Links */
.links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.link-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(49, 50, 68, 0.6);
  border: 1px solid rgba(205, 214, 244, 0.06);
  text-decoration: none;
  transition: 0.25s cubic-bezier(0, 0.57, 0.25, 1);
  cursor: pointer;
}

.link-item:hover {
  background: rgba(60, 48, 80, 0.82);
  border-color: rgba(203, 166, 247, 0.28);
  transform: scale(1.025) translateY(-1px);
  box-shadow: 0 6px 24px rgba(203, 166, 247, 0.10), 0 2px 8px rgba(0,0,0,0.3);
  transition: none;
}

.link-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 20px;
  background: transparent !important;
}

.link-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
}

.link-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  color: rgba(255,255,255,0.65);
  font-weight: 400;
  letter-spacing: 0.04em;
}

.link-handle {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: rgba(255,255,255,0.38);
  letter-spacing: 0.03em;
}

.link-arrow {
  font-size: 17px;
  color: rgba(255,255,255,0.28);
  flex-shrink: 0;
  transition: 0.25s cubic-bezier(0, 0.57, 0.25, 1);
}

.link-item:hover .link-arrow {
  color: #ffffff8d;
  transition: none;
}

/* Steam status badge */
.steam-status {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  position: relative;
  cursor: default;
}

.steam-status::before {
  content: attr(data-status);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: #1a1a2e;
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.04em;
  box-shadow: 0 2px 12px rgba(0,0,0,0.6), 0 0 0 1px rgba(205,214,244,0.12);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 10;
}

.steam-status::after {
  content: '';
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #1a1a2e;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 10;
}

.steam-status:hover::before,
.steam-status:hover::after {
  opacity: 1;
}

.steam-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #585b70;
  flex-shrink: 0;
  transition: background 0.3s;
}

.steam-dot--online  { background: #57cbde; box-shadow: 0 0 6px #57cbde88; animation: glow-online 3s infinite ease-in-out;}
.steam-dot--ingame  { background: #90ba3c; box-shadow: 0 0 6px #90ba3c88; animation: glow-ingame 3s infinite ease-in-out;}
.steam-dot--offline { background: #585b70; }

.steam-state {
  font-size: 12px;
  color: rgba(255,255,255,0.38);
  letter-spacing: 0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
  transition: color 0.3s;
}

.steam-dot--online  ~ .steam-state,
#steam-status:has(.steam-dot--online)  .steam-state { color: #57cbde; }
#steam-status:has(.steam-dot--ingame)  .steam-state { color: #90ba3c; }

/* Footer */
.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 7px 28px;
  font-size: 11px;
  color: rgba(255,255,255,0.38);
  letter-spacing: 0.08em;
  background: rgba(24, 24, 37, 0.90);
  border-top: 1px solid rgba(205, 214, 244, 0.08);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
}

.footer-heart {
  color: #cba6f7;
  opacity: 0.6;
}

.footer-sep {
  color: #1e1e2e;
  opacity: 0.6;
}

@keyframes glow-online {
  0% {
    box-shadow: 0 0 6px 2px #57cbde88
  }

  50% {
    box-shadow: 0 0 6px 0px #57cbde88
  }

  100% {
    box-shadow: 0 0 6px 2px #57cbde88
  }
}

@keyframes glow-ingame {
  0% {
    box-shadow: 0 0 6px 2px #90ba3c88
  }

  50% {
    box-shadow: 0 0 6px 0px #90ba3c88
  }

  100% {
    box-shadow: 0 0 6px 2px #90ba3c88
  }
}

/* Responsive */
@media (max-width: 480px) {
  .glass {
    padding: 28px 20px;
  }

  body {
    padding-bottom: 56px;
  }
}

@media (max-width: 360px) {
  .glass {
    padding: 20px 14px;
    border-radius: 14px;
  }

  .name {
    font-size: 17px;
  }

  .link-item {
    padding: 9px 10px;
    gap: 9px;
  }

  .link-icon {
    width: 28px;
    height: 28px;
    font-size: 15px;
  }

  body {
    padding-bottom: 60px;
  }
}
