/* --- GENEL STİLLER VE KOYU TEMA --- */

/* YENİ: Değişkenler eklendi */
:root {
  --bg-primary: #000000;
  --bg-secondary: #121212;
  /* DÜZELTME: Koyu gri (Header için) */
  --bg-tertiary: #1c1c1c;
  /* DÜZELTME: Mesaj balonu için hafif ton */
  --text-primary: #e3e3e3;
  --text-secondary: #aaa;
  --border-color: #272727;
  /* DÜZELTME: Belirgin kenarlık rengi */
  --accent-color: #757575;
  --accent-color-hover: #9e9e9e;
  --error-color: #ff6b6b;
  --blue-color: #4285F4;
  --header-height: 55px;
  /* DÜZELTME: Başlık yüksekliği daraltıldı */
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  /* Mobil klavye fallback: -webkit-fill-available */
  min-height: -webkit-fill-available;
  font-family: sans-serif;
  background-color: var(--bg-primary);
  /* DÜZELTME: Ana arka plan simsiyah */
  color: var(--text-primary);
  font-size: 15px;
  overflow: hidden;
  user-select: none;
  /* Metin seçimini engelle */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  /* YENİ: Mobil cihazlarda dokunma vurgusunu kaldır */
  -webkit-tap-highlight-color: transparent;
  /* Bazı Android tarayıcılar için */
  -moz-tap-highlight-color: transparent;
  -ms-tap-highlight-color: transparent;
}

/* Yazı yazılan alanlarda seçime izin ver */
input,
textarea {
  font-family: inherit;
  user-select: text;
  -webkit-user-select: text;
}

/* Material Symbols Global Dolgu Ayarı */
.material-symbols-outlined {
  font-variation-settings: "FILL" 1;
}

/* FILL 0 Olacak İkonlar (Navbar, Header ve Butonlar) */
.pc-vertical-nav .material-symbols-outlined,
.pc-temp-chat-btn .material-symbols-outlined,
.header .material-symbols-outlined,
.sidebar .material-symbols-outlined,
header #headerNewChatBtn .material-symbols-outlined,
.action-btn.good .material-symbols-outlined,
.action-btn.bad .material-symbols-outlined,
.action-btn.copy-button .material-symbols-outlined,
.sync-option-btn[data-sync-name="Imager (Beta)"] .material-symbols-outlined,
#syncBtn .material-symbols-outlined {
  font-variation-settings: "FILL" 0, "wght" 300, "GRAD" 0, "opsz" 24 !important;
}

/* Main Chat Container */
.chat-container {
  /* DÜZELTME: dvh klavye açıldığında dinamik olarak güncellenir (mobil kayma düzeltmesi) */
  height: 100dvh;
  /* dvh desteklemeyen eski tarayıcılar için fallback */
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  max-width: 800px;
  margin: 0 auto;
  padding-top: var(--header-height);
  /* DÜZELTME: Başlık için boşluk bırak */
  box-sizing: border-box;
  /* DÜZELTME: Padding'i yüksekliğe dahil et */
  /* height de animasyonlu kayma için transition'a eklendi */
  transition: height 0.3s cubic-bezier(0.2, 0, 0, 1), transform 0.3s cubic-bezier(0.2, 0, 0, 1), margin-left 0.3s cubic-bezier(0.2, 0, 0, 1);
}

/* Chat Messages Area */
.chat-box {
  flex-grow: 1;
  padding: 20px 10px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 25px;
  /* YENİ: En alttaki mesajın okunabilmesi için alt boşluk artırıldı */
  padding-bottom: 60px;
  scrollbar-width: none;
  /* Firefox için scrollbar gizle */

  /* YENİ: Mesajların mesaj kutusuna doğru akarken yumuşakça kaybolması (Fade-out efekti) */
  -webkit-mask-image: linear-gradient(to bottom, black calc(100% - 60px), transparent 100%);
  mask-image: linear-gradient(to bottom, black calc(100% - 60px), transparent 100%);
}

/* Scrollbar Style */
.chat-box::-webkit-scrollbar {
  display: none;
  /* Chrome, Safari, Opera için scrollbar gizle */
  width: 0;
}

/* Link styles */
.chat-box a {
  color: var(--accent-color);
  text-decoration: underline;
  cursor: pointer;
}

.chat-box a:hover {
  color: var(--accent-color-hover);
}

/* General Message Structure */
.message {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  max-width: 75%;
  /* DÜZELTME: Mesaj baloncuğu genişliği daraltıldı */
  padding-bottom: 20px;
  scroll-margin-top: 20px;
  /* Navbar altına geldiğinde estetik bir boşluk bırak */
}

.message.user {
  align-self: flex-end;
  align-items: flex-end;
}

.message.bot {
  align-self: flex-start;
  max-width: 100%;
}

/* Inner container for message content and avatar */
.message-row {
  display: flex;
  align-items: flex-start;
  gap: 3px;
  width: 100%;
}

.message.user .message-row {
  flex-direction: row-reverse;
  gap: 15px;
}

/* Message Box Styles */
.message-content {
  padding: 8px 14px;
  border-radius: 16px;
  line-height: 1.6;
  /* DÜZELTME: Okunabilirlik için satır yüksekliği artırıldı */
  overflow-wrap: break-word;
  /* Uzun kelimeleri satır sonunda kır */
  word-break: break-word;
  /* YENİ: Taşmayı önlemek için daha agresif kelime kırma */
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  max-width: 100%;
  /* Image container'a uyum için güncellendi */
  font-size: 15px;
  transition: opacity 0.5s ease-in-out;
  opacity: 1;
}

.message.user .message-content {
  /* YENİ: Mavi-mor gradyan arka plan */
  background: linear-gradient(135deg, #757575, #212121);
  border: none;
  border-bottom-right-radius: 5px;
}

.message.bot .message-content {
  border-bottom-left-radius: 5px;
  background-color: transparent;
  border: none;
  padding-top: 0;
  padding-bottom: 2px;
  margin-top: 2px;
}

/* YENİ: Uzun mesajları kısaltma ve "Daha Fazla Göster" butonu */
.message-content.truncated {
  max-height: 110px;
  /* Yaklaşık 5 satır (line-height * 5 + padding) */
  overflow: hidden;
  position: relative;
  padding-bottom: 30px;
  /* Buton için yer aç */
}

.show-more-btn {
  position: absolute;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(60, 60, 60, 0.8);
  backdrop-filter: blur(4px);
  color: #e0e0e0;
  border: none;
  border-radius: 12px;
  padding: 4px 12px;
  cursor: pointer;
  font-size: 0.85em;
}

/* YENİ: Buğulu giriş animasyonu */
@keyframes fade-in-blur {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.99);
    filter: blur(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

/* YENİ: Buğulu çıkış animasyonu */
@keyframes fade-out-blur {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }

  to {
    opacity: 0;
    transform: translateY(10px) scale(0.99);
    filter: blur(4px);
  }
}

/* YENİ: Pop-in animasyonu (Bildirimler için) */
@keyframes popIn {
  0% {
    opacity: 0;
    transform: scale(0.8) translateY(15px);
  }

  60% {
    transform: scale(1.05) translateY(-2px);
  }

  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes popOut {
  0% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }

  100% {
    opacity: 0;
    transform: scale(0.8) translateY(15px);
  }
}

.message.bot .message-content.animated-response {
  animation: fade-in-blur 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* YENİ: Kullanıcı mesajı için animasyon */
@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(15px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Kullanıcı mesajı animasyonu kaldırıldı */

/* YENİ: Başlık stilleri (Markdown h1 - h6) */
.message.bot .message-content h1,
.message.bot .message-content h2,
.message.bot .message-content h3,
.message.bot .message-content h4,
.message.bot .message-content h5,
.message.bot .message-content h6 {
  margin-top: 14px;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-primary);
}

.message.bot .message-content h1:first-child,
.message.bot .message-content h2:first-child,
.message.bot .message-content h3:first-child,
.message.bot .message-content h4:first-child,
.message.bot .message-content h5:first-child,
.message.bot .message-content h6:first-child {
  margin-top: 0;
}

.message.bot .message-content h1 {
  font-size: 1.5em;
  border-bottom: 1px solid #444 !important;
  padding-bottom: 6px;
}

.message.bot .message-content h2 {
  font-size: 1.3em;
  border-bottom: 1px solid #444 !important;
  padding-bottom: 5px;
}

.message.bot .message-content h3 {
  font-size: 1.2em;
  border-bottom: 1px solid #444 !important;
  padding-bottom: 6px;
  margin-bottom: 10px;
}

.message.bot .message-content h4 {
  font-size: 1.05em;
}

.message.bot .message-content h5 {
  font-size: 0.95em;
}

.message.bot .message-content h6 {
  font-size: 0.85em;
  opacity: 0.8;
}

/* Markdown Alıntı (Blockquote) Stilleri */
.message.bot .message-content blockquote {
  margin: 10px 0;
  padding: 8px 14px;
  border-left: 4px solid var(--accent-color);
  background-color: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  border-radius: 0 8px 8px 0;
}

/* Markdown Liste Stilleri (Sıralı / Sırasız) */
.message.bot .message-content ul,
.message.bot .message-content ol {
  margin: 8px 0;
  padding-left: 24px;
}

.message.bot .message-content li {
  margin-bottom: 4px;
  line-height: 1.5;
}

/* Satır İçi Kod Stili */
.message-content code.inline-code {
  background-color: rgba(255, 255, 255, 0.1);
  color: #ff9800;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.9em;
}

/* Üstü Çizili Metin Stili */
.message-content del {
  color: var(--text-secondary);
  text-decoration: line-through;
}

/* --- Tablo Stilleri --- */
.message-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 15px 0;
  background-color: #0f0f0f;
  /* Çok daha koyu ve arka plana uyumlu */
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #333;
  /* Daha belirgin ama ince kenarlık */
  display: block;
  overflow-x: auto;
  /* Mobilde taşmayı önler */
}

.message-content th,
.message-content td {
  padding: 12px 15px;
  border: 1px solid var(--border-color);
  text-align: left;
  min-width: 100px;
}

.message-content th {
  background-color: #1a1a1a;
  /* Başlık alanı da koyulaştırıldı */
  font-weight: 600;
  color: var(--text-primary);
}

.message-content tr:nth-child(even) {
  background-color: rgba(255, 255, 255, 0.02);
}

.message-content.stopped-message,
.message-content.error-message {
  background-color: transparent !important;
  border: none !important;
  color: var(--text-secondary);
  font-style: italic;
  font-size: 0.9em;
  text-align: left;
  padding-left: 0;
}

.message-content.error-message {
  color: var(--error-color);
}

/* DÜZELTME: Kullanıcı mesajındaki dosya bilgisi */
.user-files-container {
  border-top: 1px solid #555;
  margin-top: 10px;
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  /* GÜNCELLEME: Bu yapı artık appendUserMessage'de kullanılmıyor, gizlendi */
  display: none;
}

.user-file-info {
  font-size: 0.9em;
  color: #ccc;
  border-top: 1px solid #444;
  margin-top: 8px;
  padding-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: rgba(255, 255, 255, 0.05);
  padding: 4px 8px;
  border-radius: 8px;
}

.user-file-info img {
  width: 24px;
  height: 24px;
  border-radius: 4px;
}

/* DÜZELTME: Dosya adını kısalt ve sonuna ... koy */
.user-file-info span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-grow: 1;
  min-width: 0;
  /* Flexbox'ta ellipsis'in çalışması için gerekli */
}

