* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', sans-serif;
}

html, body {
    background: #f0f2f5;
    color: #1c1e21;
    overflow-x: hidden;
}

/* NAVBAR */
.navbar {
    background: #1d3557;
    color: white;
    padding: 12px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar a {
    color: white;
    margin-left: 20px;
    font-weight: 500;
}

/* CARDS */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .05);
    padding: 15px;
    margin-bottom: 15px;
}

/* POSTS */
.post-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.post-header img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
}

.post-body {
    margin: 10px 0;
}

.post-image {
    width: 100%;
    border-radius: 10px;
    margin-top: 10px;
}

.post-actions {
    display: flex;
    justify-content: space-around;
    margin-top: 10px;
}

.post-actions button {
    border: none;
    background: none;
    font-weight: 600;
    cursor: pointer;
    color: #1d3557;
}

/* COMMENT */
.comment-box {
    margin-top: 10px;
}

.comment {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
}

.comment img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

/* PROFILE */
.profile-cover {
    height: 220px;
    background: #ccc;
    background-size: cover;
}

.profile-pic {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    border: 4px solid white;
    margin-top: -65px;
    margin-left: 25px;
}

.profile-name {
    margin-left: 170px;
    margin-top: -50px;
}

/* CHAT */
.messages-layout {
    max-width: 1000px;
    margin: auto;
    display: grid;
    grid-template-columns: 350px 1fr;
}

.chat-box {
    height: 500px;
    overflow-y: auto;
    background: white;
    padding: 15px;
}

.msg {
    padding: 8px 12px;
    border-radius: 12px;
    margin-bottom: 8px;
    max-width: 60%;
}

.msg.me {
    background: #1d3557;
    color: white;
    margin-left: auto;
}

.msg.other {
    background: #e4e6eb;
}

/* EVENTS */
.event-card {
    display: flex;
    gap: 15px;
}

.event-date {
    background: #1d3557;
    color: white;
    padding: 12px;
    border-radius: 10px;
    text-align: center;
}

/* FORMS */
.form-group {
    margin-bottom: 15px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 5px;
    display: block;
}

.btn-primary {
    background: #1d3557;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
}

/* CONNECTIONS */
.user-mini {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.user-mini img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

/* SEARCH */
.search-item {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.search-item img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
}

.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1d3557, #457b9d);
}

.auth-box {
    max-width: 440px;
    width: 100%;
    background: white;
    padding: 35px;
    border-radius: 14px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, .3);
}

/* LOGO */
.auth-logo {
    font-size: 34px;
    font-weight: 800;
    color: #1d3557;
    margin-bottom: 10px;
}

.auth-logo i {
    color: #e63946;
}

/* SUBTITLE */
.auth-subtitle {
    font-size: 15px;
    color: #6b7280;
    margin-bottom: 25px;
}

/* SPACING UTILS */
.text-center {
    text-align: center;
}

.mb-2 {
    margin-bottom: 10px;
}

.mb-3 {
    margin-bottom: 20px;
}

.mt-3 {
    margin-top: 20px;
}

/* HEADER */
.auth-header {
    text-align: center;
    margin-bottom: 25px;
}

/* INPUTS */
.form-control {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #ccd0d5;
    font-size: 15px;
}

.form-control:focus {
    outline: none;
    border-color: #1d3557;
}

/* FORM ROWS (SIDE BY SIDE FIELDS) */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* SELECT DROPDOWN ICON */
select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px;
    padding-right: 38px;
}

/* MOBILE RESPONSIVE */
@media (max-width: 500px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .auth-box {
        width: 95%;
    }
}

/* FEED GRID */
.feed-container {
    max-width: 1200px;
    margin: 20px auto;
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 20px;
    padding: 20px;
    min-height: 100vh;
    align-content: start;
    grid-auto-rows: min-content;
}

/* SIDEBAR */
.sidebar .card {
    margin-bottom: 20px;
}

.sidebar {
    position: sticky;
    top: 20px;
    max-height: none !important;
    height: fit-content;
    overflow-y: visible !important;
}

.post-action {
    display: block;
    padding: 10px;
    border-radius: 8px;
    color: #1d3557;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.post-action:hover {
    background: #e4e6eb;
}

.post-action:active,
.post-action:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
}

/* AVATARS */
.avatar,
.post-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: #1d3557;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* POST CARD */
.post {
    background: white;
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, .06);
    position: relative;
    z-index: 1;
    overflow: hidden;
    isolation: isolate;
    width: 100%;
    display: block;
    grid-row: auto;
}

