/* ==========================================================================
   Synapse AI - Modern Bilişsel Arayüz Stilleri (Dark Glassmorphism)
   ========================================================================== */

:root {
    --bg-primary: #09090b; /* Zinc 950 */
    --bg-secondary: #18181b; /* Zinc 900 */
    --bg-surface: rgba(24, 24, 27, 0.65);
    --bg-glass: rgba(39, 39, 42, 0.4);
    --bg-glass-hover: rgba(63, 63, 70, 0.5);
    --border-glass: rgba(255, 255, 255, 0.05);
    --border-glow: rgba(255, 255, 255, 0.1);

    --primary: #ffffff;
    --primary-hover: #e4e4e7;
    --primary-glow: rgba(255, 255, 255, 0.15);
    --accent: #3b82f6; /* Minimalist Blue */
    --accent-glow: rgba(59, 130, 246, 0.25);
    --neon-pink: #ec4899; /* Butonlar için korundu ancak daha az kullanılacak */
    --neon-green: #10b981;
    --neon-amber: #f59e0b;

    --text-main: #fafafa;
    --text-muted: #a1a1aa;
    --text-subtle: #71717a;

    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-full: 9999px;

    --transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    --shadow-soft: 0 4px 20px -5px rgba(0, 0, 0, 0.8);
    --shadow-neon: 0 4px 24px rgba(0, 0, 0, 0.4);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-main);
    height: 100vh;
    overflow: hidden;
    background-image: 
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.06) 0%, transparent 40%),
        radial-gradient(circle at bottom left, rgba(255, 255, 255, 0.02) 0%, transparent 40%);
    display: flex;
    flex-direction: column;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ==========================================================================
   Header & Navigasyon
   ========================================================================== */
.app-header {
    height: 64px;
    background: var(--bg-surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 50;
}

.brand-section {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-logo {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--text-main), var(--text-muted));
    color: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(255, 255, 255, 0.1);
}

.brand-title {
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: -0.3px;
    color: var(--text-main);
}

.brand-tag {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    border: 1px solid var(--border-glass);
    font-weight: 500;
}

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

.model-select-wrapper {
    position: relative;
}

.model-select {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    color: var(--text-main);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    outline: none;
    cursor: pointer;
    transition: var(--transition);
}

.model-select:hover, .model-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 12px var(--primary-glow);
}

.btn-icon {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    color: var(--text-muted);
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.btn-icon:hover {
    color: var(--text-main);
    background: var(--bg-glass-hover);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #4f46e5);
    color: #ffffff;
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--primary-glow);
}

/* ==========================================================================
   Ana Layout (3 Panel Grid)
   ========================================================================== */
.app-container {
    display: flex; /* Grid yerine Flex, böylece ortadaki alan esnek büyür */
    height: calc(100vh - 64px);
    overflow: hidden;
    position: relative;
}

.sidebar-panel {
    width: 280px;
    flex-shrink: 0;
}

.chat-panel {
    flex: 1;
    max-width: 100%;
}

.workstation-panel {
    width: 0; /* Varsayılan olarak kapalı */
    opacity: 0;
    visibility: hidden;
    flex-shrink: 0;
    transition: width 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.3s ease;
    border-left: 1px solid var(--border-glass);
}

/* Harita Açıkken */
.app-container.show-map .workstation-panel {
    width: 480px;
    opacity: 1;
    visibility: visible;
}

/* --- Responsive (Tablet & Mobil) --- */
@media (max-width: 1200px) {
    .app-container.show-map .workstation-panel {
        width: 380px;
    }
}

@media (max-width: 900px) {
    .sidebar-panel {
        position: absolute;
        z-index: 100;
        height: 100%;
        left: -280px;
        transition: left 0.3s ease;
        background: var(--bg-primary); /* Mobilde tam arka plan */
        border-right: 1px solid var(--border-glass);
    }
    
    .sidebar-panel.mobile-open {
        left: 0;
        box-shadow: 10px 0 30px rgba(0,0,0,0.8);
    }

    .app-container.show-map .workstation-panel {
        position: absolute;
        z-index: 90;
        right: 0;
        height: 100%;
        width: 100%; /* Mobilde harita tam ekran olur */
        background: var(--bg-primary);
    }
}