/* Image and download button container */
.image-and-actions-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 400px;
  width: 100%;
  padding: 5px;
  background-color: transparent;
  border: none;
}

/* Image Style */
.image-and-actions-container img {
  width: 100%;
  height: auto;
  max-height: 200px;
  /* YENİ: Sohbette küçük görünsün */
  object-fit: contain;
  /* Oranı koru */
  border-radius: 12px;
  border: 1px solid #444;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: zoom-in;
  /* YENİ: Tıklanabilir imleci */
}

/* --- YENİ: İSTEĞE GÖRE EKLENDİ (Sol Önizleme) --- */
.message.user .user-image-gallery {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
  /* Mesaj baloncuğundan ayırmak için */
  align-items: flex-end;
  /* Sağa hizala */
  width: 100%;
  /* Ana konteynera uyması için */
}

.message.user .user-sent-image {
  max-width: 400px;
  /* Resimlerin çok büyümesini engelle */
  width: auto;
  height: auto;
  max-height: 200px;
  /* YENİ: Sohbette küçük görünsün */
  border-radius: 12px;
  border: 1px solid #444;
  cursor: zoom-in;
  /* YENİ: Tıklanabilir imleci */
  background-color: var(--bg-tertiary);
}

/* YENİ: Sadece resim gönderildiğinde (veya metin yoksa) boş mesaj balonunu gizle */
.message.user .message-content:empty {
  display: none;
}

/* --- YENİ CSS SONU --- */


/* Download button style */
.download-btn {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid #444;
  padding: 8px 12px;
  border-radius: 20px;
  font-size: 0.9em;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}

.download-btn:hover {
  background-color: #333;
  transform: translateY(-1px);
}

.download-btn .fas {
  font-size: 14px;
}

/* Bot and User Avatar Styles */
.avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  /* Gri arka plan kaldırıldı */
  position: relative;
  line-height: 0;
  box-sizing: border-box;
}

.avatar>*:not(.loading-ring) {
  transition: transform 0.3s ease-in-out;
  transform-origin: center center;
}

.avatar img,
.avatar svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  margin: 0;
  padding: 0;
  border-radius: 50%;
}

.avatar svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

/* KULLANICI LOGOSUNU GİZLE */
.message.user .avatar {
  display: none;
}

.avatar.user-avatar {
  background: linear-gradient(135deg, #9e9e9e, #424242);
  color: white;
}

.avatar.loading>*:not(.loading-ring) {
  transform: scale(0.6);
}

.avatar.loading .loading-ring {
  display: block;
}

.loading-ring {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  margin: auto;
  width: 28px;
  height: 28px;
  border: 2.5px solid #ffffff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  box-sizing: border-box;
  display: none;
  pointer-events: none;
  transform-origin: center center;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Message Input Area */
.input-area-wrapper {
  padding: 0;
  /* YENİ: Padding kaldırıldı, margin ile kontrol edilecek */
  max-width: 650px;
  margin: 0 auto 5px;
  /* DÜZELTME: Alttan hafif boşluk eklendi */
  width: 90%;
  position: relative;
  z-index: 1000;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* YENİ: Textarea boyutlandırma için görünmez kopya */
.textarea-sizer {
  position: absolute;
  top: -9999px;
  left: -9999px;
  visibility: hidden;
  white-space: pre-wrap;
  /* Satır atlamalarını ve kaydırmayı taklit et */
  word-wrap: break-word;
  /* Textarea ile aynı stil özelliklerini kopyala */
  font-size: 1.1em;
  font-family: inherit;
  line-height: 1.5;
  padding: 10px 5px;
  border: 1px solid;
  /* Kenarlık genişliğini hesaba kat */
  box-sizing: border-box;
  /* Padding ve border'ı hesaba kat */
}

/* --- YENİ DOSYA ÖNİZLEME STİLLERİ --- */
/* DÜZELTME: Yeni önizleme tasarımı (Sağ Önizleme - Bu zaten istediğin gibi) */
.files-preview-wrapper {
  display: flex;
  /* Yatay sıralama için */
  gap: 12px;
  overflow-x: auto;
  /* Yatayda kaydırma */
  overflow-y: hidden;
  /* Dikey kaydırmayı engelle */
  flex-shrink: 0;
  /* Küçülmeyi engelle */
  width: 100%;
  /* YENİ: Animasyon için max-height ve opacity eklendi */
  max-height: 0;
  opacity: 0;
  padding: 0;
  /* DÜZELTME: Gizliyken tamamen yer kaplamaması için padding sıfırlandı */
  transition: max-height 0.3s ease-out, opacity 0.2s ease-out, padding 0.3s ease-out;

  /* Scrollbar stilleri */
  scrollbar-width: thin;
  scrollbar-color: #555 transparent;
  /* Scrollbar rengi */
}

.files-preview-wrapper::-webkit-scrollbar {
  width: 6px;
}

.files-preview-wrapper::-webkit-scrollbar-track {
  background: transparent;
}

.files-preview-wrapper::-webkit-scrollbar-thumb {
  background-color: #555;
  border-radius: 10px;
  border: 2px solid var(--bg-secondary);
  /* Kenar boşluğu */
}

/* YENİ: Dosya önizleme alanı görünür olduğunda */
.files-preview-wrapper.visible {
  max-height: 100px;
  /* Yaklaşık bir resim yüksekliği + padding */
  opacity: 1;
  padding: 12px 5px 5px 5px;
  /* Padding'i geri yükle */
}

.file-preview-item {
  /* DÜZELTME: Yeni önizleme satırı */
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0;
  background-color: transparent;
  padding: 4px;
  border-radius: 12px;
  font-size: 0.9em;
  color: #ccc;
  box-shadow: none;
  border: none;
  /* Kenarlık varsa kaldırıldı */
  position: relative;
  flex-shrink: 0;
  animation: scaleIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  opacity: 0;
}

@keyframes scaleIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.file-preview-item .preview-image,
.file-preview-item .file-icon {
  width: 70px;
  /* DÜZELTME: Boyut daha da artırıldı */
  height: 70px;
  border-radius: 8px;
  object-fit: cover;
  /* Resmin orantısını koru */
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  /* DÜZELTME: Siyah kenarlık kaldırıldı */
}

.file-preview-item .file-icon .fas {
  font-size: 18px;
  color: var(--text-secondary);
}

.file-preview-item .file-name {
  flex-grow: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: none;
  /* YENİ: Dosya adını gizle */
}

.file-preview-item .remove-file-btn {
  position: absolute;
  /* Mutlak konumlandırma */
  top: -8px;
  /* Yukarıdan konum */
  right: -8px;
  /* Sağdan konum */
  background: #444 !important;
  /* Arka plan kırmızı */
  color: #fff !important;
  /* İkon rengi */
  font-size: 1em;
  /* Boyut */
  width: 20px !important;
  /* Genişlik */
  height: 20px !important;
  /* Yükseklik */
  flex-shrink: 0;
  border: 2px solid #1E1F20;
  /* Kenarlık arka planla uyumlu */
  cursor: pointer;
  padding: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  transition: background-color 0.2s, color 0.2s;
}

.file-preview-item .remove-file-btn:hover {
  background-color: #000000 !important;
  /* Hover rengi */
  transform: scale(1.1);
}

/* ESKİ .file-preview-container (Gizlendi) */
.file-preview-container {
  display: none;
}

/* YENİ: GİRİŞ ALANI (Nested border-radius kuralı: R_outer = R_inner + padding) */
.input-area {
  --btn-size: 40px;
  --input-pad-x: 10px;
  --input-pad-bottom: 8px;
  /* İç buton yarıçapı = 40px / 2 = 20px. Dış köşe = 20px + 10px = 30px */
  --outer-radius: calc(var(--btn-size) / 2 + var(--input-pad-x));

  display: flex;
  flex-direction: column;
  flex-grow: 1;
  background-color: #1E1F20;
  padding: 0 var(--input-pad-x) var(--input-pad-bottom) var(--input-pad-x);
  border-radius: var(--outer-radius);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
  border: 1px solid #3c4043;
  transition: all 0.3s ease;
  position: relative;
}

.input-area textarea {
  flex-grow: 1;
  border: none;
  background-color: transparent;
  font-size: 1.1em;
  color: var(--text-primary);
  outline: none;
  padding: 14px 12px 0 8px;
  resize: none;
  min-height: 27px;
  max-height: 100px;
  line-height: 1.6;
  transition: height 1.5s ease-out;
  font-family: inherit;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  position: relative;
  z-index: 2;
}

@media (max-width: 768px) {
  .input-area textarea {
    padding-left: 12px;
  }
}

.input-area textarea::-webkit-scrollbar {
  display: none;
}

.input-area textarea::placeholder {
  color: #9aa0a6;
}

.input-actions-bar {
  display: none;
}

/* DÜZELTME: Genel buton stili (Kapsayıcı köşesi ile tam uyumlu nested radius) */
.input-area button {
  background: transparent;
  border: none;
  border-radius: 50%;
  width: var(--btn-size, 40px);
  height: var(--btn-size, 40px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
  flex-shrink: 0;
  color: #9aa0a6;
  font-size: 26px;
  cursor: pointer;
}

/* Sync Butonu Özel Rengi */
#syncBtn {
  color: #9aa0a6;
  /* Hafif mor tonu */
}

#syncBtn:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.input-area button:hover:not(:disabled) {
  background-color: rgba(255, 255, 255, 0.1);
}

.input-area button:disabled {
  cursor: not-allowed;
}

/* DÜZELTME: Gönder Butonu Stilleri */
#sendButton {
  background-color: transparent;
  box-shadow: none;
  margin-left: 0;
}

#sendButton:disabled {
  background-color: transparent;
  opacity: 1;
  cursor: pointer;
  /* Mic için her zaman tıklanabilir */
}

/* YENİ: Sadece metin varken gönder butonu aktif stili */
#sendButton.send-mode {
  background: linear-gradient(135deg, #bdbdbd, #616161);
  border: none;
}

