*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --bg: #f3f4f6;
    --bg-alt: #ffffff;
    --border: #e5e7eb;
    --text: #111827;
    --text-muted: #6b7280;
    --primary: #2563eb;
    --primary-soft: #dbeafe;
    --primary-strong: #1d4ed8;
    --success: #16a34a;
    --danger: #dc2626;
    --radius-card: 16px;
    --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.08);
    --font-main: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: var(--font-main);
    background: radial-gradient(circle at top, #e0f2fe 0, #f3f4f6 45%, #e5e7eb 100%);
    color: var(--text);
}

/* AUTH PAGE */

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
}

.auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 32px;
    background: rgba(255,255,255,0.92);
    border-radius: 24px;
    box-shadow: 0 24px 60px rgba(15,23,42,0.18);
    padding: 32px;
    backdrop-filter: blur(20px);
}

.auth-left {
    border-right: 1px solid #e5e7eb;
    padding-right: 24px;
}

.brand-logo {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: 0.03em;
    color: var(--primary);
    margin-bottom: 12px;
}

.brand-logo span {
    color: #111827;
}

.brand-tagline {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.brand-points {
    list-style: none;
    padding-left: 0;
    margin-top: 8px;
}

.brand-points li {
    margin-bottom: 6px;
    font-size: 14px;
    color: var(--text-muted);
}

.auth-right {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-card {
    padding: 20px 22px;
}

.auth-card.secondary {
    background: #f9fafb;
}

/* GENERIC */

.card {
    background: var(--bg-alt);
    border-radius: var(--radius-card);
    padding: 16px 18px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
}

.card-title {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 600;
}

.form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form label {
    font-size: 13px;
    color: var(--text-muted);
}

.form input[type="text"],
.form input[type="email"],
.form input[type="password"],
.form textarea {
    padding: 9px 10px;
    border-radius: 10px;
    border: 1px solid var(--border);
    font-size: 14px;
    outline: none;
    background: #f9fafb;
}

.form textarea {
    resize: vertical;
}

.form input:focus,
.form textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary-soft);
    background: #ffffff;
}

.btn {
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn.primary {
    background: linear-gradient(90deg, var(--primary), var(--primary-strong));
    color: #ffffff;
}

.btn.outline {
    border: 1px solid var(--primary);
    color: var(--primary-strong);
    background: #eff6ff;
}

.btn.ghost-sm {
    padding: 4px 10px;
    font-size: 13px;
    border-radius: 999px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    color: var(--text-muted);
}

.btn.btn-ghost {
    padding: 6px 14px;
    background: transparent;
    border: 1px solid #e5e7eb;
    font-size: 13px;
}

.w-full {
    width: 100%;
}

.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }

.alert {
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 6px;
}

.alert-error {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

.alert-success {
    background: #dcfce7;
    border: 1px solid #bbf7d0;
    color: #15803d;
}

/* TOPBAR */

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 24px;
    background: rgba(255,255,255,0.95);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(14px);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand-mini {
    font-weight: 800;
    font-size: 20px;
    text-decoration: none;
    color: var(--primary);
}

.brand-mini span {
    color: var(--text);
}

.topbar-search {
    min-width: 220px;
    max-width: 280px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--border);
    font-size: 13px;
    background: #f9fafb;
}

.topbar-center {
    display: flex;
    gap: 12px;
}

.topbar-link {
    font-size: 14px;
    color: var(--text-muted);
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 999px;
}

.topbar-link:hover {
    background: #e5e7eb;
    color: var(--text);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.topbar-user {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: var(--text);
    font-size: 14px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
}

/* AVATARS */

.avatar {
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e5e7eb;
    color: var(--text-muted);
    font-weight: 700;
}

.avatar-xs {
    width: 28px;
    height: 28px;
    font-size: 13px;
}

.avatar-sm {
    width: 32px;
    height: 32px;
    font-size: 14px;
}

.avatar-lg {
    width: 64px;
    height: 64px;
    font-size: 20px;
}

.avatar-xl {
    width: 92px;
    height: 92px;
    font-size: 30px;
}

.avatar-fallback {
    background: linear-gradient(135deg, #bfdbfe, #a5b4fc);
    color: #1e293b;
}

/* LAYOUT */

.layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1.1fr) 260px;
    gap: 16px;
    padding: 16px 24px 32px;
}

