/* ===========================================
   AIVEK Social Feed – Dark Minimal Theme
   =========================================== */

/* Reset & Base */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #000;
    color: #fff;
    min-height: 100vh;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, textarea { font-family: inherit; }

/* ---------- Animated Background ---------- */
.feed-background {
    position: fixed; inset: 0;
    pointer-events: none; z-index: 0; opacity: .25;
    overflow: hidden;
}
.floating-cube {
    position: absolute;
    border: 1px solid rgba(255,255,255,.1);
    background: transparent;
    animation: floatUp 25s infinite linear;
    border-radius: 8px;
}
.floating-cube:nth-child(1){ left:5%;  width:40px; height:40px; animation-delay:0s; }
.floating-cube:nth-child(2){ left:25%; width:60px; height:60px; animation-delay:-5s; animation-duration:30s; }
.floating-cube:nth-child(3){ left:45%; width:35px; height:35px; animation-delay:-10s; }
.floating-cube:nth-child(4){ left:65%; width:50px; height:50px; animation-delay:-15s; animation-duration:28s; }
.floating-cube:nth-child(5){ left:85%; width:45px; height:45px; animation-delay:-8s; }
@keyframes floatUp {
    0%   { transform:translateY(100vh) rotate(0);    opacity:0; }
    10%  { opacity:.5; }
    90%  { opacity:.5; }
    100% { transform:translateY(-100vh) rotate(720deg); opacity:0; }
}

/* ---------- Layout ---------- */
.feed-app {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* ---------- Top Navigation Bar ---------- */
.top-nav {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 100;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    justify-items: center;
    align-items: center;
    padding: 10px 16px;
    background: rgba(10,10,10,.95);
    border-top: 1px solid rgba(255,255,255,.08);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    overflow: visible;
}
.top-nav-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    width: 42px; height: 42px;
    padding: 0;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,.06);
    color: rgba(255,255,255,.45);
    font-size: .88rem;
    font-weight: 500;
    cursor: pointer;
    transition: all .3s cubic-bezier(.4,0,.2,1);
    position: relative;
    white-space: nowrap;
    overflow: visible;
}
.top-nav-tab i {
    font-size: 1.05rem;
    flex-shrink: 0;
}
.top-nav-tab span {
    max-width: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-width .35s cubic-bezier(.4,0,.2,1), opacity .25s ease, margin .35s cubic-bezier(.4,0,.2,1);
    margin-left: 0;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .02em;
}
.top-nav-tab:hover {
    color: rgba(255,255,255,.8);
    background: rgba(255,255,255,.1);
    transform: scale(1.08);
}
.top-nav-tab.active {
    width: auto;
    max-width: calc(100% + 12px);
    height: 42px;
    padding: 0 16px;
    border-radius: 50px;
    background: #fff;
    color: #000;
    overflow: hidden;
}
.top-nav-tab.active span {
    max-width: 56px;
    opacity: 1;
    margin-left: 6px;
}

/* Notification badge */
.notif-badge {
    position: absolute;
    top: 2px; right: 2px;
    min-width: 16px; height: 16px;
    border-radius: 8px;
    background: #ef4444;
    color: #fff;
    font-size: .6rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    line-height: 1;
}

/* Create dropdown */
.create-dropdown {
    position: fixed;
    bottom: 72px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 101;
    background: #1a1a1a;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,.5);
    min-width: 200px;
}
.create-dropdown button {
    width: 100%;
    padding: 12px 16px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: .88rem;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: background .15s;
}
.create-dropdown button:hover {
    background: rgba(255,255,255,.08);
}
.create-dropdown button i {
    width: 18px;
    text-align: center;
    font-size: .9rem;
    color: rgba(255,255,255,.5);
}
.create-dropdown .dropdown-divider {
    height: 1px;
    background: rgba(255,255,255,.08);
}

/* ---------- Main Content ---------- */
.feed-main {
    flex: 1;
    display: flex; justify-content: center;
    padding: 20px 20px 80px;
}

.feed-content {
    width: 100%;
    max-width: 640px;
}

/* View header */
.view-header {
    margin-bottom: 24px;
}
.view-header h2 {
    font-size: 1.5rem; font-weight: 700;
}
.view-header p {
    color: rgba(255,255,255,.45); font-size: .85rem; margin-top: 4px;
}

/* ---------- Build Card ---------- */
.build-card {
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 16px;
    margin-bottom: 20px;
    overflow: hidden;
    transition: border-color .2s;
}
.build-card:hover {
    border-color: rgba(255,255,255,.16);
}

.build-card-header {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 16px 10px;
}
.build-author-avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: rgba(255,255,255,.12);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: .8rem;
    overflow: hidden;
    background-size: cover; background-position: center;
    cursor: pointer;
    flex-shrink: 0;
}
.build-author-info {
    flex: 1;
}
.build-author-name {
    font-size: .88rem; font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}
.build-author-name:hover { text-decoration: underline; }
.build-author-handle {
    font-weight: 400;
    color: rgba(255,255,255,.35);
    font-size: .82rem;
}
.build-timestamp {
    font-size: .72rem; color: rgba(255,255,255,.35);
}
.build-card-title {
    padding: 0 16px 8px;
    font-size: 1.05rem; font-weight: 600;
}
.build-card-desc {
    padding: 0 16px 10px;
    font-size: .85rem; color: rgba(255,255,255,.55);
    line-height: 1.4;
}

/* Preview iframe */
.build-preview-wrap {
    position: relative;
    width: 100%;
    height: 340px;
    background: #111;
    border-top: 1px solid rgba(255,255,255,.06);
    border-bottom: 1px solid rgba(255,255,255,.06);
    overflow: hidden;
}
.build-preview-wrap iframe {
    width: 100%; height: 100%;
    border: none;
    background: #fff;
    pointer-events: none;
}
.build-preview-overlay {
    position: absolute; inset: 0;
    cursor: pointer;
}

/* Actions bar */

/* Verified badge */
.verified-badge {
    display: inline-flex;
    align-items: center;
    margin-left: 4px;
    vertical-align: middle;
}
.verified-badge i {
    color: #818cf8;
    font-size: .85em;
}
.profile-name .verified-badge i {
    font-size: .8em;
}

