/* ============================================================
   NAVBAR.CSS — SINGLE SOURCE OF TRUTH
   Layout uses flexbox only. Zero hardcoded pixel offsets.
   This file is the only place navbar elements are styled.
   ============================================================ */

/* --- SCOPED BOX-SIZING RESET ---
   Applies border-box ONLY to navbar elements, not the whole page.
   This is necessary because style.css (index.html) does not set
   box-sizing globally, while watchpage.css and profilepage.css do.
   Without this, .user-profile's 2px border renders outside its 40px
   box on index.html → computed size becomes 44px instead of 40px.
   The .search-box input border causes the same 2px positional shift.
*/
.navbar *,
.navbar *::before,
.navbar *::after {
  box-sizing: border-box;
}

/* --- SCOPED BOX-SIZING RESET ---
   style.css uses * { margin: 0 } with NO box-sizing declaration,
   so index.html defaults to content-box. watchpage.css and profilepage.css
   both have * { box-sizing: border-box }, so borders on .user-profile (2px)
   and .search-box input (2px) are absorbed inside the declared size there
   but ADD to it on index.html — causing 44px vs 40px profile pic and a
   3-4px search box shift. This selector scopes the fix to navbar only,
   without touching featured-content or any other page layout. */
.navbar,
.navbar *,
.navbar *::before,
.navbar *::after {
  box-sizing: border-box;
}

/* --- SHELL --- */
.navbar {
  background-color: transparent;
  height: 70px;
  color: #fff;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  transition: background-color 0.3s ease, backdrop-filter 0.3s ease;
  z-index: 1000;
}

/* --- WRAPPER: single flex row, everything in one line --- */
.navbar-wrapper {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 50px;
  position: relative;
  z-index: 1001; /* .search-overlay (998) üstünde kalsın; scrolled durumunda da */
}

.navbar:has(.search-overlay.active) .navbar-wrapper {
  background-color: rgba(17, 15, 25, 0.9);
  backdrop-filter: blur(70px);
}

.navbar-wrapper.scrolled {
  background-color: rgba(3, 4, 12, 0.8);
  backdrop-filter: blur(70px);
  transition: background;
}

/* --- LOGO --- */
.logo-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
    z-index: 1000;
}

.logo {
  width: 30px;
  display: block;
  margin: 0;

}

/* --- MOBILE-ONLY ELEMENTS ---
   Hidden on desktop by default; shown and fully styled inside the
   @media (max-width: 768px) block near the end of this file. */
.navbar-mobile-title,
.navbar-mobile-actions,
.navbar-mobile-bell,
.navbar-mobile-pills {
  display: none;
}

/* --- MENU CONTAINER: fills remaining space, holds menu + search + controls --- */
.menu-container {
  display: flex;
  align-items: center;
  flex: 1;              /* Takes all space left after the logo */
  min-width: 0;         /* Prevents flex overflow on small screens */
  /* 3 mantıksal grup var: .menu-list | .search-group | .navbar-actions
     (bildirim zili + #userMenu ya da .register-btn2). space-between bu üç
     grup arasındaki boşluğu EŞİT dağıtır — böylece "menü-arama" boşluğu ile
     "arama-profil" boşluğu birbirinden kopmaz. Zil + userMenu + login butonu
     TEK bir .navbar-actions wrapper'ında toplandı ki bu denge bozulmasın
     (login/userMenu ikisinden biri her zaman display:none olduğu için
     fiilen her durumda tam 3 görünür çocuk kalıyor). */
  justify-content: space-between;
}

/* --- MENU LIST --- */
.menu-list {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0 0 0 50px;  /* Small gap from logo only */
  column-gap: 30px;
  flex-shrink: 0;
  font-size: 16px;
  font-family: "Poppins", sans-serif;
  font-weight: 500;
  text-shadow: 1px 1px 10px #000;
  z-index: 1000;
}

.menu-list-item a {
  color: rgb(236, 236, 236);
  text-decoration: none;
}

.menu-list-item.active {
  color: rgb(152, 148, 148);
  font-weight: bold;
}

.menu-list-item a:hover {
  color: rgb(175, 175, 175);
}

.menu-list-item.active a {
  color: inherit;
}

/* --- SEARCH GROUP: search box + mic, tek blok olarak taşınır ---
   menu-container artık space-between kullandığı için bu grubun
   pozisyonunu ayrı bir auto-margin ile itmeye gerek yok; space-between
   onu otomatik olarak menü ile sağ eleman arasına ortalar/aralar. */
