/* ═══════════════════════════════════════════════════════════════
   AI Agent — Main CSS
   Dark glassmorphism, responsive, Inter font
   ═══════════════════════════════════════════════════════════════ */

/* ── Design Tokens ────────────────────────────────────────────── */
:root {
  /* Colors */
  --bg-primary:    #0a0a12;
  --bg-secondary:  #0f0f1a;
  --bg-tertiary:   #141425;
  --bg-card:       rgba(20, 20, 40, 0.7);
  --bg-hover:      rgba(99, 102, 241, 0.08);

  --glass-bg:      rgba(15, 15, 30, 0.6);
  --glass-border:  rgba(99, 102, 241, 0.15);
  --glass-blur:    20px;

  --accent:        #6366f1;
  --primary:       var(--accent); /* bazı şablonlar bu adı kullanıyor */
  --accent-light:  #818cf8;
  --accent-dark:   #4f46e5;
  --accent-glow:   rgba(99, 102, 241, 0.25);

  --purple:        #8b5cf6;
  --purple-light:  #a78bfa;

  --text-primary:   #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted:     #475569;
  --text-disabled:  #334155;

  --success:       #10b981;
  --warning:       #f59e0b;
  --error:         #ef4444;
  --tool-color:    #06b6d4;

  --user-bubble:   linear-gradient(135deg, #6366f1, #8b5cf6);
  --ai-bubble:     rgba(20, 20, 42, 0.8);

  --border:        rgba(99, 102, 241, 0.12);
  --border-hover:  rgba(99, 102, 241, 0.3);

  /* Spacing */
  --sidebar-width: 280px;
  --topbar-h:      60px;
  --input-area-h:  130px;

  /* Fonts */
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Radius */
  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  18px;
  --radius-xl:  24px;

  /* Shadows */
  --shadow-sm:   0 2px 8px rgba(0,0,0,0.3);
  --shadow-md:   0 8px 24px rgba(0,0,0,0.4);
  --shadow-lg:   0 20px 60px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 30px var(--accent-glow);

  /* Transitions */
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);

  /* Message Font Size */
  --msg-font-size: 0.925rem;
}

/* ── Reset & Base ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size:1rem; scroll-behavior: smooth; }

[hidden] { display: none !important; }

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-light); text-decoration: none; }
a:hover { color: var(--purple-light); }

button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea { font-family: inherit; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(99,102,241,0.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(99,102,241,0.5); }

/* ── Glass Utility ────────────────────────────────────────────── */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
}

/* ═══════════════════════════════════════════════════════════════
   LOGIN PAGE
   ═══════════════════════════════════════════════════════════════ */
.login-page { overflow-x: hidden; }

.login-bg {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  overflow: hidden; /* dekoratif küreler yatay kaydırma oluşturmasın */
  background: radial-gradient(ellipse 80% 80% at 50% -20%, rgba(99,102,241,0.12), transparent),
              radial-gradient(ellipse 80% 80% at 80% 80%, rgba(139,92,246,0.08), transparent),
              var(--bg-primary);
}

/* Animated orbs */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.4;
  pointer-events: none;
  animation: orbFloat 8s ease-in-out infinite;
}
.orb-1 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(99,102,241,0.4), transparent 70%);
  top: -100px; left: -100px;
  animation-delay: 0s;
}
.orb-2 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(139,92,246,0.3), transparent 70%);
  bottom: -50px; right: -50px;
  animation-delay: -3s;
}
.orb-3 {
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(6,182,212,0.2), transparent 70%);
  top: 50%; right: 20%;
  animation-delay: -5s;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(20px, -30px) scale(1.05); }
  66%       { transform: translate(-15px, 20px) scale(0.95); }
}

.login-container {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  position: relative;
  z-index: 1;
  animation: slideUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

.login-header { text-align: center; }

.login-logo {
  width: 72px; height: 72px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(99,102,241,0.1);
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: 20px;
  animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(99,102,241,0.3); }
  50%       { box-shadow: 0 0 0 12px rgba(99,102,241,0); }
}

.login-title {
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-light), var(--purple-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 6px;
}

.login-subtitle { color: var(--text-secondary); font-size: 0.9rem; }

.login-card {
  width: 100%;
  padding: 36px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

/* Messages */
.messages-container { margin-bottom: 20px; }
.alert {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  margin-bottom: 8px;
  background: rgba(239,68,68,0.12);
  border: 1px solid rgba(239,68,68,0.2);
  color: #fca5a5;
}

/* Form */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: 0.825rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  pointer-events: none;
  transition: color var(--transition);
}

