/* =========================
   GLOBAL SETTINGS
========================= */

:root {
    --navy: #0B1026;
    --navy-light: #151C3B;

    --purple: #8B5CF6;
    --purple-dark: #7C3AED;

    --blue: #3B82F6;

    --white: #FFFFFF;
    --background: #F8F9FC;
    --surface: #F1F3F9;

    --text-primary: #111827;
    --text-secondary: #6B7280;

    --border: #E5E7EB;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--background);
    color: var(--text-primary);
    min-width: 320px;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

a {
    text-decoration: none;
    color: inherit;
}

.app-container {
    min-height: 100vh;
}


/* =========================
   SIDEBAR
========================= */

.sidebar {
    width: 256px;
    height: 100vh;

    position: fixed;
    left: 0;
    top: 0;

    background: var(--white);
    border-right: 1px solid var(--border);

    padding: 28px 20px;

    display: flex;
    flex-direction: column;

    z-index: 100;
}

.logo {
    margin-bottom: 42px;
    padding-left: 8px;
}

.logo h2,
.mobile-logo h2 {
    font-size: 25px;
    font-weight: 800;
    color: var(--navy);
}

.logo span,
.mobile-logo span {
    color: var(--purple);
}

.sidebar-navigation {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 15px;

    padding: 13px 14px;

    border-radius: 10px;

    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;

    transition: 0.2s;
}

.nav-link:hover {
    background: var(--surface);
    color: var(--purple);
}

.nav-link.active {
    background: #F0EBFF;
    color: var(--purple-dark);
}

.nav-link i {
    width: 21px;
    height: 21px;
}

.create-post-btn {
    margin-top: 25px;

    width: 100%;
    padding: 14px;

    border: none;
    border-radius: 10px;

    background: var(--purple);
    color: white;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    font-weight: 600;

    transition: 0.2s;
}

.create-post-btn:hover {
    background: var(--purple-dark);
}

.sidebar-bottom {
    margin-top: auto;

    display: flex;
    flex-direction: column;
    gap: 8px;
}


/* =========================
   MAIN CONTENT
========================= */

.main-content {
    margin-left: 256px;
    min-height: 100vh;
}

.top-header {
    height: 72px;

    background: white;
    border-bottom: 1px solid var(--border);

    padding: 0 30px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    position: sticky;
    top: 0;
    z-index: 50;
}

.mobile-logo {
    display: none;
}

.search-box {
    width: 400px;
    height: 42px;

    display: flex;
    align-items: center;
    gap: 12px;

    padding: 0 15px;

    background: var(--surface);
    border-radius: 10px;

    color: var(--text-secondary);
}

.search-box input {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    font-size: 13px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.icon-btn {
    border: none;
    background: transparent;
    color: var(--text-secondary);
}

.user-avatar {
    width: 38px;
    height: 38px;

    border-radius: 50%;

    background: var(--purple);
    color: white;

    display: flex;
    align-items: center;
    justify-content: center;

    font-weight: 700;
}


/* =========================
   PAGE CONTENT
========================= */

.page-content {
    padding: 30px;
}

.welcome-section {
    margin-bottom: 28px;
}

.welcome-section h1 {
    font-size: 25px;
    margin-bottom: 8px;
}

.welcome-section p {
    color: var(--text-secondary);
    font-size: 14px;
}

.feed-layout {
    display: grid;
    grid-template-columns: minmax(0, 760px) 280px;
    gap: 25px;
    align-items: start;
}

.feed {
    min-width: 0;
}


/* =========================
   STORIES
========================= */

.stories-section {
    background: white;
    border: 1px solid var(--border);
    border-radius: 14px;

    padding: 20px;
    margin-bottom: 25px;
}

.stories-section h3 {
    font-size: 15px;
    margin-bottom: 18px;
}

.stories-container {
    display: flex;
    gap: 22px;
    overflow-x: auto;
}

.story {
    min-width: 58px;
    text-align: center;
    cursor: pointer;
}

.story-circle {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    color: white;
    font-weight: 700;
    font-size: 18px;
    border: 3px solid white;
    outline: 2px solid var(--purple);
    overflow: hidden;
    flex-shrink: 0;
}

.story-profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.story-viewer-avatar {
    width: 36px;
    height: 36px;
    background: var(--purple);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
}

.story-viewer-profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.story span {
    font-size: 11px;
    color: var(--text-secondary);
}

.own-story {
    background: #F0EBFF;
    color: var(--purple);
}

.story-one {
    background: linear-gradient(135deg, #EC4899, #F97316);
}

.story-two {
    background: linear-gradient(135deg, #3B82F6, #06B6D4);
}

.story-three {
    background: linear-gradient(135deg, #10B981, #0D9488);
}

.story-four {
    background: linear-gradient(135deg, #F97316, #EF4444);
}


/* =========================
   EMPTY FEED
========================= */

.empty-feed {
    background: white;
    border: 1px solid var(--border);
    border-radius: 14px;

    min-height: 250px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    text-align: center;
    padding: 25px;
}

.empty-feed i {
    width: 40px;
    height: 40px;
    color: var(--purple);
    margin-bottom: 15px;
}

.empty-feed h3 {
    font-size: 16px;
    margin-bottom: 8px;
}

.empty-feed p {
    font-size: 13px;
    color: var(--text-secondary);
}


/* =========================
   RIGHT PANEL
========================= */

.right-panel {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.panel-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 14px;

    padding: 20px;
}

.panel-card h3 {
    font-size: 15px;
    margin-bottom: 12px;
}

.panel-card p {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* Profile Avatar Wrapper */
.profile-avatar-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
}

/* Profile Avatar */
.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #ffffff;
}

/* Common Avatar Button Styling */
.edit-avatar-btn,
.remove-avatar-btn {
    position: absolute;
    bottom: 5px;
    width: 34px;
    height: 34px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s ease;
    color: #ffffff;
}

/* Change Photo Button */
.edit-avatar-btn {
    right: 5px;
    background: #6366f1;
}

/* Remove Photo Button */
.remove-avatar-btn {
    left: 5px;
    background: #dc2626;
}

/* Icons */
.edit-avatar-btn i,
.remove-avatar-btn i {
    width: 17px;
    height: 17px;
}

/* Hover Effects */
.edit-avatar-btn:hover {
    background: #4f46e5;
    transform: scale(1.08);
}

.remove-avatar-btn:hover {
    background: #b91c1c;
    transform: scale(1.08);
}

/* Disabled State */
.edit-avatar-btn:disabled,
.remove-avatar-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.edit-profile-remove-image-btn {
    width: 100%;
    padding: 12px;
    margin: 10px 0 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #fff1f2;
    color: #dc2626;
    border: 1px solid #fecaca;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s ease;
}

.edit-profile-remove-image-btn:hover {
    background: #fee2e2;
}

.edit-profile-remove-image-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.edit-profile-remove-image-btn i {
    width: 17px;
    height: 17px;
}

/* EDIT PROFILE INTERESTS */

.edit-interests-list {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 10px 0 15px;
}

.edit-interest-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #eef2ff;
    color: #4338ca;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.remove-interest-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: transparent;
    border: none;
    color: #dc2626;
    cursor: pointer;
}

.remove-interest-btn i {
    width: 15px;
    height: 15px;
}

.add-interest-input {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.add-interest-input input {
    flex: 1;
    min-width: 0;
    padding: 11px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    outline: none;
}

.add-interest-input input:focus {
    border-color: #6366f1;
}

#addInterestBtn {
    padding: 10px 18px;
    background: #6366f1;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

#addInterestBtn:hover {
    background: #4f46e5;
}

#addInterestBtn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.edit-interests-list .interests-empty {
    color: #9ca3af;
    font-size: 13px;
}

/* MAIN PROFILE INTERESTS */

.profile-interests-section {
    display: block;
    margin-top: 22px;
}

.profile-interests-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
}

.profile-interests-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.profile-interest-tag {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    background: #eef2ff;
    color: #4338ca;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.profile-interests-list .interests-empty {
    color: #9ca3af;
    font-size: 13px;
}

/* PROFILE COVER */

.profile-cover {
    width: 100%;
    height: 280px;
    position: relative;
    background-color: #e8e8e8;
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    overflow: hidden;
}

.edit-cover-btn {
    position: absolute;
    right: 20px;
    bottom: 20px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    background: white;
    color: #222;
    cursor: pointer;
    font-size: 14px;
}

.edit-cover-btn:hover {
    background: #eeeeee;
}

.edit-cover-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* =================================
   PROFILE COVER SECTION
================================= */

.profile-cover {
    width: 100%;
    height: 280px;
    position: relative;
    background-color: #e8e8e8;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 14px;
    overflow: hidden;
}

/* COMMON COVER BUTTON STYLING */

.edit-cover-btn,
.remove-cover-btn {
    position: absolute;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.95);
    color: #222;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.edit-cover-btn {
    right: 20px;
    bottom: 20px;
}

.remove-cover-btn {
    right: 20px;
    top: 20px;
}

.edit-cover-btn:hover,
.remove-cover-btn:hover {
    background: #222;
    color: white;
    transform: translateY(-2px);
}

.edit-cover-btn:disabled,
.remove-cover-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* BUTTON ICONS */

.edit-cover-btn i,
.remove-cover-btn i {
    width: 16px;
    height: 16px;
}

/* MOBILE RESPONSIVENESS */

@media (max-width: 600px) {
    .profile-cover {
        height: 190px;
        border-radius: 10px;
    }

    .edit-cover-btn,
    .remove-cover-btn {
        padding: 8px 11px;
        font-size: 11px;
    }

    .edit-cover-btn {
        right: 12px;
        bottom: 12px;
    }

    .remove-cover-btn {
        right: 12px;
        top: 12px;
    }
}

/* POST DETAILS ACTIONS */
.post-details-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #e5e5e5;
}

