@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=DM+Sans:wght@300;400;500;600&display=swap');

:root {
  --green-deep: #00703C;
  --green-mid: #2d9b5a;
  --green-light: #54b666;
  --green-pale: #e6f5ec;
  --green-glow: rgba(0, 112, 60, 0.12);
  --cream: #fafaf7;
  --white: #ffffff;
  --ink: #0f1f14;
  --ink-soft: #3a4a40;
  --muted: #7a8c80;
  --border: #d8e8dc;
  --radius-sm: 6px;
  --radius: 14px;
  --radius-lg: 24px;
  --shadow-sm: 0 2px 12px rgba(0,0,0,0.06);
  --shadow-md: 0 8px 32px rgba(0,0,0,0.10);
  --shadow-card: 0 4px 24px rgba(0,112,60,0.10);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--ink);
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── NAVBAR ── */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 7%;
  height: 70px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.branding {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--green-deep);
  letter-spacing: -0.5px;
}

.branding img { height: 38px; width: 38px; object-fit: contain; }

.nav-right { display: flex; align-items: center; gap: 8px; }

.nav-right a {
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 0.9rem;
  padding: 8px 14px;
  border-radius: 30px;
  transition: all 0.2s ease;
}

.nav-right a:hover { color: var(--green-deep); background: var(--green-pale); }
.nav-right a.alert { background: var(--green-deep); color: white !important; font-weight: 600; }
.nav-right a.alert:hover { background: var(--green-mid); }

.show-login {
  background: transparent;
  border: 2px solid var(--green-deep);
  color: var(--green-deep);
  padding: 7px 20px;
  border-radius: 30px;
  font-weight: 600;
  transition: all 0.2s ease;
  cursor: pointer;
}
.show-login:hover { background: var(--green-deep); color: white; }


.auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 20, 12, 0.60);
  backdrop-filter: blur(5px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.auth-overlay.active { opacity: 1; pointer-events: all; }

.auth-popup {
  background: #fff;
  border-radius: 22px;
  padding: 40px 36px 32px;
  width: 430px;
  max-width: 94vw;
  max-height: 92vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 28px 70px rgba(0,0,0,0.28);
}

.auth-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 30px; height: 30px;
  background: #f2f2f2;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Form Styling */
.form-element { margin-bottom: 14px; }
.form-element label { display: block; font-size: 0.76rem; font-weight: 700; color: #444; text-transform: uppercase; margin-bottom: 6px; }
.form-element input { width: 100%; padding: 11px 14px; border: 1.5px solid #d8e8dc; border-radius: 8px; outline: none; }
.form-element input:focus { border-color: var(--green-light); box-shadow: 0 0 0 3px rgba(84,182,102,0.14); }

.btn-primary {
  width: 100%; height: 46px; border: none; background: var(--green-deep); color: #fff; 
  font-weight: 600; border-radius: 10px; cursor: pointer; transition: 0.2s;
}
.btn-primary:hover { background: var(--green-mid); transform: translateY(-1px); }

/* ── FOOTER ── */
.footer {
  background: var(--ink);
  color: var(--muted);
  padding: 30px 7%;
  text-align: center;
  font-size: 0.875rem;
  margin-top: auto; 
}


.reaction-container { position: relative; display: inline-flex; }
.reactions-popover {
  position: absolute; bottom: 100%; left: 0; background: white; border-radius: 30px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2); display: flex; padding: 5px 10px; gap: 8px;
  visibility: hidden; opacity: 0; transform: translateY(10px); transition: 0.2s ease; z-index: 10;
}
.reaction-container:hover .reactions-popover { visibility: visible; opacity: 1; transform: translateY(-5px); }
.react-emoji { cursor: pointer; font-size: 1.5rem; transition: 0.2s; }
.react-emoji:hover { transform: scale(1.3); }

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  .nav-right a:not(.alert):not(.show-login) { display: none; }
}


.feed-layout {
  flex: 1; 
  display: grid;
  grid-template-columns: 240px 1fr 260px;
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px;
  width: 100%;
}

@media (max-width: 1100px) {
  .feed-layout { grid-template-columns: 200px 1fr; }
  .sidebar-right { display: none; }
}
@media (max-width: 720px) {
  .feed-layout { grid-template-columns: 1fr; padding: 16px; }
  .sidebar-left { display: none; }
}


.sidebar-left {
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.user-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  padding: 20px 16px;
  text-align: center;
}

.user-avatar-lg {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green-light), var(--green-deep));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.4rem;
  margin: 0 auto 10px;
  box-shadow: 0 4px 16px rgba(0,112,60,0.25);
}

