body {
    background-color: #0b0b0b;
    color: #ffffff;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
background-image: 
        linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)),
        url('image/baner.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    align-items: center;
    justify-items: center;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0b0b0b;
}

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

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

.navbar_2 {
    position: fixed;
    background: rgba(15, 15, 19, 0.8); 
    backdrop-filter: blur(8px);
    padding: 8px 20px;
    border-radius: 50px;
    z-index: 1000;;
    padding: 10px;
    top: 20px;
    right: 20px;
    z-index: 1000;
    border: 1px solid rgba(0, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.navbar_2:hover {
    background: rgba(0, 255, 255, 0.1);
    border-color: aqua;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
}

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

.logo {
    width: 50px;
    height: auto;
    border-radius: 50px;
}

.welcome {
    font-size: 1.5rem;
    margin: 0;
    text-shadow: 7px 7px 10px aqua; 
    
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 0;
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.navbar a {
    text-decoration: none;
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
    transition: 0.3s ease-in-out;
}

.navbar a:hover {
    color: aqua;
    box-shadow: 0 2px 0 0 aqua;
}

h2 {
    color: aqua;
}

.channel {
    width: 400px;
    border: 3px solid aqua;
    backdrop-filter: blur(8px);
}

.hidden-image {
    display: flex;
    align-self: center;
    justify-content: center;
    padding-top: 101px;
    width: 1000px;
}

.user-profile {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
}

.profile-trigger {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    background: rgba(15, 15, 19, 0.8);
    backdrop-filter: blur(8px);
    padding: 8px 15px;
    border-radius: 50px;
    border: 1px solid rgba(0, 255, 255, 0.3);
    transition: 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.profile-trigger:hover {
    background: rgba(0, 255, 255, 0.1);
    border-color: aqua;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
}

#profile-img {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover; /* حل مشكلة تعوج الصورة */
    border: 1px solid aqua;
}

#display-name {
    font-weight: bold;
    color: aqua;
    font-size: 14px;
}

.profile-menu {
    display: none;
    position: absolute;
    top: 55px;
    left: 0;
    background: #16161d;
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 12px;
    min-width: 150px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.7);
    overflow: hidden;
}

.profile-menu button, .profile-menu label {
    display: block;
    width: 100%;
    padding: 12px;
    background: none;
    border: none;
    color: white;
    text-align: right;
    cursor: pointer;
    font-size: 14px;
    transition: 0.2s;
}

.profile-menu button:hover, .profile-menu label:hover {
    background: rgba(0, 255, 255, 0.1);
}

.chat-container {

    width: 95%;

    max-width: 1400px;

    margin: 100px auto 20px;

    height: calc(100vh - 140px);

    display: flex;

    flex-direction: column;

    background: rgba(255,255,255,0.05);

    border: 2px solid aqua;

    border-radius: 25px;

    backdrop-filter: blur(10px);

    overflow: hidden;

}


/* الرسائل */

.chat-messages {

    flex: 1;

    overflow-y: auto;

    padding: 20px;

    display: flex;

    flex-direction: column;

    gap: 15px;

}


/* منطقة الكتابة */

.chat-input-area {

    padding: 20px;

    border-top: 1px solid rgba(0,255,255,0.2);

    display: flex;

    gap: 10px;

    background: rgba(0,0,0,0.3);

}


/* الانبوت */

#message-input {

    flex: 1;

    background: rgba(255,255,255,0.05);

    border: 1px solid rgba(0,255,255,0.3);

    padding: 15px;

    border-radius: 15px;

    color: white;

    outline: none;

    font-size: 16px;

}


/* زر الإرسال */

#send-btn {

    background: aqua;

    color: black;

    border: none;

    padding: 0 30px;

    border-radius: 15px;

    font-weight: bold;

    cursor: pointer;

    transition: 0.3s;

}

#send-btn:hover {

    transform: scale(1.05);

}


/* Responsive */

