﻿/* ═══════════════════════════════════════════════════════════
   Glomax GPT — Ultra Modern UI Katmanı v3
   Özgün yenilikler: Glassmorphism, Particle BG, AI Glow,
   Micro-animations, Command Palette, Floating Toolbar,
   Smart Reactions, Ambient Mode, Haptic-style Feedback
   Tüm cihazlarla tam uyumlu (mobile-first)
═══════════════════════════════════════════════════════════ */

/* ── Ek CSS Değişkenleri ─────────────────────────────────── */
:root {
  /* Gemini Renk Paleti */
  --gem-blue:       #333333;
  --gem-purple:     #444444;
  --gem-pink:       #555555;
  --gem-cyan:       #444444;
  --gem-green:      #10B981;
  --gem-indigo:     #444444;

  /* Ambient / Glow — Gemini tonları */
  --glow-primary:   0 0 40px rgba(60,60,60,0.28);
  --glow-ai:        0 0 60px rgba(60,60,60,0.22);
  --glow-success:   0 0 30px rgba(16,185,129,0.2);

  /* Gradient paleti — Gemini tarzı */
  --grad-aurora:    linear-gradient(135deg, #3A3A3A 0%, #050816 100%);
  --grad-sunset:    linear-gradient(135deg, #3A3A3A 0%, #050816 100%);
  --grad-ocean:     linear-gradient(135deg, #3A3A3A 0%, #050816 100%);
  --grad-forest:    linear-gradient(135deg, #3A3A3A 0%, #050816 100%);
  --grad-cosmic:    linear-gradient(135deg, #3A3A3A 0%, #050816 100%);

  /* Blur layers */
  --blur-xs:   blur(4px);
  --blur-sm:   blur(8px);
  --blur-md:   blur(16px);
  --blur-lg:   blur(32px);
  --blur-xl:   blur(64px);

  /* Timing */
  --ease-bounce:  cubic-bezier(0.34,1.56,0.64,1);
  --ease-out:     cubic-bezier(0.0,0.0,0.2,1);
  --ease-in-out:  cubic-bezier(0.4,0.0,0.2,1);
  --ease-spring:  cubic-bezier(0.175,0.885,0.32,1.275);

  /* Z-index scale */
  --z-particles: -1;
  --z-ambient:    0;
  --z-content:   10;
  --z-topbar:   100;
  --z-sidebar:  200;
  --z-fab:      300;
  --z-modal:    400;
  --z-cmd:      500;
  --z-toast:    600;
  --z-preview:  700;

  /* Sizes */
  --fab-size:     52px;
  --reaction-h:   36px;
}

[data-theme="dark"] {
  --glow-primary:  0 0 60px rgba(60,60,60,0.4);
  --glow-ai:       0 0 80px rgba(60,60,60,0.3);
  --particle-col:  rgba(60,60,60,0.35);
  --ambient-col:   rgba(60,60,60,0.05);
}
[data-theme="light"] {
  --particle-col:  rgba(60,60,60,0.18);
  --ambient-col:   rgba(60,60,60,0.03);
}

/* ══════════════════════════════════════════════════════════
   1. CANVAS ARKA PLAN + AMBIENT ORBS
══════════════════════════════════════════════════════════ */

/* Canvas particle sistemi */
#gx-canvas-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

/* Eski div-particle sistemi (artık kullanılmıyor, fallback) */
#gx-particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}
.gx-particle {
  position: absolute;
  border-radius: 50%;
  background: var(--particle-col);
  animation: particleDrift linear infinite;
  will-change: transform, opacity;
}
@keyframes particleDrift {
  0%   { transform: translateY(100vh) scale(0); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 0.6; }
  100% { transform: translateY(-10vh) scale(1.2); opacity: 0; }
}

/* ── Ambient glow orbs — her zaman görünür ── */
#gx-ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}
.gx-ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0;
  animation: orbPulse 20s ease-in-out infinite alternate;
  will-change: transform, opacity;
}
[data-theme="dark"] .gx-ambient-orb {
  opacity: 0;
  animation: orbPulseDark 20s ease-in-out infinite alternate;
}
.gx-ambient-orb:nth-child(1) {
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(60,60,60,0.45) 0%, rgba(60,60,60,0.15) 50%, transparent 70%);
  top: -250px; right: -150px;
  animation-delay: 0s;
}
.gx-ambient-orb:nth-child(2) {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(60,60,60,0.35) 0%, rgba(60,60,60,0.12) 50%, transparent 70%);
  bottom: -150px; left: -120px;
  animation-delay: 7s;
}
.gx-ambient-orb:nth-child(3) {
  width: 380px; height: 380px;
  background: radial-gradient(circle, rgba(60,60,60,0.3) 0%, rgba(60,60,60,0.1) 50%, transparent 70%);
  top: 35%; left: 38%;
  animation-delay: 14s;
}

/* Light mode — hafif görünür */
[data-theme="light"] .gx-ambient-orb:nth-child(1) { opacity: 0.18; }
[data-theme="light"] .gx-ambient-orb:nth-child(2) { opacity: 0.14; }
[data-theme="light"] .gx-ambient-orb:nth-child(3) { opacity: 0.10; }

/* Dark mode — daha belirgin */
[data-theme="dark"] .gx-ambient-orb:nth-child(1) { opacity: 0.22; }
[data-theme="dark"] .gx-ambient-orb:nth-child(2) { opacity: 0.18; }
[data-theme="dark"] .gx-ambient-orb:nth-child(3) { opacity: 0.14; }

/* Tema yoksa (varsayılan light) */
:root:not([data-theme]) .gx-ambient-orb:nth-child(1) { opacity: 0.18; }
:root:not([data-theme]) .gx-ambient-orb:nth-child(2) { opacity: 0.14; }
:root:not([data-theme]) .gx-ambient-orb:nth-child(3) { opacity: 0.10; }

@keyframes orbPulse {
  0%   { transform: scale(1)    translate(0px, 0px);     }
  33%  { transform: scale(1.12) translate(20px, -15px);  }
  66%  { transform: scale(0.95) translate(-10px, 20px);  }
  100% { transform: scale(1.08) translate(15px, -5px);   }
}
@keyframes orbPulseDark {
  0%   { transform: scale(1)    translate(0px, 0px);     }
  33%  { transform: scale(1.15) translate(25px, -20px);  }
  66%  { transform: scale(0.92) translate(-15px, 25px);  }
  100% { transform: scale(1.10) translate(18px, -8px);   }
}

/* ══════════════════════════════════════════════════════════
   2. COMMAND PALETTE (Ctrl+K)
══════════════════════════════════════════════════════════ */
#gx-cmd-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-cmd);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: clamp(60px, 12vh, 120px);
  background: rgba(0,0,0,0.5);
  backdrop-filter: var(--blur-md);
  -webkit-backdrop-filter: var(--blur-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--ease-out);
}
#gx-cmd-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

#gx-cmd-box {
  width: min(640px, 92vw);
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 20px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.3), var(--glow-primary);
  overflow: hidden;
  transform: scale(0.94) translateY(-20px);
  transition: transform 0.25s var(--ease-bounce);
}
#gx-cmd-overlay.open #gx-cmd-box {
  transform: scale(1) translateY(0);
}

