/* CSS Variables */
/* CSS Variables */
:root {
    --title-logo-img: url("images/logos/logo-regular.71a13102702d.svg");
    --simple-logo-img: url("images/logos/logo-simple.1bbe868b9e90.svg");
    --friend-request-btn: url("images/icons/olive-branch-frnd-rqst-btn-icon-inverted.d02088195609.svg");
    --unfriend-icon: url("images/icons/unfriend-icon-black.675eeecafeb5.svg");
    --direct-message-btn: url("images/icons/quill-msg-btn-icon-inverted.8eb2b251c34b.svg");
    --like-greyed-out: url("images/icons/heart-grey.6383d824cc9e.svg");
    --liked-icon: url("images/icons/heart-black.030928f74112.svg");
    --comment-icon: url("images/icons/comment-white.f986deca77e4.svg");
    --blog-icon: url("images/icons/blog-icon-black.3a9099acadf5.svg");
    --stories-icon: url("images/icons/stories-icon-black.8934d1182a66.svg");
    --conversations-icon: url("images/icons/Conversations-black.d0859c3fff5c.svg");
    --notifications-icon: url("images/icons/bell-icon-black.fb4245f58f89.svg");
    --settings-icon: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEyIDJDMTMuMSAyIDE0IDIuOSAxNCA0VjVDMTUuNiA1LjIgMTcuMSA1LjcgMTguNCA2LjZMMTkuMyA1LjdDMjAuMSA0LjkgMjEuMyA0LjkgMjIuMSA1LjdDMjIuOSA2LjUgMjIuOSA3LjcgMjIuMSA4LjVMMjEuMiA5LjRDMjIuMSAxMC43IDIyLjYgMTIuMiAyMi44IDEzLjhIMjMuOEMyNC45IDEzLjggMjUuOCAxNC43IDI1LjggMTUuOEMyNS44IDE2LjkgMjQuOSAxNy44IDIzLjggMTcuOEgyMi44QzIyLjYgMTkuNCAyMi4xIDIwLjkgMjEuMiAyMi4yTDIyLjEgMjMuMUMyMi45IDIzLjkgMjIuOSAyNS4xIDIyLjEgMjUuOUMyMS4zIDI2LjcgMjAuMSAyNi43IDE5LjMgMjUuOUwxOC40IDI1QzE3LjEgMjUuOSAxNS42IDI2LjQgMTQgMjYuNlYyN0MxNCAyOC4xIDEzLjEgMjkgMTIgMjlDMTAuOSAyOSAxMCAyOC4xIDEwIDI3VjI2LjZDOC40IDI2LjQgNi45IDI1LjkgNS42IDI1TDQuNyAyNS45QzMuOSAyNi43IDIuNyAyNi43IDEuOSAyNS45QzEuMSAyNS4xIDEuMSAyMy45IDEuOSAyMy4xTDIuOCAyMi4yQzEuOSAyMC45IDEuNCAzOS40IDEuMiAxNy44SDAuMkMtMC45IDE3LjggLTEuOCAxNi45IC0xLjggMTUuOEMtMS44IDE0LjcgLTAuOSAxMy44IDAuMiAxMy44SDEuMkMxLjQgMTIuMiAxLjkgMTAuNyAyLjggOS40TDEuOSA4LjVDMS4xIDcuNyAxLjEgNi41IDEuOSA1LjdDMi43IDQuOSAzLjkgNC45IDQuNyA1LjdMNS42IDYuNkM2LjkgNS43IDguNCA1LjIgMTAgNVY0QzEwIDIuOSAxMC45IDIgMTIgMlpNMTIgMTVDMTMuNjYgMTUgMTUgMTMuNjYgMTUgMTJDMTUgMTAuMzQgMTMuNjYgOSAxMiA5QzEwLjM0IDkgOSAxMC4zNCA5IDEyQzkgMTMuNjYgMTAuMzQgMTUgMTIgMTVaIiBmaWxsPSIjMzYzMTJhIi8+Cjwvc3ZnPgo=");
    --background: #f2f2f2;
    --bg-theme-image: url("images/lightPaperBG.8fe482f57468.png");
    --header-bg: #f8e0bb;
    --header-color: #fff;
    --title-txt-color: #000;
    --container-bg: #fff;
    --text-color: #222;
    --form-bg: #f8f4ee;
    --button-bg: #36312a;
    --button-hover: #f8e0bb;
    --link-color: #36312a;
    --link-hover: #f8e0bb;
    --error-bg: #ffe5e5;
    --error-color: #b20000;
    --card-bg: #fffbe6;
    --card-title: #36312a;
    --shadow: 0 4px 24px rgba(54, 45, 32, 0.08);
    --link-text-shadow: 2px 2px 4px rgba(54, 45, 32, 0.08);
    --border-radius: 12px;
}