.post::after {
    content: "";
    display: table;
    clear: both;
}

.post-header {
    display: flex;
    gap: 10px;
}

.post-user-info h4 {
    margin: 0;
}

.post-meta {
    font-size: 13px;
    color: #65676b;
}

.post-type {
    background: #e4e6eb;
    border-radius: 6px;
    padding: 2px 6px;
    font-size: 12px;
}

/* CONTENT */
.post-content {
    margin: 6px 0;
    font-size: 15px;
}

/* ACTIONS */
.post-actions {
    display: flex;
    justify-content: space-around;
    margin-top: 10px;
}

.post-actions button {
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 600;
    color: #65676b;
    pointer-events: auto !important;
}

.post-actions button:hover {
    color: #1d3557;
}

/* LIKE ACTIVE */
.liked {
    color: #ff3860 !important;
}

/* COMMENTS */
#comments- textarea {
    resize: none;
}

/* Add to style.css */
.default-avatar {
    background: linear-gradient(135deg, #1d3557 0%, #457b9d 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.default-cover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.top-nav {
    position: sticky;
    top: 0;
    z-index: 999;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    padding: 12px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Left */
.nav-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-logo {
    font-weight: 800;
    font-size: 20px;
    color: #1e6cff;
    letter-spacing: .5px;
}

.nav-logo i {
    color: #e53935 !important;
}

.nav-search {
    display: flex;
    align-items: center;
    background: #f0f2f5;
    padding: 8px 12px;
    border-radius: 25px;
    gap: 10px;
}

.nav-search input {
    border: none;
    outline: none;
    background: transparent;
    width: 180px;
}

/* Center icons */
.nav-center {
    display: flex;
    gap: 35px;
}

.nav-icon {
    font-size: 20px;
    color: #65676b;
    padding: 10px 14px;
    border-radius: 10px;
    transition: 0.2s;
}

.nav-icon:hover,
.nav-icon.active {
    background: #e7f0ff;
    color: #1877f2;
}

/* Right */
.nav-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f0f2f5;
    padding: 6px 12px;
    border-radius: 25px;
    color: #1c1e21;
    text-decoration: none;
}

.nav-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.nav-avatar img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    background: #f0f2f5;
}

.nav-btn {
    font-size: 18px;
    color: #65676b;
    padding: 8px 10px;
    border-radius: 8px;
    transition: 0.2s;
}

.nav-btn:hover {
    background: #f0f2f5;
    color: #1877f2;
}

.logout:hover {
    color: #f14668;
}

/* Message notification badge */
.msg-badge {
    position: absolute;
    background: #e41e3f;
    color: white;
    font-size: 11px;
    font-weight: 700;
    border-radius: 999px;
    padding: 2px 7px;
    top: 4px;
    right: -6px;
    line-height: 1;
}

.nav-msg-link {
    position: relative;
}

.post-author a,
.comment-author,
.post-avatar a {
    text-decoration: none;
    color: inherit;
}

.post-author a:hover,
.comment-author:hover {
    text-decoration: none;
}

/* ========== FEED LAYOUT - CORRECTED VERSION ========== */

/* Create a posts container to hold all posts */
.posts-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    align-items: start;
    width: 100%;
    min-width: 0;
}

/* Fix main content area */
.main-content {
    width: 100%;
    min-width: 0;
    overflow: hidden;
}

/* Prevent content from overflowing posts */
.post img,
.post video,
.post iframe {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Prevent scrolling issues */
html {
    scroll-behavior: auto;
    overflow-anchor: none;
}

/* Fix overlapping issues */
body {
    overflow-x: hidden;
    position: relative;
}

/* Post Avatar */
.post-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 12px;
    border: 2px solid #667eea;
    flex-shrink: 0;
}

.post-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Comment Avatar */
.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid #667eea;
}

.comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ===== MODERN COMMENT SYSTEM ===== */

/* Comment Input */
.comment-input-container .commenter-avatar {
    width: 32px;          /* same size as other avatars */
    height: 32px;         /* square */
    border-radius: 50%;   /* round */
    object-fit: cover;    /* fill circle without stretching */
    display: block;       /* prevent flex/stretch issues */
}

.comment-input-wrapper {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 12px;
}

.commenter-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #667eea;
    flex-shrink: 0;
}

.input-group {
    flex: 1;
    position: relative;
}

.comment-input {
    width: 100%;
    padding: 12px 50px 12px 16px;
    border: 1px solid #e4e6eb;
    border-radius: 20px;
    font-size: 14px;
    background: white;
    transition: all 0.2s;
    outline: none;
}

