/* StarlitMoon — страница игроков и общие элементы профиля */

.page-players .players-main,
.page-player .player-main {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

.page-players .players-main {
  padding-top: 0;
}

/* —— Hero (список игроков) —— */
.players-hero {
  position: relative;
  text-align: center;
  padding: 6.5rem 1.5rem 2.25rem;
  overflow: hidden;
}

.players-hero-glow {
  position: absolute;
  left: 0;
  right: 0;
  top: -2rem;
  bottom: 0;
  background:
    radial-gradient(ellipse 85% 65% at 50% -5%, rgba(107, 92, 231, 0.3), transparent 58%),
    radial-gradient(ellipse 70% 55% at 50% 25%, rgba(107, 92, 231, 0.16), transparent 65%),
    radial-gradient(ellipse 50% 40% at 80% 35%, rgba(201, 162, 39, 0.14), transparent 55%);
  pointer-events: none;
}

.players-hero-inner {
  position: relative;
  z-index: 1;
}

.players-title {
  font-size: clamp(2rem, 5vw, 2.85rem);
  font-weight: 800;
  margin-bottom: 0.65rem;
  line-height: 1.12;
  background: linear-gradient(135deg, var(--text) 0%, var(--accent) 45%, var(--purple) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.players-lead {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 28rem;
  margin: 0 auto 1.25rem;
}

.players-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.players-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 5.5rem;
  padding: 0.65rem 1.25rem;
  background: rgba(12, 16, 32, 0.75);
  border: 1px solid rgba(120, 140, 220, 0.2);
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.players-stat--online {
  border-color: rgba(74, 222, 128, 0.35);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 0 20px rgba(74, 222, 128, 0.1);
}

.players-stat-value {
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text);
}

.players-stat--online .players-stat-value {
  color: var(--online);
  text-shadow: 0 0 20px rgba(74, 222, 128, 0.35);
}

.players-stat-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.players-meta {
  font-size: 0.88rem;
  color: var(--text-muted);
  opacity: 0.85;
}

.players-section {
  position: relative;
  z-index: 1;
  padding-top: 0.5rem;
  padding-bottom: 4rem;
}

.players-section .container {
  position: relative;
}

.players-section .container::before {
  content: "";
  position: absolute;
  top: -0.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: min(100%, 720px);
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(201, 162, 39, 0.25) 15%,
    rgba(107, 92, 231, 0.35) 50%,
    rgba(201, 162, 39, 0.25) 85%,
    transparent
  );
  pointer-events: none;
  opacity: 0.9;
}

.players-status {
  text-align: center;
  padding: 0.85rem 1rem;
  margin-bottom: 1.5rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
}

.players-status--warn {
  background: rgba(201, 162, 39, 0.1);
  border: 1px solid rgba(201, 162, 39, 0.35);
  color: var(--accent);
}

.players-status--error {
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: #fca5a5;
}

.players-loading {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-muted);
  padding: 2rem;
}

.players-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
}

/* —— Карточка игрока —— */
.player-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.1rem 0.85rem 1rem;
  background:
    linear-gradient(165deg, rgba(24, 30, 52, 0.95) 0%, rgba(12, 16, 30, 0.92) 100%);
  border: 1px solid rgba(120, 140, 220, 0.18);
  border-radius: calc(var(--radius) + 2px);
  text-decoration: none;
  color: var(--text);
  overflow: hidden;
  min-width: 0;
  transition: transform 0.22s ease, border-color 0.22s, box-shadow 0.22s;
}

.player-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(201, 162, 39, 0.08), transparent 55%);
  opacity: 0;
  transition: opacity 0.22s;
  pointer-events: none;
}

.player-card::after {
  content: "✦";
  position: absolute;
  top: 0.45rem;
  right: 0.5rem;
  font-size: 0.55rem;
  color: var(--accent);
  opacity: 0.35;
  pointer-events: none;
}

.player-card:hover {
  z-index: 3;
  transform: translateY(-5px);
  border-color: rgba(201, 162, 39, 0.45);
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.35),
    0 0 28px rgba(201, 162, 39, 0.08);
}

.player-card:hover::before {
  opacity: 1;
}

.player-card.online {
  border-color: rgba(74, 222, 128, 0.4);
  box-shadow:
    0 0 0 1px rgba(74, 222, 128, 0.08),
    0 8px 28px rgba(74, 222, 128, 0.1);
}

.player-card.online::after {
  color: var(--online);
  opacity: 0.7;
}

.player-card.banned {
  border-color: rgba(248, 113, 113, 0.55);
  box-shadow: 0 0 20px rgba(248, 113, 113, 0.1);
}

.player-card.banned::after {
  content: "⛔";
  font-size: 0.65rem;
  opacity: 0.6;
}

.player-card-telegram {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.4rem;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.28);
  font-size: 0.72rem;
  font-weight: 700;
  color: #7dd3fc;
  text-decoration: none;
  max-width: 100%;
}

