:root {
  --pointer-x: 50%;
  --pointer-y: 50%;
  --pointer-from-center: 0;
  --pointer-from-top: 0.5;
  --pointer-from-left: 0.5;
  --card-opacity: 0;
  --rotate-x: 0deg;
  --rotate-y: 0deg;
  --background-x: 50%;
  --background-y: 50%;
  --grain: none;
  --icon: none;
  --behind-gradient: none;
  --inner-gradient: none;
  --sunpillar-1: hsl(2, 100%, 73%);
  --sunpillar-2: hsl(53, 100%, 69%);
  --sunpillar-3: hsl(93, 100%, 69%);
  --sunpillar-4: hsl(176, 100%, 76%);
  --sunpillar-5: hsl(228, 100%, 74%);
  --sunpillar-6: hsl(283, 100%, 73%);
  --sunpillar-clr-1: var(--sunpillar-1);
  --sunpillar-clr-2: var(--sunpillar-2);
  --sunpillar-clr-3: var(--sunpillar-3);
  --sunpillar-clr-4: var(--sunpillar-4);
  --sunpillar-clr-5: var(--sunpillar-5);
  --sunpillar-clr-6: var(--sunpillar-6);
  --card-radius: 30px;
}

.profile-card-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.3s ease;
}

.profile-card-wrapper::before {
  content: '';
  position: absolute;
  inset: -10px;
  background: inherit;
  background-position: inherit;
  border-radius: inherit;
  transition: all 0.5s ease;
  filter: contrast(2) saturate(2) blur(36px);
  transform: scale(0.8) translate3d(0, 0, 0.1px);
  background-size: 100% 100%;
  background-image: var(--behind-gradient);
}

.profile-card-wrapper:hover,
.profile-card-wrapper.active {
  --card-opacity: 1;
}

.profile-card-wrapper:hover::before,
.profile-card-wrapper.active::before {
  filter: contrast(1) saturate(2) blur(40px) opacity(1);
  transform: scale(0.9) translate3d(0, 0, 0.1px);
}

.profile-card {
  position: relative;
  width: 100%;
  max-width: 400px;
  aspect-ratio: 3/4;
  perspective: 1000px;
  transform-style: preserve-3d;
  cursor: pointer;
  height: 80svh;
  max-height: 540px;
  display: grid;
  border-radius: var(--card-radius);
  background-blend-mode: color-dodge, normal, normal, normal;
  animation: glow-bg 12s linear infinite;
  box-shadow: rgba(0, 0, 0, 0.8) calc((var(--pointer-from-left) * 10px) - 3px) calc((var(--pointer-from-top) * 20px) - 6px) 20px -5px;
  transition: transform 1s ease;
  transform: translate3d(0, 0, 0.1px) rotateX(0deg) rotateY(0deg);
  background-size: 100% 100%;
  background-position: 0 0, 0 0, 50% 50%, 0 0;
  background-image: radial-gradient(farthest-side circle at var(--pointer-x) var(--pointer-y), hsla(266, 100%, 90%, var(--card-opacity)) 4%, hsla(266, 50%, 80%, calc(var(--card-opacity) * 0.75)) 10%, hsla(266, 25%, 70%, calc(var(--card-opacity) * 0.5)) 50%, hsla(266, 0%, 60%, 0) 100%), radial-gradient(35% 52% at 55% 20%, #00ffaac4 0%, #073aff00 100%), radial-gradient(100% 100% at 50% 50%, #00c1ffff 1%, #073aff00 76%), conic-gradient(from 124deg at 50% 50%, #c137ffff 0%, #07c6ffff 40%, #07c6ffff 60%, #c137ffff 100%);
  overflow: hidden;
}

.profile-card:hover,
.profile-card.active {
  transition: none;
  transform: translate3d(0, 0, 0.1px) rotateX(var(--rotate-y)) rotateY(var(--rotate-x));
}

.profile-card * {
  display: grid;
  grid-area: 1/-1;
  border-radius: var(--card-radius);
  transform: translate3d(0, 0, 0.1px);
  pointer-events: none;
}

.profile-card-inside {
  position: relative;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(26, 26, 26, 0.9) 0%,
    rgba(42, 42, 42, 0.9) 50%,
    rgba(26, 26, 26, 0.9) 100%
  );
  border-radius: 16px;
  overflow: hidden;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  transition: transform 0.3s ease;
}

.profile-card-inside::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(192, 192, 192, 0.1) 0%,
    rgba(255, 255, 255, 0.15) 50%,
    rgba(192, 192, 192, 0.1) 100%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.profile-card:hover .profile-card-inside::before {
  opacity: 1;
}

.profile-card-shine {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    45deg,
    transparent 0%,
    rgba(192, 192, 192, 0.1) 25%,
    rgba(255, 255, 255, 0.2) 50%,
    rgba(192, 192, 192, 0.1) 75%,
    transparent 100%
  );
  transform: translateX(-100%);
  transition: transform 0.6s ease;
  pointer-events: none;
  z-index: 2;
}

.profile-card:hover .profile-card-shine {
  transform: translateX(100%);
}

.profile-card-glare {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    transparent 0%,
    rgba(192, 192, 192, 0.05) 25%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(192, 192, 192, 0.05) 75%,
    transparent 100%
  );
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
  z-index: 2;
}