[data-theme="dark"] {
    --title-logo-img: url("images/logos/logo-inverted.dc5f8050ce88.svg");
    --simple-logo-img: url("images/logos/logo-inverted-simple.3b0d295838a8.svg");
    --friend-request-btn: url("images/icons/olive-branch-frnd-rqst-btn-icon.32f2d3f512f1.svg");
    --unfriend-icon: url("images/icons/unfriend-icon-white.7b3b4bf95388.svg");
    --direct-message-btn: url("images/icons/quill-msg-btn-icon.af435ac7a360.svg");
    --like-greyed-out: url("images/icons/heart-grey.6383d824cc9e.svg");
    --liked-icon: url("images/icons/heart-white.b6f69cb70887.svg");
    --comment-icon: url("images/icons/comment-no-outline.56086757388f.svg");
    --blog-icon: url("images/icons/blog-icon-white.ac16c7a0d6fb.svg");
    --stories-icon: url("images/icons/stories-icon-white.30319085c818.svg");
    --conversations-icon: url("images/icons/Conversations-white.030bb1585222.svg");
    --notifications-icon: url("images/icons/bell-icon-white.3384e8a99571.svg");
    --settings-icon: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEyIDJDMTMuMSAyIDE0IDIuOSAxNCA0VjVDMTUuNiA1LjIgMTcuMSA1LjcgMTguNCA2LjZMMTkuMyA1LjdDMjAuMSA0LjkgMjEuMyA0LjkgMjIuMSA1LjdDMjIuOSA2LjUgMjIuOSA3LjcgMjIuMSA4LjVMMjEuMiA5LjRDMjIuMSAxMC43IDIyLjYgMTIuMiAyMi44IDEzLjhIMjMuOEMyNC45IDEzLjggMjUuOCAxNC43IDI1LjggMTUuOEMyNS44IDE2LjkgMjQuOSAxNy44IDIzLjggMTcuOEgyMi44QzIyLjYgMTkuNCAyMi4xIDIwLjkgMjEuMiAyMi4yTDIyLjEgMjMuMUMyMi45IDIzLjkgMjIuOSAyNS4xIDIyLjEgMjUuOUMyMS4zIDI2LjcgMjAuMSAyNi43IDE5LjMgMjUuOUwxOC40IDI1QzE3LjEgMjUuOSAxNS42IDI2LjQgMTQgMjYuNlYyN0MxNCAyOC4xIDEzLjEgMjkgMTIgMjlDMTAuOSAyOSAxMCAyOC4xIDEwIDI3VjI2LjZDOC40IDI2LjQgNi45IDI1LjkgNS42IDI1TDQuNyAyNS45QzMuOSAyNi43IDIuNyAyNi43IDEuOSAyNS45QzEuMSAyNS4xIDEuMSAyMy45IDEuOSAyMy4xTDIuOCAyMi4yQzEuOSAyMC45IDEuNCAzOS40IDEuMiAxNy44SDAuMkMtMC45IDE3LjggLTEuOCAxNi45IC0xLjggMTUuOEMtMS44IDE0LjcgLTAuOSAxMy44IDAuMiAxMy44SDEuMkMxLjQgMTIuMiAxLjkgMTAuNyAyLjggOS40TDEuOSA4LjVDMS4xIDcuNyAxLjEgNi41IDEuOSA1LjdDMi43IDQuOSAzLjkgNC45IDQuNyA1LjdMNS42IDYuNkM2LjkgNS43IDguNCA1LjIgMTAgNVY0QzEwIDIuOSAxMC45IDIgMTIgMlpNMTIgMTVDMTMuNjYgMTUgMTUgMTMuNjYgMTUgMTJDMTUgMTAuMzQgMTMuNjYgOSAxMiA5QzEwLjM0IDkgOSAxMC4zNCA5IDEyQzkgMTMuNjYgMTAuMzQgMTUgMTIgMTVaIiBmaWxsPSIjZjhlMGJiIi8+Cjwvc3ZnPgo=");
    --background: #222;
    --bg-theme-image: url("images/darkPaperBG.9760a46262c5.png");
    --header-bg: #36312a;
    --header-color: #f8e0bb;
    --title-txt-color: #fff;
    --container-bg: #2d2d2d;
    --text-color: #f2f2f2;
    --form-bg: #36312a;
    --button-bg: #f8e0bb;
    --button-hover: #4e4231;
    --link-color: #f8e0bb;
    --link-hover: #36312a;
    --error-bg: #4e4231;
    --error-color: #f8e0bb;
    --card-bg: #36312a;
    --card-title: #f8e0bb;
    --shadow: 0 4px 24px rgba(236, 203, 155, 0.08);
    --link-text-shadow: 2px 2px 4px  rgba(236, 203, 155, 0.08);
    --border-radius: 12px;
}


/* Import fonts must come before other rules (except @charset) */
@import url('https://fonts.googleapis.com/css2?family=Lexend+Deca:wght@100;200;300;400;500;600;700;800;900&display=swap');

/* Define the custom font */
@font-face {
    font-family: 'Brother Signature';
    src: url("brother-signature-font/BrotherSignature-7BWnK.f6efbc31131d.otf") format('opentype');
    font-weight: normal;
    font-style: normal;
}

/* HTML Elements */
a {
    color: var(--link-color);
    text-decoration: underline;
    transition: color 0.2s;
}
a:hover {
    color: var(--card-title);
    text-shadow: var(--link-text-shadow)
}

body {
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    background-image: var(--bg-theme-image);
    background-repeat: no-repeat;
    background-position: center;
    background-attachment: fixed;
    background-size: cover;
    color: var(--text-color);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    max-width: 100vw;
    /* Base font size increase for better mobile readability */
    font-size: 16px;
    line-height: 1.5;
}    

header {
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100vw;
    display: grid;
    place-items: center;
    background-color: var(--header-bg);
}

header.site-header {
    color: var(--title-txt-color);
    box-shadow: var(--shadow);
    padding: 0;
    margin-bottom: 0;
    width: 100vw;
}

hr {
    border: none;
    border-top: 1.5px solid #ececec;
    margin: 24px 0;
}   

html {
    width: 100vw;
    overflow-x: hidden;
}

li {
    padding: 12px 0;
    border-bottom: 1px solid #ececec;
    font-size: 1.1rem;
}    

li:last-child {
    border-bottom: none;
}    

main {
    max-width: 900px;
    margin: 48px auto 0px auto;
    padding: 0 16px 48px 16px;
    display: grid;
    place-items: center;
}    

svg {
    display: block;
    margin-bottom: 10px;
}    

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}    

.auth-link {
    color: var(--title-txt-color);
    text-decoration: none;
    font-weight: 600;
    padding: 12px 16px;
    border-radius: var(--border-radius);
    transition: background 0.2s, color 0.2s;
    font-size: 1.1rem;
    justify-content: space-between;
    display: inline-block;
}    

