/* ══════════════════════════════════════════════════════
   EXTRA FEATURES
══════════════════════════════════════════════════════ */

/* ── TEMA TOGGLE ─────────────────────────────────────── */
body.light {
  --bg: #f0f0f5;
  --glass: rgba(255,255,255,0.7);
  --glassb: rgba(0,0,0,0.08);
  --t1: #0a0a14;
  --t2: #444;
  --t3: #888;
  --sb: #e8e8f0;
}
body.light .bubble {
  background: rgba(255,255,255,0.9) !important;
  border-color: rgba(0,0,0,0.08) !important;
  color: #111 !important;
}
body.light .sidebar { background: rgba(240,240,248,0.98) !important; }
body.light .topbar  { background: rgba(240,240,248,0.85) !important; }
body.light #bg      { opacity: .03 !important; }

/* ── AYAR PANELİ ─────────────────────────────────────── */
.settings-btn {
  width: 34px; height: 34px; border-radius: 10px;
  border: 1px solid var(--glassb);
  background: var(--glass); color: var(--t2);
  cursor: pointer; display: flex; align-items: center;
  justify-content: center; transition: all .2s; flex-shrink: 0;
}
.settings-btn:hover { background: rgba(108,62,244,0.1); color: var(--p3); }

.settings-panel {
  position: fixed; top: 60px; right: 16px; z-index: 500;
  background: rgba(10,10,20,0.97);
  border: 1px solid rgba(108,62,244,0.25);
  border-radius: 16px; padding: 20px;
  width: 240px;
  box-shadow: 0 16px 48px rgba(0,0,0,.6);
  opacity: 0; pointer-events: none;
  transform: translateY(-8px) scale(.97);
  transition: all .2s;
}
.settings-panel.open {
  opacity: 1; pointer-events: all;
  transform: translateY(0) scale(1);
}
.settings-title {
  font-size: 12px; font-weight: 700; color: var(--t2);
  letter-spacing: .5px; margin-bottom: 14px; text-transform: uppercase;
}
.settings-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0; border-bottom: 1px solid var(--glassb);
  font-size: 13px; color: var(--t1);
}
.settings-row:last-child { border-bottom: none; }

/* Toggle switch */
.tog {
  position: relative; width: 36px; height: 20px;
  background: rgba(255,255,255,0.1); border-radius: 99px;
  cursor: pointer; transition: background .2s;
  border: 1px solid var(--glassb);
}
.tog.on { background: var(--grad); }
.tog::after {
  content: ''; position: absolute;
  width: 14px; height: 14px; border-radius: 50%;
  background: #fff; top: 2px; left: 2px;
  transition: transform .2s;
  box-shadow: 0 1px 4px rgba(0,0,0,.3);
}
.tog.on::after { transform: translateX(16px); }

/* Font size slider */
.font-slider {
  width: 100%; accent-color: #6c3ef4;
  margin-top: 6px;
}

/* ── MESAJ AKSIYONLARI ───────────────────────────────── */
.msg-actions {
  display: flex; gap: 6px; margin-top: 8px;
  opacity: 0; transition: opacity .2s;
}
.message:hover .msg-actions { opacity: 1; }