.search-group {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* --- SEARCH BOX --- */
.search-box {
  position: relative;
  width: 500px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  z-index: 1000;
  transition: all;
}

.search-box input {
  width: 100%;
  padding: 10px 10px 10px 35px;
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: 50px;
  background-color: transparent;
  color: white;
  font-size: 16px;
  outline: none;
  backdrop-filter: blur(20px);
  box-sizing: border-box;
  transition: all;
}

.search-box input::placeholder {
  color: #8a8a8a;
}

.search-box input:hover {
  border-color: white;
}

.search-box input:focus {
  border-color: white;
  background-color: #fff;
  color: black;
}

/* Search icon — inside the input on the left */
.btn-search {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 24px;
  pointer-events: none;
  color: white;
  display: block;
}

/* Clear button — sits just outside the input's right edge */
.btn-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 24px;
  cursor: pointer;
  pointer-events: all;
  color: white;
  display: none;
  z-index: 996;

}

.search-box input:focus ~ .btn-search,
.search-box input:focus ~ .btn-clear {
  color: gray;
}

/* --- VOICE BUTTON ---
  Uses .material-icons.btn-voice double-class specificity intentionally.
  Google's icon font stylesheet sets .material-icons { font-size: 24px; display: inline-block }
  A single .btn-voice selector would lose to it. The double class wins without !important.
*/
.material-icons.btn-voice {
  position: relative;
  flex-shrink: 0;
  margin-left: 8px;
  cursor: pointer;
  color: white;
  font-size: 24px;
  padding: 10px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  backdrop-filter: blur(20px);
  transition: background-color 0.3s ease;
  box-sizing: border-box;
  z-index: 1000;
}

.material-icons.btn-voice:hover {
  background-color: #1f1f1f;
}

/* --- LOGIN BUTTON --- */
.register-btn2 {
  flex-shrink: 0;
  margin-left: 0; /* boşluğu artık menu-container'daki space-between veriyor */
  background-color: rgba(72, 173, 255, 0.08);
  color: white;
  border: 2px solid rgb(159, 183, 189);
  padding: 10px 15px;
  font-size: 16px;
  cursor: pointer;
  border-radius: 50px;
  backdrop-filter: blur(20px);
  box-shadow: 0 0 15px #000;
  transition: border-color 0.3s ease;
  white-space: nowrap;
  z-index: 1000;
}

.register-btn2:hover {
  border-color: rgb(215, 240, 246);
}

/* --- NAVBAR ACTIONS: bildirim zili + profil/login grubu --- */
.navbar-actions {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-shrink: 0;
}

/* --- BİLDİRİM ZİLİ (masaüstü) ---
   Mobildeki .navbar-mobile-bell ile aynı mantık, sadece boyutlar masaüstüne
   göre. İkisi de aynı navbar.js kodu tarafından yönetilir (bkz. initBell),
   aynı #notificationPanel'i açar. */
.navbar-bell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: none;
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.2s ease;
}

.navbar-bell:hover {
  background-color: rgba(255, 255, 255, 0.08);
}

.navbar-bell .material-icons {
  font-size: 24px;
}

.navbar-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background-color: #2196f3;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  font-family: "Poppins", sans-serif;
  border: 2px solid rgb(17, 15, 25);
  pointer-events: none;
}

/* --- BİLDİRİM PANELİ ---
   .profile-dropdown ile aynı konumlanma deseni: zilin kapsayıcısı
   position:relative, panel ona göre position:absolute (top:58px; right:-10px),
   aynı .triangle. Panelin kendisinde overflow YOK ki triangle (top:-10px ile
   kutunun dışında) kırpılmasın - kaydırma sadece içteki .notification-panel-scroll
   sarmalayıcısında oluyor (bkz. notification.js). */
.notification-panel {
  display: none;
  position: absolute;
  top: 58px;
  right: -10px;
  width: 320px;
  max-width: calc(100vw - 32px);
  background-color: rgba(0, 0, 0, 0.285);
  border: 1px solid rgb(114, 114, 114);
  border-radius: 1px;
  backdrop-filter: blur(10px);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
  z-index: 9998;
}

.notification-panel.open {
  display: block;
}

.notification-panel-scroll {
  max-height: min(420px, calc(100vh - 100px));
  overflow-y: auto;
}