.auth-link:hover {
    background-color: var(--button-hover);
    color: var(--header-color);
}    

.notification-link {
    position: relative;
    display: inline-flex !important;
    align-items: center;
    gap: 4px;
}

.notification-bell {
    font-size: 1.1rem;
}

.notification-badge {
    background: #dc3545;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: -2px;
    right: -2px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* Navigation Icon Styles */
.nav-icon-link {
    display: flex !important;
    align-items: center;
    gap: 8px;
}

.nav-icon {
    width: 20px;
    height: 20px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    flex-shrink: 0;
    transition: 0.2s;
}
.nav-icon:hover {
    scale: 1.1;
}

.blog-icon {
    background-image: var(--blog-icon);
}

.chapter-box-card {
    background-color: var(--form-bg);
    padding: 16px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--button-bg);
    margin-bottom: 24px;
}

.conversations-icon {
    background-image: var(--conversations-icon);
}

.notifications-icon {
    background-image: var(--notifications-icon);
}

.settings-icon {
    background-image: var(--settings-icon);
}

/* Desktop: Hide text, show only icons */
@media (min-width: 769px) {
    .nav-icon-link .nav-text {
        display: none;
    }
    
    .nav-icon-link:hover .nav-text {
        display: inline;
        position: absolute;
        bottom: -35px;
        left: 50%;
        transform: translateX(-50%);
        background: var(--container-bg);
        color: var(--text-color);
        padding: 6px 10px;
        border-radius: 6px;
        font-size: 0.85rem;
        white-space: nowrap;
        box-shadow: var(--shadow);
        border: 1px solid var(--form-bg);
        z-index: 1000;
    }
}

/* Mobile: Show both icon and text */
@media (max-width: 768px) {
    .nav-icon-link {
        justify-content: flex-start;
    }
    
    .nav-icon-link .nav-text {
        display: inline;
    }
}

/* Profile Link Styles */
.profile-link {
    display: flex !important;
    align-items: center;
    gap: 8px;
}

.nav-profile-picture {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    flex-shrink: 0;
}

.profile-username {
    white-space: nowrap;
}

/* Profile Page Icon Button Styles */
.profile-icon-btn {
    display: flex !important;
    align-items: center;
    padding: 0px;
    transition: all 0.2s ease;
    background: none;
    border:none;
}

.profile-action-icon {
    width: 30px;
    height: 30px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    flex-shrink: 0;
}

.profile-icon-btn .dm-icon {
    background-image: var(--direct-message-btn);
}

.profile-icon-btn .unfriend-icon {
    background-image: var(--friend-request-btn);
}
.profile-icon-btn .unfriend-icon:hover {
    background-image: var(--unfriend-icon);
}


.profile-icon-btn .friend-request-icon {
    background-image: var(--friend-request-btn);
    transition: background-image 0.3s ease;
}


/* Desktop: Hide text, show only icons with tooltips */
@media (min-width: 769px) {
    .profile-icon-btn .profile-action-text {
        display: none;
    }
    
    /* Specific styling for unfriend text outside button */
    form .profile-action-text {
        display: none;
    }
    
    .profile-icon-btn:hover {
        position: relative;
    }
    
    .profile-icon-btn:hover .profile-action-text {
        display: inline;
        position: absolute;
        bottom: -35px;
        left: 50%;
        transform: translateX(-50%);
        background: var(--container-bg);
        color: var(--text-color);
        padding: 6px 10px;
        border-radius: 6px;
        font-size: 0.85rem;
        white-space: nowrap;
        box-shadow: var(--shadow);
        border: 1px solid var(--form-bg);
        z-index: 1000;
    }
    
    /* Show unfriend text on button hover */
    form:hover .profile-action-text {
        display: inline;
        position: absolute;
        bottom: -35px;
        left: 50%;
        transform: translateX(-50%);
        background: var(--container-bg);
        color: var(--text-color);
        padding: 6px 10px;
        border-radius: 6px;
        font-size: 0.85rem;
        white-space: nowrap;
        box-shadow: var(--shadow);
        border: 1px solid var(--form-bg);
        z-index: 1000;
    }
}

/* Mobile: Show both icon and text */
@media (max-width: 768px) {
    .profile-icon-btn {
        justify-content: center;
    }
    
    .profile-icon-btn .profile-action-text {
        display: inline;
    }
    
    /* Show unfriend text on mobile */
    form .profile-action-text {
        display: inline;
    }
    
    .profile-action-icon {
        width: 18px;
        height: 18px;
    }
}

/* Inline form styling for unfriend button */
.inline-form {
    display: inline-block;
    position: relative;
}

/* Navbar Icon Styles */
.auth-link.icon-only {
    position: relative;
    width: 32px;
    height: 32px;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-link.icon-only::before {
    content: '';
    width: 20px;
    height: 20px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.auth-link.icon-only .auth-text {
    display: none;
}

.auth-link.blog-icon::before {
    background-image: var(--blog-icon);
}

.auth-link.conversations-icon::before {
    background-image: var(--conversations-icon);
}

.auth-link.notifications-icon::before {
    background-image: var(--notifications-icon);
}

/* Tooltip styles for icon-only mode */
.auth-link.icon-only {
    overflow: visible;
}

.auth-link.icon-only::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--container-bg);
    color: var(--text-color);
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    box-shadow: var(--shadow);
    border: 1px solid var(--form-bg);
    z-index: 1000;
}

.auth-link.icon-only:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Mobile/collapsed navbar - show icons with text */
@media (max-width: 768px) {
    .auth-link.icon-only {
        width: auto;
        justify-content: flex-start;
        gap: 10px;
        padding: 8px 14px;
    }
    
    .auth-link.icon-only .auth-text {
        display: inline;
    }
    
    .auth-link.icon-only::after {
        display: none;
    }
}