.build-actions {
    display: flex; align-items: center; gap: 6px;
    padding: 10px 16px 14px;
}
.build-action-btn {
    display: flex; align-items: center; gap: 6px;
    background: transparent;
    border: none;
    color: rgba(255,255,255,.5);
    font-size: .85rem;
    padding: 6px 10px;
    border-radius: 8px;
    transition: all .18s;
}
.build-action-btn:hover {
    background: rgba(255,255,255,.07);
    color: #fff;
}
.build-action-btn.active {
    color: #fff;
}
.build-action-btn.liked i { color: #e74c3c; }
.build-action-btn.saved i { color: #f1c40f; }
.build-action-btn.reposted i { color: #22c55e; }
.build-action-btn.reposted { color: #22c55e; }
.build-action-btn .count { font-size: .8rem; }

.build-delete-btn { margin-left: auto; }
.build-delete-btn:hover { color: #e74c3c !important; }

.build-fork-badge {
    font-size: .75rem;
    color: rgba(255,255,255,.7);
    padding: 6px 16px 8px;
    display: flex; align-items: center; gap: 6px;
}
.build-fork-badge i {
    color: #a78bfa;
    font-size: .8rem;
}
.build-fork-badge strong {
    color: #a78bfa;
}

/* Repost badge (like fork badge but green) */
.build-repost-badge {
    font-size: .75rem;
    color: rgba(255,255,255,.7);
    padding: 6px 16px 4px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: color .2s;
}
.build-repost-badge:hover {
    color: #22c55e;
}
.build-repost-badge i {
    color: #22c55e;
    font-size: .8rem;
}

/* ---------- Profile View ---------- */
.profile-header {
    display: flex; align-items: center; gap: 28px;
    padding: 28px 0 24px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    margin-bottom: 24px;
}
.profile-avatar {
    width: 96px; height: 96px;
    border-radius: 50%;
    background: rgba(255,255,255,.1);
    display: flex; align-items: center; justify-content: center;
    font-size: 2.2rem; font-weight: 700;
    overflow: hidden;
    background-size: cover; background-position: center;
    flex-shrink: 0;
}
.profile-info { flex: 1; }
.profile-name {
    font-size: 1.35rem; font-weight: 700;
}
.profile-username {
    color: rgba(255,255,255,.4); font-size: .9rem; margin-top: 2px;
}
.profile-bio {
    color: rgba(255,255,255,.7); font-size: .92rem; margin-top: 8px; line-height: 1.4; word-break: break-word;
}
.profile-private-notice {
    text-align: center; padding: 48px 24px; color: rgba(255,255,255,.5);
}
.profile-private-notice i {
    font-size: 2.5rem; margin-bottom: 12px; color: rgba(255,255,255,.3);
}
.profile-private-notice p {
    font-size: 1.1rem; font-weight: 600; color: rgba(255,255,255,.7); margin: 8px 0 0;
}
.profile-private-sub {
    font-size: .85rem !important; font-weight: 400 !important; color: rgba(255,255,255,.4) !important; margin-top: 4px !important;
}
.profile-stats {
    display: flex; gap: 24px; margin-top: 12px;
}
.profile-stat {
    text-align: center;
}
.profile-stat-value {
    font-size: 1.2rem; font-weight: 700;
}
.profile-stat-label {
    font-size: .72rem; color: rgba(255,255,255,.4); text-transform: uppercase; letter-spacing: .5px;
}
.profile-follow-btn {
    margin-top: 14px;
    padding: 8px 28px;
    border-radius: 10px;
    background: #fff;
    color: #000;
    font-weight: 700;
    font-size: .88rem;
    border: none;
    transition: all .2s;
}
.profile-follow-btn:hover { opacity: .85; }
.profile-follow-btn.following {
    background: transparent;
    border: 1px solid rgba(255,255,255,.2);
    color: #fff;
}
.profile-builds-label {
    font-size: .85rem; font-weight: 600;
    color: rgba(255,255,255,.5);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: .5px;
}

/* Profile name row with settings gear */
.profile-name-row {
    display: flex; align-items: center; gap: 10px;
}
.profile-settings-btn {
    background: transparent; border: 1px solid rgba(255,255,255,.12);
    color: rgba(255,255,255,.4); font-size: .95rem;
    width: 34px; height: 34px; border-radius: 50%;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: all .2s;
}
.profile-settings-btn:hover {
    color: #fff; border-color: rgba(255,255,255,.3); background: rgba(255,255,255,.06);
}

/* Profile options dropdown (other users) */
.profile-options-wrap {
    position: relative;
}
.profile-options-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: #1e1e28;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 12px;
    min-width: 180px;
    padding: 6px 0;
    box-shadow: 0 12px 40px rgba(0,0,0,.5);
    z-index: 100;
}
.profile-options-dropdown.show { display: block; }
.profile-option-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 16px;
    background: none;
    border: none;
    color: rgba(255,255,255,.7);
    font-size: .85rem;
    cursor: pointer;
    transition: background .15s;
    text-align: left;
}
.profile-option-item:hover {
    background: rgba(255,255,255,.06);
}
.profile-option-item i { width: 16px; text-align: center; font-size: .8rem; }
.profile-option-danger { color: #e74c3c; }
.profile-option-danger:hover { background: rgba(231,76,60,.1); }
.profile-options-dropdown .dropdown-divider {
    height: 1px;
    background: rgba(255,255,255,.06);
    margin: 4px 0;
}

/* ---------- Profile Settings Modal ---------- */
.profile-settings-overlay {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(0,0,0,.6); backdrop-filter: blur(6px);
    display: flex; align-items: center; justify-content: center;
    animation: overlayFadeIn .25s ease;
}
.profile-settings-modal {
    background: #1a1a22; border: 1px solid rgba(255,255,255,.08);
    border-radius: 18px; width: 420px; max-width: 92vw;
    box-shadow: 0 24px 64px rgba(0,0,0,.5);
    overflow: hidden;
    animation: modalScaleIn .3s cubic-bezier(.4,0,.2,1);
}
.profile-settings-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 22px; border-bottom: 1px solid rgba(255,255,255,.06);
}
.profile-settings-title {
    font-weight: 700; font-size: 1.05rem; color: #fff;
    display: flex; align-items: center; gap: 8px;
}
.profile-settings-title i { color: rgba(255,255,255,.4); }
.profile-settings-close {
    background: transparent; border: none; color: rgba(255,255,255,.4);
    font-size: 1.1rem; cursor: pointer; padding: 4px;
    transition: color .2s;
}
.profile-settings-close:hover { color: #fff; }
.profile-settings-body {
    padding: 22px;
}
.profile-settings-label {
    font-size: .82rem; font-weight: 600; color: rgba(255,255,255,.5);
    text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px;
    display: block;
}
.profile-settings-input {
    width: 100%; padding: 12px 16px; border-radius: 10px;
    background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
    color: #fff; font-size: .95rem; outline: none;
    transition: border-color .2s;
    box-sizing: border-box;
}
.profile-settings-input:focus {
    border-color: rgba(99,102,241,.5);
}
.profile-settings-hint {
    font-size: .75rem; color: rgba(255,255,255,.3); margin-top: 8px;
}
.profile-settings-footer {
    display: flex; justify-content: flex-end; gap: 10px;
    padding: 16px 22px; border-top: 1px solid rgba(255,255,255,.06);
}
.profile-settings-cancel {
    padding: 9px 22px; border-radius: 10px;
    background: transparent; border: 1px solid rgba(255,255,255,.12);
    color: rgba(255,255,255,.6); font-weight: 600; font-size: .88rem;
    cursor: pointer; transition: all .2s;
}
.profile-settings-cancel:hover { border-color: rgba(255,255,255,.3); color: #fff; }
.profile-settings-save {
    padding: 9px 22px; border-radius: 10px;
    background: #6366f1; border: none; color: #fff;
    font-weight: 700; font-size: .88rem; cursor: pointer;
    transition: background .2s;
}
.profile-settings-save:hover { background: #4f46e5; }
.profile-settings-save:disabled { opacity: .5; cursor: not-allowed; }

/* Profile settings menu items */
.profile-settings-menu {
    margin-top: 20px;
    display: flex; flex-direction: column; gap: 4px;
    border-top: 1px solid rgba(255,255,255,.06);
    padding-top: 18px;
}
.profile-settings-menu-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 13px 14px; border-radius: 10px;
    background: transparent; border: none; color: #fff;
    font-size: .92rem; cursor: pointer; text-decoration: none;
    transition: background .2s;
    width: 100%;
}
.profile-settings-menu-item:hover { background: rgba(255,255,255,.06); }
.psmi-left {
    display: flex; align-items: center; gap: 12px;
}
.psmi-left i {
    width: 20px; text-align: center; font-size: .95rem;
    color: rgba(255,255,255,.45);
}
.psmi-arrow { font-size: .7rem; color: rgba(255,255,255,.25); }
/* Toggle switch */
.psmi-toggle {
    width: 42px; height: 24px; border-radius: 12px;
    background: rgba(255,255,255,.12); position: relative;
    transition: background .25s; flex-shrink: 0;
}
.psmi-toggle.active { background: #6366f1; }
.psmi-toggle-knob {
    width: 18px; height: 18px; border-radius: 50%;
    background: #fff; position: absolute; top: 3px; left: 3px;
    transition: transform .25s;
    box-shadow: 0 1px 3px rgba(0,0,0,.3);
}
.psmi-toggle.active .psmi-toggle-knob { transform: translateX(18px); }

/* Blocked users list */
.blocked-user-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.blocked-user-row:last-child { border-bottom: none; }
.blocked-user-info {
    display: flex; align-items: center; gap: 12px;
}
.blocked-user-avatar {
    width: 38px; height: 38px; border-radius: 50%;
    background: rgba(255,255,255,.08); display: flex;
    align-items: center; justify-content: center;
    font-weight: 700; font-size: .85rem; color: rgba(255,255,255,.5);
    background-size: cover; background-position: center;
    flex-shrink: 0;
}
.blocked-user-name { font-weight: 600; font-size: .92rem; color: #fff; }
.blocked-user-username { font-size: .8rem; color: rgba(255,255,255,.4); }
.blocked-user-unblock {
    padding: 7px 16px; border-radius: 8px;
    background: transparent; border: 1px solid rgba(255,255,255,.15);
    color: rgba(255,255,255,.7); font-size: .8rem; font-weight: 600;
    cursor: pointer; transition: all .2s;
}
.blocked-user-unblock:hover { border-color: #ef4444; color: #ef4444; }
.blocked-empty {
    text-align: center; padding: 32px 0; color: rgba(255,255,255,.3);
    font-size: .9rem;
}

/* ---------- Create View ---------- */
.create-form {
    display: flex; flex-direction: column; gap: 16px;
}
.create-input, .create-textarea {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.04);
    color: #fff;
    font-size: .92rem;
    outline: none;
    transition: border-color .2s;
}
.create-input:focus, .create-textarea:focus {
    border-color: rgba(255,255,255,.3);
}
.create-textarea {
    min-height: 140px;
    resize: vertical;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: .82rem;
    line-height: 1.5;
}
.create-label {
    font-size: .82rem; font-weight: 600;
    color: rgba(255,255,255,.5);
    margin-bottom: -8px;
}
.create-preview {
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 12px;
    height: 360px;
    background: #fff;
    overflow: hidden;
}
.create-preview iframe {
    width: 100%; height: 100%;
    border: none;
}
.create-actions {
    display: flex; gap: 10px; justify-content: flex-end;
}
.btn-publish {
    padding: 12px 32px;
    border-radius: 12px;
    background: #fff;
    color: #000;
    font-weight: 700;
    border: none;
    font-size: .92rem;
    transition: opacity .2s;
}
.btn-publish:hover { opacity: .85; }
.btn-publish:disabled { opacity: .4; cursor: not-allowed; }

/* ---------- Build Detail Modal ---------- */
.build-modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.8);
    z-index: 500;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    animation: overlayFadeIn .25s ease;
}
.build-modal {
    width: 100%;
    max-width: 1100px;
    max-height: 92vh;
    background: #0a0a0a;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 18px;
    overflow: hidden;
    display: flex; flex-direction: column;
    animation: modalScaleIn .3s cubic-bezier(.4,0,.2,1);
}
.build-modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    flex-shrink: 0;
}
.build-modal-header-left {
    display: flex; align-items: center; gap: 8px;
    min-width: 0;
    flex: 1;
}
/* Post-mode: smaller modal for text-only posts */
.build-modal.post-mode {
    max-width: 640px;
}
.build-modal.post-mode .build-modal-body {
    flex-direction: column;
}
.build-modal.post-mode .build-modal-sidebar {
    width: 100%;
    border-left: none;
    border-top: 1px solid rgba(255,255,255,.08);
}
/* Response-mode: medium width */
.build-modal.response-mode {
    max-width: 820px;
}
.build-modal.response-mode .build-modal-body {
    flex-direction: column;
}
.build-modal.response-mode .build-modal-sidebar {
    width: 100%;
    border-left: none;
    border-top: 1px solid rgba(255,255,255,.08);
}
.build-modal-open-page {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.1);
    color: rgba(255,255,255,.7);
    font-size: .78rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 10px;
    cursor: pointer;
    transition: all .2s;
    white-space: nowrap;
    flex-shrink: 0;
}
.build-modal-open-page:hover {
    background: rgba(255,255,255,.12);
    color: #fff;
}
.build-modal-open-page:disabled {
    opacity: .4;
    cursor: not-allowed;
}
.build-modal-open-page i { font-size: .72rem; }
.build-modal-header-actions {
    display: flex; align-items: center; gap: 8px;
    flex-shrink: 0;
}
.build-modal-close {
    background: transparent; border: none; color: #fff;
    font-size: 1.2rem; padding: 4px 8px; border-radius: 8px;
    transition: background .2s;
}
.build-modal-close:hover { background: rgba(255,255,255,.1); }
.build-modal-body {
    display: flex; flex: 1; overflow: hidden; min-height: 0;
}
.build-modal-preview {
    flex: 1; background: #fff; min-height: 300px;
}
.build-modal-preview iframe {
    width: 100%; height: 100%; border: none; display: block;
}
.build-modal-sidebar {
    width: 320px;
    border-left: 1px solid rgba(255,255,255,.08);
    display: flex; flex-direction: column;
    overflow-y: auto;
    flex-shrink: 0;
}
.build-modal-info {
    padding: 16px;
}
.build-modal-title {
    font-size: 1.1rem; font-weight: 700; margin-bottom: 6px;
}
.build-modal-desc {
    font-size: .85rem; color: rgba(255,255,255,.5); line-height: 1.4;
}
.build-modal-actions {
    display: flex; gap: 6px;
    padding: 8px 16px 12px;
    border-bottom: 1px solid rgba(255,255,255,.06);
}

/* Comments */
.comments-section {
    flex: 1; overflow-y: auto; padding: 12px 16px;
    display: flex; flex-direction: column; gap: 10px;
}
.comment-item {
    display: flex; gap: 8px;
}
.comment-avatar {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: rgba(255,255,255,.1);
    display: flex; align-items: center; justify-content: center;
    font-size: .65rem; font-weight: 700;
    flex-shrink: 0;
    background-size: cover; background-position: center;
}
.comment-body { flex: 1; min-width: 0; }
.comment-author {
    font-size: .8rem; font-weight: 600;
    cursor: pointer;
    display: inline;
    transition: color .15s;
}
.comment-author:hover { color: #818cf8; text-decoration: underline; }
.comment-text { font-size: .82rem; color: rgba(255,255,255,.7); margin-top: 2px; line-height: 1.35; }
.comment-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 3px;
}
.comment-time { font-size: .68rem; color: rgba(255,255,255,.3); }
.comment-reply-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,.3);
    font-size: .7rem;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color .15s;
}
.comment-reply-btn:hover { color: rgba(255,255,255,.6); }
.comment-reply-btn i { font-size: .6rem; }

/* Reply comments: smaller + indented */
.comment-item.is-reply {
    margin-left: 36px;
}
.comment-item.is-reply .comment-avatar {
    width: 22px; height: 22px;
    font-size: .55rem;
}
.comment-item.is-reply .comment-author { font-size: .74rem; }
.comment-item.is-reply .comment-text { font-size: .76rem; }
.comment-item.is-reply .comment-time { font-size: .62rem; }
.comment-item.is-reply .comment-reply-btn { font-size: .64rem; }

/* Comment delete button */
.comment-delete-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,.25);
    font-size: .65rem;
    cursor: pointer;
    padding: 0;
    transition: color .15s;
}
.comment-delete-btn:hover { color: #e74c3c; }
.comment-reply-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: .7rem;
    color: rgba(255,255,255,.35);
    margin-left: 6px;
}
.comment-reply-badge i { font-size: .58rem; }