.sidebar-left,
.sidebar-right {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.main-feed {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* USER CARD */

.user-card {
    display: flex;
    gap: 10px;
    align-items: center;
}

.user-info-main .user-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
}

.user-info-main .user-meta {
    font-size: 12px;
    color: var(--text-muted);
}

/* NAV LIST */

.nav-list {
    list-style: none;
    padding-left: 0;
    margin: 6px 0 0;
}

.nav-list li a {
    display: block;
    padding: 6px 8px;
    border-radius: 10px;
    font-size: 14px;
    color: var(--text-muted);
    text-decoration: none;
}

.nav-list li a:hover {
    background: #f3f4f6;
    color: var(--text);
}

/* NEW POST */

.new-post-card textarea {
    width: 100%;
    border-radius: 12px;
    border: 1px solid var(--border);
    padding: 8px 10px;
    font-size: 14px;
    background: #f9fafb;
}

.new-post-footer {
    margin-top: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.file-input-label {
    font-size: 13px;
    color: var(--primary-strong);
    background: #eff6ff;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px dashed var(--primary);
    cursor: pointer;
}

.file-input-label input {
    display: none;
}

/* POST */

.post {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.post-header {
    display: flex;
    gap: 8px;
    align-items: center;
}

.post-author {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
}

.post-date {
    font-size: 12px;
    color: var(--text-muted);
}

.post-content {
    font-size: 14px;
    line-height: 1.5;
}

.post-photo img {
    width: 100%;
    border-radius: 12px;
    margin-top: 4px;
}

.post-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-muted);
}

.reaction-btn {
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    padding: 4px 10px;
    font-size: 13px;
    background: #f9fafb;
    cursor: pointer;
}

.reaction-btn:hover {
    background: #eff6ff;
}

.post-stats {
    margin-left: auto;
}

/* COMMENTS */

.post-comments {
    margin-top: 6px;
    border-top: 1px solid #e5e7eb;
    padding-top: 6px;
}

.comment {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-bottom: 4px;
}

.comment-body {
    background: #f3f4f6;
    border-radius: 12px;
    padding: 6px 8px;
    font-size: 13px;
}

.comment-author {
    font-weight: 600;
    font-size: 13px;
}

.comment-text {
    font-size: 13px;
}

.comment-meta {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.comment-form {
    display: flex;
    gap: 6px;
    margin-top: 6px;
}

.comment-form input[type="text"] {
    flex: 1;
    border-radius: 999px;
    border: 1px solid var(--border);
    padding: 6px 10px;
    font-size: 13px;
}

.comment-form button {
    border-radius: 999px;
    border: none;
    background: #e5e7eb;
    font-size: 13px;
    padding: 6px 12px;
    cursor: pointer;
}

/* FRIENDS */

.friends-list {
    list-style: none;
    padding: 0;
    margin: 8px 0 0;
    font-size: 14px;
}

.friends-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
}

.friends-list .friend-msg-link {
    margin-left: auto;
    font-size: 12px;
    text-decoration: none;
    color: var(--primary-strong);
}

.friends-list.big li {
    justify-content: space-between;
}

.friend-info {
    display: flex;
    flex-direction: column;
}

.friend-name {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
}

.friend-email {
    font-size: 12px;
    color: var(--text-muted);
}

.friend-request {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid #e5e7eb;
}

.friend-main {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* PROFILE */

.profile-layout .main-feed {
    max-width: 760px;
    margin: 0 auto;
}

.profile-header-card {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 16px;
}

.profile-main {
    display: flex;
    gap: 12px;
}

.profile-main-info h1 {
    margin: 0 0 4px;
    font-size: 22px;
}

.profile-bio {
    margin: 0 0 4px;
    font-size: 14px;
    color: var(--text-muted);
}

.profile-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--text-muted);
}