.gx-cmd-search {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.gx-cmd-search svg {
  color: var(--text3);
  flex-shrink: 0;
}
#gx-cmd-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 1rem;
  font-family: var(--font);
  color: var(--text);
  font-weight: 500;
}
#gx-cmd-input::placeholder { color: var(--text4); }

.gx-cmd-kbd {
  padding: 3px 7px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 5px;
  font-size: 0.7rem;
  color: var(--text3);
  font-family: var(--font-mono);
  cursor: pointer;
  transition: background 0.15s;
}
.gx-cmd-kbd:hover { background: var(--surface3); }

.gx-cmd-results {
  max-height: min(400px, 55vh);
  overflow-y: auto;
  padding: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--border2) transparent;
}

.gx-cmd-section-label {
  padding: 6px 12px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text4);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.gx-cmd-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.12s, transform 0.12s;
  text-decoration: none;
  color: var(--text);
  font-size: 0.9rem;
}
.gx-cmd-item:hover,
.gx-cmd-item.active {
  background: var(--surface2);
  transform: translateX(3px);
  text-decoration: none;
  color: var(--text);
}
.gx-cmd-item-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--surface3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}
.gx-cmd-item-label { flex: 1; font-weight: 500; }
.gx-cmd-item-sub {
  font-size: 0.75rem;
  color: var(--text4);
}
.gx-cmd-item-badge {
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 0.68rem;
  font-weight: 700;
  background: rgba(60,60,60,0.1);
  color: var(--accent);
}