/* Reply indicator bar */
.reply-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(129, 140, 248, .08);
    border-left: 3px solid #818cf8;
    font-size: .78rem;
    color: rgba(255,255,255,.6);
}
.reply-indicator i { color: #818cf8; font-size: .72rem; }
.reply-indicator strong { color: #a5b4fc; }
.reply-cancel-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,.3);
    cursor: pointer;
    font-size: .75rem;
    margin-left: auto;
    padding: 2px 4px;
    transition: color .15s;
}
.reply-cancel-btn:hover { color: #e74c3c; }

.comment-input-wrap {
    display: flex; gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid rgba(255,255,255,.08);
}
.comment-input {
    flex: 1;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.04);
    color: #fff;
    font-size: .85rem;
    outline: none;
}
.comment-send {
    background: #fff;
    color: #000;
    border: none;
    border-radius: 10px;
    padding: 8px 14px;
    font-weight: 700;
    font-size: .82rem;
    transition: opacity .2s;
}
.comment-send:hover { opacity: .85; }

/* ---------- Empty / Loading States ---------- */
.feed-empty {
    text-align: center;
    padding: 60px 20px;
    color: rgba(255,255,255,.3);
}
.feed-empty i { font-size: 2.5rem; margin-bottom: 12px; display: block; }
.feed-empty p { font-size: .95rem; }
.feed-login-btn {
    display: inline-flex; align-items: center; gap: 8px;
    margin-top: 18px; padding: 10px 28px;
    background: #fff; color: #000;
    border-radius: 999px; font-size: .95rem; font-weight: 600;
    text-decoration: none; transition: opacity .2s;
}
.feed-login-btn:hover { opacity: .85; }
.feed-login-btn i { font-size: .9rem; }