.user-name {
  display: block;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink);
}
.user-handle {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 2px;
  margin-bottom: 12px;
}
.user-stats {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}
.stat { text-align: center; }
.stat-num { display: block; font-weight: 700; font-size: 1rem; color: var(--green-deep); }
.stat-lbl { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.4px; }
.stat-div { width: 1px; height: 28px; background: var(--border); }

.sidebar-links {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.side-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}
.side-link:hover { background: var(--green-pale); color: var(--green-deep); }
.side-link.active { background: var(--green-pale); color: var(--green-deep); border-left-color: var(--green-deep); font-weight: 700; }
.side-link i { width: 16px; text-align: center; }


.feed-main { min-width: 0; }

.feed-header {
  margin-bottom: 24px;
}
.feed-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
}
.feed-title i { color: var(--green-deep); font-size: 1.4rem; }
.feed-sub { font-size: 0.88rem; color: var(--muted); margin-top: 4px; }


.compose-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  padding: 20px;
  margin-bottom: 20px;
  transition: box-shadow 0.2s;
}
.compose-box:focus-within { box-shadow: 0 8px 32px rgba(0,112,60,0.15); border-color: var(--green-light); }

.compose-top {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.compose-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green-light), var(--green-deep));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 4px;
}
.compose-textarea {
  flex: 1;
  border: none;
  outline: none;
  resize: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.97rem;
  color: var(--ink);
  background: transparent;
  line-height: 1.6;
  min-height: 48px;
  max-height: 200px;
  overflow-y: auto;
}
.compose-textarea::placeholder { color: #b0bfb5; }
.compose-textarea:disabled { opacity: 0.5; }

/* Rating row */
.compose-rating {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0 6px 52px;
  border-top: 1px solid var(--border);
  margin-top: 10px;
}
.rating-label { font-size: 0.82rem; color: var(--muted); font-weight: 500; }
.star-picker { display: flex; gap: 4px; }
.star-picker i {
  font-size: 1.2rem;
  color: #d8e8dc;
  cursor: pointer;
  transition: color 0.15s, transform 0.15s;
}
.star-picker i.lit { color: #f5c842; }
.star-picker i:hover { transform: scale(1.2); }
.rating-text { font-size: 0.8rem; color: var(--muted); }


.compose-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 0 0 52px;
}
.stall-select {
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 6px 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.83rem;
  color: var(--ink-soft);
  background: var(--cream);
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
}
.stall-select:focus { border-color: var(--green-light); }

.photo-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.83rem;
  color: var(--green-deep);
  font-weight: 600;
  cursor: pointer;
  padding: 6px 14px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  transition: all 0.2s;
  background: var(--cream);
}
.photo-label:hover { background: var(--green-pale); border-color: var(--green-light); }