.form-input {
  width: 100%;
  padding: 12px 14px 12px 44px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: all var(--transition);
  outline: none;
}

.form-input::placeholder { color: var(--text-disabled); }

.form-input:focus {
  border-color: var(--accent);
  background: rgba(99,102,241,0.05);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}

.form-input:focus + .input-icon,
.input-wrapper:focus-within .input-icon { color: var(--accent-light); }

.toggle-password {
  position: absolute;
  right: 12px;
  color: var(--text-muted);
  padding: 4px;
  border-radius: 4px;
  transition: color var(--transition);
  display: flex;
  align-items: center;
}
.toggle-password:hover { color: var(--accent-light); }

/* Login Button */
.btn-login {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  margin-top: 8px;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  color: white;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(99,102,241,0.3);
}
.btn-login::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-dark), var(--accent));
  opacity: 0;
  transition: opacity var(--transition);
}
.btn-login:hover:not(:disabled)::before { opacity: 1; }
.btn-login:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(99,102,241,0.4); }
.btn-login:active:not(:disabled) { transform: translateY(0); }
.btn-login:disabled { opacity: 0.7; cursor: not-allowed; }

.btn-text, .btn-arrow { position: relative; z-index: 1; }
.btn-spinner { display: flex; align-items: center; }

.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.login-footer {
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
}
.login-footer a { color: var(--accent-light); font-weight: 600; }
.login-footer a:hover { text-decoration: underline; }

/* [hidden] özniteliği display:flex tarafından ezilmesin */
.btn-spinner[hidden] { display: none; }

/* Şifre göster butonu metnin üstüne binmesin */
.input-wrapper .toggle-password ~ .form-input,
.input-wrapper .form-input:has(+ .toggle-password) { padding-right: 44px; }

.alert-success {
  background: rgba(16,185,129,0.12);
  border-color: rgba(16,185,129,0.25);
  color: #6ee7b7;
}

.field-error { color: #fca5a5; font-size: 0.8rem; margin-top: 6px; }
.field-help { color: var(--text-muted); font-size: 0.75rem; margin-top: 6px; line-height: 1.4; }
.field-help ul { margin: 4px 0 0 16px; padding: 0; }
.auth-note {
  margin-top: 18px; padding: 12px 14px; border-radius: var(--radius-md);
  background: rgba(99,102,241,0.08); border: 1px solid var(--border);
  color: var(--text-secondary); font-size: 0.8rem; line-height: 1.5;
}

/* API anahtarı uyarı bandı (sohbet sayfası) */
.api-key-banner {
  margin: 0 0 16px; padding: 12px 16px; border-radius: var(--radius-md);
  background: rgba(245,158,11,0.1); border: 1px solid rgba(245,158,11,0.3);
  color: var(--text-primary); font-size: 0.875rem; line-height: 1.5;
}
.api-key-banner a { color: var(--warning); font-weight: 600; margin-left: 4px; white-space: nowrap; }

/* ═══════════════════════════════════════════════════════════════
   CHAT PAGE LAYOUT
   ═══════════════════════════════════════════════════════════════ */
.chat-page { overflow: hidden; height: 100dvh; }

.chat-layout {
  display: flex;
  height: 100dvh;
  overflow: hidden;
}

/* ── SIDEBAR ──────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  height: 100dvh;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform var(--transition-slow), width var(--transition-slow);
  z-index: 100;
}

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

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  background: linear-gradient(135deg, var(--accent-light), var(--purple-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar-toggle-btn {
  color: var(--text-muted);
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  display: none;
}
.sidebar-toggle-btn:hover { color: var(--text-primary); background: var(--bg-hover); }

.btn-new-chat {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px;
  padding: 10px 16px;
  background: linear-gradient(135deg, rgba(99,102,241,0.15), rgba(139,92,246,0.15));
  border: 1px solid rgba(99,102,241,0.25);
  color: var(--accent-light);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  transition: all var(--transition);
}
.btn-new-chat:hover {
  background: linear-gradient(135deg, rgba(99,102,241,0.25), rgba(139,92,246,0.25));
  border-color: rgba(99,102,241,0.4);
  box-shadow: 0 4px 12px rgba(99,102,241,0.2);
}

.sidebar-section-title {
  padding: 8px 16px 6px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.conversations-list {
  padding: 4px 0;
}

/* Sidebar tam scroll alanı */
.sidebar-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 0 12px;
  display: flex;
  flex-direction: column;
}