.feed-loader {
    text-align: center; padding: 30px;
    color: rgba(255,255,255,.3);
}
.feed-loader .spinner {
    width: 32px; height: 32px;
    border: 3px solid rgba(255,255,255,.1);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .7s linear infinite;
    margin: 0 auto 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes viewFadeIn {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes modalScaleIn {
    from { opacity: 0; transform: scale(.92) translateY(12px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes overlayFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes searchSlideIn {
    from { opacity: 0; transform: translateY(-24px); }
    to   { opacity: 1; transform: translateY(0); }
}
.feed-content {
    animation: viewFadeIn .35s cubic-bezier(.4,0,.2,1);
}

/* ---------- Toast ---------- */
.feed-toast {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
    background: #fff; color: #000;
    padding: 10px 24px;
    border-radius: 10px;
    font-size: .88rem; font-weight: 600;
    z-index: 9999;
    animation: slideUp .25s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,.5);
}

/* ---------- Mobile Hamburger ---------- */
/* (removed — using top nav now) */

/* ---------- Responsive ---------- */

/* Tablet & small desktop */
@media (max-width: 1024px) {
    .build-modal-sidebar {
        width: 280px;
    }
}

/* Mobile landscape / small tablets */
@media (max-width: 860px) {
    .feed-main {
        padding: 16px 16px 72px;
    }
    .top-nav {
        padding: 8px 10px;
    }
    .top-nav-tab {
        width: 38px; height: 38px;
        font-size: .82rem;
    }
    .top-nav-tab i {
        font-size: 1rem;
    }
    .top-nav-tab.active {
        padding: 0 14px;
    }
    .top-nav-tab.active span {
        max-width: 50px;
        font-size: .7rem;
    }

    /* Modal: stack preview + sidebar vertically */
    .build-modal {
        max-width: 100%;
        max-height: 95vh;
        border-radius: 14px;
    }
    .build-modal-body {
        flex-direction: column;
    }
    .build-modal-sidebar {
        width: 100%;
        max-height: 45vh;
        border-left: none;
        border-top: 1px solid rgba(255,255,255,.08);
    }
    .build-modal-preview {
        min-height: 220px;
        max-height: 45vh;
        flex: 1 1 auto;
    }
    .build-modal-open-page span {
        display: none;
    }

    /* Profile: stack vertically */
    .profile-header {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    .profile-stats {
        justify-content: center;
    }
    .profile-name-row {
        justify-content: center;
    }
    .profile-info {
        align-items: center;
    }
    .profile-follow-btn {
        width: 100%;
    }

    /* Overlay padding tighter */
    .build-modal-overlay {
        padding: 10px;
    }

    /* Post & response modal content in stacked mode */
    .post-modal-content,
    .response-modal-content {
        padding: 20px 16px;
        max-height: 45vh;
    }
    .post-modal-text {
        font-size: .95rem;
    }

    /* Compose modal responsive */
    .compose-post-modal {
        max-width: 95vw;
    }

    /* Search overlay */
    .search-overlay {
        padding-top: 60px;
    }
    .search-container {
        padding: 0 12px;
    }

    /* Profile options dropdown position */
    .profile-options-dropdown {
        right: auto;
        left: 0;
    }
}

/* Mobile portrait */
@media (max-width: 600px) {
    .feed-main {
        padding: 10px 10px 68px;
    }
    .top-nav {
        padding: 6px 6px;
    }
    .top-nav-tab {
        width: 36px; height: 36px;
        font-size: .8rem;
    }
    .top-nav-tab i {
        font-size: .95rem;
    }
    .top-nav-tab.active {
        padding: 0 12px;
    }
    .top-nav-tab.active span {
        max-width: 44px;
        margin-left: 5px;
        font-size: .66rem;
    }
    .create-dropdown {
        bottom: 58px;
    }

    /* View header */
    .view-header h2 {
        font-size: 1.25rem;
    }
    .view-header {
        margin-bottom: 16px;
    }

    /* Build cards: full-width flush style */
    .build-card {
        border-radius: 12px;
        margin-bottom: 14px;
    }
    .build-preview-wrap {
        height: 220px;
    }
    .build-card-header {
        padding: 12px 14px 8px;
    }
    .build-card-title {
        padding: 0 14px 6px;
        font-size: .98rem;
    }
    .build-card-desc {
        padding: 0 14px 8px;
        font-size: .82rem;
    }
    .build-actions {
        padding: 8px 10px 12px;
        gap: 2px;
    }
    .build-action-btn {
        padding: 6px 8px;
        font-size: .8rem;
    }

    /* Profile avatar smaller on mobile */
    .profile-avatar {
        width: 72px; height: 72px;
        font-size: 1.6rem;
    }
    .profile-name {
        font-size: 1.15rem;
    }
    .profile-stats {
        gap: 16px;
    }
    .profile-stat-value {
        font-size: 1rem;
    }

    /* Modal: almost fullscreen */
    .build-modal-overlay {
        padding: 0;
    }
    .build-modal {
        border-radius: 0;
        max-height: 100dvh;
        height: 100dvh;
        max-width: 100%;
    }
    /* Post-mode: centered card, not fullscreen */
    .build-modal.post-mode {
        border-radius: 18px;
        max-height: 85vh;
        height: auto;
        max-width: 94vw;
        margin: auto;
    }
    .build-modal.response-mode {
        border-radius: 18px;
        max-height: 90vh;
        height: auto;
        max-width: 94vw;
        margin: auto;
    }
    .build-modal-header {
        padding: max(10px, env(safe-area-inset-top, 10px)) 12px 10px;
    }
    .build-modal-preview {
        min-height: 180px;
        flex: 1 1 auto;
    }
    .build-modal-sidebar {
        max-height: 50vh;
    }
    .build-modal-open-page {
        padding: 5px 10px;
        font-size: .72rem;
    }
    .build-modal-info {
        padding: 12px 14px;
    }
    .build-modal-title {
        font-size: 1rem;
    }
    .comments-section {
        padding: 10px 14px;
    }
    .comment-input-wrap {
        padding: 10px 14px;
    }

    /* Create form */
    .create-preview {
        height: 240px;
    }
    .create-textarea {
        min-height: 100px;
    }
    .create-actions {
        justify-content: stretch;
    }
    .btn-publish {
        width: 100%;
        text-align: center;
    }

    /* Comment reply indent smaller on mobile */
    .comment-item.is-reply {
        margin-left: 24px;
    }

    /* Toast */
    .feed-toast {
        left: 12px; right: 12px;
        transform: none;
        text-align: center;
        font-size: .82rem;
        padding: 10px 16px;
        bottom: 16px;
    }
}

/* Very small screens */
@media (max-width: 380px) {
    .feed-main {
        padding: 6px 6px 64px;
    }
    .top-nav {
        padding: 4px 4px;
    }
    .top-nav-tab {
        width: 34px; height: 34px;
    }
    .top-nav-tab i {
        font-size: .9rem;
    }
    .top-nav-tab.active {
        padding: 0 10px;
    }
    .top-nav-tab.active span {
        max-width: 38px;
        font-size: .62rem;
    }
    .build-card {
        border-radius: 0;
        margin-bottom: 10px;
        border-left: none;
        border-right: none;
    }
    .build-preview-wrap {
        height: 180px;
    }
    .build-actions {
        flex-wrap: wrap;
        gap: 4px;
    }
    .build-action-btn {
        font-size: .75rem;
        padding: 5px 7px;
    }
    .profile-header {
        padding: 16px 0;
    }
    .profile-avatar {
        width: 60px; height: 60px;
        font-size: 1.3rem;
    }
    .comment-item.is-reply {
        margin-left: 16px;
    }
    .compose-post-modal {
        margin: 0 6px;
    }
    .search-overlay {
        padding-top: 16px;
    }
}

/* ===========================================
   RESPONSE CARDS – Feed
   =========================================== */

/* Response badge */
.response-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 6px;
    margin-bottom: 8px;
}
.response-badge i {
    font-size: .68rem;
}

/* Response caption (description) */
.response-caption {
    color: rgba(255,255,255,.65);
    font-size: .85rem;
    margin-bottom: 10px;
    line-height: 1.4;
}

/* Response content area (clickable) */
.response-content {
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease;
}
.response-content:hover {
    border-color: rgba(99, 102, 241, .3);
    background: rgba(99, 102, 241, .06);
}

/* Question row */
.response-question {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 12px;
}
.response-q-icon {
    color: #818cf8;
    font-size: .8rem;
    margin-top: 2px;
    flex-shrink: 0;
}
.response-q-text {
    color: rgba(255,255,255,.75);
    font-size: .88rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Answer bubble */
.response-answer-bubble {
    background: rgba(99, 102, 241, .12);
    border: 1px solid rgba(99, 102, 241, .2);
    border-radius: 14px 14px 14px 4px;
    padding: 12px 16px;
    margin-left: 8px;
}
.response-a-text {
    color: rgba(255,255,255,.85);
    font-size: .85rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===========================================
   RESPONSE DETAIL MODAL
   =========================================== */
.response-modal-content {
    flex: 1;
    min-width: 0;
    padding: 32px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.response-modal-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.response-modal-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 8px;
    align-self: flex-start;
}

.response-modal-question-wrap,
.response-modal-answer-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.response-modal-q-label,
.response-modal-a-label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255,255,255,.5);
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.response-modal-q-label i,
.response-modal-a-label i {
    color: #818cf8;
}

.response-modal-q-text {
    color: rgba(255,255,255,.85);
    font-size: 1.05rem;
    line-height: 1.5;
    padding: 16px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 12px;
}

.response-modal-a-bubble {
    background: rgba(99, 102, 241, .1);
    border: 1px solid rgba(99, 102, 241, .2);
    border-radius: 16px 16px 16px 4px;
    padding: 20px 24px;
    color: rgba(255,255,255,.9);
    font-size: .95rem;
    line-height: 1.65;
    white-space: pre-wrap;
    word-break: break-word;
}

/* When modal shows response, adjust layout */
.build-modal-body:has(.response-modal-content[style*="display: none"]) .build-modal-preview { display: flex; }
.build-modal-body:has(.response-modal-content:not([style*="display: none"])) .build-modal-sidebar { max-width: 360px; }

/* Mobile adjustments for response modal */
@media (max-width: 768px) {
    .response-modal-content {
        padding: 20px 16px;
        gap: 16px;
    }
    .response-modal-q-text {
        font-size: .95rem;
        padding: 12px;
    }
    .response-modal-a-bubble {
        padding: 14px 16px;
        font-size: .88rem;
    }
}

/* ===========================================
   SHARE RESPONSE MODAL (in chat.html)
   =========================================== */
.share-response-preview {
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 300px;
    overflow-y: auto;
}
.share-response-q-label,
.share-response-a-label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255,255,255,.45);
    font-size: .7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.share-response-q-label i,
.share-response-a-label i {
    color: #818cf8;
}
.share-response-q-text {
    color: rgba(255,255,255,.8);
    font-size: .9rem;
    line-height: 1.4;
}
.share-response-a-text {
    background: rgba(99, 102, 241, .1);
    border: 1px solid rgba(99, 102, 241, .15);
    border-radius: 10px 10px 10px 4px;
    padding: 10px 14px;
    color: rgba(255,255,255,.85);
    font-size: .85rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Share response button on AI messages in chat */
.share-response-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: transparent;
    border: none;
    color: rgba(255,255,255,.2);
    font-size: .8rem;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
    transition: color .2s, background .2s;
    z-index: 2;
}
.share-response-btn:hover {
    color: #818cf8;
    background: rgba(99, 102, 241, .1);
}
/* Make AI messages position:relative so the share btn is positioned inside them */
.message.ai-message {
    position: relative;
}

/* ===========================================
   POST CARD (tweet-like, text only)
   =========================================== */

/* Post badge */
.post-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(34, 197, 94, .12);
    color: #22c55e;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 6px;
    margin-bottom: 8px;
}
.post-badge i {
    font-size: .68rem;
}

/* Post text content */
.post-text-content {
    color: rgba(255,255,255,.88);
    font-size: .95rem;
    line-height: 1.6;
    padding: 14px 16px 12px;
    margin-bottom: 4px;
    white-space: pre-wrap;
    word-break: break-word;
    cursor: pointer;
    transition: color .2s ease;
}
.post-text-content:hover {
    color: rgba(255,255,255,1);
}

/* ===========================================
   POST DETAIL MODAL
   =========================================== */
.post-modal-content {
    flex: 1;
    min-width: 0;
    padding: 32px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.post-modal-author {
    display: flex;
    align-items: center;
    gap: 12px;
}
.post-modal-text {
    color: rgba(255,255,255,.9);
    font-size: 1.05rem;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
}

/* ===========================================
   COMPOSE POST MODAL
   =========================================== */
.compose-post-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.7);
    backdrop-filter: blur(6px);
    z-index: 10000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: min(15vh, 120px);
    animation: overlayFadeIn .25s ease;
}
.compose-post-modal {
    background: #1a1a1a;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 20px;
    width: 100%;
    max-width: 560px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 80px rgba(0,0,0,.6);
    animation: modalScaleIn .3s cubic-bezier(.4,0,.2,1);
}
/* Top bar – just the X */
.compose-post-topbar {
    display: flex;
    align-items: center;
    padding: 12px 16px 0;
}
.compose-post-close {
    background: transparent;
    border: none;
    color: rgba(255,255,255,.5);
    font-size: 1.15rem;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 50%;
    transition: color .2s, background .2s;
    line-height: 1;
}
.compose-post-close:hover {
    color: #fff;
    background: rgba(255,255,255,.1);
}
/* Body – avatar + textarea side by side */
.compose-post-body {
    display: flex;
    gap: 12px;
    padding: 16px 16px 8px;
}
.compose-post-avatar {
    width: 42px; height: 42px;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    font-weight: 700;
    color: #fff;
    overflow: hidden;
}
.compose-post-avatar img {
    width: 100%; height: 100%;
    object-fit: cover;
}
.compose-post-input-area {
    flex: 1;
    min-width: 0;
}
.compose-post-textarea {
    width: 100%;
    min-height: 120px;
    max-height: 320px;
    resize: none;
    background: transparent;
    border: none;
    color: rgba(255,255,255,.95);
    font-size: 1.1rem;
    line-height: 1.55;
    padding: 8px 0;
    font-family: inherit;
    box-sizing: border-box;
}
.compose-post-textarea::placeholder {
    color: rgba(255,255,255,.3);
    font-size: 1.1rem;
}
.compose-post-textarea:focus {
    outline: none;
}
/* Footer – char count left, publish right */
.compose-post-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-top: 1px solid rgba(255,255,255,.06);
}
.compose-post-charcount {
    font-size: .75rem;
    color: rgba(255,255,255,.3);
}
.compose-post-publish {
    background: #fff;
    border: none;
    color: #000;
    padding: 8px 24px;
    border-radius: 50px;
    font-size: .88rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity .2s;
}
.compose-post-publish:hover {
    opacity: .85;
}
.compose-post-publish:disabled {
    opacity: .4;
    cursor: not-allowed;
}

.view-header {
    position: relative;
}

/* ===== Search button in view header ===== */
.feed-search-btn {
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.12);
    color: rgba(255,255,255,.6);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: .95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}