.blog-post-card {
    border: solid 1px var(--button-bg);
    padding: 10px;
    background-color: var(--container-bg);
    border-radius: 5px;
    box-shadow: var(--shadow);
    margin: 15px;
}    

.bp-profile-pic {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 8px;
    vertical-align: middle;
}

.bp-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
}

.card-body {
    padding: 16px 16px;
    font-size: 1.2rem;
    display: flex;
    flex-direction: column;
    line-height: 1.5;
}    

.card-title {
    color: var(--card-title);
    font-size: 2.2rem;
    margin-bottom: 16px;
    font-weight: 700;
    line-height: 1.3;
}    

.chapter-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-window {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #ccc;
    padding: 10px;
}    

.container {
    background-color: var(--container-bg);
    box-shadow: var(--shadow);
    border-radius: var(--border-radius);
    padding: 32px 28px;
    margin: 32px;
    width: 90%;
    max-width: 1500px;
}    

/* Custom form styles */
.custom-blog-form {
    background-color: var(--form-bg);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin: 20px 0px;
}    

.custom-textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--link-color);
    border-radius: var(--border-radius);
    background-color: var(--container-bg);
    color: var(--text-color);
    font-size: 1rem;
    resize: vertical;
    transition: border-color 0.3s ease;
}    

.custom-textarea:focus {
    border-color: var(--header-bg);
    outline: none;
    box-shadow: 0 0 5px rgba(236, 203, 155, 0.5);
}    

.custom-submit-btn {
    background-color: var(--button-bg);
    color: var(--button-hover);
    border: none;
    padding: 12px 20px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: background-color 0.3s ease;
}    

.custom-submit-btn:hover {
    background-color: var(--button-hover);
    color: var(--header-color);
}    

/* Like button styles with heart icons */
.like-button {
    background: none !important;
    border: none !important;
    padding: 8px 12px !important;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-color);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.like-button:hover {
    background: var(--form-bg) !important;
    border-radius: 4px;
}

.like-button::before {
    content: "";
    width: 16px;
    height: 16px;
    background-image: var(--like-greyed-out);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: background-image 0.2s ease;
}

.like-button.liked::before {
    background-image: var(--liked-icon);
}

.like-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.list-group-flush {
    justify-content: space-around;
    display: flex;
    width: 100%;
}

/* Comment button styles with comment icon */
.comment-button {
    background: none !important;
    border: none !important;
    padding: 8px 12px !important;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-color);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    margin-left: 15px;
}

.comment-button:hover {
    background: var(--form-bg) !important;
    border-radius: 4px;
}

.comment-button::before {
    content: "";
    width: 16px;
    height: 16px;
    background-image: var(--comment-icon);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.post-interactions {
    display: flex;
    align-items: center;
    margin-top: 8px;
}

/* Three-dot menu for post actions */
.post-actions {
    position: relative;
    display: inline-block;
}

.post-menu-button {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    padding: 8px;
    font-size: 1.2rem;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.post-menu-button:hover {
    background-color: var(--form-bg);
}

.post-menu-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background-color: var(--container-bg);
    border: 1px solid var(--button-bg);
    border-radius: 8px;
    box-shadow: var(--shadow);
    z-index: 1000;
    min-width: 120px;
    margin-top: 4px;
}

.post-menu-dropdown.show {
    display: block;
}

.post-menu-item {
    display: block;
    max-width: 100%;
    padding: 10px 15px;
    background: none;
    border: none;
    border-radius: 8px 8px 0px 0px;
    text-align: left;
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.post-menu-item:hover {
    background-color: var(--form-bg);
}

.post-menu-item.delete {
    border-radius: 0px 0px 8px 8px;
    color: #dc3545;
}

.post-menu-item.delete:hover {
    background-color: rgba(220, 53, 69, 0.1);
}

/* Comments section */
.comments-section {
    margin-top: 15px;
    border-top: 1px solid var(--form-bg);
    padding-top: 15px;
}

.comments-toggle {
    background: none;
    border: none;
    color: var(--link-color);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0;
    margin-bottom: 10px;
    text-decoration: underline;
}

.comments-toggle:hover {
    color: var(--link-hover);
}

.comments-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 15px;
}

.comment-item {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    padding: 8px;
    background-color: var(--form-bg);
    border-radius: 8px;
}

.comment-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.comment-content {
    flex: 1;
}

.comment-author {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--link-color);
}

.comment-author a {
    color: var(--link-color);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.comment-author a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.comment-text {
    font-size: 0.9rem;
    margin: 2px 0;
    line-height: 1.3;
}

.comment-date {
    font-size: 0.75rem;
    color: var(--text-color);
    opacity: 0.7;
}

.comment-actions {
    margin-top: 8px;
    display: flex;
    align-items: center;
}

.comment-like {
    font-size: 0.8rem !important;
    padding: 4px 8px !important;
    margin: 0 !important;
}

.comment-like::before {
    width: 12px;
    height: 12px;
}

.like-display {
    font-size: 0.8rem;
    color: var(--text-color);
    opacity: 0.7;
}

.comment-form {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

.comment-input {
    flex: 1;
    border: 1px solid var(--button-bg);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.9rem;
    background-color: var(--container-bg);
    color: var(--text-color);
    resize: vertical;
    min-height: 36px;
}

.comment-input:focus {
    outline: none;
    border-color: var(--link-color);
}

.comment-submit {
    background-color: var(--button-bg);
    color: var(--button-hover);
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 0.9rem;
    cursor: pointer;
    white-space: nowrap;
}

.comment-submit:hover {
    background-color: var(--button-hover);
    color: var(--button-bg);
}

/* File input wrapper for custom upload button */
.file-input-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.file-input-wrapper input[type=file] {
    position: absolute;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
}

.file-input-wrapper label {
    cursor: pointer;
}

#file-selected-name {
    font-size: 0.9rem;
    font-style: italic;
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--button-hover);
}
#file-selected-name:hover {
    color: var(--header-color);
}