.comment-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.input-actions {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 8px;
}

.emoji-btn,
.photo-btn {
    background: none;
    border: none;
    color: #65676b;
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    transition: all 0.2s;
}

.emoji-btn:hover,
.photo-btn:hover {
    background: #f0f2f5;
    color: #1d3557;
}

.comment-submit-row {
    display: flex;
    justify-content: flex-end;
    padding-top: 8px;
    border-top: 1px solid #e4e6eb;
}

.btn-post-comment.modern-btn {
    padding: 8px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-post-comment.modern-btn:hover {
    background: #5a67d8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-post-comment.modern-btn:active {
    transform: translateY(0);
}

/* Modern Comment Items */
/* Make comment items fill horizontal space */
.comment-item {
    display: flex;              /* Align avatar + bubble in a row */
    align-items: flex-start;
    gap: 10px;                  /* Space between avatar and bubble */
    width: 100%;                /* Take full width of container */
}

/* Make the bubble fill remaining space */
.comment-bubble {
    flex: 1;                    /* Grow to fill remaining space */
    max-width: 100%;            /* Don’t exceed container width */
    word-wrap: break-word;      /* Break long words */
    background-color: #f4f4f4;  /* Optional: make bubble more visible */
    padding: 8px 12px;          /* Some padding */
    border-radius: 12px;
}

.replyer-avatar {
    display: none !important;
}


.replyer-avatar {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    max-width: 32px !important;
    max-height: 32px !important;

    border-radius: 50% !important;
    object-fit: cover !important;

    flex: 0 0 32px !important;
    display: inline-block !important;
}



/* Make input group grow */
.reply-input-wrapper .input-group {
    flex: 1;                   /* Take remaining space */
}

/* Make textarea fill the width */
.reply-input {
    width: 100%;               /* Fill the container */
    min-height: 36px;          /* Optional: initial height */
    resize: vertical;          /* Allow vertical resizing */
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid #ccc;
    box-sizing: border-box;    /* Include padding in width */
    font-family: inherit;
    font-size: 14px;
}

.comment-avatar.modern {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #667eea;
    flex-shrink: 0;
}

.comment-avatar.modern img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comment-body.modern {
    flex: 1;
}

.comment-header.modern {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.comment-author.modern {
    font-weight: 600;
    font-size: 14px;
    color: #1c1e21;
    text-decoration: none;
}

.comment-author.modern:hover {
    text-decoration: underline;
}

.comment-time.modern {
    font-size: 12px;
    color: #65676b;
}

.comment-text.modern {
    font-size: 14px;
    line-height: 1.5;
    color: #1c1e21;
    margin-bottom: 8px;
}

.comment-actions.modern {
    display: flex;
    gap: 16px;
    align-items: center;
}

.comment-action-btn.modern {
    background: none;
    border: none;
    color: #65676b;
    font-size: 13px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s;
}

.comment-action-btn.modern:hover {
    background: #e4e6eb;
    color: #1d3557;
}

.comment-delete-btn.modern {
    margin-left: auto;
    background: none;
    border: none;
    color: #f14668;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s;
}

.comment-delete-btn.modern:hover {
    background: #fff0f0;
}

/* Share Modal Styles */
.share-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.share-modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.share-modal-header {
    padding: 20px;
    border-bottom: 1px solid #e4e6eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.share-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #1c1e21;
}

.share-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #65676b;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.share-modal-close:hover {
    background-color: #f0f2f5;
}

.share-modal-body {
    padding: 20px;
}

.share-preview {
    background-color: #f0f2f5;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    border-left: 4px solid #1877f2;
}

.original-post-preview {
    font-size: 14px;
}

.original-post-preview strong {
    display: block;
    margin-bottom: 8px;
    color: #1c1e21;
}

.preview-text {
    color: #65676b;
    margin: 0;
    line-height: 1.4;
}

.share-text-container {
    margin-bottom: 20px;
}

.share-text-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ced0d4;
    border-radius: 8px;
    font-size: 15px;
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
    box-sizing: border-box;
}

.share-text-input:focus {
    outline: none;
    border-color: #1877f2;
    box-shadow: 0 0 0 2px rgba(24, 119, 242, 0.2);
}

.share-char-count {
    text-align: right;
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

.share-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid #e4e6eb;
}

.share-composer {
    background: #f9fafb;
    border-radius: 12px;
    padding: 12px;
    margin-top: 10px;
    border: 1px solid #e5e7eb;
}

.share-input {
    width: 100%;
    min-height: 60px;
    border: none;
    resize: none;
    font-size: 14px;
    background: transparent;
    outline: none;
}