.feed-search-btn:hover {
    background: rgba(255,255,255,.14);
    color: #fff;
}

/* ===== Notification Items ===== */
.notif-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.notif-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.06);
    transition: background .15s;
    cursor: pointer;
}
.notif-item:hover {
    background: rgba(255,255,255,.07);
}
.notif-avatar {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,.12);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: .8rem;
    overflow: hidden;
    background-size: cover; background-position: center;
    flex-shrink: 0;
}
.notif-body {
    flex: 1;
    min-width: 0;
}
.notif-text {
    font-size: .88rem;
    color: rgba(255,255,255,.8);
    line-height: 1.4;
}
.notif-text strong {
    color: #fff;
    font-weight: 600;
}
.notif-time {
    font-size: .72rem;
    color: rgba(255,255,255,.35);
    margin-top: 2px;
}
.notif-icon {
    width: 28px; height: 28px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: .7rem;
    flex-shrink: 0;
}
.notif-icon.notif-like {
    background: rgba(239,68,68,.15);
    color: #ef4444;
}
.notif-icon.notif-comment {
    background: rgba(99,102,241,.15);
    color: #818cf8;
}
.notif-icon.notif-repost {
    background: rgba(34,197,94,.15);
    color: #22c55e;
}

/* ===== Search Overlay ===== */
.search-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.7);
    backdrop-filter: blur(6px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    padding-top: 80px;
    animation: overlayFadeIn .25s ease;
}

