/* ── Sawa Zone – Shared Stylesheet ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800;900&display=swap');

:root {
    --bg:          #0a1628;
    --bg2:         #111827;
    --card:        rgba(15,23,42,.92);
    --card-border: rgba(51,65,85,.5);
    --orange:      #ea580c;
    --orange-2:    #f97316;
    --orange-soft: rgba(234,88,12,.15);
    --orange-glow: rgba(234,88,12,.35);
    --text:        #f8fafc;
    --text-2:      #cbd5e1;
    --text-3:      #94a3b8;
    --text-4:      #64748b;
    --success:     #22c55e;
    --error:       #ef4444;
    --radius:      14px;
    --nav-h:       74px;
}

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

/* Prevent iOS Safari from auto-zooming on input focus */
input, textarea, select { font-size: 16px; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Cairo', sans-serif;
    background: linear-gradient(135deg, #0a1628 0%, #1a2332 50%, #0a1628 100%);
    min-height: 100vh;
    color: var(--text);
    direction: rtl;
    -webkit-font-smoothing: antialiased;
    padding-top: var(--nav-h);
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--orange); border-radius: 99px; }

/* ── Navigation ──────────────────────────────────────────────────────────── */
.sawa-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--nav-h);
    background: linear-gradient(90deg, #ea580c 0%, #f97316 50%, #ea580c 100%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 999;
}
.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    gap: 12px;
}
.sawa-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    color: #fff;
}
.sawa-logo span { color: #fff; }
.sawa-logo-img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
.nav-notif-wrap { position: relative; }
.nav-notif-btn {
    position: relative;
    border: none;
    background: rgba(255,255,255,.12);
    color: #fff;
    border-radius: 10px;
    width: 36px;
    height: 36px;
    font-size: 18px;
    cursor: pointer;
}
.nav-notif-btn:hover { background: rgba(255,255,255,.2); }
.nav-notif-badge {
    position: absolute;
    top: -6px;
    left: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #dc2626;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.nav-notif-panel {
    position: fixed;
    width: 310px;
    max-width: calc(100vw - 24px);
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 16px 40px rgba(15, 23, 42, .3);
    z-index: 99999;
    animation: srchDrop .16s ease forwards;
}
.notif-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid #f1f5f9;
    background: #fff7ed;
}
.notif-head span { color: #9a3412; font-weight: 800; font-size: 13px; }
.notif-head a { color: #ea580c; font-size: 12px; font-weight: 700; }
.notif-item {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid #f1f5f9;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: #fff7ed; }
.notif-av {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #e2e8f0;
}
.notif-av-fb {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ea580c;
    color: #fff;
    font-size: 14px;
    font-weight: 800;
}
.notif-text { display: flex; flex-direction: column; min-width: 0; }
.notif-name { color: #0f172a; font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notif-sub { color: #64748b; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notif-empty { color: #64748b; font-size: 13px; text-align: center; padding: 16px; }
.nav-link {
    font-size: 20px;
    opacity: .95;
    color: #fff;
    transition: opacity .2s, background .2s;
    padding: 8px 10px;
    border-radius: 8px;
}
.nav-link:hover { opacity: 1; background: rgba(255,255,255,.14); }
.nav-logout {
    font-size: 13px;
    color: rgba(255,255,255,.92);
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,.4);
    transition: all .2s;
}
.nav-logout:hover { border-color: #fff; color: #fff; background: rgba(255,255,255,.14); }

.nav-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--orange);
    transition: transform .2s;
}
.nav-avatar:hover { transform: scale(1.08); }
.nav-avatar-fallback {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--orange);
    color: #fff;
    font-weight: 800;
    font-size: 16px;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid rgba(255,255,255,.65);
}

/* ── Nav Search ─────────────────────────────────────────────────────────── */
.nav-search-wrap {
    position: relative;
    flex: 1;
    max-width: 340px;
    min-width: 0;
}
.nav-search-inner {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid transparent;
    border-radius: 25px;
    padding: 0 14px;
    transition: border-color .2s, background .2s;
}
.nav-search-wrap:focus-within .nav-search-inner {
    background: #fff;
    border-color: rgba(10, 22, 40, .25);
}
.nav-search-icon {
    font-size: 15px;
    opacity: .8;
    color: #64748b;
    flex-shrink: 0;
    pointer-events: none;
}
.nav-search-input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: #1f2937;
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 0;
    min-width: 0;
}
.nav-search-input::placeholder { color: #94a3b8; font-weight: 400; }

/* ── Results dropdown ── */
.nav-search-results {
    position: fixed;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 16px 40px rgba(15, 23, 42, .3);
    z-index: 99999;
    min-width: 280px;
    max-height: 70vh;
    overflow-y: auto;
}
.nav-search-results.srch-visible {
    animation: srchDrop .16s ease forwards;
}
@keyframes srchDrop {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.srch-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    text-decoration: none;
    color: #0f172a;
    transition: background .15s;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
}
.srch-item:last-child { border-bottom: none; }
.srch-item:hover,
.srch-item:focus     { background: #fff7ed; outline: none; }
.srch-av {
    width: 40px; height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid #e2e8f0;
}
.srch-av-fb {
    background: var(--orange);
    color: #fff;
    font-weight: 800;
    font-size: 16px;
    display: flex; align-items: center; justify-content: center;
}
.srch-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
    overflow: hidden;
}
.srch-name {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.srch-user {
    font-size: 12px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.srch-item mark {
    background: none;
    color: var(--orange-2);
    font-weight: 900;
}
.srch-empty {
    padding: 18px 16px;
    text-align: center;
    color: #64748b;
    font-size: 14px;
}

/* ── Responsive search ── */
@media (max-width: 600px) {
    .nav-search-wrap { max-width: 100%; order: 3; flex-basis: 100%; }
    .nav-inner { flex-wrap: wrap; height: auto; padding: 10px 14px 10px; gap: 8px; }
    :root { --nav-h: 120px; }
    .sawa-nav { height: auto; }
    .nav-search-results { width: calc(100vw - 24px) !important; }
    .nav-notif-panel { width: calc(100vw - 24px) !important; }
}

/* ── Follow requests page ───────────────────────────────────────────────── */
.requests-card {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    overflow: hidden;
}
.requests-title {
    font-size: 15px;
    color: var(--orange-2);
    padding: 14px 16px;
    border-bottom: 1px solid var(--card-border);
    font-weight: 800;
}
.request-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--card-border);
}
.request-row:last-child { border-bottom: none; }
.request-user { display: flex; align-items: center; gap: 10px; min-width: 0; }
.request-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(148,163,184,.35);
}
.request-avatar-fb {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--orange);
    color: #fff;
    font-weight: 800;
}
.request-info { display: flex; flex-direction: column; min-width: 0; }
.request-name {
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.request-sub { color: var(--text-3); font-size: 12px; }
.request-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}
.badge-green { background: #14532d; color: #bbf7d0; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn-orange, .btn-orange-sm, .btn-outline, .btn-outline-sm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: none;
    border-radius: 10px;
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
    cursor: pointer;
    transition: transform .18s, box-shadow .18s, opacity .18s;
    text-decoration: none;
}
.btn-orange {
    background: linear-gradient(135deg, var(--orange), var(--orange-2));
    color: #fff;
    padding: 13px 28px;
    font-size: 15px;
    box-shadow: 0 6px 22px var(--orange-glow);
}
.btn-orange:hover  { transform: translateY(-2px); box-shadow: 0 10px 28px var(--orange-glow); }
.btn-orange:active { transform: translateY(0); }