#sendButton.send-mode:hover {
  background: linear-gradient(135deg, #e0e0e0, #757575);
  transform: scale(1.05);
}

/* YENİ: Sadece mikrofon modundayken hover efekti */
#sendButton:not(.send-mode):hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.input-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 100%;
  height: 100%;
}

.input-buttons .icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  transition: transform 0.25s cubic-bezier(0.2, 0, 0, 1), opacity 0.2s ease;
}

.input-buttons .icon.hidden {
  display: none !important;
}

/* DÜZELTME: Google Font Ikon stilleri (Varsa geriye dönük uyumluluk) */
.input-buttons .material-symbols-outlined {
  position: absolute;
  opacity: 0;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease-in-out, color 0.2s ease,
    transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  font-size: 24px;
  font-variation-settings: "FILL" 0;
}

.input-buttons .icon:not(.hidden) {
  opacity: 1;
}

/* YENİ: Gönder butonu aktifken ikon rengi */
#sendButton.send-mode #send-icon {
  color: var(--bg-primary);
}

/* DÜZELTME: İkon renkleri */

.input-buttons #stop-icon {
  color: var(--error-color);
}

/* YENİ: Durdurma butonu aktifken özel stil */
#sendButton:has(#stop-icon:not(.hidden)) {
  background-color: var(--bg-tertiary);
}

#sendButton:has(#stop-icon:not(.hidden)):hover {
  background-color: #333;
}

#sendButton:has(#stop-icon:not(.hidden)) #stop-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.input-buttons #mic-icon {
  color: #9aa0a6;
}

.input-buttons #live-icon {
  color: #9aa0a6;
}

.input-buttons #mic-icon.recording {
  transform: scale(1.18);
}

.input-buttons #mic-icon.recording .nav-svg-icon {
  stroke: #ff5252 !important;
  filter: drop-shadow(0 0 6px rgba(255, 82, 82, 0.6));
  animation: micPulse 1.2s infinite ease-in-out alternate;
}

@keyframes micPulse {
  0% {
    transform: scale(1);
    opacity: 0.85;
  }

  100% {
    transform: scale(1.15);
    opacity: 1;
  }
}

/* YENİ: Alt kontrol barı */
.input-controls-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 4px;
  padding-left: 0px;
  /* Buton ikonlarını üstteki metin/dosya başlangıcıyla hizalar */
}

/* YENİ: Sol kontroller kümesi (Boşluğu kapatır) */
.input-controls-left {
  display: flex;
  align-items: center;
  gap: 2px;
}

/* YENİ: Seçilen Mod Rozeti Tasarımı */
.active-mode-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background-color: rgba(66, 133, 244, 0.15);
  /* Şeffaf Mavi */
  padding: 10px 8px;
  border-radius: 25px;
  margin-left: 8px;
  color: #8ab4f8;
  /* Açık mavi metin */
  font-size: 0.85em;
  font-weight: 500;
  animation: fade-in-blur 0.3s ease;
}

.active-mode-badge-hide {
  animation: fade-out-blur 0.3s ease;
}

.active-mode-badge .mode-icon {
  font-size: 18px;
}

.active-mode-badge .remove-mode-btn {
  background: none !important;
  border: none;
  padding: 0;
  width: 20px !important;
  height: 20px !important;
  color: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 4px;
}

.active-mode-badge .remove-mode-btn .material-symbols-outlined {
  font-size: 14px;
}

/* YENİ: Sağdaki kontroller için sarmalayıcı */
.input-controls-right {
  display: flex;
  align-items: center;
  gap: 4px;
  position: relative;
  /* YENİ: Dropdown için referans noktası */
}

/* YENİ: Lite Model Seçici Stili */
.lite-selector {
  display: flex;
  align-items: center;
  color: #9aa0a6;
  /* Dosya ekleme butonu rengiyle aynı yapıldı */
  font-size: 1em;
  /* Yazı biraz büyütüldü */
  font-weight: 500;
  cursor: pointer;
  padding: 12px 18px;
  /* Genişliği yazıya göre çok daha dar ve dengeli hale getirildi */
  border-radius: 20px;
  /* Boyutla uyumlu olacak şekilde yuvarlaklık artırıldı */
  justify-content: center;
  /* Metni ortala */
  background-color: transparent;
  /* İçi boş (sadece çizgiler) */
  border: 1px solid #555;
  /* Daha belirgin çizgiler */
  transition: all 0.2s ease;
}

.lite-selector:hover {
  background-color: #2a2a2a;
}

/* ESKİ SVG/FAS ikonları (Gizlendi) */
.input-buttons svg,
.input-buttons .fas {
  display: none;
}

/* Welcome Message */
.welcome-message {
  position: absolute;
  top: 48%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 1;
  visibility: visible;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.35s;
  z-index: 100;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  pointer-events: none;
  width: 90%;
  max-width: 520px;
}

.welcome-message.hidden,
.chat-container:not(.initial-state) .welcome-message {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: translate(-50%, -65%) scale(0.96) !important;
}

.hidden {
  display: none !important;
}

.welcome-logo-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 68px;
  background: transparent;
  margin-bottom: 4px;
}

.welcome-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  filter: none;
}

.welcome-greeting-text {
  margin: 0;
  font-size: 1.95rem;
  font-weight: 450;
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #f2f2f2;
  letter-spacing: -0.01em;
  line-height: 1.35;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Welcome Subtext (Geçici sohbet vb. için) */
.welcome-subtext {
  margin: -4px 0 0 0;
  font-size: 1.02rem;
  color: #9ea0a8;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.4;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}

/* ==========================================
   GEÇİCİ SOHBET ARKA PLAN GRİ PARLAMA EFEKTİ
   ========================================== */
.temp-glow-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

body.temp-chat-active .temp-glow-layer {
  opacity: 1;
}

.temp-glow-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(85px);
  pointer-events: none;
}

.temp-glow-blob.blob-1 {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(160, 160, 175, 0.22) 0%, rgba(90, 90, 105, 0.05) 70%, transparent 100%);
  top: 8%;
  left: 12%;
  animation: floatGreyGlow1 18s infinite ease-in-out alternate;
}

.temp-glow-blob.blob-2 {
  width: 580px;
  height: 580px;
  background: radial-gradient(circle, rgba(140, 140, 160, 0.18) 0%, rgba(80, 80, 95, 0.04) 70%, transparent 100%);
  bottom: 10%;
  right: 12%;
  animation: floatGreyGlow2 22s infinite ease-in-out alternate;
}

.temp-glow-blob.blob-3 {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(180, 180, 200, 0.15) 0%, transparent 70%);
  top: 45%;
  left: 45%;
  animation: floatGreyGlow3 15s infinite ease-in-out alternate;
}

@keyframes floatGreyGlow1 {
  0% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(80px, -60px) scale(1.18);
  }

  100% {
    transform: translate(-50px, 50px) scale(0.95);
  }
}

@keyframes floatGreyGlow2 {
  0% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(-70px, -80px) scale(1.15);
  }

  100% {
    transform: translate(60px, 40px) scale(0.92);
  }
}

@keyframes floatGreyGlow3 {
  0% {
    transform: translate(0, 0) scale(0.9);
  }

  50% {
    transform: translate(60px, 70px) scale(1.22);
  }

  100% {
    transform: translate(-60px, -40px) scale(1);
  }
}

/* ==========================================
   PC SOL DİKEY NAVBAR (DESKTOP RAIL NAV)
   ========================================== */
.pc-vertical-nav {
  display: none;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 58px;
  background: rgba(13, 13, 17, 0.94);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0 16px 0;
  z-index: 2800;
  box-sizing: border-box;
  transition: opacity 0.3s cubic-bezier(0.2, 0, 0, 1), transform 0.3s cubic-bezier(0.2, 0, 0, 1);
}

/* PC'de menü açılınca navbar'ın pürüzsüzce kaybolması */
body.sidebar-open .pc-vertical-nav {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-16px);
}

.pc-nav-top,
.pc-nav-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.pc-nav-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: transparent;
  border: 1px solid transparent;
  color: #cfcfcf;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  padding: 0;
}

.pc-nav-btn:hover {
  background: rgba(255, 255, 255, 0.085);
  border-color: rgba(255, 255, 255, 0.14);
  color: #fff;
  transform: translateY(-1px);
}

.pc-nav-btn:active {
  transform: translateY(0);
}

.pc-nav-btn .material-symbols-outlined {
  font-size: 22px;
}

/* Logo Butonu & Mouse ile Üzerine Gelince Menü İkonu Efekti */
.pc-nav-btn.logo-btn {
  position: relative;
  margin-bottom: 4px;
  overflow: hidden;
}

.pc-nav-logo {
  width: 26px;
  height: 26px;
  object-fit: contain;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.pc-nav-menu-icon {
  position: absolute;
  font-size: 22px;
  color: #fff;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.22s ease, transform 0.22s ease;
  pointer-events: none;
}

.pc-nav-btn.logo-btn:hover .pc-nav-logo {
  opacity: 0;
  transform: scale(0.6);
}

.pc-nav-btn.logo-btn:hover .pc-nav-menu-icon {
  opacity: 1;
  transform: scale(1);
}

.pc-nav-avatar {
  width: 30px;
  height: 30px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  transition: border-color 0.2s ease, transform 0.2s ease;
  overflow: hidden;
}

.pc-nav-btn.profile-btn:hover .pc-nav-avatar {
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.05);
}

.pc-nav-btn.danger-btn:hover {
  color: #ff8b8b;
  background: rgba(255, 107, 107, 0.14);
  border-color: rgba(255, 107, 107, 0.3);
}

/* PC Sağ Üst Köşe: Geçici Sohbet Butonu (Sadece Simge) */
.pc-top-right-actions {
  position: fixed;
  top: 16px;
  right: 22px;
  z-index: 2800;
  display: flex;
  align-items: center;
  gap: 10px;
}

.pc-temp-chat-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: #dcdcdc;
  cursor: pointer;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: all 0.22s ease;
}

.pc-temp-chat-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.16);
  color: #fff;
  transform: scale(1.06);
}

.pc-temp-chat-btn .material-symbols-outlined {
  font-size: 22px;
  color: #b388ff;
}

.pc-temp-chat-btn.active,
body.temp-chat-active .pc-temp-chat-btn {
  background: rgba(179, 136, 255, 0.18);
  border-color: rgba(179, 136, 255, 0.45);
  color: #e4d7ff;
  box-shadow: 0 0 16px rgba(179, 136, 255, 0.25);
}

.info-message {
  text-align: center;
  font-size: 0.8em;
  color: var(--text-secondary);
  margin-top: 10px;
}

/* Top Buttons */
.top-buttons {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 200;
}

.model-dropdown-container {
  position: fixed;
  top: 20px;
  left: 60px;
  z-index: 201;
  display: flex;
  gap: 10px;
  transition: transform 0.3s cubic-bezier(0.2, 0, 0, 1);
}