.d-flex {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.dm-icon {
    width: 30px;
    height: 30px;
    background-image: var(--direct-message-btn);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    margin: auto;
    border: none;
    border-radius: 50%;
    transition: transform 0.1s ease;
    transform: rotate(-70deg) scale(1);
    will-change: transform;
}    
.dm-icon:hover {
    transform: rotate(-50deg) scale(1.1);
}    

.error-messages {
    background: var(--error-bg);
    color: var(--error-color);
    border-radius: var(--border-radius);
    padding: 12px;
    margin-bottom: 18px;
    font-size: 1rem;
    box-shadow: 0 2px 8px rgba(178, 0, 0, 0.08);
}    

.form-control {
    padding: 6px;
    border-radius: var(--border-radius);
    box-shadow: inset var(--shadow);
    border: 1px solid #8885;
}
.form-control.me-2 {
    display: flex;
    flex-grow: 1;
}

.form-group {
    margin-bottom: 18px;
}    

.form-group input, .form-group textarea, .message-form input {
    width: 100%;
    padding: 10px;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: var(--border-radius);
    background: var(--container-bg);
    color: var(--text-color);
    font-size: 1rem;
    transition: border 0.2s;
}    

.form-group input:focus, .form-group textarea:focus {
    border: 1.5px solid var(--header-bg);
    outline: none;
}    

.form-group label {
    display: block;
    margin-bottom: 7px;
    color: var(--text-color);
    font-weight: 500;
}    

.friend-request-icon {
    width: 30px;
    height: 30px;
    background-image: var(--friend-request-btn);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    margin: auto;
    border: none;
    border-radius: 50%;
    transition: transform 0.1s ease;
    transform: rotate(0deg) scale(1);
    will-change: transform;
}    
.friend-request-icon:hover {
    transform: rotate(-10deg) scale(1.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 32px;
    height: fit-content;
}

.header-contents-left {
    display: flex;
    align-items: center;
}

.header-contents-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.login-button {
    width: 100%;
    padding: 12px;
    background-color: var(--button-bg);
    color: var(--button-hover);
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 10px;
    transition: background 0.2s, color 0.2s;
    box-shadow: 0 2px 8px rgba(54, 45, 32, 0.08);
}

.login-button:hover {
    background-color: var(--button-hover);
    color: var(--button-bg);
}

.login-form {
    background-color: var(--form-bg);
    padding: 28px 22px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

.login-form button {
    width: 100%;
    padding: 12px;
    background-color: var(--button-bg);
    color: var(--button-hover);
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 10px;
    transition: background 0.2s, color 0.2s;
    box-shadow: 0 2px 8px rgba(54, 45, 32, 0.08);
}

.login-form button:hover {
    background-color: var(--button-hover);
    color: var(--button-bg);
}

.login-form h2 {
    text-align: center;
    margin-bottom: 22px;
    color: var(--card-title);
    font-size: 1.5rem;
    font-weight: 600;
}

.main-splash-logo {
    width: 200px;
    height: 200px;
    padding: 0px 165px 0px 0px;
    background-image: var(--title-logo-img);
    background-size: contain;
    background-repeat: no-repeat;
    /* background-attachment: fixed; */
    /* background-position: left; */
    margin: auto;
}

.mb-3 {
    margin-bottom: 18px;
}

.message {
    margin: 5px 0;
    border-radius: 5px;
    padding: 10px;
    width: fit-content;
    max-width: 80%;
    min-width: 40px;
}

.message-container-right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    width: 100%;
}
.message-container-left {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
}

.message-form {
    display: flex;
    margin-top: 10px;
}

.message-form input {
    flex: 1;
    margin-right: 6px;
}

.profile-card {
    background: var(--container-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin: 40px auto;
    width: 90%;
    padding: 32px 28px;
    text-align: center;
    place-items: center;
}

.profile-header {
    display: grid;
    grid-template-columns: 33% 67%; /* corrected property name (was grid-column-template) */
    align-items: center;            /* vertical centering of children */
}

.profile-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.profile-stats {
    font-size: 0.9rem;
    color: var(--text-color);
    opacity: 0.8;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.friend-count {
    font-weight: 500;
    white-space: nowrap;
}

.settings-container { 
    background-color: #8888;
    padding: 8px 12px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.settings-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background-color: var(--button-bg);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    opacity: 1;
}

.settings-link:hover {
    background-color: var(--button-hover);
    color: var(--text-color);
    transform: translateY(-1px);
}

.settings-link i {
    font-size: 0.9em;
}

.profile-bio {
    position: relative;
    margin-top: 12px;
    padding: 12px;
    background: var(--form-bg);
    border-radius: var(--border-radius);
    border-left: 3px solid var(--link-color);
}

.profile-bio p {
    margin: 0;
    color: var(--text-color);
    font-size: 0.95rem;
    line-height: 1.4;
    font-style: italic;
}

.no-bio-text {
    opacity: 0.7;
    cursor: pointer;
}

.banner-content {
    width: 90%;
    max-width: 15   00px;
}

.bio-edit-toggle {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    padding: 4px 6px;
    font-size: 16px;
    opacity: 0.6;
    transition: opacity 0.2s ease;
    border-radius: 4px;
}

.bio-edit-toggle:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: var(--button-bg);
    color: var(--button-hover);
    border: none;
    padding: 10px 16px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: background 0.2s, color 0.2s;
}

.profile-bio-edit {
    margin-top: 12px;
    padding: 12px;
    background: var(--form-bg);
    border-radius: var(--border-radius);
    border-left: 3px solid var(--link-color);
}

.inline-bio-form textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    border: 1px solid var(--button-bg);
    border-radius: var(--border-radius);
    background: var(--container-bg);
    color: var(--text-color);
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
    box-sizing: border-box;
}

.inline-bio-form textarea:focus {
    outline: none;
    border-color: var(--link-color);
    box-shadow: 0 0 0 2px rgba(var(--link-color-rgb), 0.2);
}

.bio-edit-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    justify-content: flex-end;
}

.bio-save-btn, .bio-cancel-btn {
    padding: 6px 12px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.bio-save-btn {
    background: var(--button-bg);
    color: var(--header-bg);
}

.bio-save-btn:hover {
    background: var(--button-hover);
}

.bio-cancel-btn {
    background: var(--form-bg);
    color: var(--text-color);
    border: 1px solid var(--button-bg);
}

.bio-cancel-btn:hover {
    background: var(--button-bg);
    color: var(--header-bg);
}

/* Declined request info */
.declined-request-info {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    border-radius: var(--border-radius);
    padding: 12px;
    margin-bottom: 15px;
}

.declined-request-info p {
    margin: 0;
    color: var(--text-color);
    font-size: 0.9rem;
}

.declined-request-info small {
    opacity: 0.8;
}

/* Friend actions styling */
.friend-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    padding: 16px;
    margin: auto;
}

.friend-action-btn {
    color: var(--link-color);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: var(--border-radius);
    transition: background 0.2s ease;
}

.friend-action-btn:hover {
    background: var(--form-bg);
}

/* Old unfriend button styles - now using profile-icon-btn instead */
/* 
.unfriend-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.unfriend-btn:hover {
    background: #c82333;
}
*/

@media (max-width: 768px) {
    .friend-actions {
        gap: 8px;
    }
    
    .friend-action-btn {
        text-align: center;
        padding: 6px 12px;
        font-size: 0.9rem;
    }
}

/* Profile page user list */
.profile-user-list-heading {
    font-weight: 600;
    margin-top: 32px;
    margin-bottom: 12px;
}

.profile-user-list {
    border: 1px solid #8888;
    border-radius: var(--border-radius);
    padding: 4px 0;
    background: var(--container-bg);
}

.profile-user-list-item {
    margin: 0 12px;
    max-width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: center;
    gap: 12px;
    padding: 6px 0;
    border-bottom: 1px solid #ececec;
}
.profile-user-list-item:last-child {
    border-bottom: none;
}

.profile-user-link {
    flex: 1;
    text-align: left;
    font-weight: 500;
    text-decoration: none;
    color: var(--link-color);
    transition: color 0.2s;
}
.profile-user-link:hover {
    color: var(--link-hover);
}

.profile-dm-link.dm-icon { /* refine dm icon spacing within list */
    margin-left: auto;
}

/* Friend request banner standard styling */
.friend-request-banner {
    background: var(--header-bg);
    color: var(--header-color);
    padding: 10px 14px;
    border-radius: var(--border-radius);
    margin: 16px 0;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    box-shadow: var(--shadow);
}

.friend-request-banner form { display: inline; }

.friend-request-form {
    margin: 16px 0;
}

.profile-picture.profile-page-picture {
    height: 60px;
    width: 60px;
    border-radius: 50px;
    margin-right: 42px;
    vertical-align: middle;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}

.recent-posts {
    margin-top: 20px;
    border-radius: var(--border-radius);
}

.register-button {
    width: 100%;
    padding: 12px;
    background-color: var(--button-bg);
    color: var(--header-color);
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 10px;
    transition: background 0.2s, color 0.2s;
    box-shadow: 0 2px 8px rgba(54, 45, 32, 0.08);
}

.register-button:hover {
    background-color: var(--button-hover);
    color: var(--button-bg);
}

.register-form {
    background-color: var(--form-bg);
    padding: 28px 22px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

.register-form button {
    width: 100%;
    padding: 12px;
    background-color: var(--button-bg);
    color: var(--header-color);
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 10px;
    transition: background 0.2s, color 0.2s;
    box-shadow: 0 2px 8px rgba(54, 45, 32, 0.08);
}

.register-form button:hover {
    background-color: var(--button-hover);
    color: var(--button-bg);
}

.register-form h2 {
    text-align: center;
    align-items: center;
    margin-bottom: 22px;
    color: var(--card-title);
    font-size: 1.5rem;
    font-weight: 600;
}

.received {
    background-color: var(--button-bg);
    color: var(--button-hover);
    text-align: left;
}

.sent {
    background-color: var(--button-hover);
    color: var(--button-bg);
    text-align: right;
}


.site-badge {
    font-family: "Lexend Deca", sans-serif;
    margin: 30px;
    padding: 18px 18px 50px 18px;
    border-radius: 2px 2px 50% 50%;
    background-color: var(--header-bg);
    align-content: center;
    justify-content: center;
    text-align: center;
    border: solid 1px var(--button-bg);

}

.site-title {
    margin: 0 8px;
    font-family: 'Brother Signature', cursive, sans-serif;
    font-size: 2.3rem;
    letter-spacing: 2px;
    font-weight: 700;
    color: var(--title-txt-color);
    transition: color 0.2s;
    text-decoration: underline;
}

.theme-toggle-btn, #themeToggleBtn {
    background-color: var(--button-bg);
    color: var(--header-bg);
    border: solid 1px var(--button-bg);
    padding: 8px 18px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    box-shadow: 5px 10px 8px rgba(54, 45, 32, 0.08);
}

.theme-toggle-btn:hover, #themeToggleBtn:hover {
    background-color: var(--button-hover);
    color: var(--button-bg);
}

