.personal-profile-card {
  --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%;
  --behind-glow-color: rgba(125, 190, 255, 0.45);
  --behind-glow-size: 50%;
  --inner-gradient: linear-gradient(145deg, rgba(96, 73, 110, 0.55) 0%, rgba(113, 196, 255, 0.27) 100%);
  --card-radius: 22px;
  --personal-card-height: 212px;
  width: 92.5%;
  margin-inline: auto;
  perspective: 500px;
  transform: translate3d(0, 0, 0.1px);
  position: relative;
  touch-action: manipulation;
}

.personal-profile-card .pc-behind {
  position: absolute;
  inset: -8px;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(
    circle at var(--pointer-x) var(--pointer-y),
    var(--behind-glow-color) 0%,
    transparent var(--behind-glow-size)
  );
  filter: blur(36px) saturate(1.1);
  opacity: calc(0.75 * var(--card-opacity));
  transition: opacity 200ms ease;
}

.personal-profile-card:hover,
.personal-profile-card.active {
  --card-opacity: 1;
}

.personal-profile-card .pc-card-shell {
  position: relative;
  z-index: 1;
  border-radius: calc(var(--card-radius) + 2px);
  transition: transform 1s ease;
  transform: translate3d(0, 0, 0) rotateX(0deg) rotateY(0deg);
  transform-style: preserve-3d;
  will-change: transform;
  touch-action: manipulation;
}

.personal-profile-card .pc-card-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(
    calc(var(--pointer-from-left) * 360deg + 128deg),
    #ffffff 0%,
    #c8ced8 12%,
    #ffffff 24%,
    #8f98a6 42%,
    #e8ebf1 58%,
    #a7aeb9 74%,
    #ffffff 88%,
    #b5bcc7 100%
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
  filter: saturate(1.15) contrast(1.08);
  box-shadow: 0 0 20px rgba(196, 202, 214, 0.28);
}

.personal-profile-card .pc-card {
  width: 100%;
  height: var(--personal-card-height);
  min-height: var(--personal-card-height);
  max-height: var(--personal-card-height);
  aspect-ratio: auto;
  display: block;
  border-radius: var(--card-radius);
  position: relative;
  z-index: 1;
  background-blend-mode: color-dodge, normal, normal, normal;
  animation: personal-pc-glow-bg 12s linear infinite;
  box-shadow: rgba(0, 0, 0, 0.65) calc((var(--pointer-from-left) * 8px) - 2px)
    calc((var(--pointer-from-top) * 14px) - 4px) 18px -5px;
  transform: none;
  background: rgba(0, 0, 0, 0.88);
  backface-visibility: hidden;
  overflow: hidden;
}

.personal-profile-card--waiting .pc-card,
.personal-profile-card--waiting .pc-inside {
  height: var(--personal-card-height);
  min-height: var(--personal-card-height);
}

.personal-profile-card .pc-card-shell.active,
.personal-profile-card .pc-card-shell:hover {
  transition: none;
  transform: translate3d(0, 0, 0) rotateX(var(--rotate-y)) rotateY(var(--rotate-x));
}

.personal-profile-card .pc-card-shell.entering {
  transition: transform 180ms ease-out;
}

.personal-profile-card .pc-inside > :not(.pc-user-info) {
  display: grid;
  grid-area: 1 / -1;
  border-radius: var(--card-radius);
  pointer-events: none;
}

.personal-profile-card .pc-inside {
  inset: 0;
  position: absolute;
  display: grid;
  background-image: var(--inner-gradient);
  background-color: rgba(0, 0, 0, 0.82);
  transform: none;
  height: 100%;
  min-height: var(--personal-card-height);
}

.personal-profile-card .pc-brand-content {
  mix-blend-mode: soft-light;
  overflow: visible;
  transform: translateZ(2px);
  backface-visibility: hidden;
}

