/* === NEURAL VAULT (HAFIZA) - ULTRA MODERN FULLSCREEN DESIGN === */
/* ================================================================= */

/* 1. Modal Çerçevesi - Tam Ekran Yapısı */
#csMemoryModal .modal-dialog-content {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100dvh !important;
  max-width: 100vw !important;
  max-height: 100dvh !important;
  border-radius: 0 !important;
  margin: 0 !important;
  background-color: #050505 !important;
  /* Derin Siyah */
  display: flex;
  flex-direction: column;
  box-shadow: none !important;
  border: none !important;
}

/* 2. Header (Başlık) - Minimalist ve Geniş */
#csMemoryModal .memory-header {
  padding: 20px 24px;
  background: rgba(20, 20, 20, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
  /* Küçülmesini engelle */
  padding-top: calc(20px + env(safe-area-inset-top));
  /* Çentik payı */
}

#csMemoryModal .header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#csMemoryModal .header-top h3 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(to right, #fff, #aaa);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0;
}

/* İstatistik Rozetleri */
#csMemoryModal .memory-stats-bar {
  display: flex;
  gap: 8px;
}

#csMemoryModal .mem-badge {
  font-size: 0.75rem;
  padding: 6px 12px;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #bbb;
  font-weight: 600;
}

/* Kapatma Butonu */
#csCloseMemoryModalBtn {
  position: static !important;
  /* Header içine aldık */
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  border: none;
}

#csCloseMemoryModalBtn:hover {
  background: #ff4757;
  transform: rotate(90deg);
}

/* 3. Toolbar (Arama ve Filtre) */
#csMemoryModal .memory-toolbar {
  padding: 15px 20px;
  background: transparent;
  border-bottom: none;
  display: flex;
  gap: 12px;
}

#csMemoryModal .search-wrapper input {
  background: #111;
  border: 1px solid #333;
  border-radius: 12px;
  height: 45px;
  padding-left: 45px;
  color: #fff;
  font-size: 1rem;
  width: 100%;
}

#csMemoryModal .search-wrapper i {
  left: 15px;
  color: #666;
}

#csMemoryModal .filter-wrapper select {
  background: #111;
  border: 1px solid #333;
  border-radius: 12px;
  height: 45px;
  color: #fff;
}

/* 4. İçerik Alanı (Kartlar) */
#csMemoryModal .memory-content-area {
  padding: 20px;
  padding-bottom: 100px;
  /* Footer boşluğu */
  background: #050505;
  gap: 16px;
}

/* YENİ KART TASARIMI */
.memory-log-item {
  background: #0f0f0f;
  border: 1px solid #222;
  border-radius: 20px;
  /* Yuvarlak köşeler */
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.memory-log-item:active {
  transform: scale(0.98);
}

/* Sol taraftaki renkli çizgi yerine modern glow efekti */
.memory-log-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--card-color, #555);
  box-shadow: 0 0 15px var(--card-color, #555);
}

/* Header (Anahtar Kelime ve Etiket) */
.memory-log-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}

.memory-log-key {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  padding-left: 10px;
  /* Çizgi payı */
}

/* Tür Etiketi (Badge) */
.memory-log-tag {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 6px;
  letter-spacing: 1px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* İçerik Metni */
.memory-log-content {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #aaa;
  font-family: 'Inter', sans-serif;
  /* Okunaklı font */
  padding-left: 10px;
}

/* Silme Butonu (Sağ Üstte Gizli) */
.memory-log-delete {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 32px;
  height: 32px;
  background: rgba(20, 20, 20, 0.8);
  border: 1px solid #333;
  border-radius: 50%;
  color: #ff4757;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.8;
}

/* --- TÜR RENKLENDİRMELERİ (NEON ETKİSİ) --- */

/* BİLGİ / CORE */
.memory-log-item.type-core {
  --card-color: #ff4757;
}

/* Kırmızı */
.memory-log-item.type-core .memory-log-tag {
  color: #ff4757;
  border-color: rgba(255, 71, 87, 0.3);
  background: rgba(255, 71, 87, 0.05);
}

/* KİMLİK / BIO */
.memory-log-item.type-bio {
  --card-color: #2ed573;
}

/* Yeşil */
.memory-log-item.type-bio .memory-log-tag {
  color: #2ed573;
  border-color: rgba(46, 213, 115, 0.3);
  background: rgba(46, 213, 115, 0.05);
}

/* DÜNYA / WORLD */
.memory-log-item.type-world {
  --card-color: #1e90ff;
}

/* Mavi */
.memory-log-item.type-world .memory-log-tag {
  color: #1e90ff;
  border-color: rgba(30, 144, 255, 0.3);
  background: rgba(30, 144, 255, 0.05);
}

/* İLİŞKİ / RELATION */
.memory-log-item.type-relation {
  --card-color: #ffa502;
}

/* Turuncu */
.memory-log-item.type-relation .memory-log-tag {
  color: #ffa502;
  border-color: rgba(255, 165, 2, 0.3);
  background: rgba(255, 165, 2, 0.05);
}

/* ÖZET / SUMMARY */
.memory-log-item.type-Summary {
  --card-color: #a29bfe;
}

/* Mor */
.memory-log-item.type-Summary .memory-log-tag {
  color: #a29bfe;
  border-color: rgba(162, 155, 254, 0.3);
  background: rgba(162, 155, 254, 0.05);
}


/* 5. Footer (Alt Butonlar) */
#csMemoryModal .modal-footer-actions {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 20px;
  padding-bottom: calc(20px + env(safe-area-inset-bottom));
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(20px);
  border-top: 1px solid #222;
  display: flex;
  gap: 15px;
  z-index: 100;
}