.title-logo {
    width: 60px;
    height: 60px;
    background-image: var(--title-logo-img);
    background-size: contain;
    background-repeat: no-repeat;
    margin: auto;
}

/* Mobile Menu Styles */
.mobile-menu-btn {
    display: none; /* Hidden by default on desktop */
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 12px;
    width: 48px;
    height: 48px;
    justify-content: space-around;
    position: relative;
    z-index: 1001;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.mobile-menu-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.mobile-menu-btn span {
    display: block;
    height: 4px;
    width: 28px;
    background-color: var(--title-txt-color);
    transition: all 0.3s ease;
    transform-origin: center;
    border-radius: 2px;
}

.mobile-menu-btn-open span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-btn-open span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn-open span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Mobile navigation - multiple breakpoints to ensure mobile coverage */
@media (max-width: 900px), 
       screen and (max-device-width: 900px),
       (pointer: coarse),
       (hover: none) {
    .container, .profile-card {
        width: 98%;
        padding: 16px;
    }
    .header-content, main {
        padding: 0 12px;
    }
    
    /* Show mobile menu button on mobile */
    .mobile-menu-btn {
        display: flex !important; /* Force display on mobile */
    }
    
    /* Navigation menu hidden by default, shows when hamburger clicked */
    .nav-menu {
        position: fixed;
        top: 72px;
        right: -100%; /* Hidden by default, user clicks hamburger to open */
        width: 280px;
        height: calc(100vh - 72px);
        background-color: var(--header-bg);
        flex-direction: column;
        align-items: flex-start;
        padding: 24px;
        transition: right 0.3s ease;
        box-shadow: -2px 0 5px rgba(0,0,0,0.1);
        z-index: 1000;
        gap: 24px;
        overflow: hidden; /* Ensure content doesn't show when hidden */
        visibility: hidden; /* Completely hide when closed */
    }
    
    /* Show navigation menu when open */
    .nav-menu-open {
        right: 0;
        visibility: visible; /* Make visible when opened */
    }
    
    /* Style navigation links for mobile */
    .nav-menu .auth-link {
        width: 100%;
        padding: 16px 0;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        color: var(--title-txt-color);
        text-align: center;
        font-size: 1.2rem;
    }
    
    /* Mobile navigation icon links */
    .nav-menu .nav-icon-link {
        justify-content: center;
        gap: 16px;
        font-size: 1.1rem;
    }
    
    .nav-menu .nav-icon-link .nav-text {
        display: inline !important;
    }
    
    .nav-menu .nav-icon {
        width: 20px;
        height: 20px;
    }
    
    /* Mobile profile link */
    .nav-menu .profile-link {
        justify-content: center;
        gap: 12px;
        font-size: 1.1rem;
    }
    
    .nav-menu .theme-toggle-btn {
        width: 100%;
        margin-bottom: 16px;
        padding: 12px 16px;
        font-size: 1.1rem;
    }
    
    /* Mobile-specific site badge styles */
    .site-badge {
        margin: 12px 8px; /* Reduced from 30px to fit mobile */
        padding: 12px 12px 30px 12px; /* Reduced padding */
        max-width: calc(100vw - 32px); /* Ensure it doesn't exceed viewport width */
        box-sizing: border-box;
    }
    
    .site-title {
        font-size: 1.8rem; /* Slightly smaller on mobile */
        letter-spacing: 1px; /* Reduced letter spacing */
    }
}
/* JavaScript fallback for mobile detection */
.is-mobile .mobile-menu-btn {
    display: flex !important;
}

.is-mobile .nav-menu {
    position: fixed;
    top: 72px;
    right: -100%;
    width: 280px;
    height: calc(100vh - 72px);
    background-color: var(--header-bg);
    flex-direction: column;
    align-items: flex-start;
    padding: 24px;
    transition: right 0.3s ease;
    box-shadow: -2px 0 5px rgba(0,0,0,0.1);
    z-index: 1000;
    gap: 24px;
    overflow: hidden; /* Ensure content doesn't show when hidden */
    visibility: hidden; /* Completely hide when closed */
}

.is-mobile .nav-menu-open {
    right: 0;
    visibility: visible; /* Make visible when opened */
}

/* Desktop styles - keep original navigation */
@media (min-width: 901px) {
    /* Hide mobile menu button on desktop */
    .mobile-menu-btn {
        display: none;
    }
    
    /* Show normal navigation on desktop */
    .nav-menu {
        position: static;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 12px;
        background-color: transparent;
        padding: 0;
        box-shadow: none;
        width: auto;
        height: auto;
    }
    
    .site-title {
        font-size: 1.4rem;
    }
}

/* Add desktop override for larger screens */
@media (min-width: 1200px) {
    .container, .profile-card {
        width: 90%;
        max-width: 1200px;
    }
    .header-content, main {
        padding: 0 24px;
    }
}

/* Enhanced mobile styles for better readability - multiple targeting methods */
@media (max-width: 768px),
       screen and (max-device-width: 768px),
       (pointer: coarse) and (max-width: 768px) {
    /* Base font size increase for mobile */
    body {
        font-size: 18px;
    }
    
    .header-content, main {
        padding: 0 12px;
    }
    
    .container, .profile-card {
        width: 98%;
        padding: 20px;
        margin: 16px auto;
    }
    
    .site-title {
        font-size: 1.5rem;
    }
    
    .theme-toggle-btn, #themeToggleBtn {
        padding: 12px 16px;
        font-size: 1rem;
    }
    
    /* Larger buttons and interactive elements for mobile */
    .auth-link {
        padding: 16px 20px;
        font-size: 1.2rem;
        min-height: 44px; /* iOS accessibility guideline */
    }
    
    .card-title {
        font-size: 2rem;
        margin-bottom: 20px;
    }
    
    .card-body {
        padding: 20px;
        font-size: 1.3rem;
        line-height: 1.6;
    }
    
    /* Larger blog post elements */
    .blog-post-card {
        padding: 20px;
        margin: 16px 8px;
    }
    
    /* Better spacing for list items */
    li {
        padding: 16px 0;
        font-size: 1.2rem;
    }
    
    /* Larger profile pictures */
    .bp-profile-pic {
        width: 40px;
        height: 40px;
    }
    
    /* Mobile-friendly form elements */
    .custom-textarea {
        padding: 16px;
        font-size: 1.2rem;
        min-height: 120px;
    }
    
    .custom-submit-btn {
        padding: 16px 24px;
        font-size: 1.2rem;
        min-height: 48px;
    }
    
    /* Better input and button sizing */
    input, button, select {
        font-size: 1.1rem;
        padding: 14px 16px;
        min-height: 44px;
    }
    
    .like-button {
        min-height: 44px;
        padding: 12px 16px;
    }
}