.post-like-button {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 14px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background: #f2f2f2;
    font-size: 14px;
}

.post-like-button.liked {
    color: #e63965;
    background: #ffe8ee;
}

/* COMMENTS SECTION */
.post-details-comments {
    margin-top: 18px;
}

.post-details-comments h3 {
    font-size: 17px;
    margin-bottom: 15px;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-height: 280px;
    overflow-y: auto;
}

.comment-item {
    padding: 12px;
    background: #f5f6f8;
    border-radius: 10px;
}

.comment-item strong {
    display: block;
    font-size: 14px;
    margin-bottom: 5px;
}

.comment-item p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

/* COMMENT FORM */
.post-comment-form {
    display: flex;
    gap: 10px;
    margin-top: 18px;
}

.post-comment-form input {
    flex: 1;
    min-width: 0;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    outline: none;
}

.post-comment-form input:focus {
    border-color: #6c63ff;
}

.post-comment-form button {
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    background: #6c63ff;
    color: white;
    cursor: pointer;
}

.post-comment-form button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* HOME FEED INTERACTION COUNTS */

.post-interaction-stats {
    display: flex;
    justify-content: space-between;
    padding: 10px 15px;
    font-size: 13px;
    color: #777;
    border-bottom: 1px solid #eee;
}

/* HOME FEED ACTIONS */