/* ==========================================
   MOBİL YATAY BAŞLIK (MOBILE HORIZONTAL NAVBAR)
   ========================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background-color: transparent !important;
  z-index: 3000;
  display: flex;
  justify-content: center;
  align-items: center;
  border-bottom: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.header.scrolled {
  background-color: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 800px;
  padding: 0 15px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 2px;
}

.header-model-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  color: #fff;
  padding: 0;
  cursor: pointer;
  outline: none;
  line-height: 1;
  transition: opacity 0.2s ease;
}

.header-model-btn:active {
  opacity: 0.75;
}

.header-model-brand {
  font-family: 'Righteous', cursive;
  font-size: 1.25rem;
  color: #ffffff;
  letter-spacing: 0.5px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

.header-model-name {
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.16rem;
  font-weight: 300;
  color: #b2b2bc;
  letter-spacing: -0.01em;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  transform: translateY(0.5px);
}

.header-model-arrow {
  font-size: 20px;
  color: #84848e;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: -2px;
}

#headerNewChatBtn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-profile-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-profile-avatar {
  width: 32px;
  height: 32px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  transition: all 0.2s ease;
  box-sizing: border-box;
  overflow: hidden;
}

.header-profile-btn:hover .header-profile-avatar {
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.05);
}

.top-button {
  width: auto;
  height: 40px;
  border-radius: 8px;
  background-color: transparent;
  border: 1px solid transparent;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  transition: all 0.2s ease;
  font-size: 16px;
  white-space: nowrap;
}

.top-button .material-symbols-outlined {
  font-size: 24px;
}

.model-dropdown {
  position: relative;
  display: inline-block;
}

/* YENİ: Modern Dropdown */
.dropdown-content {
  position: absolute;
  background-color: var(--bg-tertiary);
  min-width: 340px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  z-index: 10000;
  border-radius: 16px;
  top: 100%;
  right: 0;
  padding: 10px;
  border: 1px solid #444;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.95) translateY(10px);
  transform-origin: bottom right;
  transition: opacity 0.2s ease-out, transform 0.2s ease-out,
    visibility 0.2s ease-out;
}

.dropdown-content.show {
  opacity: 1;
  visibility: visible;
  transform: scale(1) translateY(0);
}

.dropdown-header {
  color: var(--text-primary);
  font-size: 1.1em;
  font-weight: 600;
  padding: 8px 15px;
  margin-bottom: 5px;
}

.dropdown-item {
  color: var(--text-primary);
  padding: 12px 15px;
  text-decoration: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: transparent;
  border: 1px solid transparent;
  width: 100%;
  text-align: left;
  border-radius: 12px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.dropdown-item:hover {
  background-color: #383838;
}

.dropdown-item.active {
  background-color: rgba(248, 176, 19, 0.1);
  border-color: var(--accent-color);
}

/* YENİ: İçerik düzeni */
.dropdown-item .item-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-right: 10px;
}

.dropdown-item .item-title {
  font-weight: normal;
  font-size: 1em;
  line-height: 1.4;
  /* DÜZELTME: Satır yüksekliği eklendi */
}

.dropdown-item .item-subtitle {
  font-size: 0.9em;
  color: var(--text-secondary);
}

.dropdown-item .item-check {
  color: var(--blue-color);
  font-size: 1.2em;
  visibility: hidden;
}

.dropdown-item.active .item-check {
  visibility: visible;
}

/* Pro limiti dolduğunda butonların görünümü */
.dropdown-item.disabled,
.model-btn-mobile.disabled {
  opacity: 0.5;
  filter: grayscale(1);
  cursor: not-allowed !important;
  pointer-events: none;
}

/* ==========================================
   SIDEBAR - GLASSMORPHISM MODERN ARAYÜZÜ
   ========================================== */
.sidebar {
  position: fixed;
  top: var(--header-height);
  left: 0;
  height: calc(100vh - var(--header-height));
  width: 290px;
  background: rgba(16, 16, 20, 0.82);
  backdrop-filter: blur(28px) saturate(190%);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 2500;
  transform: translateX(-100%);
  visibility: hidden;
  box-shadow: none;
  transition: transform 0.3s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.3s ease, visibility 0.3s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  gap: 6px;
}

.sidebar.active {
  transform: translateX(0);
  visibility: visible;
  box-shadow: 12px 0 40px rgba(0, 0, 0, 0.65), inset -1px 0 0 rgba(255, 255, 255, 0.04);
}

/* Sidebar Başlık Çubuğu */
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 8px 16px;
  flex-shrink: 0;
}

.sidebar-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-logo-icon {
  width: 26px;
  height: 26px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(66, 133, 244, 0.4));
}

.sidebar-header h2 {
  margin: 0;
  padding: 0;
  font-size: 1.15em;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #f5f5f5;
  font-family: 'Roboto', sans-serif;
}

.sidebar-close-btn {
  display: flex;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cfcfcf;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0;
}

.sidebar-close-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
  transform: translateY(-1px);
}

.sidebar-close-btn:active {
  transform: translateY(0);
}

.sidebar-close-btn .material-symbols-outlined {
  font-size: 21px;
}

/* Sohbet Arama Kutusu (Glassmorphism) */
.sidebar-search-wrapper {
  position: relative;
  margin: 6px 12px 8px 12px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  z-index: 5;
}

.sidebar-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  color: #ffffff !important;
  opacity: 0.95;
  pointer-events: none;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.25s ease, opacity 0.25s ease;
  font-variation-settings: "FILL" 0, "wght" 300, "GRAD" 0, "opsz" 24 !important;
}

.sidebar-search-wrapper:focus-within .sidebar-search-icon {
  color: #8ab4f8 !important;
  opacity: 1;
}

.sidebar-search-input {
  width: 100%;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 9px 34px 9px 40px;
  color: #ffffff;
  font-size: 0.92em;
  outline: none;
  transition: all 0.25s ease;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.sidebar-search-input::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

.sidebar-search-input:focus {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(66, 133, 244, 0.65);
  box-shadow: 0 0 16px rgba(66, 133, 244, 0.25);
}

.sidebar-search-clear {
  position: absolute;
  right: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: rgba(255, 255, 255, 0.6);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all 0.2s ease;
}

.sidebar-search-clear:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.sidebar-search-clear .material-symbols-outlined {
  font-size: 15px;
}

.sidebar-search-clear.visible {
  display: flex;
}

/* Sidebar Hızlı Eylem Butonları */
.sidebar-button {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  margin: 3px 12px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  color: #e4e4e4;
  font-size: 0.95em;
  font-weight: 500;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  backdrop-filter: blur(10px);
}

.sidebar-button:hover {
  background: rgba(255, 255, 255, 0.085);
  border-color: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  transform: translateY(-1px);
}

.sidebar-button:active {
  transform: translateY(0);
}

.sidebar-button .icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  color: rgba(255, 255, 255, 0.75);
}

#newChatBtn {
  background: linear-gradient(135deg, rgba(66, 133, 244, 0.15) 0%, rgba(255, 255, 255, 0.04) 100%);
  border-color: rgba(66, 133, 244, 0.28);
}

#newChatBtn:hover {
  background: linear-gradient(135deg, rgba(66, 133, 244, 0.25) 0%, rgba(255, 255, 255, 0.09) 100%);
  border-color: rgba(66, 133, 244, 0.45);
}

#newChatBtn .icon {
  color: #64b5f6;
}

#tempChatBtn .icon {
  color: #ba68c8;
}

#homePageBtn .icon {
  color: #81c784;
}

/* Sidebar İçerik ve Scroll */
.sidebar-content {
  flex-grow: 1;
  overflow-y: auto;
  padding-bottom: 8px;
}

.sidebar-content::-webkit-scrollbar {
  width: 5px;
}

.sidebar-content::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-content::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
}

.sidebar-content::-webkit-scrollbar-thumb:hover {
  background-color: rgba(255, 255, 255, 0.25);
}

/* Sohbet Geçmişi Alanı */
.sidebar-chat-history {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  margin-top: 8px;
  padding-top: 8px;
  overflow-y: auto;
  flex-grow: 1;
}

.sidebar-history-title {
  padding: 4px 16px 8px 16px;
  margin: 0;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.78em;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Sohbet Elemanı Sarmalayıcısı */
.history-item-wrapper {
  position: relative;
  margin: 2px 12px;
  border-radius: 10px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  border: 1px solid transparent;
  transform: none !important;
}

.history-item-wrapper:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
}

.history-item-wrapper.active {
  background: rgba(66, 133, 244, 0.14);
  border-color: rgba(66, 133, 244, 0.32);
}

.sidebar-button.history-item {
  margin: 0 !important;
  width: 100% !important;
  padding: 9px 38px 9px 12px !important;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  background: transparent !important;
  border: none !important;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9em;
  font-weight: 400;
}

.history-item-wrapper.active .sidebar-button.history-item {
  color: #fff;
  font-weight: 500;
}

.sidebar-button.history-item:hover {
  transform: none !important;
}

