/* Üst bar yerleşimi.
   Sıra: marka · [dil] [tema] [hesap] [Oyuna katıl] [mobil menü].
   Bölüm bağlantıları üst barda değil, sol gezinme menüsünde; üst bar yalnız
   eylemleri taşır. Boş alan marka ile eylem kümesinin arasında kalır.
   Dil anahtarı, tema anahtarı, hesap ve katılma düğmeleriyle aynı yükseklik,
   köşe ve alt rafı paylaşır; hepsi tek bir araç çubuğu gibi okunur.
   Dar ekranda üst bar taşmasın diye dil anahtarı 620 px altında, tema
   anahtarı 430 px altında mobil menünün araç satırına taşınır. */

.site-header .header-actions {
  margin-left: auto;
  gap: 10px;
}

.site-header .site-header__account {
  margin-left: 0;
}

/* Canlı durum: eylemlerin solunda duran bilgi şeridi. Düğme gibi görünmez,
   ince ve sakin kalır; dar ekranda mobil menüdeki durum satırı devralır. */
.site-header .header-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  border: 1px solid #ffffff99;
  border-radius: 10px;
  background: #ffffff47;
  color: #514068;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.site-header .header-live__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #b9adc9;
  box-shadow: 0 0 0 3px #ffffff4d;
}

.site-header .header-live[data-state="online"] .header-live__dot {
  background: #57a86b;
  box-shadow: 0 0 0 3px #57a86b29;
}

.site-header .header-live[data-state="empty"] .header-live__dot {
  background: #c9a94f;
  box-shadow: 0 0 0 3px #c9a94f29;
}

.site-header .header-live[data-state="offline"] .header-live__dot {
  background: #9d93a3;
  box-shadow: 0 0 0 3px #9d93a329;
}

@media (max-width: 960px) {
  .site-header .header-live {
    display: none;
  }
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #ffffffcc;
  border-radius: 10px;
  background: #ffffffa6;
  color: #514068;
  box-shadow: 0 3px 0 #c9bcdd;
  transition: background 200ms ease, color 200ms ease, box-shadow 220ms ease, transform 220ms cubic-bezier(.22,1,.36,1);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

.theme-toggle:hover {
  background: #ffffffc9;
  color: #4a3a63;
  transform: translateY(-1px);
  box-shadow: 0 4px 0 #c9bcdd, 0 6px 16px #85709326;
}

.theme-toggle:active {
  transform: translateY(1px);
  box-shadow: 0 2px 0 #c9bcdd;
}

.theme-toggle:focus-visible {
  outline: 3px solid #67468d;
  outline-offset: 3px;
}

@media (max-width: 700px) {
  .theme-toggle {
    width: 40px;
    height: 40px;
  }

  .theme-toggle svg {
    width: 17px;
    height: 17px;
  }
}

/* Dil anahtarı (EN/TR): iki segmentli küçük denetim. Tema anahtarıyla aynı
   yükseklik, köşe ve alt rafı paylaşır. Gece stili: theme.css. */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid #ffffffcc;
  border-radius: 10px;
  background: #ffffffa6;
  box-shadow: 0 3px 0 #c9bcdd;
}

.lang-switch__option {
  min-width: 34px;
  height: 36px;
  padding: 0 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #514068;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  transition: background 200ms ease, color 200ms ease;
}

.lang-switch__option:hover {
  background: #ffffffc9;
  color: #4a3a63;
}

.lang-switch__option.is-active {
  background: #67468d;
  color: #fffdf6;
}

.lang-switch__option:focus-visible {
  outline: 3px solid #67468d;
  outline-offset: 2px;
}

@media (max-width: 700px) {
  .lang-switch {
    padding: 2px;
  }

  .lang-switch__option {
    min-width: 30px;
    height: 32px;
    font-size: 11px;
  }
}

/* Mobil menü araç satırı: dar ekranda üst bardan çıkan dil ve tema denetimleri
   menünün altında aynı yüksekliği ve alt rafı paylaşır. */
.mobile-menu__tools {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.mobile-menu__tool {
  display: inline-flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid #ffffffcc;
  border-radius: 10px;
  background: #ffffffa6;
  color: #514068;
  font-size: 11px;
  font-weight: 800;
  box-shadow: 0 3px 0 #c9bcdd;
  transition: background 200ms ease, color 200ms ease;
}

.mobile-menu__tool:hover {
  background: #ffffffc9;
  color: #4a3a63;
}

.mobile-menu__tool svg {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
}

.mobile-menu__tools .lang-switch {
  flex: 0 0 auto;
}

/* Üst bar taşma sınırı: dil anahtarı mobil menü varken (≤620 px), tema
   anahtarı yalnız çok dar ekranda (≤430 px) üst bardan çıkar; ikisi de
   menünün araç satırında kalır. Hesap düğmesi zaten ≤620 px'te avatarı
   gösterir (notifications.css), girişsizde metni korunur. */
@media (max-width: 620px) {
  .site-header .header-actions > .lang-switch {
    display: none;
  }
}

@media (max-width: 430px) {
  .site-header .header-actions > .theme-toggle {
    display: none;
  }
}

@media (min-width: 431px) {
  .mobile-menu__tool--theme {
    display: none;
  }
}