.post-feed-actions {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #eee;
}

.post-feed-actions button {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    color: #555;
}

.post-feed-actions button:hover {
    background: #f5f5f5;
}

.post-feed-actions button.liked {
    color: #e63965;
    font-weight: 600;
}

.post-feed-actions button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.explore-author-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.explore-follow-button {
    border: none;
    border-radius: 6px;
    padding: 6px 14px;
    background: #6c4cff;
    color: white;
    font-weight: 600;
    cursor: pointer;
}

.explore-follow-button.following {
    background: #eeeeee;
    color: #333333;
}

.explore-follow-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* HOME FEED FOLLOW BUTTON */

.post-follow-button {
    flex-shrink: 0;
    padding: 7px 16px;
    border: 1px solid var(--purple);
    border-radius: 7px;
    background: var(--purple);
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s ease;
}

.post-follow-button:hover {
    background: var(--purple-dark);
    border-color: var(--purple-dark);
}

.post-follow-button.following {
    background: #ffffff;
    color: var(--text-primary);
    border-color: var(--border);
}

.post-follow-button.following:hover {
    background: var(--surface);
}

.post-follow-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* PUBLIC PROFILE BACK BUTTON */
.back-profile-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    padding: 10px 18px;
    margin: 15px 0 20px 15px;

    background: #ffffff;
    color: #333333;

    border: 1px solid #e5e5e5;
    border-radius: 10px;

    font-size: 14px;
    font-weight: 600;

    cursor: pointer;
    transition: all 0.25s ease;
}