.gx-cmd-footer {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 20px;
  border-top: 1px solid var(--border);
  background: var(--surface2);
}
.gx-cmd-hint {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  color: var(--text4);
}
.gx-cmd-hint kbd {
  padding: 2px 5px;
  background: var(--surface3);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  border: 1px solid var(--border2);
}

/* ══════════════════════════════════════════════════════════
   3. FLOATING ACTION BUTTON (FAB)
══════════════════════════════════════════════════════════ */
#gx-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: var(--z-fab);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.gx-fab-main {
  width: var(--fab-size);
  height: var(--fab-size);
  border-radius: 50%;
  background: linear-gradient(135deg, #3A3A3A 0%, #050816 100%);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(60,60,60,0.45), var(--glow-primary);
  transition: all 0.25s var(--ease-bounce);
  position: relative;
  z-index: 1;
}
.gx-fab-main:hover {
  transform: scale(1.1) rotate(45deg);
  box-shadow: 0 12px 32px rgba(60,60,60,0.55), 0 4px 16px rgba(60,60,60,0.3);
}
.gx-fab-main.open { transform: scale(1.05) rotate(45deg); }

.gx-fab-menu {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  overflow: hidden;
}
.gx-fab-item {
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transform: translateY(20px) scale(0.8);
  transition: all 0.2s var(--ease-bounce);
  pointer-events: none;
}
.gx-fab-item.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.gx-fab-item:nth-child(1) { transition-delay: 0.05s; }
.gx-fab-item:nth-child(2) { transition-delay: 0.10s; }
.gx-fab-item:nth-child(3) { transition-delay: 0.15s; }
.gx-fab-item:nth-child(4) { transition-delay: 0.20s; }

.gx-fab-item-label {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 8px;
  padding: 5px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
}
.gx-fab-item-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border2);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: all 0.18s var(--ease-bounce);
  text-decoration: none;
}
.gx-fab-item-btn:hover {
  background: linear-gradient(135deg, #3A3A3A 0%, #050816 100%);
  color: #fff;
  border-color: #333333;
  transform: scale(1.12);
  box-shadow: 0 6px 20px rgba(60,60,60,0.4);
}

/* FAB'ı chat ekranında gizle, diğer sayfalarda göster */
.messages-container ~ * #gx-fab { display: none; }

/* ══════════════════════════════════════════════════════════
   4. MESAJ REAKSIYON SİSTEMİ
══════════════════════════════════════════════════════════ */
/* .gx-reactions artık .message-actions-bar içinde — mesaj dışında, hemen altında */
.gx-reactions {
  display: flex;
  align-items: center;
  gap: 4px;
  height: var(--reaction-h);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s, transform 0.2s var(--ease-bounce);
  pointer-events: none;
}
.message:focus-within .gx-reactions {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.gx-reaction-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--surface2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.18s var(--ease-bounce);
  position: relative;
}
.gx-reaction-btn:hover {
  background: var(--surface3);
  transform: scale(1.2) translateY(-2px);
  border-color: var(--border2);
}
.gx-reaction-btn.active {
  background: rgba(60,60,60,0.1);
  border-color: rgba(60,60,60,0.4);
}
.gx-reaction-btn .gx-reaction-count {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 16px;
  height: 16px;
  background: var(--accent);
  color: #fff;
  border-radius: 10px;
  font-size: 0.6rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  animation: popIn 0.2s var(--ease-bounce);
}
@keyframes popIn {
  from { transform: scale(0); }
  to   { transform: scale(1); }
}

/* ── Emoji picker mini ── */
.gx-emoji-picker {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 14px;
  padding: 8px;
  display: flex;
  gap: 4px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transform: scale(0.8) translateY(10px);
  transform-origin: bottom left;
  transition: all 0.2s var(--ease-bounce);
  z-index: 10;
  white-space: nowrap;
}
.gx-emoji-picker.open {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1) translateY(0);
}
.gx-emoji-opt {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all 0.15s var(--ease-bounce);
  background: transparent;
  border: none;
}
.gx-emoji-opt:hover {
  background: var(--surface2);
  transform: scale(1.3) translateY(-3px);
}

