.anchor-pk-bar[hidden] {
  display: none !important;
}
.btn--live-pk {
  flex-shrink: 0;
  padding: 0 14px;
  min-width: 72px;
  height: 40px;
  border: 2px solid rgba(255, 215, 0, 0.75);
  border-radius: 10px;
  background: linear-gradient(180deg, #5c1030, #8b1538);
  color: #ffe8a8;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(255, 80, 120, 0.35);
}
.btn--live-pk:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}
.btn--live-pk-active {
  background: linear-gradient(180deg, #ffb300, #ff7043);
  color: #3d0810;
  border-color: #ffd700;
}
.anchor-pk-bar {
  margin: 0;
}

/* PK 对手列表：中央悬浮 + 可滚动 */
.anchor-pk-opponent-sheet {
  position: fixed;
  inset: 0;
  z-index: 9100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  animation: pk-opponent-fade 0.22s ease;
}
.anchor-pk-opponent-sheet[hidden] {
  display: none !important;
}
.anchor-pk-opponent-mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.12);
}
.anchor-pk-opponent-panel {
  position: relative;
  z-index: 1;
  width: min(92vw, 420px);
  max-width: 100%;
  max-height: min(72vh, 560px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 14px 12px calc(12px + env(safe-area-inset-bottom, 0px));
  border-radius: 16px;
  background: rgba(10, 8, 18, 0.38);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
  color: #fff8fc;
  animation: pk-opponent-center-pop 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes pk-opponent-center-pop {
  from { opacity: 0; transform: translateY(12px) scale(0.94); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.anchor-pk-opponent-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-shrink: 0;
  gap: 10px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.anchor-pk-opponent-head__text {
  flex: 1;
  min-width: 0;
}
.anchor-pk-opponent-head h3 {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 800;
  color: #ffe9a8;
  letter-spacing: 0.03em;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.65);
}
.anchor-pk-opponent-sub {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.68);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
}
.anchor-pk-opponent-close {
  flex-shrink: 0;
  border: 0;
  background: transparent;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.78);
}
.anchor-pk-opponent-close:hover {
  color: #fff;
}
.anchor-pk-opponent-list {
  flex: 1 1 auto;
  min-height: 120px;
  max-height: min(62vh, 520px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 2px 0 4px;
  margin: 0 -2px;
}
.anchor-pk-opponent-list::-webkit-scrollbar {
  width: 4px;
}
.anchor-pk-opponent-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.22);
  border-radius: 4px;
}
.pk-opponent-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 0 0 6px;
  padding: 10px 8px;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease;
}
.pk-opponent-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}
.pk-opponent-item:hover,
.pk-opponent-item:active {
  background: rgba(255, 255, 255, 0.06);
}
.pk-opponent-avatar-wrap {
  position: relative;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
}
.pk-opponent-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.pk-opponent-item.is-live .pk-opponent-avatar-wrap::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 2px solid #ff4d8d;
  pointer-events: none;
}
.pk-opponent-live-dot {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff4d8d;
  border: 2px solid rgba(12, 8, 20, 0.9);
  box-shadow: 0 0 6px rgba(255, 77, 141, 0.65);
}
.pk-opponent-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.pk-opponent-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.pk-opponent-name {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.65);
}
.pk-opponent-name-row .anchor-flag-img,
.pk-opponent-name-row .anchor-flag-emoji {
  flex-shrink: 0;
}
.pk-opponent-name-row .anchor-flag-img {
  width: 18px;
  height: 13px;
  border-radius: 2px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.pk-opponent-name-row .anchor-flag-emoji {
  font-size: 16px;
  line-height: 1;
}
.pk-opponent-sub {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 6px;
  min-width: 0;
  font-size: 11px;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.68);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
}
.pk-opponent-type {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
  color: #ffe9a8;
  background: rgba(255, 180, 60, 0.16);
  border: 1px solid rgba(255, 213, 79, 0.32);
  padding: 2px 7px;
  border-radius: 999px;
}
.pk-opponent-meta-pill {
  flex-shrink: 0;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.72);
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.pk-opponent-viewers {
  flex-shrink: 0;
}
.pk-opponent-action {
  flex-shrink: 0;
  min-width: 44px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #ffe8a8;
  background: linear-gradient(135deg, rgba(255, 90, 158, 0.82), rgba(255, 159, 71, 0.82));
  border: 1px solid rgba(255, 220, 140, 0.35);
  text-align: center;
  box-shadow: 0 2px 10px rgba(255, 80, 120, 0.22);
}
.pk-opponent-empty {
  margin: 24px 8px;
  text-align: center;
  color: rgba(255, 232, 245, 0.78);
  font-size: 14px;
  line-height: 1.55;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
}

@media (min-width: 768px) {
  .anchor-pk-opponent-sheet {
    align-items: center;
    padding: 20px 16px;
  }
  .anchor-pk-opponent-panel {
    width: min(420px, 100%);
    max-height: min(72vh, 560px);
    border-radius: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    padding: 16px 14px 14px;
  }
  .pk-opponent-item {
    padding: 10px 10px;
    border-radius: 10px;
    border: 1px solid transparent;
    border-bottom: 1px solid transparent;
    margin-bottom: 4px;
  }
  .pk-opponent-item:hover,
  .pk-opponent-item:active {
    border-color: rgba(255, 255, 255, 0.12);
  }
}

@keyframes pk-opponent-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes pk-opponent-pop {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
