/* =========================================
  DEĞİŞKENLER VE SIFIRLAMA
========================================= */
:root {
   --bg-main: #343541;
   --bg-chat: #444654;
   --bg-sidebar: #202123;
   --text-light: #ececf1;
   --text-muted: #c5c5d2;
   --accent: #10a37f;
   --accent-hover: #1a7f64;
   --accent-glow: rgba(16, 163, 127, 0.3);
   --border-color: rgba(255, 255, 255, 0.1);
   --sidebar-width: 260px;
   --chat-max-width: 800px;
   --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
   --transition-bounce: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
   --shadow-sm: 0 2px 8px rgba(0,0,0,0.2);
   --shadow-md: 0 4px 20px rgba(0,0,0,0.3);
   --shadow-lg: 0 8px 32px rgba(0,0,0,0.4);
   --shadow-glow: 0 0 20px var(--accent-glow);
   --radius-sm: 8px;
   --radius-md: 12px;
   --radius-lg: 16px;
   --radius-xl: 24px;
}

/* =========================================
  AÇIK TEMA (LIGHT MODE)
========================================= */
[data-theme="light"] {
   --bg-main: #ffffff;
   --bg-chat: #f7f7f8;
   --bg-sidebar: #f0f0f4;
   --text-light: #343541;
   --text-muted: #6e6e80;
   --border-color: rgba(0, 0, 0, 0.1);
   --accent-glow: rgba(16, 163, 127, 0.15);
   --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
   --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
   --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
}

[data-theme="light"] .new-chat-btn,
[data-theme="light"] .history-item,
[data-theme="light"] .menu-toggle {
   color: var(--text-light);
}

[data-theme="light"] .new-chat-btn:hover,
[data-theme="light"] .history-item:hover {
   background: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .input-box {
   background: #ffffff;
   border: 1px solid rgba(0,0,0,0.12);
   box-shadow: var(--shadow-sm);
}

[data-theme="light"] #user-input {
   color: var(--text-light);
}

[data-theme="light"] .text pre {
   background: #1e1e2f; 
   color: #fff;
}

/* =========================================
  YENİ TEMALAR
========================================= */
[data-theme="midnight"] {
   --bg-main: #0d1117;
   --bg-chat: #161b22;
   --bg-sidebar: #090c10;
   --text-light: #e6edf3;
   --text-muted: #7d8590;
   --accent: #58a6ff;
   --accent-hover: #388bfd;
   --accent-glow: rgba(88, 166, 255, 0.25);
   --border-color: rgba(48, 54, 61, 0.8);
}

[data-theme="midnight"] .input-box { 
   background: #21262d; 
   border-color: rgba(48,54,61,0.9); 
}

[data-theme="midnight"] #user-input { 
   color: var(--text-light); 
}

[data-theme="midnight"] .new-chat-btn, 
[data-theme="midnight"] .history-item { 
   color: var(--text-light); 
}

[data-theme="midnight"] .new-chat-btn:hover, 
[data-theme="midnight"] .history-item:hover { 
   background: rgba(255,255,255,0.05); 
}

[data-theme="forest"] {
   --bg-main: #0f1b0f;
   --bg-chat: #162516;
   --bg-sidebar: #0a120a;
   --text-light: #d1fae5;
   --text-muted: #6ee7b7;
   --accent: #34d399;
   --accent-hover: #10b981;
   --accent-glow: rgba(52, 211, 153, 0.25);
   --border-color: rgba(52, 211, 153, 0.15);
}

[data-theme="forest"] .input-box { 
   background: #162516; 
   border-color: rgba(52,211,153,0.2); 
}

[data-theme="forest"] #user-input { 
   color: var(--text-light); 
}

[data-theme="forest"] .new-chat-btn, 
[data-theme="forest"] .history-item { 
   color: var(--text-light); 
}

[data-theme="forest"] .new-chat-btn:hover, 
[data-theme="forest"] .history-item:hover { 
   background: rgba(52,211,153,0.05); 
}

[data-theme="sunset"] {
   --bg-main: #1a0a00;
   --bg-chat: #2a1200;
   --bg-sidebar: #120600;
   --text-light: #fef3e2;
   --text-muted: #fbbf24;
   --accent: #f97316;
   --accent-hover: #ea580c;
   --accent-glow: rgba(249, 115, 22, 0.25);
   --border-color: rgba(249, 115, 22, 0.2);
}

[data-theme="sunset"] .input-box { 
   background: #2a1200; 
   border-color: rgba(249,115,22,0.25); 
}

[data-theme="sunset"] #user-input { 
   color: var(--text-light); 
}

[data-theme="sunset"] .new-chat-btn, 
[data-theme="sunset"] .history-item { 
   color: var(--text-light); 
}

[data-theme="sunset"] .new-chat-btn:hover, 
[data-theme="sunset"] .history-item:hover { 
   background: rgba(249,115,22,0.07); 
}

[data-theme="rose"] {
   --bg-main: #1a0010;
   --bg-chat: #2a0018;
   --bg-sidebar: #120009;
   --text-light: #ffe4f3;
   --text-muted: #f9a8d4;
   --accent: #ec4899;
   --accent-hover: #db2777;
   --accent-glow: rgba(236, 72, 153, 0.25);
   --border-color: rgba(236, 72, 153, 0.2);
}

[data-theme="rose"] .input-box { 
   background: #2a0018; 
   border-color: rgba(236,72,153,0.25); 
}

[data-theme="rose"] #user-input { 
   color: var(--text-light); 
}

[data-theme="rose"] .new-chat-btn, 
[data-theme="rose"] .history-item { 
   color: var(--text-light); 
}

[data-theme="rose"] .new-chat-btn:hover, 
[data-theme="rose"] .history-item:hover { 
   background: rgba(236,72,153,0.07); 
}

[data-theme="violet"] {
   --bg-main: #0d0014;
   --bg-chat: #160020;
   --bg-sidebar: #08000d;
   --text-light: #f3e8ff;
   --text-muted: #c4b5fd;
   --accent: #a855f7;
   --accent-hover: #9333ea;
   --accent-glow: rgba(168, 85, 247, 0.25);
   --border-color: rgba(168, 85, 247, 0.2);
}

[data-theme="violet"] .input-box { 
   background: #160020; 
   border-color: rgba(168,85,247,0.25); 
}

[data-theme="violet"] #user-input { 
   color: var(--text-light); 
}

[data-theme="violet"] .new-chat-btn, 
[data-theme="violet"] .history-item { 
   color: var(--text-light); 
}

[data-theme="violet"] .new-chat-btn:hover, 
[data-theme="violet"] .history-item:hover { 
   background: rgba(168,85,247,0.07); 
}

[data-theme="slate"] {
   --bg-main: #0f172a;
   --bg-chat: #1e293b;
   --bg-sidebar: #0a1020;
   --text-light: #e2e8f0;
   --text-muted: #94a3b8;
   --accent: #64748b;
   --accent-hover: #475569;
   --accent-glow: rgba(100, 116, 139, 0.25);
   --border-color: rgba(100, 116, 139, 0.2);
}

[data-theme="slate"] .input-box { 
   background: #1e293b; 
   border-color: rgba(100,116,139,0.3); 
}

[data-theme="slate"] #user-input { 
   color: var(--text-light); 
}

[data-theme="slate"] .new-chat-btn, 
[data-theme="slate"] .history-item { 
   color: var(--text-light); 
}

[data-theme="slate"] .new-chat-btn:hover, 
[data-theme="slate"] .history-item:hover { 
   background: rgba(255,255,255,0.05); 
}

[data-theme="amber"] {
   --bg-main: #1c1400;
   --bg-chat: #2a1e00;
   --bg-sidebar: #120e00;
   --text-light: #fef9e7;
   --text-muted: #fde68a;
   --accent: #f59e0b;
   --accent-hover: #d97706;
   --accent-glow: rgba(245, 158, 11, 0.25);
   --border-color: rgba(245, 158, 11, 0.2);
}

[data-theme="amber"] .input-box { 
   background: #2a1e00; 
   border-color: rgba(245,158,11,0.25); 
}

[data-theme="amber"] #user-input { 
   color: var(--text-light); 
}

[data-theme="amber"] .new-chat-btn, 
[data-theme="amber"] .history-item { 
   color: var(--text-light); 
}

[data-theme="amber"] .new-chat-btn:hover, 
[data-theme="amber"] .history-item:hover { 
   background: rgba(245,158,11,0.07); 
}

[data-theme="ocean"] {
   --bg-main: #00101c;
   --bg-chat: #001e33;
   --bg-sidebar: #000a12;
   --text-light: #e0f2fe;
   --text-muted: #7dd3fc;
   --accent: #0ea5e9;
   --accent-hover: #0284c7;
   --accent-glow: rgba(14, 165, 233, 0.25);
   --border-color: rgba(14, 165, 233, 0.2);
}

