/* ===== Facebook Clone - Exact CSS ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --fb-blue: #1877f2;
  --fb-blue-dark: #166fe5;
  --fb-green: #42b72a;
  --fb-green-dark: #36a420;
  --fb-white: #ffffff;
  --fb-bg: #f0f2f5;
  --fb-border: #ced0d4;
  --fb-text: #050505;
  --fb-text-secondary: #65676b;
  --fb-hover: #f2f2f2;
  --fb-card: #ffffff;
  --fb-shadow: 0 1px 2px rgba(0,0,0,.2);
  --fb-radius: 8px;
  --fb-nav-h: 56px;
  --fb-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
}

body {
  font-family: var(--fb-font);
  background: var(--fb-bg);
  color: var(--fb-text);
  font-size: 15px;
  line-height: 1.34;
  min-height: 100vh;
}

a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: var(--fb-font); border: none; }
input, textarea, select { font-family: var(--fb-font); }

/* ===== NAVBAR ===== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--fb-nav-h);
  background: var(--fb-white);
  box-shadow: var(--fb-shadow);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px;
}

.nav-left { display: flex; align-items: center; gap: 8px; flex: 1; }
.nav-logo { display: flex; align-items: center; }
.nav-logo svg { width: 40px; height: 40px; }

.nav-search {
  display: flex; align-items: center;
  background: var(--fb-bg);
  border-radius: 50px;
  padding: 0 12px; gap: 8px;
  height: 40px;
}
.nav-search input {
  background: none; border: none; outline: none;
  font-size: 15px; color: var(--fb-text);
  width: 220px;
}
.nav-search input::placeholder { color: var(--fb-text-secondary); }

.nav-center {
  display: flex; align-items: center; justify-content: center;
  gap: 4px; flex: 1;
}

.nav-tab {
  display: flex; align-items: center; justify-content: center;
  width: 116px; height: 48px;
  border-radius: var(--fb-radius);
  color: var(--fb-text-secondary);
  transition: background .1s, color .1s;
  position: relative;
}
.nav-tab:hover { background: var(--fb-hover); color: var(--fb-blue); }
.nav-tab.active { color: var(--fb-blue); border-bottom: 3px solid var(--fb-blue); border-radius: 0; }
.nav-tab svg { width: 24px; height: 24px; }

.nav-right {
  display: flex; align-items: center; gap: 8px;
  flex: 1; justify-content: flex-end;
}

.nav-btn {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--fb-bg);
  display: flex; align-items: center; justify-content: center;
  color: var(--fb-text); transition: background .1s;
  position: relative;
}
.nav-btn:hover { background: #d8dadf; }
.nav-btn svg { width: 20px; height: 20px; }

.nav-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  overflow: hidden; cursor: pointer;
  border: 1px solid var(--fb-border);
}
.nav-avatar img { width: 100%; height: 100%; object-fit: cover; }

.badge {
  position: absolute; top: -2px; right: -2px;
  background: #e41e3f; color: #fff;
  font-size: 11px; font-weight: 700;
  min-width: 18px; height: 18px;
  border-radius: 9px; display: flex; align-items: center; justify-content: center;
  border: 2px solid #fff;
  padding: 0 4px;
}

/* ===== MAIN LAYOUT ===== */
.main-layout {
  display: flex; max-width: 1648px; margin: 0 auto;
  padding-top: calc(var(--fb-nav-h) + 8px);
  min-height: 100vh; gap: 8px;
}

/* ===== LEFT SIDEBAR ===== */
.sidebar-left {
  width: 280px; min-width: 280px;
  padding: 8px 0 8px 16px;
  position: sticky; top: calc(var(--fb-nav-h) + 8px);
  height: calc(100vh - var(--fb-nav-h) - 16px);
  overflow-y: auto;
  flex-shrink: 0;
}
.sidebar-left::-webkit-scrollbar { width: 4px; }
.sidebar-left::-webkit-scrollbar-thumb { background: #bcc0c4; border-radius: 4px; }

.sidebar-user {
  display: flex; align-items: center; gap: 12px;
  padding: 8px; border-radius: var(--fb-radius);
  transition: background .1s;
}
.sidebar-user:hover { background: var(--fb-hover); }
.sidebar-user img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.sidebar-user span { font-size: 15px; font-weight: 600; }

.sidebar-item {
  display: flex; align-items: center; gap: 12px;
  padding: 8px; border-radius: var(--fb-radius);
  transition: background .1s; color: var(--fb-text);
}
.sidebar-item:hover { background: var(--fb-hover); }
.sidebar-item .icon-wrap {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--fb-bg); flex-shrink: 0;
}
.sidebar-item .icon-wrap svg,
.sidebar-item .icon-wrap img { width: 20px; height: 20px; }
.sidebar-item span { font-size: 15px; font-weight: 400; }