/* ==========================================================================
   Sol Panel (Sidebar)
   ========================================================================== */
.sidebar-panel {
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(12px);
    border-right: 1px solid var(--border-glass);
    display: flex;
    flex-direction: column;
    padding: 16px;
    gap: 14px;
    transition: width 0.3s ease, padding 0.3s ease;
}

.sidebar-panel.collapsed {
    width: 0;
    padding: 0;
    overflow: hidden;
    border: none;
}

.new-chat-btn {
    width: 100%;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(6, 182, 212, 0.1));
    border: 1px dashed rgba(99, 102, 241, 0.4);
    color: #e0e7ff;
    padding: 12px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.new-chat-btn:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(6, 182, 212, 0.2));
    border-color: var(--primary);
    transform: translateY(-1px);
}

.sidebar-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-subtle);
    font-weight: 700;
    margin-top: 8px;
}

.conv-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.conv-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.85rem;
    border: 1px solid transparent;
}

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

.conv-item.active {
    background: rgba(99, 102, 241, 0.15);
    color: #ffffff;
    border-color: rgba(99, 102, 241, 0.3);
    font-weight: 500;
}

.conv-item .delete-conv {
    opacity: 0;
    color: var(--text-subtle);
    cursor: pointer;
    transition: var(--transition);
}

.conv-item:hover .delete-conv {
    opacity: 1;
}

.conv-item .delete-conv:hover {
    color: var(--neon-pink);
}

/* ==========================================================================
   Orta Panel (Sohbet Akışı)
   ========================================================================== */
.chat-panel {
    display: flex;
    flex-direction: column;
    background: transparent;
    position: relative;
    border-right: 1px solid var(--border-glass);
    overflow: hidden;
    min-height: 0;
}

.messages-container {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    padding: 24px 32px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.welcome-hero {
    margin: auto 0;
    text-align: center;
    max-width: 620px;
    align-self: center;
    padding: 40px 20px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 16px;
}

.hero-title {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #ffffff 40%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 28px;
}

.quick-prompts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.prompt-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-glass);
    padding: 14px 16px;
    border-radius: var(--radius-md);
    text-align: left;
    cursor: pointer;
    transition: var(--transition);
}

.prompt-card:hover {
    background: var(--bg-glass-hover);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px -8px rgba(0, 0, 0, 0.6);
}

.prompt-card-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.prompt-card-desc {
    font-size: 0.75rem;
    color: var(--text-subtle);
}

/* Mesaj Balonları */
.message-bubble {
    display: flex;
    gap: 14px;
    max-width: 85%;
    animation: fadeIn 0.3s ease;
}

.message-bubble.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-bubble.assistant {
    align-self: flex-start;
}

.avatar {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    flex-shrink: 0;
}

.avatar.user-avatar {
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

.avatar.ai-avatar {
    background: var(--text-main);
    color: var(--bg-primary);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.05);
}

.msg-content {
    background: var(--bg-surface);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--text-main);
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow-wrap: break-word;
}

.message-bubble.user .msg-content {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.1);
    border-top-right-radius: 4px;
}

.message-bubble.assistant .msg-content {
    border-top-left-radius: 4px;
    backdrop-filter: blur(8px);
}

.msg-content pre {
    background: #020617;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    padding: 12px;
    margin: 10px 0;
    overflow-x: auto;
}

.msg-content code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
}

.msg-content blockquote {
    border-left: 3px solid var(--primary);
    padding-left: 12px;
    margin: 8px 0;
    color: #cbd5e1;
    font-style: italic;
}

.msg-badges {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.badge-tag {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
}

.badge-search {
    background: rgba(6, 182, 212, 0.15);
    color: #22d3ee;
    border: 1px solid rgba(6, 182, 212, 0.3);
}

.badge-slide {
    background: rgba(236, 72, 153, 0.15);
    color: #f472b6;
    border: 1px solid rgba(236, 72, 153, 0.3);
}

/* Durum göstergesi */
.status-indicator {
    align-self: flex-start;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-main);
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-full);
    border: 1px solid var(--border-glass);
    animation: fadeIn 0.3s ease;
}

/* Giriş Alanı */
.chat-input-area {
    padding: 16px 24px 20px;
    background: var(--bg-surface);
    backdrop-filter: blur(16px);
    border-top: 1px solid var(--border-glass);
}

