/* ==========================================================================
   ROTA — DPÜ Pazarlar Meslek Yüksekokulu Danışmanı
   Tasarım Felsefesi: Apple Human Interface Guidelines (HIG) + Gemini Web Sentezi
   Atmosferik Negatif Alan • Yüzen Kapsül Dock • Kutusuz Editoryal Akış
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* --- 1. TASARIM TOKENLARI & MALZEME SİSTEMİ (KALICI KOZMİK KARANLIK MOD) --- */
:root {
  --bg-app: #0D1117;               /* Derin Kozmik Gece Zemini */
  --bg-sidebar: #090D13;
  --bg-surface: #151B24;
  --bg-surface-hover: #1C2430;

  --bg-dock: rgba(21, 27, 36, 0.82);
  --border-dock: rgba(255, 255, 255, 0.10);
  --shadow-dock: 0 16px 48px -8px rgba(0, 0, 0, 0.75), 0 0 1px rgba(255, 255, 255, 0.14);

  --bg-user-bubble: #1F2735;
  --text-user: #F8FAFC;

  --text-main: #F1F5F9;
  --text-muted: #94A3B8;
  --text-subtle: #64748B;

  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.14);

  --accent-primary: #38BDF8;
  --accent-primary-hover: #7DD3FC;
  --accent-subtle: rgba(56, 189, 248, 0.12);

  --legal-border: #F59E0B;
  --legal-bg: rgba(245, 158, 11, 0.08);
  --legal-text: #FCD34D;
}

/* --- 2. TEMEL SIFIRLAMA & TIPOGRAFİ (APPLE HIG) --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
  background-color: var(--bg-app);
  color: var(--text-main);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  letter-spacing: -0.012em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-overflow-scrolling: touch;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

/* --- 3. UYGULAMA İSKELETİ --- */
.app-container {
  display: flex;
  position: fixed;
  top: var(--app-top, 0px);
  left: 0;
  right: 0;
  bottom: auto;
  width: 100%;
  height: 100%;
  height: 100dvh;
  height: var(--app-height, 100dvh);
  max-height: var(--app-height, 100dvh);
  overflow: hidden;
  z-index: 2;
}

/* Yan Panel (Gemini Mini-Rail & Tam Panel Sentezi) */
.sidebar {
  width: 280px;
  max-width: 85vw;
  height: 100%;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 50;
  transform: translateX(-100%);
  transition: transform 0.32s cubic-bezier(0.2, 0.9, 0.2, 1), width 0.28s cubic-bezier(0.2, 0.9, 0.2, 1);
  box-shadow: 12px 0 40px rgba(0, 0, 0, 0.55);
}

.sidebar.open {
  transform: translateX(0);
}

/* ==========================================================================
   MASAÜSTÜ: GEMINI TARZI MİNİ İKON ÇUBUĞU (RAIL) VS TAM PANEL
   ========================================================================== */
@media (min-width: 1024px) {
  .sidebar {
    position: static;
    transform: none;
    flex-shrink: 0;
    box-shadow: none;
    width: 280px;
    min-width: 280px;
    max-width: 280px;
    height: 100%;
    margin-left: 0;
    opacity: 1;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-subtle);
    transition: width 0.32s cubic-bezier(0.2, 0.9, 0.2, 1),
                min-width 0.32s cubic-bezier(0.2, 0.9, 0.2, 1),
                max-width 0.32s cubic-bezier(0.2, 0.9, 0.2, 1),
                background-color 0.25s ease,
                border-color 0.25s ease;
    overflow: hidden;
  }

  /* Kapalı Mini-Rail Hali: TAMAMEN ŞEFFAF HAYALİ ÇUBUK (NEBULA ŞOVU KESİNTİSİZ) */
  .sidebar.collapsed {
    width: 68px !important;
    min-width: 68px !important;
    max-width: 68px !important;
    height: 100% !important;
    background: transparent !important;
    background-color: transparent !important;
    border-right: 1px solid transparent !important;
    box-shadow: none !important;
    overflow: visible; /* Tooltiplerin dışarı taşabilmesi için */
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2338BDF8' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M12 5l7 7-7 7'/%3E%3C/svg%3E") 12 12, e-resize;
  }

  .sidebar.collapsed button,
  .sidebar.collapsed a,
  .sidebar.collapsed .sidebar-morph-item {
    cursor: pointer;
  }
}

.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 45;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.2, 0.9, 0.2, 1);
}

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

/* ==========================================================================
   ROTA TEK AĞAÇLI VE AKICI MORF EDİLEN KENAR ÇUBUĞU (UNIFIED MORPHING SIDEBAR)
   ========================================================================== */