.conversation-item {
  position: relative;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: 2px;
}
.conversation-item:hover { background: var(--bg-hover); }
.conversation-item.active {
  background: rgba(99,102,241,0.12);
  border: 1px solid rgba(99,102,241,0.2);
}

.conv-title {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 24px;
}

.conv-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.conv-delete-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  padding: 4px;
  border-radius: 4px;
  opacity: 0;
  transition: all var(--transition);
  display: flex;
  align-items: center;
}
.conversation-item:hover .conv-delete-btn { opacity: 1; }
.conv-delete-btn:hover { color: var(--error); background: rgba(239,68,68,0.1); }

.conv-more-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  padding: 6px;
  border-radius: 6px;
  opacity: 0;
  transition: all var(--transition);
  display: flex;
  align-items: center;
}
.conversation-item:hover .conv-more-btn,
.conversation-item.active .conv-more-btn,
.conv-more-btn:focus-visible { opacity: 1; }
.conv-more-btn:hover { color: var(--text-primary); background: var(--bg-hover); }
/* Dokunmatik ekranlarda hover yok: menü butonu hep görünsün */
@media (hover: none) { .conv-more-btn { opacity: 1; } }

.conv-empty { padding: 20px; text-align: center; color: var(--text-muted); font-size: 0.85rem; }

/* Context Menü */
@keyframes ctxFadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

.ctx-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 12px;
  border-radius: 7px;
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 500;
  transition: background var(--transition);
  text-align: left;
  cursor: pointer;
}
.ctx-btn:hover { background: var(--bg-hover); }
.ctx-btn-danger { color: var(--error) !important; }
.ctx-btn-danger:hover { background: rgba(239,68,68,0.1) !important; }

.sidebar-footer {
  padding: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-footer-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.825rem;
  font-weight: 500;
  transition: all var(--transition);
  width: 100%;
  text-align: left;
}
.sidebar-footer-link:hover { background: var(--bg-hover); color: var(--text-primary); }
.logout-btn:hover { color: var(--error); background: rgba(239,68,68,0.08); }

/* ── CHAT MAIN ────────────────────────────────────────────────── */
.chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100dvh;
  overflow: hidden;
  min-width: 0;
}

/* Top Bar */
.chat-topbar {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(10,10,18,0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  gap: 12px;
  flex-shrink: 0;
  z-index: 50;
}

.topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }

.topbar-menu-btn {
  color: var(--text-secondary);
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  flex-shrink: 0;
  display: none;
}
.topbar-menu-btn:hover { color: var(--text-primary); background: var(--bg-hover); }

.topbar-title {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

/* Model Selector */
.model-selector-wrapper { position: relative; }

.model-selector-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  background: rgba(99,102,241,0.08);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 0.825rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  transition: all var(--transition);
  white-space: nowrap;
}
.model-selector-btn:hover {
  background: rgba(99,102,241,0.15);
  border-color: var(--border-hover);
}

.model-indicator {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--success);
  flex-shrink: 0;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.model-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(440px, calc(100vw - 32px));
  max-height: min(560px, 72dvh);
  display: flex;
  flex-direction: column;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  overflow: hidden;
  animation: dropdownIn 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.model-dropdown[hidden] { display: none; }