#csMemoryModal .button {
  flex: 1;
  padding: 16px;
  border-radius: 16px;
  font-size: 1rem;
  font-weight: 700;
  border: none;
}

#csMemoryModal .button.secondary {
  background: #222;
  color: #fff;
}

#csMemoryModal .button.primary {
  background: #fff;
  color: #000;
}

/* Ekleme Kartı (En Üstteki) */
.add-memory-card {
  background: #111 !important;
  border: 1px dashed #444 !important;
  border-radius: 16px !important;
  padding: 20px !important;
  margin-bottom: 20px !important;
}

.add-memory-card input,
.add-memory-card select,
.add-memory-card textarea {
  background: #000 !important;
  border: 1px solid #333 !important;
  color: #fff !important;
  border-radius: 12px !important;
  padding: 12px !important;
  font-size: 0.95rem !important;
}

.add-memory-card .add-mem-header {
  color: #fff !important;
  font-size: 1rem !important;
  margin-bottom: 15px !important;
}

.empty-state-modern {
  text-align: center;
  padding: 40px 20px;
  color: #666;
}

/* --- Ana Uygulama Yapısı (Gap Fix - Final) --- */
.app-container {
  display: flex;
  flex-direction: column;

  /* Yükseklik JS tarafından yönetilecek, burada %100 diyoruz */
  height: 100%;
  min-height: 100%;

  width: 100%;
  overflow: hidden;
  background-color: transparent !important;
  position: relative;
  z-index: 2;
}

/* İçeriğin her zaman esneyerek boşluğu doldurması için */
.main-content-area {
  flex-grow: 1;
  /* Mevcut boşluğu doldur */
  height: auto !important;
  /* Yüksekliği serbest bırak */
  min-height: 0;
  /* Flexbox taşma fix */
}

/* YENİ EFEKT KATMANI STİLİ (Tüm temalar için ortak) */
#theme-effect-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  /* Tıklamaları engelleme */
  z-index: 0;
  /* En arkada ama Body'nin önünde */
  overflow: hidden;
  display: none;
  /* Varsayılan gizli */
}

/* Ryuko veya Moonlight aktifken katmanı göster */
body.ryuko-theme #theme-effect-layer,
body.moonlight-theme #theme-effect-layer {
  display: block;
}

/* === MODERN MINIMALIST HEADER (C.AI / Emochi Style) === */
.app-header {
  position: fixed !important; /* Sayfa kaydırmasından etkilenmemesi için */
  top: 0 !important;
  left: 0 !important;
  width: 100% !important; /* Tüm genişliği kapla */
  box-sizing: border-box !important;
  
  height: auto !important;
  min-height: 60px !important;
  z-index: 1100 !important;
  
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important; /* İçerikleri iki uca it */
  
  padding: max(10px, env(safe-area-inset-top)) 15px 10px 15px !important;
  margin: 0 !important; /* Dış boşlukları sıfırla */
  
  /* Arka planı temaya duyarlı yap (Koyu modda siyah, açık modda beyaz) */
  background-color: var(--bg-main) !important;
  border-bottom: 1px solid var(--border-color) !important;
  transition: background-color 0.3s ease;
}

/* Ana içerik alanını header'ın altında kalmaması için aşağı it */
.main-content-area {
  padding-top: calc(70px + env(safe-area-inset-top)) !important;
}

/* Sol Taraf: Logo ve İsim - HİZALAMA DÜZELTMESİ */
.app-header .header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  /* İkon ile logo arası boşluk */
}

/* Sidebar Toggle Buton Hizalaması */
#sidebarToggleBtn {
  margin-right: 0 !important;
  /* Eski margin'i sıfırla */
  display: flex;
  align-items: center;
  justify-content: center;
}

#appTitle {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
  font-size: 1.15rem;
  /* YAZI DAHA DA KÜÇÜLDÜ */
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Küçük "PRO" etiketi (Minimal) */
.pro-tag {
  font-size: 0.55rem;
  /* MİKRO ETİKET */
  background-color: var(--accent-primary);
  color: #fff;
  padding: 1px 4px;
  border-radius: 3px;
  font-weight: 700;
  text-transform: uppercase;
  vertical-align: middle;
  letter-spacing: 0.5px;
  -webkit-text-fill-color: #fff;
  transform: translateY(1px);
  /* Hizalama ayarı */
}

/* Sağ Taraf: İkonlar */
.app-header .header-right {
  display: flex;
  align-items: center;
  gap: 2px;
  /* İkonlar çok yakınlaştı */
}