.msg-btn {
  display: flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 8px; border: 1px solid var(--glassb);
  background: var(--glass); color: var(--t2); cursor: pointer;
  font-size: 11px; font-weight: 600; transition: all .15s;
}
.msg-btn:hover { background: rgba(108,62,244,0.12); color: var(--p3); border-color: rgba(108,62,244,0.3); }
.msg-btn.liked { color: #4ade80; border-color: rgba(74,222,128,0.3); }
.msg-btn.disliked { color: #f87171; border-color: rgba(248,113,113,0.3); }

/* ── EN ÜSTE ÇIK ─────────────────────────────────────── */
.scroll-top-btn {
  position: fixed; bottom: 100px; right: 20px; z-index: 400;
  width: 40px; height: 40px; border-radius: 12px;
  background: rgba(108,62,244,0.2); border: 1px solid rgba(108,62,244,0.3);
  color: var(--p3); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: all .3s;
  box-shadow: 0 4px 16px rgba(0,0,0,.3);
}
.scroll-top-btn.show { opacity: 1; pointer-events: all; }
.scroll-top-btn:hover { background: rgba(108,62,244,0.35); transform: translateY(-2px); }

/* ── TOAST BİLDİRİM ──────────────────────────────────── */
.toast {
  position: fixed; bottom: 80px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(108,62,244,0.95);
  color: #fff; padding: 10px 20px; border-radius: 100px;
  font-size: 13px; font-weight: 600; z-index: 9999;
  opacity: 0; transition: all .3s; white-space: nowrap;
  box-shadow: 0 4px 20px rgba(108,62,244,0.4);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── DOWNLOAD BTN ────────────────────────────────────── */
.dl-chat-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 10px;
  border: 1px solid var(--glassb); background: var(--glass);
  color: var(--t2); cursor: pointer; font-size: 12px;
  font-weight: 600; transition: all .2s;
}
.dl-chat-btn:hover { background: rgba(108,62,244,0.1); color: var(--p3); }

/* ══════════════════════════════════════════════════════
   GÖRSEL YÜKLEME
══════════════════════════════════════════════════════ */
.img-preview-wrap {
  background: rgba(108,62,244,0.06);
  border: 1px solid rgba(108,62,244,0.2);
  border-radius: 16px; padding: 12px 14px;
  margin: 0 0 10px; animation: slideUp .3s ease;
}
@keyframes slideUp { from { opacity:0; transform:translateY(10px) } to { opacity:1; transform:translateY(0) } }

.img-preview-inner {
  display: flex; align-items: center; gap: 12px; margin-bottom: 10px;
}
.img-preview-thumb {
  width: 56px; height: 56px; object-fit: cover;
  border-radius: 10px; border: 1px solid rgba(108,62,244,0.3);
}
.img-preview-name { font-size: 13px; font-weight: 600; color: var(--t1); }
.img-preview-size { font-size: 11px; color: var(--t2); margin-top: 2px; }
.img-preview-remove {
  margin-left: auto; background: none; border: none;
  color: var(--t3); cursor: pointer; font-size: 16px; padding: 4px;
  transition: color .2s;
}
.img-preview-remove:hover { color: #f87171; }
.img-preview-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.img-action-btn {
  padding: 6px 14px; border-radius: 100px;
  border: 1px solid rgba(108,62,244,0.3);
  background: rgba(108,62,244,0.08); color: var(--p3);
  font-size: 12px; font-weight: 600; cursor: pointer;
  transition: all .2s;
}
.img-action-btn:hover {
  background: rgba(108,62,244,0.2);
  border-color: rgba(108,62,244,0.5);
  transform: translateY(-1px);
}

/* ══════════════════════════════════════════════════════
   EFEKTLER
══════════════════════════════════════════════════════ */

/* Cursor glow */
.glow-cursor {
  position: fixed; width: 20px; height: 20px;
  border-radius: 50%; pointer-events: none; z-index: 99998;
  background: radial-gradient(circle, rgba(108,62,244,0.6) 0%, transparent 70%);
  transform: translate(-50%,-50%);
  transition: transform .05s linear;
  mix-blend-mode: screen;
}
.glow-cursor-ring {
  position: fixed; width: 40px; height: 40px;
  border-radius: 50%; pointer-events: none; z-index: 99997;
  border: 1px solid rgba(108,62,244,0.3);
  transform: translate(-50%,-50%);
  transition: transform .12s ease, width .2s, height .2s;
  mix-blend-mode: screen;
}

/* Ripple efekti */
.ripple {
  position: absolute; border-radius: 50%;
  background: rgba(108,62,244,0.25);
  transform: scale(0); animation: rippleAnim .6s ease forwards;
  pointer-events: none;
}
@keyframes rippleAnim {
  to { transform: scale(4); opacity: 0; }
}

/* Mesaj reveal */
.message { animation: msgReveal .4s cubic-bezier(.34,1.4,.64,1) both; }
@keyframes msgReveal {
  from { opacity:0; transform:translateY(20px) scale(.95); }
  to   { opacity:1; transform:translateY(0) scale(1); }
}

/* Sidebar item giriş animasyonu */
.chat-item { animation: itemSlide .25s ease both; }
@keyframes itemSlide {
  from { opacity:0; transform:translateX(-12px); }
  to   { opacity:1; transform:translateX(0); }
}

/* Input focus animasyonu */
.input-wrap { transition: box-shadow .3s, transform .2s !important; }
.input-wrap:focus-within { transform: translateY(-1px) !important; }

/* Gönder butonu */
.send-btn { transition: transform .15s, box-shadow .15s !important; }
.send-btn:hover {
  transform: scale(1.08) !important;
  box-shadow: 0 0 20px rgba(108,62,244,0.5) !important;
}
.send-btn:active { transform: scale(.94) !important; }

/* Kart hover 3D */
.card {
  transition: transform .25s cubic-bezier(.34,1.4,.64,1), box-shadow .25s !important;
  transform-style: preserve-3d;
}

/* Sayfa yüklenme animasyonu */
@keyframes fadeInPage {
  from { opacity:0; transform:translateY(8px); }
  to   { opacity:1; transform:translateY(0); }
}
.main { animation: fadeInPage .5s ease both; }
.sidebar { animation: fadeInPage .5s ease .1s both; }

/* Logo parıldama */
.logo-gem {
  animation: gemGlow 3s ease-in-out infinite;
}
@keyframes gemGlow {
  0%,100% { box-shadow: 0 0 8px rgba(108,62,244,0.3); }
  50%      { box-shadow: 0 0 24px rgba(108,62,244,0.7); }
}

/* Typing indicator gelişmiş */
.typing-dot {
  animation: typingBounce 1.2s ease-in-out infinite !important;
}
.typing-dot:nth-child(2) { animation-delay: .15s !important; }
.typing-dot:nth-child(3) { animation-delay: .3s !important; }
@keyframes typingBounce {
  0%,60%,100% { transform: translateY(0) scale(1); }
  30%          { transform: translateY(-8px) scale(1.2); }
}

/* Topbar gradient animasyonu */
.topbar::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(108,62,244,0.5), transparent);
  animation: borderFlow 3s linear infinite;
}
@keyframes borderFlow {
  from { transform: translateX(-100%); }
  to   { transform: translateX(100%); }
}

/* Mesaj hover glow */
.message.assistant .bubble:hover {
  box-shadow: 0 0 20px rgba(108,62,244,0.12), 0 4px 24px rgba(0,0,0,.2) !important;
}

/* Scroll çubuğu güzel */
* { scrollbar-width: thin; scrollbar-color: rgba(108,62,244,0.3) transparent; }
*::-webkit-scrollbar { width: 4px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: rgba(108,62,244,0.3); border-radius: 99px; }
*::-webkit-scrollbar-thumb:hover { background: rgba(108,62,244,0.6); }

/* Gradient metin animasyonu (hero) */
.hero-g {
  background-size: 200% 200% !important;
  animation: gradientShift 4s ease infinite !important;
}
@keyframes gradientShift {
  0%,100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

/* Yeni sohbet butonu pulse */
#newChatBtn:hover {
  animation: newChatPulse .4s ease;
}
@keyframes newChatPulse {
  0%   { box-shadow: 0 0 0 0 rgba(108,62,244,0.4); }
  100% { box-shadow: 0 0 0 10px rgba(108,62,244,0); }
}

/* ══════════════════════════════════════════════════════
   LOGO STİLLERİ
══════════════════════════════════════════════════════ */
.site-logo-img {
  height: 28px; width: auto;
  object-fit: contain;
  filter: brightness(1.1);
  transition: transform .3s ease, filter .3s;
}
.site-logo-img:hover {
  transform: scale(1.05);
  filter: brightness(1.2) drop-shadow(0 0 8px rgba(108,62,244,0.5));
}

.topbar-logo-img {
  height: 20px; width: auto;
  object-fit: contain;
  filter: brightness(1.1);
}

.hero-logo-img {
  height: 48px; width: auto;
  object-fit: contain;
  margin-bottom: 12px;
  animation: heroLogoIn .8s cubic-bezier(.34,1.4,.64,1) both;
  filter: drop-shadow(0 0 16px rgba(108,62,244,0.4));
}
@keyframes heroLogoIn {
  from { opacity:0; transform:scale(.7) translateY(-10px); }
  to   { opacity:1; transform:scale(1) translateY(0); }
}

/* ══════════════════════════════════════════════════════
   CURSOR GLOW EFEKTİ
══════════════════════════════════════════════════════ */
#cursorGlow {
  position: fixed; width: 300px; height: 300px;
  border-radius: 50%; pointer-events: none; z-index: 0;
  background: radial-gradient(circle, rgba(108,62,244,0.06) 0%, transparent 70%);
  transform: translate(-50%,-50%);
  transition: left .08s ease, top .08s ease;
  mix-blend-mode: screen;
}