.btn-orange-sm {
    background: linear-gradient(135deg, var(--orange), var(--orange-2));
    color: #fff;
    padding: 8px 18px;
    font-size: 13px;
    border-radius: 8px;
}
.btn-orange-sm:hover { opacity: .9; }

.btn-outline {
    background: transparent;
    color: var(--text);
    border: 2px solid var(--card-border);
    padding: 12px 26px;
    font-size: 15px;
}
.btn-outline:hover { border-color: var(--orange); color: var(--orange-2); }

.btn-outline-sm {
    background: transparent;
    color: var(--text-2);
    border: 1px solid var(--card-border);
    padding: 7px 16px;
    font-size: 13px;
    border-radius: 8px;
}
.btn-outline-sm:hover { border-color: var(--orange); color: var(--orange-2); }

.btn-danger {
    background: rgba(239,68,68,.15);
    color: var(--error);
    border: 1px solid rgba(239,68,68,.3);
    padding: 7px 16px;
    font-size: 13px;
    border-radius: 8px;
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s;
}
.btn-danger:hover { background: rgba(239,68,68,.25); }

.btn-full { width: 100%; }

/* ── Forms ───────────────────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 7px; }
.form-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-2);
}
.form-input, .form-textarea {
    background: rgba(15,23,42,.8);
    border: 1.5px solid var(--card-border);
    border-radius: 10px;
    padding: 12px 14px;
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
    color: var(--text);
    outline: none;
    transition: border-color .2s;
    width: 100%;
}
.form-input:focus, .form-textarea:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 3px var(--orange-soft);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-4); }
.form-textarea { resize: vertical; min-height: 90px; }

.form-hint {
    font-size: 12px;
    color: var(--text-4);
    margin-top: -2px;
}

/* ── Alerts ──────────────────────────────────────────────────────────────── */
.alert {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
}
.alert-error   { background: rgba(239,68,68,.15);  border: 1px solid rgba(239,68,68,.35);  color: #fca5a5; }
.alert-success { background: rgba(34,197,94,.15);  border: 1px solid rgba(34,197,94,.35);  color: #86efac; }
.alert-info    { background: var(--orange-soft);   border: 1px solid rgba(234,88,12,.35);  color: #fdba74; }

/* ── Card ────────────────────────────────────────────────────────────────── */
.sawa-card {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 24px;
}

/* ── Auth pages ──────────────────────────────────────────────────────────── */
.auth-wrap {
    min-height: calc(100vh - var(--nav-h));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}
.auth-card {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 36px 32px;
    width: 100%;
    max-width: 440px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}
.auth-title {
    font-size: 26px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--orange), var(--orange-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.auth-sub { color: var(--text-3); font-size: 14px; margin-top: -14px; }

/* ── Profile header ──────────────────────────────────────────────────────── */
.profile-cover-wrap {
    position: relative;
    height: 220px;
    background: linear-gradient(135deg, #0a1628, #1e293b, #0a1628);
    overflow: hidden;
    border-radius: 0 0 20px 20px;
}
.profile-cover-img {
    width: 100%; height: 100%;
    object-fit: cover;
}
.profile-cover-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10,22,40,.85) 0%, transparent 60%);
}
.profile-header-card {
    max-width: 680px;
    margin: -50px auto 0;
    padding: 0 16px;
    position: relative;
    z-index: 2;
}
.profile-avatar-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
}
.profile-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}
.profile-avatar {
    width: 100px; height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--orange);
    background: var(--bg2);
    box-shadow: 0 0 0 4px var(--bg);
}
.profile-avatar-fallback {
    width: 100px; height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--orange), var(--orange-2));
    border: 4px solid var(--bg);
    display: flex; align-items: center; justify-content: center;
    font-size: 38px;
    font-weight: 900;
    color: #fff;
    box-shadow: 0 0 0 4px var(--bg);
}
.profile-info {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 14px 18px 18px;
    margin-top: 12px;
}
.profile-name {
    font-size: 22px;
    font-weight: 900;
    color: var(--text);
    line-height: 1.2;
}
.profile-username {
    font-size: 14px;
    color: var(--text-3);
    margin-top: 2px;
}
.profile-bio {
    font-size: 14px;
    color: var(--text-2);
    line-height: 1.7;
    margin-top: 10px;
    white-space: pre-wrap;
}
.profile-stats {
    display: flex;
    gap: 20px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--card-border);
}
.profile-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}
.profile-stat .num {
    font-size: 18px;
    font-weight: 800;
    color: var(--orange-2);
}
.profile-stat .lbl {
    font-size: 12px;
    color: var(--text-3);
}