[data-theme="ocean"] .input-box { 
   background: #001e33; 
   border-color: rgba(14,165,233,0.25); 
}

[data-theme="ocean"] #user-input { 
   color: var(--text-light); 
}

[data-theme="ocean"] .new-chat-btn, 
[data-theme="ocean"] .history-item { 
   color: var(--text-light); 
}

[data-theme="ocean"] .new-chat-btn:hover, 
[data-theme="ocean"] .history-item:hover { 
   background: rgba(14,165,233,0.07); 
}

[data-theme="cherry"] {
   --bg-main: #1c0010;
   --bg-chat: #2a0018;
   --bg-sidebar: #12000a;
   --text-light: #ffe4e6;
   --text-muted: #fda4af;
   --accent: #f43f5e;
   --accent-hover: #e11d48;
   --accent-glow: rgba(244, 63, 94, 0.25);
   --border-color: rgba(244, 63, 94, 0.2);
}

[data-theme="cherry"] .input-box { 
   background: #2a0018; 
   border-color: rgba(244,63,94,0.25); 
}

[data-theme="cherry"] #user-input { 
   color: var(--text-light); 
}

[data-theme="cherry"] .new-chat-btn, 
[data-theme="cherry"] .history-item { 
   color: var(--text-light); 
}

[data-theme="cherry"] .new-chat-btn:hover, 
[data-theme="cherry"] .history-item:hover { 
   background: rgba(244,63,94,0.07); 
}

[data-theme="discord"] {
   --bg-main: #313338;
   --bg-chat: #383a40;
   --bg-sidebar: #2b2d31;
   --text-light: #f2f3f5;
   --text-muted: #949ba4;
   --accent: #5865f2;
   --accent-hover: #4752c4;
   --accent-glow: rgba(88, 101, 242, 0.25);
   --border-color: rgba(88, 101, 242, 0.2);
}

[data-theme="discord"] .input-box { 
   background: #383a40; 
   border-color: rgba(88,101,242,0.25); 
}

[data-theme="discord"] #user-input { 
   color: var(--text-light); 
}

[data-theme="discord"] .new-chat-btn, 
[data-theme="discord"] .history-item { 
   color: var(--text-light); 
}

[data-theme="discord"] .new-chat-btn:hover, 
[data-theme="discord"] .history-item:hover { 
   background: rgba(88,101,242,0.1); 
}

/* =========================================
  TEMEL STILLER
========================================= */
* { 
   box-sizing: border-box; 
   margin: 0; 
   padding: 0; 
   font-family: 'Inter', system-ui, -apple-system, sans-serif; 
}

* { 
   -webkit-tap-highlight-color: transparent; 
}

html, body {
   height: 100%; 
   width: 100%;
   background: var(--bg-main);
   color: var(--text-light);
   overflow: hidden;
   transition: background 0.5s ease, color 0.5s ease;
}

/* =========================================
  ARKA PLAN ANİMASYONU
========================================= */
body::before {
   content: "";
   position: fixed;
   top: 0; 
   left: 0; 
   width: 100%; 
   height: 100%;
   background: 
       radial-gradient(circle at 15% 15%, var(--accent-glow) 0%, transparent 35%),
       radial-gradient(circle at 85% 85%, rgba(0, 212, 255, 0.04) 0%, transparent 35%);
   z-index: -2;
   pointer-events: none;
   animation: gradientMove 15s ease-in-out infinite alternate;
}

@keyframes gradientMove {
   0% { 
       transform: scale(1) rotate(0deg); 
       opacity: 0.5;
   }
   33% { 
       transform: scale(1.05) rotate(1deg); 
       opacity: 0.7;
   }
   66% { 
       transform: scale(1.1) rotate(-1deg); 
       opacity: 0.6;
   }
   100% { 
       transform: scale(1.08) translate(20px, -20px) rotate(0.5deg); 
       opacity: 0.5;
   }
}

/* =========================================
  GİRİŞ EKRANI (LOGIN)
========================================= */
#login-screen {
   position: fixed;
   inset: 0;
   display: flex;
   align-items: center;
   justify-content: center;
   background: var(--bg-main);
   z-index: 9999;
   animation: fadeIn 0.6s ease;
}

@keyframes fadeIn {
   from { opacity: 0; }
   to { opacity: 1; }
}

.login-box {
   background: var(--bg-sidebar);
   padding: 48px 40px;
   border-radius: var(--radius-lg);
   text-align: center;
   width: min(420px, 90vw);
   box-shadow: var(--shadow-lg);
   border: 1px solid var(--border-color);
   animation: loginSlide 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
   position: relative;
   overflow: hidden;
}

.login-box::before {
   content: '';
   position: absolute;
   top: 0;
   left: -100%;
   width: 100%;
   height: 100%;
   background: linear-gradient(90deg, transparent, rgba(255,255,255,0.03), transparent);
   animation: shimmer 3s infinite;
}

@keyframes shimmer {
   0% { left: -100%; }
   100% { left: 100%; }
}

@keyframes loginSlide {
   0% { 
       opacity: 0; 
       transform: translateY(40px) scale(0.95); 
       filter: blur(10px);
   }
   100% { 
       opacity: 1; 
       transform: translateY(0) scale(1); 
       filter: blur(0);
   }
}

.login-logo { 
   font-size: 56px; 
   color: var(--accent); 
   margin-bottom: 24px; 
   animation: pulse 2s ease-in-out infinite; 
   display: inline-block;
}

@keyframes pulse {
   0%, 100% { 
       transform: scale(1); 
       filter: drop-shadow(0 0 0 var(--accent-glow));
   }
   50% { 
       transform: scale(1.15); 
       filter: drop-shadow(0 0 20px var(--accent-glow));
   }
}

.login-box h1 { 
   margin-bottom: 12px; 
   font-size: 28px; 
   font-weight: 700;
   letter-spacing: -0.5px;
}

.login-box p { 
   color: var(--text-muted); 
   margin-bottom: 36px; 
   font-size: 15px; 
   line-height: 1.6; 
}

.login-btn {
   width: 100%;
   background: white;
   color: #1e1e1e;
   border: none;
   padding: 16px;
   border-radius: var(--radius-sm);
   font-size: 16px;
   font-weight: 600;
   cursor: pointer;
   display: flex;
   align-items: center;
   justify-content: center;
   gap: 12px;
   transition: var(--transition);
   position: relative;
   overflow: hidden;
}

.login-btn::after {
   content: '';
   position: absolute;
   top: 50%;
   left: 50%;
   width: 0;
   height: 0;
   border-radius: 50%;
   background: rgba(0,0,0,0.1);
   transform: translate(-50%, -50%);
   transition: width 0.6s, height 0.6s;
}

.login-btn:hover::after {
   width: 300px;
   height: 300px;
}

.login-btn:hover { 
   background: #f0f0f0; 
   transform: translateY(-3px); 
   box-shadow: 0 8px 24px rgba(0,0,0,0.2); 
}

.login-btn:active { 
   transform: translateY(-1px) scale(0.98); 
}

/* =========================================
  ANA YAPI VE SIDEBAR
========================================= */
#app-container {
   display: flex;
   width: 100%;
   height: 100dvh;
   opacity: 0;
   animation: appAppear 0.5s ease 0.3s forwards;
}

@keyframes appAppear {
   to { opacity: 1; }
}

#sidebar {
   width: var(--sidebar-width);
   background: var(--bg-sidebar);
   display: flex;
   flex-direction: column;
   padding: 12px;
   flex-shrink: 0;
   z-index: 1000;
   transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
   border-right: 1px solid var(--border-color);
}

.new-chat-btn {
   background: var(--accent);
   border: none;
   color: white;
   padding: 14px;
   border-radius: var(--radius-sm);
   cursor: pointer;
   display: flex;
   align-items: center;
   gap: 10px;
   margin-bottom: 20px;
   transition: var(--transition);
   font-weight: 600;
   font-size: 14px;
   box-shadow: 0 2px 8px var(--accent-glow);
   position: relative;
   overflow: hidden;
}

.new-chat-btn::before {
   content: '';
   position: absolute;
   top: 0;
   left: -100%;
   width: 100%;
   height: 100%;
   background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
   transition: left 0.5s;
}

.new-chat-btn:hover::before {
   left: 100%;
}

.new-chat-btn:hover { 
   background: var(--accent-hover); 
   transform: translateY(-2px);
   box-shadow: 0 4px 16px var(--accent-glow);
}

.new-chat-btn:active {
   transform: translateY(0) scale(0.98);
}

#history-list {
   flex: 1;
   overflow-y: auto;
   padding-right: 4px;
}

.history-item {
   padding: 12px;
   border-radius: var(--radius-sm);
   cursor: pointer;
   font-size: 14px;
   display: flex;
   align-items: center;
   gap: 10px;
   color: var(--text-light);
   white-space: nowrap;
   overflow: hidden;
   text-overflow: ellipsis;
   position: relative;
   transition: var(--transition);
   margin-bottom: 4px;
   border-left: 3px solid transparent;
}

