*{
box-sizing:border-box;
}

html,body{
margin:0;
padding:0;
width:100%;
background:#ededed;
color:#292929;
font-family:Cairo,Arial,sans-serif;
transition:.3s ease;
}

/* ===== الشريط العلوي ===== */

.topbar{
position:fixed;
top:0;
right:0;
left:0;
height:58px;
z-index:9999;

display:flex;
align-items:center;
justify-content:space-between;

padding:0 13px;

background:rgba(255,255,255,.97);
border-bottom:1px solid #e5dfdc;
box-shadow:0 2px 12px rgba(0,0,0,.07);

backdrop-filter:blur(8px);
-webkit-backdrop-filter:blur(8px);
}

/* الخط الهوجان المتحرك */

.topbar:after{
content:"";
position:absolute;
bottom:-1px;
right:0;
width:100%;
height:2px;

background:linear-gradient(
90deg,
transparent,
#80513e,
#c9977d,
#80513e,
transparent
);

background-size:220% 100%;
animation:barMove 5s linear infinite;
}

@keyframes barMove{
0%{
background-position:200% 0;
}
100%{
background-position:-200% 0;
}
}

/* ===== اسم الدردشة ===== */

.chat-title{
display:flex;
align-items:center;
gap:9px;

font-family:Changa,Cairo,sans-serif;
font-size:14px;
font-weight:bold;
color:#342824;

white-space:nowrap;
}

/* أيقونة الدردشة */

.chat-icon{
width:34px;
height:34px;

display:flex;
align-items:center;
justify-content:center;

border-radius:11px;

background:#342824;
color:#fff;

font-size:16px;

box-shadow:0 4px 10px rgba(52,40,36,.18);
}

/* النقطة الخضراء */

.online{
width:8px;
height:8px;

border-radius:50%;

background:#22c55e;

box-shadow:0 0 0 0 rgba(34,197,94,.55);

animation:pulse 1.8s infinite;
}

@keyframes pulse{

0%{
box-shadow:0 0 0 0 rgba(34,197,94,.55);
}

70%{
box-shadow:0 0 0 7px rgba(34,197,94,0);
}

100%{
box-shadow:0 0 0 0 rgba(34,197,94,0);
}

}

/* ===== زر النهار والليل ===== */

.theme-btn{
width:35px;
height:35px;

border:0;
outline:0;

border-radius:11px;

background:#f1eeec;
color:#342824;

font-size:16px;

cursor:pointer;

display:flex;
align-items:center;
justify-content:center;

transition:.25s;
}

.theme-btn:active{
transform:scale(.9);
}

/* مساحة حتى لا يغطي الرأس Cbox */

.page-space{
height:58px;
}

/* ===== الوضع الليلي ===== */

body.dark{
background:#171514;
color:#eee;
}

body.dark .topbar{
background:rgba(28,26,25,.97);
border-color:#3b3532;
}

body.dark .chat-title{
color:#f1ebe8;
}

body.dark .chat-icon{
background:#f1ebe8;
color:#29211e;
}

body.dark .theme-btn{
background:#332e2b;
color:#f3d7b5;
}

/* ===== الفوتر ===== */

.footer{
text-align:center;
font-size:11px;
padding:5px 0;
font-family:Changa,sans-serif;
background:#fff;
color:#6D7B8D;
}

body.dark .footer{
background:#201d1c;
color:#aaa;
}