.back-profile-btn:hover {
    background: #f3f0ff;
    color: #6c4cff;
    border-color: #6c4cff;
    transform: translateX(-3px);
}

.back-profile-btn i {
    width: 18px;
    height: 18px;
    stroke-width: 2.5;
}

/* Mobile */
@media (max-width: 600px) {
    .back-profile-btn {
        padding: 9px 14px;
        font-size: 13px;
        margin: 12px 0 15px 10px;
    }
}

/* PUBLIC PROFILE ACTION BUTTONS */

.public-profile-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.public-profile-actions button {
    flex: 1;
    min-width: 0;
    height: 42px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

/* FOLLOW - DEFAULT WHITE */

#publicFollowButton.following {
    background: #ffffff;
    color: var(--purple);
    border: 1px solid var(--purple);
}

/* FOLLOW - AFTER FOLLOWING */

#publicFollowButton {
    background: var(--purple);
    color: #ffffff;
    border-color: var(--purple);
}

/* HOVER */

#publicFollowButton:not(.following):hover {
    background: var(--purple-dark);
}

#publicFollowButton.following:hover {
    background: #f3f0ff;
}

/* CONNECTION AND MESSAGE BUTTONS */

#publicConnectionButton,
#publicMessageButton {
    height: 42px;
}

/* MOBILE: KEEP PROFILE BUTTONS IN ONE ROW */

@media (max-width: 600px) {
    .public-profile-actions {
        display: flex;
        flex-wrap: nowrap;
        width: 100%;
        gap: 6px;
    }

    .public-profile-actions button {
        flex: 1 1 0;
        min-width: 0;
        padding: 0 4px;
        font-size: 10px;
        white-space: nowrap;
        overflow: hidden;
    }
}

/* END CONNECTION BUTTON */

.end-connection-btn {
    width: 100%;
    min-height: 40px;
    margin-top: 14px;
    padding: 10px 14px;

    background: #fff;
    color: #dc3545;
    border: 1px solid #dc3545;
    border-radius: 8px;

    font-size: 13px;
    font-weight: 600;
    cursor: pointer;

    transition: background 0.2s ease, color 0.2s ease;
}

.end-connection-btn:hover {
    background: #dc3545;
    color: #fff;
}

.end-connection-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

@media (max-width: 600px) {
    .end-connection-btn {
        min-height: 38px;
        font-size: 12px;
    }
}

/* DEFAULT PROFILE AVATAR */

.post-avatar img,
#profileAvatar,
#publicProfileAvatar {
    object-fit: cover;
    background-color: #6C5CE7;
}

.post-avatar {
    overflow: hidden;
    border-radius: 50%;
}

.post-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: block;
}

/* DEFAULT PROFILE COVER */

#profileCover,
#publicProfileCover {
    background-color: #E9E6FF;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.story-circle .story-initial {
    position: absolute !important;
    inset: 0 !important;

    width: 100% !important;
    height: 100% !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    color: #ffffff !important;
    font-size: 28px !important;
    font-weight: 700 !important;
    font-family: Arial, sans-serif !important;
    line-height: 1 !important;

    background: linear-gradient(135deg, #2563eb, #7c3aed) !important;

    border-radius: 50% !important;
    z-index: 2 !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.story-circle {
    position: relative;
    overflow: hidden;
}

.post-video {
    display: block;
    width: 100%;
    max-height: 600px;
    object-fit: contain;
    background: #000;
    border-radius: 8px;
}

#viewerVideo {
    width: 100%;
    max-height: 75vh;
    object-fit: contain;
    background: #000;
    border-radius: 8px;
}

.profile-post-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.explore-card video,
.saved-post-card video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.post-details-video {
    width: 100%;
    max-height: 600px;
    object-fit: contain;
    display: block;
    background: #000;
    border-radius: 8px;
}