/* 0. Sidebar İç Taşıyıcı */
.sidebar-inner {
  width: 280px;
  min-width: 280px;
  max-width: 280px;
  height: 100%;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow: visible;
  transition: width 0.32s cubic-bezier(0.2, 0.9, 0.2, 1),
              min-width 0.32s cubic-bezier(0.2, 0.9, 0.2, 1),
              max-width 0.32s cubic-bezier(0.2, 0.9, 0.2, 1);
}

@media (min-width: 1024px) {
  .sidebar.collapsed .sidebar-inner {
    width: 68px !important;
    min-width: 68px !important;
    max-width: 68px !important;
  }
}

/* Sidebar Tepe Başlığı */
.sidebar-header {
  padding: 14px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
  border-bottom: 1px solid var(--border-subtle);
  transition: border-color 0.25s ease, padding 0.32s cubic-bezier(0.2, 0.9, 0.2, 1);
}

@media (min-width: 1024px) {
  .sidebar.collapsed .sidebar-header {
    border-bottom-color: transparent;
    padding: 14px 14px 14px;
  }
}

/* 1. Marka / Logo Satırı */
.sidebar-brand-row {
  display: flex;
  align-items: center;
  width: 100%;
  height: 40px;
  position: relative;
  z-index: 30;
  transition: width 0.32s cubic-bezier(0.2, 0.9, 0.2, 1);
}

@media (min-width: 1024px) {
  .sidebar.collapsed .sidebar-brand-row {
    width: 40px !important;
  }
  .sidebar.collapsed .sidebar-brand-left {
    gap: 0 !important;
  }
}

.sidebar-brand-left {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.sidebar-brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  position: relative;
  transition: all 0.18s ease;
}

.sidebar-brand-logo:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-strong);
}

.rail-logo-icon,
.rail-expand-icon {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s cubic-bezier(0.2, 0.9, 0.2, 1), transform 0.2s cubic-bezier(0.2, 0.9, 0.2, 1);
}

.rail-logo-icon {
  opacity: 1;
  transform: scale(1);
}

.rail-expand-icon {
  opacity: 0;
  transform: scale(0.6);
  color: var(--text-main);
}

@media (min-width: 1024px) {
  .sidebar.collapsed .sidebar-brand-logo:hover .rail-logo-icon {
    opacity: 0;
    transform: scale(0.6);
  }
  .sidebar.collapsed .sidebar-brand-logo:hover .rail-expand-icon {
    opacity: 1;
    transform: scale(1);
  }
  .sidebar:not(.collapsed) .rail-expand-icon {
    display: none !important;
  }
}

@media (max-width: 1023px) {
  .rail-expand-icon {
    display: none !important;
  }
}

.sidebar-brand-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text-main);
  line-height: 1;
  white-space: nowrap;
  opacity: 1;
  transform: translateX(0);
  transition: opacity 0.2s cubic-bezier(0.2, 0.9, 0.2, 1) 0.05s, transform 0.25s cubic-bezier(0.2, 0.9, 0.2, 1) 0.05s;
}

@media (min-width: 1024px) {
  .sidebar.collapsed .sidebar-brand-name {
    opacity: 0;
    transform: translateX(-8px);
    pointer-events: none;
    width: 0;
    overflow: hidden;
  }
}

.collapse-btn-wrapper {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

@media (min-width: 1024px) {
  .sidebar.collapsed .collapse-btn-wrapper {
    opacity: 0;
    transform: translateY(-50%) scale(0.7);
    pointer-events: none;
  }
}

.btn-sidebar-collapse {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  background: none;
  border: none;
  transition: all 0.15s ease;
}

.btn-sidebar-collapse:hover {
  background: var(--bg-surface-hover);
  color: var(--text-main);
}

.collapse-tooltip {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  transform: translateY(-4px);
  background: #E8ECEF;
  color: #171A1F;
  font-size: 12.5px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 8px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
  transition: opacity 0.18s cubic-bezier(0.16, 1, 0.3, 1), transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 100;
  letter-spacing: -0.01em;
}

.collapse-btn-wrapper:hover .collapse-tooltip {
  opacity: 1;
  transform: translateY(0);
}

@media (min-width: 1024px) {
  .sidebar.collapsed .collapse-tooltip {
    display: none !important;
  }
}

@media (max-width: 1023px) {
  .collapse-tooltip {
    display: none !important;
  }
}

/* 2 & 3: Morf Edilen Aksiyonlar (Yeni Sohbet, Arama) */
.sidebar-action-wrapper {
  position: relative;
  display: flex;
  width: 100%;
  transition: width 0.32s cubic-bezier(0.2, 0.9, 0.2, 1);
}

@media (min-width: 1024px) {
  .sidebar.collapsed .sidebar-action-wrapper {
    width: 40px !important;
  }
}

.sidebar-morph-item {
  height: 40px;
  border-radius: 9999px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  box-sizing: border-box;
  overflow: hidden;
  cursor: pointer;
  color: var(--text-main);
  width: 100%;
  padding: 0 14px 0 0;
  gap: 0;
  transition: width 0.32s cubic-bezier(0.2, 0.9, 0.2, 1),
              background-color 0.18s ease,
              border-color 0.18s ease,
              box-shadow 0.18s ease,
              transform 0.15s ease;
}

.sidebar-morph-item:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-strong);
}