.sidebar-divider { border: none; border-top: 1px solid var(--fb-border); margin: 8px 0; }
.sidebar-heading { font-size: 17px; font-weight: 700; padding: 8px; color: var(--fb-text-secondary); }

.sidebar-footer {
  padding: 8px; font-size: 12px; color: var(--fb-text-secondary);
  line-height: 1.8;
}
.sidebar-footer a:hover { text-decoration: underline; }

/* ===== CENTER FEED ===== */
.feed-center {
  flex: 1; max-width: 680px; margin: 0 auto;
  padding: 0 0 32px;
}

/* ===== STORY BAR ===== */
.story-bar {
  display: flex; gap: 8px; padding: 0 0 12px;
  overflow-x: auto;
}
.story-bar::-webkit-scrollbar { display: none; }

.story-card {
  flex-shrink: 0; width: 116px; height: 200px;
  border-radius: 12px; overflow: hidden; cursor: pointer;
  position: relative; background: var(--fb-card);
  box-shadow: var(--fb-shadow);
}
.story-card.add-story {
  background: var(--fb-card);
  display: flex; flex-direction: column;
}
.story-card.add-story .story-img {
  flex: 1; background: #e4e6ea;
  display: flex; align-items: center; justify-content: center;
}
.story-card.add-story .add-icon {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--fb-blue); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 300; border: 3px solid #fff;
}
.story-card.add-story .story-label {
  padding: 8px; text-align: center;
  font-size: 13px; font-weight: 600; color: var(--fb-text);
}

.story-card img {
  width: 100%; height: 100%; object-fit: cover;
}
.story-avatar-ring {
  position: absolute; top: 12px; left: 12px;
  width: 40px; height: 40px; border-radius: 50%;
  border: 4px solid var(--fb-blue); overflow: hidden;
}
.story-avatar-ring img { width: 100%; height: 100%; object-fit: cover; }
.story-name {
  position: absolute; bottom: 12px; left: 8px; right: 8px;
  color: #fff; font-size: 13px; font-weight: 600;
  text-shadow: 0 1px 4px rgba(0,0,0,.5);
}

/* ===== POST BOX ===== */
.post-box {
  background: var(--fb-card); border-radius: var(--fb-radius);
  box-shadow: var(--fb-shadow); margin-bottom: 8px; padding: 12px 16px;
}
.post-box-top {
  display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
}
.post-box-top img {
  width: 40px; height: 40px; border-radius: 50%; object-fit: cover;
}
.post-input-btn {
  flex: 1; background: var(--fb-bg); border: none;
  border-radius: 50px; padding: 0 16px;
  height: 40px; font-size: 15px; color: var(--fb-text-secondary);
  cursor: pointer; text-align: left; transition: background .1s;
}
.post-input-btn:hover { background: #d8dadf; }

.post-box-divider { border: none; border-top: 1px solid var(--fb-border); margin: 4px 0; }
.post-box-actions { display: flex; justify-content: space-around; }
.post-action-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 12px; border-radius: var(--fb-radius);
  background: none; color: var(--fb-text-secondary);
  font-size: 15px; font-weight: 600; transition: background .1s;
}
.post-action-btn:hover { background: var(--fb-hover); }
.post-action-btn svg { width: 24px; height: 24px; }

/* ===== POST CARD ===== */
.post-card {
  background: var(--fb-card); border-radius: var(--fb-radius);
  box-shadow: var(--fb-shadow); margin-bottom: 8px;
}
.post-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px 0;
}
.post-user { display: flex; align-items: center; gap: 8px; }
.post-user img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; cursor: pointer; }
.post-user-info .post-name { font-size: 15px; font-weight: 600; color: var(--fb-text); }
.post-user-info .post-name:hover { text-decoration: underline; }
.post-meta { display: flex; align-items: center; gap: 4px; }
.post-time { font-size: 13px; color: var(--fb-text-secondary); }
.post-privacy svg { width: 12px; height: 12px; color: var(--fb-text-secondary); }