.notification-empty {
  padding: 28px 16px;
  text-align: center;
  color: rgba(255, 255, 255, 0.55);
  font-size: 14px;
}

.notification-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 16px;
  text-decoration: none;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: background-color 0.15s ease;
}

.notification-item:last-child {
  border-bottom: none;
}

.notification-item:hover {
  background-color: #444;
}

.notification-item.unread {
  background-color: rgba(33, 150, 243, 0.1);
}

.notification-item-avatar-link {
  flex-shrink: 0;
  display: block;
}

.notification-item-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}

.notification-item-body {
  min-width: 0;
  flex: 1;
}

.notification-item-text {
  color: #fff;
  font-size: 13.5px;
  line-height: 1.35;
  margin: 0 0 3px;
  overflow-wrap: break-word;
}

/* Gönderen adı - kendi profiline link, geri kalan metinden ayrı tıklanabilir */
.notification-item-sender {
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.notification-item-sender:hover {
  text-decoration: underline;
}

/* Beğenilen/yanıtlanan yorumun kendi metni - panel dışına taşmaz, uzunsa "..." ile kesilir */
.notification-item-comment {
  color: rgba(255, 255, 255, 0.65);
  font-size: 12.5px;
  line-height: 1.3;
  margin: 0 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.notification-item-time {
  color: rgba(255, 255, 255, 0.45);
  font-size: 11.5px;
}

/* --- USER MENU (profile picture + dropdown) --- */
#userMenu {
  position: relative;
  flex-shrink: 0;
  margin-left: 0; /* boşluğu artık menu-container'daki space-between veriyor */
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  z-index: 9999;
}

.user-profile {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  object-fit: cover;
  cursor: pointer;
  border: 2px solid transparent;
  background: none;
  display: block;
}

.user-profile:hover {
  border-color: rgb(130, 128, 128);
}

.profile-dropdown {
  display: none;
  position: absolute;
  top: 58px;
  right: -10px;
  width: 200px;
  background-color: rgba(0, 0, 0, 0.285);
  border: 1px solid rgb(114, 114, 114);
  border-radius: 1px;
  backdrop-filter: blur(10px);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
  z-index: 9998;
}

.triangle {
  position: absolute;
  top: -10px;
  right:24px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 10px solid rgba(255, 255, 255, 0.85);
}

.profile-dropdown ul {
  list-style: none;
  margin: 0;
  padding: 10px 0;
}

.profile-dropdown li {
  padding: 10px 20px;
  color: #fff;
  cursor: pointer;
}

.profile-dropdown li:hover {
  background-color: #444;
}

.profile-dropdown a {
  color: #fff;
  text-decoration: none;
  display: block;
}

/* --- VOICE SEARCH OVERLAY --- */
.searching-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: white;
  font-family: Arial, sans-serif;
  backdrop-filter: blur(10px);
  z-index: 9999;
  pointer-events: none;
  transition: opacity 0.3s ease-in-out;
}

.searching-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.mic-icon-wrapper {
  position: relative;
  width: 130px;
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Audio-reactive background circle. Scaled purely via JS transform based on
   live mic amplitude (Web Audio AnalyserNode). Scale is clamped to 1.7x max
   in voicesearch.js — this base size is the 1x (resting) state. */
.mic-pulse {
  position: absolute;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.18);
  transform: scale(1);
  transition: transform 0.06s linear;
  will-change: transform;
  pointer-events: none;
}

.mic-icon {
  position: relative;
  z-index: 1;
  background-color: white;
  color: black;
  padding: 20px;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(255, 255, 255, 0.2);
  font-size: 50px;
}

.recognized-text {
  margin-top: 20px;
  font-size: 24px;
  text-align: center;
  max-width: 80%;
  word-wrap: break-word;
}

.close-btn2 {
  position: absolute;
  top: 60px;
  right: 40px;
  font-size: 30px;
  cursor: pointer;
  padding: 10px;
  background-color: rgba(71, 71, 71, 0.36);
  backdrop-filter: blur(20px);
  border-radius: 100px;
  transition: all 0.3s;
}

.close-btn2:hover {
  background-color: #101010;
}