.profile-actions {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 6px;
}

.badge {
    font-size: 12px;
    background: #e5e7eb;
    padding: 4px 10px;
    border-radius: 999px;
}

.badge-success {
    background: #dcfce7;
    color: #15803d;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
    margin-top: 8px;
}

.gallery-item img {
    width: 100%;
    border-radius: 12px;
}

.gallery-item figcaption {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* SETTINGS */

.settings-layout .main-feed {
    max-width: 720px;
    margin: 0 auto;
}

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

.hint {
    font-size: 11px;
    color: var(--text-muted);
}

/* MESSAGES */

.messages-layout {
    grid-template-columns: 260px minmax(0, 1.2fr);
}

.conversation-list {
    list-style: none;
    padding: 0;
    margin: 8px 0 0;
}

.conversation-list li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 6px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text);
    font-size: 14px;
}

.conversation-list li.active a,
.conversation-list li a:hover {
    background: #eff6ff;
}

.messages-card {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 110px);
}

.messages-header {
    font-weight: 600;
    margin-bottom: 8px;
}

.messages-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-right: 4px;
    border-radius: 12px;
    background: #f9fafb;
    padding: 8px;
}

.message-item {
    max-width: 70%;
    padding: 6px 10px;
    border-radius: 14px;
    font-size: 13px;
}

.message-item.from-me {
    margin-left: auto;
    background: #dbeafe;
}

.message-item.from-them {
    margin-right: auto;
    background: #e5e7eb;
}

.message-meta {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

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

.message-form textarea {
    flex: 1;
    border-radius: 12px;
    border: 1px solid var(--border);
    padding: 8px 10px;
    font-size: 14px;
    resize: none;
}

/* INLINE FORM */

.inline-form {
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

/* BADGE */

/* RESPONSIVE */

@media (max-width: 1024px) {
    .layout {
        grid-template-columns: 1fr;
    }
    .sidebar-left,
    .sidebar-right {
        display: none;
    }
    .messages-layout {
        grid-template-columns: 1fr;
    }
}


.topbar-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.search-dropdown {
    position: absolute;
    top: 110%;
    left: 0;
    width: 260px;
    max-height: 260px;
    overflow-y: auto;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
    padding: 4px;
    display: none;
    z-index: 30;
}

.search-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 10px;
    cursor: pointer;
}

.search-item:hover {
    background: #f3f4f6;
}

.search-item-text {
    display: flex;
    flex-direction: column;
}

.search-item-name {
    font-size: 14px;
    font-weight: 500;
}

.search-item-email {
    font-size: 12px;
    color: var(--text-muted);
}

img.avatar {
    object-fit: cover;
}

/* single-column layout variants */
.layout.single-column {
    grid-template-columns: minmax(0, 1fr);
}

.layout.single-column .main-feed {
    max-width: 920px;
    margin: 0 auto;
}

/* ensure inline form input flexes */
.inline-form input[type="email"],
.inline-form input[type="text"] {
    flex: 1;
}

/* avatar crop modal */
.crop-modal {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 40;
}

.crop-modal-inner {
    background: #ffffff;
    border-radius: 18px;
    padding: 16px 18px;
    width: 320px;
    box-shadow: var(--shadow-soft);
}

.crop-modal-inner h3 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 16px;
}

.crop-preview {
    display: flex;
    justify-content: center;
    margin: 8px 0 10px;
}

.crop-circle {
    width: 120px;
    height: 120px;
    border-radius: 999px;
    overflow: hidden;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
}

.crop-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.15s ease;
}

.crop-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 12px;
}