.post-menu-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: none; display: flex; align-items: center; justify-content: center;
  color: var(--fb-text-secondary); transition: background .1s;
}
.post-menu-btn:hover { background: var(--fb-hover); }
.post-menu-btn svg { width: 20px; height: 20px; }

.post-content { padding: 12px 16px; font-size: 15px; line-height: 1.5; }
.post-content.large-text { font-size: 24px; font-weight: 400; }

.post-image img {
  width: 100%; max-height: 700px; object-fit: cover;
  display: block;
}

.post-stats {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 16px; font-size: 15px; color: var(--fb-text-secondary);
}
.reaction-count { display: flex; align-items: center; gap: 4px; cursor: pointer; }
.reaction-count:hover span { text-decoration: underline; }
.reaction-emojis { display: flex; }
.reaction-emojis span { font-size: 16px; }
.comments-shares { display: flex; gap: 8px; }
.comments-shares span { cursor: pointer; }
.comments-shares span:hover { text-decoration: underline; }

.post-actions-bar {
  display: flex; border-top: 1px solid var(--fb-border);
  border-bottom: 1px solid var(--fb-border);
  margin: 0 16px;
}
.post-act-btn {
  flex: 1; display: flex; align-items: center; justify-content: center;
  gap: 6px; padding: 4px; border-radius: var(--fb-radius);
  background: none; color: var(--fb-text-secondary);
  font-size: 15px; font-weight: 600; transition: background .1s;
  height: 36px;
}
.post-act-btn:hover { background: var(--fb-hover); }
.post-act-btn svg { width: 20px; height: 20px; }
.post-act-btn.liked { color: var(--fb-blue); }

.post-comment-box {
  padding: 8px 16px;
  display: flex; align-items: center; gap: 8px;
}
.post-comment-box img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.comment-input-wrap {
  flex: 1; background: var(--fb-bg); border-radius: 50px;
  display: flex; align-items: center; padding: 0 12px;
}
.comment-input-wrap input {
  flex: 1; background: none; border: none; outline: none;
  font-size: 15px; color: var(--fb-text); padding: 8px 0;
}
.comment-input-wrap input::placeholder { color: var(--fb-text-secondary); }