/* --- SEARCH RESULTS OVERLAY --- */
.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgb(17, 15, 25);
  padding-top: 80px;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  z-index: 998; /* .navbar'ın (1000) altında kalıyor, böylece overlay açıkken
                   navbar her zaman üstte ve görünür kalır */
  transition: opacity 0.5s ease, visibility 0.5s ease;
  /* NOT: flex + min-height:100vh denendi ama bu, sonuç alanını her zaman
     tam viewport sonuna kadar büyütüp footer'ı viewport'un en altına
     oturtuyordu — yani footer her zaman scroll'suz görünür kalıyordu.
     Onun yerine aşağıda #searchResults/#profileResults'a orta büyüklükte
     sabit bir min-height veriyoruz (bkz. .search-results-grid). */
}

.search-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Mobil overlay iskeleti masaüstünde gizli — arama hâlâ navbar
   içindeki #searchInput üzerinden çalışır. */
.search-overlay-bar,
.search-history-ui,
.search-overlay-loader {
  display: none;
}

.search-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 247px);
  /* Netflix'teki gibi satırlar arası boşluk sütunlar arasından daha
     geniş olsun diye gap'i ikiye ayırdık: row-gap büyük (satır arası),
     column-gap küçük (kartlar yatayda birbirine yakın). */
  row-gap: 20px;
  column-gap: 6px;
  padding: 40px 3px;
  width: 100%;
  max-width: 100%;
  justify-content: center;
  margin: 0 auto;
  /* Az sonuç varken (1 satır) footer hemen altına yapışıp boşluktan
     fırlamış gibi görünüyordu. Sabit bir taban yükseklik (viewport'un
     tamamı değil, ~%60'ı) footer'ı görünür alanın biraz dışına itiyor,
     böylece görmek için scroll gerekiyor. 2+ satır dolu içerikte grid
     zaten bu değerden uzun olduğu için min-height hiçbir şey değiştirmez
     — yapay/devasa bir boşluk oluşmaz, footer içeriğin hemen altında kalır. */
  min-height: 60vh;
  align-content: start; /* grid öğeleri her zaman üstten başlasın, min-height'in
                            eklediği boşluk altta kalsın */
}

.search-item {
  width: 247px;
  height: 139px;
  position: relative;
  
  border-radius: 1px;
  overflow: hidden;
  cursor: pointer;
  background-color: #1a1a1a;
  transition: transform 0.4s cubic-bezier(0.33, 1, 0.68, 1), box-shadow 0.4s ease;
  will-change: transform;
}

.search-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* --- SEARCH SKELETON (yükleniyor taslağı) ---
   Kullanıcı arama kutusuna yazmaya başladığı an, gerçek sonuçlar backend'den
   dönene kadar bu gri, nefes alır gibi (pulse) yanıp sönen kutular gösterilir.
   .search-item ile aynı boyut/grid hücresini kullanır, böylece sonuçlar
   geldiğinde yerleşim aniden zıplamaz. */
.search-item.skeleton {
  background-color: #1f1f1f;
  cursor: default;
  animation: skeleton-pulse 1.2s ease-in-out infinite;
}

.search-item.skeleton:hover {
  transform: none;
  box-shadow: none;
}