/* Minimal Buton Stili */
.icon-button.minimal-btn {
  width: 30px;
  /* BUTON MİKRO BOYUT (30px) */
  height: 30px;
  border-radius: 50%;
  background-color: transparent;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  /* İKON DAHA DA KÜÇÜLDÜ */
  transition: all 0.2s ease;
  border: none;
  box-shadow: none;
}

.icon-button.minimal-btn:hover {
  background-color: var(--bg-hover);
  /* Sadece hover'da hafif zemin */
  color: var(--text-primary);
  transform: scale(1.05);
}

/* YENİ: Header Profil Butonu (Google Style) */
.header-profile-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  margin-left: 8px;
  /* Diğer ikonlardan biraz ayır */
  cursor: pointer;
  overflow: hidden;
  border: 2px solid transparent;
  transition: all 0.2s ease;
  padding: 0;
  background-color: var(--bg-content);
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-profile-btn:hover {
  border-color: var(--accent-primary);
  transform: scale(1.05);
}

.header-profile-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.icon-button.minimal-btn:active {
  transform: scale(0.95);
}

/* === MEVCUT KODLARI BUNLARLA DEĞİŞTİR VEYA EN ALTA EKLE === */

/* Ana içerik boşluğunu ayarla */
.main-content-area {
  padding-top: 10px !important;
  /* Üstten boşluğu azalt */
}

/* Kişilikler sayfasındaki başlık alanını sıkılaştır */
.personalities-grid-container {
  gap: 15px;
  /* Öğeler arası boşluğu azalt */
}

/* Başlık ("Karakterlerim") ve Butonlar */
.personalities-header {
  margin-bottom: 10px !important;
  /* Alt boşluğu azalt */
  gap: 10px !important;
  padding: 0 5px;
}

/* Başlık yazısını ("Karakterlerim") GİZLE - Arama çubuğu zaten yeterli */
.personalities-header h2 {
  display: none;
}

/* Arama ve Buton Grubunu tam genişlik yap */
.personalities-header .header-actions-group {
  width: 100%;
  display: flex;
  gap: 10px;
}

/* Arama kutusunu daha modern yap */
.search-input-wrapper.new-style-search {
  background-color: var(--bg-elevated);
  border-radius: 16px;
  flex-grow: 1;
  height: 45px;
  display: flex;
  align-items: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.search-input-wrapper.new-style-search input[type="search"] {
  background: transparent;
  border: none;
  height: 100%;
  padding-left: 45px !important;
  /* İkon için yer */
  font-size: 0.95rem;
}

.search-input-wrapper.new-style-search i {
  left: 15px;
  color: var(--accent-primary);
  /* İkonu renklendir */
}

/* Butonları arama çubuğuyla eşitle */
.icon-button.new-style-button {
  width: 45px;
  height: 45px;
  border-radius: 14px;
  background-color: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: inherit !important; /* Renk artık temaya göre otomatik değişecek */
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.icon-button.new-style-button:hover {
  background-color: var(--accent-primary) !important;
  border-color: var(--accent-primary) !important;
}

.icon-button.new-style-button:hover {
  background-color: var(--accent-primary);
  color: white;
}

/* Easter Egg Animasyonları */
@keyframes egg-spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

@keyframes egg-bounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

@keyframes egg-shake {

  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-5px);
  }

  75% {
    transform: translateX(5px);
  }
}

@keyframes egg-pop {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.5);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes egg-rainbow {
  0% {
    color: red;
    filter: hue-rotate(0deg);
  }

  100% {
    color: violet;
    filter: hue-rotate(360deg);
  }
}

.Pai-easter-active {
  display: inline-block;
  transition: all 0.3s ease;
}


.main-content-area {
  flex: 1;
  /* Ana kapsayıcı kaydırmasın, içindeki tab-content kaydırsın */
  overflow: hidden !important;
  position: relative;
  background: transparent;
  width: 100%;
  height: 100%;
  padding-bottom: 0 !important;
  /* Boşluğu child element halledecek */
}

/* YENİ: Tüm sekmeleri tutan ana konteyner */
#tab-content-container {
  display: flex !important;
  height: 100% !important;
  width: 300% !important;
  /* 3 sekme (Kişilikler, Oluştur, Keşfet) */
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
  will-change: transform;
}

/* === NATIVE FEEL TAB ENGINE === */
.tab-content {
  width: 33.333% !important;
  flex: 0 0 33.333% !important;
  height: 100dvh !important;
  display: block !important; /* Flexbox kaydırma sorunlarını çözer */
  position: relative !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  box-sizing: border-box !important;
  padding: calc(var(--header-height) + 15px) 0 calc(90px + env(safe-area-inset-bottom)) 0 !important;
}

/* Sayfa geçişlerinde içeriklerin titremesini önle */
.personalities-grid-container, 
.cai-explore-container {
  width: 100% !important;
  animation: fadeIn_v10 0.3s ease-out;
}

/* === MASTER SETTINGS OVERLAY (KESİN ÇÖZÜM: VIEWPORT FIX) === */
#masterSettingsOverlay {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100dvh !important;
  background-color: var(--bg-main) !important;
  z-index: 200000 !important; /* Diğer tüm modalların üstünde */
  display: none;
  flex-direction: row;
  opacity: 0;
  /* GPU hızlandırma ile titremeyi önle */
  transform: translate3d(0,0,0) !important;
  transition: opacity 0.3s ease;
  padding-top: env(safe-area-inset-top) !important;
  padding-bottom: env(safe-area-inset-bottom) !important;
}

