/* Hide scrollbars where marked */
.neo-streak-popover.no-scrollbar,
.neo-streak-levels-modal.no-scrollbar,
.neo-streak-levels-modal__list.no-scrollbar {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.neo-streak-popover.no-scrollbar::-webkit-scrollbar,
.neo-streak-levels-modal.no-scrollbar::-webkit-scrollbar,
.neo-streak-levels-modal__list.no-scrollbar::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.neo-streak-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.neo-streak-nav {
  position: relative;
  color: #7eb6ff;
}

.neo-streak-nav__icon {
  display: grid;
  place-items: center;
}

.neo-streak-nav__badge,
.neo-streak-fab__badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: #2ecc71;
  color: #04140b;
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
  line-height: 1;
}

.neo-streak-fab {
  position: fixed;
  right: 18px;
  bottom: 92px;
  z-index: 1200;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: #fff;
  background: radial-gradient(circle at 30% 30%, #5aa7ff, #2b6cdf 55%, #1a3f8a);
  box-shadow: 0 8px 24px rgba(43, 108, 223, 0.45);
}

.neo-streak-fab[hidden] {
  display: none !important;
}

/* Popover like avatar / notifications menu */
.neo-streak-popover {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 110;
  box-sizing: border-box;
  width: min(380px, calc(100vw - 16px));
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: manipulation;
  white-space: normal;
  border-radius: 18px;
  padding: 1.05rem 1rem 1.15rem;
  background: var(--card, #151821);
  color: var(--text-default, #eef2f8);
  border: 1px solid var(--transparent-5-w, rgba(255, 255, 255, 0.06));
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.95);
  transform-origin: top right;
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
}

.neo-streak-popover.modalActive {
  pointer-events: auto;
  opacity: 1 !important;
  visibility: visible;
  transform: scale(1);
}

.neo-streak-popover--fixed {
  position: fixed;
  top: auto;
  bottom: 150px;
  right: 18px;
  transform-origin: bottom right;
}

.neo-streak-popover__close,
.neo-streak-popover__settings {
  position: absolute;
  top: 8px;
  right: 10px;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.5);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
  z-index: 2;
}

.neo-streak-popover__settings {
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.62);
}

.neo-streak-popover__settings:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.neo-streak-popover__settings svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.neo-streak-popover__accent {
  height: 3px;
  margin: 0.9rem -1rem -1.15rem;
  border-radius: 0 0 18px 18px;
  background: linear-gradient(90deg, transparent, #2ecc71, transparent);
}

.neo-streak-hero {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: 0.2rem;
  padding-right: 1.5rem;
}

.neo-streak-hero__medal {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.neo-streak-hero__medal img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4));
}

.neo-streak-hero__medal.is-locked img,
.neo-streak-next__medal img.is-locked,
.neo-streak-levels-modal__hero-icon.is-locked {
  filter: grayscale(1) brightness(0.55);
  opacity: 0.7;
}

.neo-streak-hero__num {
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1;
}

.neo-streak-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0.4rem 0 0.9rem;
  opacity: 0.72;
  font-size: 0.86rem;
  white-space: normal;
  overflow-wrap: anywhere;
}

.neo-streak-task__text {
  font-size: 0.88rem;
  line-height: 1.35;
  opacity: 0.9;
  margin-bottom: 0.5rem;
  white-space: normal;
  overflow-wrap: anywhere;
}

.neo-streak-bar {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.neo-streak-bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #57d38c, #2ecc71);
}

.neo-streak-bar--lg {
  height: 10px;
  overflow: visible;
}

.neo-streak-bar__medal {
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
}

.neo-streak-bar__medal img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.neo-streak-hint {
  margin-top: 0.4rem;
  font-size: 0.75rem;
  opacity: 0.55;
}

.neo-streak-week {
  margin-top: 1rem;
}

.neo-streak-week__head {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 0.3rem;
  margin-bottom: 0.6rem;
  font-size: 0.78rem;
  line-height: 1.25;
  opacity: 0.85;
  text-align: center;
  white-space: normal;
}

.neo-streak-week__nav {
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 1.25rem;
  cursor: pointer;
  opacity: 0.7;
}

.neo-streak-week__nav:disabled {
  opacity: 0.22;
  cursor: default;
}

.neo-streak-day span {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.05rem;
  line-height: 1;
  font-size: 0.72rem;
  font-weight: 700;
}

.neo-streak-day span em {
  font-style: normal;
  font-weight: 500;
  font-size: 0.62rem;
  opacity: 0.72;
}

.neo-streak-week__days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.3rem;
}

