/* ==========================================================================
   Aniseus Dolu Yüzeyli Kompakt Üst Menü (Obsidyen & Torii v2)
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: #0d0f14;
  border-bottom: 1px solid var(--color-border);
  overflow-anchor: none;
  transition: background-color var(--duration-base) var(--ease-standard), border-color var(--duration-base) var(--ease-standard);
}

.site-header.is-scrolled {
  background: #0b0d12;
  border-bottom-color: var(--color-border-strong);
  box-shadow: var(--shadow-md);
}

.header-inner {
  max-width: var(--content-max);
  height: var(--header-height);
  margin: 0 auto;
  padding: 0 var(--space-6);
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  background: transparent;
  border: none;
  border-radius: 50%;
  overflow: visible;
  flex-shrink: 0;
  transition: transform var(--duration-fast) ease, filter var(--duration-fast) ease;
}

.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.brand:hover .brand-mark {
  transform: scale(1.06);
  filter: drop-shadow(0 0 8px rgba(255, 77, 61, 0.55));
}

.brand-text {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
}

.brand-accent {
  color: var(--color-accent);
}

.main-nav {
  display: flex;
  align-items: center;
  height: 100%;
  min-width: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 1.4rem;
  white-space: nowrap;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  height: 100%;
  font-size: 0.9rem;
  font-weight: 600;
  color: #9ca3af;
  text-decoration: none;
  transition: color var(--duration-fast) ease;
  position: relative;
  padding: 0 2px;
}

.nav-link:hover {
  color: #ffffff;
}

.nav-link.is-active {
  color: #ffffff;
  font-weight: 700;
}

.nav-link.is-active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-accent);
  border-radius: 2px;
}

.nav-link--mobile-only {
  display: none;
}

.nav-link--admin {
  height: auto;
  padding: 5px 11px;
  border-radius: 7px;
  background: var(--color-surface-raised);
  border: 1px solid var(--color-border-strong);
  color: var(--color-accent);
  font-size: 0.78rem;
  font-weight: 700;
}

.nav-link--admin:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #ffffff;
}

.nav-link--admin.is-active::after {
  display: none;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex-shrink: 0;
}

.header-search-wrap {
  position: relative;
  width: 230px;
  overflow-anchor: none;
  transition: width 0.2s var(--ease-standard);
}

.header-search-wrap:focus-within {
  width: 280px;
}

.header-search {
  display: flex;
  align-items: center;
  width: 100%;
  height: 38px;
  padding: 0 10px 0 12px;
  background: #161922;
  border: 1px solid var(--color-border-strong);
  border-radius: 9999px;
  transition: border-color var(--duration-fast) ease, background-color var(--duration-fast) ease;
}

.header-search:focus-within {
  background: #1b1e26;
  border-color: var(--color-accent);
}

.header-search input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  color: #ffffff;
  font-size: 0.84rem;
  padding: 0 6px;
}

.header-search input::placeholder {
  color: #858c9e;
  font-size: 0.82rem;
}

.header-search-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 2px;
  color: #8b92a5;
  cursor: pointer;
  order: -1;
}

.header-search-btn:hover {
  color: #ffffff;
}

.search-kbd {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: #9ca3af;
  background: #232733;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 1px 6px;
  border-radius: 5px;
  margin-left: 4px;
  user-select: none;
}

.header-live-results {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 340px;
  max-height: 420px;
  overflow-y: auto;
  background: #13151b;
  border: 1px solid var(--color-border-strong);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  z-index: var(--z-dropdown);
  display: flex;
  flex-direction: column;
}

.header-live-results[hidden] {
  display: none;
}

.live-search-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--color-border);
  color: inherit;
  transition: background-color 0.15s ease;
}

.live-search-item:hover,
.live-search-item.is-highlighted {
  background: var(--color-surface-raised);
}

.live-search-thumb,
.live-search-thumb-placeholder {
  width: 36px;
  height: 50px;
  border-radius: 5px;
  flex-shrink: 0;
}

.live-search-thumb {
  object-fit: cover;
  border: 1px solid var(--color-border);
}

.live-search-thumb-placeholder {
  display: grid;
  place-items: center;
  background: var(--color-surface-raised);
  color: var(--color-accent);
  font-weight: 800;
}

.live-search-info {
  flex: 1;
  min-width: 0;
}

.live-search-title {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-search-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.74rem;
  color: var(--color-text-muted);
  margin-top: 2px;
}

.live-search-score {
  color: var(--color-gold);
  font-weight: 700;
}

.live-search-arrow {
  color: var(--color-text-dim);
  font-size: 0.85rem;
}

.live-search-all-link {
  display: block;
  padding: 10px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  text-align: center;
  color: #ffffff;
  background: var(--color-surface-raised);
  border-top: 1px solid var(--color-border);
}

.live-search-all-link:hover {
  background: var(--color-surface-hover);
}

.live-search-empty {
  padding: 16px;
  text-align: center;
  font-size: 0.84rem;
  color: var(--color-text-muted);
}

.nav-icon-btn {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--color-surface-raised);
  border: 1px solid var(--color-border-strong);
  color: var(--color-text-soft);
  transition: background-color var(--duration-fast) ease, border-color var(--duration-fast) ease, color var(--duration-fast) ease;
}

.nav-icon-btn:hover {
  background: var(--color-surface-hover);
  border-color: rgba(255, 255, 255, 0.24);
  color: #ffffff;
}

.nav-auth {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-login-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #ffffff;
  background: var(--color-accent);
  border: 1px solid var(--color-accent);
  border-radius: 8px;
  padding: 0 16px;
  text-decoration: none;
  transition: background-color 0.15s ease;
  white-space: nowrap;
}

.nav-login-btn:hover {
  background: var(--color-accent-hover);
}

.nav-user-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 12px 0 6px;
  border-radius: 9999px;
  background: var(--color-surface-raised);
  border: 1px solid var(--color-border-strong);
  color: #ffffff;
  font-size: 0.84rem;
  font-weight: 600;
  white-space: nowrap;
}

.nav-user-pill:hover {
  background: var(--color-surface-hover);
}

.user-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.74rem;
  font-weight: 700;
  color: #ffffff;
}

.user-name {
  max-width: 110px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-logout-btn {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 10px;
  border-radius: 7px;
  background: var(--color-surface-raised);
  border: 1px solid var(--color-border);
  color: var(--color-text-soft);
  font-size: 0.78rem;
  font-weight: 700;
}

.nav-logout-btn:hover {
  background: var(--color-danger-soft);
  border-color: var(--color-danger);
  color: #ffffff;
}

.nav-toggle {
  display: none;
  height: 38px;
  border: 1px solid var(--color-border-strong);
  background: var(--color-surface-raised);
  color: #ffffff;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

@media (max-width: 1120px) {
  .header-inner {
    gap: 1rem;
  }
  .nav-links {
    gap: 1rem;
  }
  .header-search-wrap {
    width: 180px;
  }
  .header-search-wrap:focus-within {
    width: 220px;
  }
}

@media (max-width: 920px) {
  .header-right {
    flex: 1;
    justify-content: flex-end;
    min-width: 0;
  }
  .header-search-wrap {
    flex: 1;
    max-width: 240px;
    width: auto;
  }
  .header-search-wrap:focus-within {
    width: auto;
  }
  .header-live-results {
    right: -40px;
    width: min(320px, calc(100vw - 28px));
  }
  .search-kbd,
  .nav-icon-btn {
    display: none;
  }
  .nav-link--mobile-only {
    display: inline-flex;
  }
  .nav-toggle {
    display: inline-flex;
    align-items: center;
  }
  .main-nav {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    height: auto;
    min-height: calc(100vh - var(--header-height));
    padding: var(--space-6);
    background: #0d0f14;
    flex-direction: column;
    align-items: stretch;
    z-index: var(--z-modal);
    border-top: 1px solid var(--color-border);
  }
  .main-nav.is-open {
    display: flex;
  }
  .nav-links {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    height: auto;
    gap: 0;
  }
  .nav-link {
    font-size: 1rem;
    width: 100%;
    height: auto;
    padding: 13px 0;
    border-bottom: 1px solid var(--color-border);
  }
}

@media (max-width: 540px) {
  .header-inner {
    padding: 0 var(--space-4);
    gap: 0.6rem;
  }
  .brand-text,
  .nav-logout-btn {
    display: none;
  }
  .nav-login-btn {
    padding: 0 12px;
    font-size: 0.78rem;
  }
}

/* Bildirim Merkezi */
.nav-notif-wrap {
  position: relative;
}

