@import url('https://fonts.googleapis.com/css2?family=Hind+Siliguri:wght@400;500;600;700&display=swap');

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Hind Siliguri', 'Segoe UI', Tahoma, sans-serif;
    background: #F0F2F5; color: #1C1E21; line-height: 1.5;
}
a { color: #1877F2; text-decoration: none; }
a:hover { text-decoration: underline; }
.navbar { background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.1); padding: 10px 16px; position: sticky; top: 0; z-index: 100; }
.nav-inner { max-width: 900px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; }
.brand { font-size: 24px; font-weight: 700; color: #1877F2; }
.nav-links a { margin-left: 14px; font-weight: 600; font-size: 15px; color: #65676B; }
.nav-links a:hover { color: #1877F2; text-decoration: none; }
.container { max-width: 680px; margin: 20px auto; padding: 0 12px; }
.flash { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 15px; font-weight: 500; }
.flash-success { background: #e4f7e8; color: #1e7e34; border: 1px solid #c3e6cb; }
.flash-error { background: #fce8e8; color: #c0392b; border: 1px solid #f5c6cb; }
.card { background: #fff; border-radius: 8px; box-shadow: 0 1px 2px rgba(0,0,0,.1); padding: 16px; margin-bottom: 16px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select { width: 100%; padding: 12px; border: 1px solid #ccd0d5; border-radius: 6px; font-family: inherit; font-size: 15px; background: #F5F6F7; }
.form-group textarea { resize: vertical; min-height: 80px; border: none; background: #F0F2F5; }
.btn { background: #1877F2; color: #fff; border: none; padding: 10px 24px; border-radius: 6px; font-size: 15px; font-weight: 600; cursor: pointer; }
.btn:hover { background: #166FE5; }
.post-header { display: flex; align-items: center; margin-bottom: 12px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: #1877F2; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px; margin-right: 10px; overflow: hidden; flex-shrink: 0; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-lg { width: 100px; height: 100px; font-size: 40px; }
.post-author { font-weight: 600; color: #1C1E21; font-size: 16px; }
.post-time { font-size: 13px; color: #65676B; }
.post-content { margin-bottom: 12px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; }
.post-image { width: 100%; max-height: 650px; object-fit: contain; border-radius: 8px; margin-bottom: 12px; border: 1px solid #e4e6eb; background: #f7f8fa; }

/* Facebook-inspired action bar */
.post-actions { display: flex; gap: 4px; border-top: 1px solid #e4e6eb; padding-top: 7px; margin-top: 10px; position: relative; }
.reaction-container { flex: 1; min-width: 0; position: relative; display: flex; }
.action-btn { flex: 1; min-width: 0; background: transparent; border: none; padding: 9px 5px; border-radius: 6px; cursor: pointer; font-family: inherit; font-size: 15px; font-weight: 600; color: #65676B; display: flex; align-items: center; justify-content: center; gap: 7px; transition: background .2s; touch-action: manipulation; }
.action-btn:hover, .action-btn:focus-visible { background: #F0F2F5; outline: none; }
.action-btn svg { width: 23px; height: 23px; flex: 0 0 auto; }
.action-btn .reaction-emoji { font-size: 19px; line-height: 1; }
.action-btn.is-reacted { color: #1877F2; }
.reaction-popup { display: none; position: absolute; bottom: calc(100% + 8px); left: 0; background: #fff; border-radius: 30px; box-shadow: 0 2px 12px rgba(0,0,0,.2); padding: 9px 13px; gap: 10px; z-index: 1000; border: 1px solid #e4e6eb; white-space: nowrap; }
.reaction-popup.active { display: flex; }
.reaction-popup.popup-right { left: auto; right: 0; }
.reaction-icon { cursor: pointer; font-size: 27px; line-height: 1; transition: transform .15s; border: 0; background: none; padding: 0; }
.reaction-icon:hover, .reaction-icon:focus-visible { transform: scale(1.25); outline: none; }
.reaction-summary { display: flex; align-items: center; gap: 3px; color: #65676B; font-size: 14px; }
.reaction-summary .tiny-reaction { font-size: 16px; }

/* Comments */
.comments { margin-top: 12px; }
.comment { display: flex; margin-bottom: 8px; align-items: flex-start; }
.comment .avatar { width: 32px; height: 32px; font-size: 14px; margin-right: 8px; }
.comment-body { background: #F0F2F5; padding: 8px 12px; border-radius: 16px; font-size: 14px; flex: 1; overflow-wrap: anywhere; }
.comment-author { font-weight: 600; margin-right: 6px; color: #1C1E21; }
.comment-form { display: flex; gap: 8px; margin-top: 12px; }
.comment-form input { min-width: 0; flex: 1; padding: 10px 16px; border: 1px solid #ccd0d5; border-radius: 20px; font-family: inherit; font-size: 14px; background: #F0F2F5; }
.comment-form button { flex: 0 0 auto; }
.auth-box { max-width: 400px; margin: 40px auto; }
.profile-header { text-align: center; padding: 24px; }
.profile-name { font-size: 26px; font-weight: 700; margin: 12px 0 4px; color: #1C1E21; }
.profile-username { color: #65676B; font-size: 15px; }
.profile-bio { margin-top: 12px; font-size: 15px; }
@media (max-width: 420px) {
    .container { padding: 0 8px; margin-top: 12px; }
    .card { padding: 12px; }
    .post-actions { gap: 0; }
    .action-btn { font-size: 13px; gap: 4px; padding: 9px 2px; }
    .action-btn svg { width: 21px; height: 21px; }
    .reaction-popup { gap: 8px; padding: 8px 10px; }
    .reaction-icon { font-size: 25px; }
}
/* প্রোফাইল পেজের জন্য নতুন স্টাইল */
#editProfile input[type="file"] {
    padding: 8px;
    border: 1px solid #ccd0d5;
    border-radius: 6px;
    font-size: 14px;
}
/* ফেসবুক স্টাইল হেডার */
.fb-navbar { padding: 8px 12px; background: #fff; border-bottom: 1px solid #ddd; }
.fb-navbar .nav-inner { display: flex; justify-content: space-between; align-items: center; }

/* স্টোরি সেকশন */
.stories-container {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 10px;
    margin-bottom: 15px;
    scrollbar-width: none; /* ফায়ারফক্স */
}
.stories-container::-webkit-scrollbar { display: none; /* ক্রোম */ }

.story-card {
    min-width: 110px;
    height: 180px;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
    cursor: pointer;
    background: #fff;
}
.story-img {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}
.create-story .story-img {
    height: 75%;
    background-color: #e4e6eb;
}
.create-story-btn {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
}
.story-avatar {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
}
.story-name {
    position: absolute;
    bottom: 10px;
    left: 10px;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

/* ফেসবুক পোস্ট পিল বক্স */
.fb-post-box {
    background: #fff;
    border-radius: 8px;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    margin-bottom: 15px;
}
.fb-post-input {
    flex: 1;
    border: 1px solid #ccd0d5;
    border-radius: 20px;
    padding: 10px 15px;
    color: #65676B;
    font-size: 15px;
    cursor: text;
}

/* পোস্ট মডাল (New Post) */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255,255,255,1); /* ফুল স্ক্রিন সাদা */
    z-index: 9999;
    overflow-y: auto;
}
.modal-content {
    max-width: 600px;
    margin: 0 auto;
    background: #fff;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #e4e6eb;
}
.close-btn {
    background: none; border: none; font-size: 20px; cursor: pointer; color: #1C1E21;
}
.next-btn {
    background: #1877F2; color: white; border: none; padding: 8px 16px; border-radius: 6px; font-weight: bold; cursor: pointer;
}
/* =========================================
   ফেসবুক মোবাইল স্টাইল (হুবহু ফেসবুকের মতো)
   ========================================= */

/* বেসিক রিসেট */
body {
    padding-bottom: 60px; /* বটম নেভিগেশনের জন্য জায়গা রাখা */
    background-color: #F0F2F5;
}

/* ফেসবুক টপ হেডার */
.fb-mobile-header {
    background-color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.fb-header-left { display: flex; align-items: center; gap: 15px; }
.fb-logo { font-size: 24px; font-weight: 800; color: #1877F2; letter-spacing: -0.5px; }
.fb-header-right { display: flex; align-items: center; gap: 18px; }
.fb-messenger-icon { position: relative; display: flex; align-items: center; }
.fb-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    background-color: #e41e3f;
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 5px;
    border-radius: 10px;
    border: 2px solid #fff;
}

/* স্টোরি সেকশন */
.fb-stories-wrapper {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding: 0 10px 10px 10px;
    scrollbar-width: none; /* Firefox */
}
.fb-stories-wrapper::-webkit-scrollbar { display: none; /* Chrome */ }

.fb-story-card {
    min-width: 105px;
    height: 190px;
    border-radius: 10px;
    background-color: #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}
.fb-story-img-top {
    height: 75%;
    background-size: cover;
    background-position: center;
    background-color: #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
}
.fb-story-placeholder-avatar {
    width: 40px; height: 40px; border-radius: 50%; background: #1877F2; color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: bold;
}
.fb-story-text-bottom {
    height: 25%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding-bottom: 8px;
    position: relative;
    background-color: #fff;
    z-index: 2;
}
.fb-story-text-bottom span {
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    line-height: 1.1;
}
.fb-story-plus-btn {
    position: absolute;
    top: -14px;
    background-color: #1877F2;
    color: white;
    border: 3px solid #fff;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}
.fb-story-img-full {
    height: 100%;
    width: 100%;
    background-size: cover;
    background-position: center;
}
.fb-story-avatar-ring {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 3px solid #1877F2;
    background: #fff;
    z-index: 2;
}
.fb-story-avatar-ring img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.fb-story-name {
    position: absolute;
    bottom: 10px;
    left: 10px;
    color: white;
    font-size: 12px;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
    z-index: 2;
}

/* পোস্ট বক্স (What's on your mind) */
.fb-whats-on-mind {
    background-color: #fff;
    margin: 0 10px 15px 10px;
    padding: 10px 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.fb-wom-avatar {
    width: 40px; height: 40px; border-radius: 50%; background: #1877F2; color: #fff;
    display: flex; align-items: center; justify-content: center; font-weight: bold; overflow: hidden;
}
.fb-wom-avatar img { width: 100%; height: 100%; object-fit: cover; }
.fb-wom-input {
    flex: 1;
    border: 1px solid #ccd0d5;
    border-radius: 20px;
    padding: 10px 15px;
    font-size: 15px;
    color: #65676B;
}
.fb-wom-icon { padding: 5px; cursor: pointer; }

/* বটম নেভিগেশন (নিচের মেনু) */
.fb-bottom-nav {
    position: fixed;
    bottom: 0; left: 0; width: 100%;
    background-color: #fff;
    border-top: 1px solid #ddd;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 0;
    z-index: 1000;
}
.fb-nav-item {
    color: #65676B;
    font-size: 24px;
    text-decoration: none;
    position: relative;
    padding: 5px 20px;
}
.fb-nav-item.active { color: #1877F2; }
.fb-nav-item .fb-badge { top: -2px; right: 10px; }
.fb-nav-avatar {
    width: 26px; height: 26px; border-radius: 50%; object-fit: cover;
    border: 2px solid transparent;
}
.fb-nav-item.active .fb-nav-avatar { border-color: #1877F2; }

/* ডেস্কটপে পুরনো নেভবার দেখাবে না, মোবাইলে দেখাবে */
@media (min-width: 768px) {
    .fb-mobile-header, .fb-bottom-nav { display: none; }
}
@media (max-width: 767px) {
    .navbar { display: none; } /* পুরনো নেভবার হাইড */
    .container { margin-top: 0 !important; }
}
/* =========================================
   সাইড মেনু (Side Drawer) স্টাইল
   ========================================= */
.sidebar-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9998;
    display: none;
}
.sidebar-overlay.active { display: block; }

.side-drawer {
    position: fixed;
    top: 0; left: -280px;
    width: 280px; height: 100%;
    background: #fff;
    z-index: 9999;
    transition: left 0.3s ease;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}
.side-drawer.active { left: 0; }

.drawer-link {
    display: block;
    padding: 15px 20px;
    text-decoration: none;
    color: #1C1E21;
    font-weight: 600;
    font-size: 15px;
    border-bottom: 1px solid #f0f2f5;
    transition: background 0.2s;
}
.drawer-link:hover { background: #F0F2F5; }
.drawer-link i { width: 30px; font-size: 18px; }