/* ══════════════════════════════════════════════════════════
   5. AI YAZMA / DÜŞÜNME ANİMASYONU (Gelişmiş)
══════════════════════════════════════════════════════════ */
.gx-thinking {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: fit-content;
  max-width: 200px;
}
.gx-thinking-dots {
  display: flex;
  gap: 5px;
}
.gx-thinking-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: thinkPulse 1.4s ease-in-out infinite;
}
.gx-thinking-dot:nth-child(1) { animation-delay: 0s; }
.gx-thinking-dot:nth-child(2) { animation-delay: 0.2s; }
.gx-thinking-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes thinkPulse {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40%            { transform: scale(1.1); opacity: 1; }
}
.gx-thinking-text {
  font-size: 0.8rem;
  color: var(--text3);
  font-weight: 500;
  animation: thinkTextCycle 3s ease-in-out infinite;
}
@keyframes thinkTextCycle {
  0%,100% { opacity: 1; }
  45%,55% { opacity: 0.4; }
}

/* ── Streaming cursor ── */
.gx-stream-cursor {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: var(--accent);
  border-radius: 1px;
  margin-left: 2px;
  vertical-align: middle;
  animation: cursorBlink 0.8s step-end infinite;
}
@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ── AI Glow efekti — streaming sırasında ── */
.message.assistant.streaming .message-content {
  box-shadow: var(--glow-ai);
  border-color: rgba(60,60,60,0.25) !important;
  transition: box-shadow 0.3s;
}

/* ══════════════════════════════════════════════════════════
   6. MODEL SEÇICI — Glassmorphism Dropdown
══════════════════════════════════════════════════════════ */
#gx-model-picker {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  z-index: var(--z-modal);
  width: min(720px, 95vw);
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 24px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.25), var(--glow-primary);
  backdrop-filter: var(--blur-md);
  -webkit-backdrop-filter: var(--blur-md);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s var(--ease-bounce);
  overflow: hidden;
}
#gx-model-picker.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.gx-mp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--border);
}
.gx-mp-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.gx-mp-close {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
}
.gx-mp-close:hover { background: var(--surface2); color: var(--text); }

.gx-mp-search {
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
}
.gx-mp-search input {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 0.875rem;
  color: var(--text);
  font-family: var(--font);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.gx-mp-search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(100,100,100,0.12);
}

.gx-mp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
  padding: 12px;
  max-height: min(320px, 50vh);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border2) transparent;
}

.gx-mp-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  background: var(--surface2);
  cursor: pointer;
  transition: all 0.18s var(--ease-bounce);
  position: relative;
  overflow: hidden;
}
.gx-mp-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent-grad);
  opacity: 0;
  transition: opacity 0.2s;
}
.gx-mp-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(100,100,100,0.15);
}
.gx-mp-card:hover::before { opacity: 0.04; }
.gx-mp-card.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.gx-mp-card.locked {
  opacity: 0.55;
  cursor: not-allowed;
}
.gx-mp-card.locked:hover {
  transform: none;
  box-shadow: none;
}

