/* 1. تعریف فونت‌ها */
@font-face {
    font-family: 'Vazirmatn';
    src: url('fonts/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('fonts/Vazirmatn-Bold.woff2') format('woff2');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

/* 2. متغیرهای اصلی */
:root { 
    --bg: #17212b; 
    --surface: #0e1621; 
    --primary: #5288c1; 
    --text: #fff; 
    --text-sec: #7f91a4; 
    --msg-in: #182533; 
    --msg-out: #2b5278; 
}

/* 3. استایل بدنه اصلی (با فونت وزیر) */
body { 
    margin: 0; 
    font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; 
    background: var(--surface); 
    color: var(--text); 
    height: 100vh; 
    overflow: hidden; 
    display: flex; 
    flex-direction: column; 
}

/* General */
.hidden { display: none !important; }
.screen { flex: 1; display: flex; flex-direction: column; height: 100%; }
.tg-input { background: transparent; border: 1px solid var(--primary); color: white; padding: 10px; border-radius: 5px; width: 100%; margin-bottom: 10px; box-sizing: border-box; }
.tg-btn { padding: 10px 20px; border-radius: 5px; border: none; cursor: pointer; font-weight: bold; width: 100%; margin-top: 5px; }
.tg-btn.primary { background: var(--primary); color: white; }
.tg-btn.secondary { background: transparent; color: var(--primary); border: 1px solid var(--primary); }

/* Auth */
#auth-screen { justify-content: center; align-items: center; padding: 30px; }
.logo-box { background: var(--primary); width: 80px; height: 80px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 20px; }

/* Header */
.header { background: var(--bg); padding: 10px 15px; display: flex; align-items: center; justify-content: space-between; height: 50px; border-bottom: 1px solid #000; }
.header-title { font-weight: bold; font-size: 18px; }
.icon-btn { cursor: pointer; font-size: 20px; padding: 5px; }

/* Contact List */
#contact-list { flex: 1; overflow-y: auto; }
.contact-item { display: flex; align-items: center; padding: 10px 15px; border-bottom: 1px solid #111; cursor: pointer; transition: 0.2s; }
.contact-item:hover { background: #1c2633; }
.avatar { width: 45px; height: 45px; border-radius: 50%; background: linear-gradient(45deg, #FF512F, #DD2476); display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 18px; margin-left: 10px; }
.contact-name { font-weight: bold; font-size: 16px; }
.fab { position: fixed; bottom: 20px; left: 20px; width: 55px; height: 55px; background: var(--primary); border-radius: 50%; color: white; display: flex; align-items: center; justify-content: center; font-size: 30px; box-shadow: 0 4px 10px rgba(0,0,0,0.3); cursor: pointer; }

/* Chat */
#messages { flex: 1; overflow-y: auto; padding: 15px; display: flex; flex-direction: column; gap: 8px; background: var(--surface); }
.msg { padding: 8px 12px; border-radius: 10px; max-width: 75%; word-wrap: break-word; font-size: 15px; }
.msg.in { align-self: flex-start; background: var(--msg-in); border-bottom-left-radius: 0; }
.msg.out { align-self: flex-end; background: var(--msg-out); border-bottom-right-radius: 0; }
.input-area { background: var(--bg); padding: 10px; display: flex; gap: 10px; }
.msg-input { flex: 1; background: #0e1621; border: none; padding: 10px; border-radius: 20px; color: white; }
.send-btn { background: none; border: none; color: var(--primary); font-size: 24px; cursor: pointer; }

/* Modal */
.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.7); display: flex; align-items: center; justify-content: center; z-index: 100; }
.modal-content { background: var(--bg); padding: 20px; border-radius: 10px; width: 80%; max-width: 350px; text-align: center; }