@media (max-width: 480px) {
    /* Extra small screens - even larger fonts */
    body {
        font-size: 19px;
    }
    
    .card-body {
        font-size: 1.4rem;
    }
    
    .site-title {
        font-size: 1.3rem;
    }
    
    .nav-menu {
        width: 100%;
        right: -100%;
        overflow: hidden;
        visibility: hidden;
    }
    
    .nav-menu-open {
        right: 0;
        visibility: visible;
    }
    
    /* Better spacing on very small screens */
    .container, .profile-card {
        margin: 8px auto;
        padding: 16px;
    }
}

/* Screen reader only - visually hidden but accessible */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Chat Header Styles */
.chat-header {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 16px 20px;
    margin-bottom: 20px;
    border: 1px solid var(--form-bg);
    box-shadow: var(--shadow);
}

.chat-user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.chat-profile-picture-container {
    position: relative;
    flex-shrink: 0;
}

.chat-profile-picture {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: 2px solid var(--form-bg);
}

.status-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid var(--card-bg);
    transition: background-color 0.3s ease;
}

.status-indicator.viewing-chat {
    background-color: #28a745; /* Green - currently viewing chat */
}

.status-indicator.online {
    background-color: #ffc107; /* Yellow - online but not viewing chat */
}

.status-indicator.offline {
    background-color: #6c757d; /* Grey - offline */
}

