:root{
	--header-bg: #0D1117;
	--sidebar-bg: #161B22;
	--content-bg: linear-gradient(#0D1117, #1A2639);
	--user-msg: #1F2937;
	--ai-msg: #1E3A8A;
	--ai-border: #3B82F6;
	--btn-primary: #3B82F6;
}

body {
    background-color: #f5f5f5;
    margin: 0;
    padding: 0;
    color: #333;
    /*font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;*/
    height: 100vh;
    /*overflow: hidden;*/
}

.fa {
    vertical-align: middle;
}

#dvall{
    background: var(--content-bg);
}

#page-header{
    color:darkseagreen;
    border-bottom:solid 1px darkseagreen;
}

#conversationTitle{
    color:darkseagreen;
}

/* ساختار اصلی صفحه */
.container-fluid {
    height: 100vh;
    padding: 0;
}

.row {
    height: 100%;
    margin: 0;
}

/* سایدبار گفتگوها */
.sidebar {
    background-color:#161B22;
    height: 100%;
    padding: 20px;
    border-left: 1px solid #eee;
    overflow-y: auto;
    direction: rtl;
	border-left: 1px solid #233554;
}

.list-group {
    direction: rtl;
    text-align: right;
}

.list-group-item {
    border: none;
    border-radius: 5px;
    margin-bottom: 5px;
    cursor: pointer;
    text-align: right;
    padding: 10px 15px;
    transition: all 0.2s;
	color: #8892B0;
	background-color:inherit;
}

.list-group-item:hover {
	background-color: rgba(100, 255, 218, 0.1); /* هایلایت نئون با شفافیت */
	color: #64FFDA;
}

.list-group-item.active {
    background-color: rgba(100, 255, 218, 0.1); /* هایلایت نئون با شفافیت */
	color: #64FFDA;
    font-weight: bold;
}

/* هدر سایدبار */
.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

/* بخش اصلی چت */
.chat-container {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 20px;
    direction: rtl;
}

#chatHeader {
    /*
    padding:10px 0;
    border-bottom: 1px solid darkseagreen;
    */
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-box {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    border:solid 1px royalblue;
    border-radius: 10px;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.input-area {
    border:solid 1px royalblue;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* پیام‌ها */
.message {
    margin-bottom: 15px;
    padding: 10px 15px;
    border-radius: 10px;
    max-width: 80%;
    word-wrap: break-word;
    line-height: 1.5;
}

.user-message {
    background-color: #1F2937;
    color:#E5E7EB;
    margin-left: auto;
    border-bottom-right-radius: 0;
}

.ai-message, .assistant-message {
    background-color: #1E3A8A;
    color:#E0F7FA;
    border:solid 1px #3B82F6;
    margin-right: auto;
    border-bottom-left-radius: 0;
}

/* فیلد ورودی متن */
textarea {
    width: 100%;
    border-radius: 5px;
    padding: 10px;
    resize: none;
    /*font-size: 16px;*/
    min-height: 120px;
    border: 0;
    overflow-y: clip;
    font-family: inherit;
    background: transparent;
    color:#ccc;
}

textarea:focus-visible {
    outline: 0;
}

/* دکمه‌ها و کنترل‌ها */
.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
}

.btn {
    padding: 8px 20px;
    border-radius: 5px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-outline-primary {
    border-color: #0d6efd;
    color: #0d6efd;
}

.btn-outline-primary:hover {
    background-color: #0d6efd;
    color: white;
}

.btn-outline-success {
    border-color: #198754;
    color: #198754;
}

.btn-outline-success:hover {
    background-color: #198754;
    color: white;
}

/* انیمیشن بارگذاری */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0,0,0,.1);
    border-radius: 50%;
    border-top-color: #0d6efd;
    animation: spin 1s ease-in-out infinite;
}

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

/* مودال */
.modal-content {
    direction: rtl;
    text-align: right;
}

.modal-header {
    border-bottom: 1px solid #eee;
}

.modal-footer {
    border-top: 1px solid #eee;
    justify-content: flex-start;
}

/* تاریخ‌ها در لیست گفتگوها */
.conversation-date {
    font-size: 0.8rem;
    color: #6c757d;
}

/* واکنش‌گرایی */
@media (max-width: 768px) {
    .sidebar {
        height: 200px;
        border-left: none;
        border-bottom: 1px solid #eee;
    }
    
    .chat-container {
        height: calc(100vh - 200px);
    }
}

/* اسکرول بار */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.tech-btn {
	background: transparent;
	color: darkseagreen;
	border: 1px solid darkseagreen;
	border-radius: 4px;
	transition: all 0.3s;
}

.tech-btn:hover {
	background: rgba(100, 255, 218, 0.1); /* افکت نئون */
	box-shadow: 0 0 10px rgba(100, 255, 218, 0.3); /* درخشش */
	color:#64FFDA;
	border-color:#64FFDA;
}

.neon{color:darkseagreen;}
.neon:hover{color:#64FFDA;}
