        :root {
            --primary-bg: #ffffff;
            --secondary-bg: #f9fafb;
            --user-msg-bg: #388cc4;
            --assistant-msg-bg: #f4f8ff;
            --text-primary: #111827;
            --text-secondary: #6b7280;
            --border-color: #e5e7eb;
            --accent-color: #388cc4;
        }
        .d-flex {
            display: flex !important;
        }

        .align-items-center {
            align-items: center !important;
        }

        .justify-content-between {
            justify-content: space-between !important;
        }

        .m-0 {
            margin: 0 !important;
        }

        .me-1 {
            margin-right: 0.25rem !important;
        }

        .gap-2 {
            gap: 0.5rem !important;
        }

        /* Bootstrap 4.3.1'de olmayan gap utility class'ı için fix */
        .btn-group > .btn {
            margin-right: 0.5rem;
        }

        .btn-group > .btn:last-child {
            margin-right: 0;
        }
        .modal-dialog-centered {
            display: flex;
            align-items: center;
            min-height: calc(100% - 1rem);
        }

        @media (min-width: 576px) {
            .modal-dialog-centered {
                min-height: calc(100% - 3.5rem);
            }
        }

        /* Bootstrap 4.3.1 button düzeltmeleri */
        .btn-sm {
            padding: 0.25rem 0.5rem;
            font-size: 0.875rem;
            line-height: 1.5;
            border-radius: 0.2rem;
        }

        /* Bootstrap 4.3.1 flex düzeltmeleri */
        .flex-shrink-0 {
            flex-shrink: 0 !important;
        }
        body {
            background-color: var(--primary-bg);
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
            color: var(--text-primary);
            line-height: 1.5;
        }

        .message-actions {
            display: flex;
            gap: 0.75rem;
            margin-top: 0.5rem;
            opacity: 0;
            transition: opacity 0.2s ease;
        }

        .assistant .message-content:hover .message-actions {
            opacity: 1;
        }

        .action-button {
            background: transparent;
            border: none;
            color: var(--text-secondary);
            padding: 0.25rem;
            cursor: pointer;
            border-radius: 0.375rem;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-size: 0.875rem;
        }

        .action-button:hover {
            background: var(--secondary-bg);
            color: var(--accent-color);
        }

        .action-button i {
            font-size: 1rem;
        }

        .action-button .action-tooltip {
            background: var(--text-primary);
            color: white;
            padding: 0.25rem 0.5rem;
            border-radius: 0.25rem;
            font-size: 0.75rem;
            position: absolute;
            bottom: 100%;
            left: 50%;
            transform: translateX(-50%);
            white-space: nowrap;
            opacity: 0;
            visibility: hidden;
            transition: all 0.2s ease;
            margin-bottom: 0.5rem;
        }

        .action-button:hover .action-tooltip {
            opacity: 1;
            visibility: visible;
        }

        .thinking-bubble {
            padding: 0.75rem 1rem;
            min-width: 60px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .thinking-dots {
            display: flex;
            align-items: center;
            gap: 4px;
        }

        .thinking-dots span {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: var(--text-primary);
            opacity: 0.4;
            animation: thinking 1.4s infinite;
        }

        .thinking-dots span:nth-child(2) {
            animation-delay: 0.2s;
        }

        .thinking-dots span:nth-child(3) {
            animation-delay: 0.4s;
        }

        @keyframes thinking {

            0%,
            100% {
                transform: translateY(0);
                opacity: 0.4;
            }

            50% {
                transform: translateY(-4px);
                opacity: 0.8;
            }
        }

        .loading-icon {
            margin-left: 8px;
            color: var(--accent-color);
            animation: spin 1s linear infinite;
            flex-shrink: 0;
            width: 16px;
        }

        @keyframes spin {
            0% {
                transform: rotate(0deg);
            }

            100% {
                transform: rotate(360deg);
            }
        }

        .pasted-preview-item.loading {
            opacity: 0.7;
            pointer-events: none;
        }

        .pasted-preview-item.loading .loading-icon {
            display: inline-block;
        }

        .pasted-preview-item .loading-icon {
            display: none;
        }

        /* preview-title için genişlik sınırlaması */
        .pasted-preview-item .preview-title {
            max-width: calc(100% - 40px);
            /* loading icon için yer bırak */
        }

        .chat-container {
            max-width: 1000px;
            margin: 0 auto;
            max-height: 70vh;
            display: flex;
            flex-direction: column;
            background: var(--primary-bg);
        }

        .chat-header {
            padding: 1rem 1.5rem;
            border-bottom: 1px solid var(--border-color);
            background: var(--primary-bg);
            position: sticky;
            top: 0;
            z-index: 1000;
        }

        .chat-messages {
            flex: 1;
            overflow-y: auto;
            padding: 2rem 1.5rem;
            background: var(--primary-bg);
        }

        .pasted-preview-container {
            position: relative;
            /*min-height: 100px;*/
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
            padding: 0.5rem;
            /*border-bottom: 1px solid var(--border-color);*/
        }

        .pasted-preview-item {
            background: var(--secondary-bg);
            border: 1px solid var(--border-color);
            border-radius: 0.5rem;
            padding: 0.5rem 1rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            cursor: pointer;
            max-width: 200px;
            position: relative;
            min-height: 60px;
            /* 3 satır için yükseklik */
            display: flex;
            align-items: center;
            gap: 0.75rem;
            width: 100%;
            /* max-width yerine width kullan */
            max-width: 250px;

        }

        .pasted-preview-item span {
            /* Mevcut özellikleri koruyup eklenecek */
            display: -webkit-box;
            -webkit-line-clamp: 3;
            -webkit-box-orient: vertical;
            overflow: hidden;
            text-overflow: ellipsis;
            word-break: break-all;
            line-height: 1.2;
        }

        .pasted-preview-item:hover {
            background: #f3f4f6;
        }

        .pasted-preview-item i {
            color: var(--accent-color);
        }

        .pasted-preview-item .remove-btn {
            position: absolute;
            top: -8px;
            right: -8px;
            background: #fff;
            border: 1px solid var(--border-color);
            border-radius: 50%;
            width: 20px;
            height: 20px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 10px;
            color: var(--text-secondary);
            cursor: pointer;
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
        }

        .pasted-preview-item .remove-btn:hover {
            background: #f3f4f6;
            color: #ef4444;
        }

        .message-group {
            display: flex;
            margin-bottom: 1rem;
            /* 1.5rem yerine 1rem */
            padding-bottom: 0;
            /* Alt padding'i kaldır */
            animation: fadeIn 0.2s ease-out;
            align-items: flex-start;
            gap: 1rem;
        }

        .message-group.user {
            flex-direction: row-reverse;
        }

        .avatar {
            width: 2rem;
            height: 2rem;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 0.5rem;
            background: var(--assistant-msg-bg);
            color: var(--text-primary);
        }

        .user .avatar {
            background: var(--user-msg-bg);
            color: white;
        }

        .message-content {
            max-width: 70%;
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
        }

        .pasted-content-wrapper {
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
        }

        .user .pasted-content-wrapper {
            flex-direction: row-reverse;
            justify-content: flex-start;
            width: 100%;
        }

        .message-bubble {
            padding: 0.75rem 1rem;
            border-radius: 1rem;
            font-size: 0.90rem;
            max-width: 100%;
            /* Eklendi */
            word-wrap: break-word;
            /* Eklendi */
            /*Değiştiwhite-space: pre-wrap;*/
            /* Eklendi */
        }

        .message-bubble a {
            color: #1a91ff;
            text-decoration: none;
        }

        .message-bubble a:hover {
            text-decoration: underline;
        }

        .user .message-bubble a {
            color: white;
            text-decoration: underline;
        }

        /* Hata mesajı stilleri */
        /* Hata mesajı yeni stiller */
        .message-bubble.error {
            background: #FFFFFF !important;
            border: 1px solid #E5E7EB;
            border-left: 4px solid #DC2626;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
            position: relative;
            padding: 1rem 1.25rem !important;
            border-radius: 0.5rem;
            transition: all 0.2s ease;
        }

        .error-message-container {
            display: flex;
            flex-direction: column;
            gap: 0.75rem;
        }

        .error-header {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            margin-bottom: 0.5rem;
        }

        .error-icon {
            color: #DC2626;
            font-size: 1.25rem;
            flex-shrink: 0;
        }

        .error-title {
            color: #1F2937;
            font-weight: 600;
            font-size: 1rem;
            margin: 0;
        }

        .error-content {
            color: #4B5563;
            font-size: 0.95rem;
            line-height: 1.5;
            margin: 0;
        }

        .error-action {
            display: inline-flex;
            align-items: center;
            padding: 0.625rem 1rem;
            margin-top: 0.75rem;
            background: #F3F4F6;
            border: 1px solid #E5E7EB;
            color: #1F2937;
            border-radius: 0.375rem;
            text-decoration: none;
            font-size: 0.875rem;
            font-weight: 500;
            transition: all 0.2s ease;
        }

        .error-action:hover {
            background: #1a91ff;
            border-color: #1a91ff;
            color: white;
            transform: translateY(-1px);
        }

        .error-action i {
            margin-right: 0.5rem;
            font-size: 0.875rem;
        }

        /* Markdown stilleri */
        .message-bubble strong {
            font-weight: 600;
        }

        .message-bubble em {
            font-style: italic;
        }


        .user .message-bubble {
            background: var(--user-msg-bg);
            color: white;
            border-top-right-radius: 0.25rem;
            overflow-wrap: break-word;
            /* Eklendi */
            hyphens: auto;
            /* Eklendi */
        }

        .assistant .message-bubble {
            background: var(--assistant-msg-bg);
            color: var(--text-primary);
            border-top-left-radius: 0.25rem;
        }

        .pasted-item {
            background: var(--primary-bg);
            border: 1px solid var(--border-color);
            border-radius: 0.75rem;
            padding: 0.75rem;
            cursor: pointer;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            gap: 0.75rem;
            width: 200px;
            min-height: 60px;

        }

        .pasted-item:hover {
            border-color: var(--accent-color);
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
        }

        .pasted-item i {
            color: var(--accent-color);
            font-size: 1.25rem;
        }

        .preview-info {
            flex: 1;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            min-width: 0;
            /* Taşmaları önlemek için */
        }

        .pasted-item .preview-info {
            flex: 1;
            min-width: 0;
        }

        .preview-title {
            margin: 0;
            /* Gereksiz margin'i kaldır */
            flex: 1;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            /* Tek satırda tut */
        }

        .pasted-item .preview-title {
            font-weight: 500;
            margin-bottom: 0.25rem;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            color: var(--text-primary);
            font-size: 0.9rem;
            display: -webkit-box;
            -webkit-line-clamp: 3;
            -webkit-box-orient: vertical;
            white-space: normal;
            /* nowrap kaldırılacak */
            word-break: break-all;
            line-height: 1.2;
        }

        .pasted-item .preview-size {
            font-size: 0.75rem;
            color: var(--text-secondary);
        }

        .input-container {
            padding: 1rem 1.5rem 1.5rem;
            background: var(--primary-bg);
            /*border-top: 1px solid var(--border-color);*/
        }

        .input-wrapper {
            position: relative;
            border: 1px solid var(--border-color);
            border-radius: 1rem;
            transition: all 0.2s ease;
            background: var(--secondary-bg);
            padding: 0.25rem 0;
            /* Üst ve alttan padding */
            min-height: 50px;
            /* Minimum yükseklik */
            display: flex;
            align-items: flex-start;
        }

        .input-wrapper:focus-within {
            border-color: var(--accent-color);
            box-shadow: 0 0 0 2px rgba(26, 145, 255, 0.1);
        }

        .message-input {
            resize: none;
            min-height: 24px;
            max-height: 150px;
            border-radius: 1rem;
            padding: 0.875rem 3rem;
            /* Sağ ve sol padding artırıldı */
            margin: 0.5rem 0;
            /* Üst ve alttan margin eklendi */
            border: none;
            background: transparent;
            width: 100%;
            font-size: 0.95rem;
            color: var(--text-primary);
            line-height: 1.5;
            overflow-y: auto;
            scrollbar-width: thin;
            scrollbar-color: var(--text-secondary) transparent;
        }

        /* Textarea scrollbar stilleri */
        .message-input::-webkit-scrollbar {
            width: 4px;
        }

        .message-input::-webkit-scrollbar-track {
            background: transparent;
        }

        .message-input::-webkit-scrollbar-thumb {
            background-color: var(--text-secondary);
            border-radius: 2px;
        }


        .message-input::placeholder {
            color: var(--text-secondary);
        }

        .message-input:focus {
            outline: none;
        }

        .send-button {
            position: absolute;
            right: 0.75rem;
            top: 50%;
            transform: translateY(-50%);
            border: none;
            background: var(--accent-color);
            color: white;
            width: 2.5rem;
            /* Biraz daha büyük */
            height: 2.5rem;
            border-radius: 0.75rem;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s ease;
            z-index: 1;
        }

        .send-button:hover {
            background: #0070cc;
            transform: translateY(-52%);
            /* Hafif yukarı hareket */
        }

        .modal-content {
            border-radius: 1rem;
            border: none;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        }

        .modal-header {
            border-bottom: 1px solid var(--border-color);
            padding: 1rem 1.5rem;
        }

        .modal-body {
            padding: 1.5rem;
        }

        .modal-body img {
            max-width: 100%;
            height: auto;
            border-radius: 0.5rem;
        }

        .modal-body pre {
            white-space: pre-wrap;
            word-wrap: break-word;
            background: var(--secondary-bg);
            padding: 1rem;
            border-radius: 0.5rem;
            margin: 0;
            font-size: 0.9rem;
            color: var(--text-primary);
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(5px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        @media (max-width: 768px) {
            .message-content {
                max-width: 85%;
            }

            .chat-messages {
                padding: 1rem;
            }

            .input-container {
                padding: 1rem;
            }
        }

        .chat-messages::-webkit-scrollbar {
            width: 6px;
        }

        .chat-messages::-webkit-scrollbar-track {
            background: transparent;
        }

        .chat-messages::-webkit-scrollbar-thumb {
            background: #d1d5db;
            border-radius: 3px;
        }

        .chat-messages::-webkit-scrollbar-thumb:hover {
            background: #9ca3af;
        }

        /* Yeni stiller */
        .chat-container {
            position: relative;
            /* Drag/drop için */
        }



        .upload-loading {
            display: none;
            text-align: center;
            padding: 2rem;
        }

        .upload-loading i {
            font-size: 2rem;
            color: var(--accent-color);
            animation: spin 1s linear infinite;
        }

        @keyframes spin {
            from {
                transform: rotate(0deg);
            }

            to {
                transform: rotate(360deg);
            }
        }

        .unsupported-file {
            color: #ef4444;
            font-size: 0.9rem;
            margin-top: 0.5rem;
        }

        .attachment-button {
            position: absolute;
            left: 0.75rem;
            top: 50%;
            transform: translateY(-50%);
            border: none;
            background: transparent;
            color: var(--text-secondary);
            width: 2rem;
            height: 2rem;
            border-radius: 0.5rem;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s ease;
            z-index: 1;
            /* Üstte görünmesi için */
        }

        .attachment-button:hover {
            color: var(--accent-color);
            background: rgba(26, 145, 255, 0.1);
        }

        .message-input {
            padding-left: 3rem !important;
        }

        #fileInput {
            display: none;
        }