.player-card-telegram:hover {
  border-color: rgba(56, 189, 248, 0.55);
  color: #bae6fd;
}

.player-telegram-icon-svg {
  width: 0.95rem;
  height: 0.95rem;
  flex-shrink: 0;
}

.player-card-telegram-handle {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 7rem;
}

.player-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: center;
  margin-top: 0.45rem;
  max-width: 100%;
}

.player-tag {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.player-tag--ban {
  color: #fecaca;
  background: rgba(127, 29, 29, 0.55);
  border: 1px solid #f87171;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.2);
}

.player-tag--ban-perm {
  color: #fee2e2;
  background: rgba(153, 27, 27, 0.6);
  border-color: #fca5a5;
}

.player-tag--ban-temp {
  color: #ffedd5;
  background: rgba(154, 52, 18, 0.5);
  border-color: #fb923c;
}

.player-tag--admin {
  color: #fef9c3;
  background: linear-gradient(135deg, rgba(127, 29, 29, 0.92), rgba(69, 10, 10, 0.95));
  border: 1px solid rgba(251, 191, 36, 0.8);
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.15);
}

.player-tag--mod {
  color: #d9f99d;
  background: linear-gradient(135deg, rgba(20, 83, 45, 0.92), rgba(6, 78, 59, 0.95));
  border: 1px solid rgba(251, 191, 36, 0.8);
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.12), 0 0 8px rgba(74, 222, 128, 0.15);
}

.player-tag--sponsor {
  color: #fde047;
  background: rgba(234, 179, 8, 0.18);
  border: 1px solid rgba(250, 204, 21, 0.55);
}

.player-tag--shine {
  color: #f5d0fe;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.22), rgba(236, 72, 153, 0.22));
  border: 1px solid rgba(217, 70, 239, 0.5);
}

.player-card-ban {
  margin: 0.35rem 0 0;
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--text-muted);
  text-align: center;
}

.player-card.banned .player-card-ban {
  color: #fecaca;
}

.player-avatar-wrap {
  position: relative;
  width: 84px;
  height: 84px;
  margin-bottom: 0.7rem;
  padding: 3px;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(201, 162, 39, 0.5), rgba(107, 92, 231, 0.35));
  box-shadow: 0 0 24px rgba(201, 162, 39, 0.12);
}

.player-card.online .player-avatar-wrap {
  background: linear-gradient(145deg, rgba(74, 222, 128, 0.55), rgba(201, 162, 39, 0.35));
  box-shadow: 0 0 24px rgba(74, 222, 128, 0.15);
}

.player-avatar {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 13px;
  object-fit: cover;
  object-position: center top;
  image-rendering: pixelated;
  background: rgba(0, 0, 0, 0.4);
}

.player-online-dot {
  position: absolute;
  bottom: 6px;
  right: 6px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--online);
  border: 2px solid rgba(10, 14, 26, 0.95);
  box-shadow: 0 0 10px var(--online);
}

.player-name {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  font-weight: 800;
  font-size: 0.95rem;
  text-align: center;
  line-height: 1.25;
}

.player-name-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.player-name-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1 1 auto;
}

.player-name .player-custom-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(201, 162, 39, 0.45);
  background: rgba(201, 162, 39, 0.14);
  color: #fde68a;
  vertical-align: middle;
  flex-shrink: 0;
}

.player-name .player-custom-badge--icon {
  margin-left: 0;
  width: 1.35rem;
  height: 1.35rem;
  font-size: 0.9rem;
  line-height: 1;
  position: relative;
  overflow: visible;
}

.player-name .player-custom-badge--icon .player-custom-badge-tip {
  top: auto;
  bottom: calc(100% + 9px);
}

.player-name .player-custom-badge-tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 9px);
  transform: translateX(-50%);
  z-index: 40;
  width: max-content;
  max-width: min(220px, calc(100vw - 2rem));
  padding: 0.45rem 0.6rem;
  border-radius: 10px;
  border: 1px solid rgba(201, 162, 39, 0.45);
  background: rgba(10, 14, 28, 0.96);
  color: #f8f2d0;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.12s ease;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-weight: 400;
  text-align: left;
  white-space: normal;
  overflow-wrap: break-word;
}

.player-name .player-custom-badge-tip strong {
  font-size: 0.8rem;
  font-weight: 800;
  color: #fde68a;
  white-space: normal;
}

.player-name .player-custom-badge-tip span {
  font-size: 0.74rem;
  color: #d1d9eb;
  line-height: 1.35;
  white-space: normal;
}

.player-name .player-custom-badge:hover .player-custom-badge-tip,
.player-name .player-custom-badge:focus-visible .player-custom-badge-tip {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 600px) {
  .players-hero {
    padding: 5.25rem 1rem 1.75rem;
  }

  .players-main .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .players-grid {
    grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
    gap: 0.85rem;
  }

  .player-avatar-wrap {
    width: 76px;
    height: 76px;
  }

  .player-card {
    padding: 0.95rem 0.65rem 0.85rem;
  }
}