@media (min-width: 1024px) {
  .sidebar.collapsed .sidebar-morph-item {
    width: 40px !important;
    padding-right: 0 !important;
  }
  .sidebar.collapsed .sidebar-morph-item:hover {
    transform: scale(1.04);
  }
}

.morph-icon {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-muted);
  transition: color 0.15s ease;
}

.sidebar-morph-item:hover .morph-icon {
  color: var(--text-main);
}

.btn-new-chat {
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
}

.morph-label {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-main);
  white-space: nowrap;
  opacity: 1;
  transform: translateX(0);
  transition: opacity 0.2s cubic-bezier(0.2, 0.9, 0.2, 1) 0.05s,
              transform 0.25s cubic-bezier(0.2, 0.9, 0.2, 1) 0.05s,
              max-width 0.32s cubic-bezier(0.2, 0.9, 0.2, 1);
  max-width: 160px;
}

@media (min-width: 1024px) {
  .sidebar.collapsed .morph-label {
    opacity: 0;
    transform: translateX(-8px);
    max-width: 0;
    overflow: hidden;
    pointer-events: none;
  }
}

.sidebar-search-box:focus-within {
  border-color: var(--accent-primary);
  background: var(--bg-surface-hover);
  color: var(--text-main);
}

.morph-input {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-family: inherit;
  font-size: 13.5px;
  outline: none;
  opacity: 1;
  transform: translateX(0);
  transition: opacity 0.2s cubic-bezier(0.2, 0.9, 0.2, 1) 0.05s,
              transform 0.25s cubic-bezier(0.2, 0.9, 0.2, 1) 0.05s,
              width 0.32s cubic-bezier(0.2, 0.9, 0.2, 1);
}

.morph-input::placeholder {
  color: var(--text-subtle);
}

@media (min-width: 1024px) {
  .sidebar.collapsed .morph-input {
    opacity: 0;
    transform: translateX(-8px);
    pointer-events: none;
    width: 0;
    overflow: hidden;
  }
}

/* Tooltipler (Yalnızca masaüstünde ve kapalıyken) */
.rail-tooltip {
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%) translateX(-6px);
  background: #E8ECEF;
  color: #171A1F;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 12px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
  transition: opacity 0.18s cubic-bezier(0.16, 1, 0.3, 1), transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 100;
  letter-spacing: -0.01em;
}

@media (min-width: 1024px) {
  .sidebar.collapsed .sidebar-brand-row:hover .rail-tooltip-logo,
  .sidebar.collapsed .sidebar-action-wrapper:hover .rail-tooltip-action {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
  }
  .sidebar:not(.collapsed) .rail-tooltip {
    display: none !important;
  }
}

@media (max-width: 1023px) {
  .rail-tooltip {
    display: none !important;
  }
}

/* 4. Gövde Bölümü (Sohbet Listesi ve Alt Bilgi) */
.sidebar-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  opacity: 1;
  transform: translateX(0);
  transition: opacity 0.25s ease 0.06s, transform 0.28s ease 0.06s;
}

@media (min-width: 1024px) {
  .sidebar.collapsed .sidebar-body {
    opacity: 0;
    transform: translateX(-12px);
    pointer-events: none;
    visibility: hidden;
    height: 0;
    overflow: hidden;
  }
}

.chat-list {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

/* Özel Akıcı İnce Kaydırma Çubuğu */
.chat-list::-webkit-scrollbar {
  width: 4px;
}

.chat-list::-webkit-scrollbar-track {
  background: transparent;
}

.chat-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
}

.chat-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.22);
}

.chat-item-wrapper {
  position: relative;
  width: 100%;
  flex-shrink: 0;
}

.chat-item {
  width: 100%;
  height: 42px;
  min-height: 42px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px 0 12px;
  border-radius: 9999px;
  font-size: 13.5px;
  color: var(--text-muted);
  background: transparent;
  transition: all 0.15s ease;
  position: relative;
  user-select: none;
  border: 1px solid transparent;
}

.chat-item:hover {
  background: var(--bg-surface-hover);
  color: var(--text-main);
}