.gx-mp-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.gx-mp-provider-icon {
  width: 28px; height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface3);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text2);
  overflow: hidden;
}
.gx-mp-badges {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.gx-mp-badge {
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.gx-mp-badge-vision {
  background: var(--bg-hover);
  color: var(--text-secondary);
}
.gx-mp-badge-image {
  background: var(--bg-hover);
  color: var(--text-secondary);
}
.gx-mp-badge-fast {
  background: var(--bg-hover);
  color: var(--text-secondary);
}
.gx-mp-badge-pro {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.gx-mp-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}
.gx-mp-desc {
  font-size: 0.72rem;
  color: var(--text4);
  line-height: 1.4;
}

/* ── Aktif model bar (input alanı üzerinde) ── */
#gx-model-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  margin-bottom: 6px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.18s var(--ease-bounce);
  width: fit-content;
  max-width: 100%;
  display: none; /* Başlangıçta gizli */
}
#gx-model-bar:hover {
  background: var(--surface3);
  border-color: var(--accent);
  transform: translateY(-1px);
}
.gx-mb-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: mbDotPulse 2s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes mbDotPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(100,100,100,0.4); }
  50%       { box-shadow: 0 0 0 5px rgba(100,100,100,0); }
}
.gx-mb-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}
.gx-mb-arrow {
  color: var(--text4);
  flex-shrink: 0;
  transition: transform 0.2s;
}
#gx-model-picker.open ~ * .gx-mb-arrow,
#gx-model-bar.active .gx-mb-arrow {
  transform: rotate(180deg);
}

/* ══════════════════════════════════════════════════════════
   7. KLAVYE KISAYOLLARI PANELI
══════════════════════════════════════════════════════════ */
#gx-shortcuts-panel {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.45);
  backdrop-filter: var(--blur-sm);
  -webkit-backdrop-filter: var(--blur-sm);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
#gx-shortcuts-panel.open {
  opacity: 1;
  pointer-events: auto;
}
.gx-shortcuts-box {
  width: min(560px, 90vw);
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform: scale(0.9);
  transition: transform 0.25s var(--ease-bounce);
}
#gx-shortcuts-panel.open .gx-shortcuts-box {
  transform: scale(1);
}
.gx-shortcuts-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
}
.gx-shortcuts-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}
.gx-shortcuts-close {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text3);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
}
.gx-shortcuts-close:hover { background: var(--surface3); color: var(--text); }

.gx-shortcuts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  padding: 12px;
  max-height: min(440px, 70vh);
  overflow-y: auto;
}
.gx-shortcut-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--surface2);
}
.gx-shortcut-label {
  font-size: 0.82rem;
  color: var(--text2);
  font-weight: 500;
}
.gx-shortcut-keys {
  display: flex;
  gap: 3px;
  align-items: center;
  flex-shrink: 0;
}
.gx-shortcut-keys kbd {
  padding: 3px 7px;
  background: var(--surface3);
  border: 1px solid var(--border2);
  border-bottom: 2px solid var(--border2);
  border-radius: 5px;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--text2);
  font-weight: 600;
  white-space: nowrap;
}
.gx-shortcut-keys .gx-key-sep {
  font-size: 0.65rem;
  color: var(--text4);
}