.input-box-wrapper {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: var(--transition);
}

.input-box-wrapper:focus-within {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05);
}

.chat-textarea {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.95rem;
    resize: none;
    min-height: 48px;
    max-height: 160px;
    line-height: 1.5;
}

.chat-textarea::placeholder {
    color: var(--text-subtle);
}

.input-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tool-toggles {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tool-toggle-btn {
    background: transparent;
    border: 1px solid var(--border-glass);
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: var(--transition);
}

.tool-toggle-btn:hover {
    color: var(--text-main);
    border-color: rgba(255, 255, 255, 0.2);
}

.tool-toggle-btn.active {
    background: var(--text-main);
    color: var(--bg-primary);
    border-color: var(--text-main);
}

.tool-toggle-btn.active.slide-btn {
    background: var(--text-main);
    color: var(--bg-primary);
    border-color: var(--text-main);
}

.send-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--text-main);
    border: none;
    color: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 2px 10px rgba(255, 255, 255, 0.1);
}

.send-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(255, 255, 255, 0.15);
}

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

/* ==========================================================================
   Sağ Panel (Bilişsel İstasyon & Görselleştirici)
   ========================================================================== */
.workstation-panel {
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(16px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.workstation-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-glass);
    background: rgba(10, 15, 29, 0.8);
}

.ws-tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 12px 10px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
}

.ws-tab-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.02);
}

.ws-tab-btn.active {
    color: var(--text-main);
    border-bottom-color: var(--text-main);
    background: rgba(255, 255, 255, 0.04);
}

.ws-content-area {
    flex: 1;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.tab-pane {
    display: none;
    flex: 1;
    height: 100%;
    overflow-y: auto;
    position: relative;
}

.tab-pane.active {
    display: flex;
    flex-direction: column;
}

/* Bağlam Haritası Görselleştirici */
#network-graph-container {
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(30, 41, 59, 0.3) 0%, rgba(8, 12, 20, 0.9) 100%);
}

.graph-overlay-controls {
    position: absolute;
    top: 14px;
    right: 14px;
    display: flex;
    gap: 6px;
    z-index: 10;
}

.graph-stat-badge {
    position: absolute;
    bottom: 14px;
    left: 14px;
    background: var(--bg-surface);
    border: 1px solid var(--border-glass);
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    color: var(--text-muted);
    backdrop-filter: blur(8px);
    display: flex;
    gap: 10px;
}

/* Araştırma Kartları */
.research-view {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.research-search-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 6px;
}

.research-input {
    flex: 1;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-size: 0.85rem;
    outline: none;
}

.research-card {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    transition: var(--transition);
}

.research-card:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(6, 182, 212, 0.15);
}

.research-card-source {
    font-size: 0.7rem;
    color: #22d3ee;
    font-weight: 600;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.research-card-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 6px;
    text-decoration: none;
    display: block;
}

.research-card-title:hover {
    color: var(--accent);
}

.research-card-snippet {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Sunum Stüdyosu Paneli */
.presentation-view {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    height: 100%;
}

.presentation-preview-frame {
    width: 100%;
    height: 280px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-glass);
    background: #020617;
    overflow: hidden;
}

.presentation-toolbar {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
}

/* Hafıza Paneli */
.memory-view {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.memory-card {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-left: 3px solid var(--neon-green);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    font-size: 0.82rem;
    color: #e2e8f0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.memory-delete-btn {
    background: transparent;
    border: none;
    color: var(--text-subtle);
    cursor: pointer;
}

.memory-delete-btn:hover {
    color: var(--neon-pink);
}

/* ==========================================================================
   Modallar (Ayarlar & Tam Ekran Sunum)
   ========================================================================== */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.modal-backdrop.open {
    display: flex;
    animation: fadeIn 0.2s ease;
}

.modal-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 540px;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

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

.modal-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}

.form-control {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-size: 0.85rem;
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
}

/* Animasyonlar */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulseGlow {
    0% { box-shadow: 0 0 10px rgba(99, 102, 241, 0.2); }
    100% { box-shadow: 0 0 25px rgba(99, 102, 241, 0.5); }
}