.share-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 6px;
}

.btn-share-confirm {
    background: #2563eb;
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 999px;
    cursor: pointer;
}

.btn {
    padding: 12px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: .2s;
}

.btn-success {
    background: #2a9d8f;
    color: white;
}

/* Make navbar fixed at the top */
.fixed-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Add padding to body to prevent content from hiding under navbar */
/* Only apply padding when there's a logged-in navbar */
body:has(.top-nav:not(.public-nav)) {
    padding-top: 72px;
}

/* OR use this alternative */
body.logged-in {
    padding-top: 72px;
}

/* For mobile responsiveness */
@media (max-width: 768px) {
    body {
        padding-top: 56px;
    }
    
    /* Mobile Responsive Fix for Feed Container */
    .feed-container {
        display: flex !important;
        flex-direction: column !important;
        padding: 10px !important;
        gap: 0 !important;
        max-width: 100% !important;
        margin: 0 !important;
        grid-template-columns: 1fr !important;
    }
    
    /* SIDEBAR COMES FIRST on mobile */
    .sidebar {
        width: 100% !important;
        order: 1 !important;
        margin-top: 40px !important;
        margin-bottom: 15px !important;
        position: static !important;
    }
    
    /* MAIN CONTENT COMES SECOND on mobile */
    .main-content {
        width: 100% !important;
        order: 2 !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* Fix posts container */
    .posts-container {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        gap: 15px !important;
    }
    
    /* Ensure cards fit mobile */
    .card {
        max-width: 100% !important;
        margin: 10px 0 !important;
        padding: 15px !important;
    }
    
    /* Optional: Make create post card more compact on mobile */
    .main-content > .card:first-child {
        margin-bottom: 20px !important;
    }
}

/* If you have specific content containers, add padding to them too */
.main-container {
    padding-top: 20px;
}

/* ================= EVENTS ================= */

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 24px;
}

.event-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 22px;
    display: flex;
    gap: 18px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .08);
    border: 1px solid #e4e6eb;
    transition: .25s ease;
    position: relative;
}

.event-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, .12);
}

.event-date {
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    color: #fff;
    padding: 14px;
    border-radius: 12px;
    min-width: 80px;
    text-align: center;
}

.event-day {
    font-size: 28px;
    font-weight: 800;
}

.event-month {
    font-size: 13px;
    opacity: .9;
}

.event-meta {
    position: absolute;
    top: 14px;
    right: 14px;
    background: #f1f5f9;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #1d3557;
}

.attendee-list {
    position: absolute;
    bottom: 14px;
    right: 14px;
    background: #f8fafc;
    padding: 10px;
    border-radius: 10px;
    font-size: 13px;
    max-height: 140px;
    overflow: auto;
}

.attendee-list ul {
    margin: 6px 0 0;
    padding-left: 16px;
}

/* ===== LinkedIn-style Post Stats ===== */

.post-stats {
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 6px 0 10px;
    font-size: 13px;
    color: #65676b;
}

.post-stats .stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.post-stats .stat-item i {
    font-size: 14px;
}

.comments-preview {
    padding: 8px 12px;
}

.comment-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 6px;
}

.comment-bubble {
    background: #f0f2f5;
    border-radius: 14px;
    padding: 6px 10px;
    max-width: 85%;
}

.comment-author {
    font-weight: 600;
    font-size: 13px;
    margin-right: 6px;
    text-decoration: none;
    color: #050505;
}

.comment-text {
    font-size: 13px;
    color: #050505;
}

.view-comments-btn {
    background: none;
    border: none;
    color: #65676b;
    font-size: 13px;
    cursor: pointer;
    padding: 4px 0;
}

.comments-drawer {
    display: none;
    padding: 8px 12px;
    border-top: 1px solid #e4e6eb;
}

.comment-composer {
    display: flex;
    align-items: center;
    gap: 8px;
}

.comment-composer textarea {
    flex: 1;
    resize: none;
    border-radius: 20px;
    border: 1px solid #ccd0d5;
    padding: 6px 12px;
    font-size: 14px;
}

.comment-composer button {
    background: #1877f2;
    border: none;
    color: #fff;
    padding: 6px 12px;
    border-radius: 16px;
    cursor: pointer;
}



/* Delete button styles */
.comment-delete-btn,
.reply-delete-btn {
    background: none;
    border: none;
    color: #65676B;
    cursor: pointer;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 4px;
    opacity: 0.7;
    transition: all 0.2s ease;
    margin-left: 8px;
}

