/* Player card (scripts/presence-card.js): opens on a click next to the player; its top is the player's theme background. */
.pc {
    --pc-arrow: 50%;
    position: fixed;
    z-index: 12000;
    width: 300px;
    max-width: calc(100vw - 20px);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 16px;
    background: var(--pc-bg, rgba(11, 16, 26, .97));
    box-shadow: 0 28px 70px -12px rgba(0, 0, 0, .8), 0 0 0 1px rgba(64, 162, 250, .06);
    color: #e8eef8;
    font: 13px/1.4 Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: scale(.94) translateY(6px);
    transform-origin: center;
    transition: opacity .16s ease, transform .24s cubic-bezier(.2, 1.2, .4, 1), visibility 0s linear .24s;
}
.pc[data-side="right"] { transform-origin: left center; }
.pc[data-side="left"] { transform-origin: right center; }
.pc[data-side="top"] { transform-origin: center bottom; }
.pc[data-side="bottom"] { transform-origin: center top; }
.pc.is-visible { opacity: 1; visibility: visible; pointer-events: auto; transform: none; transition: opacity .16s ease, transform .24s cubic-bezier(.2, 1.2, .4, 1); }
.pc::before { content: ''; position: absolute; z-index: 0; width: 12px; height: 12px; background: var(--pc-bg-solid, rgba(11, 16, 26, 1)); border: 1px solid rgba(255, 255, 255, .14); transform: rotate(45deg); }
.pc[data-side="right"]::before { left: -7px; top: calc(var(--pc-arrow) - 6px); border-right: 0; border-top: 0; }
.pc[data-side="left"]::before { right: -7px; top: calc(var(--pc-arrow) - 6px); border-left: 0; border-bottom: 0; }
.pc[data-side="top"]::before { bottom: -7px; left: calc(var(--pc-arrow) - 6px); border-left: 0; border-top: 0; }
.pc[data-side="bottom"]::before { top: -7px; left: calc(var(--pc-arrow) - 6px); border-right: 0; border-bottom: 0; background: #14223a; }
.pc[data-side="center"]::before { display: none; }

.pc-cover { position: relative; z-index: 1; height: 104px; overflow: hidden; border-radius: 15px 15px 0 0; background: linear-gradient(135deg, #1a3a68, #0d1a2e 70%, #1d1540) center / cover no-repeat; }
.pc-cover-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8, 12, 20, .05), rgba(8, 12, 20, .25) 55%, var(--pc-bg-solid, rgba(11, 16, 26, 1))); }
.pc-close { position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: rgba(8, 12, 20, .6); backdrop-filter: blur(6px); color: #fff; cursor: pointer; transition: background .18s ease; }
.pc-close:hover { background: rgba(239, 68, 68, .75); }
.pc-close svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }

.pc-body { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 12px; margin-top: -34px; padding: 0 16px 16px; }
.pc-who { display: flex; align-items: flex-end; gap: 12px; }
.pc-avatar-wrap { position: relative; flex: 0 0 64px; width: 64px; height: 64px; }
.pc-avatar { display: block; width: 100%; height: 100%; object-fit: cover; border: 3px solid var(--pc-status, #64748b); border-radius: 50%; background: #101722; box-shadow: 0 0 0 4px rgba(11, 16, 26, 1); }
.pc-dot { position: absolute; right: 0; bottom: 2px; width: 16px; height: 16px; border: 3px solid rgba(11, 16, 26, 1); border-radius: 50%; background: #64748b; }
.pc-who-text { display: flex; flex-direction: column; min-width: 0; gap: 2px; padding-bottom: 4px; }
.pc-who-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 17px; font-weight: 750; letter-spacing: -.015em; }
.pc-username { color: #8091a9; font-size: 12.5px; }
.pc-status { display: inline-flex; align-items: center; align-self: flex-start; gap: 8px; color: #b6c3d8; font-size: 12.5px; font-weight: 600; }
.pc-status i { width: 8px; height: 8px; border-radius: 50%; }

.pc-game { display: flex; align-items: center; gap: 11px; padding: 9px; border: 1px solid rgba(16, 185, 129, .3); border-radius: 12px; background: rgba(16, 185, 129, .08); }
.pc-game-icon { width: 40px; height: 40px; flex: 0 0 40px; object-fit: cover; border-radius: 9px; background: #101722; }
.pc-game-text { display: flex; flex-direction: column; min-width: 0; }
.pc-game-text small { color: #8ff0c0; font-size: 11px; font-weight: 600; }
.pc-game-text strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; font-size: 13.5px; font-weight: 650; line-height: 1.25; }

.pc-actions { display: flex; gap: 8px; }
.pc-join, .pc-profile { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; border-radius: 10px; font-size: 13px; font-weight: 700; text-decoration: none; cursor: pointer; transition: transform .15s ease, filter .15s ease, background .15s ease; }
.pc-join { flex: 1; border: 1px solid rgba(134, 239, 172, .6); background: linear-gradient(135deg, #22c55e, #16a34a); box-shadow: 0 8px 20px -8px rgba(34, 197, 94, .7); color: #04260f; }
.pc-join svg { width: 14px; height: 14px; fill: currentColor; }
.pc-join:hover { filter: brightness(1.1); transform: translateY(-1px); }
.pc-profile { flex: 1; border: 1px solid rgba(120, 190, 255, .4); background: linear-gradient(135deg, #2f7fe0, #3a9bf0); color: #fff; box-shadow: 0 8px 20px -10px rgba(58, 155, 240, .9); }
.pc-profile:hover { filter: brightness(1.1); transform: translateY(-1px); }
.pc-join + .pc-profile { flex: 0 0 auto; padding: 0 18px; border-color: rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .06); box-shadow: none; color: #dbe5f3; }
.pc-join + .pc-profile:hover { background: rgba(255, 255, 255, .12); }
@media (prefers-reduced-motion: reduce) { .pc, .pc.is-visible { transition: none; } }

/* friends / followers / following */
.pc-stats { display: grid; grid-template-columns: repeat(3, 1fr); padding: 2px 0; border-top: 1px solid rgba(255,255,255,.08); border-bottom: 1px solid rgba(255,255,255,.08); }
.pc-stat { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; }
.pc-stat + .pc-stat { border-left: 1px solid rgba(255,255,255,.07); }
.pc-stat strong { font-size: 17px; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: #f2f6fc; }
.pc-stat strong.is-empty { color: #5e6c84; }
.pc-stat span { color: #8091a9; font-size: 11.5px; font-weight: 600; }

/* the player's own colour and status line (chosen on their profile) */
.pc-cover.is-accent { background: linear-gradient(135deg, color-mix(in srgb, var(--pc-accent, #3a9bf0) 55%, #0c1220), #0b1019 80%); }
.pc-motto { display: block; margin-top: 3px; color: #c3cddb; font-size: 12.5px; font-weight: 500; line-height: 1.35; }
.pc-profile { border-color: color-mix(in srgb, var(--pc-accent, #3a9bf0) 55%, transparent); background: linear-gradient(135deg, color-mix(in srgb, var(--pc-accent, #3a9bf0) 78%, #1e3a8a), var(--pc-accent, #3a9bf0)); box-shadow: 0 8px 20px -10px var(--pc-accent, rgba(58, 155, 240, .9)); }
.pc-join + .pc-profile { border-color: rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .06); box-shadow: none; }