.personal-profile-card .personal-profile-logo {
  width: 58%;
  max-width: 150px;
  position: absolute;
  right: -4%;
  bottom: 18%;
  opacity: 0.3;
  transform-origin: 50% 100%;
  transform: translateX(calc((var(--pointer-from-left) - 0.5) * 6px)) translateZ(0)
    scale(calc(1 + (var(--pointer-from-top) - 0.5) * 0.02));
  backface-visibility: hidden;
  will-change: transform;
  transition: transform 120ms ease-out;
  pointer-events: none;
  filter: none;
  mix-blend-mode: normal;
}

.personal-profile-card .pc-content:not(.pc-brand-content) {
  max-height: 100%;
  overflow: hidden;
  text-align: left;
  position: relative;
  transform: translate3d(
    calc(var(--pointer-from-left) * -4px + 2px),
    calc(var(--pointer-from-top) * -4px + 2px),
    0.1px
  );
  z-index: 5;
  mix-blend-mode: normal;
}

.personal-profile-card .pc-details {
  width: calc(100% - 28px);
  position: absolute;
  top: 1.35rem;
  left: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.personal-profile-card .pc-details h3 {
  font-weight: 700;
  margin: 0;
  font-size: clamp(1.35rem, 4vw, 1.85rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  background-image: linear-gradient(to bottom, #fff, #9db0d8);
  background-size: 1em 1.5em;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  -webkit-background-clip: text;
}

.personal-profile-card .pc-details p {
  font-weight: 600;
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  width: min-content;
  background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.92), rgba(170, 186, 220, 0.88));
  background-size: 1em 1.5em;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  -webkit-background-clip: text;
}

.personal-profile-card .pc-details .personal-profile-equity-split {
  margin-top: 0.18rem;
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  width: auto;
  max-width: 100%;
  white-space: nowrap;
}

.personal-profile-waiting-card {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 58px;
  z-index: 5;
  display: flex !important;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  background: transparent;
}

.personal-profile-waiting-logo {
  width: min(42%, 128px);
  max-height: 72px;
  object-fit: contain;
  opacity: 0.92;
  filter: none;
  mix-blend-mode: normal;
  position: relative;
  z-index: 6;
  isolation: isolate;
}

.personal-profile-stats {
  position: absolute;
  left: 1.1rem;
  right: 1.1rem;
  bottom: 4.55rem;
  z-index: 6;
  pointer-events: none;
}

.personal-profile-stat {
  position: relative;
  width: 100%;
  min-height: 2rem;
}

.personal-profile-stat-label {
  position: absolute;
  left: 0;
  top: 0;
  font-size: 0.625rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.56);
  line-height: 1.2;
  white-space: nowrap;
}

.personal-profile-stat-value {
  position: absolute;
  right: 0;
  top: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: right;
  text-shadow: none !important;
  filter: none !important;
  box-shadow: none !important;
  background: none !important;
  -webkit-text-fill-color: currentColor;
}

.personal-profile-card .pc-inside .personal-profile-stats {
  display: block !important;
}

.personal-profile-card .pc-inside .personal-profile-stat,
.personal-profile-card .pc-inside .personal-profile-stat-label,
.personal-profile-card .pc-inside .personal-profile-stat-value {
  display: block !important;
}

.personal-profile-card .pc-user-info {
  position: absolute;
  --ui-inset: 14px;
  --ui-radius-bias: 6px;
  bottom: var(--ui-inset);
  left: var(--ui-inset);
  right: var(--ui-inset);
  z-index: 10;
  display: flex !important;
  grid-area: unset !important;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: calc(max(0px, var(--card-radius) - var(--ui-inset) + var(--ui-radius-bias)));
  padding: 10px 12px;
  pointer-events: auto !important;
}

.personal-profile-card .pc-user-details {
  display: flex !important;
  grid-area: unset !important;
  align-items: center;
  gap: 10px;
  min-width: 0;
  pointer-events: auto !important;
}

