/* Daily streak: compact profile badges and the once-a-day Minecraft flame celebration. */

.vgnw-streak-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 0;
  height: auto;
  padding: 0;
  color: #ffd760;
  background: transparent;
  border: 0;
  box-shadow: none;
  font-family: var(--font-pixel);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  vertical-align: middle;
  white-space: nowrap;
}

.vgnw-streak-badge__flame {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 1px 0 #5c2000);
}

.vgnw-streak-badge__count {
  transform: translateY(1px);
  text-shadow: 1px 1px 0 #5c2000;
}

.side--profile__identity {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  max-width: 132px;
  margin-top: 5px;
}

.side--profile__identity .side--profile__username {
  min-width: 0;
  max-width: 88px;
  margin-top: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vgnw-streak-badge--side {
  min-width: 0;
  height: auto;
  padding: 0;
  font-size: 9px;
}

.vgnw-streak-badge--side .vgnw-streak-badge__flame {
  width: 18px;
  height: 18px;
  flex-basis: 18px;
}

.vgnw-pf__who {
  min-width: 0;
}

.vgnw-pf__name-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.vgnw-streak-badge--profile {
  flex: 0 0 auto;
  transform: translateY(1px);
}

.vgnw-streak-celebration {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  overflow: hidden;
  pointer-events: none;
  contain: strict;
}

.vgnw-streak-celebration__particles {
  position: absolute;
  inset: 0;
}

.vgnw-streak-celebration__particle {
  position: absolute;
  left: var(--streak-x);
  bottom: -110px;
  width: var(--streak-size);
  height: var(--streak-size);
  object-fit: contain;
  opacity: 0;
  image-rendering: pixelated;
  filter: drop-shadow(0 5px 0 rgba(82, 24, 0, 0.32));
  animation: vgnw-streak-flame-rise var(--streak-duration) cubic-bezier(0.2, 0.72, 0.24, 1) var(--streak-delay) both;
  will-change: transform, opacity;
}

.vgnw-streak-celebration__card {
  position: absolute;
  left: 50%;
  top: 54%;
  width: min(420px, calc(100vw - 40px));
  min-height: 0;
  padding: 0;
  transform: translate(-50%, -50%) scale(0.72);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff4d2;
  background: transparent;
  border: 0;
  box-shadow: none;
  opacity: 0;
  animation: vgnw-streak-card 2.4s cubic-bezier(0.22, 0.72, 0.24, 1) both;
  will-change: transform, opacity;
}

.vgnw-streak-celebration__icon {
  width: 76px;
  height: 76px;
  margin: 0 0 3px;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 5px 0 #5d2100);
  animation: vgnw-streak-icon-pulse 700ms steps(2, end) 180ms 2;
}

.vgnw-streak-celebration__counter {
  display: block;
  min-height: 63px;
  color: #ffca48;
  font-family: var(--font-pixel);
  font-size: clamp(48px, 9vw, 68px);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -2px;
  text-shadow: 3px 3px 0 #7d2d05;
}

.vgnw-streak-celebration__title,
.vgnw-streak-celebration__message {
  display: block;
  text-align: center;
  font-family: var(--font-pixel);
  text-transform: uppercase;
}

.vgnw-streak-celebration__title {
  margin-top: 6px;
  color: #fff7df;
  font-size: 13px;
  line-height: 1.25;
  letter-spacing: 1.4px;
}

.vgnw-streak-celebration__message {
  margin-top: 13px;
  color: #c88b56;
  font-size: 9px;
  line-height: 1.4;
  letter-spacing: 0.8px;
}

@keyframes vgnw-streak-flame-rise {
  0% {
    opacity: 0;
    transform: translate3d(-50%, 0, 0) rotate(0deg) scale(0.7);
  }
  13% { opacity: 0.94; }
  72% { opacity: 0.88; }
  100% {
    opacity: 0;
    transform: translate3d(calc(-50% + var(--streak-sway)), -118vh, 0) rotate(var(--streak-rotation)) scale(1.08);
  }
}

@keyframes vgnw-streak-card {
  0% { opacity: 0; transform: translate(-50%, -44%) scale(0.72); }
  14% { opacity: 1; transform: translate(-50%, -50%) scale(1.04); }
  22%, 78% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -58%) scale(0.94); }
}

@keyframes vgnw-streak-icon-pulse {
  50% { transform: scale(1.12) translateY(-3px); }
}

@media (max-width: 640px) {
  .vgnw-streak-celebration__card {
    top: 51%;
  }

  .vgnw-streak-celebration__icon {
    width: 68px;
    height: 68px;
  }

  .vgnw-streak-celebration__counter {
    min-height: 55px;
  }

  .vgnw-pf__name-row {
    gap: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .vgnw-streak-celebration__particle {
    display: none;
    animation: none;
  }

  .vgnw-streak-celebration__card {
    animation: vgnw-streak-card-reduced 1.45s ease-out both;
  }

  .vgnw-streak-celebration__icon {
    animation: none;
  }
}

@keyframes vgnw-streak-card-reduced {
  0%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(0.98); }
  12%, 82% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