/* ================================
   POST COMMENTS MODAL
================================ */

.post-comments-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.post-comments-overlay[hidden] {
    display: none;
}

.post-comments-modal {
    width: 100%;
    max-width: 480px;
    height: min(620px, 85vh);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #151827;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

/* Header */

.post-comments-header {
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.post-comments-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

#closePostComments {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
}

#closePostComments:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Comments list */

.post-comments-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 18px;
}

.post-comment-item {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.post-comment-item strong {
    display: block;
    margin-bottom: 5px;
    color: #fff;
    font-size: 14px;
}

.post-comment-item p {
    margin: 0;
    color: #c5c8d5;
    font-size: 14px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.post-comments-list > p {
    color: #aeb3c4;
    text-align: center;
    padding: 20px 0;
}

/* Comment form */

#postCommentForm {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

#postCommentInput {
    flex: 1;
    min-width: 0;
    height: 44px;
    padding: 0 14px;
    border: 1px solid #34394e;
    border-radius: 24px;
    outline: none;
    background: #202438;
    color: #fff;
    font-size: 14px;
}

#postCommentInput::placeholder {
    color: #9298aa;
}

#postCommentInput:focus {
    border-color: #8b5cf6;
}

#submitPostComment {
    min-width: 65px;
    height: 42px;
    padding: 0 16px;
    border: none;
    border-radius: 22px;
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}

#submitPostComment:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Mobile */

@media (max-width: 600px) {
    .post-comments-overlay {
        padding: 0;
        align-items: flex-end;
    }

    .post-comments-modal {
        width: 100%;
        max-width: none;
        height: 80vh;
        border-radius: 20px 20px 0 0;
    }
}

/* =========================
   NOTIFICATIONS PAGE
========================= */

.notifications-page {
    padding: 30px;
    max-width: 900px;
    margin: 0 auto;
}

.notifications-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 25px;
}

.notifications-header h1 {
    font-size: 25px;
    margin-bottom: 7px;
}

.notifications-header p {
    color: var(--text-secondary);
    font-size: 14px;
}

#markAllNotificationsRead {
    padding: 10px 15px;
    border: 1px solid var(--purple);
    border-radius: 8px;
    background: white;
    color: var(--purple-dark);
    font-size: 13px;
    font-weight: 600;
}

#markAllNotificationsRead:hover {
    background: #F0EBFF;
}

.notifications-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notification-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 18px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
}

.notification-item.unread {
    background: #F5F1FF;
    border-color: #DDD2FF;
}