/* ===== Follow Requests ===== */
.follow-requests-header {
    font-size: .95rem; font-weight: 700; color: #818cf8;
    padding: 12px 16px 8px; display: flex; align-items: center; gap: 8px;
}
.fr-count {
    background: #818cf8; color: #000; border-radius: 10px;
    padding: 1px 8px; font-size: .72rem; font-weight: 700;
}
.follow-requests-list {
    display: flex; flex-direction: column; gap: 2px; margin-bottom: 16px;
}
.fr-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px; border-radius: 12px;
    background: rgba(129,140,248,.06); border: 1px solid rgba(129,140,248,.12);
    transition: background .15s; cursor: pointer;
}
.fr-item:hover { background: rgba(129,140,248,.1); }
.fr-item.fr-done { opacity: .6; cursor: default; justify-content: center; padding: 10px 16px; }
.fr-info { flex: 1; min-width: 0; }
.fr-name { font-size: .9rem; font-weight: 600; color: #fff; }
.fr-username { font-size: .78rem; color: rgba(255,255,255,.4); }
.fr-actions { display: flex; gap: 8px; flex-shrink: 0; }
.fr-accept {
    width: 36px; height: 36px; border-radius: 50%;
    background: rgba(34,197,94,.15); color: #22c55e;
    border: 1px solid rgba(34,197,94,.25);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all .15s; font-size: .85rem;
}
.fr-accept:hover { background: rgba(34,197,94,.3); }
.fr-reject {
    width: 36px; height: 36px; border-radius: 50%;
    background: rgba(239,68,68,.12); color: #ef4444;
    border: 1px solid rgba(239,68,68,.2);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all .15s; font-size: .85rem;
}
.fr-reject:hover { background: rgba(239,68,68,.25); }
.fr-accepted { color: #22c55e; font-size: .85rem; font-weight: 600; }
.fr-rejected { color: rgba(255,255,255,.4); font-size: .85rem; font-weight: 600; }
.profile-follow-btn.request-pending {
    background: transparent; color: rgba(255,255,255,.5);
    border: 1px solid rgba(255,255,255,.2); font-weight: 600;
}
.profile-follow-btn.request-pending:hover {
    border-color: rgba(239,68,68,.5); color: #ef4444;
}

.search-container {
    width: 100%;
    max-width: 560px;
    padding: 0 16px;
    animation: searchSlideIn .3s cubic-bezier(.4,0,.2,1);
}
.search-input-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #1a1a1a;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 14px;
    padding: 10px 16px;
    margin-bottom: 8px;
}
.search-input-wrap i {
    color: rgba(255,255,255,.4);
    font-size: 1rem;
}
.search-input-wrap input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: #fff;
    font-size: .95rem;
}
.search-input-wrap input::placeholder {
    color: rgba(255,255,255,.3);
}
.search-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
}
.search-tab {
    padding: 6px 16px;
    border-radius: 8px;
    background: rgba(255,255,255,.06);
    border: none;
    color: rgba(255,255,255,.5);
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
}
.search-tab.active {
    background: rgba(255,255,255,.14);
    color: #fff;
}
.search-results {
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 4px;
}
.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    cursor: pointer;
    transition: background .15s;
}
.search-result-item:hover {
    background: rgba(255,255,255,.06);
}
.search-result-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,.1);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: .9rem;
    color: rgba(255,255,255,.6);
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
}
.search-result-info {
    flex: 1;
    min-width: 0;
}
.search-result-name {
    font-size: .88rem;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 4px;
}
.search-result-handle {
    font-size: .78rem;
    color: rgba(255,255,255,.4);
}
.search-result-preview {
    font-size: .82rem;
    color: rgba(255,255,255,.45);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}