/* ══════════════════════════════════════════════════════════
   8. MESAJ DÜZENLEME / IN-LINE EDIT
══════════════════════════════════════════════════════════ */
.gx-edit-area {
  width: 100%;
  background: var(--input-bg);
  border: 1.5px solid var(--accent);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 0.925rem;
  font-family: var(--font);
  color: var(--text);
  resize: vertical;
  min-height: 60px;
  outline: none;
  transition: box-shadow 0.15s;
  box-shadow: 0 0 0 3px rgba(100,100,100,0.12);
}
.gx-edit-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  justify-content: flex-end;
}
.gx-edit-save {
  padding: 6px 16px;
  border-radius: 8px;
  background: var(--accent-grad);
  border: none;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s var(--ease-bounce);
}
.gx-edit-save:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(100,100,100,0.35);
}
.gx-edit-cancel {
  padding: 6px 14px;
  border-radius: 8px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  color: var(--text2);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.gx-edit-cancel:hover { background: var(--surface3); }

/* ══════════════════════════════════════════════════════════
   9. KONUŞMA ARAMA — Gelişmiş
══════════════════════════════════════════════════════════ */
.gx-search-highlight {
  background: rgba(100,100,100,0.2);
  color: var(--accent);
  border-radius: 2px;
  padding: 0 1px;
  font-weight: 600;
}

/* ══════════════════════════════════════════════════════════
   10. TOPBAR — Glassmorphism & Scroll-aware
══════════════════════════════════════════════════════════ */
.topbar {
  position: sticky;
  top: 0;
  transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
  will-change: background;
}
.topbar.scrolled {
  background: var(--glass-bg) !important;
  backdrop-filter: var(--blur-md) !important;
  -webkit-backdrop-filter: var(--blur-md) !important;
  border-bottom: 1px solid var(--glass-border) !important;
  box-shadow: 0 2px 20px rgba(0,0,0,0.06) !important;
}

/* ── Model bilgi badge (topbar) ── */
.gx-topbar-model {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--surface2);
  border: 1px solid var(--border);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text2);
  cursor: pointer;
  transition: all 0.18s var(--ease-bounce);
}
.gx-topbar-model:hover {
  background: var(--accent-soft);
  border-color: rgba(100,100,100,0.3);
  color: var(--accent);
}
.gx-topbar-model-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  animation: mbDotPulse 2s infinite;
}

/* ══════════════════════════════════════════════════════════
   11. WELCOME EKRANI — Aurora Başlık
══════════════════════════════════════════════════════════ */
.welcome-screen {
  position: relative;
  overflow: hidden;
}

/* Aurora başlık animasyonu — devre dışı, premium-ui.css yönetiyor */
#welcome-greeting {
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: var(--text);
  background-clip: unset;
  color: var(--text);
  animation: none;
}

/* ── Suggestion pills — yeni tasarım ── */
.suggestion-pill {
  position: relative;
  overflow: hidden;
}
.suggestion-pill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent-grad);
  opacity: 0;
  transition: opacity 0.2s;
  border-radius: inherit;
}
.suggestion-pill:hover::after { opacity: 0.06; }

/* ── Stats satırı karşılama ekranında ── */
.gx-welcome-stats {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 8px;
}
.gx-welcome-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.gx-welcome-stat-num {
  font-size: 1.25rem;
  font-weight: 800;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.03em;
}
.gx-welcome-stat-label {
  font-size: 0.7rem;
  color: var(--text4);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

/* ══════════════════════════════════════════════════════════
   12. CHAT DIŞA AKTARMA BUTONU
══════════════════════════════════════════════════════════ */
.gx-export-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 9px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  color: var(--text2);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s var(--ease-bounce);
  white-space: nowrap;
}
.gx-export-btn:hover {
  background: var(--accent-soft);
  border-color: rgba(100,100,100,0.3);
  color: var(--accent);
  transform: translateY(-1px);
}

/* ══════════════════════════════════════════════════════════
   13. MESAJ KOPİYA / PAYLAŞ ARAÇ ÇUBUĞU
══════════════════════════════════════════════════════════ */
.gx-msg-toolbar {
  display: flex;
  align-items: center;
  gap: 3px;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.18s, transform 0.18s var(--ease-bounce);
  pointer-events: none;
}
.message:focus-within .gx-msg-toolbar {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.gx-msg-tool-btn {
  width: 28px; height: 28px;
  border-radius: 7px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text3);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.15s var(--ease-bounce);
  font-size: 0.72rem;
}
.gx-msg-tool-btn:hover {
  background: var(--surface3);
  color: var(--accent);
  transform: scale(1.12);
}
.gx-msg-tool-btn.copied {
  background: var(--bg-hover);
  border-color: var(--border-subtle);
  color: var(--success);
}