/* ── Post composer ───────────────────────────────────────────────────────── */
.composer {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.composer-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.composer-avatar {
    width: 42px; height: 42px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid var(--orange);
}
.composer-avatar-fallback {
    width: 42px; height: 42px;
    border-radius: 50%;
    background: var(--orange);
    color: #fff;
    font-weight: 800;
    font-size: 18px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    border: 2px solid var(--orange-2);
}
.composer-textarea {
    flex: 1;
    background: rgba(15,23,42,.6);
    border: 1.5px solid var(--card-border);
    border-radius: 10px;
    padding: 12px;
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
    color: var(--text);
    resize: none;
    outline: none;
    min-height: 80px;
    transition: border-color .2s;
}
.composer-textarea:focus { border-color: var(--orange); }
.composer-textarea::placeholder { color: var(--text-4); }

.composer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}
.composer-images-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: 8px;
    margin-top: 4px;
}
.composer-img-thumb {
    aspect-ratio: 1;
    border-radius: 8px;
    object-fit: cover;
    width: 100%;
    border: 2px solid var(--card-border);
}

.upload-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-3);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid var(--card-border);
    transition: all .2s;
}
.upload-label:hover { border-color: var(--orange); color: var(--orange-2); }

/* ── Post card ───────────────────────────────────────────────────────────── */
.post-card {
    background: linear-gradient(160deg, #d4d8e0 0%, #e8ecf2 55%, #d0d5de 100%);
    border: 1px solid rgba(180,188,204,.6);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color .2s, box-shadow .2s;
}
.post-card:hover {
    border-color: rgba(234,88,12,.45);
    box-shadow: 0 4px 24px rgba(10,22,40,.18);
}

.post-card-header {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 14px 16px 0;
}
.post-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid var(--orange);
}
.post-avatar-fallback {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--orange), var(--orange-2));
    color: #fff;
    font-weight: 900;
    font-size: 16px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.post-meta { flex: 1; min-width: 0; }
