: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: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMDAiIGhlaWdodD0iMzAwIj48ZmlsdGVyIGlkPSJhIiB4PSIwIiB5PSIwIj48ZmVUdXJidWxlbmNlIGJhc2VGcmVxdWVuY3k9Ii43NSIgc3RpdGNoVGlsZXM9InN0aXRjaCIgdHlwZT0iZnJhY3RhbE5vaXNlIi8+PGZlQ29sb3JNYXRyaXggdHlwZT0ic2F0dXJhdGUiIHZhbHVlcz0iMCIvPjwvZmlsdGVyPjxwYXRoIGQ9Ik0wIDBoMzAwdjMwMEgweiIgZmlsdGVyPSJ1cmwoI2EpIiBvcGFjaXR5PSIuMDUiLz48L3N2Zz4=');
  --icon: url('../mainlogo.png');
  --behind-gradient: 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%);
  --inner-gradient: linear-gradient(145deg,#60496e8c 0%,#71C4FF44 100%);
  --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;
}

.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: var(--behind-gradient);
}

.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(1);
  transform: scale(0.9) translate3d(0, 0, 0.1px);
}

/* Remove focus outline on touch devices */
.pc-card-wrapper,
.pc-card,
.pc-card * {
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.pc-card {
  height: 420px;
  max-height: 420px;
  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;
  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;
  will-change: transform;
}

/* Professional variant: calmer, crisper visuals */
.pc-pro .pc-card {
  animation: none;
  background-image: none;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.32);
  border: none;
  background-color: #111218; /* match panel to avoid translucent edge */
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.pc-pro .pc-card:hover,
.pc-pro .pc-card.active {
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.45);
}
.pc-pro .pc-card-wrapper::before,
.pc-pro .pc-card-wrapper:hover::before,
.pc-pro .pc-card-wrapper.active::before { display: none !important; }
.pc-pro .pc-inside {
  inset: 0;
  background-image: none;
  background-color: transparent; /* let card provide solid backdrop */
  border: none;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.pc-pro .pc-shine { display: none; }
.pc-pro .pc-glare { display: none; }
.pc-pro .pc-avatar-content::before { display: none; }
.pc-pro .pc-avatar-content { mix-blend-mode: normal; }
.pc-pro .pc-content { mix-blend-mode: normal; }
.pc-pro .pc-avatar-content .avatar {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: auto;
  filter: none;
  -webkit-filter: none;
}
.pc-pro .pc-details h3 {
  background: none;
  -webkit-text-fill-color: currentColor;
  color: #fff;
}
.pc-pro .pc-details p {
  background: none;
  -webkit-text-fill-color: currentColor;
  color: rgba(255,255,255,0.7);
}
.pc-pro .pc-user-info {
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(8px);
  border: none; /* remove subtle rim */
}
.pc-pro .pc-contact-btn {
  background: rgba(124, 92, 255, 0.25);
  border: 1px solid rgba(124, 92, 255, 0.4);
}
.pc-pro .pc-contact-btn:hover {
  background: rgba(124, 92, 255, 0.4);
  border-color: rgba(124, 92, 255, 0.6);
}

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

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

.pc-user-info {
  display: flex !important;
  pointer-events: auto !important;
}

.pc-user-details,
.pc-user-text,
.pc-mini-avatar,
.pc-contact-btn {
  display: flex !important;
  pointer-events: auto !important;
  transform: none !important;
}

.pc-handle,
.pc-status {
  display: block !important;
}

.pc-mini-avatar img {
  grid-area: initial !important;
  border-radius: 50% !important;
}

.pc-contact-btn {
  grid-area: initial !important;
  border-radius: 20px !important;
}

.pc-inside {
  inset: 1px;
  position: absolute;
  background-image: var(--inner-gradient);
  background-color: rgba(0, 0, 0, 0.9);
  transform: translate3d(0, 0, 0.01px);
}

.pc-shine {
  mask-image: var(--icon);
  mask-mode: luminance;
  mask-repeat: no-repeat;
  mask-size: 280px auto;
  mask-position: center 42%;
  transition: filter 0.6s ease;
  filter: brightness(0.66) contrast(1.33) saturate(0.33) opacity(0.15);
  animation: holo-bg 18s linear infinite;
  mix-blend-mode: color-dodge;
}

.pc-shine,
.pc-shine::after {
  --space: 5%;
  --angle: -45deg;
  transform: translate3d(0, 0, 1px);
  overflow: hidden;
  z-index: 3;
  background: transparent;
  background-size: cover;
  background-position: center;
  background-image:
    repeating-linear-gradient(
      0deg,
      var(--sunpillar-clr-1) calc(var(--space) * 1),
      var(--sunpillar-clr-2) calc(var(--space) * 2),
      var(--sunpillar-clr-3) calc(var(--space) * 3),
      var(--sunpillar-clr-4) calc(var(--space) * 4),
      var(--sunpillar-clr-5) calc(var(--space) * 5),
      var(--sunpillar-clr-6) calc(var(--space) * 6),
      var(--sunpillar-clr-1) calc(var(--space) * 7)
    ),
    repeating-linear-gradient(
      var(--angle),
      #0e152e 0%,
      hsl(180, 10%, 60%) 3.8%,
      hsl(180, 29%, 66%) 4.5%,
      hsl(180, 10%, 60%) 5.2%,
      #0e152e 10%,
      #0e152e 12%
    ),
    radial-gradient(
      farthest-corner circle at var(--pointer-x) var(--pointer-y),
      hsla(0, 0%, 0%, 0.1) 12%,
      hsla(0, 0%, 0%, 0.15) 20%,
      hsla(0, 0%, 0%, 0.25) 120%
    );
  background-position:
    0 var(--background-y),
    var(--background-x) var(--background-y),
    center;
  background-blend-mode: color, hard-light;
  background-size:
    500% 500%,
    300% 300%,
    200% 200%;
  background-repeat: repeat;
}

.pc-shine::before,
.pc-shine::after {
  content: '';
  background-position: center;
  background-size: cover;
  grid-area: 1/1;
  opacity: 0;
}

.pc-card:hover .pc-shine,
.pc-card.active .pc-shine {
  filter: brightness(0.85) contrast(1.5) saturate(0.5) opacity(0.25);
  animation: none;
}

.pc-card:hover .pc-shine::before,
.pc-card.active .pc-shine::before,
.pc-card:hover .pc-shine::after,
.pc-card.active .pc-shine::after {
  opacity: 1;
}

.pc-shine::before {
  background-image:
    linear-gradient(
      45deg,
      var(--sunpillar-4),
      var(--sunpillar-5),
      var(--sunpillar-6),
      var(--sunpillar-1),
      var(--sunpillar-2),
      var(--sunpillar-3)
    ),
    radial-gradient(circle at var(--pointer-x) var(--pointer-y), hsl(0, 0%, 70%) 0%, hsla(0, 0%, 30%, 0.2) 90%),
    var(--grain);
  background-size:
    250% 250%,
    100% 100%,
    220px 220px;
  background-position:
    var(--pointer-x) var(--pointer-y),
    center,
    calc(var(--pointer-x) * 0.01) calc(var(--pointer-y) * 0.01);
  background-blend-mode: color-dodge;
  filter: brightness(calc(2 - var(--pointer-from-center))) contrast(calc(var(--pointer-from-center) + 2))
    saturate(calc(0.5 + var(--pointer-from-center)));
  mix-blend-mode: luminosity;
}

.pc-shine::after {
  background-position:
    0 var(--background-y),
    calc(var(--background-x) * 0.4) calc(var(--background-y) * 0.5),
    center;
  background-size:
    200% 300%,
    700% 700%,
    100% 100%;
  mix-blend-mode: difference;
  filter: brightness(0.8) contrast(1.5);
}

.pc-glare {
  transform: translate3d(0, 0, 1.1px);
  overflow: hidden;
  background-image: radial-gradient(
    farthest-corner circle at var(--pointer-x) var(--pointer-y),
    hsl(248, 25%, 80%) 12%,
    hsla(207, 40%, 30%, 0.8) 90%
  );
  mix-blend-mode: overlay;
  filter: brightness(0.8) contrast(1.2);
  z-index: 4;
}

.pc-avatar-content {
  mix-blend-mode: screen;
  overflow: hidden;
}

.pc-avatar-content .avatar {
  width: 100%;
  position: absolute;
  left: 50%;
  transform: translateX(-50%) scale(1);
  bottom: 2px;
  opacity: 1 !important;
}

.pc-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;
}