.neo-streak-day {
  display: grid;
  justify-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  opacity: 0.75;
  color: var(--text-secondary, #7a8699);
}

.neo-streak-day i {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px dashed var(--transparent-20-w, rgba(255, 255, 255, 0.22));
  display: grid;
  place-items: center;
  box-sizing: border-box;
}

.neo-streak-day i svg {
  width: 12px;
  height: 12px;
  display: none;
}

/* Current day in progress — gray outline */
.neo-streak-day.is-today:not(.is-done) i {
  border-style: solid;
  border-color: var(--text-secondary, #7a8699);
  background: transparent;
}

.neo-streak-day.is-today:not(.is-done) {
  color: var(--text-custom, #a8b4c8);
  opacity: 1;
}

/* Completed day — palette accent + checkmark */
.neo-streak-day.is-done i {
  border-style: solid;
  border-color: var(--span, #6eb6ff);
  background: var(--span-middle, rgba(110, 182, 255, 0.25));
  color: var(--span, #6eb6ff);
}

.neo-streak-day.is-done i svg {
  display: block;
}

.neo-streak-day.is-done {
  color: var(--text-default, #eef2f8);
  opacity: 1;
}

.neo-streak-freezes {
  margin-top: 1rem;
}

.neo-streak-freezes__label {
  font-size: 0.84rem;
  opacity: 0.75;
  margin-bottom: 0.5rem;
}

.neo-streak-freezes__slots {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.neo-streak-freeze {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
}

.neo-streak-freeze--full {
  background: var(--span-middle, rgba(110, 182, 255, 0.25));
  color: var(--span, #6eb6ff);
}

.neo-streak-freeze--plus,
.neo-streak-freeze--empty {
  border: 1.5px dashed rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.45);
  background: transparent;
}

.neo-streak-freeze--plus {
  padding: 0;
  font: inherit;
  cursor: pointer;
}

.neo-streak-freeze--plus:hover {
  border-color: var(--span, #6eb6ff);
  color: var(--span, #6eb6ff);
}

.neo-streak-next {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
  padding: 0.7rem 0.75rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  min-width: 0;
}

.neo-streak-next__medal {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.neo-streak-next__medal img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.neo-streak-next__text {
  min-width: 0;
  font-size: 0.84rem;
  line-height: 1.3;
  white-space: normal;
  overflow-wrap: anywhere;
}

.neo-streak-next__btn {
  white-space: normal;
  text-align: center;
  padding: 0.4rem 0.7rem;
  border-radius: 10px;
  border: 0;
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  cursor: pointer;
  font-size: 0.8rem;
  line-height: 1.2;
}

.neo-streak-next__btn:hover {
  background: rgba(255, 255, 255, 0.14);
}

/* Levels detail modal (opened by "Узнать больше") */
.neo-streak-levels-overlay {
  position: fixed;
  inset: 0;
  z-index: 1400;
  background: rgba(4, 8, 18, 0.7);
  display: grid;
  place-items: center;
  padding: 1rem;
}

.neo-streak-levels-overlay[hidden] {
  display: none !important;
}

.neo-streak-levels-modal {
  width: min(440px, 100%);
  max-height: min(88vh, 720px);
  overflow-x: hidden;
  overflow-y: auto;
  border-radius: 20px;
  padding: 1.1rem 1.05rem 1.2rem;
  background: #151821;
  color: #f3f5fa;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.neo-streak-levels-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.neo-streak-levels-modal__head h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
}

.neo-streak-levels-modal__close {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.neo-streak-levels-modal__status {
  margin-bottom: 0.85rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.neo-streak-levels-modal__hero {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.55rem;
}

.neo-streak-levels-modal__hero-icon {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.neo-streak-levels-modal__hero-num {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
}

.neo-streak-levels-modal__hint {
  font-size: 0.88rem;
  opacity: 0.8;
  margin-bottom: 0.65rem;
}

.neo-streak-levels-modal__meta {
  margin-top: 0.45rem;
  font-size: 0.86rem;
  opacity: 0.7;
}

.neo-streak-levels-modal__list {
  display: grid;
  gap: 0.45rem;
  max-height: min(48vh, 380px);
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 2px;
}

.neo-streak-level-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.7rem;
  align-items: center;
  padding: 0.55rem 0.35rem;
}

.neo-streak-level-row__icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
}

.neo-streak-level-row__icon img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.neo-streak-level-row.is-locked .neo-streak-level-row__icon img {
  opacity: 0.65;
}

.neo-streak-level-row__title {
  font-weight: 700;
  font-size: 0.95rem;
}

.neo-streak-level-row__title small {
  display: block;
  font-weight: 500;
  opacity: 0.6;
  margin-top: 0.1rem;
}

.neo-streak-level-row__remain {
  opacity: 0.65;
  font-size: 0.84rem;
  white-space: nowrap;
}

#neoStreakFreezeModal {
  z-index: 1500;
}

.neo-streak-freeze-modal {
  width: min(420px, 100%);
  border-radius: 20px;
  padding: 1.15rem 1.15rem 1.2rem;
  background: var(--card, #151821);
  color: var(--text-default, #eef2f8);
  border: 1px solid var(--transparent-5-w, rgba(255, 255, 255, 0.06));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.neo-streak-freeze-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.neo-streak-freeze-modal__head h2 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
}

.neo-streak-freeze-modal__close {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.neo-streak-freeze-modal__hero {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 0.85rem 0 0.7rem;
}

.neo-streak-freeze-modal__bolt {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--span-middle, rgba(110, 182, 255, 0.25));
  color: var(--span, #6eb6ff);
}

.neo-streak-freeze-modal__ratio {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}

.neo-streak-freeze-modal__hint {
  margin: 0 auto;
  max-width: 320px;
  text-align: center;
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--text-custom, rgba(255, 255, 255, 0.72));
}

.neo-streak-freeze-modal__slots {
  justify-content: center;
  margin-top: 0.95rem;
}

.neo-streak-freeze-buy {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
  padding: 0.75rem 0.8rem;
  border-radius: 14px;
  background: var(--transparent-5-w, rgba(255, 255, 255, 0.05));
}

.neo-streak-freeze-buy__price {
  margin-right: auto;
}

.neo-streak-freeze-buy__price small {
  display: block;
  opacity: 0.6;
  font-size: 0.75rem;
}

.neo-streak-freeze-buy__sum {
  color: var(--money, #f0c27a);
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.1;
}

.neo-streak-freeze-qty {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.neo-streak-freeze-qty button {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: var(--button, #1a2740);
  color: inherit;
  cursor: pointer;
}

.neo-streak-freeze-qty button:disabled {
  opacity: 0.35;
  cursor: default;
}

.neo-streak-freeze-qty span {
  min-width: 1.2rem;
  text-align: center;
  font-weight: 700;
}

.neo-streak-freeze-modal__submit {
  border: 0;
  border-radius: 10px;
  padding: 0.55rem 0.95rem;
  background: var(--green, #64ce82);
  color: #04140b;
  font-weight: 700;
  cursor: pointer;
}

.neo-streak-freeze-modal__submit:disabled {
  opacity: 0.45;
  cursor: default;
}

.neo-streak-freeze-modal__balance {
  margin-top: 0.9rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-custom, rgba(255, 255, 255, 0.72));
}

.neo-streak-freeze-modal__balance b {
  color: var(--money, #f0c27a);
  font-weight: 700;
}

@media (max-width: 768px) {
  .neo-streak-fab {
    bottom: 78px;
    right: 14px;
  }

  .neo-streak-popover {
    position: fixed;
    top: 4.5rem;
    bottom: auto;
    left: 10px;
    right: 10px;
    width: auto;
    max-width: none;
    max-height: none;
    overflow: hidden;
    padding: 0.65rem 0.75rem 0.45rem;
    transform-origin: top center;
  }

  .neo-streak-popover--fixed {
    top: auto;
    bottom: 5.2rem;
    left: auto;
    right: 12px;
    width: min(380px, calc(100vw - 24px));
    transform-origin: bottom right;
  }

  .neo-streak-popover__accent {
    margin: 0.45rem -0.75rem -0.45rem;
  }

  .neo-streak-hero {
    gap: 0.45rem;
    margin-top: 0;
  }

  .neo-streak-hero__medal,
  .neo-streak-hero__medal img {
    width: 42px;
    height: 42px;
  }

  .neo-streak-hero__num {
    font-size: 1.85rem;
  }

  .neo-streak-hero__meta {
    margin: 0.15rem 0 0.4rem;
    font-size: 0.78rem;
    gap: 0.2rem;
  }

  .neo-streak-task__text {
    font-size: 0.8rem;
    line-height: 1.25;
    margin-bottom: 0.3rem;
  }

  .neo-streak-week {
    margin-top: 0.55rem;
  }

  .neo-streak-week__head {
    margin-bottom: 0.3rem;
    font-size: 0.8rem;
  }

  .neo-streak-week__days {
    gap: 0.15rem;
  }

  .neo-streak-day {
    gap: 0.15rem;
    font-size: 0.64rem;
  }

  .neo-streak-day i {
    width: 22px;
    height: 22px;
  }

  .neo-streak-freezes {
    margin-top: 0.55rem;
  }

  .neo-streak-freezes__label {
    margin-bottom: 0.28rem;
    font-size: 0.78rem;
  }

  .neo-streak-freeze {
    width: 30px;
    height: 30px;
  }

  .neo-streak-next {
    grid-template-columns: auto minmax(0, 1fr) auto;
    margin-top: 0.55rem;
    padding: 0.4rem 0.5rem;
    gap: 0.4rem;
  }

  .neo-streak-next__medal,
  .neo-streak-next__medal img {
    width: 26px;
    height: 26px;
  }

  .neo-streak-next__text {
    font-size: 0.78rem;
  }

  .neo-streak-next__btn {
    width: auto;
    padding: 0.35rem 0.5rem;
    font-size: 0.75rem;
  }

  .neo-streak-freeze-modal {
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
  }

  .neo-streak-freeze-buy {
    flex-wrap: wrap;
  }

  .neo-streak-freeze-buy__price {
    flex: 1 1 40%;
  }

  .neo-streak-freeze-modal__submit {
    flex: 1 1 100%;
  }

  .neo-streak-level-row {
    grid-template-columns: auto 1fr;
  }

  .neo-streak-level-row__remain {
    grid-column: 2;
  }
}