#masterSettingsOverlay.active {
  display: flex !important;
  opacity: 1 !important;
}

#masterSettingsOverlay.active {
  display: flex !important;
  opacity: 1 !important;
}

/* Mobilde alttaki barı kapattığımız için içerik alanını ferahlat */
@media (max-width: 768px) {
  .ms-content {
    padding-bottom: env(safe-area-inset-bottom);
  }
}

#masterSettingsOverlay.active {
  opacity: 1;
  visibility: visible;
}

/* MASTER SETTINGS SIDEBAR & NAV */
.ms-sidebar {
  width: 260px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  padding: max(20px, env(safe-area-inset-top)) 12px 20px 12px !important;
  flex-shrink: 0;
}

.ms-sidebar-title {
  padding: 10px;
  font-weight: 900;
  font-size: 1.4rem;
  color: var(--text-primary);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.ms-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s var(--ease-smooth);
  margin-bottom: 4px;
}

.ms-nav-item i { font-size: 1.1rem; width: 20px; text-align: center; }

.ms-nav-item:hover { background-color: var(--bg-hover); color: var(--text-primary); }
.ms-nav-item.active { background-color: var(--bg-active); color: var(--text-primary); }

.ms-content { flex: 1; padding: 0; overflow-y: auto; background-color: var(--bg-app); position: relative; }

.ms-close-btn {
  position: fixed;
  top: 15px;
  right: 15px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1000000;
  box-shadow: var(--shadow-soft);
}

/* --- MOBİL İÇİN TAM EKRAN AYARLAR (NATIVE ACTIVITY FEEL) --- */
@media (max-width: 768px) {
  #masterSettingsOverlay {
    flex-direction: column !important;
    background-color: var(--bg-app) !important;
  }
  
  /* Sidebar'ı Üst Navigasyon Barına Dönüştür */
  .ms-sidebar {
    width: 100% !important;
    height: auto !important;
    flex-direction: row !important;
    overflow-x: auto !important; /* Yatay kaydırma */
    white-space: nowrap !important;
    
    padding: 10px 15px !important;
    padding-top: calc(15px + env(safe-area-inset-top)) !important; /* Çentik */
    
    border-right: none !important;
    border-bottom: 1px solid var(--border-color) !important;
    background-color: var(--bg-elevated) !important;
    display: flex !important;
    gap: 10px !important;
    
    /* Scrollbar Gizle */
    scrollbar-width: none; 
    -ms-overflow-style: none;
  }
  .ms-sidebar::-webkit-scrollbar { display: none; }

  /* Menü Öğeleri (Yatay Haplar) */
  .ms-nav-item {
    flex-direction: row !important;
    padding: 8px 16px !important;
    border-radius: 20px !important;
    background-color: var(--bg-content) !important;
    border: 1px solid var(--border-input) !important;
    margin: 0 !important;
    font-size: 0.85rem !important;
    flex-shrink: 0 !important; /* Küçülme */
  }

  .ms-nav-item.active {
    background-color: var(--accent-primary) !important;
    color: #fff !important;
    border-color: var(--accent-primary) !important;
  }

  .ms-nav-item i {
    font-size: 1rem !important;
    margin-right: 5px !important;
    width: auto !important;
  }
  
  /* İçerik Alanı */
  .ms-content {
    padding: 15px !important;
    padding-bottom: 100px !important; /* Alt boşluk */
  }
  
  /* Kapatma Butonu (Yüzen) */
  .ms-close-btn {
    top: calc(15px + env(safe-area-inset-top)) !important;
    right: 15px !important;
    background: rgba(0,0,0,0.5) !important;
    backdrop-filter: blur(10px);
    z-index: 200 !important;
  }
}

/* PANELLER - Z-INDEX FIX */
.ms-panel {
  display: none !important;
  visibility: hidden;
  padding: 20px;
  padding-bottom: 150px;
  width: 100%;
  box-sizing: border-box;
  animation: fadeIn_v10 0.3s ease;
}

.ms-panel.active {
  display: block !important;
  visibility: visible;
  position: relative;
  z-index: 5; /* İçeriği öne çıkar */
}

/* İçerik alanını kaydırılabilir yap */
.ms-content {
    position: relative;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    background-color: var(--bg-main);
    z-index: 1;
    height: 100%; /* Yüksekliği tam kullan */
}

/* BOTLARIM LİSTESİ MODERN TASARIM */
.ms-mybot-card {
    display: flex;
    align-items: center;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: 28px; /* Yumuşak kenar */
    padding: 16px;
    gap: 18px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 12px;
    width: 100%;
    box-sizing: border-box;
}

.ms-mybot-card:hover {
    border-color: var(--accent-primary);
    background: var(--bg-hover);
    transform: translateX(5px);
}