@keyframes dropdownIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.model-search-wrap { flex-shrink: 0; padding: 10px 10px 6px; border-bottom: 1px solid var(--border); }
.model-search {
  width: 100%; padding: 9px 12px; border-radius: 8px; font-size: 0.875rem;
  background: var(--bg-primary); color: var(--text-primary); border: 1px solid var(--border);
}
.model-search:focus { outline: none; border-color: var(--accent); }
/* Dropdown dikey flex olduğu için bu şeritler sıkışmasın; dar ekranda butonlar alt satıra geçer */
.model-filters { flex-shrink: 0; display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.model-filter {
  flex-shrink: 0; padding: 5px 12px; border-radius: 999px; font-size: 0.75rem; line-height: 1.4; color: var(--text-secondary);
  border: 1px solid var(--border); background: transparent;
}
.model-filter:hover { color: var(--text-primary); }
.model-filter.active { color: #fff; background: var(--accent); border-color: var(--accent); }
.model-list { overflow-y: auto; overscroll-behavior: contain; flex: 1 1 auto; min-height: 0; }
.model-section {
  position: sticky; top: 0; z-index: 1; padding: 7px 14px; font-size: 0.7rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em; color: var(--text-secondary);
  background: var(--bg-tertiary); border-bottom: 1px solid var(--border);
}
.model-section span { color: var(--text-muted); font-weight: 500; margin-inline-start: 4px; }
.model-hint, .model-empty { padding: 10px 14px; font-size: 0.78rem; color: var(--text-muted); }
.model-empty { padding: 24px 14px; text-align: center; }

.model-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px 9px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
.model-option:last-child { border-bottom: none; }
.model-option:hover { background: var(--bg-hover); }
.model-option.selected { background: rgba(99,102,241,0.12); box-shadow: inset 3px 0 0 var(--accent); }
[dir="rtl"] .model-option.selected { box-shadow: inset -3px 0 0 var(--accent); }
.model-opt-main { flex: 1; min-width: 0; }
.model-opt-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.model-opt-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.model-badge {
  font-family: var(--font-sans); font-size: 0.68rem; padding: 0 6px; border-radius: 4px;
  background: rgba(6,182,212,0.12); color: var(--tool-color); border: 1px solid rgba(6,182,212,0.25);
}
.model-badge.free { background: rgba(16,185,129,0.12); color: #6ee7b7; border-color: rgba(16,185,129,0.3); }
.model-opt-actions { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
.model-act {
  width: 28px; height: 28px; border-radius: 6px; display: grid; place-items: center;
  color: var(--text-muted); font-size: 0.8rem; line-height: 1;
}
.model-act:hover:not(:disabled) { background: rgba(255,255,255,0.06); color: var(--text-primary); }
.model-act:disabled { opacity: .3; cursor: default; }
.model-star { font-size: 1.05rem; }
.model-star.on { color: #fbbf24; }
@media (max-width: 640px) {
  .model-dropdown { position: fixed; top: 64px; left: 16px; right: 16px; width: auto; max-height: calc(100dvh - 120px); }
  .model-act { width: 34px; height: 34px; }
}
.badge-vision {
  background: rgba(6,182,212,0.15);
  color: var(--tool-color);
  border: 1px solid rgba(6,182,212,0.25);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: var(--font-sans);
  font-size: 0.7rem;
}

/* Model Info Badge */
.model-info-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(99,102,241,0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
}
.badge-sep { color: var(--text-disabled); }

/* ── MESSAGES AREA ────────────────────────────────────────────── */
.messages-area {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 24px 0;
}

.messages-inner {
  max-width: 800px;
  width: 100%;
  min-width: 0;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Welcome Screen */
.welcome-screen {
  text-align: center;
  padding: 60px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  animation: fadeIn 0.5s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.welcome-icon {
  animation: welcomePulse 3s ease-in-out infinite;
}
@keyframes welcomePulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 12px rgba(99,102,241,0.3)); }
  50% { transform: scale(1.03); filter: drop-shadow(0 0 24px rgba(99,102,241,0.5)); }
}

.welcome-screen h2 {
  font-size: 1.8rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.welcome-screen p { color: var(--text-secondary); font-size: 1rem; }

.suggestion-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 8px;
}

.chip {
  padding: 10px 18px;
  background: rgba(99,102,241,0.08);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.85rem;
  border-radius: 24px;
  transition: all var(--transition);
  cursor: pointer;
}
.chip:hover {
  background: rgba(99,102,241,0.16);
  border-color: var(--border-hover);
  color: var(--text-primary);
  transform: translateY(-1px);
}

/* ── Message Bubbles ──────────────────────────────────────────── */
.message-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 20px;
  animation: msgSlide 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  max-width: 100%;
  min-width: 0;
}
@keyframes msgSlide {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.message-group.user { align-items: flex-end; }
.message-group.assistant { align-items: flex-start; }

.message-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 0 4px;
  margin-bottom: 4px;
}

.message-bubble {
  max-width: 85%;
  min-width: 0;
  padding: 14px 18px;
  border-radius: var(--radius-lg);
  font-size: var(--msg-font-size);
  line-height: 1.7;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

.message-group.user .message-bubble {
  background: var(--user-bubble);
  color: white;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 12px rgba(99,102,241,0.2);
}

.message-group.assistant .message-bubble {
  background: var(--ai-bubble);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
  backdrop-filter: blur(8px);
}

/* Markdown inside messages */
.message-bubble h1, .message-bubble h2, .message-bubble h3 {
  margin: 16px 0 8px;
  font-weight: 600;
  line-height: 1.3;
}
.message-bubble h1 { font-size: 1.3rem; }
.message-bubble h2 { font-size: 1.15rem; }
.message-bubble h3 { font-size: 1rem; }

.message-bubble p { margin-bottom: 10px; }
.message-bubble p:last-child { margin-bottom: 0; }

.message-bubble ul, .message-bubble ol {
  margin: 8px 0 8px 20px;
}
.message-bubble li { margin-bottom: 4px; }

.message-bubble a { color: var(--accent-light); text-decoration: underline; }
.message-bubble a:hover { color: var(--purple-light); }

.message-bubble strong { font-weight: 600; color: var(--text-primary); }
.message-bubble em { color: var(--text-secondary); }

.message-bubble code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: rgba(0,0,0,0.3);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--purple-light);
}

.message-bubble pre {
  margin: 12px 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #0d1117;
  border: 1px solid rgba(255,255,255,0.08);
}
.message-bubble pre code {
  background: none;
  padding: 14px 16px;
  display: block;
  font-size: 0.83rem;
  overflow-x: auto;
  color: inherit;
  border-radius: 0;
}

.message-bubble blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 14px;
  margin: 10px 0;
  color: var(--text-secondary);
}

.message-bubble table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 0.875rem;
  display: block;
  overflow-x: auto;
  white-space: nowrap;
}
.message-bubble th, .message-bubble td {
  padding: 8px 12px;
  border: 1px solid var(--border);
  text-align: left;
}
.message-bubble th { background: rgba(99,102,241,0.08); font-weight: 600; }
.message-bubble tr:nth-child(even) { background: rgba(255,255,255,0.02); }