.history-item:hover { 
   background: rgba(255,255,255,0.06); 
   transform: translateX(4px);
   border-left-color: var(--accent);
}

.history-item.active { 
   background: rgba(255,255,255,0.08); 
   border-left-color: var(--accent);
   box-shadow: inset 0 0 10px rgba(0,0,0,0.1);
}

.history-actions {
   display: none;
   position: absolute;
   right: 8px;
   top: 50%;
   transform: translateY(-50%);
   gap: 4px;
   background: linear-gradient(to left, var(--bg-sidebar) 80%, transparent);
   padding-left: 20px;
   animation: fadeIn 0.2s ease;
}

.history-item:hover .history-actions { 
   display: flex; 
}

.history-actions button {
   background: none; 
   border: none;
   color: var(--text-muted); 
   cursor: pointer;
   padding: 6px; 
   border-radius: 6px;
   font-size: 12px;
   transition: var(--transition);
   width: 28px;
   height: 28px;
   display: flex;
   align-items: center;
   justify-content: center;
}

.history-actions button:hover { 
   color: var(--accent); 
   background: rgba(255,255,255,0.08);
   transform: scale(1.1);
}

.user-info {
   padding: 16px 8px;
   border-top: 1px solid var(--border-color);
   display: flex;
   align-items: center;
   justify-content: space-between;
   margin-top: auto;
}

.user-details { 
   display: flex; 
   align-items: center; 
   gap: 12px; 
   overflow: hidden; 
}

.user-details img { 
   border-radius: 50%; 
   background: #444;
   border: 2px solid var(--border-color);
   transition: var(--transition);
}

.user-details img:hover {
   border-color: var(--accent);
   transform: scale(1.1);
}

.logout-btn { 
   background: none; 
   border: none; 
   color: var(--text-muted); 
   cursor: pointer;
   width: 36px;
   height: 36px;
   border-radius: 8px;
   display: flex;
   align-items: center;
   justify-content: center;
   transition: var(--transition);
   font-size: 16px;
}

.logout-btn:hover { 
   color: var(--accent); 
   background: rgba(255,255,255,0.06);
   transform: translateY(-2px);
}

/* =========================================
  CHAT ALANI
========================================= */
#main-content {
   flex: 1;
   display: flex;
   flex-direction: column;
   height: 100%;
   min-width: 0;
   position: relative;
   background: var(--bg-main);
}

.header {
   display: none;
   height: 56px;
   padding: 0 20px;
   align-items: center;
   background: var(--bg-sidebar);
   border-bottom: 1px solid var(--border-color);
   backdrop-filter: blur(10px);
}

.menu-toggle { 
   background: none; 
   border: none; 
   color: var(--text-light); 
   font-size: 20px; 
   cursor: pointer;
   width: 40px;
   height: 40px;
   border-radius: 8px;
   display: flex;
   align-items: center;
   justify-content: center;
   transition: var(--transition);
}

.menu-toggle:hover {
   background: rgba(255,255,255,0.06);
}

#chat-window {
   flex: 1;
   overflow-y: auto;
   display: flex;
   flex-direction: column;
   min-height: 0;
   scroll-behavior: smooth;
}

.message-wrapper {
   display: flex;
   justify-content: center;
   padding: 28px 24px;
   animation: messageAppear 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
   position: relative;
}

.message-wrapper.ai { 
   background: var(--bg-chat); 
}

@keyframes messageAppear {
   0% { 
       opacity: 0; 
       transform: translateY(20px) scale(0.97); 
       filter: blur(8px); 
   }
   100% { 
       opacity: 1; 
       transform: translateY(0) scale(1); 
       filter: blur(0); 
   }
}

.message-content {
   width: 100%;
   max-width: var(--chat-max-width);
   display: flex;
   gap: 20px;
   animation: contentSlide 0.5s ease 0.1s both;
}

@keyframes contentSlide {
   from { opacity: 0; transform: translateX(-10px); }
   to { opacity: 1; transform: translateX(0); }
}

.avatar {
   width: 36px; 
   height: 36px; 
   min-width: 36px;
   border-radius: 8px; 
   display: flex; 
   align-items: center; 
   justify-content: center;
   font-size: 16px;
   transition: var(--transition);
   box-shadow: var(--shadow-sm);
}

.avatar.user { 
   background: linear-gradient(135deg, #5436DA, #7c3aed); 
}

.avatar.ai { 
   background: linear-gradient(135deg, var(--accent), var(--accent-hover)); 
}

.avatar:hover {
   transform: scale(1.1) rotate(5deg);
   box-shadow: var(--shadow-glow);
}

.text {
   flex: 1; 
   line-height: 1.7; 
   font-size: 16px; 
   word-wrap: break-word;
   user-select: text; 
   -webkit-user-select: text;
   overflow-wrap: break-word; 
   word-wrap: break-word; 
   hyphens: auto;
}

/* =========================================
  KARŞILAMA EKRANI
========================================= */
#welcome-screen {
   flex: 1;
   display: flex;
   flex-direction: column;
   align-items: center;
   justify-content: center;
   padding: 48px 24px;
   overflow-y: auto;
   min-height: 0;
   position: relative;
}

.welcome-title {
   font-size: 36px;
   font-weight: 800;
   color: var(--text-light);
   margin-bottom: 12px;
   text-align: center;
   animation: titleReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
   background: linear-gradient(135deg, var(--text-light), var(--accent));
   -webkit-background-clip: text;
   -webkit-text-fill-color: transparent;
   background-clip: text;
   letter-spacing: -1px;
}

@keyframes titleReveal {
   0% { 
       opacity: 0; 
       transform: translateY(30px); 
       filter: blur(10px);
   }
   100% { 
       opacity: 1; 
       transform: translateY(0); 
       filter: blur(0);
   }
}

.welcome-subtitle {
   font-size: 15px;
   color: var(--text-muted);
   margin-bottom: 48px;
   text-align: center;
   animation: fadeSlideUp 0.6s ease 0.2s both;
   max-width: 500px;
   line-height: 1.6;
}

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

.welcome-grid {
   display: grid;
   grid-template-columns: repeat(2, 1fr);
   gap: 16px;
   width: 100%;
   max-width: 680px;
   margin-bottom: 32px;
}

