/* ============================================================
 * PROFILE CARD — view modal styles (v2: zengin layout)
 * ============================================================ */

.pc-overlay {
  position: fixed;
  inset: 0;
  z-index: 9100;
  background: rgba(8, 6, 16, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: pcFadeIn 0.18s ease-out;
}

@keyframes pcFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.pc-card {
  position: relative;
  width: min(460px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: linear-gradient(165deg, rgba(32, 26, 56, 0.98), rgba(14, 10, 26, 0.98));
  border: 1px solid rgba(160, 107, 255, 0.32);
  border-radius: 20px;
  padding: 0;
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 0 80px rgba(160, 107, 255, 0.15);
  color: #ecebf4;
  animation: pcSlideIn 0.24s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes pcSlideIn {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}

/* Avatar gradient'inden türeyen yumuşak dekoratif background */
.pc-card-bg {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 180px;
  border-radius: 20px 20px 0 0;
  background: var(--pc-grad);
  opacity: 0.18;
  pointer-events: none;
  filter: blur(36px);
  z-index: 0;
}

/* Tüm card içeriği bg üstünde */
.pc-card > *:not(.pc-card-bg) { position: relative; z-index: 1; }

.pc-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  width: 34px;
  height: 34px;
  font-size: 22px;
  line-height: 1;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ecebf4;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s;
}
.pc-close:hover {
  background: rgba(255, 90, 100, 0.22);
  color: #ff9aa0;
  border-color: rgba(255, 90, 100, 0.42);
  transform: scale(1.06);
}

/* ── Header ── */
.pc-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 28px 22px 18px;
}

.pc-avatar {
  position: relative;
  flex-shrink: 0;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid rgba(255, 255, 255, 0.22);
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.5),
    0 0 0 4px rgba(255, 255, 255, 0.04);
}
.pc-avatar-letter {
  font-size: 38px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  letter-spacing: -0.02em;
}

.pc-online-dot {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #36e08a;
  border: 3px solid rgba(20, 16, 30, 1);
  box-shadow: 0 0 10px rgba(54, 224, 138, 0.7);
  animation: pcPulse 2s ease-in-out infinite;
}
@keyframes pcPulse {
  0%, 100% { box-shadow: 0 0 10px rgba(54, 224, 138, 0.7); }
  50%      { box-shadow: 0 0 16px rgba(54, 224, 138, 1); }
}

.pc-headline {
  flex: 1;
  min-width: 0;
}

.pc-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.pc-name {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.pc-flag {
  font-size: 18px;
  flex-shrink: 0;
  opacity: 0.95;
}

.pc-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.pc-badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 4px 9px;
  border-radius: 4px;
  text-transform: uppercase;
}
.pc-badge-member {
  background: rgba(160, 107, 255, 0.25);
  color: #d4c0ff;
  border: 1px solid rgba(160, 107, 255, 0.4);
}
.pc-badge-guest {
  background: rgba(255, 255, 255, 0.08);
  color: #b5b3c8;
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.pc-badge-bot {
  background: rgba(74, 210, 255, 0.2);
  color: #7adfff;
  border: 1px solid rgba(74, 210, 255, 0.35);
}

.pc-online-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #36e08a;
  letter-spacing: 0.04em;
  font-weight: 600;
}
.pc-online-mini-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #36e08a;
  box-shadow: 0 0 4px #36e08a;
}

/* ── Bot bio ── */
.pc-bot-bio {
  margin: 0 22px 18px;
  padding: 14px 16px;
  font-size: 14px;
  font-style: italic;
  color: #c5c2db;
  background: linear-gradient(135deg, rgba(74, 210, 255, 0.08), rgba(74, 210, 255, 0.03));
  border-left: 3px solid rgba(74, 210, 255, 0.5);
  border-radius: 0 8px 8px 0;
  line-height: 1.5;
}

/* ── Summary row (sadece insan) ── */
.pc-summary-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 4px 22px 18px;
  padding: 14px 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
}
.pc-summary-cell {
  text-align: center;
  padding: 4px 4px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}