/* Tool call cards */
.tool-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(6,182,212,0.06);
  border: 1px solid rgba(6,182,212,0.2);
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  color: var(--tool-color);
  margin-bottom: 8px;
  animation: toolCardIn 0.25s ease;
}
@keyframes toolCardIn {
  from { opacity: 0; transform: scale(0.98); }
  to   { opacity: 1; transform: scale(1); }
}
.tool-card svg { flex-shrink: 0; margin-top: 2px; }
.tool-card-content { min-width: 0; }
.tool-card-title { font-weight: 600; margin-bottom: 2px; }
.tool-card-args {
  color: rgba(6,182,212,0.7);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tool-result-card {
  background: rgba(16,185,129,0.06);
  border-color: rgba(16,185,129,0.2);
  color: var(--success);
}

/* Streaming cursor */
.streaming-cursor::after {
  content: '▋';
  animation: blink 1s step-end infinite;
  color: var(--accent-light);
}
@keyframes blink { 50% { opacity: 0; } }

/* Message meta (tokens, time, TTS) */
.message-meta {
  font-size: 0.7rem;
  color: var(--text-disabled);
  padding: 0 4px;
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Font Controls */
.font-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(99,102,241,0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 2px 4px;
}
.font-btn {
  padding: 4px 8px;
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 4px;
  transition: background var(--transition);
}
.font-btn:hover { background: rgba(99,102,241,0.15); }

/* Play Button */
.tts-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: rgba(99,102,241,0.1);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all var(--transition);
  margin-left: auto;
}
.tts-btn:hover { background: rgba(99,102,241,0.2); color: var(--text-primary); }

/* ── INPUT AREA ───────────────────────────────────────────────── */
.input-area {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  background: rgba(10,10,18,0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  flex-shrink: 0;
}

.agent-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding: 8px 14px;
  background: rgba(99,102,241,0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.825rem;
  color: var(--text-secondary);
}

.status-dots {
  display: flex;
  gap: 4px;
}
.status-dots span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: statusBounce 1.2s ease-in-out infinite;
}
.status-dots span:nth-child(2) { animation-delay: 0.2s; }
.status-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes statusBounce {
  0%, 100% { transform: translateY(0); opacity: 0.4; }
  50% { transform: translateY(-4px); opacity: 1; }
}

.input-wrapper-main {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 10px 12px;
  transition: all var(--transition);
  max-width: 800px;
  margin: 0 auto;
}
.input-wrapper-main:focus-within {
  border-color: var(--accent);
  background: rgba(99,102,241,0.04);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}

.message-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 0.95rem;
  line-height: 1.5;
  resize: none;
  min-height: 24px;
  max-height: 200px;
  overflow-y: auto;
}
.message-input::placeholder { color: var(--text-muted); }

.send-btn {
  width: 40px; height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  color: white;
  border-radius: var(--radius-md);
  transition: all var(--transition);
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(99,102,241,0.3);
}
.send-btn:hover:not(:disabled) {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(99,102,241,0.4);
}
.send-btn:disabled {
  background: rgba(99,102,241,0.2);
  color: var(--text-muted);
  box-shadow: none;
  cursor: not-allowed;
}