.ms-mybot-avatar {
    width: 60px;
    height: 60px;
    border-radius: 20px;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.ms-mybot-info {
    flex: 1;
    overflow: hidden;
}

.ms-mybot-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ms-mybot-stats {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    display: flex;
    gap: 10px;
    margin-top: 4px;
}

.ms-mybot-actions {
    display: flex;
    gap: 8px;
}

.ms-mybot-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.ms-mybot-btn.edit { background: var(--bg-elevated); color: var(--accent-primary); }
.ms-mybot-btn.delete { background: rgba(239, 68, 68, 0.1); color: #ef4444; }
.ms-mybot-btn:active { transform: scale(0.9); }

/* KARTLAR */
.ms-card {
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 20px;
}

.ms-card h3 {
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 1rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 1px solid var(--border-input);
  padding-bottom: 10px;
}

/* PROFİL RESMİ */
.ms-avatar-upload {
  position: relative;
  width: 100px;
  height: 100px;
  margin: 0 auto 20px auto;
}

.ms-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--bg-content);
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.ms-avatar-edit {
  position: absolute;
  bottom: 0;
  right: 0;
  background: var(--accent-primary);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 2px solid var(--bg-elevated);
}

/* Ayarlar sekmesi için özel sıfırlama */
#tabSettingsCombined {
  background-color: var(--bg-main);
  height: 100% !important;
  display: block !important;
}

.settings-hub-layout {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
}

/* Body ve HTML taşmasını engelle */
html,
body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
  position: fixed;
  /* Mobilde sayfanın oynamasını engeller */
}

#chatHistory {
  /* Sohbet Geçmişi için Özel Optimizasyon */
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: calc(var(--spacing-unit) * 2) calc(var(--spacing-unit) * 4);
  scroll-behavior: smooth;
  overscroll-behavior-y: contain;
  width: 100%;
  position: relative;
  -webkit-overflow-scrolling: touch;
  will-change: transform;
  transform: translateZ(0);
}

.bottom-tab-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  
  /* Sabit yükseklik yerine padding ile esneklik */
  height: auto;
  
  /* Güvenli Alan Desteği (iPhone X+ ve Android 10+) */
  padding-bottom: calc(10px + env(safe-area-inset-bottom));
  padding-top: 10px;
  
  /* Glassmorphism */
  background-color: rgba(20, 20, 20, 0.85); /* Biraz daha opak */
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 5000; /* En üstte kal */
  
  /* Gölge ile ayrım */
  box-shadow: 0 -5px 20px rgba(0,0,0,0.3);
}

.tab-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 0.65rem;
  font-weight: 600;
  gap: 4px;
  
  /* Dokunma alanı genişletme (Hitbox) */
  padding: 5px 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.tab-button i {
  font-size: 1.4rem; /* İkonlar daha büyük */
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tab-button.active i {
  transform: translateY(-2px);
  color: var(--accent-primary);
}

.tab-button.active span {
  color: var(--accent-primary);
}

.tab-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  min-width: 0;
  background: none;
  border: none;
  color: #ffffff !important; /* İkonlar ve metin beyaz yapıldı */
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 2px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
  gap: 2px;
  user-select: none;
  height: 100%;
  opacity: 0.8;
}

@media (max-width: 400px) {
  .tab-button span {
    font-size: 0.6rem; /* Çok küçük ekranlarda yazıyı küçült */
  }
  .tab-button i {
    font-size: 1.2rem !important; /* İkonu küçült */
  }
}

.tab-button.active {
  color: var(--accent-primary);
  opacity: 1;
  transform: translateY(-2px);
  /* Aktifken hafif yukarı kalksın */
}

.tab-button i {
  font-size: 1.35rem;
  /* İkon boyutu */
  margin-bottom: 0;
}

.tab-button i.fas,
.tab-button i.fab {
  font-size: 1.4rem;
  margin-bottom: 0;
  line-height: 1;
}

.tab-button:hover:not(.active) {
  color: var(--text-primary);
}

.tab-button:active {
  transform: scale(0.95);
}

.tab-button.active {
  color: var(--accent-primary);
  font-weight: 600;
}

/* --- Genel Bileşenler --- */
.icon-button {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  /* Varsayılan rengi daha soluk yap */
  font-size: 1rem;
  /* İkon boyutunu küçült */
  cursor: pointer;
  padding: 0;
  border-radius: var(--radius-full);
  width: 36px;
  height: 36px;
  /* Buton boyutunu küçült */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
  user-select: none;
}

.icon-button:hover {
  background-color: var(--bg-hover);
  color: var(--text-primary);
}

.icon-button:active {
  transform: scale(0.92);
  background-color: var(--bg-active);
}

.icon-button.danger {
  color: var(--accent-red);
}

.icon-button.danger:hover {
  background-color: color-mix(in srgb, var(--accent-red) 12%, transparent);
}

/* .icon-button.small selektörünün varsayılan .icon-button ile aynı değerlere sahip olduğu için gereksizdi, kaldırıldı. */
/* .icon-button.small { width: 36px; height: 36px; font-size: 1rem; } */
.icon-button.xsmall {
  width: 30px;
  height: 30px;
  font-size: 0.9rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: calc(var(--spacing-unit) * 2);
  padding: calc(var(--spacing-unit) * 2.5) calc(var(--spacing-unit) * 4.5);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-weight: 500;
  font-size: var(--font-size-sm);
  transition: all var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.35;
  user-select: none;
  border: 1px solid transparent;
}