.pc-user-info {
  position: absolute;
  bottom: 16px;
  left: 16px;
  right: 16px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(30px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  padding: 10px 12px;
  pointer-events: auto;
}

.pc-user-details {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.pc-mini-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.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;
  min-width: 0;
  flex: 1;
}

.pc-handle {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.2;
  letter-spacing: -0.01em;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.pc-status {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.2;
  letter-spacing: 0.01em;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

.pc-contact-btn {
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(124, 92, 255, 0.15);
  border-radius: 20px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 600;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  color: rgba(255, 255, 255, 0.95);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(20px);
  letter-spacing: 0.01em;
  text-transform: none;
  white-space: nowrap;
  flex-shrink: 0;
  pointer-events: auto;
  position: relative;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.pc-contact-btn:hover {
  background: rgba(124, 92, 255, 0.3);
  border-color: rgba(124, 92, 255, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(124, 92, 255, 0.3);
}

.pc-content {
  max-height: 100%;
  overflow: hidden;
  text-align: center;
  position: relative;
  transform: translate3d(
    calc(var(--pointer-from-left) * -6px + 3px),
    calc(var(--pointer-from-top) * -6px + 3px),
    0.1px
  ) !important;
  z-index: 5;
  mix-blend-mode: luminosity;
}

.pc-details {
  width: 100%;
  position: absolute;
  top: 1.5em;
  display: flex;
  flex-direction: column;
}

.pc-details h3 {
  font-weight: 700;
  margin: 0;
  font-size: 1.6rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background-image: linear-gradient(to bottom, #fff, #6f6fbe);
  background-size: 1em 1.5em;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  -webkit-background-clip: text;
}

.pc-details p {
  font-weight: 500;
  position: relative;
  top: -6px;
  white-space: nowrap;
  font-size: 13px;
  margin: 0 auto;
  width: min-content;
  letter-spacing: 0.01em;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background-image: linear-gradient(to bottom, #fff, #4a4ac0);
  background-size: 1em 1.5em;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  -webkit-background-clip: text;
}

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

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

@keyframes holo-bg {
  0% {
    background-position:
      0 var(--background-y),
      0 0,
      center;
  }

  100% {
    background-position:
      0 var(--background-y),
      90% 90%,
      center;
  }
}

@media (max-width: 768px) {
  .pc-card {
    height: 420px;
    max-height: 420px;
    /* Remove the dynamic box-shadow on mobile - this is the blue border */
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5) !important;
    /* Remove all blue/cyan background gradients on mobile */
    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%
      ),
      transparent,
      transparent,
      transparent !important;
  }

  /* Restore the outer glow but keep it subtle */
  .pc-card-wrapper::before {
    inset: -4px;
    filter: contrast(1.3) saturate(1.3) blur(16px) opacity(0.7);
    transform: scale(0.85) translate3d(0, 0, 0.1px);
  }

  /* Keep glow visible but subtle on active */
  .pc-card-wrapper.active::before {
    filter: contrast(1.2) saturate(1.5) blur(20px) opacity(0.6);
    transform: scale(0.8) translate3d(0, 0, 0.1px);
  }

  /* Add crisp inner outline to prevent bleed */
  .pc-inside {
    inset: 0.5px;
    border-radius: calc(var(--card-radius) - 0.5px);
    border: 1px solid rgba(255, 255, 255, 0.08);
  }

  /* Tone down shine for small screens */
  .pc-shine {
    mask-size: 240px auto;
    filter: brightness(0.6) contrast(1.3) saturate(0.4) opacity(0.18);
  }

  .pc-details {
    top: 1.8em;
  }

  .pc-details h3 {
    font-size: 1.4rem;
  }

  .pc-details p {
    font-size: 12px;
    top: -4px;
  }

  .pc-user-info {
    bottom: 14px;
    left: 14px;
    right: 14px;
    padding: 9px 11px;
  }

  .pc-mini-avatar {
    width: 36px;
    height: 36px;
  }

  .pc-user-details {
    gap: 9px;
  }

  .pc-handle {
    font-size: 12px;
  }

  .pc-status {
    font-size: 10px;
  }

  .pc-contact-btn {
    padding: 8px 16px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    background: linear-gradient(135deg, rgba(124, 92, 255, 0.25), rgba(124, 92, 255, 0.35));
    border: 1px solid rgba(124, 92, 255, 0.5);
    box-shadow: 0 2px 8px rgba(124, 92, 255, 0.2);
  }
  
  .pc-contact-btn:active {
    transform: scale(0.95);
    box-shadow: 0 1px 4px rgba(124, 92, 255, 0.3);
  }
}

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

  .pc-details {
    top: 1.5em;
  }

  .pc-details h3 {
    font-size: 1.3rem;
  }

  .pc-details p {
    font-size: 11px;
    top: -4px;
  }

  .pc-user-info {
    bottom: 12px;
    left: 12px;
    right: 12px;
    padding: 8px 10px;
    border-radius: 18px;
  }

  .pc-mini-avatar {
    width: 32px;
    height: 32px;
  }

  .pc-user-details {
    gap: 8px;
  }

  .pc-handle {
    font-size: 11px;
  }

  .pc-status {
    font-size: 9px;
  }

  .pc-contact-btn {
    padding: 8px 14px;
    font-size: 11px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    background: linear-gradient(135deg, rgba(124, 92, 255, 0.3), rgba(124, 92, 255, 0.4));
    border: 1px solid rgba(124, 92, 255, 0.55);
    box-shadow: 0 2px 10px rgba(124, 92, 255, 0.25);
  }
  
  .pc-contact-btn:active {
    transform: scale(0.95);
    box-shadow: 0 1px 5px rgba(124, 92, 255, 0.35);
  }
}

@media (max-width: 320px) {
  .pc-card {
    height: 300px;
    max-height: 300px;
  }

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

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

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

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

  .pc-user-details {
    gap: 6px;
  }

  .pc-handle {
    font-size: 11px;
  }

  .pc-status {
    font-size: 8px;
  }

  .pc-contact-btn {
    padding: 6px 10px;
    font-size: 9px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    background: linear-gradient(135deg, rgba(124, 92, 255, 0.35), rgba(124, 92, 255, 0.45));
    border: 1px solid rgba(124, 92, 255, 0.6);
    box-shadow: 0 2px 8px rgba(124, 92, 255, 0.3);
  }
  
  .pc-contact-btn:active {
    transform: scale(0.95);
    box-shadow: 0 1px 4px rgba(124, 92, 255, 0.4);
  }
}