/* =========================================
   1. General Reset & Typography
   ========================================= */
body {
    font-family: 'lucida grande', tahoma, verdana, arial, sans-serif;
    background-color: #e9ebee;
    margin: 0;
    padding: 0;
    color: #1d2129;
    overflow-x: hidden; /* মোবাইল স্ক্রিনে সাইড স্ক্রল বন্ধ রাখতে */
}

a {
    text-decoration: none;
    cursor: pointer;
}

a:hover {
    text-decoration: underline;
}

/* =========================================
   2. Header Area (Blue Bar)
   ========================================= */
.header {
    background-color: #3b5998;
    height: 42px;
    width: 100%;
    position: fixed;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #133783;
    box-shadow: 0 2px 2px -2px rgba(0, 0, 0, .52);
}

.inner-header {
    max-width: 980px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 15px; /* ডেস্কটপে বর্ডারের সাথে লেগে না থাকতে */
    box-sizing: border-box;
}

.logo {
    color: white;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    flex-shrink: 0;
}

.menu {
    display: flex;
    align-items: center;
}

.menu a {
    color: white;
    font-size: 12px;
    margin-left: 15px;
    font-weight: bold;
    white-space: nowrap; /* টেক্সট ভেঙে নিচে না নামতে */
}

/* Signup Button in Header */
.signup-btn {
    background: #4267b2; 
    padding: 4px 10px; 
    border: 1px solid #29487d;
    border-radius: 2px;
}

/* =========================================
   3. Layout Container
   ========================================= */
.container {
    max-width: 980px;
    margin: 55px auto 0; /* Header-এর উচ্চতার সাথে সামঞ্জস্য রেখে */
    display: flex;
    justify-content: center;
    padding: 0 10px;
    box-sizing: border-box;
}

/* =========================================
   4. Sidebar (Left)
   ========================================= */
.sidebar {
    width: 200px;
    padding: 10px;
    flex-shrink: 0; /* ডেস্কটপে সাইজ ঠিক রাখতে */
}

.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar li a {
    color: #333;
    font-size: 13px;
    display: block;
    padding: 8px 6px;
    border-radius: 2px;
}

.sidebar li a:hover {
    background-color: #eff2f5;
    text-decoration: none;
}

/* =========================================
   5. News Feed (Center)
   ========================================= */
.feed {
    width: 100%;
    max-width: 500px; /* ফিডের মূল উইডথ */
    margin: 0 20px;
    box-sizing: border-box;
}

/* Create Post Box */
.create-post {
    background: white;
    border: 1px solid #dddfe2;
    border-radius: 3px;
    padding: 12px;
    margin-bottom: 15px;
}

textarea {
    width: 100%;
    border: none;
    resize: none;
    font-family: inherit;
    outline: none;
    min-height: 60px;
    font-size: 14px;
    box-sizing: border-box;
}

.post-actions {
    border-top: 1px solid #f2f2f2;
    padding-top: 10px;
    text-align: right;
    margin-top: 5px;
}

/* Buttons */
button {
    border: 1px solid;
    font-weight: bold;
    padding: 6px 16px;
    cursor: pointer;
    font-size: 12px;
    border-radius: 2px;
    transition: 0.2s;
}

button[type="submit"] {
    background-color: #4267b2;
    color: white;
    border-color: #4267b2;
}

button:active {
    transform: scale(0.98);
}

/* =========================================
   6. Post Design
   ========================================= */
.post {
    background: white;
    border: 1px solid #dddfe2;
    border-radius: 3px;
    padding: 12px;
    margin-bottom: 15px;
}

.post-header {
    margin-bottom: 10px;
}

.username {
    color: #3b5998;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
}

.time {
    color: #90949c;
    font-size: 12px;
    margin-left: 5px;
}

.post-content {
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 12px;
    word-wrap: break-word; /* লম্বা টেক্সট যাতে স্ক্রিন থেকে বের না হয় */
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 2px;
}

.post-footer {
    border-top: 1px solid #e1e2e3;
    padding-top: 10px;
    font-size: 12px;
    color: #616770;
}

.post-footer a {
    color: #616770;
    font-weight: bold;
    margin-right: 15px;
}

/* =========================================
   7. Comments Section
   ========================================= */
.comments-section {
    background-color: #f6f7f9;
    padding: 10px;
    margin: 10px -12px -12px -12px; /* পোস্ট বর্ডার পর্যন্ত বিস্তৃত করতে */
    border-top: 1px solid #e1e2e3;
}

.single-comment {
    font-size: 13px;
    margin-bottom: 8px;
    padding-bottom: 5px;
    border-bottom: 1px solid #e9ebee;
}

.comment-form input {
    width: 100%;
    padding: 8px;
    font-size: 12px;
    border: 1px solid #d3d6db;
    box-sizing: border-box;
    border-radius: 2px;
}

/* =========================================
   8. Login & Register Pages
   ========================================= */
.login-wrapper {
    padding-top: 60px;
    display: flex;
    justify-content: center;
    min-height: calc(100vh - 42px);
    align-items: flex-start;
}

.login-box, .auth-container {
    width: 100%;
    max-width: 350px;
    background: #fff;
    padding: 25px;
    border: 1px solid #ccc;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.error-box {
    background-color: #ffebe8;
    border: 1px solid #dd3c10;
    padding: 10px;
    margin-bottom: 15px;
    font-size: 13px;
    color: #333;
    border-radius: 3px;
}

/* =========================================
   9. Responsive Design (Mobile & Tablet)
   ========================================= */

/* ছোট ল্যাপটপ বা ট্যাবলেটের জন্য */
@media (max-width: 900px) {
    .inner-header, .container {
        max-width: 100%;
    }
}

/* মোবাইল ফোনের জন্য (৭৬৮ পিক্সেল এবং তার নিচে) */
@media (max-width: 768px) {
    .header {
        height: auto;
        padding: 5px 0;
    }

    .inner-header {
        flex-direction: column; /* মোবাইলে লোগো উপরে মেনু নিচে */
        gap: 5px;
    }

    .logo {
        font-size: 20px;
    }

    .menu a {
        margin: 0 8px;
        font-size: 11px;
    }

    .container {
        margin-top: 80px; /* Header বড় হওয়ার কারণে ব্যবধান বাড়ানো হলো */
        display: block; /* ফ্লেক্স বন্ধ করে স্ট্যাক করা হলো */
        padding: 0 8px;
    }
    
    .sidebar {
        display: none; /* মোবাইলে বাম পাশের মেনু হাইড থাকবে */
    }

    .feed {
        width: 100%;
        margin: 0;
        max-width: 100%;
    }

    .post {
        border-radius: 0; /* মোবাইল অ্যাপের লুক দিতে */
        margin-left: -8px;
        margin-right: -8px;
        border-left: none;
        border-right: none;
    }

    .login-box, .auth-container {
        width: 92%;
        margin: 20px auto;
        padding: 15px;
    }

    .search-container {
        margin: 10px 0 !important;
        width: 100%;
    }
}

/* অত্যন্ত ছোট স্ক্রিনের জন্য (যেমন: iPhone SE) */
@media (max-width: 360px) {
    .logo {
        font-size: 18px;
    }
    .menu a {
        font-size: 10px;
        margin-left: 5px;
    }
}