.welcome-card {
   background: var(--bg-sidebar);
   border: 1px solid var(--border-color);
   border-radius: var(--radius-md);
   padding: 20px;
   cursor: pointer;
   transition: var(--transition);
   text-align: left;
   position: relative;
   overflow: hidden;
   opacity: 0;
   animation: cardSlide 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.welcome-card::before {
   content: '';
   position: absolute;
   top: 0;
   left: 0;
   width: 100%;
   height: 3px;
   background: linear-gradient(90deg, var(--accent), transparent);
   transform: scaleX(0);
   transform-origin: left;
   transition: transform 0.4s ease;
}

.welcome-card:hover::before {
   transform: scaleX(1);
}

.welcome-card:hover {
   background: var(--bg-chat);
   border-color: var(--accent);
   transform: translateY(-6px) scale(1.02);
   box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.welcome-card:active { 
   transform: translateY(-2px) scale(0.98); 
   transition: transform 0.1s;
}

.wc-icon {
   font-size: 24px;
   color: var(--accent);
   margin-bottom: 12px;
   transition: var(--transition-bounce);
   display: inline-block;
}

.welcome-card:hover .wc-icon { 
   transform: scale(1.3) rotate(-10deg); 
   filter: drop-shadow(0 0 8px var(--accent-glow));
}

.wc-title {
   font-size: 15px;
   font-weight: 700;
   color: var(--text-light);
   margin-bottom: 6px;
}

.wc-desc {
   font-size: 13px;
   color: var(--text-muted);
   line-height: 1.5;
}

@keyframes cardSlide {
   0% { 
       opacity: 0; 
       transform: translateY(30px) scale(0.95); 
   }
   100% { 
       opacity: 1; 
       transform: translateY(0) scale(1); 
   }
}

.welcome-grid .welcome-card:nth-child(1) { animation-delay: 0.1s; }
.welcome-grid .welcome-card:nth-child(2) { animation-delay: 0.15s; }
.welcome-grid .welcome-card:nth-child(3) { animation-delay: 0.2s; }
.welcome-grid .welcome-card:nth-child(4) { animation-delay: 0.25s; }
.welcome-grid .welcome-card:nth-child(5) { animation-delay: 0.3s; }
.welcome-grid .welcome-card:nth-child(6) { animation-delay: 0.35s; }
.welcome-grid .welcome-card:nth-child(7) { animation-delay: 0.4s; }
.welcome-grid .welcome-card:nth-child(8) { animation-delay: 0.45s; }

.welcome-chips {
   display: flex;
   flex-wrap: wrap;
   gap: 10px;
   justify-content: center;
   max-width: 680px;
   animation: fadeSlideUp 0.6s ease 0.5s both;
}

.chip {
   padding: 8px 18px;
   border-radius: 24px;
   background: var(--bg-sidebar);
   border: 1px solid var(--border-color);
   font-size: 14px;
   color: var(--text-muted);
   cursor: pointer;
   transition: var(--transition);
   white-space: nowrap;
   display: flex;
   align-items: center;
   gap: 8px;
   opacity: 0;
   animation: chipPop 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
   font-weight: 500;
}

.chip:hover {
   color: var(--text-light);
   border-color: var(--accent);
   background: var(--bg-chat);
   transform: translateY(-3px);
   box-shadow: var(--shadow-sm), 0 0 15px var(--accent-glow);
}

.chip i { 
   font-size: 12px; 
   color: var(--accent);
   transition: transform 0.3s;
}

.chip:hover i {
   transform: scale(1.2);
}

.welcome-chips .chip:nth-child(1) { animation-delay: 0.55s; }
.welcome-chips .chip:nth-child(2) { animation-delay: 0.6s; }
.welcome-chips .chip:nth-child(3) { animation-delay: 0.65s; }
.welcome-chips .chip:nth-child(4) { animation-delay: 0.7s; }
.welcome-chips .chip:nth-child(5) { animation-delay: 0.75s; }
.welcome-chips .chip:nth-child(6) { animation-delay: 0.8s; }
.welcome-chips .chip:nth-child(7) { animation-delay: 0.85s; }
.welcome-chips .chip:nth-child(8) { animation-delay: 0.9s; }

@keyframes chipPop {
   0% { 
       opacity: 0; 
       transform: scale(0.8) translateY(10px); 
   }
   100% { 
       opacity: 1; 
       transform: scale(1) translateY(0); 
   }
}

/* =========================================
  RESPONSIVE WELCOME
========================================= */
@media (min-width: 1024px) {
   .welcome-grid { 
       grid-template-columns: repeat(4, 1fr); 
       max-width: 960px; 
   }
   .welcome-chips { 
       max-width: 960px; 
   }
   .welcome-title {
       font-size: 42px;
   }
}

@media (max-width: 768px) {
   .welcome-grid { 
       grid-template-columns: 1fr; 
       max-width: 100%; 
   }
   .welcome-chips { 
       display: grid; 
       grid-template-columns: repeat(2, 1fr); 
   }
   .chip { 
       justify-content: center; 
       font-size: 13px;
       padding: 6px 12px;
   }
   .welcome-title { 
       font-size: 26px; 
   }
   .welcome-subtitle {
       font-size: 14px;
       margin-bottom: 32px;
   }
   #welcome-screen { 
       padding: 24px 16px; 
   }
}

/* =========================================
  INPUT (MESAJ KUTUSU)
========================================= */
#input-container {
   flex-shrink: 0;
   width: 100%;
   padding: 24px 0;
   background: linear-gradient(180deg, transparent, var(--bg-main) 40%);
   display: flex;
   justify-content: center;
   padding-bottom: calc(24px + env(safe-area-inset-bottom));
   position: relative;
   z-index: 10;
}

.input-box {
   width: 90%;
   max-width: var(--chat-max-width);
   background: #40414f;
   border: 1px solid rgba(255,255,255,0.1);
   border-radius: var(--radius-md);
   display: flex;
   align-items: center;
   padding: 12px 18px;
   box-shadow: var(--shadow-md);
   position: relative;
   transition: var(--transition);
}

.input-box:focus-within {
   border-color: var(--accent);
   box-shadow: var(--shadow-md), var(--shadow-glow);
   transform: translateY(-2px);
}

#user-input {
   flex: 1;
   background: none;
   border: none;
   color: white;
   font-size: 16px;
   outline: none;
   padding: 8px;
   transition: var(--transition);
}

#user-input::placeholder {
   color: var(--text-muted);
   transition: var(--transition);
}

#user-input:focus::placeholder {
   opacity: 0.5;
}

#send-btn {
   background: var(--accent);
   color: white;
   border: none;
   width: 36px; 
   height: 36px;
   border-radius: 8px;
   cursor: pointer;
   display: flex;
   align-items: center;
   justify-content: center;
   transition: var(--transition);
   font-size: 14px;
   box-shadow: 0 2px 8px var(--accent-glow);
}

#send-btn:disabled { 
   opacity: 0.4; 
   cursor: not-allowed;
   transform: none;
   box-shadow: none;
}

#send-btn:hover:not(:disabled) { 
   background: var(--accent-hover);
   transform: scale(1.1) rotate(-5deg);
   box-shadow: 0 4px 16px var(--accent-glow);
}

#send-btn:active:not(:disabled) {
   transform: scale(0.95);
}

/* =========================================
  FAB BUTONU
========================================= */
.fab-btn {
   position: fixed;
   bottom: 100px;
   right: 28px;
   width: 60px; 
   height: 60px;
   border-radius: 50%;
   background: linear-gradient(135deg, var(--accent), var(--accent-hover));
   color: white;
   border: none;
   box-shadow: var(--shadow-lg), var(--shadow-glow);
   cursor: pointer;
   z-index: 100;
   transition: var(--transition-bounce);
   display: flex; 
   align-items: center; 
   justify-content: center;
   font-size: 22px;
}

.fab-btn:hover { 
   transform: scale(1.15) rotate(90deg); 
   box-shadow: 0 8px 32px var(--accent-glow);
}

.fab-btn.active { 
   transform: rotate(45deg) scale(1.1); 
   box-shadow: 0 0 30px var(--accent-glow);
}

.fab-menu {
   position: fixed;
   bottom: 180px;
   right: 28px;
   display: none;
   flex-direction: column;
   gap: 12px;
   z-index: 99;
   align-items: flex-end;
}

.fab-item {
   background: var(--bg-sidebar);
   border: 1px solid var(--border-color);
   color: var(--text-light);
   padding: 12px 20px;
   border-radius: 28px;
   cursor: pointer;
   font-size: 14px;
   font-weight: 500;
   display: flex;
   align-items: center;
   gap: 10px;
   box-shadow: var(--shadow-md);
   opacity: 0;
   transform: translateX(30px) scale(0.8);
   transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
   backdrop-filter: blur(10px);
}

.fab-menu.open .fab-item {
   opacity: 1;
   transform: translateX(0) scale(1);
}

.fab-item:hover {
   background: var(--bg-chat);
   border-color: var(--accent);
   transform: translateX(-8px) scale(1.05);
   box-shadow: var(--shadow-lg), var(--shadow-glow);
   color: var(--accent);
}

.fab-item i {
   font-size: 16px;
   transition: transform 0.3s;
}

.fab-item:hover i {
   transform: scale(1.2);
}

/* =========================================
  MOBİL
========================================= */
@media (max-width: 768px) {
   .header { 
       display: flex; 
       justify-content: space-between; 
   }
   
   #sidebar {
       position: fixed;
       left: 0; 
       top: 0; 
       bottom: 0;
       transform: translateX(-100%);
       box-shadow: none;
   }
   
   #sidebar.open { 
       transform: translateX(0);
       box-shadow: 4px 0 24px rgba(0,0,0,0.4);
   }
   
   #sidebar-overlay {
       position: fixed; 
       inset: 0;
       background: rgba(0,0,0,0.6);
       display: none; 
       z-index: 900;
       backdrop-filter: blur(4px);
       opacity: 0;
       transition: opacity 0.3s;
   }
   
   #sidebar-overlay.open { 
       display: block;
       opacity: 1;
   }
   
   .input-box { 
       width: 95%; 
       border-radius: 28px;
       padding: 10px 16px;
   }
   
   #input-container {
       padding: 12px 0;
       padding-bottom: calc(16px + env(safe-area-inset-bottom));
   }
   
   .gen-modal-content { 
       max-width: 95vw !important; 
   }
   
   .model-grid { 
       grid-template-columns: 1fr !important; 
   }
   
   .canvas-area { 
       height: 250px !important; 
   }
   
   .params-section { 
       grid-template-columns: 1fr !important; 
   }
   
   .fab-btn { 
       bottom: 90px; 
       right: 16px; 
       width: 52px; 
       height: 52px;
       font-size: 18px;
   }
   
   .fab-menu { 
       bottom: 155px; 
       right: 16px; 
   }
   
   .theme-picker {
       grid-template-columns: repeat(4, 1fr) !important;
   }
}

/* =========================================
  TEMA SEÇİCİ (SETTINGS MODALİ)
========================================= */
.theme-picker {
   display: grid;
   grid-template-columns: repeat(4, 1fr);
   gap: 10px;
   margin-bottom: 20px;
}

.theme-dot {
   height: 40px;
   border-radius: 10px;
   border: 2px solid transparent;
   cursor: pointer;
   transition: var(--transition-bounce);
   display: flex;
   align-items: center;
   justify-content: center;
   font-size: 10px;
   font-weight: 700;
   color: rgba(255,255,255,0.8);
   letter-spacing: 0.5px;
   position: relative;
   overflow: hidden;
   box-shadow: var(--shadow-sm);
}