.input-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
  padding: 0 4px;
  font-size: 0.72rem;
  color: var(--text-disabled);
  max-width: 800px;
  margin: 6px auto 0;
}

.char-count { font-family: var(--font-mono); }

/* ── MOBILE OVERLAY ───────────────────────────────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 90;
  backdrop-filter: blur(4px);
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  :root { --sidebar-width: 280px; }

  .sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    transform: translateX(-100%);
    transition: transform var(--transition-slow);
    box-shadow: var(--shadow-lg);
  }

  .sidebar.open { transform: translateX(0); }
  .sidebar-toggle-btn { display: flex; }
  .topbar-menu-btn { display: flex; }

  .sidebar-overlay.visible { display: block; }

  .model-info-badge { display: none !important; }

  .messages-inner { padding: 0 12px; }
  .message-bubble { max-width: 95%; }

  .input-area { padding: 12px; }
}

@media (max-width: 480px) {
  .login-card { padding: 24px 20px; }
  .login-title { font-size: 1.6rem; }
  .suggestion-chips { flex-direction: column; align-items: center; }
  .chip { width: 100%; text-align: center; }
  .model-selector-btn { font-size: 0.75rem; padding: 6px 8px; }
  #selected-model-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
}

/* Fix image overflow in markdown content */
.message-bubble img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
  margin: 10px 0;
}

/* MOBILE FIXES */
@media (max-width: 768px) {
  body, html, .chat-page, .chat-layout {
    max-width: 100vw;
    overflow-x: hidden;
  }
  .messages-area, .messages-inner, .message-group {
    max-width: 100vw;
    overflow-x: hidden;
  }
  .message-bubble {
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: calc(100vw - 32px) !important;
  }
  .message-bubble pre, .message-bubble table {
    max-width: 100%;
    overflow-x: auto;
  }
  .main-content {
    max-width: 100vw;
    overflow-x: hidden;
  }
  /* Fix bottom nav overlap by adding padding-bottom to chat input container if needed */
  .chat-input-container {
    padding-bottom: env(safe-area-inset-bottom, 20px) !important;
  }
}


/* ═══════════════════════════════════════════════════════════════
   MOBİL DÜZELTMELER (tüm sayfalar)
   ═══════════════════════════════════════════════════════════════ */
/* 100vh mobil tarayıcılarda adres çubuğu yüzünden ekrandan taşar; dinamik yükseklik kullan */
@supports (height: 100dvh) {
  [style*="height:100vh"]:not([style*="min-height:100vh"]),
  [style*="height: 100vh"]:not([style*="min-height: 100vh"]) { height: 100dvh !important; }
  [style*="min-height:100vh"], [style*="min-height: 100vh"] { min-height: 100dvh !important; }
}

@media (max-width: 768px) {
  /* iOS, 16px'ten küçük yazılı alanlara odaklanınca sayfayı yakınlaştırır */
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
  select, textarea, .form-input, .message-input { font-size: 16px !important; }

  /* Sabit 2-4 sütunlu satır içi grid'ler mobilde tek sütuna insin */
  [style*="grid-template-columns:1fr 1fr"],
  [style*="grid-template-columns: 1fr 1fr"],
  [style*="grid-template-columns:repeat(3"],
  [style*="grid-template-columns: repeat(3"],
  [style*="grid-template-columns:180px"],
  [style*="grid-template-columns: 380px"] { grid-template-columns: 1fr !important; }

  /* Geniş tablolar sayfayı yatay kaydırmasın, kendi içinde kaysın */
  main table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* Uzun başlıklı header'lar sığsın */
  main header:not(.chat-topbar) { flex-wrap: wrap; }

  .api-key-banner { font-size: 0.8125rem; }
}

@media (max-width: 480px) {
  .topbar-right { gap: 6px; }
  .font-controls { display: none; }
  .topbar-title { font-size: 0.95rem; }
  .share-dialog { padding: 16px; }
  .share-link-row { flex-direction: column; }
}

/* ── Kayıt: koşul onayı ve yasal bağlantılar ─────────────────── */
.terms-check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--text-secondary); line-height: 1.5; cursor: pointer; }
.terms-check input { width: 18px; height: 18px; margin-top: 1px; flex-shrink: 0; accent-color: var(--accent); }
.terms-check a { text-decoration: underline; text-underline-offset: 2px; }
.auth-legal { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 8px; margin-top: 14px; font-size: 12.5px; color: var(--text-muted); }
.auth-legal a { color: var(--text-secondary); }
.auth-legal a:hover { color: var(--text-primary); }