/* ===== RIGHT SIDEBAR ===== */
.sidebar-right {
  width: 280px; min-width: 280px;
  padding: 8px 16px 8px 0;
  position: sticky; top: calc(var(--fb-nav-h) + 8px);
  height: calc(100vh - var(--fb-nav-h) - 16px);
  overflow-y: auto; flex-shrink: 0;
}
.sidebar-right::-webkit-scrollbar { width: 4px; }
.sidebar-right::-webkit-scrollbar-thumb { background: #bcc0c4; border-radius: 4px; }

.contacts-heading {
  display: flex; justify-content: space-between; align-items: center;
  padding: 4px 8px;
}
.contacts-heading span { font-size: 17px; font-weight: 700; color: var(--fb-text-secondary); }
.contacts-heading-icons { display: flex; gap: 4px; }
.contacts-heading-icons button {
  width: 32px; height: 32px; border-radius: 50%; background: none;
  display: flex; align-items: center; justify-content: center;
  color: var(--fb-text-secondary); transition: background .1s;
}
.contacts-heading-icons button:hover { background: var(--fb-hover); }
.contacts-heading-icons button svg { width: 18px; height: 18px; }

.contact-item {
  display: flex; align-items: center; gap: 12px;
  padding: 8px; border-radius: var(--fb-radius); transition: background .1s; cursor: pointer;
}
.contact-item:hover { background: var(--fb-hover); }
.contact-avatar-wrap { position: relative; flex-shrink: 0; }
.contact-avatar-wrap img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.online-dot {
  position: absolute; bottom: 0; right: 0;
  width: 12px; height: 12px; border-radius: 50%;
  background: #44b700; border: 2px solid #fff;
}
.contact-name { font-size: 15px; font-weight: 400; }

.ad-box { padding: 8px; }
.ad-label { font-size: 12px; color: var(--fb-text-secondary); margin-bottom: 8px; }

/* ===== MODAL - Create Post ===== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.65);
  display: flex; align-items: center; justify-content: center;
}
.modal-overlay.hidden { display: none; }

.modal {
  background: var(--fb-card);
  border-radius: 12px; width: 100%; max-width: 548px;
  box-shadow: 0 4px 20px rgba(0,0,0,.3);
  overflow: hidden;
}
.modal-header {
  position: relative; display: flex; align-items: center; justify-content: center;
  padding: 16px; border-bottom: 1px solid var(--fb-border);
}
.modal-title { font-size: 20px; font-weight: 700; }
.modal-close {
  position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--fb-bg); display: flex; align-items: center; justify-content: center;
  color: var(--fb-text); font-size: 20px; transition: background .1s;
}
.modal-close:hover { background: #d8dadf; }

.modal-body { padding: 16px; }
.modal-user { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.modal-user img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.modal-user .name { font-size: 15px; font-weight: 600; }
.modal-user .privacy-select {
  display: flex; align-items: center; gap: 4px;
  background: var(--fb-bg); border: none; border-radius: 4px;
  padding: 2px 6px; font-size: 13px; font-weight: 600;
  cursor: pointer; color: var(--fb-text);
}

.post-textarea {
  width: 100%; border: none; outline: none; resize: none;
  font-size: 24px; font-family: var(--fb-font); color: var(--fb-text);
  min-height: 120px; background: none;
}
.post-textarea::placeholder { color: #bcc0c4; }
.post-textarea.small { font-size: 15px; }

.add-to-post-box {
  display: flex; justify-content: space-between; align-items: center;
  border: 1px solid var(--fb-border); border-radius: var(--fb-radius);
  padding: 8px 12px; margin-top: 8px;
}
.add-to-post-label { font-size: 15px; font-weight: 600; }
.add-to-post-icons { display: flex; gap: 4px; }
.add-icon-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: none; display: flex; align-items: center; justify-content: center;
  transition: background .1s;
}
.add-icon-btn:hover { background: var(--fb-hover); }
.add-icon-btn img, .add-icon-btn svg { width: 24px; height: 24px; }

.post-submit-btn {
  width: 100%; background: var(--fb-blue); color: #fff;
  border: none; border-radius: 6px; padding: 8px;
  font-size: 15px; font-weight: 600; margin-top: 8px;
  cursor: pointer; transition: background .1s;
}
.post-submit-btn:hover { background: var(--fb-blue-dark); }
.post-submit-btn:disabled { background: var(--fb-bg); color: var(--fb-text-secondary); cursor: not-allowed; }

/* ===== LOGIN / REGISTER PAGE ===== */
.auth-page {
  min-height: 100vh; background: var(--fb-bg);
  display: flex; flex-direction: column;
}
.auth-container {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 32px 16px; gap: 40px; max-width: 980px; margin: 0 auto;
  flex-wrap: wrap;
}
.auth-left { flex: 1; min-width: 280px; }
.auth-logo { color: var(--fb-blue); font-size: 60px; font-weight: 900; letter-spacing: -2px; margin-bottom: 16px; }
.auth-tagline { font-size: 26px; font-weight: 400; color: var(--fb-text); max-width: 400px; line-height: 1.3; }

.auth-card {
  background: var(--fb-card); border-radius: 8px; padding: 16px;
  box-shadow: 0 2px 4px rgba(0,0,0,.1), 0 8px 16px rgba(0,0,0,.1);
  width: 100%; max-width: 396px; flex-shrink: 0;
}
.auth-input {
  width: 100%; padding: 14px 16px; border-radius: 6px;
  border: 1px solid #dddfe2; outline: none;
  font-size: 17px; color: var(--fb-text); margin-bottom: 12px;
  transition: border .1s, box-shadow .1s;
}
.auth-input:focus { border-color: var(--fb-blue); box-shadow: 0 0 0 2px rgba(24,119,242,.2); }

.login-btn {
  width: 100%; background: var(--fb-blue); color: #fff;
  border: none; border-radius: 6px; padding: 14px;
  font-size: 20px; font-weight: 700; cursor: pointer; transition: background .1s;
  margin-bottom: 16px;
}
.login-btn:hover { background: var(--fb-blue-dark); }

.forgot-link {
  display: block; text-align: center; color: var(--fb-blue);
  font-size: 14px; margin-bottom: 16px;
}
.forgot-link:hover { text-decoration: underline; }

.auth-divider { border: none; border-top: 1px solid var(--fb-border); margin: 16px 0; }

.register-btn {
  display: block; text-align: center; background: var(--fb-green);
  color: #fff; border-radius: 6px; padding: 14px; width: fit-content;
  margin: 0 auto; font-size: 17px; font-weight: 700; cursor: pointer;
  transition: background .1s; border: none;
}
.register-btn:hover { background: var(--fb-green-dark); }

/* Register modal */
.reg-row { display: flex; gap: 8px; }
.reg-row .auth-input { flex: 1; }

.error-msg {
  background: #ffeeba; border: 1px solid #ffc107;
  border-radius: 6px; padding: 10px 14px;
  font-size: 14px; color: #856404; margin-bottom: 12px;
}
.success-msg {
  background: #d4edda; border: 1px solid #c3e6cb;
  border-radius: 6px; padding: 10px 14px;
  font-size: 14px; color: #155724; margin-bottom: 12px;
}

/* ===== PROFILE PAGE ===== */
.profile-cover {
  width: 100%; max-width: 940px; margin: 0 auto;
  background: var(--fb-card); border-radius: 0 0 var(--fb-radius) var(--fb-radius);
  box-shadow: var(--fb-shadow);
}
.cover-photo {
  width: 100%; height: 348px; overflow: hidden;
  border-radius: 0 0 var(--fb-radius) var(--fb-radius);
  position: relative; background: #c9cdd4;
}
.cover-photo img { width: 100%; height: 100%; object-fit: cover; }

.profile-info-bar {
  display: flex; align-items: flex-end; justify-content: space-between;
  padding: 0 24px 16px; flex-wrap: wrap; gap: 8px;
}
.profile-pic-wrap {
  width: 168px; height: 168px; border-radius: 50%;
  border: 4px solid #fff; overflow: hidden;
  margin-top: -52px; background: #c9cdd4;
}
.profile-pic-wrap img { width: 100%; height: 100%; object-fit: cover; }
.profile-name-section { flex: 1; padding-left: 16px; padding-bottom: 8px; }
.profile-name { font-size: 32px; font-weight: 700; }
.profile-friends { font-size: 17px; color: var(--fb-text-secondary); }
.profile-actions { display: flex; gap: 8px; align-items: center; }
.profile-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 6px; font-size: 15px; font-weight: 600;
  cursor: pointer; transition: background .1s;
}
.profile-btn.primary { background: var(--fb-blue); color: #fff; border: none; }
.profile-btn.primary:hover { background: var(--fb-blue-dark); }
.profile-btn.secondary { background: var(--fb-bg); color: var(--fb-text); border: none; }
.profile-btn.secondary:hover { background: #d8dadf; }

.profile-nav {
  border-top: 1px solid var(--fb-border);
  display: flex; padding: 0 24px;
  max-width: 940px; margin: 0 auto; background: var(--fb-card);
  border-radius: var(--fb-radius);
}
.profile-nav-tab {
  padding: 14px 16px; font-size: 15px; font-weight: 600;
  color: var(--fb-text-secondary); border-radius: var(--fb-radius);
  transition: background .1s; border-bottom: 3px solid transparent;
  margin-bottom: -1px;
}
.profile-nav-tab:hover { background: var(--fb-hover); color: var(--fb-text); }
.profile-nav-tab.active { color: var(--fb-blue); border-bottom-color: var(--fb-blue); }

.profile-layout {
  max-width: 940px; margin: 16px auto;
  display: flex; gap: 16px; padding: 0 16px;
}
.profile-sidebar { width: 312px; flex-shrink: 0; }
.profile-feed { flex: 1; }

.info-card {
  background: var(--fb-card); border-radius: var(--fb-radius);
  box-shadow: var(--fb-shadow); padding: 12px 16px; margin-bottom: 8px;
}
.info-card h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.info-item { display: flex; align-items: center; gap: 8px; padding: 6px 0; }
.info-item svg { width: 20px; height: 20px; color: var(--fb-text-secondary); }

/* ===== MESSENGER POPUP ===== */
.messenger-popup {
  position: fixed; bottom: 0; right: 80px; z-index: 150;
  width: 328px;
  box-shadow: 0 -2px 12px rgba(0,0,0,.15);
  border-radius: 12px 12px 0 0;
  background: var(--fb-card); overflow: hidden;
}
.messenger-popup.hidden { display: none; }
.messenger-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 16px; background: var(--fb-card);
  border-bottom: 1px solid var(--fb-border);
}
.messenger-header h4 { font-size: 17px; font-weight: 700; }
.messenger-msgs { padding: 8px 16px; height: 250px; overflow-y: auto; }
.msg-bubble-wrap { display: flex; margin-bottom: 4px; }
.msg-bubble-wrap.me { justify-content: flex-end; }
.msg-bubble {
  max-width: 70%; padding: 8px 12px; border-radius: 18px;
  font-size: 15px;
}
.msg-bubble-wrap:not(.me) .msg-bubble { background: var(--fb-bg); }
.msg-bubble-wrap.me .msg-bubble { background: var(--fb-blue); color: #fff; }
.msg-input-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-top: 1px solid var(--fb-border);
}
.msg-input-bar input {
  flex: 1; border: none; outline: none; background: var(--fb-bg);
  border-radius: 50px; padding: 8px 12px; font-size: 15px;
}
.msg-send-btn {
  width: 32px; height: 32px; background: none;
  color: var(--fb-blue); display: flex; align-items: center; justify-content: center;
}
.msg-send-btn svg { width: 20px; height: 20px; }

/* ===== NOTIFICATIONS DROPDOWN ===== */
.dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: var(--fb-card); border-radius: var(--fb-radius);
  box-shadow: 0 4px 20px rgba(0,0,0,.2);
  width: 360px; z-index: 200; padding: 8px 0;
  max-height: 520px; overflow-y: auto;
}
.dropdown.hidden { display: none; }
.dropdown-heading { padding: 8px 16px; font-size: 24px; font-weight: 700; }
.notif-item {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 12px; border-radius: var(--fb-radius); cursor: pointer;
  transition: background .1s; margin: 0 4px; position: relative;
}
.notif-item:hover { background: var(--fb-hover); }
.notif-item.unread { background: #e7f3ff; }
.notif-avatar { position: relative; flex-shrink: 0; }
.notif-avatar img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }
.notif-icon {
  position: absolute; bottom: 0; right: -4px;
  width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; border: 2px solid #fff;
}
.notif-text { flex: 1; font-size: 15px; line-height: 1.3; }
.notif-time { font-size: 13px; color: var(--fb-blue); margin-top: 4px; }
.unread-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--fb-blue); flex-shrink: 0;
}