/* post modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 35;
}

.modal-inner {
    background: #ffffff;
    border-radius: 18px;
    padding: 16px 18px;
    width: min(520px, 100% - 32px);
    box-shadow: var(--shadow-soft);
}

.modal-inner h2 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 18px;
}

.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

.new-post-inline {
    display: flex;
    align-items: center;
    gap: 10px;
}

.new-post-inline .placeholder {
    flex: 1;
    padding: 8px 12px;
    border-radius: 999px;
    background: #f3f4f6;
    font-size: 14px;
    color: var(--text-muted);
    text-align: left;
    border: 1px solid #e5e7eb;
}

.topbar-icons {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    position: relative;
}

.icon-btn.has-unread {
    background: #eff6ff;
    border-color: var(--primary-soft);
}

.badge-dot {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--danger);
}

/* dropdown panels for notifications / messages */
.dropdown-panel {
    position: absolute;
    top: 110%;
    right: 0;
    width: 280px;
    max-height: 320px;
    overflow-y: auto;
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
    padding: 8px;
    display: none;
    z-index: 40;
}

.dropdown-header {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.dropdown-empty {
    font-size: 13px;
    color: var(--text-muted);
    margin: 6px 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 6px;
    border-radius: 10px;
    font-size: 13px;
    text-decoration: none;
    color: var(--text);
}

.dropdown-item:hover {
    background: #f3f4f6;
}

.dropdown-text {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.dropdown-title {
    font-weight: 500;
}

.dropdown-sub {
    font-size: 12px;
    color: var(--text-muted);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.modal-header h2 {
    font-size: 18px;
    margin: 0;
}

.modal-close {
    border: none;
    background: transparent;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
    color: var(--text-muted);
}

.modal-close:hover {
    color: var(--text);
}

.modal-user {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
}
@media (max-width: 900px) {
    .auth-shell {
        grid-template-columns: minmax(0, 1fr);
    }
    .auth-left {
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
        padding-right: 0;
        padding-bottom: 16px;
    }
}

.messages-layout {
    grid-template-columns: 280px minmax(0, 1fr);
}

.messages-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.messages-list {
    flex: 1;
    overflow-y: auto;
    padding-right: 4px;
}

.message-item {
    display: flex;
    gap: 6px;
    margin-bottom: 6px;
    align-items: flex-end;
}

.message-item.from-me {
    justify-content: flex-end;
}

.message-avatar {
    flex: 0 0 auto;
}

.message-bubble {
    max-width: 70%;
    padding: 6px 10px;
    border-radius: 14px;
    background: #f3f4f6;
    font-size: 14px;
}

.message-item.from-me .message-bubble {
    background: #e0edff;
}

.messages-card.theme-default .message-item.from-me .message-bubble {
    background: #e0edff;
}
.messages-card.theme-default .message-item.from-them .message-bubble {
    background: #f3f4f6;
}

.messages-card.theme-blue .message-item.from-me .message-bubble {
    background: #dbeafe;
}
.messages-card.theme-blue .message-item.from-them .message-bubble {
    background: #eff6ff;
}
.messages-card.theme-green .message-item.from-me .message-bubble {
    background: #dcfce7;
}
.messages-card.theme-green .message-item.from-them .message-bubble {
    background: #f0fdf4;
}
.messages-card.theme-dark {
    background: #111827;
    color: #e5e7eb;
}
.messages-card.theme-dark .messages-header {
    border-bottom-color: #1f2937;
}
.messages-card.theme-dark .message-bubble {
    background: #1f2937;
    color: #e5e7eb;
}
.messages-card.theme-dark .message-item.from-me .message-bubble {
    background: #2563eb;
}

.message-content {
    margin-bottom: 4px;
    word-wrap: break-word;
}

.message-media-image {
    display: block;
    max-width: 180px;
    max-height: 180px;
    border-radius: 12px;
    margin-top: 4px;
    object-fit: cover;
    cursor: pointer;
}

.message-media-video {
    display: block;
    max-width: 220px;
    border-radius: 12px;
    margin-top: 4px;
}

.message-meta {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.message-form {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    align-items: flex-end;
}

.message-form textarea {
    flex: 1;
}

.message-typing {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 6px 0;
}

.typing-bubble {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
}

.typing-dots {
    display: inline-flex;
    gap: 3px;
}
.typing-dots span {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: #9ca3af;
    animation: typingBlink 1s infinite ease-in-out;
}
.typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.typing-dots span:nth-child(3) { animation-delay: 0.3s; }

@keyframes typingBlink {
    0%, 100% { opacity: 0.2; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(-2px); }
}

.messages-toolbar {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 6px 0 10px;
}

.messages-toolbar input[type="text"] {
    flex: 1;
}

/* lightbox image */
.modal-inner.image-inner {
    max-width: min(800px, 100% - 32px);
}
.modal-inner.image-inner img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 16px;
}


.attachment-info {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
    margin-bottom: 4px;
}

/* Post create modal - FB like */
.post-modal {
    max-width: 540px;
    width: 100%;
    border-radius: 18px;
    padding: 16px 16px 12px;
}

.post-modal-header {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 12px;
}

.post-modal-header h2 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.post-modal-close {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: none;
    background: #e5e7eb;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

.post-modal-close:hover {
    background: #d1d5db;
}

.post-modal-user {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.post-modal-user-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.post-modal-name {
    font-weight: 600;
    font-size: 14px;
}

.post-modal-audience {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #f3f4f6;
    cursor: default;
}

.post-modal-body {
    margin-bottom: 12px;
}

.post-modal-textarea {
    width: 100%;
    border: none;
    resize: none;
    min-height: 120px;
    font-size: 15px;
    line-height: 1.4;
    padding: 4px 0;
}

.post-modal-textarea:focus {
    outline: none;
}

.post-modal-add {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #f9fafb;
    margin-bottom: 10px;
}

.post-modal-add .label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
}

.post-modal-icons {
    display: flex;
    gap: 6px;
    align-items: center;
}

.icon-btn-circle {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
}

.icon-btn-circle.photo { background: #dbeafe; }
.icon-btn-circle.mood { background: #fef3c7; }
.icon-btn-circle.location { background: #dcfce7; }
.icon-btn-circle.gif { background: #e0e7ff; font-size: 11px; font-weight: 600; }

.icon-btn-circle:hover {
    filter: brightness(0.95);
}

.post-modal-footer {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.fullwidth {
    width: 100%;
    justify-content: center;
}

.post-modal-footer .btn[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

.post-modal-extra {
    margin: 6px 0 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.emoji-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 6px 8px;
    border-radius: 10px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
}

.emoji-picker button {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

.location-row input,
.gif-row input {
    width: 100%;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    padding: 6px 10px;
    font-size: 13px;
}

.post-modal-audience-wrap {
    position: relative;
    display: inline-block;
}

.post-modal-audience {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #f3f4f6;
    cursor: pointer;
}

.post-modal-audience-menu {
    position: absolute;
    top: 110%;
    left: 0;
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 8px 24px rgba(15,23,42,0.18);
    padding: 4px;
    min-width: 140px;
    z-index: 40;
}

.post-modal-audience-menu button {
    width: 100%;
    border: none;
    background: transparent;
    text-align: left;
    padding: 6px 8px;
    font-size: 13px;
    border-radius: 8px;
    cursor: pointer;
}

.post-modal-audience-menu button:hover {
    background: #f3f4f6;
}

/* Reactions modal */
.reactions-modal {
    max-width: 420px;
    width: 100%;
    border-radius: 18px;
    padding: 12px 16px 16px;
}

.reactions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.reactions-header span {
    font-weight: 600;
}

.reactions-close {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: none;
    background: #e5e7eb;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

.reactions-body {
    max-height: 360px;
    overflow-y: auto;
}

.reaction-group {
    margin-top: 6px;
}

.reaction-group-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 4px;
}

.reaction-icon {
    font-size: 16px;
}

.reaction-users {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.reaction-user {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 2px;
    text-decoration: none;
    color: inherit;
}

.reaction-user:hover {
    background: #f3f4f6;
    border-radius: 8px;
}

.reactions-empty {
    font-size: 13px;
    color: var(--text-muted);
}