@keyframes dotPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.8); }
}

/* ==========================================================================
   v2 Ek Stiller: Geliştirilmiş Chat ve Bileşenler
   ========================================================================== */

/* Mesaj İç Wrapper */
.msg-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

/* Durum noktası animasyonu */
.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #a5b4fc;
    animation: dotPulse 1.2s ease-in-out infinite;
    margin-right: 2px;
}

/* Sohbet içi arama sonuçları kartı */
.inline-search-results {
    background: rgba(6, 182, 212, 0.08);
    border: 1px solid rgba(6, 182, 212, 0.25);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 0.8rem;
}

.search-results-header {
    font-weight: 700;
    color: #38bdf8;
    margin-bottom: 6px;
}

.search-link {
    color: #22d3ee;
    text-decoration: none;
    display: block;
    margin: 4px 0;
    padding: 2px 0;
    transition: var(--transition);
}

.search-link:hover {
    color: #67e8f9;
    padding-left: 4px;
}

/* Sohbet içi sunum kartı */
.inline-presentation-card {
    background: rgba(236, 72, 153, 0.1);
    border: 1px solid rgba(236, 72, 153, 0.3);
    border-radius: 10px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.pres-card-title {
    font-weight: 700;
    color: #f472b6;
    font-size: 0.9rem;
}

.pres-card-meta {
    font-size: 0.75rem;
    color: #cbd5e1;
}

.pres-card-btn {
    background: #ec4899;
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
}

.pres-card-btn:hover {
    background: #db2777;
    transform: scale(1.02);
}

/* Markdown İçerik Zenginleştirme */
.msg-content h1, .msg-content h2, .msg-content h3,
.msg-content h4, .msg-content h5, .msg-content h6 {
    margin: 12px 0 6px;
    color: #e2e8f0;
    line-height: 1.4;
}

.msg-content h1 { font-size: 1.25rem; }
.msg-content h2 { font-size: 1.1rem; }
.msg-content h3 { font-size: 1rem; }

.msg-content p {
    margin: 6px 0;
    line-height: 1.65;
}

.msg-content ul, .msg-content ol {
    padding-left: 20px;
    margin: 6px 0;
}

.msg-content li {
    margin: 3px 0;
    line-height: 1.6;
}

.msg-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
    font-size: 0.85rem;
}

.msg-content table th,
.msg-content table td {
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 10px;
    text-align: left;
}

.msg-content table th {
    background: rgba(99, 102, 241, 0.15);
    color: #e0e7ff;
    font-weight: 600;
}

.msg-content table tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

.msg-content a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px dotted rgba(6, 182, 212, 0.3);
}

.msg-content a:hover {
    color: #67e8f9;
    border-bottom-color: #67e8f9;
}

.msg-content strong {
    color: #e2e8f0;
}

.msg-content em {
    color: #cbd5e1;
}

.msg-content hr {
    border: none;
    height: 1px;
    background: var(--border-glass);
    margin: 12px 0;
}

/* Responsive: Mobil Panel Geçişleri */
@media (max-width: 900px) {
    .app-container {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr;
    }
    .sidebar-panel {
        position: fixed;
        left: -300px;
        top: 64px;
        width: 280px;
        height: calc(100vh - 64px);
        z-index: 40;
        transition: left 0.3s ease;
    }
    .sidebar-panel.mobile-open {
        left: 0;
    }
    .workstation-panel {
        position: fixed;
        right: -500px;
        top: 64px;
        width: 400px;
        height: calc(100vh - 64px);
        z-index: 40;
        transition: right 0.3s ease;
    }
    .workstation-panel.mobile-open {
        right: 0;
    }
}

/* ==========================================================================
   Yeni Özellikler & UX Bileşenleri
   ========================================================================== */

/* Sohbet Dışa Aktarma Açılır Menüsü */
.dropdown-wrapper {
    position: relative;
    display: inline-block;
}

.export-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 220px;
    background: rgba(24, 24, 27, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6);
    padding: 6px;
    z-index: 100;
    display: none;
    flex-direction: column;
    gap: 4px;
    animation: fadeIn 0.15s ease;
}

.export-dropdown-menu.show {
    display: flex;
}

.export-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-size: 0.85rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    text-align: left;
    transition: var(--transition);
    width: 100%;
}