.pc-summary-cell:last-child { border-right: none; }
.pc-summary-n {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.pc-summary-n.pc-summary-wins {
  color: #ffd069;
  text-shadow: 0 0 12px rgba(255, 208, 105, 0.35);
}
.pc-summary-k {
  margin-top: 6px;
  font-size: 10px;
  color: #8a87a4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

/* ── Section ── */
.pc-section {
  margin: 18px 22px;
}
.pc-section-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8a87a4;
  margin-bottom: 10px;
}

/* ── Game cards grid (Toto / 81 / Tavla) ── */
.pc-game-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.pc-game-card {
  padding: 12px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  transition: background 0.15s, border-color 0.15s;
}
.pc-game-card:hover {
  background: rgba(160, 107, 255, 0.06);
  border-color: rgba(160, 107, 255, 0.2);
}
.pc-game-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}
.pc-game-icon {
  font-size: 16px;
  color: #ffd069;
  text-shadow: 0 0 6px rgba(255, 208, 105, 0.4);
}
.pc-game-label {
  font-size: 11px;
  font-weight: 700;
  color: #c5c2db;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.pc-game-played {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.pc-game-played-unit {
  font-size: 11px;
  font-weight: 500;
  color: #8a87a4;
  letter-spacing: 0.04em;
  margin-left: 2px;
}
.pc-game-wr-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}
.pc-game-wr-bar {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
}
.pc-game-wr-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff2d8b, #ffd069);
  border-radius: 2px;
  transition: width 0.4s ease-out;
}
.pc-game-wr-text {
  font-size: 11px;
  font-weight: 700;
  color: #ffd069;
  min-width: 30px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.pc-game-wl {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  font-size: 10px;
  color: #8a87a4;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.pc-wl-w { color: #67e09a; }
.pc-wl-l { color: #ff8088; }
.pc-wl-d { color: #b5b3c8; }

/* ── Meta rows ── */
.pc-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
}
.pc-meta-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
}
.pc-meta-row:last-child { border-bottom: none; }
.pc-meta-k {
  color: #8a87a4;
  letter-spacing: 0.02em;
}
.pc-meta-v {
  color: #ecebf4;
  font-weight: 600;
  text-align: right;
}

/* ── Actions footer ── */
.pc-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 18px 22px 22px;
  margin-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.pc-action {
  flex: 1;
  min-width: 140px;
  padding: 12px 16px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s, transform 0.1s, box-shadow 0.15s;
}
.pc-action:active { transform: scale(0.97); }

.pc-action-primary {
  background: linear-gradient(135deg, #ff2d8b, #a06bff);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 4px 14px rgba(255, 45, 139, 0.3);
}
.pc-action-primary:hover {
  box-shadow: 0 6px 20px rgba(255, 45, 139, 0.45);
  transform: translateY(-1px);
}

.pc-action-glow {
  animation: pcGlow 2.4s ease-in-out infinite;
}
@keyframes pcGlow {
  0%, 100% { box-shadow: 0 4px 14px rgba(255, 45, 139, 0.3); }
  50%      { box-shadow: 0 4px 24px rgba(255, 45, 139, 0.55), 0 0 32px rgba(160, 107, 255, 0.3); }
}

.pc-action-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: #c5c2db;
  border-color: rgba(255, 255, 255, 0.12);
}
.pc-action-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.pc-action-danger {
  background: transparent;
  color: rgba(255, 93, 93, 0.9);
  border-color: rgba(255, 93, 93, 0.35);
  flex: 0 0 auto;
  min-width: 110px;
}
.pc-action-danger:hover {
  background: rgba(255, 93, 93, 0.12);
  color: #ff7777;
  border-color: rgba(255, 93, 93, 0.55);
}

/* ── Loading / error ── */
.pc-card-loading,
.pc-card-error {
  min-height: 160px;
  padding: 28px 24px;
}
.pc-loading,
.pc-error {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  padding: 40px 20px;
  color: #b5b3c8;
  font-size: 14px;
}
.pc-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-top-color: #ff2d8b;
  border-radius: 50%;
  animation: pcSpin 0.7s linear infinite;
}
@keyframes pcSpin {
  to { transform: rotate(360deg); }
}
.pc-error-detail {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: #8a87a4;
}

/* ── Mobile ── */
@media (max-width: 480px) {
  .pc-overlay { padding: 0; align-items: flex-end; }
  .pc-card {
    width: 100%;
    max-height: 92vh;
    border-radius: 20px 20px 0 0;
    animation: pcSlideUp 0.24s cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  @keyframes pcSlideUp {
    from { opacity: 0; transform: translateY(60px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  .pc-header { padding: 24px 18px 14px; }
  .pc-avatar { width: 72px; height: 72px; }
  .pc-avatar-letter { font-size: 32px; }
  .pc-name { font-size: 19px; }
  .pc-summary-row { margin: 4px 18px 16px; }
  .pc-summary-n { font-size: 19px; }
  .pc-section { margin: 14px 18px; }
  .pc-game-card { padding: 10px 8px; }
  .pc-game-played { font-size: 17px; }
  .pc-actions { padding: 14px 18px 18px; flex-direction: column; }
  .pc-action { width: 100%; min-width: 0; }
}

/* Lobby player entry click affordance */
.lobby-player-entry[data-uid]:not(.is-bot) {
  cursor: pointer;
}
.lobby-player-entry[data-uid]:not(.is-bot):hover {
  background: rgba(160, 107, 255, 0.08);
}