.button:active {
  transform: scale(0.975);
  filter: brightness(0.93);
}

.button.primary {
  background: var(--accent-primary);
  color: var(--text-on-accent);
}

.button.primary:hover {
  filter: brightness(1.1);
  box-shadow: 0 3px 10px color-mix(in srgb, var(--accent-primary) 28%, transparent);
}

body.hrt-theme .button.primary {
  background: var(--accent-primary-hrt);
  color: var(--text-on-accent-hrt);
}

body.hrt-theme .button.primary:hover {
  box-shadow: 0 3px 10px color-mix(in srgb, var(--accent-primary-hrt) 28%, transparent);
}

body.cutecore-active .button.primary {
  background: var(--accent-primary-cutecore);
  color: var(--text-on-accent-cutecore);
}

/* CHANGE: 6 - Cutecore */
body.cutecore-active .button.primary:hover {
  box-shadow: 0 3px 10px color-mix(in srgb, var(--accent-primary-cutecore) 28%, transparent);
}

/* CHANGE: 6 - Cutecore */


.button.secondary {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-color: var(--border-input);
}

.button.secondary:hover {
  background: var(--bg-hover);
  border-color: var(--border-color);
}

.button.danger {
  background-color: var(--accent-red);
  color: var(--text-on-accent);
  border: none;
}

.button.danger:hover {
  filter: brightness(1.1);
  box-shadow: 0 3px 10px color-mix(in srgb, var(--accent-red) 28%, transparent);
}

.button.full-width {
  width: 100%;
  display: flex;
}

.button.small {
  padding: calc(var(--spacing-unit) * 2) calc(var(--spacing-unit) * 3.5);
  font-size: var(--font-size-xs);
  border-radius: var(--radius-sm);
  gap: calc(var(--spacing-unit) * 1.5);
}

.button i.fas,
.button i.fab {
  font-size: 0.95em;
  margin-right: 1.5px;
}

.button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  filter: none;
  transform: none;
  box-shadow: none;
}

.button:disabled:hover {
  filter: none;
  transform: none;
  background-color: var(--bg-hover);
}


.card {
  background-color: var(--bg-elevated);
  border-radius: var(--radius-lg);
  padding: calc(var(--spacing-unit) * 5);
  margin-bottom: calc(var(--spacing-unit) * 5);
  box-shadow: 0 1.5px 7px var(--shadow-soft);
  border: 1px solid var(--border-color);
  transition: all var(--transition-base);
}

.card h2,
.card h3 {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: calc(var(--spacing-unit) * 4);
  display: flex;
  align-items: center;
  gap: calc(var(--spacing-unit) * 2.5);
  line-height: var(--line-height-tight);
  letter-spacing: -0.25px;
}

.card h2 {
  font-size: var(--font-size-lg);
}

.card h3 {
  font-size: var(--font-size-md);
}

.card h4 {
  font-size: var(--font-size-base);
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: calc(var(--spacing-unit) * 3);
}

.card h2 i,
.card h3 i,
.card h4 i {
  color: var(--accent-primary);
  font-size: 0.95em;
  width: 1.15em;
  text-align: center;
  margin-right: 0;
}

body.hrt-theme .card h2 i,
body.hrt-theme .card h3 i,
body.hrt-theme .card h4 i {
  color: var(--accent-primary-hrt);
}

body.cutecore-active .card h2 i,
body.cutecore-active .card h3 i,
body.cutecore-active .card h4 i {
  color: var(--accent-primary-cutecore);
}

/* CHANGE: 6 - Cutecore */


/* Form Elemanları */
label:not(.switch):not(.hidden-label) {
  display: block;
  margin-bottom: calc(var(--spacing-unit) * 2);
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
  font-weight: 500;
}

.hidden-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
  white-space: nowrap;
}

input[type="text"],
input[type="password"],
input[type="date"],
input[type="search"],
input[type="email"],
input[type="number"],
input[type="url"],
select,
textarea {
  width: 100%;
  padding: calc(var(--spacing-unit) * 3) calc(var(--spacing-unit) * 3.5);
  margin-bottom: calc(var(--spacing-unit) * 4);
  border: 1px solid var(--border-input);
  border-radius: var(--radius-md);
  background-color: var(--bg-content);
  color: var(--text-primary);
  font-family: var(--font-primary);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-base);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
  appearance: none;
  -webkit-appearance: none;
}

input[type="text"]:disabled,
input[type="password"]:disabled,
input[type="date"]:disabled,
input[type="search"]:disabled,
input[type="email"]:disabled,
input[type="number"]:disabled,
input[type="url"]:disabled,
select:disabled,
textarea:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

textarea {
  min-height: 110px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2.5px color-mix(in srgb, var(--accent-primary) 22%, transparent);
  outline: none;
  background-color: var(--bg-main);
}

body.hrt-theme input:focus,
body.hrt-theme select:focus,
body.hrt-theme textarea:focus {
  border-color: var(--accent-primary-hrt);
  box-shadow: 0 0 0 2.5px color-mix(in srgb, var(--accent-primary-hrt) 22%, transparent);
}