/* ── Dil seçici ────────────────────────────────────────────── */
.lang-menu { position: relative; }
.lang-menu summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 10px; border-radius: 9px; color: var(--text-secondary); font-size: 14px; font-weight: 500;
  border: 1px solid transparent;
}
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary:hover, .lang-menu[open] summary { color: var(--text-primary); background: rgba(255,255,255,.04); border-color: rgba(148,163,184,.12); }
.lang-menu-list {
  position: absolute; inset-inline-end: 0; top: calc(100% + 6px); z-index: 30; min-width: 170px;
  list-style: none; margin: 0; padding: 6px; display: grid; gap: 2px;
  background: #11111f; border: 1px solid var(--border-hover); border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0,0,0,.45);
}
.lang-menu-list a, .lang-menu-list button {
  display: block; width: 100%; text-align: start; padding: 8px 12px; border-radius: 8px;
  color: var(--text-secondary); font: 500 14px/1.3 var(--font-sans); text-decoration: none; background: none; border: 0; cursor: pointer;
}
.lang-menu-list a:hover, .lang-menu-list button:hover { color: var(--text-primary); background: rgba(99,102,241,.12); }
.lang-menu-list [aria-current="true"] { color: var(--text-primary); background: rgba(99,102,241,.16); }
/* Kenar çubuğunda yukarı açılır, tam genişlikte */
.lang-menu.up { width: 100%; }
.lang-menu.up summary { width: 100%; padding: 8px 10px; font-size: 0.825rem; border-radius: var(--radius-md); }
.lang-menu.up .lang-menu-list { top: auto; bottom: calc(100% + 6px); inset-inline-start: 0; inset-inline-end: auto; }
/* Giriş/kayıt sayfasında sağ üst köşe */
.auth-lang { position: fixed; top: 14px; inset-inline-end: 14px; z-index: 20; }

/* ═══════════════════════════════════════════════════════════════
   PORTFÖY / PARA YÖNETİMİ SAYFALARI
   ═══════════════════════════════════════════════════════════════ */
.pf-page {
  flex: 1; padding: 20px; overflow-y: auto; overflow-x: hidden;
  height: 100vh; height: 100dvh; -webkit-overflow-scrolling: touch; box-sizing: border-box;
}
.pf-page main { min-width: 0; }