.theme-dot::after {
   content: '';
   position: absolute;
   inset: 0;
   background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
   opacity: 0;
   transition: opacity 0.3s;
}

.theme-dot:hover::after {
   opacity: 1;
}

.theme-dot:hover { 
   transform: scale(1.12) translateY(-3px);
   box-shadow: var(--shadow-md);
}

.theme-dot.active { 
   border-color: var(--accent); 
   box-shadow: 0 0 0 3px var(--accent-glow), var(--shadow-md);
   transform: scale(1.08);
}

.theme-dot[data-t="light"] { 
   color: #333;
   border: 1px solid rgba(0,0,0,0.1);
}

.char-opt {
   padding: 10px 12px;
   border-radius: 10px;
   border: 1px solid var(--border-color);
   background: var(--bg-main);
   color: var(--text-muted);
   font-size: 13px;
   font-weight: 600;
   cursor: pointer;
   text-align: center;
   transition: var(--transition);
   display: flex;
   align-items: center;
   justify-content: center;
   gap: 6px;
}

.char-opt:hover { 
   border-color: var(--accent); 
   color: var(--text-light);
   transform: translateY(-2px);
   box-shadow: var(--shadow-sm);
}

.char-opt.active {
   border-color: var(--accent);
   background: linear-gradient(135deg, var(--accent), var(--accent-hover));
   color: white;
   box-shadow: 0 4px 12px var(--accent-glow);
   transform: scale(1.05);
}

/* =========================================
  MODAL (AYARLAR)
========================================= */
.modal-overlay {
   position: fixed; 
   inset: 0;
   background: rgba(0,0,0,0.7);
   display: none; 
   align-items: center; 
   justify-content: center;
   z-index: 9999; 
   backdrop-filter: blur(8px);
   opacity: 0;
   transition: opacity 0.3s;
}

.modal-overlay[style*="flex"] {
   opacity: 1;
}

.modal-content {
   background: var(--bg-sidebar);
   width: 92%; 
   max-width: 520px;
   max-height: 85vh;
   border-radius: var(--radius-lg); 
   border: 1px solid var(--border-color);
   box-shadow: var(--shadow-lg);
   display: flex; 
   flex-direction: column;
   overflow: hidden;
   animation: modalSlide 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes modalSlide {
   0% { 
       opacity: 0; 
       transform: scale(0.9) translateY(40px); 
       filter: blur(10px);
   }
   100% { 
       opacity: 1; 
       transform: scale(1) translateY(0); 
       filter: blur(0);
   }
}

.modal-header {
   padding: 20px 24px; 
   border-bottom: 1px solid var(--border-color);
   display: flex; 
   justify-content: space-between; 
   align-items: center;
   background: rgba(0,0,0,0.1);
}

.modal-header h2 { 
   font-size: 20px; 
   color: var(--text-light);
   display: flex;
   align-items: center;
   gap: 10px;
}

.modal-header h2 i {
   color: var(--accent);
}

.modal-header button { 
   background: none; 
   border: none; 
   color: var(--text-muted); 
   cursor: pointer; 
   font-size: 22px;
   width: 36px;
   height: 36px;
   border-radius: 8px;
   display: flex;
   align-items: center;
   justify-content: center;
   transition: var(--transition);
}

.modal-header button:hover {
   color: var(--text-light);
   background: rgba(255,255,255,0.06);
   transform: rotate(90deg);
}

.modal-body { 
   padding: 24px; 
   overflow-y: auto;
}

.modal-body label { 
   display: block; 
   margin-bottom: 10px; 
   font-weight: 700; 
   color: var(--text-light);
   font-size: 14px;
   text-transform: uppercase;
   letter-spacing: 0.5px;
}

.modal-body p { 
   font-size: 13px; 
   color: var(--text-muted); 
   margin-bottom: 16px;
   line-height: 1.5;
}

.modal-body textarea {
   width: 100%; 
   background: var(--bg-main); 
   color: var(--text-light);
   border: 1px solid var(--border-color); 
   border-radius: var(--radius-sm);
   padding: 14px; 
   font-size: 14px; 
   resize: vertical; 
   min-height: 100px; 
   outline: none;
   transition: var(--transition);
   font-family: inherit;
}

.modal-body textarea:focus {
   border-color: var(--accent);
   box-shadow: 0 0 0 3px var(--accent-glow);
}

.modal-footer {
   padding: 20px 24px; 
   border-top: 1px solid var(--border-color);
   display: flex; 
   justify-content: flex-end;
   gap: 12px;
}

.modal-footer .save-btn {
   background: linear-gradient(135deg, var(--accent), var(--accent-hover));
   color: white;
   border: none; 
   padding: 12px 28px; 
   border-radius: var(--radius-sm);
   cursor: pointer; 
   font-weight: 700;
   font-size: 14px;
   transition: var(--transition);
   box-shadow: 0 4px 12px var(--accent-glow);
   position: relative;
   overflow: hidden;
}

.modal-footer .save-btn::before {
   content: '';
   position: absolute;
   top: 0;
   left: -100%;
   width: 100%;
   height: 100%;
   background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
   transition: left 0.5s;
}

.modal-footer .save-btn:hover::before {
   left: 100%;
}

.modal-footer .save-btn:hover { 
   transform: translateY(-2px);
   box-shadow: 0 6px 20px var(--accent-glow);
}

[data-theme="light"] .modal-content { 
   background: #ffffff; 
   box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

[data-theme="light"] .modal-body textarea { 
   background: #f8f8fa; 
   border: 1px solid rgba(0,0,0,0.15); 
   color: #000;
}

[data-theme="light"] .modal-body textarea:focus {
   border-color: var(--accent);
   box-shadow: 0 0 0 3px var(--accent-glow);
}

/* =========================================
  GEMMA UYARISI
========================================= */
.gemma-warning {
   margin-top: 20px;
   padding: 14px;
   background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(245, 158, 11, 0.03));
   border: 1px solid rgba(245, 158, 11, 0.2);
   border-radius: var(--radius-sm);
   font-size: 12px;
   color: var(--text-muted);
   text-align: center;
   line-height: 1.6;
   display: flex;
   align-items: center;
   justify-content: center;
   gap: 10px;
   animation: fadeSlideUp 0.5s ease 0.3s both;
}

.gemma-warning i { 
   color: #f59e0b; 
   font-size: 16px;
   animation: pulse 2s infinite;
}

/* =========================================
  MESAJ AKSİYONLARI
========================================= */
.message-actions {
   display: flex;
   gap: 16px;
   margin-top: 12px;
   padding-top: 10px;
   border-top: 1px solid rgba(255, 255, 255, 0.05);
   opacity: 0;
   animation: fadeIn 0.3s ease 0.5s forwards;
}

.message-wrapper:hover .message-actions {
   opacity: 1;
}

.action-btn {
   background: none; 
   border: none;
   color: var(--text-muted);
   font-size: 13px; 
   cursor: pointer;
   display: flex; 
   align-items: center; 
   gap: 6px;
   transition: var(--transition);
   padding: 6px 10px;
   border-radius: 6px;
   font-weight: 500;
}

.action-btn:hover { 
   color: var(--accent); 
   background: rgba(255,255,255,0.04);
   transform: translateY(-2px);
}

.action-btn i { 
   font-size: 14px; 
   transition: transform 0.3s; 
}

.action-btn:hover i { 
   transform: translateY(-3px) scale(1.1); 
}

[data-theme="light"] .action-btn:hover { 
   color: var(--accent-hover); 
}

/* =========================================
  REFRESH BUTONU
========================================= */
.refresh-btn-wrapper {
   display: flex;
   align-items: center;
   gap: 10px;
   margin-top: 12px;
   padding-top: 10px;
   border-top: 1px solid rgba(255,255,255,0.05);
   animation: fadeSlideUp 0.4s ease both;
}

.refresh-btn {
   background: transparent;
   border: 1px solid var(--border-color);
   color: var(--text-muted);
   padding: 8px 16px;
   border-radius: 8px;
   font-size: 13px;
   cursor: pointer;
   display: flex;
   align-items: center;
   gap: 8px;
   transition: var(--transition);
   font-weight: 500;
}

.refresh-btn:hover {
   border-color: var(--accent);
   color: var(--accent);
   background: rgba(16, 163, 127, 0.05);
   transform: translateY(-2px);
   box-shadow: 0 4px 12px var(--accent-glow);
}

.refresh-btn i { 
   transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55); 
}

.refresh-btn:hover i { 
   transform: rotate(360deg) scale(1.2); 
}

/* =========================================
  LİNK STİLLERİ
========================================= */
.text a {
   color: var(--accent) !important;
   text-decoration: none !important;
   word-break: break-all;
   transition: all 0.3s;
   border-bottom: 1px solid transparent;
   font-weight: 500;
}