/* ══════════════════════════════════════════════════════
   METİN YAZI EFEKTİ (typewriter gelişmiş)
══════════════════════════════════════════════════════ */
.typewriter-cursor {
  display: inline-block;
  width: 2px; height: 1em;
  background: var(--p2);
  margin-left: 2px;
  vertical-align: middle;
  animation: cursorBlink .7s step-end infinite;
}
@keyframes cursorBlink {
  0%,100% { opacity:1; }
  50%      { opacity:0; }
}

/* ══════════════════════════════════════════════════════
   FLOATING PARÇACIKLAR (arka plan)
══════════════════════════════════════════════════════ */
.float-orb {
  position: fixed; border-radius: 50%; pointer-events: none;
  z-index: 0; filter: blur(60px); opacity: .04;
  animation: floatOrb linear infinite;
}
@keyframes floatOrb {
  0%   { transform: translateY(0px) rotate(0deg); }
  50%  { transform: translateY(-30px) rotate(180deg); }
  100% { transform: translateY(0px) rotate(360deg); }
}

/* ══════════════════════════════════════════════════════
   BUTON RIPPLE
══════════════════════════════════════════════════════ */
.btn-ripple {
  position: relative; overflow: hidden;
}
.btn-ripple::after {
  content: ''; position: absolute; inset: 0;
  background: rgba(255,255,255,0.15);
  border-radius: inherit;
  transform: scale(0); opacity: 1;
  transition: transform .4s ease, opacity .4s;
}
.btn-ripple:active::after {
  transform: scale(2); opacity: 0;
}