.notification-content {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.notification-content strong {
    font-size: 14px;
}

.notification-content span {
    color: var(--text-secondary);
    font-size: 13px;
    overflow-wrap: anywhere;
}

.notification-item small {
    flex-shrink: 0;
    color: var(--text-secondary);
    font-size: 11px;
}

@media (max-width: 600px) {
    .notifications-page {
        padding: 20px 14px;
    }

    .notifications-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .notification-item {
        align-items: flex-start;
        padding: 14px;
    }

    .notification-item small {
        max-width: 100px;
        text-align: right;
    }
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.notification-avatar {
    width: 45px;
    height: 45px;
    min-width: 45px;
    border-radius: 50%;
    object-fit: cover;
}

.notification-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.notification-text strong {
    font-weight: 600;
}

.notification-text span {
    font-size: 14px;
}

.home-notification-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
}

.home-notification-item .notification-avatar {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.home-notification-item .notification-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 3px;
}

.home-notification-item .notification-text strong {
    font-size: 14px;
}

.home-notification-item .notification-text span {
    font-size: 13px;
    overflow-wrap: anywhere;
}

/* Mobile notification layout */
@media (max-width: 768px) {

    .notification-item {
        display: flex;
        align-items: center;
        padding: 12px 10px;
        gap: 10px;
    }

    .notification-item .notification-content {
        display: flex;
        align-items: center;
        gap: 10px;
        flex: 1;
        min-width: 0;
    }

    .notification-item .notification-avatar {
        width: 44px;
        height: 44px;
        min-width: 44px;
        border-radius: 50%;
        object-fit: cover;
    }

    .notification-item .notification-text {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 4px;
    }

    .notification-item small {
        font-size: 11px;
        white-space: nowrap;
    }
}

/* =========================
   MOBILE LAYOUT FOUNDATION
========================= */

@media (max-width: 768px) {

    html,
    body {
        width: 100%;
        overflow-x: hidden;
    }

    .app-container {
        width: 100%;
        min-height: 100vh;
    }

    /* Hide desktop sidebar */
    .sidebar {
        display: none;
    }

    /* Main content */
    .main-content {
        width: 100%;
        margin-left: 0;
        min-height: 100vh;
        padding-bottom: 70px;
    }

    /* Mobile header */
    .top-header {
        height: 60px;
        padding: 0 15px;
    }

    .mobile-logo {
        display: block;
    }

    .mobile-logo h2 {
        font-size: 21px;
    }

    .search-box {
        display: none;
    }

    .header-actions {
        gap: 12px;
    }

    /* Page spacing */
    .page-content {
        padding: 18px 14px;
    }

    /* Single-column feed */
    .feed-layout {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
    }

    .feed {
        width: 100%;
        min-width: 0;
    }

    /* Hide desktop right panel */
    .right-panel {
        display: none;
    }

    /* Stories */
    .stories-section {
        padding: 14px;
        border-radius: 12px;
    }

    .stories-container {
        gap: 16px;
    }

    /* Notifications */
    .notifications-page {
        padding: 18px 14px;
    }
}

@media (max-width: 768px) {
    .notification-item {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .notification-item .notification-content {
        flex-direction: row;
        align-items: center;
        flex: 1;
        gap: 10px;
    }

    .notification-item .notification-text {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
    }

    .notification-item small {
        flex-shrink: 0;
        max-width: none;
        white-space: nowrap;
    }
}

/* MOBILE HEADER NOTIFICATION BELL */

.notification-bell-btn {
    position: relative;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--navy);
}

.notification-bell-btn i {
    width: 23px;
    height: 23px;
}

.notification-bell-btn:hover {
    background: var(--surface);
}

.notification-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ef4444;
    color: white;
    border: 2px solid white;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
}

@media (max-width: 768px) {
    .top-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        height: 60px;
        padding: 0 15px;
    }

    .mobile-logo {
        display: block;
    }

    .header-actions {
        display: flex;
        align-items: center;
        gap: 12px;
    }
}

.notification-initial {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e9e5ff;
    color: #5b45c6;
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    flex-shrink: 0;
}

/* =========================
   CAMPUS CRUSH SPONSORED ADS
========================= */

.sponsored-post-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 24px;
}

.sponsored-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    color: #6b7280;
    background: #f3f4f6;
    padding: 5px 9px;
    border-radius: 6px;
}

.sponsored-ad-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 15px;
}

.sponsored-advertiser {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.sponsored-ad-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.sponsored-ad-info {
    min-width: 0;
}

.sponsored-ad-info h4 {
    font-size: 14px;
    font-weight: 700;
}

.sponsored-ad-info p {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 3px;
}

.sponsored-ad-media {
    width: 100%;
    display: block;
    max-height: 600px;
    object-fit: cover;
    background: var(--surface);
}

.sponsored-ad-body {
    padding: 15px;
}

.sponsored-ad-caption {
    font-size: 14px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.sponsored-ad-title {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 7px;
}

.sponsored-ad-cta {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px;
    margin-top: 14px;
    border: none;
    border-radius: 9px;
    background: var(--purple);
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    transition: 0.2s ease;
}

.sponsored-ad-cta:hover {
    background: var(--purple-dark);
}

.sponsored-ad-cta:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.sponsored-ad-footer {
    padding: 0 15px 15px;
    color: var(--text-secondary);
    font-size: 11px;
}

/* Mobile */

@media (max-width: 768px) {

    .sponsored-post-card {
        border-radius: 12px;
        margin-bottom: 18px;
    }

    .sponsored-ad-header {
        padding: 12px;
    }

    .sponsored-ad-body {
        padding: 12px;
    }

    .sponsored-ad-media {
        max-height: 500px;
    }
}