/* 3 Nokta Menü Butonu */
.chat-options-btn {
  position: absolute;
  right: 6px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s, color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.history-item-wrapper:hover .chat-options-btn,
.chat-options-btn:focus {
  opacity: 1;
}

.chat-options-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

/* Pop-up Menü Stili (Glassmorphism) */
.chat-item-menu {
  position: fixed;
  background: rgba(26, 26, 32, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.7);
  z-index: 10000;
  display: none;
  flex-direction: column;
  min-width: 195px;
  padding: 6px;
  transform-origin: top right;
  animation: menuAppear 0.2s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
}

@keyframes menuAppear {
  from {
    opacity: 0;
    transform: scale(0.85);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.chat-item-menu.show {
  display: flex;
}

.chat-item-menu button {
  background: transparent;
  border: none;
  color: #f0f0f0;
  padding: 9px 12px;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 8px;
  font-size: 0.9em;
  transition: background-color 0.15s ease;
}

.chat-item-menu button:hover {
  background: rgba(255, 255, 255, 0.1);
}

.chat-item-menu button.delete {
  color: #ff6b6b;
}

.chat-item-menu button.delete:hover {
  background: rgba(255, 107, 107, 0.15);
}

.pinned-icon {
  font-size: 0.85em;
  color: #64b5f6;
  margin-right: 6px;
  vertical-align: middle;
}

.sidebar-no-results {
  padding: 24px 16px;
  text-align: center;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.88em;
  font-style: italic;
}

/* Sidebar Alt Bölümü (Glassmorphism Footer) */
.sidebar-footer {
  padding: 10px 12px 14px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(12, 12, 16, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  flex-shrink: 0;
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-button.clear-chats {
  background: rgba(255, 107, 107, 0.06);
  border: 1px solid rgba(255, 107, 107, 0.2);
  color: #ff8b8b;
  width: 100%;
  margin: 0;
  justify-content: center;
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 0.88em;
}

.sidebar-button.clear-chats:hover {
  background: rgba(255, 107, 107, 0.16);
  color: #ffadad;
  border-color: rgba(255, 107, 107, 0.4);
  transform: none;
}

.sidebar-profile-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  cursor: pointer;
  transition: all 0.2s ease;
}

.sidebar-profile-card:hover {
  background: rgba(255, 255, 255, 0.085);
  border-color: rgba(255, 255, 255, 0.14);
}

.sidebar-profile-card .profile-avatar {
  width: 36px;
  height: 36px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  flex-shrink: 0;
  transition: border-color 0.2s ease, transform 0.2s ease;
  overflow: hidden;
}

.sidebar-profile-card:hover .profile-avatar {
  border-color: rgba(255, 255, 255, 0.45);
  transform: scale(1.04);
}

/* ==========================================
   YENİ: GLASSMORPHISM & MODAL KATMANLAMA STİLLERİ
   ========================================== */
.settings-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  z-index: 4000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 20px;
  box-sizing: border-box;
}

.settings-modal.show {
  opacity: 1;
  pointer-events: all;
}

@media (max-width: 768px) {
  .settings-modal {
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    background-color: rgba(0, 0, 0, 0.75);
  }

  .confirm-modal-content,
  .model-dropdown-content-mobile,
  .upload-modal-content,
  .updates-modal-content,
  .auth-modal-content,
  .profile-modal-content {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: #141418 !important;
  }
}

/* Modallar İç İçe Geçebilsin Diye Katmanlama (Z-Index Hierarchy) */
#profileModal {
  z-index: 5000;
}

#authModal {
  z-index: 5200;
}

#uploadModal,
#syncModal,
#updatesModal,
#confirmModal,
#renameModal,
#modelModal,
#proLimitModal {
  z-index: 4300;
}

#fullscreenOverlay {
  z-index: 4500;
}

#pageSpinnerOverlay {
  z-index: 9999;
}

.settings-modal.show .confirm-modal-content,
.settings-modal.show .model-dropdown-content-mobile {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* --- Yenilikler Modalı Özel Stilleri --- */
.updates-modal-content {
  background: rgba(25, 25, 25, 0.9);
  backdrop-filter: blur(20px);
  padding: 30px 30px 0 30px;
  /* Alt padding'i sıfırladık */
  border-radius: 28px;
  overflow: hidden;
  /* Butonun köşelerinin taşmasını engeller */
  width: 90%;
  max-width: 450px;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-align: left;
  transform: scale(0.85) translateY(20px);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

.settings-modal.show .updates-modal-content {
  transform: scale(1) translateY(0);
}

.updates-list {
  list-style: none;
  padding: 0;
  margin: 20px 0;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.update-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.update-item .material-symbols-outlined {
  color: var(--accent-color);
  margin-top: 3px;
}

.update-text h4 {
  margin: 0;
  color: #fff;
  font-size: 1.1em;
}

.update-text p {
  margin: 4px 0 0;
  color: var(--text-secondary);
  font-size: 0.9em;
}

#closeUpdatesBtn {
  width: calc(100% + 60px);
  /* Padding kadar genişletiyoruz */
  margin-left: -30px;
  /* Sol padding'i nötrlüyoruz */
  margin-right: -30px;
  /* Sağ padding'i nötrlüyoruz */
  margin-top: 25px;
  padding: 18px;
  background: linear-gradient(135deg, #444, #121212);
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0 0 28px 28px;
  /* Alt köşeleri modala uyduruyoruz */
}

/* Onay Modalı Stilleri */
.confirm-modal-content {
  background: rgba(25, 25, 25, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 28px;
  border-radius: 28px;
  width: 90%;
  max-width: 400px;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  text-align: center;
  transform: scale(0.85) translateY(20px);
  opacity: 0;
  will-change: transform, opacity;
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  border-top: 4px solid var(--error-color);
}

.confirm-modal-content h2 {
  margin-top: 0;
  margin-bottom: 12px;
  color: var(--text-primary);
  font-size: 1.4em;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.confirm-modal-content h2 .fas {
  color: var(--error-color);
}

.confirm-modal-content p {
  margin-bottom: 24px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.confirm-modal-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
}

.confirm-modal-buttons button {
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 500;
  flex-grow: 1;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.confirm-modal-buttons button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

#cancelDeleteBtn {
  background-color: #444;
  color: #fff;
}

#cancelDeleteBtn:hover {
  background-color: #555;
}

#confirmDeleteBtn {
  background-color: var(--error-color);
  color: #fff;
}

#confirmDeleteBtn:hover {
  background-color: #ff8b8b;
}

/* Mobil Model Seçim Modalı */
.model-dropdown-content-mobile {
  background: rgba(25, 25, 25, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 28px;
  border-radius: 28px;
  width: 90%;
  max-width: 400px;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transform: scale(0.85) translateY(20px);
  opacity: 0;
  will-change: transform, opacity;
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  border-top: 4px solid var(--accent-color);
  text-align: left;
}

.model-dropdown-content-mobile h2 {
  margin-top: 0;
  margin-bottom: 20px;
  color: var(--accent-color-hover);
  font-size: 1.5em;
  font-weight: 600;
}

.model-options-mobile {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.model-options-mobile button {
  padding: 14px 16px;
  border-radius: 10px;
  border: 2px solid var(--border-color);
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
  font-weight: 500;
  transition: all 0.3s ease;
}

.model-options-mobile button:hover {
  background-color: #333;
  border-color: var(--accent-color);
  transform: translateY(-2px);
}

.model-options-mobile button.active {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: var(--accent-color);
  color: var(--text-primary);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

.model-options-mobile h3 {
  margin: 0;
  font-size: 1em;
  font-weight: normal;
}

.model-options-mobile p {
  margin: 4px 0 0;
  font-size: 0.9em;
  color: var(--text-secondary);
}

.model-options-mobile button.active p {
  color: var(--text-secondary);
}

/* --- YENİ: Dosya Yükleme Modalı --- */
.upload-modal-content {
  background: rgba(30, 30, 30, 0.8);
  padding: 20px;
  border-radius: 24px;
  width: 90%;
  max-width: 320px;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  text-align: center;
  transform: scale(0.85) translateY(10px);
  opacity: 0;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.25s ease;
}

.settings-modal.show .upload-modal-content {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.upload-modal-content h2 {
  margin-top: 0;
  margin-bottom: 20px;
  color: var(--text-primary);
  font-size: 1.3em;
}

.upload-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.upload-option-btn {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
  font-size: 1em;
  font-weight: 500;
  transition: all 0.2s ease;
}

.upload-option-btn:hover {
  background-color: #333;
  border-color: #555;
  transform: translateY(-1px);
}

.upload-option-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(1);
  border-style: dashed;
}

.upload-option-btn .material-symbols-outlined {
  font-size: 24px;
  color: var(--text-secondary);
}

.upload-option-btn.camera {
  color: #81D4FA;
}

.upload-option-btn.gallery {
  color: #A5D6A7;
}

.upload-option-btn.files {
  color: #FFCC80;
}

.upload-option-btn.camera .material-symbols-outlined {
  color: #81D4FA;
}

.upload-option-btn.gallery .material-symbols-outlined {
  color: #A5D6A7;
}

.upload-option-btn.files .material-symbols-outlined {
  color: #FFCC80;
}

@media (max-width: 768px) {
  body {
    font-size: 15px;
  }

  .chat-container {
    /* DÜZELTME: Mobil klavye açılınca kayma sorunu — dvh klavyeyle birlikte küçülür */
    height: 100vh;
    height: 100dvh;
    border-radius: 0;
  }

  .chat-box {
    padding: 15px 5px;
    gap: 20px;
  }

  /* YENİ: Mobil layout */
  .input-area-wrapper {
    padding: 10px;
    width: 100%;
    box-sizing: border-box;
  }

  /* .input-layout-container YORUM SATIRINDA KALDI */
  /*
        .input-layout-container {
          gap: 8px; 
        }
        */
  .input-area {
    --btn-size: 38px;
    --input-pad-x: 8px;
    --input-pad-bottom: 8px;
    --outer-radius: calc(var(--btn-size) / 2 + var(--input-pad-x));
    padding: 4px var(--input-pad-x) var(--input-pad-bottom) var(--input-pad-x);
    border-radius: var(--outer-radius);
  }

  .input-controls-right {
    gap: 2px;
  }

  /* YENİ: Mobil için buton boyutları (Nested radius uyumlu) */
  .input-area button,
  #sendButton {
    width: var(--btn-size, 38px);
    height: var(--btn-size, 38px);
    margin-left: 0;
  }

  .input-buttons .material-symbols-outlined {
    font-size: 22px;
    /* Mobilde ikonlar biraz daha küçük */
  }

  .welcome-message {
    top: 44%;
    width: 88%;
    gap: 10px;
  }

  .welcome-logo {
    width: 54px;
    height: 54px;
  }

  .welcome-greeting-text {
    font-size: 1.6rem;
    font-weight: 450;
    line-height: 1.35;
  }

  .top-buttons {
    top: 10px;
    left: 10px;
    gap: 8px;
  }

  .model-dropdown-container {
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
  }

  .top-button {
    height: 36px;
    border-radius: 8px;
    padding: 0 10px;
    font-size: 13px;
  }

  .header .top-button,
  .header-left .top-button,
  .header-right .top-button {
    width: 36px;
    height: 36px;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  #menuToggle {
    width: 36px;
    height: 36px;
  }

  .header-right {
    gap: 4px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
  }

  .pc-vertical-nav {
    display: none !important;
  }

  .pc-top-right-actions {
    display: none !important;
  }

  /* Mobilde Sidebar Tam Ekran */
  .sidebar {
    width: 100vw;
    height: 100%;
    height: 100dvh;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    margin: 0 !important;
    z-index: 5000;
    border-radius: 0;
    border-right: none;
    background: rgba(12, 12, 16, 0.96);
    backdrop-filter: blur(32px) saturate(200%);
    -webkit-backdrop-filter: blur(32px) saturate(200%);
    padding-top: env(safe-area-inset-top, 0);
    padding-bottom: env(safe-area-inset-bottom, 0);
    box-sizing: border-box;
  }

  body.sidebar-open .chat-container {
    transform: none !important;
  }

  .sidebar-header {
    padding: 16px 18px 10px 18px;
  }

  .sidebar-close-btn {
    display: flex;
  }

  .sidebar-search-wrapper {
    margin: 8px 16px 10px 16px;
  }

  .sidebar-search-icon {
    font-size: 22px;
    left: 14px;
    color: #ffffff !important;
    opacity: 1 !important;
    z-index: 10 !important;
  }

  .sidebar-search-input {
    padding: 10px 36px 10px 44px;
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.08);
  }

  #homePageBtn {
    display: none;
  }

  /* Mobilde metin kutusu içindeki Lite/Pro seçicisini gizle (çünkü başlığa taşındı) */
  .lite-selector,
  #lite-model-selector {
    display: none !important;
  }

  /* YENİ: Bot mesajlarında logoyu üste al */
  .message.bot .message-row {
    flex-direction: column;
    gap: 0;
  }

  .message.bot .avatar {
    transform: translateX(-4px);
    margin-left: 10px;
  }

  .bot-actions-row {
    margin-left: 10px !important;
    padding-left: 0 !important;
    margin-top: 2px !important;
  }
}

/* PC / Masaüstü Düzeni */
@media (min-width: 769px) {
  .header {
    display: none !important;
  }

  .pc-vertical-nav {
    display: flex;
  }

  .chat-container {
    height: 100vh;
    padding-top: 25px;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    transition: transform 0.3s cubic-bezier(0.2, 0, 0, 1);
    position: relative;
  }

  /* PC Boş Durum (Initial / Hero State) */
  .chat-container.initial-state .welcome-message {
    top: calc(50% - 135px);
    transform: translate(-50%, -50%);
    opacity: 1;
    visibility: visible;
  }

  /* PC'de Giriş Kutusu Dinamik Yazının Altında Ferah Boşluklu */
  .chat-container.initial-state .input-area-wrapper {
    transform: translateY(calc(-50vh + 115px));
  }

  .sidebar {
    left: 0;
    width: 280px;
    height: 100vh;
    top: 0;
  }

  body.sidebar-open .chat-container {
    transform: translateX(140px);
  }
}

/* Bot Eylem Butonları */
.bot-actions-row {
  display: flex;
  gap: 5px;
  align-items: center;
  margin-left: 40px;
  margin-top: 2px;
}

.user .bot-actions-row {
  align-self: flex-end;
  margin-right: 45px;
  margin-left: 0;
  margin-top: 2px;
}

.bot-actions-row .action-btn {
  background-color: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.1em;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.bot-actions-row .action-btn:hover {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
}

.action-btn .nav-svg-icon {
  width: 17px;
  height: 17px;
  opacity: 0.75;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.action-btn:hover .nav-svg-icon {
  opacity: 1;
}

/* Material Symbols için stil */
.action-btn .material-symbols-outlined {
  transition: font-variation-settings 0.2s ease;
  font-size: 20px;
}

.action-btn.active {
  background-color: rgba(255, 255, 255, 0.12);
}

.action-btn.active .nav-svg-icon {
  opacity: 1;
  stroke: #ffffff !important;
}

.action-btn.active.copy-button {
  background-color: rgb(94, 94, 94);
  color: #ffffff !important;
}

/* YENİ: Yanıt bilgisi (model + süre) popover */
.response-info-popover {
  position: fixed;
  z-index: 3000;
  background: var(--bg-tertiary, #1c1c1c);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45), 0 2px 6px rgba(0, 0, 0, 0.25);
  min-width: 190px;
  overflow: hidden;
  animation: popoverFadeIn 0.16s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: top right;
}

.response-info-popover.closing {
  animation: popoverFadeOut 0.12s ease-in forwards;
}

.response-info-arrow {
  position: absolute;
  top: -6px;
  width: 12px;
  height: 12px;
  background: var(--bg-tertiary, #1c1c1c);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  transform: rotate(45deg);
}

.response-info-header {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--text-secondary);
  padding: 10px 14px 6px;
}

.response-info-body {
  display: flex;
  flex-direction: column;
  padding: 2px 6px 8px;
}

.response-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 6px 8px;
  border-radius: 8px;
  transition: background-color 0.15s ease;
}

.response-info-row:hover {
  background-color: rgba(255, 255, 255, 0.04);
}

.response-info-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.response-info-label .material-symbols-outlined {
  font-size: 17px;
  color: #06b6d4;
}

.response-info-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}

@keyframes popoverFadeIn {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(-6px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes popoverFadeOut {
  from {
    opacity: 1;
    transform: scale(1) translateY(0);
  }

  to {
    opacity: 0;
    transform: scale(0.94) translateY(-4px);
  }
}

/* --- Bildirim Stilleri (Modern & En Üst Katman) --- */
.notification-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  left: auto;
  z-index: 99999 !important;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 340px;
  width: auto;
  pointer-events: none;
}

.notification {
  pointer-events: auto;
  background: rgba(20, 20, 26, 0.96);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  color: var(--text-primary);
  padding: 13px 18px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 1px rgba(255, 255, 255, 0.2);
  opacity: 0;
  animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  font-weight: 500;
  font-size: 0.92rem;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-left: 4px solid #b388ff;
}

.notification.show {
  opacity: 1;
}

.notification.hide {
  opacity: 0;
  animation: popOut 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  transition: opacity 0.3s ease, transform 0.3s ease;
  transform: translateY(16px);
}

@media (max-width: 768px) {
  .notification-container {
    top: calc(var(--header-height, 55px) + 12px);
    bottom: auto;
    left: 50%;
    right: auto;
    width: 92%;
    max-width: 380px;
    transform: translateX(-50%);
    z-index: 99999 !important;
  }
}

/* --- Kod Bloğu Stilleri --- */
.code-block-container {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  margin-top: 10px;
  max-width: 100%;
}

.code-block-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--bg-tertiary);
  padding: 8px 15px;
  font-size: 0.9em;
  color: #ccc;
  font-weight: 500;
}

.code-block-header .language {
  text-transform: uppercase;
}

.code-block-actions button {
  background: #383838;
  border: 1px solid #555;
  color: var(--text-primary);
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85em;
  transition: background-color 0.2s;
  margin-left: 8px;
}

.code-block-actions button:hover {
  background: #444;
}

.code-block-body {
  padding: 15px;
  max-height: 340px;
  display: block;
  /* YENİ: Kod her zaman sohbet içinde düz metin olarak gösterilir */
  overflow: auto;
}

.code-block-body pre,
.code-block-body code {
  margin: 0;
  padding: 0;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.9em;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text-primary);
}