.photo-preview-wrap {
  position: relative;
  margin: 12px 0 0 52px;
  display: inline-block;
}
.photo-preview-wrap img {
  max-width: 100%;
  max-height: 220px;
  border-radius: var(--radius);
  object-fit: cover;
  border: 1.5px solid var(--border);
}
.remove-photo {
  position: absolute;
  top: 6px; right: 6px;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  border: none;
  color: white;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.remove-photo:hover { background: rgba(220,60,60,0.85); }


.compose-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  margin-top: 8px;
  border-top: 1px solid var(--border);
}
.char-count {
  font-size: 0.8rem;
  color: var(--muted);
}
.char-count.warn { color: #e07040; }
.char-count.over { color: #e05555; font-weight: 700; }

.btn-post {
  background: var(--green-deep);
  color: white;
  border: none;
  padding: 9px 24px;
  border-radius: 24px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, opacity 0.2s;
  box-shadow: 0 4px 12px rgba(0,112,60,0.22);
}
.btn-post:hover:not(:disabled) { background: var(--green-mid); transform: translateY(-1px); }
.btn-post:disabled { opacity: 0.45; cursor: not-allowed; }

.login-notice {
  text-align: center;
  font-size: 0.87rem;
  color: var(--muted);
  margin-top: 10px;
  display: none;
}
.login-notice a { color: var(--green-deep); font-weight: 600; text-decoration: none; }
.login-notice a:hover { text-decoration: underline; }


.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 16px;
  padding: 12px 16px;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.filter-btn {
  border: 1.5px solid var(--border);
  background: var(--cream);
  color: var(--ink-soft);
  border-radius: 20px;
  padding: 6px 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.filter-btn:hover { background: var(--green-pale); border-color: var(--green-light); color: var(--green-deep); }
.filter-btn.active { background: var(--green-deep); color: white; border-color: var(--green-deep); font-weight: 600; }
.filter-sort { margin-left: auto; }
.sort-select {
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 6px 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  color: var(--ink-soft);
  background: var(--cream);
  cursor: pointer;
  outline: none;
}
#star-select-filter {
  border-radius: 25px;
  border-radius: 25px; 
  padding: 8px 16px;
  background-color: var(--cream);
}



.feed-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px;
  color: var(--muted);
  font-size: 0.9rem;
}
.spinner {
  width: 22px; height: 22px;
  border: 3px solid var(--border);
  border-top-color: var(--green-deep);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.no-posts {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}
.no-posts i { font-size: 2.5rem; margin-bottom: 14px; opacity: 0.4; display: block; }
.no-posts p { font-size: 0.95rem; }

/* ── SINGLE POST CARD ── */
.post-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 18px 20px;
  margin-bottom: 14px;
  transition: box-shadow 0.2s, transform 0.2s;
  animation: slideIn 0.3s ease;
}
@keyframes slideIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.post-card:hover { box-shadow: var(--shadow-md); }

.post-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.post-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #54b666, #00703C);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,112,60,0.2);
}
.post-meta { flex: 1; min-width: 0; }
.post-author {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 6px;
}
.post-stall-tag {
  font-size: 0.73rem;
  background: var(--green-pale);
  color: var(--green-deep);
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 600;
}
.post-time {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 2px;
}
.post-stars { display: flex; gap: 2px; margin-top: 4px; }
.post-stars i { font-size: 0.8rem; color: #f5c842; }
.post-stars i.empty { color: #e0e8e3; }

.post-options { position: relative; }
.btn-options {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}
.btn-options:hover { background: var(--green-pale); color: var(--green-deep); }
.options-menu {
  position: absolute;
  top: 100%; right: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  min-width: 130px;
  z-index: 50;
  display: none;
  overflow: hidden;
}
.options-menu.open { display: block; animation: fadeDown 0.15s ease; }
@keyframes fadeDown { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.options-menu button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 14px;
  background: none;
  border: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background 0.15s;
  text-align: left;
}
.options-menu button:hover { background: var(--green-pale); color: var(--green-deep); }
.options-menu button.danger:hover { background: #fef0f0; color: #e05555; }

/* Post body */
.post-body {
  font-size: 0.93rem;
  color: var(--ink);
  line-height: 1.65;
  margin-bottom: 12px;
  word-break: break-word;
  white-space: pre-wrap;
}
.post-img {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 12px;
  cursor: pointer;
  transition: opacity 0.2s;
}
.post-img:hover { opacity: 0.92; }

/* Actions row */
.post-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}
.btn-action {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--muted);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 20px;
  transition: all 0.2s;
}
.btn-action:hover { background: var(--green-pale); color: var(--green-deep); }
.btn-action.liked { color: #e05555; }
.btn-action.liked i { color: #e05555; }
.btn-action i { font-size: 0.95rem; }

/* Comments section */
.comments-section {
  margin-top: 12px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
  display: none;
}
.comments-section.open { display: block; }
.comment-item {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  animation: slideIn 0.2s ease;
}
.comment-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green-light), var(--green-mid));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}
.comment-bubble {
  background: var(--green-pale);
  border-radius: 0 12px 12px 12px;
  padding: 8px 12px;
  flex: 1;
}
.comment-author { font-weight: 700; font-size: 0.8rem; color: var(--ink); }
.comment-text { font-size: 0.83rem; color: var(--ink-soft); margin-top: 2px; line-height: 1.5; }

.comment-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}
.comment-input {
  flex: 1;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 8px 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  color: var(--ink);
  background: var(--cream);
  outline: none;
  transition: border-color 0.2s;
}
.comment-input:focus { border-color: var(--green-light); }
.btn-send-comment {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--green-deep);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: background 0.2s, transform 0.15s;
  flex-shrink: 0;
}
.btn-send-comment:hover { background: var(--green-mid); transform: scale(1.08); }