.comment-delete-btn:hover,
.reply-delete-btn:hover {
    color: #ff3b30;
    opacity: 1;
    background: rgba(255, 59, 48, 0.1);
}

.comment-delete-btn.preview-delete {
    margin-left: auto;
}

.comment-header,
.reply-header {
    display: flex;
    align-items: center;
    margin-bottom: 2px;
}

.comment-header .comment-delete-btn,
.reply-header .reply-delete-btn {
    margin-left: auto;
}

/* No comments/replies messages */
.no-comments,
.no-replies {
    color: #65676B;
    font-style: italic;
    padding: 16px;
    text-align: center;
    font-size: 14px;
}

/* Error message */
.error {
    color: #ff3b30;
    padding: 16px;
    text-align: center;
    font-size: 14px;
}

/* Reply header */
.reply-header {
    display: flex;
    align-items: center;
    margin-bottom: 2px;
}

.reply-author {
    font-weight: 600;
    font-size: 13px;
    color: #050505;
    text-decoration: none;
}

.reply-author:hover {
    text-decoration: underline;
}

/* Reply Input Avatar */
.replyer-avatar {
    width: 36px;             /* same as .commenter-avatar */
    height: 36px;
    border-radius: 50%;      /* makes it circular */
    object-fit: cover;       /* crops to fit square */
    border: 2px solid #667eea; /* optional: match comment borders */
    flex-shrink: 0;          /* prevents it from stretching */
}

/* AUTH PAGES SHOULD NOT RESERVE SPACE FOR NAVBAR */
.auth-container {
    padding-top: 0 !important;
}

body:has(.auth-container) {
    padding-top: 0 !important;
}



.auth-box a,
.auth-box button,
.auth-box .btn {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    margin: 12px 0 !important;
    float: none !important;
    clear: both !important;
}

/* 2. FIX for login/register links in auth box */
.auth-box a[href="/login"],
.auth-box a[href="/register"] {
    display: block !important;
    padding: 14px !important;
    margin: 15px 0 !important;
    text-align: center !important;
    text-decoration: none !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    font-size: 16px !important;
}

/* 3. SPECIFICALLY target the login button */
.auth-box a[href="/login"] {
    background: #1d3557 !important;
    color: white !important;
    order: 1 !important;
}

/* 4. SPECIFICALLY target the register link */
.auth-box a[href="/register"] {
    background: white !important;
    color: #1d3557 !important;
    border: 2px solid #1d3557 !important;
    order: 2 !important;
}

/* 5. Force vertical stacking */
.text-center.mt-3 p {
    display: flex !important;
    flex-direction: column !important;
    gap: 15px !important;
    align-items: center !important;
}

/* 6. Remove any absolute positioning that might cause overlap */
.auth-box * {
    position: static !important;
    z-index: auto !important;
}

/* 7. Clear any floats */
.auth-box::after {
    content: "";
    display: table;
    clear: both;
}

/* 8. Ensure the container has proper height */
.auth-box {
    min-height: auto !important;
    overflow: visible !important;
}

/* ========== FIX FOR AUTH PAGES WITH NAVBAR ========== */

/* Remove body padding for auth pages */
body.auth-page {
    padding-top: 0 !important;
}

/* Make navbar NOT fixed on auth pages */
body.auth-page .top-nav {
    position: relative !important;
}

/* Push auth container below navbar */
.auth-container {
    min-height: calc(100vh - 60px) !important;
    margin-top: 60px !important;
    padding: 20px !important;
}

/* Alt */
/*
body.auth-page .top-nav {
    display: none !important;
}
.auth-container {
    min-height: 100vh !important;
    margin-top: 0 !important;
}
*/
.comment-avatar {
    width: 32px;          /* square size */
    height: 32px;         /* same as width */
    border-radius: 50%;   /* perfectly round */
    object-fit: cover;    /* crop image to fill circle without stretching */
    display: block;       /* prevent flex/stretch issues */
}

.feed-container {
    display: flex;          /* Sidebar + main content side by side */
    gap: 20px;              /* Space between sidebar and main area */
    max-width: 1200px;      /* Optional: max width of the feed */
    margin: 0 auto;         /* Center the container */
    padding: 20px;          /* Optional padding */
}

.sidebar {
    flex: 0 0 300px;        /* Fixed width sidebar */
}

.main-content {
    flex: 1;                /* Main feed takes remaining space */
}

/* Optional: make the View Profile button full width and centered */
.sidebar .btn-block {
    display: block;
    width: 100%;
    text-align: center;
}