.search-result-type {
    font-size: .68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: 3px 8px;
    border-radius: 5px;
    flex-shrink: 0;
}
.search-result-type.type-profile {
    background: rgba(129,140,248,.15);
    color: #818cf8;
}
.search-result-type.type-post {
    background: rgba(34,197,94,.12);
    color: #22c55e;
}
.search-result-type.type-build {
    background: rgba(251,191,36,.12);
    color: #fbbf24;
}
.search-result-type.type-response {
    background: rgba(96,165,250,.12);
    color: #60a5fa;
}
.search-empty {
    text-align: center;
    padding: 32px 16px;
    color: rgba(255,255,255,.35);
    font-size: .85rem;
}
.search-empty i {
    font-size: 1.6rem;
    margin-bottom: 8px;
    display: block;
}

/* ===== Guest Auth Prompt ===== */
.guest-prompt-overlay {
    position: fixed;
    inset: 0;
    z-index: 10001;
    background: rgba(0,0,0,.65);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: guestFadeIn .3s ease;
}
@keyframes guestFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.guest-prompt-modal {
    background: #fff;
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 20px;
    width: 380px;
    max-width: 90vw;
    padding: 36px 30px 30px;
    text-align: center;
    position: relative;
    box-shadow: 0 24px 80px rgba(0,0,0,.25);
    animation: modalScaleIn .35s cubic-bezier(.4,0,.2,1);
}
@keyframes guestSlideUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}
/* Close button rimosso — il popup è permanente per utenti non loggati */
.guest-prompt-icon {
    width: 56px; height: 56px;
    border-radius: 16px;
    background: #000;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 18px;
    font-size: 1.4rem;
    color: #fff;
    box-shadow: 0 8px 24px rgba(0,0,0,.2);
}
.guest-prompt-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111;
    margin: 0 0 10px;
}
.guest-prompt-desc {
    font-size: .88rem;
    color: rgba(0,0,0,.5);
    line-height: 1.5;
    margin: 0 0 24px;
}
.guest-prompt-actions {
    display: flex;
    gap: 10px;
}
.guest-prompt-btn {
    flex: 1;
    padding: 12px 0;
    border-radius: 12px;
    font-size: .9rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: transform .15s, box-shadow .2s;
    cursor: pointer;
}
.guest-prompt-btn:hover {
    transform: translateY(-1px);
}
.guest-prompt-login {
    background: transparent;
    border: 1px solid rgba(0,0,0,.15);
    color: #111;
}
.guest-prompt-login:hover {
    border-color: rgba(0,0,0,.35);
    box-shadow: 0 4px 16px rgba(0,0,0,.08);
}
.guest-prompt-register {
    background: #111;
    border: none;
    color: #fff;
    box-shadow: 0 4px 18px rgba(0,0,0,.2);
}
.guest-prompt-register:hover {
    background: #000;
    box-shadow: 0 8px 28px rgba(0,0,0,.3);
}
@media (max-width: 480px) {
    .guest-prompt-modal {
        padding: 28px 20px 24px;
    }
    .guest-prompt-actions {
        flex-direction: column;
    }
}