.chat-user-details h2 {
    margin: 0 0 4px 0;
    font-size: 1.3rem;
    color: var(--text-color);
}

.status-text {
    font-size: 0.85rem;
    color: var(--text-color);
    opacity: 0.7;
    margin: 0;
}

/* Mobile responsiveness for chat header */
@media (max-width: 768px) {
    .chat-header {
        padding: 12px 16px;
    }
    
    .chat-profile-picture {
        width: 40px;
        height: 40px;
    }
    
    .status-indicator {
        width: 12px;
        height: 12px;
    }
    
    .chat-user-details h2 {
        font-size: 1.1rem;
    }
}

.profile-picture-upload {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.profile-picture.clickable {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-picture.clickable::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: transparent;
    border-radius: 50%;
    transition: background-color 0.3s ease;
    pointer-events: none;
}

.profile-picture.clickable::after {
    content: "Change Picture";
    color: transparent;
    font-size: 0.6rem;
    font-weight: 600;
    text-align: center;
    transition: color 0.3s ease;
    pointer-events: none;
    z-index: 2;
    position: relative;
}

.profile-picture-upload:hover .profile-picture.clickable::before {
    background-color: rgba(136, 136, 136, 0.7); /* #8888 overlay that dims the background image */
}

.profile-picture-upload:hover .profile-picture.clickable::after {
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.stories-icon {
    width: 24px;
    height: 24px;
    background-image: var(--stories-icon);
    background-size: contain;
    background-repeat: no-repeat;
    display: inline-block;
    vertical-align: middle;
}

/* Stories Section Styles */
.stories-navbar {
    display: flex;
    justify-content: space-around;
    background-color: var(--card-bg);
    border-bottom: 2px solid var(--header-bg);
    padding: 12px 0;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}


.story-nav-link {
    color: var(--link-color) !important;
    text-decoration: none;
    padding: 8px 16px;
    margin: 0 4px;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.story-nav-link:hover {
    background-color: var(--header-bg);
    color: var(--text-color) !important;
    transform: translateY(-1px);
}

.story-nav-icon {
    font-size: 1.1rem;
    filter: brightness(0.8);
}

.story-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.navbar-text {
    color: var(--text-color);
    font-size: 0.9rem;
    margin: 0;
}

.navbar-text .story-nav-link {
    display: inline;
    padding: 4px 8px;
    margin: 0;
}

/* Mobile styles for stories navbar */
@media (max-width: 900px), 
       screen and (max-device-width: 900px),
       (pointer: coarse),
       (hover: none) {
    .stories-navbar {
        padding: 8px 0;
        margin-bottom: 16px;
    }
    
    .stories-navbar .navbar-nav {
        flex-direction: column;
        align-items: stretch !important;
    }
    
    .nav-left {
        flex-direction: column !important;
        margin-bottom: 12px;
    }
    
    .story-nav-link {
        padding: 12px 16px;
        margin: 2px 0;
        text-align: center;
        justify-content: center;
    }
    
    .nav-right {
        text-align: center;
    }
    
    .story-container {
        padding: 0 16px;
    }
}

/* Dark theme adjustments for stories */
[data-theme="dark"] .stories-navbar {
    border-bottom-color: var(--button-bg);
}

/* Library functionality styles */
.library-actions {
    margin-bottom: 1rem;
}

.library-actions .btn {
    margin-right: 0.5rem;
}

.library-actions .btn i {
    margin-right: 0.25rem;
}

/* Story cards in library */
.story-content {
    line-height: 1.6;
    font-size: 1rem;
}

/* Library empty state */
.library-empty {
    text-align: center;
    padding: 3rem 1rem;
}

.library-empty i {
    color: var(--text-color);
    opacity: 0.5;
    margin-bottom: 1rem;
}