body.cutecore-active input:focus,
body.cutecore-active select:focus,
body.cutecore-active textarea:focus {
  /* CHANGE: 6 - Cutecore */
  border-color: var(--accent-primary-cutecore);
  box-shadow: 0 0 0 2.5px color-mix(in srgb, var(--accent-primary-cutecore) 22%, transparent);
}

input::placeholder,
textarea::placeholder {
  color: var(--text-placeholder);
  opacity: 1;
}

.select-wrapper {
  position: relative;
  display: block;
  margin-bottom: calc(var(--spacing-unit) * 4);
}

.select-wrapper::after {
  content: '\f078';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  right: calc(var(--spacing-unit) * 3.5);
  color: var(--text-tertiary);
  font-size: 0.8em;
  pointer-events: none;
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.select-wrapper select {
  width: 100%;
  margin-bottom: 0;
  cursor: pointer;
  padding-right: calc(var(--spacing-unit) * 10);
}

.select-wrapper:focus-within::after {
  color: var(--accent-primary);
  transform: translateY(-50%) rotate(180deg);
}

body.hrt-theme .select-wrapper:focus-within::after {
  color: var(--accent-primary-hrt);
}

body.cutecore-active .select-wrapper:focus-within::after {
  color: var(--accent-primary-cutecore);
}

/* CHANGE: 6 - Cutecore */


input[type="file"] {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--spacing-unit) * 4) calc(var(--spacing-unit) * 3);
  border: 1.5px dashed var(--border-input);
  border-radius: var(--radius-md);
  background-color: transparent;
  color: var(--text-secondary);
  font-size: var(--font-size-xs);
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-bottom: calc(var(--spacing-unit) * 4);
  line-height: 1.45;
}

input[type="file"]:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  background-color: color-mix(in srgb, var(--accent-primary) 7%, transparent);
}

input[type="file"]::-webkit-file-upload-button,
input[type="file"]::file-selector-button {
  display: none;
}

input[type="file"]::before {
  content: attr(data-placeholder) ' ';
  display: block;
  font-weight: 500;
  margin-bottom: calc(var(--spacing-unit) * 1);
}

input[type="file"]::after {
  content: '(desteklenen türler)';
  display: block;
  font-size: calc(var(--font-size-xs) * 0.9);
  color: var(--text-tertiary);
}

.image-preview {
  margin-top: calc(var(--spacing-unit) * 1);
  margin-bottom: calc(var(--spacing-unit) * 4);
  position: relative;
  width: 90px;
  height: 90px;
}

.image-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: 0 1.5px 3.5px var(--shadow-soft);
}

.image-preview .delete-preview {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--bg-elevated);
  color: var(--accent-red);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  width: 28px;
  height: 28px;
  font-size: 16px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 1px 3.5px var(--shadow-medium);
  transition: all var(--transition-fast);
}

.image-preview .delete-preview:hover {
  background-color: var(--accent-red);
  color: white;
  transform: scale(1.08) rotate(90deg);
  border-color: transparent;
}


/* === ADAPTIVE ELITE HEADER V2 === */
.personalities-header {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    padding: 10px 16px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* İstatistik Satırı (Üst) */
.header-stats-row {
    display: flex !important;
    justify-content: flex-end !important;
    gap: 8px !important;
    width: 100% !important;
}

/* Aksiyon Satırı (Alt - Arama + 4 Buton) */
.header-action-row {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    width: 100% !important;
}

/* === SEARCH BAR ALIGNMENT FIX === */
.adaptive-search {
    position: relative !important;
    flex: 1 !important;
    min-width: 0 !important;
    height: 42px !important;
    background: rgba(255, 255, 255, 0.07) !important; /* Biraz daha belirgin zemin */
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
    display: flex !important;
    align-items: center !important;
    overflow: hidden !important; /* Taşmaları engelle */
    box-shadow: none !important; /* Kaymaya sebep olan gölgeyi kaldır */
}

/* Büyüteç İkonu Konumu */
.adaptive-search i {
    position: absolute !important;
    left: 14px !important; /* Soldan hizayı sabitle */
    color: var(--accent-primary) !important; /* İkonu daha belirgin yap */
    font-size: 1rem !important;
    pointer-events: none !important; /* İkona tıklayınca input odaklansın */
    z-index: 5 !important;
}

/* Metin Giriş Alanı Mesafesi */
.adaptive-search input {
    width: 100% !important;
    height: 100% !important;
    background: transparent !important;
    border: none !important;
    color: #fff !important;
    /* KRİTİK: İkonun genişliği (14px) + ikon boyutu + boşluk = 44px */
    padding: 0 10px 0 44px !important; 
    font-size: 0.95rem !important;
    outline: none !important;
    box-shadow: none !important;
    appearance: none !important;
}

/* Focus olduğunda mavi çizgiyi değil, kendi rengimizi gösterelim */
.adaptive-search:focus-within {
    border-color: var(--accent-primary) !important;
    background: rgba(255, 255, 255, 0.1) !important;
}

/* Buton Grubu (Sağda Sabit) */
.action-buttons-cluster {
    display: flex !important;
    gap: 6px !important;
    flex-shrink: 0 !important; /* Butonların küçülmesini engeller */
}

.ms-action-btn {
    width: 40px !important; /* Bir tık büyüttük */
    height: 40px !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
    color: #999 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0 !important; /* Mobilde sıkışmayı önler */
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}

.ms-action-btn:active {
    transform: scale(0.92) !important;
    background: var(--bg-hover) !important;
    color: var(--accent-primary) !important;
    border-color: var(--accent-primary) !important;
}

/* Filtre ikonları için ince ayar */
.ms-action-btn i {
    font-size: 1.1rem !important;
    pointer-events: none; /* Tıklamayı butona geçirir */
}

/* Arama kutusu placeholder rengi */
#personalitySearchInput::placeholder {
    color: rgba(255, 255, 255, 0.4) !important;
    font-weight: 500;
}

