/**
 * 회원 레벨 1~10 — 이미지 없이 네온·글리치·오비트 느낌 (CSS only)
 */
.sp-mblvl {
  --sp-lvl-h: 195;
  --sp-lvl-s: 95%;
  --sp-lvl-l: 58%;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  vertical-align: middle;
  flex-shrink: 0;
  font-family: ui-sans-serif, system-ui, "Segoe UI", Roboto, "Noto Sans KR", sans-serif;
  filter: drop-shadow(0 0 6px hsla(var(--sp-lvl-h), var(--sp-lvl-s), var(--sp-lvl-l), 0.55));
}

.sp-mblvl--compact {
  width: 20px;
  height: 20px;
}

.sp-mblvl__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    hsla(var(--sp-lvl-h), 85%, 60%, 0.95),
    hsla(calc(var(--sp-lvl-h) + 40), 90%, 65%, 0.85),
    hsla(calc(var(--sp-lvl-h) + 120), 80%, 55%, 0.9),
    hsla(var(--sp-lvl-h), 85%, 60%, 0.95)
  );
  animation: sp-mblvl-spin 4.5s linear infinite;
  mask: radial-gradient(farthest-side, transparent calc(50% - 2px), #000 calc(50% - 1px), #000 100%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(50% - 2px), #000 calc(50% - 1px), #000 100%);
  opacity: 0.92;
}

.sp-mblvl__core {
  position: relative;
  z-index: 2;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: #f8fafc;
  text-shadow:
    0 0 8px hsla(var(--sp-lvl-h), 100%, 70%, 0.9),
    0 0 1px #020617;
}

.sp-mblvl--compact .sp-mblvl__core {
  font-size: 9px;
}

.sp-mblvl__scan {
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  z-index: 1;
  background: radial-gradient(circle at 30% 25%, hsla(0, 0%, 100%, 0.12), transparent 55%),
    radial-gradient(circle at 70% 80%, hsla(var(--sp-lvl-h), 90%, 40%, 0.25), transparent 50%),
    linear-gradient(145deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.96));
  box-shadow: inset 0 0 0 1px hsla(var(--sp-lvl-h), 70%, 55%, 0.35);
}

.sp-mblvl__scan::after {
  content: "";
  position: absolute;
  left: -20%;
  top: 0;
  width: 45%;
  height: 100%;
  background: linear-gradient(
    105deg,
    transparent,
    hsla(var(--sp-lvl-h), 100%, 96%, 0.14),
    transparent
  );
  animation: sp-mblvl-sweep 2.8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes sp-mblvl-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes sp-mblvl-sweep {
  0% {
    transform: translateX(0) skewX(-6deg);
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  55% {
    transform: translateX(220%) skewX(-6deg);
    opacity: 0.85;
  }
  100% {
    transform: translateX(320%) skewX(-6deg);
    opacity: 0;
  }
}

/* 레벨별 색상(1=시안 계열 → 10=바이올렛/골드) */
.sp-mblvl--1 {
  --sp-lvl-h: 185;
}
.sp-mblvl--2 {
  --sp-lvl-h: 200;
}
.sp-mblvl--3 {
  --sp-lvl-h: 215;
}
.sp-mblvl--4 {
  --sp-lvl-h: 235;
}
.sp-mblvl--5 {
  --sp-lvl-h: 265;
}
.sp-mblvl--6 {
  --sp-lvl-h: 285;
}
.sp-mblvl--7 {
  --sp-lvl-h: 305;
}
.sp-mblvl--8 {
  --sp-lvl-h: 330;
}
.sp-mblvl--9 {
  --sp-lvl-h: 40;
}
.sp-mblvl--10 {
  --sp-lvl-h: 48;
  --sp-lvl-l: 62%;
  filter: drop-shadow(0 0 8px hsla(48, 100%, 55%, 0.65)) drop-shadow(0 0 4px hsla(280, 90%, 60%, 0.4));
}

.sp-mblvl--10 .sp-mblvl__ring {
  animation-duration: 3.2s;
}

@media (prefers-reduced-motion: reduce) {
  .sp-mblvl__ring {
    animation: none;
  }
  .sp-mblvl__scan::after {
    animation: none;
    opacity: 0;
  }
}

.profile_img .sp-mblvl {
  margin-right: 2px;
}