.post-meta-name {
    font-weight: 800;
    font-size: 14px;
    color: #0f1f3a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.post-meta-name a { color: #0f1f3a; }
.post-meta-name a:hover { color: var(--orange); }
.post-meta-time { font-size: 12px; color: #3d5070; margin-top: 1px; }

.post-content {
    padding: 12px 16px;
    font-size: 15px;
    color: #1a2f4a;
    line-height: 1.75;
    white-space: pre-wrap;
    word-break: break-word;
}

.post-images {
    display: grid;
    gap: 4px;
    overflow: hidden;
    padding: 0 10px 10px;
}
.post-images.count-1 { grid-template-columns: 1fr; }
.post-images.count-2 { grid-template-columns: 1fr 1fr; }
.post-images.count-3 { grid-template-columns: 1fr 1fr; }
.post-images.count-3 .post-img:first-child { grid-column: 1/-1; }
.post-images.count-4 { grid-template-columns: 1fr 1fr; }
.post-images.count-5 .post-img:nth-child(n+4) { display: none; }
.post-images.count-5 { grid-template-columns: 1fr 1fr; }
.post-images.count-6 { grid-template-columns: 1fr 1fr 1fr; }

.post-img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    cursor: pointer;
    border: 3px solid #0a1628;
    border-radius: 8px;
    transition: filter .2s, border-color .2s;
}
.post-img:hover { filter: brightness(1.08); border-color: #1e3a5f; }

.post-card-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 10px 14px;
    border-top: 1px solid rgba(160,172,196,.4);
    gap: 8px;
}

/* ── Feed layout ─────────────────────────────────────────────────────────── */
.feed-wrap {
    max-width: 680px;
    margin: 0 auto;
    padding: 24px 16px 60px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ── Profile page layout ─────────────────────────────────────────────────── */
.profile-wrap {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 0 60px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.profile-posts-area {
    padding: 0 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* ── Image lightbox ──────────────────────────────────────────────────────── */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.92);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.lightbox.open { display: flex; }
.lightbox img {
    max-width: 90vw;
    max-height: 88vh;
    border-radius: 10px;
    object-fit: contain;
}
.lightbox-close {
    position: fixed;
    top: 18px; right: 18px;
    width: 42px; height: 42px;
    border-radius: 50%;
    background: rgba(255,255,255,.12);
    border: none;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    z-index: 10000;
    transition: background .2s;
}
.lightbox-close:hover { background: rgba(255,255,255,.25); }

/* ── Avatar upload picker ────────────────────────────────────────────────── */
.avatar-picker {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto;
    cursor: pointer;
}
.avatar-picker-img {
    width: 100%; height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--orange);
}
.avatar-picker-overlay {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(0,0,0,.45);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .2s;
    font-size: 26px;
    color: #fff;
}
.avatar-picker:hover .avatar-picker-overlay { opacity: 1; }

/* ── Landing / Hero ──────────────────────────────────────────────────────── */
.hero {
    min-height: calc(100vh - var(--nav-h));
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
}
.hero-inner { max-width: 600px; display: flex; flex-direction: column; gap: 22px; align-items: center; }
.hero-title {
    font-size: clamp(32px, 6vw, 56px);
    font-weight: 900;
    line-height: 1.15;
}
.hero-title span { color: var(--orange-2); }
.hero-sub { font-size: 17px; color: var(--text-3); line-height: 1.7; max-width: 460px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* ── Empty state ─────────────────────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: var(--text-3);
}
.empty-state-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state-text { font-size: 15px; }

/* ── Divider ─────────────────────────────────────────────────────────────── */
.divider { border: none; border-top: 1px solid var(--card-border); margin: 0; }

/* ── Reactions ───────────────────────────────────────────────────────────── */
.post-card { position: relative; overflow: visible; }

/* Burst animation overlay (inside card, clipped) */
.react-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    overflow: hidden;
    z-index: 10;
}
.react-burst-emoji {
    position: absolute;
    top: 50%; left: 50%;
    font-size: 64px;
    font-weight: 900;
    line-height: 1;
    transform: translate(-50%, -50%) scale(0.2);
    opacity: 1;
    animation: reactBurst .75s ease-out forwards;
    pointer-events: none;
}
.react-burst-emoji.burst-love { color: #ef4444; }
.react-burst-emoji.burst-hate { color: #0a1628; }
@keyframes reactBurst {
    0%   { transform: translate(-50%,-50%) scale(.2); opacity: 1; }
    55%  { transform: translate(-50%,-50%) scale(1.5); opacity: .9; }
    100% { transform: translate(-50%,-50%) scale(2.4); opacity: 0; }
}

/* Reactor bubbles – inline inside the action bar */
.rb-wrap {
    display: flex;
    align-items: center;
    gap: 0;
    flex-shrink: 0;
}
.reactor-bub {
    position: relative;
    display: inline-block;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--card);
    margin-inline-start: -8px;
    cursor: default;
    flex-shrink: 0;
    transition: transform .2s;
}
.reactor-bub:first-child { margin-inline-start: 0; }
.reactor-bub:hover { transform: scale(1.15); z-index: 1; }
.reactor-bub .rb-img {
    width: 100%; height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}
.reactor-bub .rb-fb {
    width: 100%; height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg,var(--orange),var(--orange-2));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
}
.reactor-bub .rb-icon {
    position: absolute;
    bottom: -3px; right: -3px;
    font-size: 11px;
    line-height: 1;
    font-weight: 900;
}
.reactor-bub .rb-love { color: #ef4444; text-shadow: 0 0 3px rgba(255,255,255,.8); }
.reactor-bub .rb-hate { color: #0a1628; text-shadow: 0 0 3px rgba(255,255,255,.8); }

/* Post action bar */
.post-action-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px 12px;
    border-top: 1px solid rgba(160,172,196,.4);
    flex-wrap: wrap;
}
.react-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1.5px solid rgba(10,22,40,.2);
    background: rgba(10,22,40,.07);
    color: #1a2f4a;
    font-family: 'Cairo', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background .18s, color .18s, border-color .18s, transform .12s;
    user-select: none;
}
.react-btn:hover { background: var(--orange-soft); border-color: var(--orange); color: #0a1628; }
/* Reaction icons */
.ricon { font-size: 16px; line-height: 1; font-style: normal; }
.ricon-love { color: #ef4444; }
.ricon-hate { color: #0a1628; }

/* Active states */
.react-btn.react-active.love-react {
    background: rgba(239,68,68,.14);
    border-color: #ef4444;
    color: #c81e1e;
}
.react-btn.react-active.love-react .ricon-love { color: #c81e1e; }
.react-btn.react-active.hate-react {
    background: rgba(10,22,40,.16);
    border-color: #0a1628;
    color: #0a1628;
}
/* Default inactive hate button */
.react-btn.hate-react { color: #1a2f4a; }
.rc-count { font-size: 12px; opacity: .85; }

/* Comment toggle button */
.cmt-toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 20px;
    border: 1.5px solid rgba(10,22,40,.2);
    background: rgba(10,22,40,.07);
    color: #0a1628;
    font-family: 'Cairo', sans-serif;
    font-size: 13px;
    cursor: pointer;
    transition: background .18s, color .18s;
}
.cmt-toggle:hover { background: rgba(10,22,40,.14); }
.cmt-toggle svg { display: block; }
.cmt-badge { font-size: 12px; }

/* ── Comments section – slide animation ─────────────────────────────────── */
.cmt-section {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.36s ease, border-top-color 0.36s ease;
    overflow: hidden;
    border-top: 1px solid transparent;
    background: rgba(10,22,40,.06);
    border-radius: 0 0 var(--radius) var(--radius);
}
.cmt-section.cmt-open {
    grid-template-rows: 1fr;
    border-top-color: rgba(160,172,196,.4);
}
.cmt-section-inner {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    min-height: 0;
}
.cmt-list { display: flex; flex-direction: column; gap: 8px; padding-bottom: 10px; }
.cmt-loading { color: #3d5070; font-size: 13px; text-align: center; padding: 8px; }
.cmt-empty   { color: #3d5070; font-size: 13px; text-align: center; padding: 6px; }

.cmt-item {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}
.cmt-av {
    flex-shrink: 0;
    width: 30px; height: 30px;
    border-radius: 50%;
    overflow: hidden;
}
.cmt-av-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.cmt-av-fb {
    width: 100%; height: 100%;
    background: linear-gradient(135deg,var(--orange),var(--orange-2));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
}
.cmt-body {
    flex: 1;
    background: rgba(255,255,255,.55);
    border-radius: 10px;
    padding: 7px 10px;
    position: relative;
}
.cmt-name  { font-size: 12px; font-weight: 700; color: var(--orange); margin-inline-end: 6px; }
.cmt-time  { font-size: 11px; color: #3d5070; }
.cmt-text  { font-size: 14px; color: #1a2f4a; margin-top: 3px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.cmt-del   {
    position: absolute;
    top: 6px; left: 8px;
    background: none; border: none;
    color: var(--text-4);
    cursor: pointer;
    font-size: 11px;
    padding: 2px 4px;
    border-radius: 4px;
    transition: color .2s, background .2s;
}
.cmt-del:hover { color: var(--error); background: rgba(239,68,68,.1); }

/* View all comments link */
.cmt-view-all-wrap { text-align: start; padding-top: 4px; }
.cmt-view-all {
    background: none; border: none; padding: 0;
    color: var(--orange); font-family: 'Cairo', sans-serif;
    font-size: 12px; font-weight: 700; cursor: pointer;
    text-decoration: underline; text-underline-offset: 3px;
    transition: opacity .18s;
}
.cmt-view-all:hover { opacity: .7; }

/* ── Post detail modal ───────────────────────────────────────────────────── */
.post-modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.6);
    z-index: 99990;
    display: flex; align-items: center; justify-content: center;
    animation: fadeInOverlay .22s ease;
}
@keyframes fadeInOverlay { from { opacity: 0; } to { opacity: 1; } }
.post-modal-overlay.post-modal-closing { animation: fadeInOverlay .22s ease reverse; }

.post-modal {
    background: linear-gradient(160deg,#d8dce6 0%,#eaecf2 60%,#d0d4e0 100%);
    border-radius: 16px;
    width: 620px; max-width: 96vw;
    max-height: 88vh;
    display: flex; flex-direction: column;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0,0,0,.35);
    animation: slideUpModal .28s cubic-bezier(.22,1,.36,1);
}
@keyframes slideUpModal { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }

.post-modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 18px 12px;
    border-bottom: 1px solid rgba(10,22,40,.12);
    flex-shrink: 0;
}
.post-modal-title { font-size: 15px; font-weight: 800; color: #0a1628; }
.post-modal-close {
    background: rgba(10,22,40,.08); border: none; border-radius: 50%;
    width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
    font-size: 14px; color: #0a1628; cursor: pointer; transition: background .18s;
    flex-shrink: 0;
}
.post-modal-close:hover { background: rgba(10,22,40,.18); }

/* scrollable comments area – orange scrollbar on left (RTL auto) */
.post-modal-comments {
    flex: 1; overflow-y: auto; overflow-x: hidden;
    padding: 14px 14px 6px;
    display: flex; flex-direction: column; gap: 8px;
    direction: rtl;
    scrollbar-width: thin;
    scrollbar-color: var(--orange) rgba(160,172,196,.2);
}
.post-modal-comments::-webkit-scrollbar { width: 4px; }
.post-modal-comments::-webkit-scrollbar-track { background: rgba(160,172,196,.2); border-radius: 4px; }
.post-modal-comments::-webkit-scrollbar-thumb { background: var(--orange); border-radius: 4px; }

.post-modal-input-area {
    flex-shrink: 0;
    padding: 10px 14px 14px;
    border-top: 1px solid rgba(10,22,40,.12);
}

/* full-screen on mobile */
@media (max-width: 600px) {
    .post-modal {
        width: 100%; max-width: 100%;
        max-height: 100%; height: 100%;
        border-radius: 0;
        animation: slideUpModal .28s cubic-bezier(.22,1,.36,1);
    }
    .post-modal-overlay { align-items: flex-end; }
}

/* Comment input row */
.cmt-input-row {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,.7);
    border: 1px solid rgba(10,22,40,.18);
    border-radius: 22px;
    padding: 4px 8px 4px 12px;
    position: relative;
}
.cmt-inp {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: #0f1f3a;
    font-family: 'Cairo', sans-serif;
    font-size: 16px;
    padding: 4px 0;
    direction: rtl;
}
.cmt-inp::placeholder { color: #5a7090; }
.cmt-emoji-btn, .cmt-send-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 8px;
    font-size: 16px;
    transition: background .18s;
    flex-shrink: 0;
}
.cmt-emoji-btn:hover { background: rgba(255,255,255,.08); }
.cmt-send-btn {
    background: var(--orange);
    color: #fff;
    font-family: 'Cairo', sans-serif;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 14px;
}
.cmt-send-btn:hover { background: var(--orange-2); }

/* Emoji palette */
.emoji-pal {
    display: none;
    flex-wrap: wrap;
    gap: 4px;
    padding: 8px;
    background: var(--bg2);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    max-width: 280px;
}
.ep-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    padding: 3px;
    border-radius: 6px;
    transition: background .15s;
    line-height: 1;
}
.ep-btn:hover { background: rgba(255,255,255,.1); }

/* ── Reactor popup ───────────────────────────────────────────────────────── */
.rp-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.65);
    z-index: 199999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.rp-modal {
    background: var(--bg2);
    border: 1px solid var(--card-border);
    border-radius: 18px;
    padding: 22px;
    width: 100%;
    max-width: 360px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}
.rp-close {
    position: absolute;
    top: 14px; left: 14px;
    background: rgba(255,255,255,.08);
    border: none;
    border-radius: 50%;
    width: 28px; height: 28px;
    cursor: pointer;
    color: var(--text-2);
    font-size: 14px;
    display: flex; align-items: center; justify-content: center;
}
.rp-title { font-size: 16px; font-weight: 700; text-align: center; margin-bottom: 14px; color: var(--text); }
.rp-list  { display: flex; flex-direction: column; gap: 10px; }
.rp-item  { display: flex; align-items: center; gap: 10px; }
.rp-av    { width: 36px; height: 36px; border-radius: 50%; overflow: hidden; flex-shrink: 0; }
.rp-av-img { width:100%;height:100%;object-fit:cover;border-radius:50%; }
.rp-av-fb  {
    width:100%;height:100%;
    background:linear-gradient(135deg,var(--orange),var(--orange-2));
    border-radius:50%;
    display:flex;align-items:center;justify-content:center;
    font-size:14px;font-weight:700;color:#fff;
}
.rp-info   { flex:1; display:flex;flex-direction:column;gap:1px; }
.rp-name   { font-size:14px;font-weight:700;color:var(--text); }
.rp-user   { font-size:12px;color:var(--text-4); }
.rp-time   { font-size:11px;color:var(--text-4); white-space:nowrap; }

/* ── Share modal ─────────────────────────────────────────────────────────── */
.sawa-share-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.65);
    z-index: 299999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.sawa-share-modal {
    background: linear-gradient(160deg, #d4d8e0 0%, #edf0f5 55%, #d0d5de 100%);
    border: 1.5px solid rgba(10,22,40,.18);
    border-radius: 18px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,.45);
    animation: modalPop .2s ease;
}
@keyframes modalPop {
    from { transform: scale(.95); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}
.sawa-share-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px 12px;
    font-size: 15px;
    font-weight: 800;
    color: #0f1f3a;
    border-bottom: 1px solid rgba(10,22,40,.12);
}
.sawa-share-close {
    background: rgba(10,22,40,.08);
    border: none;
    border-radius: 50%;
    width: 30px; height: 30px;
    cursor: pointer;
    color: #2a4060;
    font-size: 14px;
    display: flex; align-items: center; justify-content: center;
    transition: background .18s;
}
.sawa-share-close:hover { background: rgba(239,68,68,.15); color: #dc2626; }
.sawa-share-body {
    flex: 1;
    overflow-y: auto;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
/* Single unified composer box: textarea on top, post preview below */
.sawa-share-composer {
    border: 2px solid rgba(10,22,40,.22);
    border-radius: 14px;
    overflow: hidden;
    background: rgba(255,255,255,.6);
    transition: border-color .2s;
}
.sawa-share-composer:focus-within { border-color: var(--orange); }

.sawa-share-caption {
    width: 100%;
    background: transparent;
    border: none;
    padding: 12px 14px 8px;
    font-family: 'Cairo', sans-serif;
    font-size: 16px;
    color: #0f1f3a;
    direction: rtl;
    resize: none;
    outline: none;
    line-height: 1.6;
    display: block;
}
.sawa-share-caption::placeholder { color: #5a7090; }

.sawa-share-composer-divider {
    height: 1.5px;
    background: rgba(10,22,40,.12);
    margin: 0 10px;
}

.sawa-share-preview {
    pointer-events: none;
    user-select: none;
    background: rgba(10,22,40,.04);
}
.sawa-share-preview .post-card {
    border: none;
    border-radius: 0;
    box-shadow: none;
    margin: 0;
    background: transparent;
}
.sawa-share-foot {
    display: flex;
    gap: 10px;
    padding: 12px 16px 16px;
    border-top: 1px solid rgba(10,22,40,.1);
    justify-content: flex-end;
}
.sawa-share-cancel {
    padding: 9px 22px;
    border-radius: 22px;
    border: 1.5px solid rgba(10,22,40,.25);
    background: transparent;
    color: #2a4060;
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background .18s;
}
.sawa-share-cancel:hover { background: rgba(10,22,40,.08); }
.sawa-share-submit {
    padding: 9px 26px;
    border-radius: 22px;
    border: none;
    background: var(--orange);
    color: #fff;
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: background .18s, opacity .18s;
}
.sawa-share-submit:hover:not(:disabled) { background: var(--orange-2); }
.sawa-share-submit:disabled { opacity: .6; cursor: default; }

/* ── Embedded original post (inside shared posts) ────────────────────────── */
.embedded-post {
    margin: 4px 14px 8px;
    border: 2px solid #0a1628;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255,255,255,.35);
}
.embedded-post .post-content {
    padding: 10px 13px 8px;
    font-size: 14px;
}
.embedded-post .post-images {
    padding: 0 8px 8px;
}

/* ── Share button ────────────────────────────────────────────────────────── */
.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 20px;
    border: 1.5px solid rgba(10,22,40,.2);
    background: rgba(10,22,40,.07);
    color: #2a4060;
    font-family: 'Cairo', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    margin-inline-start: auto;
    transition: background .18s, color .18s, border-color .18s;
    white-space: nowrap;
}
.share-btn:hover:not(:disabled) { background: rgba(10,22,40,.14); color: #0a1628; }
.share-btn.shared,
.share-btn:disabled {
    background: rgba(234,88,12,.1);
    border-color: var(--orange);
    color: var(--orange);
    cursor: default;
}
.share-count { font-size: 12px; opacity: .85; }

/* ── Shared post attribution bar ─────────────────────────────────────────── */
.post-original-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 7px 14px;
    background: rgba(10,22,40,.07);
    border-top: 1px solid rgba(160,172,196,.45);
    border-bottom: 1px solid rgba(160,172,196,.45);
    flex-wrap: nowrap;
    overflow: hidden;
}
.orig-info {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: nowrap;
    font-size: 11px;
    color: #3d5070;
    min-width: 0;
    overflow: hidden;
}
.orig-label { font-weight: 700; color: #2a4060; white-space: nowrap; }
.orig-user-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
    transition: opacity .18s;
}
.orig-user-link:hover { opacity: .75; }
.orig-av {
    width: 28px; height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(10,22,40,.25);
    flex-shrink: 0;
}
.orig-av-fb {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--orange), var(--orange-2));
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.orig-time { color: #5a7090; font-size: 11px; white-space: nowrap; }

/* Thank button */
.thank-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px 3px 7px;
    border: 1.5px solid #0a1628;
    border-radius: 20px;
    background: none;
    color: var(--orange);
    font-family: 'Cairo', sans-serif;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: border-color .2s, opacity .18s;
    line-height: 1;
}
.thank-btn:hover { opacity: .75; }
.thank-btn.thanked { border-color: var(--orange); }
.thank-icon {
    font-size: 13px;
    font-style: normal;
    font-weight: 900;
    line-height: 1;
    color: var(--orange);
}
.thank-count { font-size: 10px; color: var(--orange); }

/* ── Post highlight (from notification) ──────────────────────────────────── */
@keyframes postGlow {
    0%,100% { box-shadow: 0 0 0 0 var(--orange-glow); }
    50%      { box-shadow: 0 0 0 8px var(--orange-glow); }
}
.post-highlight {
    animation: postGlow 1s ease 3;
    border-color: var(--orange) !important;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .auth-card { padding: 26px 18px; }
    .profile-cover-wrap { height: 160px; }
    .profile-avatar { width: 82px; height: 82px; }
    .profile-avatar-fallback { width: 82px; height: 82px; font-size: 30px; }
    .profile-header-card { margin-top: -42px; }
    .feed-wrap { padding: 16px 10px 80px; }
    .hero-title { font-size: 28px; }
    .post-action-bar { gap: 6px; }
    .react-btn { padding: 5px 10px; font-size: 12px; }
}

/* ── Profile header: info next to the photo (computer) / under it (phone) ── */
.profile-header-card { max-width: 680px; margin: -60px auto 0; padding: 0 16px; }
.profile-head {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: 18px;
    padding: 16px 18px;
    box-shadow: 0 14px 34px rgba(0, 0, 0, .35);
}
.profile-head .profile-avatar-wrap { margin-top: -50px; }   /* photo overlaps the cover */
.profile-head .profile-avatar,
.profile-head .profile-avatar-fallback { width: 116px; height: 116px; }
.profile-head .profile-avatar-fallback { font-size: 44px; }
.profile-head .profile-info {
    flex: 1; min-width: 0;
    background: none; border: 0; border-radius: 0; padding: 0; margin: 0;
}
.profile-head .profile-name { font-size: 24px; word-break: break-word; }
.profile-head .profile-username { direction: ltr; text-align: right; }
.profile-head .profile-bio { margin-top: 8px; }
.profile-head .profile-stats { margin-top: 10px; padding-top: 10px; gap: 26px; }
.profile-head .profile-stat { flex-direction: row; align-items: baseline; gap: 6px; }
.profile-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; flex-shrink: 0; max-width: 220px; }
.profile-actions form { display: flex; }

/* Phone: everything centred under the photo */
@media (max-width: 600px) {
    .profile-header-card { margin-top: -48px; padding: 0 10px; }
    .profile-head {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 10px;
        padding: 0 16px 18px;
    }
    .profile-head .profile-avatar-wrap { margin-top: -48px; }
    .profile-head .profile-avatar,
    .profile-head .profile-avatar-fallback { width: 96px; height: 96px; }
    .profile-head .profile-avatar-fallback { font-size: 36px; }
    .profile-head .profile-info { width: 100%; }
    .profile-head .profile-name { font-size: 21px; }
    .profile-head .profile-username { text-align: center; }
    .profile-head .profile-bio { text-align: center; }
    .profile-head .profile-stats { justify-content: center; }
    .profile-actions { max-width: none; width: 100%; justify-content: center; }
    .profile-actions > a, .profile-actions > span, .profile-actions form, .profile-actions form button {
        flex: 1 1 140px; justify-content: center; text-align: center;
    }
}

/* ── Composer: "شاهد سوا" next to "إضافة صور" ── */
.composer-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.composer-watch-btn { text-decoration: none; color: #c7d2fe; border-color: rgba(99, 102, 241, .5); background: rgba(99, 102, 241, .12); }
.composer-watch-btn:hover { color: #fff; border-color: #818cf8; background: rgba(99, 102, 241, .28); }

/* ── Login: "شاهد واعمل سهرة سوى مع اصحابك" ── */
.auth-tagline {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    padding: 12px 16px; border-radius: 14px; text-align: center;
    background: linear-gradient(#111a2d, #111a2d) padding-box,
                linear-gradient(90deg, rgba(249,115,22,.75), rgba(99,102,241,.6)) border-box;
    border: 1.5px solid transparent;
    box-shadow: 0 8px 22px rgba(234,88,12,.15);
}
.auth-tagline-text {
    font-size: 17px; font-weight: 800; line-height: 1.6;
    background: linear-gradient(90deg, #fdba74, #f97316 45%, #a5b4fc);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.auth-tagline-icon { font-size: 22px; animation: tagline-bob 2.4s ease-in-out infinite; }
.auth-tagline-icon:last-child { animation-delay: 1.2s; }
@keyframes tagline-bob { 50% { transform: translateY(-3px); } }
@media (max-width: 600px) {
    .auth-tagline { padding: 10px 12px; gap: 8px; }
    .auth-tagline-text { font-size: 15px; }
    .auth-tagline-icon { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) { .auth-tagline-icon { animation: none; } }

/* ── Header: same design as the home / movies / TV pages ─────────────────── */
body { padding-top: 0; }
.sawa-nav {
    position: sticky; top: 0; height: auto; z-index: 999;
    background: linear-gradient(90deg, #ea580c 0%, #f97316 50%, #ea580c 100%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, .3);
}
.sawa-nav .nav-inner {
    max-width: none; height: auto; margin: 0; padding: 12px 40px;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.sh-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; flex-shrink: 0; }
.sh-logo-icon { width: 50px; height: 50px; border-radius: 8px; overflow: hidden; flex-shrink: 0; }
.sh-logo-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sh-logo-text { display: flex; flex-direction: column; line-height: 1.2; }
.sh-logo-text b { font-size: 22px; font-weight: 800; }
.sh-logo-text small { font-size: 12px; font-weight: 600; color: rgba(255, 255, 255, .9); }
.sh-menu { display: flex; gap: 10px; align-items: center; }
.sh-item { color: #fff; text-decoration: none; font-size: 15px; font-weight: 600; padding: 8px 16px; border-radius: 8px; white-space: nowrap; transition: background .3s; }
.sh-item:hover { background: rgba(255, 255, 255, .15); }
.sh-item.active { background: rgba(255, 255, 255, .22); }
.sh-user { display: flex; align-items: center; gap: 8px; }
.sawa-nav .nav-notif-btn { background: none; border: 0; font-size: 20px; padding: 4px 6px; width: auto; height: auto; position: relative; }
.sawa-nav .nav-notif-badge { top: -2px; left: -4px; right: auto; box-shadow: 0 0 0 2px #ea580c; }
.sh-chip {
    display: inline-flex; align-items: center; gap: 7px; padding: 3px 12px 3px 4px; max-width: 170px;
    border-radius: 999px; background: rgba(0, 0, 0, .22); border: 1px solid rgba(255, 255, 255, .3);
    color: #fff; font-size: 14px; font-weight: 700; text-decoration: none; white-space: nowrap;
}
.sh-chip:hover { background: rgba(0, 0, 0, .35); }
.sh-chip .nav-avatar, .sh-chip .nav-avatar-fallback { width: 32px; height: 32px; border: 2px solid #fff; flex-shrink: 0; }
.sh-name { overflow: hidden; text-overflow: ellipsis; }
.sh-logout, .sh-login, .sh-join {
    color: #fff; text-decoration: none; font-size: 13px; font-weight: 700; white-space: nowrap;
    padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .35); transition: background .2s;
}
.sh-logout:hover, .sh-login:hover { background: rgba(0, 0, 0, .25); }
.sh-login { background: rgba(0, 0, 0, .22); font-size: 14px; padding: 7px 16px; }
.sh-join { background: #fff; color: #ea580c; border-color: #fff; }
@media (max-width: 768px) {
    :root { --nav-h: 0px; }
    .sawa-nav .nav-inner { padding: 10px 16px; flex-wrap: wrap; row-gap: 10px; }
    .sh-logo-icon { width: 42px; height: 42px; }
    .sh-logo-text b { font-size: 18px; }
    .sh-menu { gap: 4px; }
    .sh-item { font-size: 13px; padding: 6px 10px; }
    .sh-name { display: none; }
    .sh-chip { padding: 3px; }
    .sh-logout { padding: 5px 9px; font-size: 12px; }
}
@media (max-width: 480px) {
    .sh-logo-text { display: none; }
    /* 4 section buttons: their own full-width row under the logo, above the search */
    .sh-menu { order: 2; flex-basis: 100%; justify-content: space-between; gap: 4px; }
    .sh-item { padding: 6px 4px; font-size: 13px; flex: 1; text-align: center; }
    .sawa-nav .search { order: 3; }
}

/* ===== Watch posts (movie / live channel): their own card ===== */
.post-card.post-watch { border: 1px solid rgba(234,88,12,.45); box-shadow: 0 4px 22px rgba(234,88,12,.12); }
.pw-card {
    position: relative; isolation: isolate; overflow: hidden;
    display: flex; gap: 16px; align-items: stretch;
    margin: 12px 12px 10px; padding: 14px; border-radius: 14px;
    background: #0b1424; color: #e2e8f0;
}
.pw-card::before {   /* the poster / logo, blurred, behind the card */
    content: ""; position: absolute; inset: -30px; z-index: -2;
    background: var(--pw-bg, none) center / cover no-repeat;
    filter: blur(26px) saturate(1.3); opacity: .55;
}
.pw-card::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(11,20,36,.55), rgba(11,20,36,.92) 60%); }
.pw-card.pw-is-channel::after { background: linear-gradient(90deg, rgba(11,20,36,.7), rgba(11,20,36,.94) 60%); }

.pw-thumb {
    position: relative; flex-shrink: 0; display: block; overflow: hidden; text-decoration: none;
    width: 118px; aspect-ratio: 2 / 3; border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0,0,0,.5); border: 2px solid rgba(255,255,255,.15); background: #0f172a;
}
/* channel logos are landscape: wider frame, filled edge to edge like the movie poster */
.pw-is-channel .pw-thumb { width: 172px; aspect-ratio: 3 / 2; align-self: center; }
.pw-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .3s, filter .2s; }
.pw-thumb-fb { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; font-size: 40px; }
.pw-thumb:hover img { transform: scale(1.06); filter: brightness(.8); }
.pw-play {
    position: absolute; top: 50%; left: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; padding-left: 3px; box-sizing: border-box;
    background: rgba(234,88,12,.93); color: #fff; font-size: 17px; border: 2px solid #fff;
    box-shadow: 0 4px 16px rgba(0,0,0,.45); transition: transform .2s, background .2s; pointer-events: none;
}
.pw-thumb:hover .pw-play { transform: scale(1.14); background: #ea580c; }

.pw-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.pw-kind {
    align-self: flex-start; display: inline-flex; align-items: center; gap: 6px;
    padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 800;
    background: rgba(234,88,12,.2); color: #fdba74; border: 1px solid rgba(251,146,60,.4);
}
.pw-is-channel .pw-kind { background: rgba(239,68,68,.18); color: #fca5a5; border-color: rgba(239,68,68,.45); }
.pw-kind i { width: 8px; height: 8px; border-radius: 50%; background: #ef4444; animation: wt-ping 1.6s infinite; }
.pw-title { font-size: 18px; font-weight: 800; line-height: 1.35; color: #fff; text-decoration: none; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.pw-title:hover { color: #fdba74; }
.pw-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.pw-tags span { font-size: 11.5px; font-weight: 700; color: #cbd5e1; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); padding: 2px 8px; border-radius: 6px; }
.pw-text { font-size: 13.5px; line-height: 1.6; color: #cbd5e1; }
.pw-card .pw-room { margin: 2px 0 0; padding: 7px 10px; background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.14); }
.pw-card .pw-room.ended { color: #94a3b8; background: rgba(255,255,255,.05); }
.pw-card .pw-live { color: #fca5a5; }
.pw-go {
    margin-top: auto; align-self: flex-start; padding: 7px 16px; border-radius: 999px; text-decoration: none;
    font-size: 13px; font-weight: 800; color: #fff; background: linear-gradient(135deg, #f97316, #ea580c);
    box-shadow: 0 4px 14px rgba(234,88,12,.35); transition: transform .15s, box-shadow .15s;
}
.pw-go:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(234,88,12,.5); }
.embedded-post .pw-card { margin: 8px; }

@media (max-width: 480px) {
    .pw-card { gap: 12px; padding: 12px; margin: 10px 8px 8px; }
    .pw-thumb { width: 92px; }
    .pw-is-channel .pw-thumb { width: 128px; }
    .pw-title { font-size: 16px; }
    .pw-text { font-size: 13px; }
    .pw-play { width: 36px; height: 36px; margin: -18px 0 0 -18px; font-size: 14px; }
}

/* 🚩 report button on a post */
.post-report { margin-inline-start: auto; background: none; border: 0; cursor: pointer; font-size: 15px; opacity: .45; padding: 4px 6px; border-radius: 8px; }
.post-report:hover { opacity: 1; background: rgba(239, 68, 68, .15); }
