
:root {
    --primary-color: #072D38;
    --text-color: #FFFFFF;
    --text-secondary: #CCCCCC;
    --secondary-color: #ED6B2F;
    --accent-color: #ED6B2F;
    --background-dark: #072D38;
    --background-light: #F5F7FA;
    --message-incoming: #1E3A5F;
    --message-outgoing: #ED6B2F;
    --chat-header: #1A2E40;
}



body {
    padding-top: 70px;
    font-family: "Cairo", sans-serif;
    color: var(--text-color);
    background-color: var(--primary-color);
}

/* تخصيص شريط التمرير */
body::-webkit-scrollbar {
    width: 10px;
}

body::-webkit-scrollbar-track {
    background: #01222d;
}

body::-webkit-scrollbar-thumb {
    background-color: #ed6b2f;
    border: 2px solid #01222d;
    border-radius: 5px;
}

/* تصميم النافبار */
.navbar {
    background: linear-gradient(45deg, #035971, #01222d);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
    padding: 0.5rem 1rem;
}

/* تنسيق اللوجو */
.navbar-brand img {
    width: 45px;
    transition: transform 0.3s;
}

.navbar-brand:hover img {
    transform: rotate(15deg);
}

/* تنسيق الأقسام الرئيسية */
.navbar-content {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
}

/* القائمة المركزية */
.main-menu {
    display: flex;
    justify-content: center;
    flex-grow: 1;
}

/* الجزء الأيسر (المستخدم) */
.left-section {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* العناصر العامة */
.nav-item {
    margin: 0 1rem;
}

.nav-link {
    color: white !important;
    font-weight: 500;
    transition: all 0.3s;
}

.nav-link:hover {
    color: #ed6b2f !important;
    transform: translateY(-2px);
}

.nav-link.active {
    color: #ed6b2f !important;
    text-shadow: 0 0 10px rgba(237, 107, 47, 0.5);
    text-decoration: underline;
}

/* القوائم المنسدلة */
.dropdown-menu {
    background: #072D38;
    border: 1px solid #055160;
    border-radius: 10px;
    text-align: right;
}

.dropdown-item {
    color: white !important;
    padding: 0.5rem 0.5rem;
    transition: all 0.3s;
    display: flex;
    justify-content: space-between;
}

.dropdown-item:hover {
    background: #055160;
    padding-left: 2rem;
}

/* الإشعارات والرسائل */
.notification-badge {
    position: absolute;
    top: -5px;
    left: -5px;
    background: #ff4757;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-icon {
    font-size: 1.3rem;
    color: white;
    position: relative;
    transition: all 0.3s;
}

.nav-icon:hover {
    color: #ed6b2f;
    transform: scale(1.1);
}

/* تصميم الجوال */
@media (max-width: 992px) {
    .navbar-content {
        flex-wrap: wrap;
    }

    .main-menu {
        order: 3;
        width: 100%;
        margin-top: 1rem;
        flex-direction: column;
        text-align: center;
    }

    .left-section {
        order: 1;
        margin-left: auto;
    }

    .navbar-brand {
        order: 2;
        margin: 0 auto;
    }

    .navbar-toggler {
        order: 0;
    }

    .nav-item {
        margin: 0.5rem 0;
    }
}
/* تصميم الصفحة chat */

.chat-container {
    height: calc(100vh - 80px);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* سايدبار الاتصالات */
.contacts-sidebar {
    background: var(--primary-color);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px;
    height: 100%;
    position: relative;
}

.search-bar {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 8px 15px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.search-bar:focus-within {
    box-shadow: 0 0 0 2px var(--secondary-color);
}

.search-input {
    background: transparent;
    border: none;
    color: white;
    width: 100%;
    font-family: 'Tajawal', sans-serif;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.contact-list {
    height: calc(100% - 120px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--secondary-color) transparent;
}

.contact-list::-webkit-scrollbar {
    width: 6px;
}

.contact-list::-webkit-scrollbar-thumb {
    background-color: var(--secondary-color);
    border-radius: 3px;
}

.contact-item {
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid transparent;
}

.contact-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(-5px);
    border-color: rgba(255, 255, 255, 0.2);
}

.contact-item.active {
    background: var(--secondary-color);
    box-shadow: 0 5px 15px rgba(237, 107, 47, 0.3);
}

.contact-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.contact-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* منطقة الدردشة الرئيسية */
.chat-area {
    background: var(--background-dark);
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    background-image: url('https://www.transparenttextures.com/patterns/dark-mosaic.png');
}

.chat-header {
    background: var(--chat-header);
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.chat-header-info {
    margin-right: 15px;
}

.chat-header-actions {
    margin-right: auto;
    display: flex;
    gap: 10px;
}

.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: linear-gradient(to bottom right, #072D38, #02475E);
    background-attachment: fixed;
}

.message-input-area {
    background: var(--chat-header);
    padding: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* تصميم الرسائل */
.message {
    max-width: 75%;
    margin-bottom: 15px;
    padding: 12px 18px;
    border-radius: 15px;
    position: relative;
    animation: slideIn 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    word-break: break-word;
}

.incoming {
    background: var(--message-incoming);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-right: auto;
    border-top-left-radius: 0;
}

.outgoing {
    background: var(--message-outgoing);
    margin-left: auto;
    border-top-right-radius: 0;
}

.message-time {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 5px;
    text-align: left;
    direction: ltr;
    display: block;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

/* مؤشرات الحالة */
.online-status {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    position: absolute;
    bottom: 0;
    right: 0;
    border: 2px solid var(--primary-color);
}

.online {
    background: #1ABB9C;
}

.offline {
    background: #D3D3D3;
}

/* زر بدء محادثة جديدة */
.new-chat-btn-container {
    position: absolute;
    bottom: 15px;
    left: 15px;
    right: 15px;
}

.new-chat-btn {
    background: linear-gradient(135deg, var(--secondary-color), #FF8C42);
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    transition: all 0.3s ease;
    width: 100%;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(237, 107, 47, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.new-chat-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(237, 107, 47, 0.4);
}

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

/* حالة عدم وجود محادثات */
.no-contacts {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    color: rgba(255, 255, 255, 0.7);
}

.no-contacts-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

/* مودال اختيار المدرس */
.teacher-modal {
    background: rgba(0, 0, 0, 0.7);
}

.teacher-modal .modal-content {
    background: var(--primary-color);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.teacher-modal .modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.teacher-item {
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid transparent;
}

.teacher-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border-color: var(--secondary-color);
}

.teacher-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--secondary-color);
}

.teacher-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.teacher-specialty {
    font-size: 0.8rem;
    color: var(--secondary-color);
}

/* رسالة الترحيب */
.welcome-message {
    text-align: center;
    margin-top: 30%;
    animation: fadeIn 1s ease;
}

.welcome-icon {
    font-size: 4rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.welcome-title {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.welcome-subtitle {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 30px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* زر الإرسال */
.send-btn {
    background: var(--secondary-color);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.send-btn:hover {
    transform: scale(1.1);
}

.message-input {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    border-radius: 25px;
    padding: 12px 20px;
}

.message-input:focus {
    box-shadow: 0 0 0 2px var(--secondary-color);
    background: rgba(255, 255, 255, 0.15);
}

/* تأثيرات خاصة */
.hover-effect {
    transition: all 0.3s ease;
}

.hover-effect:hover {
    transform: scale(1.02);
}

/* رسائل النظام */
.system-message {
    text-align: center;
    margin: 15px 0;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}