.chat-item.active {
  background: var(--bg-surface);
  color: var(--text-main);
  font-weight: 500;
  border: 1px solid var(--border-subtle);
}

.chat-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  flex: 1;
  min-width: 0;
}

.chat-item-icon {
  flex-shrink: 0;
  color: var(--text-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-item.active .chat-item-icon {
  color: var(--accent-primary);
}

.chat-item.pinned .chat-item-icon {
  color: #38BDF8;
}

.chat-item-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
  flex: 1;
  font-size: 13.5px;
  line-height: 1.3;
}

/* 3 Nokta Seçenekler Butonu */
.chat-item-menu-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  background: transparent;
  opacity: 0;
  transition: opacity 0.15s ease, background-color 0.15s ease, color 0.15s ease;
  flex-shrink: 0;
  cursor: pointer;
}

.chat-item:hover .chat-item-menu-btn,
.chat-item.menu-open .chat-item-menu-btn {
  opacity: 1;
}

.chat-item-menu-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-main);
}

/* Sohbet Başlığı Hover Tooltip Kartı (media_1790462231533.png) */
.chat-item-tooltip {
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%) translateX(-6px);
  background: #E8ECEF;
  color: #171A1F;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 12px;
  white-space: normal;
  max-width: 260px;
  word-break: break-word;
  pointer-events: none;
  opacity: 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  transition: opacity 0.18s cubic-bezier(0.16, 1, 0.3, 1), transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 120;
  line-height: 1.4;
}

.chat-floating-tooltip {
  position: fixed;
  z-index: 1200;
  background: #E8ECEF;
  color: #171A1F;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 12px;
  white-space: normal;
  max-width: 260px;
  word-break: break-word;
  pointer-events: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
  animation: tooltipFloatIn 0.16s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  line-height: 1.4;
  transform: translateY(-50%);
}

