.hn-new-updates-pill{
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 22px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 10060;
  display: none;
  width: max-content;
  max-width: calc(100vw - 24px);
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  border-radius: 18px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.hn-new-updates-pill.show{
  display: block;
  animation: hnUpdateDrop .32s cubic-bezier(.34,1.56,.64,1);
}

.hn-new-updates-dismiss{
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin-right: 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.7);
  font: 400 16px/1 system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  background: rgba(255,255,255,.08);
}

.hn-new-updates-dismiss:active{
  background: rgba(255,255,255,.18);
}

/* Breaking news — halka pulse taaki zyada attention khinche */
.hn-new-updates-pill.hn-breaking .hn-new-updates-pill-inner{
  animation: hnBreakingPulse 1.4s ease-in-out infinite;
}
.hn-new-updates-pill.hn-breaking .hn-new-updates-count{
  background: radial-gradient(circle at 30% 30%, #ff5252, #c62828 70%);
}
.hn-new-updates-pill.hn-breaking .hn-new-updates-icon{
  background: radial-gradient(circle at 30% 30%, #ff5252, #c62828 70%);
}

@keyframes hnBreakingPulse{
  0%, 100%{ box-shadow: 0 0 0 1px rgba(255,82,82,.25), 0 8px 22px rgba(0,0,0,.22); }
  50%{ box-shadow: 0 0 0 5px rgba(255,82,82,.16), 0 8px 26px rgba(0,0,0,.28); }
}

/* Progress pill — jab tak user naye posts browse kar raha ho */
.hn-new-updates-progress{
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 22px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 10060;
  display: none;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(28,32,44,.92);
  box-shadow: 0 0 0 1px rgba(90,120,255,.16), 0 8px 22px rgba(0,0,0,.22);
  color: #fff;
  font: 600 12px/1 system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  letter-spacing: .2px;
}

.hn-new-updates-progress.show{
  display: block;
  animation: hnUpdateDrop .22s ease-out;
}

.hn-new-updates-progress-text{
  display: inline-block;
  white-space: nowrap;
}

.hn-new-updates-pill-inner{
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: auto;
  max-width: calc(100vw - 24px);
  min-height: 44px;
  padding: 2px;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(28,32,44,.92);
  box-shadow:
    0 0 0 1px rgba(90,120,255,.16),
    0 8px 22px rgba(0,0,0,.22);
}

.hn-new-updates-pill-inner::before{
  content: "";
  position: absolute;
  top: -30%;
  left: -35%;
  width: 46%;
  height: 170%;
  border-radius: 20px;
  background: linear-gradient(
    90deg,
    rgba(0,0,0,0) 0%,
    rgba(0,229,255,0) 10%,
    rgba(0,229,255,.95) 28%,
    rgba(124,77,255,.95) 50%,
    rgba(255,77,157,.88) 72%,
    rgba(255,213,79,0) 90%,
    rgba(0,0,0,0) 100%
  );
  filter: blur(10px);
  opacity: 0;
  pointer-events: none;
}

.hn-new-updates-pill.hn-streak .hn-new-updates-pill-inner::before{
  opacity: 1;
  animation: hnEdgeSweep 2.1s linear infinite;
}

.hn-new-updates-pill-inner::after{
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 16px;
  background: rgba(10,10,16,.96);
  z-index: 0;
}

.hn-new-updates-count,
.hn-new-updates-text,
.hn-new-updates-icon{
  position: relative;
  z-index: 1;
}

.hn-new-updates-count{
  flex: 0 0 auto;
  min-width: 36px;
  height: 36px;
  margin-left: 6px;
  padding: 0 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font: 700 14px/1 system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  background: radial-gradient(circle at 30% 30%, #2f7cff, #0a52ff 70%);
  box-shadow:
    0 0 0 1px rgba(255,255,255,.08) inset,
    0 0 12px rgba(47,124,255,.42);
}

.hn-new-updates-text{
  flex: 0 1 auto;
  min-width: 0;
  color: #fff;
  font: 700 14px/1.2 system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  text-align: left;
  padding: 11px 0 11px 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hn-new-updates-icon{
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  margin-right: 6px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  line-height: 1;
  background: radial-gradient(circle at 30% 30%, #2f7cff, #0a52ff 70%);
  box-shadow:
    0 0 0 1px rgba(255,255,255,.08) inset,
    0 0 12px rgba(47,124,255,.42);
}

@keyframes hnEdgeSweep{
  0%{
    transform: translateX(-140%) rotate(12deg);
  }
  100%{
    transform: translateX(340%) rotate(12deg);
  }
}

@keyframes hnUpdateDrop{
  0%{
    opacity: 0;
    transform: translateX(-50%) translateY(-16px) scale(.92);
  }
  100%{
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

@media (max-width: 420px){
  .hn-new-updates-pill{
    top: calc(env(safe-area-inset-top, 0px) + 20px);
    
    max-width: calc(100vw - 20px);
  }

  .hn-new-updates-pill-inner{
    max-width: calc(100vw - 20px);
  }

  .hn-new-updates-text{
    font-size: 13px;
    padding-left: 12px;
  }

  .hn-new-updates-icon{
    width: 34px;
    height: 34px;
    font-size: 17px;
  }
}