.nav-notif-btn {
  position: relative;
  cursor: pointer;
}

.nav-notif-badge {
  position: absolute;
  top: -2px;
  right: -3px;
  background: #ef4444;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.7);
  animation: pulse-notif 2s infinite ease-in-out;
}

@keyframes pulse-notif {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

.nav-notif-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 320px;
  max-width: 90vw;
  background: #111319;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.7);
  z-index: 1000;
  overflow: hidden;
}

.nav-notif-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-notif-title {
  font-weight: 700;
  font-size: 0.85rem;
  color: #fff;
}

.nav-notif-count-tag {
  font-size: 0.72rem;
  background: rgba(255, 77, 61, 0.15);
  color: #ff4d3d;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 700;
}

.nav-notif-body {
  max-height: 360px;
  overflow-y: auto;
  padding: 8px;
}

.nav-notif-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  margin-bottom: 6px;
  gap: 8px;
}

.nav-notif-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.nav-notif-item-user {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.nav-notif-item-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #ff4d3d;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.nav-notif-item-text {
  font-size: 0.8rem;
  color: #e2e8f0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-notif-item-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.nav-notif-act-btn {
  padding: 3px 8px;
  font-size: 0.72rem;
  border-radius: 4px;
  cursor: pointer;
  border: none;
}

.nav-notif-act-btn--accept {
  background: var(--color-accent);
  color: #fff;
}

.nav-notif-act-btn--reject {
  background: rgba(255, 255, 255, 0.1);
  color: #94a3b8;
}

.nav-notif-empty {
  padding: 24px 12px;
  text-align: center;
  color: #94a3b8;
  font-size: 0.82rem;
}

.nav-notif-link-row {
  display: block;
  padding: 8px 10px;
  text-align: center;
  font-size: 0.78rem;
  color: #38bdf8;
  text-decoration: none;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