@keyframes tooltipFloatIn {
  from {
    opacity: 0;
    transform: translateY(-50%) translateX(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
  }
}

.chat-item-wrapper:hover .chat-item-tooltip {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.chat-item.menu-open ~ .chat-item-tooltip {
  display: none !important;
  opacity: 0 !important;
}

/* Canlı Başlık Düzenleme Inputu */
.chat-rename-input {
  width: 100%;
  background: var(--bg-surface-hover);
  border: 1px solid var(--accent-primary);
  border-radius: 6px;
  color: var(--text-main);
  font-size: 13.5px;
  padding: 3px 8px;
  outline: none;
  font-family: inherit;
}

/* ==========================================================================
   GEÇMİŞ SOHBET 3 NOKTA AÇILIR MENÜSÜ (CONTEXT MENU / media_1790462243314.png)
   ========================================================================== */
.chat-context-menu {
  position: fixed;
  z-index: 1000;
  min-width: 190px;
  background: #1E2022;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 6px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  gap: 2px;
  animation: contextMenuPop 0.16s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

@keyframes contextMenuPop {
  0% {
    opacity: 0;
    transform: scale(0.92) translateY(-4px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.context-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 500;
  color: #E2E8F0;
  background: transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
  text-align: left;
}

.context-menu-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
}

.context-menu-item.danger:hover {
  background: rgba(239, 68, 68, 0.12);
  color: #EF4444;
}

.context-menu-item svg {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: color 0.15s ease;
}

.context-menu-item:hover svg {
  color: var(--text-main);
}

.context-menu-item.danger:hover svg {
  color: #EF4444;
}

.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-footer-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-muted);
  padding: 6px 4px;
  border-radius: 8px;
  transition: color 0.15s ease;
}

.sidebar-footer-btn:hover {
  color: var(--text-main);
}

/* --- 4. ANA ÇALIŞMA ALANI & HEADER --- */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
  overflow: hidden;
  position: relative;
}

.app-header {
  height: 52px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 20;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: var(--text-muted);
  cursor: pointer;
  background: transparent;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  -webkit-tap-highlight-color: transparent !important;
  outline: none !important;
  user-select: none;
  -webkit-user-select: none;
}

.sidebar-toggle-btn:hover {
  background: var(--bg-surface-hover);
  color: var(--text-main);
  border-color: var(--border-subtle);
}

.sidebar-toggle-btn:focus,
.sidebar-toggle-btn:active {
  outline: none !important;
  background: var(--bg-surface-hover);
  -webkit-tap-highlight-color: transparent !important;
}

.header-brand-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

/* Masaüstünde sidebar-rail daimi sol kenarda olduğu için header hamburgeri ve logo gizlenir */
@media (min-width: 1024px) {
  .app-header .sidebar-toggle-btn,
  .app-header .header-brand-title {
    display: none;
  }
}

/* --- 5. ORTALANMIŞ MESAJ TUVALİ (720px CANAL) --- */
.messages-container {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden; /* Yatay taşmayı kesin olarak engeller */
  padding: 20px 20px 140px; /* Alttaki dock için doğal nefes alanı */
  scroll-behavior: smooth;
  display: flex;
  flex-direction: column;
}

@media (max-width: 640px) {
  .messages-container {
    padding: 12px 14px 110px; /* Mobilde kenar boşlukları ve alt tampon */
  }
}

.messages-inner {
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 36px;
  flex: 1;
  position: relative;
}

/* --- 6. SOHBET MESAJLARI (APPLE DEFERENCE STANDARDI) --- */
.message-row {
  display: flex;
  width: 100%;
}

/* Kullanıcı Mesajı: Sağa yaslı, pürüzsüz Apple iMessage hapı */
.message-row-user {
  justify-content: flex-end;
}

/* Kullanıcı Mesajı ve Asistan Yanıtı Yumuşak Giriş Animasyonu (Fade-in + Aşağıdan Yukarı Süzülme) */
.message-row-user-enter {
  animation: promptEnterGlide 0.48s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  will-change: transform, opacity;
}

.message-row-assistant-enter {
  animation: promptEnterGlide 0.44s cubic-bezier(0.16, 1, 0.3, 1) 0.06s backwards;
  will-change: transform, opacity;
}

@keyframes promptEnterGlide {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.message-bubble-user {
  max-width: 78%;
  background-color: var(--bg-user-bubble);
  color: var(--text-user);
  padding: 11px 18px;
  border-radius: 22px 22px 4px 22px;
  font-size: 14.5px;
  line-height: 1.55;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.message-bubble-user p {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Asistan Mesajı: KUTU VE ARKA PLAN YOK! Doğrudan tuval üzerinde akan tipografi */
.message-row-assistant {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 10px;
}

.assistant-identity {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.assistant-avatar {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  overflow: visible;
}

.assistant-avatar.is-hunting,
.site-master-logo.is-hunting {
  border-color: rgba(56, 189, 248, 0.5) !important;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}

.site-master-logo {
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.site-master-logo.is-hunting:hover .rail-logo-icon {
  opacity: 1 !important;
  transform: scale(1) !important;
}

.site-master-logo.is-hunting:hover .rail-expand-icon {
  opacity: 0 !important;
}

/* Apex Cant Compass Amblem Vektör Kuralları */
.apex-cant-svg {
  display: block;
  overflow: visible;
}

.compass-needle {
  transform-origin: 12px 12px;
  transform: rotate(45deg);
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.apex-facet-light {
  fill: #FFFFFF;
}

.apex-facet-accent {
  fill: var(--accent-primary, #38BDF8);
}

/* Model düşünürken rotayı arayan pusula salınımı (26° - 64°) */
@keyframes compassHunt {
  0% {
    transform: rotate(26deg);
  }
  50% {
    transform: rotate(64deg);
  }
  100% {
    transform: rotate(26deg);
  }
}

.is-hunting .compass-needle {
  animation: compassHunt 1.35s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}

.assistant-content {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-main);
  word-break: break-word;
}

.assistant-content p {
  margin-bottom: 14px;
}

.assistant-content p:last-child {
  margin-bottom: 0;
}

.assistant-content strong {
  font-weight: 600;
  color: var(--text-main);
}

.assistant-content ul, .assistant-content ol {
  margin: 8px 0 14px 24px;
}

.assistant-content li {
  margin-bottom: 6px;
}

.assistant-content code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.88em;
  background: var(--bg-surface-hover);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
}

/* DPÜ Mevzuat Hükmü Alıntı Bloğu (Apple Notes Style) */
.assistant-content blockquote {
  border-left: 2px solid var(--legal-border);
  background: var(--legal-bg);
  padding: 10px 14px;
  margin: 14px 0;
  border-radius: 0 8px 8px 0;
  color: var(--legal-text);
  font-size: 13.5px;
  line-height: 1.6;
}

.assistant-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 13.5px;
}

.assistant-content th,
.assistant-content td {
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

.assistant-content th {
  font-weight: 600;
  color: var(--text-main);
  background: var(--bg-surface-hover);
}

.assistant-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.btn-micro-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border-subtle);
  transition: all 0.15s ease;
}

.btn-micro-action:hover {
  background: var(--bg-surface-hover);
  color: var(--text-main);
  border-color: var(--border-strong);
}

/* Yanıt Üretiliyor Animasyonu (3-Dot Pulse) */
.typing-pulse {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
}

.typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-primary);
  opacity: 0.5;
  animation: dotBlink 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotBlink {
  0%, 100% { opacity: 0.3; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.15); }
}

/* --- 7. GEMINI TARZI AÇILIŞ ALANI (ZERO-STATE ATMOSPHERE) --- */
.zero-state-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin: auto auto; /* Dikey ve yatay baz merkezleme */
  padding: 10px 16px 20px;
  gap: 20px;
  width: 100%;
  will-change: transform, opacity;
  transition: transform 0.4s ease, opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Karşılama adasının tavana doğru süzülerek kaybolma animasyonu */
.zero-state-container.zero-state-exiting {
  opacity: 0 !important;
  pointer-events: none !important;
  transition: opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1), transform 0.45s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

/* Karşılama adasının yeni sohbette tavandan yumuşakça süzülerek gelme animasyonu */
@keyframes zeroStateEnterGlide {
  0% {
    opacity: 0;
    transform: translateY(calc(var(--zs-base-y, -55px) - 35px));
  }
  100% {
    opacity: 1;
    transform: translateY(var(--zs-base-y, -55px));
  }
}

.zero-state-container.zero-state-entering {
  animation: zeroStateEnterGlide 0.72s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.zero-state-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.zero-state-title {
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--text-main);
  line-height: 1.25;
  text-wrap: balance;
}

.zero-state-desc {
  color: var(--text-muted);
  line-height: 1.55;
  text-wrap: balance;
}

/* Gemini Esintili Hızlı Öneri Hapları (Pill Suggestions) */
.zero-state-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
}

.suggestion-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-weight: 500;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.suggestion-pill::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(80px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(56, 189, 248, 0.22), transparent 70%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.suggestion-pill:hover::before {
  opacity: 1;
}

.suggestion-pill:hover {
  background: var(--bg-surface-hover);
  color: var(--text-main);
  border-color: var(--accent-primary);
  transform: translateY(-1.5px);
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.15);
}

.suggestion-pill svg {
  color: var(--accent-primary);
  flex-shrink: 0;
}

/* --- 8. YÜZEN HAP KAPSÜL DOKU (GEMINI / DYNAMIC ISLAND DOCK) --- */
.dock-container {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px 20px 24px;
  background: transparent;
  pointer-events: none;
  z-index: 30;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.dock-container.dock-elevated,
.dock-container.dock-transitioning {
  transition: transform 0.85s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

.dock-container.keyboard-open {
  transform: none !important;
  transition: transform 0.12s cubic-bezier(0.16, 1, 0.3, 1) !important;
  padding-bottom: 10px !important;
}

.dock-container.keyboard-open .dock-disclaimer {
  display: none !important;
}

.dock-container.dock-elevated {
  transform: translateY(-155px); /* Varsayılan masaüstü merkeze yakın yükselme */
}

/* ==========================================================================
   3 AYRI CİHAZ PROFİLİ (MOBİL TELEFON, TABLET/iPAD, MASAÜSTÜ) HARMONİSİ
   ========================================================================== */

/* 1. MOBİL TELEFON KURAL SETİ (< 640px) */
@media (max-width: 640px) {
  .zero-state-container {
    --zs-base-y: -55px;
    transform: translateY(var(--zs-base-y)); /* Adayı yukarı alarak dock'a nefes alanı açar */
    gap: 14px;
    padding: 10px 10px 8px;
  }
  .zero-state-hero {
    gap: 8px;
  }
  .zero-state-title {
    font-size: 22.5px;
    line-height: 1.25;
    max-width: 290px;
  }
  .zero-state-desc {
    font-size: 12px;
    max-width: 300px;
    line-height: 1.45;
  }
  .zero-state-pills {
    gap: 6px;
    max-width: 320px;
    margin-top: 2px;
  }
  .suggestion-pill {
    padding: 6px 11px;
    font-size: 11.5px;
    gap: 5px;
  }
  .suggestion-pill svg {
    width: 11.5px;
    height: 11.5px;
  }
  .dock-container {
    padding: 10px 14px 18px;
  }
  .dock-container.dock-elevated {
    transform: translateY(-85px); /* Alt sistem çubuğundan uzaklaşır, adaya yaklaşır */
  }
  .dock-card {
    height: 50px;
    padding: 0 8px 0 16px;
  }
  .dock-input {
    font-size: 16px; /* iOS/iPadOS Safari 16px kuralı: Otomatik zoom ve zıplamayı kesin olarak engeller */
  }
  .dock-disclaimer {
    font-size: 10.5px;
    margin-top: 8px;
  }
}

/* 2. TABLET / iPAD KURAL SETİ (641px - 1024px) */
@media (min-width: 641px) and (max-width: 1024px) {
  .zero-state-container {
    --zs-base-y: -80px;
    transform: translateY(var(--zs-base-y)); /* iPad'de adayı yukarı alarak geniş ekranı dengeler */
    gap: 24px;
    padding: 10px 24px 20px;
  }
  .zero-state-hero {
    gap: 14px;
  }
  .zero-state-title {
    font-size: 38px; /* Cılızlıktan kurtulup iPad'e heybet kazandırır */
    letter-spacing: -0.03em;
    line-height: 1.2;
    max-width: 640px;
  }
  .zero-state-desc {
    font-size: 16px;
    max-width: 600px;
    line-height: 1.55;
  }
  .zero-state-pills {
    gap: 10px;
    max-width: 680px;
    margin-top: 6px;
  }
  .suggestion-pill {
    padding: 11px 22px;
    font-size: 14.5px;
    gap: 8.5px;
  }
  .suggestion-pill svg {
    width: 14px;
    height: 14px;
  }
  .dock-card {
    height: 58px;
  }
  .dock-input {
    font-size: 16px; /* iPadOS Safari 16px kuralı */
  }
  .dock-container.dock-elevated {
    transform: translateY(-240px); /* iPad ekranında dock'u adaya yaklaştırır */
  }
}

/* 3. MASAÜSTÜ KURAL SETİ (> 1024px) */
@media (min-width: 1025px) {
  .zero-state-container {
    --zs-base-y: -55px;
    transform: translateY(var(--zs-base-y)); /* Masaüstünde adayı hafif yukarı alır */
    gap: 22px;
  }
  .zero-state-hero {
    gap: 12px;
  }
  .zero-state-title {
    font-size: 32px;
    letter-spacing: -0.025em;
    line-height: 1.25;
    max-width: 580px;
  }
  .zero-state-desc {
    font-size: 14px;
    max-width: 520px;
    line-height: 1.55;
  }
  .zero-state-pills {
    gap: 8px;
    max-width: 620px;
    margin-top: 4px;
  }
  .suggestion-pill {
    padding: 8.5px 18px;
    font-size: 13.5px;
    gap: 7px;
  }
  .suggestion-pill svg {
    width: 13px;
    height: 13px;
  }
  .dock-container.dock-elevated {
    transform: translateY(-155px); /* Masaüstünde merkeze yaklaştırılmış dock */
  }
}

/* Düşük Dikey Yükseklikli Pencereler İçin Güvenlik Emniyeti (Laptop / Split View) */
@media (max-height: 680px) {
  .zero-state-container {
    --zs-base-y: -25px;
    transform: translateY(var(--zs-base-y));
    gap: 12px;
  }
  .dock-container.dock-elevated {
    transform: translateY(-65px);
  }
}

.dock-inner {
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
  pointer-events: auto;
}

/* Tam Kapsül (Pill) Giriş Çubuğu + Magic UI Interactive Glow */
.dock-card {
  width: 100%;
  max-width: 100%;
  background: var(--bg-dock);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-dock);
  border-radius: 28px;
  min-height: 54px;
  height: auto;
  padding: 8px 10px 8px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-dock);
  position: relative;
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

/* Magic UI İmleç Spotlightı (Farenin Pozisyonunu Takip Eden Işık) */
.dock-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: radial-gradient(160px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(56, 189, 248, 0.2), transparent 70%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 0;
}

.dock-card:hover::before {
  opacity: 1;
}

/* Dokunmatik Cihazlarda (Telefon, Tablet) Sabit Kalan Spotlightı Engelle */
@media (hover: none) and (pointer: coarse) {
  .dock-card::before {
    display: none !important;
  }
}

/* Dokunmatik Cihazlar İçin Su Dalgası (Water Wave Ripple) Efekti */
.dock-touch-ripple {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.35) 0%, rgba(56, 189, 248, 0.12) 40%, transparent 70%);
  box-shadow: 0 0 24px rgba(56, 189, 248, 0.22);
  transform: translate(-50%, -50%) scale(0);
  animation: dockWaterWave 0.7s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
  z-index: 1;
}