/* Satır içi tekli backtick kod parçaları (`gibi bunlar`) */
.inline-code {
  font-family: "Courier New", Courier, monospace;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

/* --- Tam Ekran Kod Görüntüleyici --- */
.fullscreen-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.fullscreen-overlay.show {
  opacity: 1;
  pointer-events: all;
}

.fullscreen-overlay .content-wrapper {
  width: 90%;
  height: 90%;
  background-color: transparent;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: none;
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.fullscreen-overlay.show .content-wrapper {
  transform: scale(1);
}

.fullscreen-overlay .close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.15);
  /* Dairesel arka plan */
  border: none;
  color: white;
  font-size: 1.8em;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3001;
  transition: background 0.2s, transform 0.2s;
  line-height: 1;
}

.fullscreen-overlay pre {
  height: 100%;
  overflow: auto;
  margin: 0;
  padding: 20px;
}

.fullscreen-overlay iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: white;
}

.code-panel iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: white;
}

/* Sayfa Geneli Spinner */
.page-spinner-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(3px);
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease;
}

/* Rolling Spinner — Genel Yükleme */
@keyframes ldio-x2uulkbinbj {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }

  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.ldio-x2uulkbinbj div {
  position: absolute;
  width: 120px;
  height: 120px;
  border: 20px solid #ffffff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: ldio-x2uulkbinbj 1s linear infinite;
  top: 100px;
  left: 100px;
  box-sizing: content-box;
}

.loadingio-spinner-rolling-nq4q5u6dq7r {
  width: 200px;
  height: 200px;
  display: inline-block;
  overflow: hidden;
  background: none;
}

.ldio-x2uulkbinbj {
  width: 100%;
  height: 100%;
  position: relative;
  transform: translateZ(0) scale(1);
  backface-visibility: hidden;
  transform-origin: 0 0;
}