/* ══════════════════════════════════════════════════════
   MESAJ GÖNDER ANİMASYON
══════════════════════════════════════════════════════ */
@keyframes sendRocket {
  0%   { transform: translateY(0) rotate(0deg); opacity:1; }
  50%  { transform: translateY(-20px) rotate(-15deg); opacity:.6; }
  100% { transform: translateY(0) rotate(0deg); opacity:1; }
}
.send-btn.sending {
  animation: sendRocket .4s ease;
}

/* ══════════════════════════════════════════════════════
   ŞIK INPUT BUTONLARI
══════════════════════════════════════════════════════ */

/* Eski img-btn'i sıfırla */
.img-btn { display: none !important; }

.action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.07);
  background: rgba(255,255,255,0.04);
  color: var(--t2);
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 500;
  font-family: 'DM Sans', sans-serif;
  white-space: nowrap;
  transition: all .2s cubic-bezier(.34,1.4,.64,1);
  position: relative;
  overflow: hidden;
}

.action-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(108,62,244,0.1), rgba(59,126,247,0.1));
  opacity: 0;
  transition: opacity .2s;
  border-radius: inherit;
}

.action-btn:hover {
  border-color: rgba(108,62,244,0.3);
  color: #c4b5fd;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(108,62,244,0.15);
}

.action-btn:hover::before { opacity: 1; }

.action-btn:active {
  transform: translateY(0) scale(.97);
}

.action-btn svg {
  opacity: .7;
  transition: opacity .2s;
  flex-shrink: 0;
}
.action-btn:hover svg { opacity: 1; }

.action-badge {
  background: rgba(108,62,244,0.25);
  color: #c4b5fd;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 6px;
  margin-left: 2px;
}

/* Send butonu da şık */
.send-btn {
  width: 38px !important;
  height: 38px !important;
  border-radius: 11px !important;
  background: linear-gradient(135deg, #6c3ef4, #3b7ef7) !important;
  border: none !important;
  color: #fff !important;
  cursor: pointer;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0;
  transition: all .2s cubic-bezier(.34,1.4,.64,1) !important;
  box-shadow: 0 4px 16px rgba(108,62,244,0.35) !important;
}

.send-btn:hover {
  transform: scale(1.07) translateY(-1px) !important;
  box-shadow: 0 6px 24px rgba(108,62,244,0.5) !important;
}

.send-btn:active {
  transform: scale(.94) !important;
}

/* Input hint güncelle */
.input-hint {
  font-size: 11px !important;
  color: var(--t3) !important;
  text-align: center;
  margin-top: 8px;
  letter-spacing: .2px;
}