.text a:hover { 
   color: var(--accent-hover) !important;
   border-bottom-color: var(--accent);
}

[data-theme="light"] .text a { 
   color: var(--accent) !important; 
}

[data-theme="light"] .text a:hover { 
   color: var(--accent-hover) !important; 
}

.msg-text { 
   all: unset; 
   display: block; 
   width: 100%; 
}

.markdown-body { 
   word-wrap: break-word; 
}

/* =========================================
  SLASH KOMUT MENÜSÜ
========================================= */
.command-menu {
   position: absolute;
   bottom: calc(100% + 12px);
   left: 0;
   width: 100%;
   background: var(--bg-sidebar);
   border: 1px solid var(--border-color);
   border-radius: var(--radius-md);
   box-shadow: var(--shadow-lg);
   display: none;
   flex-direction: column;
   max-height: 260px;
   overflow-y: auto;
   z-index: 2000;
   animation: menuSlide 0.3s cubic-bezier(0.16, 1, 0.3, 1);
   backdrop-filter: blur(10px);
}

@keyframes menuSlide {
   from { 
       opacity: 0; 
       transform: translateY(10px) scale(0.95); 
   }
   to { 
       opacity: 1; 
       transform: translateY(0) scale(1); 
   }
}

.command-item {
   padding: 14px 18px;
   cursor: pointer;
   display: flex; 
   align-items: center; 
   gap: 14px;
   color: var(--text-light);
   border-bottom: 1px solid var(--border-color);
   transition: var(--transition);
   position: relative;
   overflow: hidden;
}

.command-item:last-child { 
   border-bottom: none; 
}

.command-item::before {
   content: '';
   position: absolute;
   left: 0;
   top: 0;
   bottom: 0;
   width: 3px;
   background: var(--accent);
   transform: scaleY(0);
   transition: transform 0.3s;
}

.command-item:hover::before,
.command-item.active::before {
   transform: scaleY(1);
}

.command-item:hover, 
.command-item.active { 
   background: rgba(255, 255, 255, 0.06); 
}

.command-item.active { 
   padding-left: 21px;
}

.cmd-icon {
   background: linear-gradient(135deg, var(--accent), var(--accent-hover));
   color: white;
   width: 34px; 
   height: 34px;
   border-radius: 8px;
   display: flex; 
   align-items: center; 
   justify-content: center;
   font-size: 14px;
   box-shadow: 0 2px 8px var(--accent-glow);
   transition: var(--transition);
}

.command-item:hover .cmd-icon {
   transform: scale(1.1) rotate(-5deg);
}

.cmd-text { 
   display: flex; 
   flex-direction: column; 
}

.cmd-title { 
   font-weight: 700; 
   font-size: 14px; 
   color: var(--text-light); 
}

.cmd-desc { 
   font-size: 12px; 
   color: var(--text-muted); 
   margin-top: 3px; 
}

[data-theme="light"] .command-menu { 
   background: #ffffff; 
   box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}

[data-theme="light"] .command-item:hover { 
   background: rgba(0, 0, 0, 0.03); 
}

[data-theme="light"] .cmd-title { 
   color: var(--text-light); 
}