@keyframes skeleton-pulse {
  0%   { background-color: #1a1a1a; }
  50%  { background-color: #2a2a2a; }
  100% { background-color: #1a1a1a; }
}

@media (prefers-reduced-motion: reduce) {
  .search-item.skeleton {
    animation: none;
    background-color: #222;
  }
}

/* --- SEARCH TABS: İçerikler | Profiller ---
   Sits top-left of the search overlay, above the results grid.
   "İçerikler" is the default/active tab (white + bold), "Profiller"
   starts inactive (gray) until the user clicks it. */
.search-tabs {
  display: flex;
  align-items: center;
  column-gap: 28px;
  max-width: 1100px;
  margin-left: 51px;
  padding: 20px 3px 0 3px;
  font-family: "Poppins", sans-serif;
  font-size: 15px;
}

.search-tab {
  color: rgba(255, 255, 255, 0.45);
  font-weight: 500;
  cursor: pointer;
  padding-bottom: 5px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.search-tab:hover {
  color: rgba(255, 255, 255, 0.75);
}

.search-tab.active {
  color: #fff;
  font-weight: 600;
  border-bottom: 2px solid #fff;
}

/* --- PROFILE RESULTS LIST ---
   Shown when the "Profiller" tab is active. Each row: avatar, name +
   username, follower/like stats, and a follow button on the right —
   mirrors the reference profile-search layout but themed to match
   the site's dark navbar/search overlay instead of a light background. */
.profile-results-list {
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 3px 40px 3px;
  width: 100%;
  /* Aynı sebep: "Profiller" sekmesinde de az sonuçla footer'ın hemen
     altta görünmesini önlemek için ~%60 viewport taban yükseklik. */
  min-height: 60vh;
}

.profile-result-item {
  display: flex;
  align-items: center;
  padding: 14px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-result-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  background-color: #222;
  flex-shrink: 0;
}

.profile-result-info {
  margin-left: 14px;
  flex: 1;
  min-width: 0;
}

.profile-result-name {
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  font-family: "Poppins", sans-serif;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-result-username {
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
  margin-top: 2px;
}

.profile-result-stats {
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
  margin-top: 2px;
}

.profile-result-follow-btn {
  flex-shrink: 0;
  margin-left: 16px;
  background-color: #46b5ff;
  color: #fff;
  padding: 8px 18px;
  font-size: 14px;
  font-family: "Poppins", sans-serif;
  font-weight: 500;
  cursor: pointer;
  border-radius: 50px;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.profile-result-follow-btn:hover {
  background-color:#46b5ffec;
  color: #000;
}

.profile-result-follow-btn.following {
  background-color: transparent;
  border: 2px solid rgba(255, 255, 255, 0.5);
  color: #fff;
}

.profile-result-follow-btn.following:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.profile-results-empty {
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
  padding: 60px 0;
  font-family: "Poppins", sans-serif;
}

/* --- GLOBAL SCROLL BEHAVIOUR --- */
html {
  scrollbar-gutter: stable;
  overflow-y: scroll;
}

/* ============================================================
   MOBILE NAVBAR (≤768px)
   Reference layout: logo + page title on the left, a download icon
   and a bell icon (with an unread-count badge) on the right, then a
   horizontally scrollable row of category pills below.
   Desktop's menu list / search box / login-or-profile block are
   all hidden here — mobile identity access happens through the
   bottom tab bar's "Profil" item instead (see style.css), and
   search happens through the bottom bar's "Ara" item, which opens
   this same #searchOverlay/#searchInput programmatically.
   ============================================================ */
@media (max-width: 768px) {
  .navbar {
    height: auto;
    padding-bottom: 4px;
  }

  .navbar-wrapper {
  padding: 14px 16px 10px;
  flex-wrap: wrap; /* Pill menüyü alt satıra düşürür */
  position: relative;
}



  /* Netflix/streaming-app top bars stay legible over any hero image
     regardless of scroll position — a permanent soft scrim, not just
     the on-scroll solid background further up this file. */
  .navbar-wrapper::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(3, 4, 12, 0.55), rgba(3, 4, 12, 0));
    pointer-events: none;
    z-index: -1;
  }

  .logo-wrapper {
    gap: 10px;
  }

  .logo {
    width: 26px;
  }

  .navbar-mobile-title {
    display: block;
    color: #fff;
    font-size: 19px;
    font-weight: 700;
    font-family: "Poppins", sans-serif;
    white-space: nowrap;
  }

  /* Masaüstü menüsü / arama kutusu / giriş-profil bloğu mobilde
     tamamen gizli — kimlik erişimi alt sekme çubuğundaki "Profil",
     arama ise "Ara" üzerinden yapılıyor (bkz. style.css .mobile-controls). */
  .menu-container {
    display: none;
  }

  /* İndirme + bildirim ikonları tek bir grup olarak sağa yaslanır,
     referans tasarımdaki gibi aralarında sabit bir boşlukla. */
  .navbar-mobile-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: auto;
    flex-shrink: 0;
    position: relative;
    z-index: 1003;
  }


  .navbar-mobile-bell {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 30px;
    height: 30px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: none;
    color: #fff;
    cursor: pointer;
    flex-shrink: 0;
  }


  .navbar-mobile-bell .material-icons {
    font-size: 24px;
  }

  /* Bildirim rozeti — zil ikonunun sağ üst köşesine biner. */
  .navbar-mobile-badge {
    position: absolute;
    top: -4px;
    right: -8px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background-color: #2196f3;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    font-family: "Poppins", sans-serif;
    border: 2px solid rgb(17, 15, 25);
    pointer-events: none;
  }

 .navbar-mobile-pills {
  display: flex;
  gap: 10px;
  width: 100%; /* Alt satırı kaplamasını sağlar */
  padding: 12px 0 4px 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  /* --- SCROLL İLE GİZLE/GÖSTER (Netflix tarzı) ---
     max-height + opacity + translateY birlikte animasyonlanır: pill satırı
     yukarı doğru kayıp üstündeki ana navbar'ın arkasına girmiş gibi
     görünür. navbar.js (initPillsScrollBehavior) ~30px aşağı kaydırmada
     .pills-hidden ekler, ~30px yukarı kaydırmada kaldırır — en üste
     dönmek gerekmez. max-height'in gerçek içerik yüksekliğinden büyük
     olması sorun değildir: genişken içerik kendi doğal yüksekliğinde
     durur, sadece daralırken 0'a kadar düzgün animasyonlanır. */
  max-height: 64px;
  opacity: 1;
  transform: translateY(0);
  transition: max-height 0.3s ease, opacity 0.22s ease, transform 0.3s ease,
    padding-top 0.3s ease, padding-bottom 0.3s ease;
}

  .navbar-mobile-pills::-webkit-scrollbar {
    display: none;
  }

  .navbar-mobile-pills.pills-hidden {
    max-height: 0;
    opacity: 0;
    transform: translateY(-14px);
    padding-top: 0;
    padding-bottom: 0;
    pointer-events: none; /* Gizliyken pillere tıklanamasın */
  }

  .navbar-pill {
    flex-shrink: 0;
    padding: 9px 18px;
    border-radius: 20px;
    background-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: 600;
    font-family: "Poppins", sans-serif;
    text-decoration: none;
    white-space: nowrap;
  }

  .navbar-pill:hover {
    background-color: rgba(255, 255, 255, 0.18);
  }

  /* --- SEARCH OVERLAY (mobil 4 state) ---
     Overlay .navbar'ın İÇİNDE. Transform sadece .navbar-wrapper'a
     verilir; arama çubuğu ana navbar'ın yerini alır. */
  .navbar-wrapper {
    z-index: 1002;
    transition: transform 0.28s ease, background-color 0.3s ease,
      backdrop-filter 0.3s ease;
  }

  body.search-overlay-open .navbar-mobile-pills {
    display: none;
  }

  body.search-overlay-open .navbar-wrapper {
    background-color: rgba(17, 15, 25, 0.836);
    backdrop-filter: blur(70px);
    -webkit-backdrop-filter: blur(70px);
    box-shadow: none;
  }

  body.search-overlay-open .navbar-wrapper::before {
    display: none;
  }

  body.search-keyboard-open .navbar-wrapper {
    transform: translateY(-110%);
    pointer-events: none;
  }

  .search-overlay {
    padding-top: 62px;
    padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px));
    background-color: #0b0b0f;
    transition: opacity 0.35s ease, visibility 0.35s ease, padding 0.28s ease;
  }

  body.search-keyboard-open .search-overlay {
    padding-top: 0;
    padding-bottom: 0;
  }

  .search-overlay-bar {
    display: flex;
    align-items: center;
    gap: 4px;
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 8px 8px 10px 4px;
    background-color: rgba(17, 15, 25, 0.836);
    backdrop-filter: blur(70px);
    -webkit-backdrop-filter: blur(70px);
    box-shadow: none;
  }

  body.search-keyboard-open .search-overlay-bar {
    background-color: rgba(3, 4, 12, 0.8);
    backdrop-filter: blur(70px);
    -webkit-backdrop-filter: blur(70px);
    box-shadow: none;
  }

  .search-overlay-back {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    background: none;
    color: #fff;
    cursor: pointer;
  }

  .search-overlay-back .material-icons {
    font-size: 24px;
  }

  .search-overlay-field {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    height: 40px;
  }

  .search-overlay-search-icon {
    position: absolute;
    left: 0;
    font-size: 22px;
    color: rgba(255, 255, 255, 0.45);
    pointer-events: none;
  }

  .search-overlay-input {
    width: 100%;
    height: 40px;
    padding: 0 72px 0 32px;
    border: none;
    outline: none;
    background: transparent;
    color: #fff;
    font-size: 16px;
    font-family: "Poppins", sans-serif;
  }

  .search-overlay-input::placeholder {
    color: rgba(255, 255, 255, 0.38);
  }

  .search-overlay-clear,
  .search-overlay-mic {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
  }

  /* .search-overlay-inline-spinner kasıtlı olarak yukarıdaki gruptan ayrı:
     dikey ortalama transform:translateY(-50%) ile yapılırsa, spin
     animasyonunun transform:rotate(360deg) değeriyle çakışıp tarayıcı
     ikisini matrix olarak interpolate ediyor — sonuç düzgün bir dönüş
     değil, yukarı-aşağı sallanan garip bir hareket oluyor. Ortalamayı
     margin-top ile yapıp transform'u tamamen animasyona bırakıyoruz. */
  .search-overlay-inline-spinner {
    position: absolute;
    top: 50%;
    margin-top: -8px; /* height:16px'in yarısı, dikey ortalama */
  }

  .search-overlay-clear {
    right: 36px;
    display: none;
    font-size: 20px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
  }

  .search-overlay-bar.has-text .search-overlay-clear {
    display: block;
  }

  .search-overlay-mic {
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    background: none;
    color: #fff;
    cursor: pointer;
  }

  .search-overlay-mic .material-icons {
    font-size: 22px;
  }

  .search-overlay-inline-spinner {
    right: 38px;
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid #2a658bdc;
    border-top-color: #46B5FF;
    border-radius: 50%;
    animation: search-spin 0.7s linear infinite;
  }

  /* State 1 — idle: geçmiş başlığı */
  .search-history-ui {
    display: none;
    padding: 18px 16px 8px;
  }

  .search-history-ui h3 {
    margin: 0;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    font-family: "Poppins", sans-serif;
  }

  .search-overlay.is-idle .search-history-ui {
    display: block;
  }

  .search-overlay.is-idle .search-tabs,
  .search-overlay.is-idle .search-results-grid,
  .search-overlay.is-idle .profile-results-list,
  .search-overlay.is-idle .footer {
    display: none !important;
  }

  /* State 3 — loading: artık merkezde büyük mavi spinner YOK. Bunun yerine
     .search-results-grid görünür kalır ve script.js tarafından basılan
     .search-item.skeleton kartları (aşağıdaki has-query ile paylaşılan
     grid/kart boyut kuralları sayesinde) içerik gelene kadar iskelet
     olarak gösterilir. Arama kutusundaki küçük dönen spinner (aşağıda)
     tek loading göstergesi olarak kalır. */
  .search-overlay-loader {
    display: none;
  }

  .search-overlay.is-loading .search-history-ui,
  .search-overlay.is-loading .profile-results-list,
  .search-overlay.is-loading .footer {
    display: none !important;
  }

  .search-overlay.is-loading .search-overlay-clear {
    display: none !important;
  }

  .search-overlay.is-loading .search-overlay-inline-spinner {
    display: block;
  }

  .search-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #2a658bdc;
    border-top-color: #46B5FF;
    border-radius: 50%;
    animation: search-spin 0.7s linear infinite;
  }

  @keyframes search-spin {
    to { transform: rotate(360deg); }
  }

  @media (prefers-reduced-motion: reduce) {
    .search-spinner,
    .search-overlay-inline-spinner {
      animation: none;
      border-top-color: #46B5FF;
      opacity: 0.85;
    }
  }

  .search-tabs {
  display: flex;
  align-items: center;
  column-gap: 28px;
  max-width: 1100px;
  margin-left: 10px;
  padding: 20px 3px 0 3px;
  font-family: "Poppins", sans-serif;
  font-size: 15px;
}

  /* State 4 — sonuç grid/wrap (kart basımı mevcut JS'de) */
  .search-overlay.has-query:not(.is-loading) .search-history-ui {
    display: none;
  }

  .search-overlay.has-query .search-results-grid,
  .search-overlay.is-loading .search-results-grid {
    display: flex;
    flex-wrap: wrap;
    grid-template-columns: none;
    justify-content: flex-start;
    align-content: start;
    gap: 10px;
    padding: 16px 12px 24px;
    min-height: 0;
    width: 100%;
    box-sizing: border-box;
  }

  .search-overlay.has-query .search-item,
  .search-overlay.is-loading .search-item {
    width: calc((100% - 20px) / 3);
    height: auto;
    /* Masaüstündeki .search-item ile aynı oran (247x139 ≈ 16:9), dikey
       poster (2/3) yerine yatay kart. 768px genişlikte (breakpoint sınırı)
       bu, 3 sütunla ~241x136px'e denk geliyor — masaüstündeki 247x139'a
       neredeyse birebir. Daha dar telefonlarda orantılı küçülür, oran
       korunur (ör. 375px'te ~110x62px). */
    aspect-ratio: 247 / 139;
    border-radius: 1px;
  }

  .search-overlay .footer {
    display: none;
  }
}