@keyframes dockWaterWave {
  0% {
    transform: translate(-50%, -50%) scale(0.08);
    opacity: 0.9;
  }
  50% {
    opacity: 0.55;
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0;
  }
}

/* Hafif Lazer Işın Geçişi */
.dock-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent 0%, rgba(56, 189, 248, 0.1) 50%, transparent 100%);
  pointer-events: none;
  animation: dockBeamSweep 8s ease-in-out infinite;
  z-index: 0;
}

@keyframes dockBeamSweep {
  0% { transform: translateX(0); }
  50% { transform: translateX(200%); }
  100% { transform: translateX(200%); }
}

.dock-card:focus-within {
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-dock), 0 0 16px rgba(56, 189, 248, 0.25);
}

.dock-input {
  flex: 1;
  min-width: 0;
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-main);
  font-family: inherit;
  font-size: 14.5px;
  line-height: 1.45;
  resize: none;
  overflow-y: auto;
  max-height: 120px;
  height: 22px;
  padding: 1px 0;
  position: relative;
  z-index: 2;
}

.dock-input::placeholder {
  color: var(--text-subtle);
}

.btn-dock-send {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-primary);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s ease;
  position: relative;
  z-index: 2;
}

.btn-dock-send:hover:not(:disabled) {
  background: var(--accent-primary-hover);
  transform: scale(1.05);
}

