.nl-flash-wrap{
  position: fixed;
  top: 80px;                 /* navbar yüksekliğine göre */
  left: 50%;
  transform: translateX(-50%);
  width: min(920px, calc(100% - 32px));
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 10000;            /* güvenli yükseklik */
  pointer-events: none;
}

.nl-flash{
  pointer-events: auto;
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--nl-stroke, #1c1e2a);
  background: var(--nl-bg-1, #0e0e15);
  color: var(--nl-text, #e8e8f3);
  box-shadow: 0 8px 28px rgba(124,92,255,0.15);
  position: relative;
  overflow: hidden;

  /* SADECE Y ekseninde animasyon */
  animation: nl-flash-in .22s ease-out both;
}

/* ---- Animasyonları düzelt ---- */
@keyframes nl-flash-in{
  from{ opacity: 0; transform: translateY(-8px); }
  to  { opacity: 1; transform: translateY(0); }
}
@keyframes nl-flash-out{
  to{ opacity: 0; transform: translateY(-8px); }
}

/* İstersen progress bar ve varyantlar aynı kalsın */
.nl-flash__bar{
  position: absolute; left: 0; bottom: 0; height: 3px; width: 100%;
  background: linear-gradient(90deg, rgba(124,92,255,.9), rgba(124,92,255,.35));
  transform-origin: left center;
  animation: nl-flash-bar 4.5s linear forwards;
}
@keyframes nl-flash-bar{ from{ transform: scaleX(1); } to{ transform: scaleX(0); } }

@media (max-width: 768px){
  .nl-flash-wrap{
    /* navbarı itmeden, çentikli ekranlarda güvenli alanı dikkate al */
    top: calc(12px + env(safe-area-inset-top));
    width: min(96vw, 640px);
    padding: 0 8px;
    z-index: 10000;
  }

  .nl-flash{
    grid-template-columns: 18px 1fr 28px;  /* ikon | mesaj | kapat */
    gap: 8px;
    padding: 10px 12px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,.28);
  }

  .nl-flash__body{
    font-size: 0.92rem;
    line-height: 1.35;
    overflow-wrap: anywhere;   /* uzun kelimeler taşmasın */
    word-break: break-word;
  }

  .nl-flash__close{
    width: 26px; height: 26px; font-size: 18px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  .nl-flash__bar{ height: 2px; }
}

/* Küçük telefonlar */
@media (max-width: 380px){
  .nl-flash-wrap{
    width: calc(100vw - 16px); /* kenarlara yaklaş */
  }

  /* En küçük ekranda ikona gerek yok: alan kazandır */
  .nl-flash{
    grid-template-columns: 1fr 24px; /* mesaj | kapat */
    gap: 6px;
  }
  .nl-flash__icon{ display: none; }
  .nl-flash__body{ font-size: 0.9rem; }
}

/* Hareketi azalt tercih eden kullanıcılar */
@media (prefers-reduced-motion: reduce){
  .nl-flash{ animation: none !important; }
  .nl-flash__bar{ animation: none !important; }
}