/* Kredi Kartlarının Kartlara Binmemesi İçin Grid Boşluğu */
.personalities-grid {
    padding-top: 5px !important;
    padding-bottom: 150px !important;
}

.new-style-search {
    position: relative;
    flex: 1;
    height: 44px;
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 14px !important;
    display: flex;
    align-items: center;
}

.new-style-search input {
    background: transparent !important;
    border: none !important;
    color: #fff !important;
    font-size: 0.95rem !important;
    padding-left: 45px !important;
    width: 100%;
    outline: none !important;
}

.new-style-search i {
    position: absolute;
    left: 15px;
    color: var(--accent-primary);
    font-size: 1rem;
}

.ms-action-btn {
    width: 40px !important;
    height: 40px !important;
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
    color: var(--text-secondary) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.ms-action-btn:active {
    transform: scale(0.9);
    background: var(--bg-hover) !important;
    color: var(--accent-primary) !important;
}

.ms-action-btn.filter-active {
    color: var(--accent-primary) !important;
    border-color: var(--accent-primary) !important;
    background: rgba(var(--accent-primary-rgb), 0.1) !important;
}


/* 2. Sağ Üst Grup (Arama + Stats) */
.header-actions-group {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

/* Arama Kutusu */
.search-input-wrapper.new-style-search {
  flex-grow: 1;
  height: 44px;
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: 50px; /* Tam yuvarlak */
  display: flex;
  align-items: center;
  box-shadow: none;
  padding-right: 4px; /* Sağdaki haplar için yer */
}

.search-input-wrapper.new-style-search input {
  color: var(--text-primary) !important;
  font-size: 0.9rem !important;
  padding-left: 40px !important; /* İkon payı */
}

.search-input-wrapper.new-style-search i {
  left: 14px;
  font-size: 1rem;
  color: var(--text-tertiary);
}

/* 3. Kompakt Enerji/Altın Hapları (Header İçinde) */
.header-stat-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s;
  white-space: nowrap;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  border: 1px solid rgba(255,255,255,0.05);
}

.header-stat-pill:active { transform: scale(0.95); }

/* --- MODERN PASTEL STAT PILLS --- */
.header-stat-pill {
  padding: 6px 14px !important;
  border-radius: 50px !important;
  font-size: 0.8rem !important;
  font-weight: 700 !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  transition: all 0.2s ease !important;
  border: 1px solid transparent !important;
}

.header-stat-pill i {
  font-size: 1rem !important; /* İkonu biraz büyüt */
}

/* Enerji: Pastel Yeşil Zemin, Koyu Yeşil Yazı */
.header-stat-pill.energy {
  background-color: #ECFDF5 !important; /* Pastel Yeşil */
  color: #059669 !important; /* Koyu Yeşil */
  border-color: #D1FAE5 !important;
}

/* Altın: Pastel Sarı Zemin, Koyu Turuncu Yazı */
.header-stat-pill.gold {
  background-color: #FFFBEB !important; /* Pastel Sarı */
  color: #D97706 !important; /* Koyu Hardal */
  border-color: #FEF3C7 !important;
}

/* (+) Butonu: Daha zarif ve silik */
.stat-add-icon {
  width: 20px !important;
  height: 20px !important;
  background-color: rgba(0,0,0,0.05) !important; /* Hafif koyuluk */
  color: inherit !important; /* Ana rengi miras al */
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 0.7rem !important;
  margin-left: 4px !important;
}

/* Hover Efekti */
.header-stat-pill:hover {
  transform: translateY(-1px);
  filter: brightness(0.97); /* Hafif koyulaşma */
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* Karanlık Mod Uyumu (Dark Mode Override) */
body.dark-theme .header-stat-pill.energy {
  background-color: rgba(16, 185, 129, 0.15) !important;
  color: #34d399 !important;
  border-color: rgba(16, 185, 129, 0.2) !important;
}

body.dark-theme .header-stat-pill.gold {
  background-color: rgba(245, 158, 11, 0.15) !important;
  color: #fbbf24 !important;
  border-color: rgba(245, 158, 11, 0.2) !important;
}

/* Eski barı gizle */
#dailyCreditStatusBar { display: none !important; }

/* === PAI ELITE UNIFIED CARD ENGINE === */

