/* ===================================
   3D PROFILE CARD COMPONENT
   =================================== */

.pc-card-wrapper {
  perspective: 500px;
  transform: translate3d(0, 0, 0.1px);
  position: relative;
  touch-action: none;
}

.pc-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: radial-gradient(circle at 50% 50%, var(--primary) 0%, transparent 70%);
}

.pc-card-wrapper:hover,
.pc-card-wrapper.active {
  --card-opacity: 1;
}

.pc-card-wrapper:hover::before,
.pc-card-wrapper.active::before {
  filter: contrast(1) saturate(2) blur(40px) opacity(0.8);
  transform: scale(0.9) translate3d(0, 0, 0.1px);
}

.pc-card {
  height: 80svh;
  max-height: 540px;
  display: grid;
  aspect-ratio: 0.718;
  border-radius: var(--card-radius);
  position: relative;
  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, 0 0 0 2px var(--primary), 0 0 20px rgba(0, 255, 136, 0.3);
  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),
      rgba(0, 255, 136, var(--card-opacity)) 4%,
      rgba(0, 255, 136, calc(var(--card-opacity) * 0.5)) 10%,
      rgba(0, 255, 136, calc(var(--card-opacity) * 0.2)) 50%,
      transparent 100%
    ), radial-gradient(35% 52% at 55% 20%, rgba(0, 255, 136, 0.3) 0%, transparent 100%),
    radial-gradient(100% 100% at 50% 50%, rgba(0, 255, 136, 0.2) 1%, transparent 76%),
    linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
  overflow: hidden;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.pc-card:hover,
.pc-card.active {
  transition: none;
  transform: translate3d(0, 0, 0.1px) rotateX(var(--rotate-y)) rotateY(var(--rotate-x));
  box-shadow: rgba(0, 0, 0, 0.8) calc((var(--pointer-from-left) * 15px) - 5px)
    calc((var(--pointer-from-top) * 25px) - 8px) 30px -5px, 0 0 0 3px var(--primary), 0 0 30px rgba(0, 255, 136, 0.6),
    inset 0 0 50px rgba(0, 255, 136, 0.1);
}

.pc-card * {
  border-radius: var(--card-radius);
  transform: translate3d(0, 0, 0.1px);
  pointer-events: none;
}

.pc-inside {
  position: absolute;
  inset: 2px;
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
  border-radius: calc(var(--card-radius) - 2px);
  transform: translate3d(0, 0, 0.01px);
  overflow: hidden;
}

.pc-shine {
  position: absolute;
  inset: 0;
  border-radius: var(--card-radius);
  transition: filter 0.6s ease;
  filter: brightness(0.8) contrast(1.2) saturate(1.5) opacity(0.7);
  animation: holo-bg 18s linear infinite;
  mix-blend-mode: overlay;
  background: repeating-linear-gradient(0deg, transparent 0%, rgba(0, 255, 136, 0.03) 2%, transparent 4%),
    repeating-linear-gradient(90deg, transparent 0%, rgba(0, 255, 136, 0.03) 2%, transparent 4%),
    radial-gradient(
      farthest-corner circle at var(--pointer-x) var(--pointer-y),
      rgba(0, 255, 136, 0.1) 12%,
      rgba(0, 255, 136, 0.05) 20%,
      transparent 50%
    );
  background-size: 20px 20px, 20px 20px, 100% 100%;
  z-index: 3;
}

.pc-card:hover .pc-shine,
.pc-card.active .pc-shine {
  filter: brightness(1.2) contrast(1.5) saturate(2) opacity(1);
  animation: none;
}

.pc-glare {
  position: absolute;
  inset: 0;
  border-radius: var(--card-radius);
  background-image: radial-gradient(
    farthest-corner circle at var(--pointer-x) var(--pointer-y),
    rgba(0, 255, 136, 0.2) 12%,
    rgba(0, 255, 136, 0.1) 20%,
    transparent 50%
  );
  mix-blend-mode: screen;
  filter: brightness(1.2) contrast(1.2);
  z-index: 4;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.pc-card:hover .pc-glare,
.pc-card.active .pc-glare {
  opacity: 1;
}

.pc-avatar-content {
  position: absolute;
  inset: 0;
  border-radius: var(--card-radius);
  overflow: hidden;
  z-index: 1;
}

.pc-avatar-content .avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  border-radius: var(--card-radius);
  opacity: calc(1.2 - var(--pointer-from-center) * 0.3);
  transition: opacity 0.3s ease;
}

.pc-avatar-content::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    transparent 40%,
    rgba(0, 0, 0, 0.3) 70%,
    rgba(0, 0, 0, 0.8) 100%
  );
  border-radius: var(--card-radius);
  pointer-events: none;
}

.pc-user-info {
  position: absolute;
  bottom: 20px;
  left: 20px;
  right: 20px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 255, 136, 0.3);
  border-radius: 15px;
  padding: 12px 14px;
  pointer-events: auto;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.pc-user-details {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pc-mini-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--primary);
  flex-shrink: 0;
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
}

.pc-mini-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.pc-user-text {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 4px;
}

.pc-handle {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  line-height: 1;
}

.pc-status {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1;
}

.pc-contact-btn {
  border: 1px solid var(--primary);
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  background: transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.pc-contact-btn:hover {
  background: var(--primary);
  color: var(--bg-primary);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 255, 136, 0.4);
}

.pc-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  text-align: center;
  z-index: 3;
  transform: translate3d(calc(var(--pointer-from-left) * -6px + 3px), calc(var(--pointer-from-top) * -6px + 3px), 0.1px) !important;
  pointer-events: none;
}

.pc-details {
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.pc-details h3 {
  font-weight: 800;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  margin: 0 0 0.5rem 0;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

.pc-details p {
  font-weight: 500;
  font-size: 1rem;
  margin: 0;
  color: var(--primary);
  text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

/* Green glow animation for edges */
@keyframes glow-bg {
  0% {
    box-shadow: rgba(0, 0, 0, 0.8) calc((var(--pointer-from-left) * 10px) - 3px)
      calc((var(--pointer-from-top) * 20px) - 6px) 20px -5px, 0 0 0 2px var(--primary), 0 0 20px rgba(0, 255, 136, 0.3);
  }
  50% {
    box-shadow: rgba(0, 0, 0, 0.8) calc((var(--pointer-from-left) * 10px) - 3px)
      calc((var(--pointer-from-top) * 20px) - 6px) 20px -5px, 0 0 0 2px var(--primary), 0 0 30px rgba(0, 255, 136, 0.6);
  }
  100% {
    box-shadow: rgba(0, 0, 0, 0.8) calc((var(--pointer-from-left) * 10px) - 3px)
      calc((var(--pointer-from-top) * 20px) - 6px) 20px -5px, 0 0 0 2px var(--primary), 0 0 20px rgba(0, 255, 136, 0.3);
  }
}

@keyframes holo-bg {
  0% {
    background-position: 0 0, 0 0, center;
  }
  100% {
    background-position: 20px 20px, 20px 20px, center;
  }
}
