/* 메인 화면 통계 — 방문자 통계와 노드 모니터링 이용자 수
   테마 안에 들어가므로 .pnstat 아래로 한정합니다. */

.pnstat {
  --ink: #1d1830;
  --muted: #6d6780;
  --line: #ebe7f2;
  --violet: #5a34a8;
  --live: #1c9c5c;

  container-type: inline-size;
  margin: 0 0 16px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.4;
}
.pnstat *, .pnstat *::before, .pnstat *::after { box-sizing: border-box; }

/* ── 방문자 통계 ─────────────────────────────── */
.pnstat__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
@container (min-width: 720px) {
  .pnstat__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
}

.pnstat__tile {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(29, 24, 48, .04), 0 6px 18px rgba(29, 24, 48, .05);
}
.pnstat__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #f1edfa;
  color: var(--violet);
}
.pnstat__icon svg { width: 22px; height: 22px; }
.pnstat__tile[data-kind="online"] .pnstat__icon { background: #e6f6ee; }

.pnstat__body { display: flex; flex-direction: column; min-width: 0; }
.pnstat__num {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}
.pnstat__label { margin-top: 2px; color: var(--muted); font-size: 13px; }

/* 실시간 표시 점 */
.pnstat__live {
  position: relative;
  display: inline-block;
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--live);
}
.pnstat__live::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--live);
  animation: pnstat-ping 2s ease-out infinite;
}
@keyframes pnstat-ping {
  0%   { transform: scale(1); opacity: .6; }
  80%  { transform: scale(2.6); opacity: 0; }
  100% { transform: scale(2.6); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .pnstat__live::after { animation: none; }
}

/* ── 노드 모니터링 이용자 수 ─────────────────── */
.pnstat__service {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 22px 24px;
  border-radius: 16px;
  background:
    radial-gradient(420px 220px at 88% 20%, rgba(126, 240, 181, .22), transparent 70%),
    linear-gradient(120deg, #6a3fc9, #43267f);
  color: #fff;
  box-shadow: 0 10px 28px rgba(67, 38, 127, .28);
}
@container (min-width: 720px) {
  .pnstat__service { flex-direction: row; align-items: center; justify-content: space-between; padding: 24px 30px; }
}

.pnstat__service-kicker {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .16);
  font-size: 12px;
  font-weight: 600;
}
.pnstat__service-count {
  margin: 8px 0 0;
  font-size: 18px;
  font-weight: 600;
}
.pnstat__service-count b {
  margin-right: 2px;
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  vertical-align: -3px;
}
.pnstat__service-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  color: rgba(255, 255, 255, .85);
  font-size: 14px;
}
.pnstat__service-facts li { display: flex; align-items: center; gap: 7px; }
.pnstat__service-facts b { color: #fff; font-variant-numeric: tabular-nums; }
.pnstat__service .pnstat__live { background: #7ef0b5; }
.pnstat__service .pnstat__live::after { background: #7ef0b5; }

.pnstat__service-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: none;
  min-height: 46px;
  padding: 10px 22px;
  border-radius: 999px;
  background: #fff;
  color: #43267f;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: transform .15s ease;
}
.pnstat__service-cta:hover { transform: translateX(2px); color: #43267f; }
.pnstat__service-cta:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  .pnstat__service-cta { transition: none; }
}