.profile-card:hover .profile-card-glare {
  opacity: 1;
}

.profile-card-avatar-content {
  position: relative;
  z-index: 1;
  mix-blend-mode: screen;
  overflow: hidden;
}

.profile-card-avatar-content .avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  transition: transform 0.3s ease;
  position: absolute;
  left: 50%;
  transform: translateX(-50%) scale(1);
  bottom: 2px;
  opacity: calc(1.75 - var(--pointer-from-center));
}

.profile-card-avatar-content::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  backdrop-filter: blur(30px);
  mask: linear-gradient(to bottom,
      rgba(0, 0, 0, 0) 0%,
      rgba(0, 0, 0, 0) 60%,
      rgba(0, 0, 0, 1) 90%,
      rgba(0, 0, 0, 1) 100%);
  pointer-events: none;
}

.profile-card-user-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.8) 0%,
    rgba(0, 0, 0, 0.4) 50%,
    transparent 100%
  );
  transform-style: preserve-3d;
  backface-visibility: hidden;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(30px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  pointer-events: auto;
}

.profile-card-user-details {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  transform-style: preserve-3d;
  backface-visibility: hidden;
}

.profile-card-mini-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--accent);
  transform-style: preserve-3d;
  backface-visibility: hidden;
  flex-shrink: 0;
}

.profile-card-mini-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  transform-style: preserve-3d;
  backface-visibility: hidden;
}

.profile-card-user-text {
  transform-style: preserve-3d;
  backface-visibility: hidden;
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 6px;
}

.profile-card-handle {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.25rem;
  transform-style: preserve-3d;
  backface-visibility: hidden;
}

.profile-card-status {
  font-size: 0.875rem;
  color: var(--accent);
  transform-style: preserve-3d;
  backface-visibility: hidden;
}

.profile-card-contact-btn {
  background: linear-gradient(90deg, var(--accent) 0%, #D0D0D0 100%);
  color: var(--primary);
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  transform-style: preserve-3d;
  backface-visibility: hidden;
}

.profile-card-contact-btn:hover {
  background: linear-gradient(90deg, #D0D0D0 0%, var(--accent) 100%);
  transform: translateY(-2px);
}

.profile-card-content {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  max-height: 100%;
  overflow: hidden;
  text-align: center;
  z-index: 5;
  mix-blend-mode: luminosity;
}

.profile-card-details {
  text-align: center;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  width: 100%;
  position: absolute;
  top: 3em;
  display: flex;
  flex-direction: column;
}

.profile-card-details h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
  transform-style: preserve-3d;
  backface-visibility: hidden;
}

.profile-card-details p {
  font-size: 1rem;
  color: var(--accent);
  transform-style: preserve-3d;
  backface-visibility: hidden;
}

@keyframes glow-bg {
  0% {
    --bgrotate: 0deg;
  }

  100% {
    --bgrotate: 360deg;
  }
}

@media (max-width: 768px) {
  .profile-card {
    height: 70svh;
    max-height: 450px;
  }

  .profile-card-details {
    top: 2em;
  }

  .profile-card-details h3 {
    font-size: min(4svh, 2.5em);
  }

  .profile-card-details p {
    font-size: 14px;
  }

  .profile-card-user-info {
    bottom: 15px;
    left: 15px;
    right: 15px;
    padding: 10px 12px;
  }

  .profile-card-mini-avatar {
    width: 28px;
    height: 28px;
  }

  .profile-card-user-details {
    gap: 10px;
  }

  .profile-card-handle {
    font-size: 13px;
  }

  .profile-card-status {
    font-size: 10px;
  }

  .profile-card-contact-btn {
    padding: 6px 12px;
    font-size: 11px;
  }
}

@media (max-width: 480px) {
  .profile-card {
    height: 60svh;
    max-height: 380px;
  }

  .profile-card-details {
    top: 1.5em;
  }

  .profile-card-details h3 {
    font-size: min(3.5svh, 2em);
  }

  .profile-card-details p {
    font-size: 12px;
    top: -8px;
  }

  .profile-card-user-info {
    bottom: 12px;
    left: 12px;
    right: 12px;
    padding: 8px 10px;
    border-radius: 50px;
  }

  .profile-card-mini-avatar {
    width: 24px;
    height: 24px;
  }

  .profile-card-user-details {
    gap: 8px;
  }

  .profile-card-handle {
    font-size: 12px;
  }

  .profile-card-status {
    font-size: 9px;
  }

  .profile-card-contact-btn {
    padding: 5px 10px;
    font-size: 10px;
    border-radius: 50px;
  }
}

@media (max-width: 320px) {
  .profile-card {
    height: 55svh;
    max-height: 320px;
  }

  .profile-card-details h3 {
    font-size: min(3svh, 1.5em);
  }

  .profile-card-details p {
    font-size: 11px;
  }

  .profile-card-user-info {
    padding: 6px 8px;
    border-radius: 50px;
  }

  .profile-card-mini-avatar {
    width: 20px;
    height: 20px;
  }

  .profile-card-user-details {
    gap: 6px;
  }

  .profile-card-handle {
    font-size: 11px;
  }

  .profile-card-status {
    font-size: 8px;
  }

  .profile-card-contact-btn {
    padding: 4px 8px;
    font-size: 9px;
    border-radius: 50px;
  }
} 