/* ===== LOADING ===== */
.skeleton { background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: 4px; }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
  .sidebar-right { display: none; }
  .feed-center { max-width: 680px; }
}
@media (max-width: 900px) {
  .sidebar-left { display: none; }
  .feed-center { max-width: 100%; padding: 0 8px; }
  .main-layout { padding-top: calc(var(--fb-nav-h) + 4px); }
}
@media (max-width: 768px) {
  .nav-center { display: none; }
  .nav-search input { width: 140px; }
  .nav-tab { width: 52px; }
  .profile-layout { flex-direction: column; }
  .profile-sidebar { width: 100%; }
  .cover-photo { height: 200px; }
  .profile-pic-wrap { width: 120px; height: 120px; }
  .profile-name { font-size: 22px; }
  .reg-row { flex-direction: column; }
}
@media (max-width: 480px) {
  .nav-search { display: none; }
  .nav-right .nav-btn:not(:last-child) { display: none; }
  .story-card { width: 96px; height: 168px; }
  .auth-logo { font-size: 40px; }
  .auth-tagline { font-size: 20px; }
  .messenger-popup { width: 100%; right: 0; border-radius: 12px 12px 0 0; }
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  :root {
    --fb-bg: #18191a;
    --fb-card: #242526;
    --fb-text: #e4e6eb;
    --fb-text-secondary: #b0b3b8;
    --fb-hover: #3a3b3c;
    --fb-border: #3a3b3c;
    --fb-shadow: 0 1px 2px rgba(0,0,0,.5);
  }
  .auth-input { background: #3a3b3c; border-color: #3a3b3c; color: var(--fb-text); }
  .post-input-btn { color: var(--fb-text-secondary); }
}