/* Aksiyon butonları: masaüstünde sarılır, mobilde yatay kaydırılan şerit olur */
.pf-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pf-action {
  display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0;
  padding: 8px 16px; border-radius: 10px; white-space: nowrap;
  font-size: 0.875rem; font-weight: 500; text-decoration: none; cursor: pointer;
  border: 1px solid var(--border); background: var(--bg-secondary); color: var(--text-primary);
  transition: transform .15s, background .15s, border-color .15s;
}
.pf-action:hover { border-color: var(--border-hover, var(--border)); }
.pf-action:active { transform: scale(.97); }
.pf-action--primary { background: var(--primary); border-color: transparent; color: #fff; }
.pf-action--indigo { background: rgba(99,102,241,.12); border-color: rgba(99,102,241,.3); color: #818cf8; }
.pf-action--amber { background: rgba(245,158,11,.12); border-color: rgba(245,158,11,.3); color: #f59e0b; }
.pf-action--danger { background: rgba(239,68,68,.1); border-color: rgba(239,68,68,.3); color: #ef4444; }
.pf-action--sm { padding: 6px 12px; font-size: 0.8125rem; border-radius: 8px; }

/* Nakit kartı: yatır / çek / aktar */
.pf-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 3px; margin-top: 12px;
  background: var(--bg-primary); border: 1px solid var(--border); border-radius: 9px; }
.pf-seg input { position: absolute; opacity: 0; pointer-events: none; }
.pf-seg label { text-align: center; padding: 6px 4px; border-radius: 7px; font-size: 0.75rem; font-weight: 600;
  color: var(--text-secondary); cursor: pointer; user-select: none; transition: background .15s, color .15s; white-space: nowrap; }
.pf-seg input:checked + label { background: var(--bg-secondary); color: var(--text-primary); box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.pf-seg input[value="deposit"]:checked + label { color: #22c55e; }
.pf-seg input[value="withdraw"]:checked + label { color: #ef4444; }
.pf-seg input[value="transfer"]:checked + label { color: #818cf8; }
.pf-seg input:focus-visible + label { outline: 2px solid var(--primary); outline-offset: 1px; }
.pf-cash-row { display: flex; gap: 6px; margin-top: 8px; }
.pf-cash-row input { flex: 1; min-width: 0; padding: 8px 10px; border-radius: 7px; border: 1px solid var(--border);
  background: var(--bg-primary); color: var(--text-primary); font-size: 0.8125rem; }
.pf-cash-row button { padding: 8px 12px; border-radius: 7px; border: none; cursor: pointer; font-size: 0.8125rem;
  font-weight: 600; background: var(--primary); color: #fff; white-space: nowrap; }
.pf-cash-row .pf-all { background: var(--bg-primary); color: var(--text-secondary); border: 1px solid var(--border); }
.pf-cash-hint { margin-top: 8px; font-size: 0.72rem; color: var(--text-muted); line-height: 1.4; }
.pf-cash-hint a { color: #818cf8; text-decoration: none; }

/* Nakit hareketleri listesi */
.pf-move { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--border); }
.pf-move-icon { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: .9rem; }
.pf-move-info { flex: 1; min-width: 0; }
.pf-move-title { font-size: .8125rem; font-weight: 600; color: var(--text-primary); }
.pf-move-desc { font-size: .75rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-move-amt { text-align: right; font-weight: 700; font-size: .875rem; white-space: nowrap; }
.pf-move-date { font-size: .7rem; color: var(--text-muted); font-weight: 400; }

@media (max-width: 768px) {
  .pf-page { padding: 14px 12px calc(28px + env(safe-area-inset-bottom, 0px)); }
  .pf-page main > header h2 { font-size: 1.25rem; }

  /* Başlıktaki buton şeridi tam genişlik, yatay kaydırılabilir ve kenarları yumuşak solar */
  .pf-page main > header .pf-actions { flex-basis: 100%; }
  .pf-actions.pf-scroll {
    flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x proximity; scroll-padding-inline: 12px; scrollbar-width: none;
    margin-inline: -12px; padding: 2px 12px 6px; width: calc(100% + 24px); box-sizing: border-box;
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 12px, #000 calc(100% - 28px), transparent 100%);
            mask-image: linear-gradient(to right, transparent 0, #000 12px, #000 calc(100% - 28px), transparent 100%);
  }
  .pf-actions.pf-scroll::-webkit-scrollbar { display: none; }
  .pf-actions.pf-scroll > * { scroll-snap-align: start; }
  .pf-action { padding: 9px 14px; }
}

/* Tablolar mobilde kart görünümüne geçer */
@media (max-width: 640px) {
  main table.pf-table { display: block; min-width: 0 !important; overflow: visible; }
  .pf-table thead { display: none; }
  .pf-table tbody { display: block; }
  .pf-table tr { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; padding: 14px 16px; }
  .pf-table td { display: block; padding: 0 !important; text-align: left !important; min-width: 0; max-width: none !important; }
  .pf-table td[data-label]::before {
    content: attr(data-label); display: block; margin-bottom: 3px;
    font-size: 0.6875rem; letter-spacing: .4px; text-transform: uppercase; color: var(--text-muted); font-weight: 500;
  }
  .pf-table td.pf-full { grid-column: 1 / -1; }
  .pf-table td.pf-head { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
  .pf-table td.pf-note { white-space: normal !important; }
  .pf-table td.pf-full .pf-actions { justify-content: flex-start !important; }
  .pf-table td.pf-full .pf-actions > * { flex: 1; justify-content: center; }
  .pf-table td.pf-empty { grid-column: 1 / -1; text-align: center !important; padding: 28px 8px !important; }

  .pf-move { padding: 12px 14px; }
}

/* Dokunmatik/mobil cihazlarda klavye kısayolu ipucu anlamsız */
@media (max-width: 768px), (hover: none) and (pointer: coarse) {
  .input-hint { display: none; }
}

/* markan Ads in the chat sidebar */
.sidebar-ad { margin: 16px 8px 8px; }
.sidebar-ad:not(.mk-ad-filled) { display: none; }

/* markan Ads between chat answers and on content pages (hidden until an ad is available) */
.chat-ad, .page-ad { display: none; }
.chat-ad.mk-ad-filled { display: block; max-width: 640px; margin: 4px 0 20px; }
.page-ad.mk-ad-filled { display: block; max-width: 720px; margin: 0 0 24px; }