/* YENİ: Pro düşünme durumu animasyonu */
.message-content.thinking-state {
  color: #e3e3e3;
  font-weight: 500;
  font-size: 0.95em;
  background: linear-gradient(90deg, #666 25%, #fff 50%, #666 75%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 2s infinite linear;
  display: inline-flex;
  align-items: center;
}

.message-content.thinking-state::after {
  content: '';
  width: 15px;
  text-align: left;
  -webkit-text-fill-color: #aaa;
  animation: thinking-dots 1.5s steps(4, end) infinite;
}

/* YENİ: Imager düşünme durumu animasyonu */
.imager-loading-text {
  display: inline-flex;
  align-items: center;
  color: #e3e3e3;
  font-weight: 500;
  font-size: 0.95em;
  background: linear-gradient(90deg, #666 25%, #fff 50%, #666 75%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 2s infinite linear;
}

.imager-loading-text::after {
  content: '';
  width: 15px;
  text-align: left;
  -webkit-text-fill-color: #aaa;
  animation: thinking-dots 1.5s steps(4, end) infinite;
}

/* YENİ: Analiz durumu animasyonu (Dosya yüklendiğinde) */
.message-content.analyzing-state {
  color: #e3e3e3;
  font-weight: 500;
  font-size: 0.95em;
  background: linear-gradient(90deg, #666 25%, #fff 50%, #666 75%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 2s infinite linear;
  display: inline-flex;
  align-items: center;
}

.message-content.analyzing-state::after {
  content: '';
  width: 15px;
  text-align: left;
  -webkit-text-fill-color: #aaa;
  animation: thinking-dots 1.5s steps(4, end) infinite;
}

@keyframes thinking-dots {

  0%,
  20% {
    content: '';
  }

  40% {
    content: '.';
  }

  60% {
    content: '..';
  }

  80% {
    content: '...';
  }
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* --- HYPER LIVE ARAYÜZÜ STİLLERİ --- */

/* Live Butonu (Giriş Alanı) */
.hyper-live-btn {
  background-color: transparent;
  border: none;
  color: #ffffff;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.2s;
}

.hyper-live-btn .material-symbols-outlined {
  font-size: 26px;
}

/* Hyper Live artık mobilde sendButton içine taşındığı için ayrı buton her yerde gizli */
.hyper-live-btn {
  display: none !important;
}

/* Tam Ekran Overlay */
.hyper-live-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #000000;
  z-index: 9999;
  display: none;
  /* JS ile açılacak */
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
}

.hyper-live-overlay.active {
  display: flex;
  animation: fade-in-blur 0.5s ease forwards;
}

.live-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  height: 80%;
  width: 100%;
  max-width: 500px;
  padding: 40px 20px;
}

/* Görsel Alan (Logo + Spinner) */
.live-visual-area {
  position: relative;
  width: 220px;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.live-logo-wrapper {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100px;
  height: 100px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
}

.live-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Renkli Işıklar (Eski Spinner Yerine) */
.live-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 160px;
  height: 160px;
  border: none !important;
  border-radius: 50%;
  z-index: 0;
  /* Butonların ve logonun altında kalması için */
  opacity: 0;
  visibility: hidden;
  transition: opacity 1.5s ease, visibility 1.5s ease;
  /* Yavaşça sönme efekti */
}

.live-spinner.active {
  opacity: 1;
  visibility: visible;
}

/* Arka plandaki renkli parlamalar */
.live-spinner::before {
  content: '';
  position: absolute;
  inset: -150vh;
  /* Ekranın neredeyse tamamını kaplaması için */
  background: conic-gradient(from 0deg,
      #4285F4, #9b59b2, #ea4335, #f8b013,
      #00BCD4, #E91E63, #9C27B0, #4CAF50,
      #FF9800, #2196F3, #4285F4);
  filter: blur(100px);
  /* Daha yaygın ve buğulu bir görünüm */
  border-radius: 50%;
  opacity: 0.4;
  /* Gözü yormayacak hafiflikte */
  animation: spin 20s linear infinite;
  /* Çok daha yavaş ve huzurlu bir dönüş */
}

/* Merkeze doğru yumuşak beyaz ışık ve nabız efekti */
.live-spinner::after {
  content: '';
  position: absolute;
  inset: -15px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.25) 0%, transparent 70%);
  filter: blur(20px);
  border-radius: 50%;
  animation: hyper-pulse 2s ease-in-out infinite alternate;
}

@keyframes hyper-pulse {
  0% {
    transform: scale(0.85);
    opacity: 0.3;
  }

  100% {
    transform: scale(1.15);
    opacity: 0.7;
  }
}

/* Altyazılar */
.live-subtitles {
  text-align: center;
  padding: 0 20px;
  min-height: 60px;
  max-width: 90%;
  transition: opacity 0.3s;
  z-index: 10;
  /* Işıkların üstünde kalması için */
}

.live-subtitles p {
  font-size: 1.1em;
  line-height: 1.5;
  color: #e0e0e0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Alt Kontroller */
.live-controls {
  display: flex;
  gap: 12px;
  align-items: center;
  z-index: 10;
  background-color: rgba(10, 10, 10, 0.8);
  /* Siyah menü görünümü */
  backdrop-filter: blur(15px);
  /* Cam efekti */
  padding: 6px;
  /* Butonlara neredeyse çakışık olması için düşük padding */
  border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.live-btn {
  width: 65px;
  height: 65px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s, background-color 0.2s;
  color: white;
}

.live-btn:active {
  transform: scale(0.9);
}

.live-btn .material-symbols-outlined {
  font-size: 30px;
}

.live-btn.gray {
  background-color: #333333;
}

.live-btn.gray.off {
  color: #777;
  background-color: #222;
}

.live-btn.blue {
  background-color: #4285F4;
}

.live-btn.blue.muted {
  background-color: #ea4335;
}

.live-btn.red {
  background-color: #ff3b30;
}

.live-btn.red:hover {
  background-color: #d70015;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* ==========================================
   IMAGER 2 - 1:1 RESİM VE YÜKLENME KART STİLLERİ
   ========================================== */

/* Resmin içinde duracağı ana kapsayıcı */
.image-response-container {
  display: block;
  width: 100%;
  max-width: 380px;
  /* Mobil ve masaüstü için ideal genişlik */
  margin: 12px auto;
  background-color: transparent;
  border: none;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: none;
}

/* Tam 1:1 (Kare) olmasını sağlayan resim stili */
.image-response-container img.generated-image {
  width: 100%;
  height: auto;
  /* Genişlikle aynı yaparak 1:1 kare kilitliyoruz */
  object-fit: contain;
  /* Resmin kırpılmadan kareye tam oturmasını sağlar */
  display: block;
  cursor: pointer;
  background-color: #0c0c0c;
  transition: opacity 0.3s ease;
}

/* Resmin altındaki şık bilgi şeridi */
.image-info-bar {
  display: none;
}

.image-info-bar .model-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: bold;
  color: #fff;
  background: linear-gradient(135deg, #4f46e5, #06b6d4);
  /* Mor-Mavi parlak geçiş */
  padding: 2px 6px;
  border-radius: 4px;
  margin-right: 6px;
}

.image-info-bar em {
  color: var(--text-secondary);
  font-style: normal;
}

.image-skeleton-loader span {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.5px;
  color: #06b6d4;
  text-shadow: 0 0 10px rgba(6, 182, 212, 0.3);
}

/* Animasyon Tanımlamaları */
@keyframes loadingShimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

@keyframes spinLoader {
  to {
    transform: rotate(360deg);
  }
}

/* ==========================================
   IMAGER - GÖRSEL OLUŞTURMA STİLLERİ
   ========================================== */

/* Görsel yanıt konteyneri */
.image-response-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 340px;
  background-color: transparent !important;
  box-shadow: none !important;
}

/* ---- Skeleton Loader ---- */
.image-skeleton-loader {
  position: relative;
  width: 300px;
  height: 300px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.skeleton-shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
      transparent 0%,
      rgba(255, 255, 255, 0.07) 40%,
      rgba(255, 255, 255, 0.13) 50%,
      rgba(255, 255, 255, 0.07) 60%,
      transparent 100%);
  background-size: 200% 100%;
  animation: skeletonSlide 1.6s infinite ease-in-out;
}

@keyframes skeletonSlide {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

.skeleton-label {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
  font-size: 0.85em;
}

.skeleton-icon {
  font-size: 2em;
  animation: skeletonPulse 1.6s infinite ease-in-out;
}

@keyframes skeletonPulse {

  0%,
  100% {
    opacity: 0.4;
    transform: scale(0.95);
  }

  50% {
    opacity: 1;
    transform: scale(1.05);
  }
}

/* ---- Oluşturulan Görsel ---- */
.generated-image-wrapper {
  position: relative;
  width: 300px;
  height: 300px;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
}

.generated-image {
  width: 100%;
  height: auto;
  object-fit: contain;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  display: block;
}

/* ---- İndirme Butonu (hover'da görünür, mobilde her zaman) ---- */
.img-download-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.img-download-btn .material-symbols-outlined {
  font-size: 18px;
}

.generated-image-wrapper:hover .img-download-btn {
  opacity: 1;
  transform: scale(1);
}

/* Mobilde her zaman görünür */
@media (max-width: 768px) {
  .img-download-btn {
    opacity: 1;
    transform: scale(1);
  }
}

/* ---- Görsel Bilgi Çubuğu ---- */
.image-info-bar {
  display: none !important;
}

/* ==========================================
   IMAGER LIGHTBOX (TAM EKRAN ÖNİZLEME)
   ========================================== */

.imager-lightbox-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 20px;
  padding: 20px;
  box-sizing: border-box;
}

.imager-lightbox-img {
  max-width: min(90vw, 90vh);
  max-height: 75vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.8);
}

.imager-lightbox-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.imager-lightbox-prompt {
  display: none;
  font-size: 0.85em;
  text-align: center;
  max-width: 500px;
}

.imager-lightbox-dl-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: white;
  border-radius: 50px;
  font-size: 0.95em;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}

.imager-lightbox-dl-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}

.imager-lightbox-dl-btn .material-symbols-outlined {
  font-size: 20px;
}

/* ==========================================
   YENİ: SIDEBAR PROFİL KARTI STİLLERİ
   ========================================== */
.sidebar-footer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-color);
}

.sidebar-profile-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sidebar-profile-card:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
}

.sidebar-profile-card .profile-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--blue-color);
  overflow: hidden;
}

.sidebar-profile-card .profile-info {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-profile-card .profile-name {
  font-size: 0.92em;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-profile-card .profile-status {
  font-size: 0.75em;
  color: var(--text-secondary);
  margin-top: 2px;
}

.sidebar-profile-card .profile-arrow {
  font-size: 20px;
  color: var(--text-secondary);
  transition: transform 0.2s ease;
}

.sidebar-profile-card:hover .profile-arrow {
  transform: translateX(3px);
  color: var(--text-primary);
}

/* ==========================================
   YENİ: GİRİŞ VE KAYIT MODALI STİLLERİ
   ========================================== */
/* ==========================================
   YENİ: GİRİŞ, KAYIT VE PROFİL MODALLARI (GLASSMORPHISM)
   ========================================== */

/* Ortak Glassmorphic Modal İçerik Kutuları */
.auth-modal-content,
.profile-modal-content {
  background: rgba(18, 18, 24, 0.94);
  backdrop-filter: blur(20px) saturate(190%);
  -webkit-backdrop-filter: blur(20px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 24px 50px -12px rgba(0, 0, 0, 0.9),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  border-radius: 26px;
  box-sizing: border-box;
  position: relative;
  transform: scale(0.94) translateY(12px);
  opacity: 0;
  will-change: transform, opacity;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
}

.auth-modal-content {
  width: 90%;
  max-width: 410px;
  padding: 24px 24px 26px;
  overflow: hidden;
}

.profile-modal-content {
  width: 92%;
  max-width: 480px;
  padding: 36px 28px 28px;
  text-align: center;
}

.settings-modal.show .auth-modal-content,
.settings-modal.show .profile-modal-content {
  transform: scale(1) translateY(0);
  opacity: 1;
  filter: blur(0px);
}

/* Auth Modal Header & Close Button */
.auth-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  position: relative;
  z-index: 20;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(66, 133, 244, 0.5));
}

.auth-title {
  font-family: 'Righteous', cursive;
  font-size: 1.25rem;
  color: #ffffff;
  letter-spacing: 0.5px;
}

.auth-modal-close,
.profile-modal-close {
  position: relative;
  z-index: 50;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cfcfcf;
  font-size: 20px;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  padding: 0;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
}

.auth-modal-close:hover,
.profile-modal-close:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
  transform: scale(1.08);
}

.auth-modal-close:active,
.profile-modal-close:active {
  transform: scale(0.95);
}

.auth-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  padding: 4px;
  border-radius: 14px;
  margin-bottom: 20px;
  position: relative;
  z-index: 10;
}

.auth-tab-btn {
  flex: 1;
  padding: 9px 12px;
  background: transparent;
  border: none;
  color: #a1a1aa;
  font-weight: 500;
  font-size: 0.92em;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.auth-tab-btn:hover {
  color: #ffffff;
}

.auth-tab-btn.active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.google-auth-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 16px;
  background: #ffffff;
  color: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 14px;
  font-weight: 600;
  font-size: 0.94em;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  z-index: 10;
}

.google-auth-btn:hover {
  background: #f1f3f4;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
}

.google-auth-btn:active {
  transform: translateY(0);
}

.google-icon {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
}