.personal-profile-card .pc-mini-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
}

.personal-profile-card .pc-mini-avatar img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  filter: none;
  mix-blend-mode: normal;
}

.personal-profile-card .pc-user-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.personal-profile-card .pc-handle {
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.personal-profile-card .pc-status {
  font-size: 0.6875rem;
  color: rgba(255, 255, 255, 0.68);
  line-height: 1;
}

.personal-profile-card .pc-user-info,
.personal-profile-card .pc-user-info *,
.personal-profile-card .pc-contact-btn,
.personal-profile-card .personal-slot-edit-btn {
  pointer-events: auto !important;
}

.personal-profile-card .pc-contact-btn {
  display: inline-flex !important;
  grid-area: unset !important;
  position: relative;
  z-index: 12;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.6875rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
  flex-shrink: 0;
  pointer-events: auto !important;
  touch-action: manipulation;
}

.personal-profile-card .pc-contact-btn:hover {
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-1px);
}

.personal-profile-card-error {
  position: absolute;
  left: 1.1rem;
  right: 1.1rem;
  bottom: 4.6rem;
  z-index: 7;
  font-size: 0.6875rem;
  color: #ffb4b4;
  pointer-events: none;
}

.personal-profile-card--binance {
  --behind-glow-color: rgba(240, 185, 11, 0.58);
  --inner-gradient: linear-gradient(145deg, #f0b90b 0%, #fcd535 55%, #d9a508 100%);
}

.personal-profile-card--binance .pc-card {
  background: #f0b90b;
}

.personal-profile-card--binance .pc-inside {
  background-color: #f0b90b;
  background-image: linear-gradient(145deg, #f0b90b 0%, #fcd535 55%, #d9a508 100%);
}

.personal-profile-card--binance .personal-profile-logo,
.personal-profile-card--binance .pc-brand-content {
  display: none !important;
}

.personal-profile-card--binance .personal-profile-waiting-logo {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  object-fit: cover;
}

.personal-profile-card--binance .pc-details h3 {
  background-image: linear-gradient(to bottom, #1e2329, #474d57);
}

.personal-profile-card--binance .pc-details p,
.personal-profile-card--binance .personal-profile-stat-label {
  background-image: none;
  -webkit-text-fill-color: rgba(30, 35, 41, 0.72);
  color: rgba(30, 35, 41, 0.72);
}

.personal-profile-card--binance .pc-mini-avatar {
  background: #f0b90b;
  border-color: rgba(30, 35, 41, 0.18);
  padding: 0;
}

.personal-profile-card--binance .pc-mini-avatar img {
  display: block !important;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  mix-blend-mode: normal;
  filter: none;
  opacity: 1;
}

.personal-profile-card--binance .pc-user-info {
  background: rgba(30, 35, 41, 0.12);
  border-color: rgba(30, 35, 41, 0.16);
}

.personal-profile-card--binance .pc-handle {
  color: rgba(30, 35, 41, 0.95);
}

.personal-profile-card--binance .pc-status {
  color: rgba(30, 35, 41, 0.68);
}

.personal-profile-card--binance .pc-contact-btn {
  color: #f0b90b;
  background: rgba(30, 35, 41, 0.88);
  border-color: rgba(30, 35, 41, 0.2);
}

.personal-profile-card--okx {
  --behind-glow-color: rgba(255, 255, 255, 0.22);
  --inner-gradient: linear-gradient(145deg, rgba(0, 0, 0, 0.92) 0%, rgba(34, 34, 34, 0.78) 100%);
}

.personal-profile-card--okx .pc-card {
  border: none;
  border-radius: var(--card-radius);
  box-shadow: rgba(0, 0, 0, 0.65) calc((var(--pointer-from-left) * 8px) - 2px)
    calc((var(--pointer-from-top) * 14px) - 4px) 18px -5px;
}

.personal-profile-card--okx .pc-inside {
  background-color: rgba(0, 0, 0, 0.92);
}

.personal-profile-card--waiting.personal-profile-card--okx .pc-inside {
  background-color: #000000;
  background-image: linear-gradient(145deg, rgba(0, 0, 0, 0.96) 0%, rgba(34, 34, 34, 0.88) 100%);
}

.personal-profile-card--bybit {
  --behind-glow-color: rgba(247, 166, 0, 0.48);
  --inner-gradient: linear-gradient(180deg, #f7a600 0%, #f7a600 24%, #000000 24%, #101114 100%);
}

.personal-profile-card--bybit .pc-inside {
  background-color: #000000;
}

.personal-profile-card--waiting.personal-profile-card--bybit .pc-inside {
  background-color: #000000;
  background-image: linear-gradient(180deg, #f7a600 0%, #f7a600 24%, #000000 24%, #101114 100%);
}

.personal-profile-card--bybit .pc-handle,
.personal-profile-card--bybit .pc-status {
  color: rgba(255, 255, 255, 0.92);
}

.personal-profile-card--bybit .pc-status {
  color: rgba(255, 255, 255, 0.62);
}

.personal-profile-card--bybit .pc-user-info {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}

.personal-profile-card--bybit .pc-contact-btn {
  color: #000000;
  background: #f7a600;
  border-color: rgba(247, 166, 0, 0.35);
}

.personal-profile-card--bybit .pc-mini-avatar img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.personal-profile-card--bitget .pc-mini-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.personal-profile-card--bitget .pc-brand-content {
  mix-blend-mode: normal;
}

.personal-profile-card--bitget .personal-profile-logo,
.personal-profile-card--bitget .personal-profile-waiting-logo {
  border-radius: 50%;
  object-fit: cover;
  mix-blend-mode: normal;
  filter: none;
  background: transparent;
  overflow: hidden;
  clip-path: circle(50% at 50% 50%);
}

.personal-profile-card--bitget .personal-profile-waiting-logo {
  width: 80px;
  height: 80px;
  max-height: none;
  opacity: 1;
}

.personal-profile-card--bitget .personal-profile-logo {
  width: 118px;
  height: 118px;
  max-width: 118px;
  opacity: 0.24;
}

.personal-profile-card--bitget {
  --behind-glow-color: rgba(0, 240, 255, 0.35);
  --inner-gradient: linear-gradient(145deg, rgba(0, 82, 92, 0.88) 0%, rgba(0, 160, 176, 0.48) 100%);
}

.personal-profile-card--bitget .pc-inside {
  background-color: rgba(0, 82, 92, 0.92);
}

.personal-profile-card--waiting.personal-profile-card--bitget .pc-inside {
  background-color: rgba(0, 82, 92, 0.95);
  background-image: linear-gradient(145deg, rgba(0, 82, 92, 0.95) 0%, rgba(0, 160, 176, 0.55) 100%);
}

.personal-profile-card--waiting .pc-user-info {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.12);
}

.personal-profile-card--waiting.personal-profile-card--binance .pc-user-info {
  background: rgba(30, 35, 41, 0.1);
  border-color: rgba(30, 35, 41, 0.14);
}

.personal-profile-card--waiting.personal-profile-card--binance .pc-handle {
  color: rgba(30, 35, 41, 0.94);
}

.personal-profile-card--waiting.personal-profile-card--binance .pc-contact-btn {
  color: #f0b90b;
  background: rgba(30, 35, 41, 0.88);
  border-color: rgba(30, 35, 41, 0.18);
}

.personal-account-card--profile {
  padding: 0;
  border: none;
  background: transparent;
  min-height: 0;
}

.personal-account-card--profile .corner-frame {
  display: none;
}

@keyframes personal-pc-glow-bg {
  0% {
    --bgrotate: 0deg;
  }

  100% {
    --bgrotate: 360deg;
  }
}

/* Fluid Personal cards on desktop — fill the 75% top zone at any resolution. */
@media (min-width: 901px) {
  .personal-account-card-content .personal-profile-card {
    width: 100%;
    height: 100%;
    --personal-card-height: 100%;
  }

  .personal-account-card-content .personal-profile-card .pc-card-shell,
  .personal-account-card-content .personal-profile-card .pc-card {
    height: 100%;
    min-height: 0;
    max-height: none;
  }

  .personal-account-card-content .personal-profile-card .pc-inside {
    height: 100%;
    min-height: 0;
  }

  .personal-profile-card--waiting .pc-card,
  .personal-profile-card--waiting .pc-inside {
    height: 100%;
    min-height: 0;
  }

  .personal-profile-card--waiting .pc-inside {
    display: flex;
    flex-direction: column;
  }

  .personal-profile-card--waiting .personal-profile-waiting-card {
    position: relative;
    inset: auto;
    top: auto;
    left: auto;
    right: auto;
    bottom: auto;
    flex: 1;
    min-height: 0;
    display: flex !important;
  }

  .personal-profile-card--waiting .pc-user-info {
    position: relative;
    inset: auto;
    bottom: auto;
    left: auto;
    right: auto;
    flex-shrink: 0;
    margin: 0 10px 10px;
  }

  .personal-profile-card--waiting .personal-profile-waiting-logo {
    width: min(36%, 72px);
    height: auto;
    max-height: 56px;
  }

  .personal-profile-card {
    --card-radius: 16px;
  }

  .personal-profile-card .pc-details h3 {
    font-size: clamp(1.05rem, 2.8vw, 1.35rem);
  }

  .personal-profile-card .pc-details {
    top: 0.95rem;
    left: 0.95rem;
  }

  .personal-profile-card .personal-profile-stats {
    bottom: 3.65rem;
    left: 0.95rem;
    right: 0.95rem;
  }

  .personal-profile-card .pc-user-info {
    --ui-inset: 10px;
    padding: 8px 10px;
  }

  .personal-profile-card .pc-mini-avatar {
    width: 28px;
    height: 28px;
  }

  .personal-profile-card .pc-mini-avatar img {
    width: 18px;
    height: 18px;
  }
}

/* 1080p credit-card height (~180px): tighten in-card typography for landscape slots. */
@media (max-height: 1080px) and (min-width: 901px) {
  .personal-profile-card {
    --card-radius: 14px;
  }

  .personal-profile-card .pc-details {
    top: 0.72rem;
    left: 0.78rem;
  }

  .personal-profile-card .pc-details h3 {
    font-size: clamp(0.88rem, 1.7vw, 1.05rem);
  }

  .personal-profile-card .pc-details p {
    font-size: 0.625rem;
  }

  .personal-profile-card .personal-profile-stats {
    bottom: 2.95rem;
    left: 0.78rem;
    right: 0.78rem;
  }

  .personal-profile-card .personal-profile-stat-label {
    font-size: 0.5625rem;
  }

  .personal-profile-card .personal-profile-stat-value {
    font-size: 0.6875rem;
  }

  .personal-profile-card .pc-user-info {
    --ui-inset: 8px;
    padding: 6px 8px;
  }

  .personal-profile-card .pc-mini-avatar {
    width: 24px;
    height: 24px;
  }

  .personal-profile-card .pc-mini-avatar img {
    width: 16px;
    height: 16px;
  }

  .personal-profile-card .pc-handle {
    font-size: 0.6875rem;
  }

  .personal-profile-card .pc-status,
  .personal-profile-card .pc-contact-btn {
    font-size: 0.625rem;
  }

  .personal-profile-card--waiting .personal-profile-waiting-logo {
    width: min(32%, 56px);
    max-height: 44px;
  }
}

@media (max-width: 768px) {
  .personal-profile-card {
    --personal-card-height: 200px;
  }

  .personal-profile-card .pc-details h3 {
    font-size: 1.3rem;
  }
}