/* ══════════════════════════════════════════════════════════
   14. TOKEN / KARAKTER SAYACI — Gelişmiş
══════════════════════════════════════════════════════════ */
.gx-token-ring {
  position: relative;
  width: 28px; height: 28px;
  flex-shrink: 0;
}
.gx-token-ring svg {
  transform: rotate(-90deg);
}
.gx-token-ring-bg {
  fill: none;
  stroke: var(--surface3);
  stroke-width: 2.5;
}
.gx-token-ring-fill {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 75.4;
  stroke-dashoffset: 75.4;
  transition: stroke-dashoffset 0.4s var(--ease-out),
              stroke 0.3s;
}
.gx-token-ring.warn .gx-token-ring-fill { stroke: var(--warning); }
.gx-token-ring.danger .gx-token-ring-fill { stroke: var(--error); }

/* ══════════════════════════════════════════════════════════
   15. SIDEBAR — Gelişmiş Animasyonlar
══════════════════════════════════════════════════════════ */

/* Konuşma listesi item hover efekti */
.conv-item {
  position: relative;
  overflow: hidden;
}
.conv-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: var(--accent-grad);
  transition: width 0.2s var(--ease-out);
  border-radius: 0 3px 3px 0;
}
.conv-item:hover::before { width: 3px; }
.conv-item.active::before { width: 3px; }

/* ── Pin/Favori badge ── */
.gx-conv-pin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--bg-hover);
  color: var(--text-secondary);
  font-size: 0.6rem;
  flex-shrink: 0;
}

/* ── Kullanım çubuğu animasyonu ── */
.usage-bar-wrap {
  position: relative;
}
.usage-fill {
  position: relative;
  overflow: hidden;
}
.usage-fill::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255,255,255,0.3) 50%,
    transparent 100%);
  animation: usageSheen 2.5s ease-in-out infinite;
}
@keyframes usageSheen {
  to { left: 200%; }
}

/* ══════════════════════════════════════════════════════════
   16. KOD EDITÖRÜ — Dark Glass Header
══════════════════════════════════════════════════════════ */
.code-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px !important;
  background: rgba(15,15,25,0.95) !important;
  border-radius: 12px 12px 0 0;
  position: relative;
}
/* macOS trafik ışığı noktaları */
.code-header::before {
  content: '';
  display: flex;
  width: 48px; height: 12px;
  background:
    radial-gradient(circle 5px at 6px 6px, #ff5f57 100%, transparent 0),
    radial-gradient(circle 5px at 22px 6px, #ffbd2e 100%, transparent 0),
    radial-gradient(circle 5px at 38px 6px, #28c840 100%, transparent 0);
  flex-shrink: 0;
  border-radius: 6px;
}
.code-lang-label {
  flex: 1;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(255,255,255,0.5);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

/* ══════════════════════════════════════════════════════════
   17. PROGRESS BAR — Sayfa yükleme
══════════════════════════════════════════════════════════ */
#gx-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--accent-grad);
  z-index: 9999;
  transition: width 0.3s var(--ease-out);
  border-radius: 0 3px 3px 0;
  box-shadow: var(--glow-primary);
}
#gx-progress-bar.done {
  opacity: 0;
  transition: width 0.3s, opacity 0.5s 0.2s;
}

/* ══════════════════════════════════════════════════════════
   18. SCROLL-TO-TOP BUTONU — Gelişmiş
══════════════════════════════════════════════════════════ */
#gx-scroll-top {
  position: fixed;
  bottom: 90px;
  right: 24px;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border2);
  color: var(--text2);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow);
  z-index: var(--z-fab);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: all 0.25s var(--ease-bounce);
}
#gx-scroll-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
#gx-scroll-top:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(100,100,100,0.4);
}

/* ══════════════════════════════════════════════════════════
   19. CONTEXTUAL TOOLTIP
══════════════════════════════════════════════════════════ */
[data-gx-tip] {
  position: relative;
}
[data-gx-tip]::after {
  content: attr(data-gx-tip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 7px;
  padding: 5px 9px;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text2);
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s, transform 0.18s var(--ease-bounce);
  z-index: 100;
}
[data-gx-tip]:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ══════════════════════════════════════════════════════════
   20. DARK MODE ÖZEL GLASSmorphism
