
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
  
}

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 115px;
  padding-bottom: 20px;
  background: linear-gradient(160deg, #050505, #0b0b0b 60%, #050505);
  color: #fff;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(106,17,203,0.18), transparent 55%),
    radial-gradient(circle at 80% 70%, rgba(37,117,252,0.18), transparent 55%);
  z-index: -1;
}

.intro {
  position: fixed;
  inset: 0;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: introFade 2.2s ease forwards;
  z-index: 10;
}

.intro h1 {
  font-family: 'Manrope', sans-serif;
  font-weight: 300;
  letter-spacing: 5px;
  opacity: 0;
  animation: introText 1.6s ease forwards;
}

@keyframes introFade {
  0% { opacity: 1; }
  75% { opacity: 1; }
  100% { opacity: 0; visibility: hidden; }
}

@keyframes introText {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.avatar{
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.avatar .avatar-back{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;

  opacity: 0;
  transform: rotateY(180deg);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;

  pointer-events: none;
}

.avatar > img:not(.avatar-back){
  position: relative;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.avatar{
  perspective: 900px;
}

.avatar > img,
.avatar .avatar-back{
  transition: transform 420ms cubic-bezier(.2,.7,.2,1), opacity 220ms ease;
  transform-style: preserve-3d;
  will-change: transform, opacity;
}

.avatar:active{
  transform: scale(0.96);
}

@keyframes avatarMicroJitter{
  0%,100% { transform: translate3d(0,0,0) rotate(0.2deg); }
  25%     { transform: translate3d(0.35px,-0.25px,0) rotate(-0.15deg); }
  50%     { transform: translate3d(-0.30px,0.20px,0) rotate(0.12deg); }
  75%     { transform: translate3d(0.18px,0.28px,0) rotate(-0.10deg); }
}

.avatar:not(.avatar-flip-active) > img:not(.avatar-back){
  animation: avatarMicroJitter 2.8s ease-in-out infinite;
}

.avatar.avatar-flip-active > img:not(.avatar-back){
  animation: none;
  transform: rotateY(180deg);
  opacity: 0;
}

.avatar.avatar-flip-active .avatar-back{
  opacity: 1;
  transform: rotateY(0deg);
}

@media (prefers-reduced-motion: reduce){
  .avatar > img:not(.avatar-back){ animation: none !important; }
  .avatar > img, .avatar .avatar-back{ transition: none !important; }
}

.name {
  font-family: 'Manrope', sans-serif;
  text-align: center;
  font-size: 26px;
  font-weight: 600;
  margin-bottom: 10px;
  text-shadow:
    0 0 6px rgba(106,17,203,0.45),
    0 0 12px rgba(37,117,252,0.35);
}

.desc {
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  opacity: 0.75;
  margin-bottom: 26px;
  line-height: 1.5;
  text-align: center;
}

.actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.action {
  font-family: 'Manrope', sans-serif;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  position: relative;
  overflow: hidden;
  transition: background 0.25s ease, transform 0.25s ease;
}

.action::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: conic-gradient(
    from 0deg,
    transparent,
    rgba(106,17,203,0.6),
    rgba(37,117,252,0.6),
    transparent
  );
  filter: blur(10px);
  opacity: 0.35;
  animation: glowSpin 10s linear infinite;
}

@keyframes glowSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.action > * {
  position: relative;
  z-index: 1;
}

.action img {
  width: 20px;
  height: 20px;
}

.action:hover {
  background: rgba(255,255,255,0.14);
  transform: translateY(-2px);
}

.spotify-box {
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.45);
  animation: spotifyFadeIn 0.6s ease;
}

@keyframes spotifyFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.sp-cover {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
}

@keyframes coverPulse {
  0% { transform: scale(1); box-shadow: 0 0 10px rgba(30,215,96,0.35); }
  50% { transform: scale(1.05); box-shadow: 0 0 18px rgba(30,215,96,0.6); }
  100% { transform: scale(1); }
}

.sp-info {
  flex: 1;
}

.sp-title {
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  font-weight: 600;
}

.sp-artist {
  font-family: 'Manrope', sans-serif;
  font-size: 12px;
  opacity: 0.65;
  margin-bottom: 8px;
}

.sp-progress {
  height: 5px;
  background: rgba(255,255,255,0.15);
  border-radius: 6px;
  overflow: hidden;
}

.sp-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #1db954, #1ed760, #1db954);
  background-size: 200% 100%;
  animation: barFlow 2s linear infinite;
  transition: width 0.6s ease;
}

@keyframes barFlow {
  from { background-position: 0% 50%; }
  to { background-position: 200% 50%; }
}

.now-listening {
  font-family: 'Manrope', sans-serif;
  position: absolute;
  top: -10px;
  right: -10px;
  padding: 6px 10px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  border-radius: 10px;
  background: rgba(30,215,96,0.15);
  border: 1px solid rgba(30,215,96,0.6);
  color: #1ed760;
  backdrop-filter: blur(8px);
  box-shadow: 0 0 12px rgba(30,215,96,0.45);
  animation: listeningPulse 1.8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes listeningPulse {
  0% {
    box-shadow: 0 0 8px rgba(30,215,96,0.4);
  }
  50% {
    box-shadow: 0 0 16px rgba(30,215,96,0.8);
  }
  100% {
    box-shadow: 0 0 8px rgba(30,215,96,0.4);
  }
}

.footer {
  margin-top: 22px;
  font-size: 12px;
  opacity: 0.5;
  text-align: center;
}
.avatar {
  position: relative;
  margin: -55px auto 8px auto;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255,255,255,0.25);
  box-shadow: 0 10px 30px rgba(0,0,0,0.6);
  z-index: 2;
  overflow: visible;
}

.avatar img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.ig-stalk-card{
  font-family: 'Manrope', sans-serif;
  display: none;
  position: absolute;
  top: auto;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 14px;
  border-radius: 16px;
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(255,255,255,0.18);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.55);
  text-align: center;
  z-index: 3;
  min-width: 170px;
}

.ig-stalk-title{
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .2px;
}

.ig-stalk-sub{
  margin-top: 2px;
  font-size: 11px;
  opacity: 0.75;
}

.ig-stalk-card::after{
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  transform: translateX(-50%) rotate(45deg);
  width: 12px;
  height: 12px;
  background: rgba(0,0,0,0.55);
  border-right: 1px solid rgba(255,255,255,0.18);
  border-bottom: 1px solid rgba(255,255,255,0.18);
}

html.from-ig .ig-stalk-card{
  display: block;
  animation: igPop .45s cubic-bezier(.2,.8,.2,1) both;
}

@keyframes igPop{
  from { opacity: 0; transform: translateX(-50%) translateY(6px) scale(.98); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

.ig-eye {
  position: absolute;
  top: -8px;
  right: -8px;
  font-size: 18px;
  padding: 4px 6px;
  animation: eyePulse 1.8s ease-in-out infinite;
}

@keyframes eyePulse {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.15); }
  100% { transform: scale(1); }
}