.sidebar-right {
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar-widget {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 18px;
}
.widget-title {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 14px;
}

/* Rating summary */
.avg-score {
  font-family: 'Playfair Display', serif;
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--green-deep);
  text-align: center;
  line-height: 1;
}
.avg-stars {
  display: flex;
  justify-content: center;
  gap: 3px;
  margin: 6px 0;
}
.avg-stars i { color: #f5c842; font-size: 0.85rem; }
.avg-stars i.empty { color: #e0e8e3; }
.avg-count { text-align: center; font-size: 0.78rem; color: var(--muted); margin-bottom: 14px; }

.rating-bars { display: flex; flex-direction: column; gap: 6px; }
.rbar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--muted);
}
.rbar-row > span:first-child { width: 20px; text-align: right; }
.rbar-row > span:last-child { width: 18px; text-align: left; color: var(--ink-soft); font-weight: 600; }
.rbar { flex: 1; height: 7px; background: var(--green-pale); border-radius: 5px; overflow: hidden; }
.rbar-fill { height: 100%; background: linear-gradient(90deg, var(--green-light), var(--green-deep)); border-radius: 5px; transition: width 0.6s ease; }

/* Top stalls */
.top-stalls { display: flex; flex-direction: column; gap: 8px; }
.stall-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
}
.stall-name { color: var(--ink-soft); font-weight: 500; }
.stall-rating { color: var(--green-deep); font-weight: 700; display: flex; align-items: center; gap: 4px; }
.stall-rating i { color: #f5c842; font-size: 0.75rem; }
.no-data { font-size: 0.82rem; color: var(--muted); text-align: center; display: block; padding: 8px 0; }


.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8,20,12,0.55);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px 28px 24px;
  text-align: center;
  box-shadow: var(--shadow-md);
  animation: popIn 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes popIn { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-icon { font-size: 2rem; margin-bottom: 10px; }
.modal-box h3 { font-family: 'Playfair Display', serif; font-size: 1.3rem; color: var(--ink); margin-bottom: 6px; }
.modal-box p { font-size: 0.87rem; color: var(--muted); margin-bottom: 20px; }
.modal-actions { display: flex; gap: 10px; justify-content: center; }
.btn-cancel {
  padding: 9px 22px;
  border: 1.5px solid var(--border);
  background: transparent;
  border-radius: 20px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.2s;
}
.btn-cancel:hover { background: var(--cream); }
.btn-delete-confirm {
  padding: 9px 22px;
  background: #e05555;
  border: none;
  border-radius: 20px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: white;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-delete-confirm:hover { background: #c44040; transform: translateY(-1px); }

/* ── TOAST ── */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: white;
  padding: 12px 22px;
  border-radius: 24px;
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  z-index: 999;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
  white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.green { background: var(--green-deep); }




#star-select-filter {
  appearance: none; 
  -webkit-appearance: none;
  
  height: 38px;
  min-width: 160px;
  padding: 0 35px 0 16px;
  border-radius: 20px;
  background-color: var(--cream);
  border: 1.5px solid var(--border);
  color: var(--ink-soft);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  
  /* Custom Arrow */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%237a8c80' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px;
}

#star-select-filter:hover {
  background-color: var(--green-pale);
  border-color: var(--green-light);
}

/* --- STICKY SIDEBARS FIX --- */
.feed-layout {
  align-items: start; /* Crucial for sticky to work */
}

.sidebar-left, .sidebar-right {
  position: sticky;
  top: 90px; /* Distance from top of viewport */
  height: fit-content;
}

/* --- REACTION SYSTEM (Facebook Style) --- */
.reaction-container {
  position: relative;
  display: inline-block;
}

.reactions-popover {
  position: absolute;
  bottom: 100%;
  left: 0;
  background: white;
  border-radius: 30px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  display: flex;
  padding: 5px 10px;
  gap: 8px;
  visibility: hidden;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.2s ease;
  z-index: 10;
}

.reaction-container:hover .reactions-popover {
  visibility: visible;
  opacity: 1;
  transform: translateY(-5px);
}

.react-emoji {
  font-size: 1.5rem;
  cursor: pointer;
  transition: transform 0.2s;
}

.react-emoji:hover {
  transform: scale(1.3);
}

/* Reaction Button Active State */
.btn-action.reacted {
  color: var(--green-deep);
  font-weight: bold;
}

/* Image preview height fix */
.post-img {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-top: 10px;
}



/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  .navbar { padding: 0 5%; }
  .hero { padding: 50px 5% 60px; }
  .section { padding: 40px 5%; }
  .nav-right a:not(.alert):not(.show-login) { display: none; }
}