══════════════════════════════════════════════════════════ */
[data-theme="dark"] #gx-cmd-box,
[data-theme="dark"] #gx-model-picker,
[data-theme="dark"] .gx-shortcuts-box {
  background: rgba(30,30,30,0.92);
  border-color: rgba(255,255,255,0.06);
}

[data-theme="dark"] .gx-mp-card {
  background: rgba(36,36,36,0.85);
}

[data-theme="dark"] .gx-fab-item-btn {
  background: rgba(30,30,30,0.9);
  border-color: rgba(255,255,255,0.08);
}

/* ══════════════════════════════════════════════════════════
   21. MOBİL — Full responsive (320px+)
══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  /* Command palette — tam genişlik */
  #gx-cmd-box { width: 95vw; border-radius: 16px; }
  #gx-cmd-overlay { padding-top: 40px; }

  /* FAB — küçük, input alanının üstünde */
  #gx-fab { bottom: 170px; right: 16px; }
  .gx-fab-main { width: 46px; height: 46px; }

  /* Model picker — bottom sheet */
  #gx-model-picker {
    bottom: 0;
    left: 0;
    right: 0;
    transform: translateY(100%);
    width: 100%;
    border-radius: 24px 24px 0 0;
    max-height: 80vh;
  }
  #gx-model-picker.open {
    transform: translateY(0);
  }
  .gx-mp-grid {
    grid-template-columns: 1fr 1fr;
    max-height: 45vh;
  }

  /* Kısayollar paneli */
  .gx-shortcuts-grid { grid-template-columns: 1fr; }
  .gx-shortcuts-box { border-radius: 20px; margin: 0 12px; }

  /* Welcome stats — gizle küçük ekranda */
  .gx-welcome-stats { gap: 12px; }
  .gx-welcome-stat-num { font-size: 1rem; }

  /* Scroll top */
  #gx-scroll-top { bottom: 80px; right: 12px; }

  /* Progress bar */
  #gx-progress-bar { height: 2px; }

  /* Canvas + Particles — mobilde azalt */
  #gx-canvas-bg { opacity: 0.6; }
  #gx-particles { opacity: 0.5; }
  #gx-ambient .gx-ambient-orb { opacity: 0.08 !important; }

  /* Tooltip — mobilde gizle */
  [data-gx-tip]::after { display: none; }
}

@media (max-width: 480px) {
  .gx-mp-grid { grid-template-columns: 1fr; }
  .gx-cmd-results { max-height: 45vh; }
  #gx-cmd-box { border-radius: 14px; }
  .gx-shortcut-item {
    padding: 8px 10px;
  }
  .gx-shortcut-label { font-size: 0.75rem; }
  .gx-shortcuts-title { font-size: 0.9rem; }
}

/* ══════════════════════════════════════════════════════════
   22. PRINT OVERRIDE
══════════════════════════════════════════════════════════ */
@media print {
  #gx-canvas-bg, #gx-particles, #gx-ambient, #gx-fab,
  #gx-cmd-overlay, #gx-model-picker,
  #gx-shortcuts-panel, #gx-scroll-top,
  #gx-progress-bar, .gx-reactions,
  .gx-msg-toolbar { display: none !important; }
}

/* ══════════════════════════════════════════════════════════
   23. REDUCED MOTION
══════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  #gx-canvas-bg { display: none; }
  #gx-particles { display: none; }
  #gx-ambient { display: none; }
  .gx-thinking-dot { animation: none; opacity: 1; }
  .gx-stream-cursor { animation: none; opacity: 1; }
  .gx-mb-dot { animation: none; }
}

/* ══════════════════════════════════════════════════════════
   24. HIGH CONTRAST MODE
══════════════════════════════════════════════════════════ */
@media (forced-colors: active) {
  .gx-fab-main, .gx-edit-save { forced-color-adjust: none; }
  #gx-cmd-box, #gx-model-picker { border: 2px solid ButtonText; }
}