.export-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    transform: translateX(2px);
}

/* Sol Panel Arama Kutusu */
.sidebar-search-box {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 14px;
}

.sidebar-search-icon {
    position: absolute;
    left: 10px;
    font-size: 0.8rem;
    color: var(--text-muted);
    pointer-events: none;
}

.sidebar-search-input {
    width: 100%;
    padding: 8px 28px 8px 30px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-size: 0.8rem;
    font-family: inherit;
    outline: none;
    transition: var(--transition);
}

.sidebar-search-input:focus {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.05);
}

.btn-clear-search {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.75rem;
    cursor: pointer;
    padding: 2px 4px;
}
.btn-clear-search:hover {
    color: #fff;
}

/* Konuşma Listesi Düzenleme ve Aksiyonları */
.conv-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    gap: 8px;
}

.conv-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--border-glass);
}

.conv-item.active {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.conv-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.conv-item:hover .conv-actions {
    opacity: 1;
}

.conv-action-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.8rem;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
    transition: var(--transition);
}

.conv-action-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.conv-title-input {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--accent);
    color: #fff;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 0.85rem;
    font-family: inherit;
    width: 100%;
    outline: none;
}

/* Kod Bloğu Kopyalama Butonu */
.btn-copy-code {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    border: 1px solid var(--border-glass);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition);
    backdrop-filter: blur(8px);
}

.btn-copy-code:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.btn-copy-code.copied {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.4);
    color: #10b981;
}

/* Asistan Mesajı Aksiyon Butonları */
.msg-bubble-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.msg-action-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: var(--transition);
}

.msg-action-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

/* Durdurma (Stop) Butonu Animasyonu */
.send-btn.streaming {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    animation: stopPulse 1.5s infinite ease-in-out;
}

@keyframes stopPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    50% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
}

.stop-icon {
    font-size: 1rem;
    color: #fff;
    line-height: 1;
}

/* Bağlam Haritası Düğüm Detay Kartı (Popover) */
.graph-node-card {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    max-width: 340px;
    background: rgba(24, 24, 27, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glow);
    border-radius: var(--radius-md);
    padding: 16px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.7);
    z-index: 25;
    animation: fadeIn 0.2s ease;
}

.node-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Manuel Hafıza Ekleme Kutusu */
.memory-create-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    margin-bottom: 12px;
    transition: var(--transition);
}

.memory-create-box:focus-within {
    border-color: rgba(99, 102, 241, 0.4);
    background: rgba(255, 255, 255, 0.05);
}

/* Bağlam Haritası Kategori Filtre Butonları */
.graph-filter-chips {
    position: absolute;
    top: 16px;
    left: 16px;
    display: flex;
    gap: 6px;
    z-index: 10;
    flex-wrap: wrap;
}

.graph-chip {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition);
}

.graph-chip:hover {
    color: var(--text-main);
    border-color: rgba(255, 255, 255, 0.2);
}

.graph-chip.active {
    background: var(--text-main);
    color: var(--bg-primary);
    border-color: var(--text-main);
    font-weight: 700;
}

/* Modal Genişlik Varyantı */
.modal-lg {
    max-width: 760px;
    width: 90%;
}

/* İstem & Şablon Kütüphanesi */
.prompt-filter-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.prompt-filter-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass);
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition);
}

.prompt-filter-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.08);
}

.prompt-filter-btn.active {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    color: #fff;
    border-color: transparent;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.prompt-templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 12px;
}

.prompt-template-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 10px;
    cursor: pointer;
    transition: var(--transition);
}

.prompt-template-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.prompt-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.prompt-card-title {
    font-weight: 700;
    font-size: 0.88rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 6px;
}

.prompt-cat-badge {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.prompt-card-preview {
    font-size: 0.76rem;
    color: var(--text-subtle);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.prompt-card-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.prompt-use-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-glass);
    color: var(--text-main);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.prompt-template-card:hover .prompt-use-btn {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    color: #fff;
    border-color: transparent;
}

/* Sesli Oku Butonu Aktif Durumu */
.btn-tts-msg.speaking {
    color: #10b981 !important;
    animation: ttsPulse 1.2s infinite ease-in-out;
}

@keyframes ttsPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}


