@if ($paginator->hasPages())
<style>
.pag{display:flex;align-items:center;justify-content:center;gap:6px;flex-wrap:wrap;padding:8px 0}
.pag-btn{
  display:inline-flex;align-items:center;justify-content:center;
  min-width:40px;height:40px;padding:0 6px;border-radius:10px;
  font-size:.85rem;font-weight:600;text-decoration:none;
  border:1px solid rgba(0,245,255,.12);
  background:rgba(17,17,31,.85);
  color:var(--text2,#a0a8c0);
  transition:background .15s,border-color .15s,color .15s,transform .12s;
  cursor:pointer;
}
.pag-btn:hover{
  background:rgba(0,245,255,.1);
  border-color:rgba(0,245,255,.35);
  color:#fff;
  transform:translateY(-1px);
}
.pag-btn.active{
  background:linear-gradient(135deg,var(--accent,#ff2d7d),var(--accent3,#b84dff));
  border-color:transparent;
  color:#fff;
  font-weight:800;
  box-shadow:0 0 18px rgba(255,45,125,.35);
  cursor:default;
  pointer-events:none;
}
.pag-btn.disabled{
  opacity:.3;cursor:default;pointer-events:none;
}
.pag-dots{
  display:inline-flex;align-items:center;justify-content:center;
  min-width:40px;height:40px;color:var(--text3,#555);font-size:.9rem;
  letter-spacing:.1em;
}
.pag-arrow{font-size:1rem}
</style>
<nav class="pag" aria-label="Sayfalama">
  {{-- Önceki --}}
  @if ($paginator->onFirstPage())
    <span class="pag-btn disabled pag-arrow">‹</span>
  @else
    <a class="pag-btn pag-arrow" href="{{ $paginator->previousPageUrl() }}" rel="prev" aria-label="Önceki sayfa">‹</a>
  @endif

  {{-- Sayfa numaraları --}}
  @foreach ($elements as $element)
    @if (is_string($element))
      <span class="pag-dots">···</span>
    @endif
    @if (is_array($element))
      @foreach ($element as $page => $url)
        @if ($page == $paginator->currentPage())
          <span class="pag-btn active" aria-current="page">{{ $page }}</span>
        @else
          <a class="pag-btn" href="{{ $url }}">{{ $page }}</a>
        @endif
      @endforeach
    @endif
  @endforeach

  {{-- Sonraki --}}
  @if ($paginator->hasMorePages())
    <a class="pag-btn pag-arrow" href="{{ $paginator->nextPageUrl() }}" rel="next" aria-label="Sonraki sayfa">›</a>
  @else
    <span class="pag-btn disabled pag-arrow">›</span>
  @endif
</nav>
@endif