.btn-dock-send:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.dock-disclaimer {
  font-size: 11.5px;
  color: var(--text-subtle);
  text-align: center;
  margin-top: 8px;
  letter-spacing: -0.01em;
  transition: opacity 0.18s cubic-bezier(0.16, 1, 0.3, 1), transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.dock-disclaimer a, .dock-disclaimer button {
  color: var(--text-muted);
  text-decoration: underline;
  cursor: pointer;
}

/* --- 9. MODALLAR (APPLE HIG SHEET / DIALOG) --- */
dialog {
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  background-color: var(--bg-surface);
  color: var(--text-main);
  padding: 24px;
  max-width: 520px;
  width: 90%;
  margin: auto;
  box-shadow: var(--shadow-dock);
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.dialog-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
}

.dialog-body {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dialog-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dialog-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dialog-input,
.dialog-select,
.dialog-textarea {
  width: 100%;
  padding: 9px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background-color: var(--bg-app);
  color: var(--text-main);
  font-family: inherit;
  font-size: 13.5px;
  transition: border-color 0.15s ease;
}

.dialog-input:focus,
.dialog-select:focus,
.dialog-textarea:focus {
  border-color: var(--accent-primary);
  outline: none;
}

.dialog-footer {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.btn-dialog-primary {
  height: 38px;
  padding: 0 18px;
  background: var(--accent-primary);
  color: #fff;
  border-radius: 9999px;
  font-size: 13.5px;
  font-weight: 500;
  transition: background 0.15s ease;
}

.btn-dialog-primary:hover {
  background: var(--accent-primary-hover);
}

.btn-dialog-ghost {
  height: 38px;
  padding: 0 14px;
  color: var(--text-muted);
  border-radius: 9999px;
  font-size: 13.5px;
}

.btn-dialog-ghost:hover {
  background: var(--bg-surface-hover);
  color: var(--text-main);
}

.hidden {
  display: none !important;
}

/* --- 10. DITHERING NOISE KATMANI (GR मिळाले BANTLANMAYI SIFIRLAR) --- */
.noise-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
  opacity: 0.032;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

html.dark .noise-overlay {
  opacity: 0.045;
}

/* --- 11. GEMINI & APPLE INTELLIGENCE WEBGL NEBULA CANVAS --- */
#gemini-nebula-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
}

/* --- 12. GÖKSEL NEBULA PLAYGROUND KONTROL PANELİ --- */
.btn-playground-toggle {
  display: none !important;
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  background: var(--bg-dock);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-dock);
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.btn-playground-toggle:hover {
  color: var(--text-main);
  border-color: var(--accent-primary);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.playground-dialog {
  border: none;
  background: transparent;
  padding: 0;
  margin: auto;
  max-width: 400px;
  width: 90vw;
  border-radius: 20px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.65);
  z-index: 100;
}

.playground-dialog::backdrop {
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.playground-inner {
  background: var(--bg-dock);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid var(--border-dock);
  border-radius: 20px;
  padding: 20px;
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.playground-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 12px;
}

.btn-close-playground {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-surface);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-close-playground:hover {
  background: var(--bg-surface-hover);
  color: var(--text-main);
}

.playground-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.playground-group label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-subtle);
}

.playground-pills {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.pg-pill {
  padding: 7px 10px;
  font-size: 12px;
  border-radius: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pg-pill:hover {
  background: var(--bg-surface-hover);
  color: var(--text-main);
}

.pg-pill.active {
  background: var(--accent-subtle);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  font-weight: 600;
}

.pg-btn-state {
  flex: 1;
  padding: 8px;
  font-size: 12px;
  border-radius: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.pg-btn-state:hover {
  background: var(--bg-surface-hover);
  color: var(--text-main);
}

.pg-btn-state.active {
  background: var(--accent-subtle);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  font-weight: 600;
}

.pg-slider-header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}

.pg-slider {
  width: 100%;
  height: 5px;
  border-radius: 4px;
  accent-color: var(--accent-primary);
  cursor: pointer;
}



