/* ============================================================
   FOODZIPPY COMMUNITY MODULE — CSS
   Dark premium theme matching main FoodZippy design
   ============================================================ */

/* ---- Layout ---- */
.community-page {
  min-height: 100vh;
  background: #000000;
  color: #fff;
  padding-top: 0;
}

.community-layout {
  display: flex;
  min-height: 100vh;
  background: #000000;
  max-width: 100%;
}

/* ---- Left Fixed Instagram Sidebar ---- */
.community-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 245px;
  background: #000000;
  border-right: 1px solid rgba(255, 255, 255, 0.15);
  padding: 2.5rem 1.2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 1000;
  box-sizing: border-box;
}

.sidebar-logo-container {
  padding: 0 12px;
  margin-bottom: 2.5rem;
}

.sidebar-logo-container img {
  height: 48px;
  display: block;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 14px 16px;
  border-radius: 12px;
  color: #ccc;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  box-sizing: border-box;
}

.sidebar-nav-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.sidebar-nav-item.active {
  color: var(--accent-color);
  background: rgba(255, 255, 255, 0.05);
}

.sidebar-nav-item i {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.sidebar-badge {
  position: absolute;
  top: 8px;
  left: 28px;
  background: var(--accent-color);
  color: #000;
  font-size: 0.65rem;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 2px;
  box-shadow: 0 0 0 2px #000;
}

/* Sidebar Footer Links */
.sidebar-footer {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1rem;
}

/* ---- Feed Area ---- */
.feed-area {
  flex: 1;
  margin-left: 245px;
  max-width: 935px;
  margin-right: auto;
  padding: 3rem 2rem;
  box-sizing: border-box;
}

@media (min-width: 1251px) {
  .feed-area {
    margin-right: 2rem;
  }
}

/* Responsive sidebar rules for Instagram structure */
.community-navbar {
  display: block;
}

@media (min-width: 901px) {
  .community-navbar {
    display: none !important;
  }
}

@media (max-width: 900px) {
  .community-sidebar {
    width: 72px;
    padding: 2rem 0.5rem;
    align-items: center;
  }
  
  .sidebar-logo-container {
    display: none;
  }
  
  .sidebar-nav-item {
    justify-content: center;
    padding: 14px;
  }
  
  .sidebar-nav-item span {
    display: none;
  }
  
  .sidebar-footer {
    border-top: none;
    width: 100%;
  }
  
  .feed-area {
    margin-left: 72px;
    padding: 2rem 1rem;
  }
  
  .community-page {
    padding-top: 80px; /* Space for mobile top bar */
  }
}

@media (max-width: 600px) {
  .community-sidebar {
    position: fixed;
    bottom: 0;
    top: auto;
    left: 0;
    right: 0;
    width: 100%;
    height: 60px;
    border-right: none;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    flex-direction: row;
    justify-content: space-around;
    padding: 0;
    align-items: center;
    background: #000000;
    z-index: 1000;
  }
  
  .sidebar-logo-container, .sidebar-footer {
    display: none !important;
  }
  
  .sidebar-nav-item {
    width: auto;
    padding: 8px;
  }
  
  .feed-area {
    margin-left: 0;
    margin-bottom: 60px;
    padding: 1rem;
  }
}

.tab-bar {
  display: flex;
  gap: 0.5rem;
  background: rgba(255,255,255,0.04);
  padding: 6px;
  border-radius: 16px;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(255,255,255,0.06);
}

.tab-btn {
  flex: 1;
  padding: 10px 16px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: #888;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Inter', sans-serif;
}
.tab-btn.active {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  color: #fff;
  box-shadow: 0 4px 15px rgba(220, 39, 67, 0.3);
}
.tab-btn:hover:not(.active) { background: rgba(255,255,255,0.06); color: #fff; }

/* ---- Post Composer ---- */
.post-composer {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.composer-top {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.avatar-circle {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff4d4d, #f7c150);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1.1rem; color: #000;
  flex-shrink: 0;
}

.composer-textarea {
  flex: 1;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  padding: 14px 18px;
  color: #fff;
  font-size: 0.95rem;
  resize: none;
  min-height: 80px;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.2s;
}
.composer-textarea:focus { outline: none; border-color: rgba(255,107,53,0.5); }
.composer-textarea::placeholder { color: #555; }

.composer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.composer-image-input {
  flex: 1;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 8px 14px;
  color: #aaa;
  font-size: 0.85rem;
  font-family: 'Inter', sans-serif;
}
.composer-image-input:focus { outline: none; border-color: rgba(255,107,53,0.4); }

.btn-post {
  padding: 10px 28px;
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  border: none; border-radius: 12px;
  color: #fff; font-weight: 700; font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 15px rgba(220, 39, 67, 0.25);
  font-family: 'Inter', sans-serif;
}
.btn-post:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(220, 39, 67, 0.4); }

/* ---- Post Card ---- */
.post-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  position: relative;
}
.post-card:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(0,0,0,0.15); }
.post-card.pinned { border-left: 4px solid var(--accent-color); background: var(--accent-light); }

.post-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; }
.post-author-info { flex: 1; }
.post-author-name { font-weight: 700; font-size: 0.95rem; color: var(--text-primary); }
.post-meta { font-size: 0.8rem; color: var(--text-secondary); display: flex; gap: 0.5rem; align-items: center; }
.post-group-tag { color: var(--accent-color); font-weight: 600; cursor: pointer; }
.post-group-tag:hover { text-decoration: underline; }
.pin-badge { background: var(--accent-light); color: var(--accent-color); font-size: 0.7rem; font-weight: 700; padding: 2px 8px; border-radius: 20px; letter-spacing: 1px; text-transform: uppercase; }

.post-content { color: var(--text-primary); line-height: 1.7; margin-bottom: 1rem; font-size: 0.95rem; }

.post-image {
  width: 100%; max-height: 300px;
  object-fit: cover;
  border-radius: 14px;
  margin-bottom: 1rem;
}

.post-actions { display: flex; align-items: center; gap: 1rem; border-top: 1px solid var(--border-color); padding-top: 0.75rem; }

.action-btn {
  display: flex; align-items: center; gap: 6px;
  background: transparent; border: none;
  color: var(--text-secondary); font-size: 0.85rem; font-weight: 600;
  cursor: pointer; padding: 6px 12px; border-radius: 10px;
  transition: all 0.2s; font-family: 'Inter', sans-serif;
}
.action-btn:hover { background: rgba(255,255,255,0.06); color: #fff; }
.action-btn.liked { color: var(--accent-color); }
.action-btn.liked:hover { background: var(--accent-light); }

.heart-icon { transition: transform 0.15s; }
.action-btn.liked .heart-icon { transform: scale(1.2); }

.post-admin-actions { margin-left: auto; display: flex; gap: 0.5rem; }
.admin-btn {
  background: transparent; border: 1px solid rgba(255,255,255,0.1);
  color: #888; font-size: 0.75rem; padding: 4px 10px; border-radius: 8px;
  cursor: pointer; transition: all 0.2s; font-family: 'Inter', sans-serif;
}
.admin-btn:hover { border-color: var(--accent-hover); color: var(--accent-color); }
.admin-btn.pin:hover { border-color: #f7c150; color: #f7c150; }

/* ---- Comments ---- */
.comments-section { margin-top: 1rem; border-top: 1px solid rgba(255,255,255,0.06); padding-top: 1rem; display: none; }
.comments-section.open { display: block; }

.comment-item {
  display: flex; gap: 0.75rem; margin-bottom: 1rem;
}
.comment-avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg,#8b5cf6,#ec4899); display:flex;align-items:center;justify-content:center;font-size:0.8rem;font-weight:700;color:#fff;flex-shrink:0; }
.comment-body { flex: 1; background: rgba(255,255,255,0.04); border-radius: 14px; padding: 10px 14px; }
.comment-author { font-weight: 700; font-size: 0.85rem; color: #fff; margin-bottom: 3px; }
.comment-text { color: #bbb; font-size: 0.875rem; line-height: 1.5; }
.comment-time { font-size: 0.75rem; color: #555; margin-top: 4px; }
.reply-btn { background:none;border:none;color:var(--accent-color);font-size:0.75rem;cursor:pointer;padding:0;margin-top:4px;font-family:'Inter',sans-serif; }

.replies { margin-left: 2.5rem; margin-top: 0.5rem; }

.comment-input-row { display: flex; gap: 0.75rem; margin-top: 0.75rem; }
.comment-input {
  flex: 1; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px; padding: 10px 14px; color: #fff; font-size: 0.875rem;
  font-family: 'Inter', sans-serif;
}
.comment-input:focus { outline:none; border-color: var(--accent-color); }
.btn-comment-submit {
  padding: 8px 18px; background: var(--gradient-accent);
  border:none;border-radius:10px;color:#000;font-weight:800;cursor:pointer;
  font-family:'Inter',sans-serif; font-size:0.85rem;
}

/* ---- Group Card ---- */
.groups-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; }

.group-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s;
  cursor: pointer;
}
.group-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,0.4); border-color: rgba(255,107,53,0.2); }

.group-cover {
  height: 100px;
  background: linear-gradient(135deg, #ff4d4d 0%, #ff6b35 50%, #f7c150 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem;
  position: relative;
}
.group-cover.alt1 { background: linear-gradient(135deg, #7c3aed, #ec4899); }
.group-cover.alt2 { background: linear-gradient(135deg, #059669, #10b981); }
.group-cover.alt3 { background: linear-gradient(135deg, #1d4ed8, #7c3aed); }

.group-card-body { padding: 1.25rem; }
.group-card-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 0.6rem; }
.group-card-name { font-weight: 700; font-size: 1rem; color: #fff; }

.type-badge {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  padding: 3px 10px; border-radius: 20px;
}
.type-badge.public { background: rgba(16,185,129,0.15); color: #10b981; border: 1px solid rgba(16,185,129,0.3); }
.type-badge.private { background: rgba(247,193,80,0.15); color: #f7c150; border: 1px solid rgba(247,193,80,0.3); }

.group-desc { font-size: 0.85rem; color: #888; line-height: 1.5; margin-bottom: 1rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.group-stats { display: flex; gap: 1rem; font-size: 0.8rem; color: #666; margin-bottom: 1rem; }
.group-stats span { display: flex; align-items: center; gap: 4px; }

.btn-join {
  width: 100%; padding: 10px; border-radius: 12px;
  border: 1px solid var(--accent-color); background: var(--accent-light);
  color: var(--accent-color); font-weight: 700; font-size: 0.875rem;
  cursor: pointer; transition: all 0.2s; font-family: 'Inter', sans-serif;
}
.btn-join:hover { background: var(--accent-light); border-color: var(--accent-color); }
.btn-join.joined { background: rgba(16,185,129,0.1); color: #10b981; border-color: rgba(16,185,129,0.3); }
.btn-join.pending { background: rgba(247,193,80,0.1); color: #f7c150; border-color: rgba(247,193,80,0.3); }

/* ---- Notification Bell ---- */
.notif-wrapper { position: relative; }

.notif-bell {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 50%;
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}
.notif-bell:hover { background: var(--accent-light); border-color: var(--accent-color); }

.notif-badge {
  position: absolute; top: -4px; right: -4px;
  background: var(--accent-color); color: #000;
  font-size: 0.65rem; font-weight: 800;
  min-width: 18px; height: 18px;
  border-radius: 9px; display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
  animation: notifPulse 2s infinite;
}
@keyframes notifPulse {
  0%,100% { box-shadow: 0 0 0 0 var(--accent-light); }
  50%      { box-shadow: 0 0 0 6px rgba(247,193,80,0); }
}

/* ---- Notifications Drawer (Instagram Style) ---- */
.notif-drawer {
  position: fixed;
  top: 0;
  left: 245px;
  width: 360px;
  height: 100vh;
  background: #000000;
  border-right: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
  z-index: 999; /* Just below sidebar which has z-index 1000 */
  transform: translateX(-150%); /* Fully hidden behind sidebar */
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  padding: 2.5rem 1.5rem 1.5rem;
}

.notif-drawer.open {
  transform: translateX(0);
}

.notif-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 1rem;
}

.notif-drawer-header h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0;
  color: #fff;
}

.mark-all-read-btn {
  background: none;
  border: none;
  color: #ff6b35;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: color 0.2s;
}
.mark-all-read-btn:hover {
  color: #ff4d4d;
}

.close-drawer-btn {
  background: none;
  border: none;
  color: #888;
  font-size: 1.2rem;
  cursor: pointer;
  transition: color 0.2s;
}
.close-drawer-btn:hover {
  color: #fff;
}

.notif-drawer-list {
  flex: 1;
  overflow-y: auto;
  margin-right: -10px;
  padding-right: 10px;
}

/* Custom scrollbar for drawer list */
.notif-drawer-list::-webkit-scrollbar {
  width: 5px;
}
.notif-drawer-list::-webkit-scrollbar-track {
  background: transparent;
}
.notif-drawer-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.notif-item {
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: background 0.15s;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  border-radius: 12px;
  margin-bottom: 6px;
}
.notif-item:hover { background: rgba(255, 255, 255, 0.04); }
.notif-item.unread { background: var(--accent-light); border-left: 3px solid var(--accent-color); }
.notif-icon { width: 32px; height: 32px; border-radius: 50%; background: var(--accent-light); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 1rem; }
.notif-text { font-size: 0.85rem; color: #ccc; line-height: 1.4; font-family: 'Inter', sans-serif; }
.notif-time { font-size: 0.75rem; color: #555; margin-top: 2px; font-family: 'Inter', sans-serif; }

.notif-empty { padding: 2rem; text-align: center; color: #555; font-size: 0.9rem; font-family: 'Inter', sans-serif; }

@media (max-width: 900px) {
  .notif-drawer {
    left: 72px;
    padding-top: 2rem;
  }
}

@media (max-width: 600px) {
  .notif-drawer {
    left: 0;
    top: auto;
    bottom: 60px; /* Above bottom bar */
    width: 100%;
    height: 60vh;
    border-right: none;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px 20px 0 0;
    transform: translateY(150%);
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.5);
    padding: 1.5rem;
  }
  .notif-drawer.open {
    transform: translateY(0);
  }
}

/* ---- Right Ads Sidebar ---- */
.ads-sidebar {
  width: 330px;
  padding: 3rem 2rem 3rem 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  flex-shrink: 0;
}

.sponsored-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 0.75rem;
  margin-bottom: 0.5rem;
}

.ads-label {
  font-size: 0.7rem;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 8px;
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.6);
}

.ad-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.ad-card:hover {
  transform: translateY(-2px);
  border-color: rgba(225, 48, 108, 0.3);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.ad-image-container {
  position: relative;
  height: 140px;
  width: 100%;
}

.ad-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ad-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: linear-gradient(45deg, #f09433, #dc2743);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 6px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.ad-content {
  padding: 1rem;
}

.ad-title {
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 6px 0;
}

.ad-desc {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.4;
  margin: 0 0 12px 0;
}

.ad-cta-btn {
  display: block;
  text-align: center;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #fff;
  text-decoration: none;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.82rem;
  transition: all 0.2s;
}

.ad-cta-btn:hover {
  background: linear-gradient(45deg, #f09433, #dc2743, #bc1888);
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(220, 39, 67, 0.25);
}

@media (max-width: 1250px) {
  .ads-sidebar {
    display: none !important;
  }
}
/* ---- Group Hero (detail page) ---- */
.group-hero {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 3rem 0 2rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
  transition: background 0.3s ease, border-color 0.3s ease;
}
.group-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255, 209, 59, 0.05), rgba(255, 255, 255, 0.01));
  pointer-events: none;
}
.group-hero .container { position: relative; z-index: 1; }
.group-hero-name { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; color: var(--text-primary) !important; margin-bottom: 0.5rem; text-shadow: none; }
.group-hero-desc { color: var(--text-secondary); font-size: 1.05rem; max-width: 600px; margin-bottom: 1.5rem; font-weight: 500; }
.group-hero-stats { display: flex; gap: 2rem; margin-bottom: 1.5rem; }
.group-hero-stat { text-align: center; }
.group-hero-stat .stat-num { font-size: 1.5rem; font-weight: 800; background: var(--gradient-accent); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.group-hero-stat .stat-lbl { font-size: 0.8rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 1px; font-weight: 600; }
.group-hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ---- Modal ---- */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
  z-index: 2000;
  display: none; align-items: center; justify-content: center;
}
.modal-overlay.open { display: flex; animation: fadeIn 0.2s ease; }
@keyframes fadeIn { from{opacity:0}to{opacity:1} }

.modal-card {
  background: #0f1016;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 24px;
  padding: 2rem;
  width: 100%; max-width: 500px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
  animation: slideUp 0.25s ease;
  max-height: 90vh; overflow-y: auto;
}
@keyframes slideUp { from{transform:translateY(20px);opacity:0}to{transform:translateY(0);opacity:1} }

.modal-title { font-size: 1.4rem; font-weight: 700; color: #fff; margin-bottom: 1.5rem; }
.modal-close { float: right; background:none;border:none;color:#666;font-size:1.2rem;cursor:pointer; }

/* ---- Form Fields ---- */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-size: 0.85rem; font-weight: 600; color: #aaa; margin-bottom: 0.5rem; text-transform: uppercase; letter-spacing: 1px; }
.form-input, .form-select, .form-textarea {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 12px 16px;
  color: #fff; font-size: 0.9rem; font-family: 'Inter', sans-serif;
  transition: border-color 0.2s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none; border-color: rgba(225,48,108,0.6);
  box-shadow: 0 0 0 3px rgba(225,48,108,0.1);
}
.form-select { cursor: pointer; }
.form-select option { background: #0f1016; color: #fff; }
.form-textarea { resize: vertical; min-height: 100px; }

.radio-group { display: flex; gap: 1rem; }
.radio-label { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; color: #ccc; font-size: 0.9rem; }
.radio-label input { accent-color: var(--accent-color); }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .community-layout { grid-template-columns: 1fr; }
  .community-sidebar { position: static; }
}
@media (max-width: 600px) {
  .tab-btn { font-size: 0.8rem; padding: 8px 10px; }
  .groups-grid { grid-template-columns: 1fr; }
  .notif-dropdown { width: 290px; }
}

/* ---- Member Badge ---- */
.member-badge {
  font-size: 0.7rem; font-weight: 700; padding: 2px 8px; border-radius: 20px; text-transform: uppercase; letter-spacing: 0.5px;
}
.member-badge.admin { background: rgba(247,193,80,0.2); color: #f7c150; }
.member-badge.moderator { background: rgba(139,92,246,0.2); color: #8b5cf6; }
.member-badge.member { background: rgba(255,255,255,0.08); color: #aaa; }

/* ---- Load More ---- */
.btn-load-more {
  width: 100%; padding: 14px; background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1); border-radius: 14px;
  color: #888; font-weight: 600; cursor: pointer; margin-top: 1rem;
  transition: all 0.2s; font-family: 'Inter', sans-serif;
}
.btn-load-more:hover { background: var(--accent-light); color: var(--accent-color); border-color: var(--accent-color); }

/* ---- Section Header ---- */
.feed-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.5rem;
}
.feed-title { font-size: 1.1rem; font-weight: 700; color: #fff; }
.feed-count { font-size: 0.8rem; color: #666; }

/* ---- Instagram Stories & Snaps Upgrades ---- */
.insta-stories-bar::-webkit-scrollbar {
  display: none;
}
.story-item:hover {
  transform: scale(1.05);
}

/* Snap/Story Viewer Styles */
.snap-viewer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.97);
  backdrop-filter: blur(20px);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.4,0,0.2,1);
}
.snap-viewer-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
/* Pause indicator on hold */
.snap-pause-indicator {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
  background: rgba(0,0,0,0.55);
  border-radius: 50%;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  opacity: 0;
  transition: opacity 0.18s ease;
  pointer-events: none;
}
.snap-pause-indicator.show { opacity: 1; }
.snap-pause-indicator svg { width: 32px; height: 32px; color: #fff; }
/* Snap reaction tray */
.snap-reaction-tray {
  position: absolute;
  bottom: 85px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(12px);
  padding: 10px 18px;
  border-radius: 40px;
  border: 1px solid rgba(255,255,255,0.12);
  z-index: 15;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}
.snap-reaction-tray.show {
  opacity: 1;
  pointer-events: auto;
}
.snap-reaction-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 2px 4px;
  transition: transform 0.2s cubic-bezier(0.175,0.885,0.32,1.275);
  line-height: 1;
}
.snap-reaction-btn:hover { transform: scale(1.4); }
/* Snap reply input bar */
.snap-reply-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 16px;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%);
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 15;
}
.snap-reply-input {
  flex: 1;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 24px;
  padding: 9px 16px;
  color: #fff;
  font-size: 0.88rem;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color 0.2s;
}
.snap-reply-input::placeholder { color: rgba(255,255,255,0.5); }
.snap-reply-input:focus { border-color: rgba(255,255,255,0.5); }
.snap-reply-send-btn {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 6px;
  opacity: 0.8;
  transition: opacity 0.2s, transform 0.2s;
}
.snap-reply-send-btn:hover { opacity: 1; transform: scale(1.1); }
/* Nav arrows for keyboard */
.snap-arrow-hint {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.3);
  font-size: 2rem;
  pointer-events: none;
  z-index: 8;
  transition: color 0.2s;
}
.snap-arrow-hint.left { left: 10px; }
.snap-arrow-hint.right { right: 10px; }
.snap-container:hover .snap-arrow-hint { color: rgba(255,255,255,0.55); }
/* Story unread count badge */
.story-unread-count {
  position: absolute;
  bottom: -3px;
  right: -3px;
  background: var(--accent-color);
  color: #000;
  font-size: 0.6rem;
  font-weight: 800;
  min-width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #06060b;
  box-shadow: 0 2px 6px rgba(225,48,108,0.5);
}
.snap-container {
  width: 100%;
  max-width: 420px;
  height: 100%;
  max-height: 85vh;
  background: #000;
  border-radius: 20px;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.8);
  border: 1px solid rgba(255,255,255,0.1);
}
@media (max-height: 600px) or (max-width: 450px) {
  .snap-container {
    max-height: 100vh;
    border-radius: 0;
    border: none;
  }
}
.snap-progress-bar-wrapper {
  position: absolute;
  top: 15px;
  left: 10px;
  right: 10px;
  display: flex;
  gap: 6px;
  z-index: 10;
}
.snap-progress-segment {
  flex: 1;
  height: 3px;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 2px;
  overflow: hidden;
}
.snap-progress-fill {
  height: 100%;
  width: 0%;
  background: #fff;
  transition: width 0.1s linear;
}
.snap-progress-fill.completed {
  width: 100% !important;
}
.snap-header {
  position: absolute;
  top: 30px;
  left: 0;
  right: 0;
  padding: 10px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
  background: linear-gradient(to bottom, rgba(0,0,0,0.8) 0%, transparent 100%);
}
.snap-sender-info {
  display: flex;
  align-items: center;
  gap: 10px;
}
.snap-sender-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50% !important;
  object-fit: cover;
  border: 2px solid #fff;
}
.snap-sender-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}
.snap-time-ago {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.7);
  margin-left: 6px;
}
.snap-close-btn {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 5px;
  outline: none;
}
.snap-close-btn i {
  width: 22px;
  height: 22px;
}
.snap-media-content {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.snap-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.snap-navigation-hitbox {
  position: absolute;
  top: 60px;
  bottom: 60px;
  width: 50%;
  z-index: 5;
  cursor: pointer;
}
.snap-hitbox-left {
  left: 0;
}
.snap-hitbox-right {
  right: 0;
}
.snap-caption-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 30px 20px 25px;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.6) 70%, transparent 100%);
  z-index: 10;
  color: #fff;
  text-align: center;
}
.snap-caption-text {
  font-size: 0.95rem;
  line-height: 1.5;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
  margin: 0;
  font-family: 'Inter', sans-serif;
}

/* Avatar Rings for Stories */
.story-avatar-container.unviewed {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}
.story-avatar-container.viewed {
  background: rgba(255, 255, 255, 0.15);
}

/* Send Snap modal overlay with unique prefix to avoid modal overlay conflict */
.snap-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(14px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.4,0,0.2,1);
}
.snap-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.snap-modal-overlay .join-modal-box {
  background: #0f0f15;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 24px;
  max-width: 500px;
  width: 90%;
  padding: 2.5rem;
  position: relative;
  transform: translateY(30px) scale(0.97);
  transition: transform 0.35s cubic-bezier(0.175,0.885,0.32,1.275);
  text-align: left;
  max-height: 90vh;
  overflow-y: auto;
}
.snap-modal-overlay.active .join-modal-box {
  transform: translateY(0) scale(1);
}
/* Image Preview in Snap Modal */
.snap-preview-container {
  width: 100%;
  aspect-ratio: 4/3;
  background: rgba(255,255,255,0.04);
  border: 2px dashed rgba(255,255,255,0.12);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  transition: border-color 0.2s;
  margin-bottom: 1rem;
}
.snap-preview-container:hover { border-color: rgba(240,148,51,0.5); }
.snap-preview-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
  border-radius: 14px;
}
.snap-preview-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: rgba(255,255,255,0.4);
}
.snap-preview-placeholder svg { width: 48px; height: 48px; }
.snap-preview-placeholder span { font-size: 0.85rem; font-weight: 600; }
/* File upload tabs */
.snap-upload-tabs {
  display: flex;
  gap: 0;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 1rem;
}
.snap-upload-tab {
  flex: 1;
  padding: 8px;
  background: rgba(255,255,255,0.02);
  border: none;
  color: rgba(255,255,255,0.5);
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.snap-upload-tab.active {
  background: rgba(240,148,51,0.15);
  color: #f09433;
}
.snap-upload-tab:hover:not(.active) {
  background: rgba(255,255,255,0.05);
  color: #fff;
}

/* Instagram Post Card Overrides */
.instagram-post-card {
  background: #000000 !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 12px !important;
  padding: 0 !important;
  overflow: hidden;
  margin-bottom: 24px;
  border-left: none !important;
  border-image: none !important;
}
.instagram-post-card .post-header {
  padding: 12px 16px;
  margin-bottom: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.instagram-post-card .post-content {
  padding: 12px 16px 6px;
  font-size: 0.92rem;
  line-height: 1.5;
}
.instagram-post-card .post-image {
  margin: 0;
  border-radius: 0 !important;
  box-shadow: none;
  max-height: none !important;
  aspect-ratio: 1/1;
  object-fit: cover;
}
.instagram-post-card .post-actions {
  padding: 12px 16px 8px;
  justify-content: flex-start;
  gap: 16px;
  border-top: none;
}
.instagram-post-card .post-actions .action-btn {
  padding: 0;
  background: transparent;
  border: none;
  font-size: 0; /* Hide default counts, only show icons */
  color: rgba(255,255,255,0.9);
  transition: transform 0.2s ease, color 0.2s ease;
}
.instagram-post-card .post-actions .action-btn:hover {
  color: #fff;
  background: transparent;
  transform: scale(1.1);
}
.instagram-post-card .post-actions .action-btn i,
.instagram-post-card .post-actions .action-btn span.heart-icon {
  font-size: 24px;
  line-height: 24px;
}
.instagram-post-card .post-stats {
  padding: 0 16px 10px;
  border-bottom: none;
  margin-top: 0;
  font-size: 0.88rem;
  color: #fff;
  font-weight: 700;
}
.instagram-post-card .comments-section {
  margin-top: 0;
  padding: 0 16px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.instagram-post-card .comment-list {
  max-height: 180px;
  overflow-y: auto;
  margin-bottom: 12px;
  padding-top: 8px;
}
.instagram-post-card .comment-item {
  margin-bottom: 8px;
}

/* Premium Instagram Creative UI Additions */
body::before {
  content: '';
  position: fixed;
  top: -20%; left: -20%;
  width: 140%; height: 140%;
  background: radial-gradient(circle at 15% 15%, rgba(240, 148, 51, 0.04) 0%, transparent 40%),
              radial-gradient(circle at 85% 85%, rgba(188, 24, 136, 0.05) 0%, transparent 45%);
  pointer-events: none;
  z-index: -1;
}

@keyframes ringPulse {
  0% { box-shadow: 0 0 0 0 rgba(240, 148, 51, 0.4); }
  70% { box-shadow: 0 0 0 6px rgba(220, 39, 67, 0); }
  100% { box-shadow: 0 0 0 0 rgba(220, 39, 67, 0); }
}
.story-avatar-container.unviewed {
  animation: ringPulse 2.3s infinite ease-in-out;
}

.post-image-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #000;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.post-image-container img {
  width: 100%;
  height: auto;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.post-image-container:hover img {
  transform: scale(1.02);
}

.double-tap-heart {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  font-size: 70px;
  pointer-events: none;
  z-index: 10;
  opacity: 0;
  user-select: none;
}
.double-tap-heart.show-pop {
  animation: heartPop 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
@keyframes heartPop {
  0% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
  15% { transform: translate(-50%, -50%) scale(1.3); opacity: 0.9; }
  30% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  75% { transform: translate(-50%, -50%) scale(1); opacity: 0.9; }
  100% { transform: translate(-50%, -50%) scale(1.8); opacity: 0; }
}

.instagram-post-card .post-actions .action-btn:hover {
  transform: scale(1.2);
  color: var(--accent-color) !important;
}
.instagram-post-card .post-actions .action-btn:active {
  transform: scale(0.9);
}

/* ============================================================
   INSTAGRAM GRID LAYOUT REDESIGN & LIGHTBOX MODAL
   ============================================================ */
.posts-grid-layout {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  padding: 1rem 0;
}

.grid-post-card {
  position: relative;
  aspect-ratio: 1/1;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
}

.grid-post-card:hover {
  transform: scale(1.02);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  border-color: rgba(225, 48, 108, 0.3);
}

.grid-post-media-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.grid-post-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.grid-post-card:hover .grid-post-media {
  transform: scale(1.05);
}

.grid-post-text-fallback {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1f121a, #0c0812);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
  box-sizing: border-box;
}

.grid-post-text-fallback::before {
  content: '"';
  position: absolute;
  top: 10px;
  left: 20px;
  font-size: 5rem;
  font-family: serif;
  color: rgba(225, 48, 108, 0.15);
  line-height: 1;
}

.grid-post-text-content {
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-style: italic;
  font-weight: 500;
  line-height: 1.5;
  color: #fff;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.grid-post-text-author {
  font-size: 0.72rem;
  color: var(--accent-color);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 12px;
}

.grid-post-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 5;
}

.grid-post-card:hover .grid-post-overlay {
  opacity: 1;
}

.grid-post-stat {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
}

.grid-post-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 8px;
  border-radius: 20px;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 6;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.grid-post-badge.deal {
  background: linear-gradient(45deg, #f09433, #dc2743, #bc1888);
  color: #fff;
}

.grid-post-badge.prebook {
  background: linear-gradient(135deg, #f7c150, #d99b1c);
  color: #000;
}

/* Lightbox details modal layout */
#postDetailModal .modal-card,
#chefPostDetailModal .modal-card {
  max-width: 900px !important;
  width: 90vw;
  padding: 0 !important;
  border-radius: 20px;
  overflow: hidden;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.lightbox-layout {
  display: flex;
  height: 600px;
  max-height: 80vh;
}

@media (max-width: 768px) {
  .lightbox-layout {
    flex-direction: column;
    height: auto;
    max-height: 90vh;
    overflow-y: auto;
  }
}

.lightbox-media {
  flex: 1.3;
  background: #050505;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.lightbox-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lightbox-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #0b0b10;
  height: 100%;
}

@media (max-width: 768px) {
  .lightbox-details {
    height: auto;
  }
}

.lightbox-header {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lightbox-author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lightbox-author-name {
  font-weight: 700;
  font-size: 0.92rem;
  color: #fff;
}

.lightbox-author-meta {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.4);
}

.lightbox-caption-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.lightbox-caption {
  font-size: 0.9rem;
  line-height: 1.5;
  color: #ddd;
}

.lightbox-comment-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lightbox-actions-tray {
  padding: 14px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lightbox-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.lightbox-action-btn {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}

.lightbox-action-btn:hover {
  transform: scale(1.1);
  color: var(--accent-color);
}

.lightbox-action-btn.liked {
  color: var(--accent-color);
}

.lightbox-input-area {
  padding: 12px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  gap: 10px;
  align-items: center;
  background: #0f0f15;
}

.lightbox-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 8px 16px;
  color: #fff;
  font-size: 0.85rem;
  outline: none;
}

.lightbox-input:focus {
  border-color: rgba(225, 48, 108, 0.5);
}

.lightbox-post-btn {
  background: none;
  border: none;
  color: #0095f6;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
}

/* =================================================================
   DYNAMIC LIGHT AND DARK THEME VARIABLES & OVERRIDES
   ================================================================= */
body:not(.dark-theme) {
  --bg-primary: #f8f9fa;
  --bg-secondary: #ffffff;
  --text-primary: #1a1d20;
  --text-secondary: #495057;
  --border-color: rgba(0, 0, 0, 0.08);
  --hover-bg: rgba(0, 0, 0, 0.04);
  --input-bg: #f1f3f5;
  --accent-color: #10b981;
  --accent-hover: #059669;
  --gradient-accent: linear-gradient(45deg, #ffd13b, #10b981);
  --accent-light: rgba(16, 185, 129, 0.12);
}

body.dark-theme {
  --bg-primary: #06060b;
  --bg-secondary: #0d0e15;
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.6);
  --border-color: rgba(255, 255, 255, 0.1);
  --hover-bg: rgba(255, 255, 255, 0.08);
  --input-bg: #171822;
  --accent-color: #10b981;
  --accent-hover: #34d399;
  --gradient-accent: linear-gradient(45deg, #ffd13b, #10b981);
  --accent-light: rgba(16, 185, 129, 0.15);
}

/* Base style hooks to variables */
.community-page, .community-layout {
  background: var(--bg-primary) !important;
  color: var(--text-primary) !important;
  transition: background 0.3s ease, color 0.3s ease;
}

.community-sidebar {
  background: var(--bg-secondary) !important;
  border-right-color: var(--border-color) !important;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.sidebar-nav-item {
  color: var(--text-secondary) !important;
  transition: background 0.2s ease, color 0.2s ease;
}

.sidebar-nav-item:hover {
  background: var(--hover-bg) !important;
  color: var(--text-primary) !important;
}

.sidebar-nav-item.active {
  color: var(--accent-color) !important;
  background: var(--hover-bg) !important;
}

.zipgram-logo-text {
  background: linear-gradient(135deg, #ffd13b 0%, #ffffff 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  display: inline-block;
  padding-bottom: 0.22em !important;
  line-height: 1.35 !important;
}

.sidebar-footer {
  border-top-color: var(--border-color) !important;
}

/* Feed & Tabs */
.tab-bar {
  background: var(--hover-bg) !important;
  border-color: var(--border-color) !important;
}

.tab-btn {
  color: var(--text-secondary) !important;
}

.tab-btn.active {
  background: var(--bg-secondary) !important;
  color: var(--accent-color) !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06) !important;
}

.insta-stories-bar {
  background: var(--bg-secondary) !important;
  border-color: var(--border-color) !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.04) !important;
}

.story-item span {
  color: var(--text-primary) !important;
}

/* Post Composer */
.post-composer {
  background: var(--bg-secondary) !important;
  border-color: var(--border-color) !important;
  box-shadow: 0 8px 30px rgba(0,0,0,0.04) !important;
}

.composer-textarea {
  color: var(--text-primary) !important;
}

.composer-actions {
  border-top-color: var(--border-color) !important;
}

/* Post Cards */
.grid-post-card {
  background: var(--bg-secondary) !important;
  border-color: var(--border-color) !important;
  box-shadow: 0 4px 15px rgba(0,0,0,0.02) !important;
}

.grid-post-card:hover {
  box-shadow: 0 10px 25px rgba(0,0,0,0.06) !important;
  border-color: rgba(225,48,108,0.2) !important;
}

.post-author-name {
  color: var(--text-primary) !important;
}

.post-group-badge {
  background: var(--hover-bg) !important;
  color: var(--text-secondary) !important;
}

.post-card-content {
  color: var(--text-primary) !important;
}

.post-actions-bar {
  border-top-color: var(--border-color) !important;
}

.post-action-btn {
  color: var(--text-secondary) !important;
}

.post-action-btn:hover {
  color: var(--accent-color) !important;
}

.comment-input-area {
  border-top-color: var(--border-color) !important;
}

.comment-input-field {
  color: var(--text-primary) !important;
}

/* Sponsored Ads Sidebar */
.ads-sidebar {
  background: var(--bg-secondary) !important;
  border-left-color: var(--border-color) !important;
}

.sponsored-header span {
  color: var(--text-primary) !important;
}

.ad-card {
  background: var(--bg-primary) !important;
  border-color: var(--border-color) !important;
}

.ad-title {
  color: var(--text-primary) !important;
}

.ad-desc {
  color: var(--text-secondary) !important;
}

.ad-cta-btn {
  background: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border-color) !important;
}

.ad-cta-btn:hover {
  background: var(--accent-color) !important;
  color: #000 !important;
  border-color: var(--accent-color) !important;
}

/* Modal and Form Inputs */
.modal-card {
  background: var(--bg-secondary) !important;
  border-color: var(--border-color) !important;
  box-shadow: 0 20px 50px rgba(0,0,0,0.15) !important;
}

.modal-title {
  color: var(--text-primary) !important;
}

.form-label {
  color: var(--text-secondary) !important;
}

.form-input, .form-textarea, .form-select {
  background: var(--input-bg) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-color) !important;
}

.form-select option {
  background: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
}

.btn-load-more {
  background: var(--hover-bg) !important;
  color: var(--text-secondary) !important;
  border: 1px solid var(--border-color) !important;
}

.btn-load-more:hover {
  background: var(--accent-light) !important;
  color: var(--accent-color) !important;
  border-color: var(--accent-color) !important;
}

/* Notifications Drawer */
.notif-drawer {
  background: var(--bg-secondary) !important;
  border-left-color: var(--border-color) !important;
  box-shadow: -10px 0 35px rgba(0,0,0,0.05) !important;
}

.notif-drawer-header {
  border-bottom-color: var(--border-color) !important;
  color: var(--text-primary) !important;
}

.notif-item {
  border-bottom-color: var(--border-color) !important;
}

.notif-item:hover {
  background: var(--hover-bg) !important;
}

.notif-item.unread {
  background: var(--accent-light) !important;
}

.notif-username {
  color: var(--text-primary) !important;
}

.notif-text {
  color: var(--text-secondary) !important;
}

/* Instagram Post Card Extra Polish */
.insta-post-card {
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.25s ease, border-color 0.25s ease;
}

.insta-post-card:hover {
  transform: translateY(-3px);
  border-color: rgba(247, 193, 80, 0.25) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12) !important;
}

body:not(.dark-theme) .insta-post-card:hover {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05) !important;
}

/* Double click heart animation */
@keyframes heartPop {
  0% { transform: scale(0); opacity: 0; }
  50% { transform: scale(1.2); opacity: 0.9; }
  100% { transform: scale(1); opacity: 1; }
}

.double-tap-heart {
  font-family: 'Outfit', sans-serif;
  filter: drop-shadow(0 4px 15px rgba(247, 193, 80, 0.4));
}

