.identity-level {
  display: flex;
  align-items: center;
  gap: 20px;
  min-width: 280px;
  flex: 1 1 280px;
  justify-content: flex-start;
  padding-block-end: 4px;
}

.level-gauge {
  position: relative;
  flex-shrink: 0;
  width: 132px;
  height: 132px;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.08));
}

.level-gauge-svg {
  display: block;
  width: 100%;
  height: 100%;
}

.level-gauge-track {
  stroke: var(--color-background-secondary);
}

.level-gauge-fill {
  transition: stroke-dashoffset 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.level-gauge-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.level-gauge-number {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  color: var(--color-text-primary);
}

.level-gauge-tier {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--color-text-secondary);
  letter-spacing: 0.01em;
}

@keyframes levelGaugePulse {
  0% {
    transform: scale(1);
  }

  30% {
    transform: scale(1.12);
  }

  60% {
    transform: scale(0.97);
  }

  100% {
    transform: scale(1);
  }
}

.level-gauge-leveled-up {
  animation: levelGaugePulse 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.level-gauge-leveled-up .level-gauge-fill {
  filter: drop-shadow(0 0 6px currentColor);
}

html[data-motion="reduced"] .level-gauge-fill {
  transition: none;
}

html[data-motion="reduced"] .level-gauge-leveled-up {
  animation: none;
}

.level-gauge-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 160px;
}

.level-gauge-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.level-gauge-heading h3 {
  font-size: 1.05rem;
  font-weight: 800;
}

.level-gauge-pct {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-primary);
  flex-shrink: 0;
  background-color: var(--color-surface);
  padding: 2px 8px;
  border-radius: 100px;
  border: 1px solid var(--color-border-light);
  box-shadow: var(--shadow-sm);
}

.level-gauge-xp {
  font-size: 0.8rem;
  color: var(--color-text-secondary);
  font-weight: 600;
}

.level-gauge-remaining {
  font-size: 0.74rem;
  color: var(--color-text-tertiary);
}

@media (max-width: 640px) {
  .identity-level {
    gap: 14px;
  }

  .level-gauge {
    width: 92px;
    height: 92px;
  }

  .level-gauge-number {
    font-size: 1.5rem;
  }

  .level-gauge-tier {
    font-size: 0.58rem;
  }

  .level-gauge-info {
    min-width: 0;
  }
}