.auth-divider {
  display: flex;
  align-items: center;
  margin: 18px 0;
  color: #71717a;
  font-size: 0.82em;
  letter-spacing: 0.2px;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.09);
}

.auth-divider span {
  padding: 0 12px;
}

.auth-input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
  text-align: left;
}

.auth-input-group label {
  font-size: 0.84em;
  color: #b0b0ba;
  font-weight: 500;
}

.auth-input-group .required-star {
  color: var(--error-color);
}

.auth-input-group input,
.name-edit-row input {
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: #fff;
  font-size: 0.94em;
  outline: none;
  backdrop-filter: blur(8px);
  transition: all 0.2s ease;
  box-sizing: border-box;
  width: 100%;
}

.auth-input-group input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.auth-input-group input:focus,
.name-edit-row input:focus {
  border-color: #4285F4;
  box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.25);
  background: rgba(0, 0, 0, 0.65);
}

.auth-error-message {
  padding: 10px 14px;
  background: rgba(255, 107, 107, 0.12);
  border: 1px solid rgba(255, 107, 107, 0.3);
  border-radius: 10px;
  color: var(--error-color);
  font-size: 0.85em;
  margin-bottom: 14px;
  text-align: left;
  line-height: 1.4;
}

.auth-submit-btn,
.save-name-btn,
.login-prompt-btn {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, #4285F4 0%, #1a73e8 100%);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 13px;
  font-weight: 600;
  font-size: 0.98em;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(66, 133, 244, 0.4);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.auth-submit-btn:hover,
.save-name-btn:hover,
.login-prompt-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(66, 133, 244, 0.55);
}

.auth-submit-btn:active,
.save-name-btn:active,
.login-prompt-btn:active {
  transform: translateY(0);
}

/* SVG İkon Yardımcı Stilleri - Dengeli ve Net Boyutlandırma */
.nav-svg-icon {
  width: 20px;
  height: 20px;
  display: block;
  object-fit: contain;
  pointer-events: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.pc-nav-btn .nav-svg-icon {
  width: 22px;
  height: 22px;
}

.sidebar-button .nav-svg-icon {
  width: 19px;
  height: 19px;
}

.top-button .nav-svg-icon {
  width: 20px;
  height: 20px;
}

.input-controls-bar button .nav-svg-icon,
.input-buttons .nav-svg-icon {
  width: 20px;
  height: 20px;
}

.modal-icon-svg {
  width: 22px;
  height: 22px;
  display: inline-block;
  vertical-align: middle;
  object-fit: contain;
  pointer-events: none;
}

.header-model-arrow {
  width: 15px;
  height: 15px;
  transform: rotate(90deg);
}

/* ==========================================================================
   YENİ: KULLANICI & AYARLAR MODALI (PC: MODEL SEÇME MODALI GİBİ KART, MOBİL: TAM EKRAN)
   ========================================================================== */
#profileModal.settings-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: rgba(0, 0, 0, 0.65) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px !important;
  margin: 0 !important;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

#profileModal.settings-modal.show {
  opacity: 1;
  pointer-events: all;
}

.user-dialog-card {
  background: #141418 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 28px !important;
  width: 100% !important;
  max-width: 380px !important;
  height: auto !important;
  max-height: 88vh !important;
  margin: auto !important;
  padding: 24px 20px 24px 20px !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.05) !important;
  position: relative;
  overflow-y: auto;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  transform: scale(0.92) translateY(14px);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

#profileModal.settings-modal.show .user-dialog-card {
  transform: scale(1) translateY(0);
}

.profile-view-step {
  display: none;
  flex-direction: column;
  height: auto;
  flex: 1;
  animation: fadeInProfileView 0.24s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.profile-view-step.active {
  display: flex;
}

@keyframes fadeInProfileView {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobilde tam ekran */
@media (max-width: 600px) {
  #profileModal.settings-modal {
    background: #000000 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    padding: 0 !important;
    align-items: stretch !important;
  }

  .user-dialog-card {
    background: #000000 !important;
    border: none !important;
    border-radius: 0 !important;
    max-width: 100% !important;
    height: 100% !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    padding: 20px 20px calc(24px + env(safe-area-inset-bottom, 0px)) 20px !important;
    box-shadow: none !important;
    transform: none !important;
  }

  #profileModal.settings-modal.show .user-dialog-card {
    transform: none !important;
  }

  .profile-view-step {
    height: 100%;
  }
}

#send-icon img,
#send-icon .nav-svg-icon {
  filter: brightness(0) !important;
}

/* Header: Avatar - Email Pill - X Button */
.user-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 12px;
}

.user-modal-avatar-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #1c1c22;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.user-modal-avatar-btn .user-avatar-container {
  width: 100%;
  height: 100%;
}

.user-modal-avatar-btn .modal-icon-svg {
  width: 24px;
  height: 24px;
}

.user-email-pill {
  flex: 1;
  background: #1c1c22;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 10px 18px;
  border-radius: 50px;
  text-align: center;
  font-size: 0.92em;
  color: #cfcfcf;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-modal-close-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #1c1c22;
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  padding: 0;
}

.user-modal-close-btn:hover {
  background: #282830;
  transform: scale(1.05);
}

/* Ana Profil Menü Butonları */
.profile-menu-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.profile-menu-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: #1e1e24;
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 18px;
  color: #e4e4e7;
  font-size: 1em;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
}

.profile-menu-btn:hover {
  background: #272730;
  border-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.profile-menu-btn .menu-btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

/* Alt Butonlar - Ekranın En Altına Sabitlenir */
.profile-bottom-actions {
  margin-top: auto;
  padding-top: 24px;
}

.profile-action-danger-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  background: #681717;
  color: #ff9999;
  border: 1px solid rgba(255, 100, 100, 0.2);
  border-radius: 50px;
  font-weight: 600;
  font-size: 1em;
  cursor: pointer;
  transition: all 0.2s ease;
}

.profile-action-danger-btn:hover {
  background: #7f1d1d;
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(255, 50, 50, 0.25);
}

.profile-action-danger-btn .modal-icon-svg {
  filter: invert(45%) sepia(85%) saturate(750%) hue-rotate(320deg);
}

.profile-action-login-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  background: linear-gradient(135deg, #4285F4, #2b6cb0);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50px;
  font-weight: 600;
  font-size: 1em;
  cursor: pointer;
  transition: all 0.2s ease;
}

.profile-action-login-btn:hover {
  box-shadow: 0 6px 20px rgba(66, 133, 244, 0.4);
}

/* Alt Sayfalar: Kullanım Sınırları & Etkinlik Ayarları */
.profile-subview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.profile-back-title-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 1.1em;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 0;
  transition: opacity 0.2s;
}

.profile-back-title-btn:hover {
  opacity: 0.8;
}

.profile-subview-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin-bottom: 24px;
}

/* Kullanım Limitleri Göstergeleri */
.usage-limits-body {
  display: flex;
  flex-direction: column;
  gap: 22px;
  text-align: left;
}

.usage-limit-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.usage-limit-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 1em;
  font-weight: 500;
  color: #d1d5db;
}

.usage-percent {
  color: #9ca3af;
  font-weight: 600;
  font-size: 0.95em;
}

.usage-progress-track {
  width: 100%;
  height: 16px;
  background: #1c1c22;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.usage-progress-fill {
  height: 100%;
  background: #d4d4d8;
  border-radius: 10px;
  transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  min-width: 0%;
}

.usage-extra-info {
  font-size: 0.8em;
  color: #71717a;
  margin-top: 2px;
}

.usage-notice-box {
  margin-top: 10px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.85em;
  color: #8e8e93;
  line-height: 1.4;
}

.usage-notice-box p {
  margin: 0;
}

/* Etkinlik Ayarları */
.activity-settings-body {
  text-align: left;
}

.activity-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.activity-title {
  font-size: 1.1em;
  font-weight: 600;
  color: #ffffff;
}

.activity-switch-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modern-toggle {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
  cursor: pointer;
}

.modern-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-track {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #2a2a32;
  border-radius: 34px;
  transition: all 0.28s ease;
}

.toggle-track:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.modern-toggle input:checked+.toggle-track {
  background-color: #22c55e;
}

.modern-toggle input:checked+.toggle-track:before {
  transform: translateX(22px);
}

.activity-status-text {
  font-size: 0.95em;
  font-weight: 500;
  color: #d1d5db;
  min-width: 44px;
}

.activity-description {
  font-size: 0.9em;
  color: #71717a;
  line-height: 1.5;
  margin: 0;
}

/* ---- Dinamik Kullanıcı Avatarı ---- */
.user-avatar-container {
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-avatar-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Email girişi — Baş harf + gri arka plan */
.avatar-initial {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #9e9e9e, #616161);
  color: #ffffff;
  font-weight: 700;
  font-family: 'Roboto', sans-serif;
  text-transform: uppercase;
  line-height: 1;
  user-select: none;
}

/* Misafir — Contacts Product simgesi + koyu gri arka plan */
.avatar-guest {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #616161, #373737);
  color: rgba(255, 255, 255, 0.7);
}

.avatar-guest img,
.avatar-guest .modal-icon-svg,
.avatar-guest .nav-svg-icon {
  width: 60%;
  height: 60%;
  object-fit: contain;
}

/* Boyut bazlı font ölçekleme */
.pc-nav-avatar .avatar-initial {
  font-size: 13px;
}

.header-profile-avatar .avatar-initial {
  font-size: 13px;
}

.sidebar-profile-card .profile-avatar .avatar-initial {
  font-size: 15px;
}

/* MOBİL İÇİN BOTTOM SHEET (CAM ALT MENÜ) UYARLAMASI */
@media (max-width: 600px) {
  .settings-modal:not(#profileModal) {
    align-items: flex-end !important;
    padding: 0 !important;
  }

  .auth-modal-content,
  .confirm-modal-content,
  .upload-modal-content,
  .updates-modal-content,
  .model-dropdown-content-mobile {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 28px 28px 0 0 !important;
    padding: 24px 20px 36px !important;
    margin: 0 !important;
    border-bottom: none !important;
    transform: translateY(100%) !important;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease !important;
  }

  /* Mobil Çekme/Tutma Çubuğu (Drag indicator) */
  .auth-modal-content::before,
  .confirm-modal-content::before,
  .upload-modal-content::before,
  .updates-modal-content::before,
  .model-dropdown-content-mobile::before {
    content: "";
    display: block;
    width: 44px;
    height: 5px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    margin: 0 auto 16px auto;
  }

  .settings-modal.show .auth-modal-content,
  .settings-modal.show .confirm-modal-content,
  .settings-modal.show .upload-modal-content,
  .settings-modal.show .updates-modal-content,
  .settings-modal.show .model-dropdown-content-mobile {
    transform: translateY(0) !important;
    opacity: 1 !important;
  }
}