/* =========================================
  SEÇİM MENÜSÜ
========================================= */
.selection-menu {
   position: fixed;
   display: none;
   background: linear-gradient(135deg, #2d2d2d, #1a1a1a);
   border: 1px solid var(--accent);
   border-radius: 12px;
   padding: 6px;
   gap: 4px;
   z-index: 10000;
   box-shadow: var(--shadow-lg), var(--shadow-glow);
   flex-direction: row;
   overflow: hidden;
   animation: popIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes popIn {
   from { 
       opacity: 0; 
       transform: scale(0.8) translateY(10px); 
   }
   to { 
       opacity: 1; 
       transform: scale(1) translateY(0); 
   }
}

.selection-menu button {
   background: transparent;
   color: white;
   border: none;
   padding: 8px 14px;
   font-size: 13px;
   font-weight: 600;
   cursor: pointer;
   border-radius: 8px;
   transition: var(--transition);
   display: flex;
   align-items: center;
   gap: 8px;
   position: relative;
   overflow: hidden;
}

.selection-menu button::before {
   content: '';
   position: absolute;
   inset: 0;
   background: var(--accent);
   opacity: 0;
   transition: opacity 0.3s;
   border-radius: 6px;
}

.selection-menu button:hover::before {
   opacity: 0.15;
}

.selection-menu button:hover { 
   color: var(--accent);
   transform: translateY(-2px);
}

.selection-menu button i {
   transition: transform 0.3s;
}

.selection-menu button:hover i {
   transform: scale(1.2);
}

/* =========================================
  TİPİNG İNDİKATÖR
========================================= */
.typing-indicator {
   display: inline-flex;
   align-items: center;
   margin-left: 8px;
   gap: 4px;
}

.typing-indicator span {
   height: 8px; 
   width: 8px; 
   background: var(--accent);
   display: inline-block; 
   border-radius: 50%;
   animation: bounce 1.4s ease-in-out infinite;
   box-shadow: 0 0 8px var(--accent-glow);
}

.typing-indicator span:nth-child(1) { 
   animation-delay: -0.32s; 
}

.typing-indicator span:nth-child(2) { 
   animation-delay: -0.16s; 
}

@keyframes bounce {
   0%, 80%, 100% { 
       transform: scale(0.6); 
       opacity: 0.5;
   }
   40% { 
       transform: scale(1); 
       opacity: 1;
       box-shadow: 0 0 12px var(--accent-glow);
   }
}

/* =========================================
  SCROLLBAR
========================================= */
::-webkit-scrollbar { 
   width: 6px; 
}

::-webkit-scrollbar-track { 
   background: transparent; 
}

::-webkit-scrollbar-thumb { 
   background: rgba(255, 255, 255, 0.08); 
   border-radius: 10px; 
   transition: background 0.3s;
}

::-webkit-scrollbar-thumb:hover { 
   background: rgba(255, 255, 255, 0.2); 
}

/* =========================================
  KOD BLOĞU
========================================= */
.text pre {
   white-space: pre-wrap;
   word-break: break-word;
   overflow-x: auto;
   padding: 16px;
   border-radius: 0 0 var(--radius-sm) var(--radius-sm);
   background: #1e1e2f;
   margin: 0;
   font-size: 14px;
   line-height: 1.6;
}

.code-wrapper {
   background: #1e1e1e;
   border-radius: var(--radius-md);
   overflow: hidden;
   margin: 20px 0;
   border: 1px solid rgba(255,255,255,0.08);
   box-shadow: var(--shadow-md);
   transition: var(--transition);
}

.code-wrapper:hover {
   box-shadow: var(--shadow-lg);
   border-color: rgba(255,255,255,0.12);
}

.code-header {
   background: linear-gradient(135deg, #2d2d2d, #252525);
   padding: 12px 18px;
   display: flex; 
   align-items: center; 
   justify-content: space-between;
   border-bottom: 1px solid rgba(255,255,255,0.05);
}

.mac-dots { 
   display: flex; 
   gap: 8px; 
}

.dot { 
   width: 14px; 
   height: 14px; 
   border-radius: 50%; 
   display: inline-block;
   transition: var(--transition);
   box-shadow: inset 0 0 0 0.5px rgba(0,0,0,0.2);
}

.dot:hover {
   transform: scale(1.2);
}

.dot.red { 
   background: #ff5f56; 
}

.dot.yellow { 
   background: #ffbd2e; 
}

.dot.green { 
   background: #27c93f; 
}

.copy-btn {
   background: rgba(255,255,255,0.06);
   border: 1px solid rgba(255,255,255,0.1);
   color: #ccc;
   font-size: 12px;
   padding: 6px 14px;
   border-radius: 6px;
   cursor: pointer;
   transition: var(--transition);
   font-weight: 500;
}

.copy-btn:hover { 
   background: rgba(255,255,255,0.1); 
   color: #fff;
   transform: translateY(-2px);
   border-color: rgba(255,255,255,0.2);
}

.copy-btn.copied { 
   border-color: #27c93f; 
   color: #27c93f; 
   background: rgba(39, 201, 63, 0.1);
   animation: pulse 0.5s;
}

.code-wrapper pre {
   margin: 0; 
   padding: 18px; 
   overflow-x: auto;
   font-family: 'Fira Code', 'Courier New', monospace;
   font-size: 14px; 
   color: #e6e6e6;
   line-height: 1.7;
}

/* =========================================
  GENERATION MODAL
========================================= */
.gen-modal-overlay {
   position: fixed; 
   inset: 0;
   background: rgba(0,0,0,0.8);
   display: none; 
   align-items: center; 
   justify-content: center;
   z-index: 99998; 
   backdrop-filter: blur(12px);
   opacity: 0;
   transition: opacity 0.3s;
}

.gen-modal-overlay[style*="flex"] {
   opacity: 1;
}

.gen-modal-content {
   background: var(--bg-sidebar);
   width: 92%; 
   max-width: 760px;
   max-height: 90vh;
   border-radius: var(--radius-lg); 
   border: 1px solid var(--border-color);
   box-shadow: var(--shadow-lg);
   display: flex; 
   flex-direction: column;
   overflow: hidden;
   animation: modalSlide 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.gen-modal-header {
   padding: 20px 28px;
   border-bottom: 1px solid var(--border-color);
   display: flex; 
   justify-content: space-between; 
   align-items: center;
   background: linear-gradient(135deg, var(--bg-main), var(--bg-sidebar));
}

.gen-modal-header h2 {
   font-size: 20px; 
   color: var(--text-light);
   display: flex; 
   align-items: center; 
   gap: 12px;
   font-weight: 700;
}

.gen-modal-header h2 i { 
   color: var(--accent);
   font-size: 22px;
}

.gen-modal-header button {
   background: none; 
   border: none;
   color: var(--text-muted); 
   cursor: pointer;
   font-size: 22px; 
   width: 40px; 
   height: 40px;
   border-radius: 10px; 
   display: flex; 
   align-items: center; 
   justify-content: center;
   transition: var(--transition);
}

.gen-modal-header button:hover { 
   background: rgba(255,255,255,0.08); 
   color: var(--text-light);
   transform: rotate(90deg);
}

.gen-modal-body {
   padding: 28px;
   overflow-y: auto;
   flex: 1;
}

/* Tip Seçici */
.type-selector {
   display: flex;
   gap: 16px;
   margin-bottom: 28px;
}

.type-btn {
   flex: 1;
   padding: 18px;
   border-radius: var(--radius-md);
   border: 2px solid var(--border-color);
   background: var(--bg-main);
   color: var(--text-muted);
   cursor: pointer;
   transition: var(--transition);
   display: flex;
   flex-direction: column;
   align-items: center;
   gap: 10px;
   font-size: 15px;
   font-weight: 700;
   position: relative;
   overflow: hidden;
}

.type-btn::before {
   content: '';
   position: absolute;
   inset: 0;
   background: linear-gradient(135deg, var(--accent-glow), transparent);
   opacity: 0;
   transition: opacity 0.3s;
}

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

.type-btn i { 
   font-size: 28px; 
   transition: var(--transition-bounce);
}

.type-btn:hover {
   border-color: var(--accent);
   color: var(--text-light);
   background: var(--bg-chat);
   transform: translateY(-4px);
   box-shadow: var(--shadow-md);
}

.type-btn:hover i {
   transform: scale(1.2) rotate(-10deg);
}

.type-btn.active {
   border-color: var(--accent);
   background: linear-gradient(135deg, rgba(16, 163, 127, 0.1), rgba(16, 163, 127, 0.05));
   color: var(--accent);
   box-shadow: 0 0 20px var(--accent-glow);
}

.type-btn.active i {
   animation: pulse 2s infinite;
}

/* Model Seçici */
.model-section {
   margin-bottom: 28px;
}

.model-section-label {
   font-size: 12px;
   font-weight: 800;
   color: var(--text-muted);
   text-transform: uppercase;
   letter-spacing: 1.5px;
   margin-bottom: 16px;
}

.model-grid {
   display: grid;
   grid-template-columns: repeat(2, 1fr);
   gap: 12px;
}

.model-card {
   padding: 18px;
   border-radius: var(--radius-sm);
   border: 1px solid var(--border-color);
   background: var(--bg-main);
   cursor: pointer;
   transition: var(--transition);
   display: flex;
   flex-direction: column;
   gap: 8px;
   position: relative;
   overflow: hidden;
}

.model-card::before {
   content: '';
   position: absolute;
   top: 0;
   left: 0;
   width: 4px;
   height: 100%;
   background: var(--accent);
   transform: scaleY(0);
   transition: transform 0.3s;
}

.model-card:hover::before,
.model-card.active::before {
   transform: scaleY(1);
}

.model-card:hover {
   border-color: var(--accent);
   background: var(--bg-chat);
   transform: translateX(4px);
   box-shadow: var(--shadow-sm);
}

.model-card.active {
   border-color: var(--accent);
   background: linear-gradient(135deg, rgba(16, 163, 127, 0.08), transparent);
   box-shadow: 0 0 0 1px var(--accent), var(--shadow-glow);
}

.model-card-name {
   font-size: 15px;
   font-weight: 700;
   color: var(--text-light);
   display: flex;
   align-items: center;
   gap: 10px;
}

.model-card-name i { 
   color: var(--accent); 
   font-size: 14px; 
}

.model-card-desc {
   font-size: 12px;
   color: var(--text-muted);
   line-height: 1.5;
}

.model-card-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    padding: 4px 12px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--accent-glow), transparent);
    color: var(--accent);
    width: fit-content;
    margin-top: 6px;
    font-weight: 600;
    border: 1px solid rgba(16, 163, 127, 0.2);
}

/* Prompt Alanı */
.prompt-section {
    margin-bottom: 24px;
}

.prompt-section label {
    display: block;
    font-size: 12px;
    font-weight: 800;
    color: var(--text-light);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#gen-prompt-input {
    width: 100%;
    background: var(--bg-main);
    color: var(--text-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    font-size: 15px;
    font-family: inherit;
    resize: vertical;
    min-height: 120px;
    outline: none;
    transition: var(--transition);
    line-height: 1.6;
}

#gen-prompt-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow), var(--shadow-sm);
}

#gen-prompt-input::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

.prompt-examples {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.prompt-ex {
    font-size: 12px;
    padding: 8px 16px;
    border-radius: 24px;
    background: var(--bg-chat);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.prompt-ex::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--accent-glow), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.prompt-ex:hover::before {
    opacity: 1;
}

.prompt-ex:hover {
    color: var(--text-light);
    border-color: var(--accent);
    background: var(--bg-main);
    transform: translateY(-3px);
    box-shadow: var(--shadow-sm);
}

/* Canvas / Önizleme Alanı */
.canvas-section {
    margin-bottom: 24px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: var(--bg-main);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.canvas-section:hover {
    box-shadow: var(--shadow-md);
}

.canvas-header {
    padding: 14px 20px;
    background: linear-gradient(135deg, var(--bg-sidebar), var(--bg-main));
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.canvas-header span {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.canvas-area {
    height: 360px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: 
        repeating-conic-gradient(var(--bg-chat) 0% 25%, transparent 0% 50%) 50% / 24px 24px;
    overflow: hidden;
}

.canvas-placeholder {
    text-align: center;
    color: var(--text-muted);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.canvas-placeholder i {
    font-size: 56px;
    margin-bottom: 16px;
    opacity: 0.25;
    display: block;
    transition: var(--transition);
}

.canvas-placeholder:hover i {
    opacity: 0.4;
    transform: scale(1.1);
}

.canvas-placeholder p {
    font-size: 15px;
    font-weight: 500;
}

/* Canvas Loading */
.canvas-loading {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.canvas-loading.active { 
    display: flex; 
}

.canvas-spinner {
    width: 56px; 
    height: 56px;
    border: 4px solid var(--border-color);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    box-shadow: 0 0 20px var(--accent-glow);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.canvas-loading-text {
    font-size: 16px;
    color: var(--text-light);
    text-align: center;
    font-weight: 600;
    animation: pulse 2s ease-in-out infinite;
}

.canvas-loading-sub {
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
}

.canvas-progress {
    width: 240px;
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.canvas-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent), var(--accent-hover));
    border-radius: 3px;
    animation: progressAnim 2s ease-in-out infinite;
    box-shadow: 0 0 10px var(--accent-glow);
}

@keyframes progressAnim {
    0% { 
        width: 0%; 
        margin-left: 0; 
    }
    50% { 
        width: 70%; 
        margin-left: 15%; 
    }
    100% { 
        width: 0%; 
        margin-left: 100%; 
    }
}

/* Canvas Result */
.canvas-result {
    display: none;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.5s ease;
}

.canvas-result.active { 
    display: flex; 
}

.canvas-result img, 
.canvas-result video {
    max-width: 100%;
    max-height: 320px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    animation: resultReveal 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    transition: var(--transition);
}

.canvas-result img:hover,
.canvas-result video:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

@keyframes resultReveal {
    0% { 
        opacity: 0; 
        transform: scale(0.9) translateY(20px); 
        filter: blur(10px);
    }
    100% { 
        opacity: 1; 
        transform: scale(1) translateY(0); 
        filter: blur(0);
    }
}

/* Parametreler */
.params-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

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

.param-group label {
    font-size: 11px;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.param-group select, 
.param-group input {
    background: var(--bg-main);
    color: var(--text-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    outline: none;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.param-group select:focus, 
.param-group input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.param-group select:hover,
.param-group input:hover {
    border-color: rgba(255,255,255,0.2);
}

/* Generate Butonu */
.gen-footer {
    padding: 20px 28px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 14px;
    background: linear-gradient(135deg, var(--bg-main), var(--bg-sidebar));
}

.gen-btn-primary {
    flex: 1;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    color: white;
    border: none;
    padding: 16px;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--transition);
    box-shadow: 0 4px 16px var(--accent-glow);
    position: relative;
    overflow: hidden;
}

.gen-btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.6s;
}

.gen-btn-primary:hover::before {
    left: 100%;
}

.gen-btn-primary:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px var(--accent-glow);
}

.gen-btn-primary:active:not(:disabled) {
    transform: translateY(-1px) scale(0.98);
}

.gen-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.gen-btn-secondary {
    padding: 16px 24px;
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.gen-btn-secondary:hover {
    border-color: var(--accent);
    color: var(--text-light);
    background: var(--bg-chat);
    transform: translateY(-2px);
}

/* Sonuç Kartı (Chat içinde) */
.gen-result-card {
    background: var(--bg-sidebar);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin: 12px 0;
    max-width: 560px;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    animation: cardSlide 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.gen-result-card:hover {
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    transform: translateY(-4px);
}

.gen-result-card .gen-media {
    width: 100%;
    display: block;
    background: var(--bg-main);
    transition: var(--transition);
}

.gen-result-card .gen-info {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, var(--bg-sidebar), var(--bg-main));
}

.gen-result-card .gen-info-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.gen-result-card .gen-info-meta {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-weight: 500;
}

.gen-result-card .gen-info-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.gen-result-card .gen-actions {
    display: flex;
    gap: 0;
    background: var(--bg-main);
}

.gen-result-card .gen-actions button {
    flex: 1;
    background: none;
    border: none;
    border-right: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 13px;
    padding: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

.gen-result-card .gen-actions button::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent);
    opacity: 0;
    transition: opacity 0.3s;
}

.gen-result-card .gen-actions button:hover::before {
    opacity: 0.05;
}

.gen-result-card .gen-actions button:last-child { 
    border-right: none; 
}

.gen-result-card .gen-actions button:hover {
    background: var(--bg-chat);
    color: var(--text-light);
}

.gen-result-card .gen-actions button:hover i {
    transform: scale(1.2);
    color: var(--accent);
}

.gen-result-card .gen-actions button i {
    transition: var(--transition);
    font-size: 14px;
}

/* Video özellikleri */
video.gen-media {
    max-height: 420px;
}

/* Input buton grubu */
.input-btn-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.input-img-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    width: 36px;
    height: 36px;
    justify-content: center;
}

.input-img-btn:hover { 
    color: var(--accent); 
    background: rgba(255,255,255,0.06);
    transform: translateY(-2px);
}

.input-img-btn.active { 
    color: var(--accent);
    background: var(--accent-glow);
}

/* Karakter modu etiketi */
.character-badge {
    position: absolute; 
    top: -32px; 
    right: 0;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    color: white;
    font-size: 11px; 
    font-weight: 700; 
    padding: 4px 12px;
    border-radius: 8px 8px 0 0; 
    opacity: 0.9;
    pointer-events: none;
    box-shadow: 0 -4px 12px var(--accent-glow);
    animation: fadeSlideDown 0.3s ease;
    letter-spacing: 0.5px;
}

@keyframes fadeSlideDown {
    from { 
        opacity: 0; 
        transform: translateY(-10px); 
    }
    to { 
        opacity: 0.9; 
        transform: translateY(0); 
    }
}

/* Mesaj düzenleme */
.message-wrapper.user:hover .msg-edit-btn { 
    opacity: 1; 
}

.msg-edit-btn {
    opacity: 0;
    background: none; 
    border: none;
    color: var(--text-muted); 
    font-size: 13px; 
    cursor: pointer;
    padding: 6px 10px; 
    border-radius: 6px;
    transition: var(--transition);
    margin-left: 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.msg-edit-btn:hover { 
    color: var(--accent); 
    background: var(--bg-chat);
    transform: translateY(-2px);
}

.edit-textarea {
    width: 100%; 
    background: var(--bg-main); 
    color: var(--text-light);
    border: 2px solid var(--accent); 
    border-radius: var(--radius-sm);
    padding: 14px; 
    font-size: 15px; 
    font-family: inherit;
    resize: none; 
    outline: none; 
    min-height: 80px;
    margin-top: 8px;
    transition: var(--transition);
    line-height: 1.6;
}

.edit-textarea:focus {
    box-shadow: 0 0 0 4px var(--accent-glow);
}

.edit-btns {
    display: flex; 
    gap: 12px; 
    margin-top: 12px;
}

.edit-btns button {
    padding: 10px 18px; 
    border-radius: 8px; 
    font-size: 14px; 
    cursor: pointer;
    border: 1px solid var(--border-color); 
    font-family: inherit;
    transition: var(--transition);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.edit-save { 
    background: linear-gradient(135deg, var(--accent), var(--accent-hover)); 
    color: white; 
    border-color: transparent;
    box-shadow: 0 4px 12px var(--accent-glow);
}

.edit-save:hover { 
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--accent-glow);
}

.edit-cancel { 
    background: none; 
    color: var(--text-muted); 
}

.edit-cancel:hover { 
    color: var(--text-light); 
    background: var(--bg-chat);
    transform: translateY(-2px);
}

/* Mesaj versiyonları */
.msg-version-nav {
    display: flex; 
    align-items: center; 
    gap: 8px;
    font-size: 12px; 
    color: var(--text-muted); 
    margin-top: 8px;
    padding: 6px 0;
    font-weight: 500;
}

.msg-version-nav button {
    background: none; 
    border: 1px solid var(--border-color);
    color: var(--text-muted); 
    padding: 4px 10px; 
    border-radius: 6px;
    cursor: pointer; 
    font-size: 12px; 
    transition: var(--transition);
    font-weight: 600;
}

.msg-version-nav button:hover { 
    color: var(--text-light); 
    border-color: var(--accent);
    background: var(--bg-chat);
    transform: translateY(-2px);
}

.msg-version-nav button:disabled { 
    opacity: 0.3; 
    cursor: default;
    transform: none;
}

/* Copy success */
.copy-success { 
    color: var(--accent) !important; 
}

/* Kopyalandı animasyonu */
@keyframes copyPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Genel animasyonlar */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Scrollbar güncelleme */
#history-list::-webkit-scrollbar,
.gen-modal-body::-webkit-scrollbar,
#chat-window::-webkit-scrollbar {
    width: 4px;
}

#history-list::-webkit-scrollbar-thumb,
.gen-modal-body::-webkit-scrollbar-thumb,
#chat-window::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.06);
    border-radius: 10px;
}

#history-list::-webkit-scrollbar-thumb:hover,
.gen-modal-body::-webkit-scrollbar-thumb:hover,
#chat-window::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.15);
}

/* Responsive düzeltmeler */
@media (max-width: 640px) {
    .theme-picker {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    
    .params-section {
        grid-template-columns: 1fr !important;
    }
    
    .type-selector {
        flex-direction: column;
    }
    
    .welcome-grid {
        grid-template-columns: 1fr !important;
    }
    
    .welcome-chips {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .gen-modal-content {
        width: 96% !important;
        max-height: 95vh !important;
    }
    
    .canvas-area {
        height: 280px !important;
    }
    
    .model-grid {
        grid-template-columns: 1fr !important;
    }
    
    .fab-btn {
        bottom: 80px !important;
        right: 12px !important;
        width: 48px !important;
        height: 48px !important;
    }
    
    .fab-menu {
        bottom: 140px !important;
        right: 12px !important;
    }
    
    .input-box {
        padding: 10px 14px !important;
    }
    
    .login-box {
        padding: 32px 24px !important;
    }
    
    .login-logo {
        font-size: 42px !important;
    }
    
    .welcome-title {
        font-size: 24px !important;
    }
}

/* Hover efektleri için smooth transition */
* {
    transition-property: background-color, border-color, color, box-shadow, transform;
    transition-duration: 0.2s;
    transition-timing-function: ease;
}

/* Focus ring iyileştirmesi */
*:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Selection rengi */
::selection {
    background: var(--accent-glow);
    color: var(--text-light);
}

/* Placeholder stil */
::placeholder {
    color: var(--text-muted);
    opacity: 0.5;
}

/* Input autofill rengi */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--text-light);
    -webkit-box-shadow: 0 0 0px 1000px var(--bg-main) inset;
    transition: background-color 5000s ease-in-out 0s;
}

/* Disable text selection on UI elements */
.new-chat-btn,
.history-item,
.welcome-card,
.chip,
.type-btn,
.model-card,
.theme-dot,
.char-opt,
.fab-btn,
.fab-item,
.action-btn,
.gen-btn-primary,
.gen-btn-secondary {
    user-select: none;
    -webkit-user-select: none;
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
