/* Общий heatmap активности (ЛК и публичный профиль) */
.activity-block {
  --activity-weeks: 27;
  --activity-gap: 4px;
}

.activity-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.2rem 1rem;
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.45;
  color: rgba(175, 182, 215, 0.92);
}

.activity-stat-label {
  color: rgba(175, 182, 215, 0.92);
}

.activity-stat-value {
  color: rgba(245, 247, 255, 0.98);
  font-weight: 700;
}

.activity-body {
  display: block;
  width: 100%;
  max-width: 100%;
}

.activity-grid {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(var(--activity-weeks), minmax(0, 1fr));
  grid-template-rows: repeat(7, auto);
  grid-auto-flow: column;
  gap: var(--activity-gap);
}

.activity-cell {
  --intensity: 0;
  box-sizing: border-box;
  width: 100%;
  aspect-ratio: 1;
  height: auto;
  padding: 0;
  border: none;
  border-radius: 4px;
  cursor: default;
  background: rgba(55, 58, 72, 0.95);
  transition: filter 0.1s ease, background 0.1s ease;
}

.activity-cell[data-has-play="1"] {
  /* мало времени — светлый фиолетовый; целый день (1440 мин) — почти чёрный с фиолетовым */
  background: hsl(
    258,
    calc(24% + var(--intensity) * 36%),
    calc(54% - var(--intensity) * 46%)
  );
}

.activity-cell:not([disabled]):hover,
.activity-cell:not([disabled]):focus-visible {
  outline: none;
  filter: brightness(1.18);
}

.activity-cell--empty {
  opacity: 0;
  pointer-events: none;
}

.activity-months {
  display: grid;
  width: 100%;
  margin-top: 0.5rem;
  grid-template-columns: repeat(var(--activity-weeks), minmax(0, 1fr));
  gap: var(--activity-gap);
  font-size: 0.7rem;
  line-height: 1.2;
  color: rgba(145, 152, 180, 0.92);
  pointer-events: none;
}

.activity-month {
  display: block;
  min-width: 0;
  white-space: nowrap;
  overflow: visible;
}

.activity-tooltip {
  position: fixed;
  z-index: 10050;
  pointer-events: none;
  padding: 0.45rem 0.65rem 0.55rem;
  border-radius: 10px;
  background: rgba(18, 20, 34, 0.97);
  border: 1px solid rgba(167, 139, 250, 0.35);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(0, 0, 0, 0.2);
  font-size: 0.8rem;
  line-height: 1.35;
  color: #eef0ff;
  white-space: nowrap;
}

.activity-tooltip::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -5px;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  background: inherit;
  border-right: 1px solid rgba(167, 139, 250, 0.35);
  border-bottom: 1px solid rgba(167, 139, 250, 0.35);
  transform: rotate(45deg);
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
}

.activity-tooltip strong {
  display: block;
  font-weight: 700;
  margin-bottom: 0.12rem;
  font-size: 0.78rem;
}

.activity-tooltip span {
  color: rgba(196, 186, 255, 0.95);
  font-weight: 600;
}

.activity-empty {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.page-player .player-hero-activity .activity-block {
  padding: 0;
  border: none;
  background: none;
  border-radius: 0;
}