/* ===== Clickable @mention ===== */
.mention-link {
    color: #818cf8;
    cursor: pointer;
    font-weight: 600;
    transition: color .15s;
}
.mention-link:hover {
    color: #a5b4fc;
    text-decoration: underline;
}

/* ===== Policy/Cookie Banner (feed) ===== */
.policy-banner {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translate3d(-50%, 28px, 0);
    width: min(460px, calc(100% - 64px));
    padding: 22px 24px 20px;
    border-radius: 20px;
    color: #fff;
    background: rgba(18, 18, 18, .95);
    border: 1px solid rgba(255, 255, 255, .12);
    -webkit-backdrop-filter: blur(22px);
    backdrop-filter: blur(22px);
    box-shadow: 0 18px 45px rgba(0,0,0,.5), 0 10px 25px rgba(0,0,0,.25);
    display: flex;
    flex-direction: column;
    gap: 14px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .3s ease, transform .3s ease;
    z-index: 9999;
    overflow: hidden;
}
.policy-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(255,255,255,.06), transparent 60%);
    pointer-events: none;
}
.policy-banner-show {
    opacity: 1;
    transform: translate3d(-50%, 0, 0);
    visibility: visible;
    pointer-events: auto;
}
.policy-banner-hide {
    opacity: 0;
    transform: translate3d(-50%, 22px, 0);
    pointer-events: none;
}
.policy-banner-text {
    position: relative;
    font-size: .92rem;
    margin: 0;
    line-height: 1.6;
    color: rgba(255,255,255,.8);
}
.policy-banner-text a {
    color: #fff;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: rgba(255,255,255,.4);
    text-underline-offset: 2px;
}
.policy-banner-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}
.policy-banner-btn {
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 9px 20px;
    font-size: .88rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.policy-banner-btn.primary {
    background: #fff;
    color: #000;
    box-shadow: 0 4px 12px rgba(255,255,255,.15);
}
.policy-banner-btn.primary:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(255,255,255,.25); }
.policy-banner-btn.secondary {
    background: transparent;
    color: rgba(255,255,255,.7);
    border-color: rgba(255,255,255,.2);
}
.policy-banner-btn.secondary:hover { background: rgba(255,255,255,.1); color: #fff; }
.policy-banner-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: .82rem;
    position: relative;
}
.policy-banner-links a {
    color: rgba(255,255,255,.5);
    font-weight: 600;
}
.policy-banner-links a:hover { color: #fff; text-decoration: underline; }

@media (max-width: 600px) {
    .policy-banner {
        bottom: 72px;
        width: calc(100% - 28px);
        padding: 20px 18px 16px;
        border-radius: 16px;
    }
    .policy-banner-actions { flex-direction: column; align-items: stretch; }
    .policy-banner-btn.primary, .policy-banner-btn.secondary { width: 100%; text-align: center; }
}