@media(max-width:700px){

    .chat-container{

        width: 100%;

        height: calc(100vh - 90px);

        margin: 80px 0 0;

        border-radius: 0;

    }

}

/* البلاصة فين كيبانو الرسائل */
.chat-messages {
    flex: 1; /* كياخد كاع المساحة اللي شايطة بين الفوق ولتحت */
    overflow-y: auto; /* كيولي يسكرولي غير هو */
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    scroll-behavior: smooth;

}

/* البلاصة ديال الكتابة لتحت */
.chat-input-area {
    padding: 15px;
    border-top: 1px solid #ddd;
    display: flex;
    gap: 10px;
    position: sticky;
    bottom: 0;
}

#message-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 255, 0.2);
    padding: 12px;
    border-radius: 10px;
    color: white;
    outline: none;
}

#send-btn {
    background: aqua;
    color: black;
    border: none;
    padding: 0 25px;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
}

/* شكل الرسائل */
.message {
    display: flex;
    gap: 10px;
    max-width: 80%;
}

.my-message {
    align-self: flex-start; /* لليسار */
    flex-direction: row-reverse;
}

.chat-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 1px solid aqua;
}

.msg-content {
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 12px;
    border-radius: 12px;
}

.my-message .msg-content {
    background: gray;
    color: white;
}

.user-name {
    display: block;
    font-size: 11px;
    color: aqua;
    margin-bottom: 3px;
}

.my-message .user-name {
    color: #444;
}

.message {
    position: relative;
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
}

.my-message .delete-btn {
    display: block;
    cursor: pointer;
    color: #ff4757;
    font-size: 12px;
    margin-right: 10px;
    opacity: 0.6;
}

.delete-btn:hover {
    opacity: 1;
}

/* الرسائل ديال لخرين ما كيبانش فيهم زر الحذف */
.message:not(.my-message) .delete-btn {
    display: none;
}

.toast {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: rgba(0, 255, 255, 0.9);
    color: black;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: bold;
    display: none;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

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

.container_contact{
    backdrop-filter: blur(8px);
    padding: 8px 20px;
    border-radius: 50px;
    border: 1px solid aqua;
}

.btn_con {
    background: rgba(15, 15, 19, 0.8); 
    backdrop-filter: blur(8px);
    padding: 10px 25px;
    border-radius: 50px;
    border: 1px solid rgba(0, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    font-weight: bold;
}

.btn_con:hover {
    background: rgba(0, 255, 255, 0.2);
    border-color: aqua;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
    color: aqua;
    transform: translateY(-2px);
}

.pup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    backdrop-filter: blur(20px);
    padding: 35px 45px;
    border-radius: 35px;
    border: 1px solid rgba(0, 255, 255, 0.4);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.7), 0 0 40px rgba(0, 255, 255, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 400px;
    text-align: center;
}

.pup.open {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.pup a {
    text-decoration: none;
    color: #fff;
    padding: 14px 30px;
    transition: all 0.3s ease;
    border-radius: 60px;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 17px;
    font-weight: 600;
    border: 1px solid rgba(0, 255, 255, 0.25);
    letter-spacing: 0.5px;
}

.pup a:hover {
    background: rgba(0, 255, 255, 0.2);
    transform: translateY(-3px) scale(1.02);
    border-color: aqua;
    box-shadow: 0 10px 25px rgba(0, 255, 255, 0.2);
    color: aqua;
}

.pup a:active {
    transform: translateY(0);
}

@keyframes glowPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 255, 255, 0.4);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(0, 255, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 255, 255, 0);
    }
}

.pup.open {
    animation: glowPulse 0.6s ease-out;
}

.copy{
    color: aqua;
    backdrop-filter: blur(20px);
    padding: 35px 45px;
    border-radius: 35px;
    border: 1px solid rgba(0, 255, 255, 0.4);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.7), 0 0 40px rgba(0, 255, 255, 0.15);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 400px;
    text-align: center;
    font-size: 24px;
}
