/* ===== CSS Variables / Design Tokens ===== */
:root {
  --bg: hsl(210 20% 98%);
  --fg: hsl(220 26% 10%);
  --card: hsl(0 0% 100%);
  --card-fg: hsl(220 26% 10%);
  --primary: hsl(174 84% 32%);
  --primary-fg: hsl(0 0% 100%);
  --secondary: hsl(213 94% 60%);
  --secondary-fg: hsl(0 0% 100%);
  --muted: hsl(210 20% 95%);
  --muted-fg: hsl(215 16% 47%);
  --accent: hsl(38 92% 50%);
  --accent-fg: hsl(0 0% 100%);
  --destructive: hsl(0 84% 60%);
  --border: hsl(214 20% 90%);
  --radius: 0.75rem;
  --radius-lg: 1rem;
  --font-display: 'Montserrat', sans-serif;
  --font-body: 'Inter', sans-serif;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
  --transition: 200ms ease;
}

/* Sidebar styles (fallback import to guarantee availability on feed/explore) */
@import url('/static/mainapp/css/sidebars.css');

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }
input, textarea { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }

/* ===== Utilities ===== */
.hidden { display: none !important; }


/* ===== App Layout ===== */
.app-layout {
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  min-height: calc(100vh - 64px);
  overflow: visible;
}


/* ===== Feed Main ===== */
.feed-main {
  flex: 1;
  overflow-y: auto;
  padding: 20px 10px;
  min-width: 0;
}
.feed-header {
  display: flex;
  flex-direction: column;
  align-items: start;
  margin-top: 24px;
  margin-bottom: 16px;
  gap: 20px;
}
.feed-header h1 {
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sort-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.sort-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--fg);
  font-size: 12px;
  font-weight: 600;
  transition: all var(--transition);
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.sort-btn:hover {
  color: var(--primary);
  border-color: color-mix(in srgb, var(--primary) 40%, var(--border));
  box-shadow: var(--shadow-sm);
}
.sort-btn--active {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--primary-fg);
  border-color: transparent;
  box-shadow: 0 6px 18px rgba(13, 148, 136, 0.25);
}
.sort-btn--active:hover {
  color: var(--primary-fg);
}
.sort-btn svg { width: 14px; height: 14px; }

/* Post images */
.post-image-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  /* margin-top: 12px; */
}
.post-image-single-link {
  display: block;
  cursor: pointer;
  width: 100%;
  border: none;
  background: none;
  padding: 0;
}
.post-image-single {
  width: 100%;
  height: auto;
  max-height: 320px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-lg);
  display: block;
}
.post-image-masonry {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 140px;
  gap: 6px;
}
.post-image-masonry--3 { grid-template-columns: repeat(3, 1fr); }
.post-image-masonry--4 { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 120px; }
.post-image-masonry-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
}
.post-image-masonry-link {
  display: block;
  width: 100%;
  height: 100%;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
}
.post-image-masonry-item:last-child .post-image-more { border-radius: var(--radius); }
.post-image-masonry-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border: none;
  background: none;
  padding: 0;
}
.post-image-more {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  font-weight: 700;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.post-char-counter {
  font-size: 12px;
  color: var(--muted-fg);
  text-align: right;
  margin-top: 6px;
}
.post-char-counter.warning { color: #b45309; }
.post-char-counter.error { color: #dc2626; }
.post-image-hidden,
.post-image-hidden-img {
  display: none;
}
.create-post-trigger {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px;
  width: 100%;
  transition: background var(--transition);
  border-radius: var(--radius-lg);
}
.create-post-trigger:hover { background: var(--muted); }
.create-post-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  box-shadow: 0 4px 16px rgba(13, 148, 136, 0.3);
}
.create-post-icon svg { width: 28px; height: 28px; }
.create-post-trigger span { font-size: 13px; font-weight: 500; color: var(--muted-fg); }

.create-post-form { padding: 4px 0; }
.post-type-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.type-tab {
  font-size: 12px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--muted);
  color: var(--muted-fg);
  transition: all var(--transition);
}
.type-tab:hover { color: var(--fg); }
.type-tab.active { background: var(--primary); color: var(--primary-fg); }

.create-post-form textarea {
  width: 100%;
  resize: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 14px;
  background: var(--bg);
  outline: none;
  transition: box-shadow var(--transition);
}
.create-post-form textarea:focus { box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15); }
.create-post-form textarea::placeholder { color: var(--muted-fg); }
.create-post-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
}

.create-post-tools {
    display: flex;
    align-items: center;
    gap: 12px;
}

.create-post-tools-btn {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    height: auto;
    gap: 6px;
    padding: 6px 12px;
    background: var(--base-200, #f3f4f6);
    color: var(--base-content, #1f2937);
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.create-post-tools-btn svg{
    width: 20px;
    height: 20px;
}
/* Add post  */

.create-post-submit button{
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}
/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius);
  transition: all var(--transition);
  white-space: nowrap;
}
.btn--primary {
  background: var(--primary);
  color: var(--primary-fg);
}
.btn--primary:hover { opacity: 0.9; }
.btn--primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn--ghost { color: var(--muted-fg); }
.btn--ghost:hover { background: var(--muted); color: var(--fg); }
.btn--full { width: 100%; }
.btn--danger { color: var(--destructive); }
.btn--danger:hover { background: hsl(0 84% 60% / 0.08); }

/* ===== Post Card ===== */
.post-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
  transition: box-shadow var(--transition);
  animation: fadeIn 300ms ease;
}
.post-card:hover { box-shadow: var(--shadow-md); }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.post-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}
.post-author {
  display: flex;
  align-items: center;
  gap: 12px;
}
.post-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}
.post-author-name { font-family: var(--font-display); font-weight: 600; font-size: 14px; }
.post-author-meta { font-size: 12px; color: var(--muted-fg); }
.post-author-meta .post-type { color: var(--primary); font-weight: 500; }
.post-more-wrap {
  position: relative;
}
.post-more {
  padding: 4px;
  border-radius: var(--radius);
  color: var(--muted-fg);
  transition: all var(--transition);
}
.post-more:hover { background: var(--muted); color: var(--fg); }
.post-more svg { width: 16px; height: 16px; }
.post-content { font-size: 14px; line-height: 1.6; margin-bottom: 16px; }

/* ===== Post Image Gallery ===== */
.post-gallery {
  display: grid;
  gap: 4px;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
}
.post-gallery--1 { grid-template-columns: 1fr; }
.post-gallery--2 { grid-template-columns: 1fr 1fr; }
.post-gallery--3 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.post-gallery--3 .gallery-img:first-child { grid-row: 1 / 3; }
.post-gallery--4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.gallery-img {
  width: 100%;
  height: 100%;
  min-height: 140px;
  max-height: 280px;
  object-fit: cover;
  cursor: pointer;
  transition: opacity var(--transition);
}
.gallery-img:hover { opacity: 0.9; }
.gallery-placeholder {
  width: 100%;
  min-height: 140px;
  max-height: 280px;
  background: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-fg);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity var(--transition);
}
.gallery-placeholder:hover { opacity: 0.8; }

/* ===== Shared Event Card ===== */
.shared-event-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
  transition: box-shadow var(--transition);
  cursor: pointer;
}
.shared-event-card:hover { box-shadow: var(--shadow-md); }
.shared-event-banner {
  height: 100px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.shared-event-banner svg { width: 32px; height: 32px; color: white; opacity: 0.5; }
.shared-event-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--accent);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
}
.shared-event-body { padding: 12px 16px; }
.shared-event-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
}
.shared-event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: var(--muted-fg);
}
.shared-event-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}
.shared-event-meta svg { width: 12px; height: 12px; }

/* ===== Post Shared Card (Share Item in Feed) ===== */
.post-shared-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  /* margin-top: 12px; */
  transition: all var(--transition);
  cursor: pointer;
  background: var(--card);
}
.post-shared-card:hover {
  box-shadow: var(--shadow-md);
  border-color: hsl(220 14% 88%);
}
.post-shared-card-body {
  padding: 16px;
}
.post-shared-type {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted-fg);
  margin-bottom: 8px;
  padding: 4px 10px;
  background: var(--muted);
  border-radius: 6px;
}
.post-shared-type svg {
  width: 12px;
  height: 12px;
}
.post-shared-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 10px;
  color: var(--fg);
}
.post-shared-name a {
  color: var(--fg);
  text-decoration: none;
  transition: color var(--transition);
}
.post-shared-name a:hover {
  color: var(--primary);
}
.post-shared-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--muted-fg);
}
.post-shared-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}
.post-shared-meta-item svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--primary);
}
.post-shared-author {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted-fg);
}
.post-shared-author-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 10px;
  font-weight: 600;
  flex-shrink: 0;
}
.post-shared-author-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

/* Nested post card (share of a user post) */
.post-shared-post-card {
  cursor: default;
  display: block;
}
.post-shared-post-card:hover {
  box-shadow: var(--shadow-sm);
}
.post-shared-post-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px 8px;
}
.post-shared-post-author {
  font-size: 13px;
  font-weight: 600;
  color: var(--fg);
}
.post-shared-post-time {
  font-size: 11px;
  color: var(--muted-fg);
  margin-top: 1px;
}
.post-shared-post-body {
  padding: 0 16px 10px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--fg);
  white-space: pre-line;
}
.post-shared-post-stats {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 16px 12px;
  font-size: 12px;
  color: var(--muted-fg);
  border-top: 1px solid var(--border);
  margin-top: 4px;
}
.post-shared-post-stats span {
  display: flex;
  align-items: center;
  gap: 4px;
}
.post-shared-post-images {
  margin: 10px !important;
  border-radius: 0 !important;
}
.post-shared-post-images .post-image-single,
.post-shared-post-images .post-image-masonry-img {
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* ===== Post Actions ===== */
.post-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  margin-top: 10px;
}
.post-action {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted-fg);
  transition: color var(--transition);
}
.post-action svg { width: 16px; height: 16px; }
.post-action:hover { color: var(--fg); }
.post-action--liked { color: var(--destructive); }
.post-action--liked:hover { color: var(--destructive); opacity: 0.8; }
.post-action--share { margin-left: auto; }
.post-action--share:hover { color: var(--primary); }

/* ===== Three-Dots Dropdown Menu ===== */
.post-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  min-width: 180px;
  z-index: 60;
  padding: 4px;
  animation: menuFadeIn 150ms ease;
}
@keyframes menuFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.post-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 12px;
  font-size: 13px;
  border-radius: calc(var(--radius) - 2px);
  transition: background var(--transition);
  text-align: left;
}
.post-menu-item:hover { background: var(--muted); }
.post-menu-item svg { width: 14px; height: 14px; flex-shrink: 0; }
.post-menu-item--danger { color: var(--destructive); }
.post-menu-item--danger:hover { background: hsl(0 84% 60% / 0.08); }
.post-menu-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

/* ===== Comments Popup / Modal ===== */
.comments-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  animation: fadeIn 200ms ease;
  padding: 20px;
}
.comments-panel {
  background: var(--card);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  animation: slideUp 250ms ease;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.comments-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.comments-sort {
  display: flex;
  gap: 4px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--card);
}
.ec-sort-btn {
  font-size: 12px;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 999px;
  color: var(--muted-fg);
  transition: all var(--transition);
}
.ec-sort-btn:hover { background: var(--muted); color: var(--fg); }
.ec-sort-btn.active {
  background: var(--primary);
  color: #fff;
}
.comments-header h3 {
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.comments-header .comment-count {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted-fg);
  background: var(--muted);
  padding: 2px 8px;
  border-radius: 999px;
}
.comments-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--muted-fg);
  transition: all var(--transition);
}
.comments-close:hover { background: var(--muted); color: var(--fg); }
.comments-close svg { width: 18px; height: 18px; }

.comments-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}
.comment-item {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}
.comment-item:last-child { margin-bottom: 0; }
.comment-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}
.comment-bubble {
  flex: 1;
  background: var(--muted);
  border-radius: var(--radius);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.comment-bubble-main {
  flex: 1 1 auto;
  min-width: 0;
}
.comment-header {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 2px;
}
.comment-author {
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-display);
}
.comment-text { font-size: 13px; line-height: 1.5; }
.comment-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.comment-time {
  font-size: 11px;
  color: var(--muted-fg);
}
.comment-action-btn {
  font-size: 11px;
  color: var(--muted-fg);
  font-weight: 500;
  transition: color var(--transition);
}
.comment-action-btn:hover { color: var(--fg); }

.comments-empty {
  text-align: center;
  padding: 32px 0;
  color: var(--muted-fg);
}
.comments-empty svg { width: 32px; height: 32px; margin: 0 auto 8px; opacity: 0.3; }
.comments-empty p { font-size: 13px; }

.comments-input-area {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-top: 1px solid var(--border);
}
.comments-input-area input {
  flex: 1;
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  background: var(--bg);
  outline: none;
  transition: box-shadow var(--transition);
}
.comments-input-area input:focus { box-shadow: 0 0 0 3px rgba(13,148,136,0.15); }
.comments-send-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity var(--transition);
  flex-shrink: 0;
}
.comments-send-btn:hover { opacity: 0.85; }
.comments-send-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.comments-send-btn svg { width: 16px; height: 16px; }

/* ===== Share Modal ===== */
.share-panel { max-height: unset; }
.share-modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.share-modal-item-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--muted);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.share-modal-type-tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  padding: 2px 8px;
  border-radius: 999px;
  flex-shrink: 0;
}
.share-modal-item-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.share-comment-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  background: var(--bg);
  color: var(--fg);
  resize: none;
  outline: none;
  line-height: 1.5;
  transition: box-shadow var(--transition);
}
.share-comment-input:focus { box-shadow: 0 0 0 3px rgba(13,148,136,0.15); }
.share-comment-counter {
  font-size: 11px;
  color: var(--muted-fg);
  text-align: right;
  margin-top: -6px;
}
.share-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 20px;
  border-top: 1px solid var(--border);
}
.share-btn-cancel {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted-fg);
  padding: 8px 16px;
  border-radius: 999px;
  transition: all var(--transition);
}
.share-btn-cancel:hover { background: var(--muted); color: var(--fg); }
.share-btn-submit {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: white;
  background: var(--primary);
  padding: 8px 20px;
  border-radius: 999px;
  transition: opacity var(--transition);
}
.share-btn-submit:hover { opacity: 0.85; }
.share-btn-submit:disabled { opacity: 0.5; cursor: not-allowed; }

/* Share toast */
.share-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: var(--fg);
  color: var(--bg);
  font-size: 13px;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: 999px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  z-index: 9999;
  opacity: 0;
  transition: opacity 200ms ease, transform 200ms ease;
  pointer-events: none;
  white-space: nowrap;
}
.share-toast--visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== Empty State ===== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  text-align: center;
}
.empty-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.empty-icon svg { width: 28px; height: 28px; color: var(--muted-fg); opacity: 0.4; }
.empty-title { font-size: 14px; font-weight: 500; color: var(--muted-fg); }
.empty-sub { font-size: 12px; color: var(--muted-fg); opacity: 0.7; margin-top: 4px; }

/* ===== Auth Modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  animation: fadeIn 200ms ease;
}
.modal-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 32px;
  width: 100%;
  max-width: 400px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}
.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 24px;
  color: var(--muted-fg);
  transition: color var(--transition);
}
.modal-close:hover { color: var(--fg); }
.modal-card h2 { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.modal-card > p { font-size: 13px; color: var(--muted-fg); margin-bottom: 20px; }
#authForm { display: flex; flex-direction: column; gap: 12px; }
#authForm input {
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  background: var(--bg);
  outline: none;
  transition: box-shadow var(--transition);
}
#authForm input:focus { box-shadow: 0 0 0 3px rgba(13,148,136,0.15); }
.auth-switch { font-size: 13px; color: var(--muted-fg); text-align: center; margin-top: 16px; }
.auth-switch a { color: var(--secondary); font-weight: 500; }
.auth-switch a:hover { text-decoration: underline; }

/* ===== Hamburger Button ===== */
.hamburger-btn {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  color: var(--fg);
  transition: background var(--transition);
}
.hamburger-btn:hover { background: var(--muted); }
.hamburger-btn svg { width: 22px; height: 22px; }

/* ===== Mobile Nav Overlay ===== */
.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms ease;
}
.mobile-nav-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.mobile-nav-panel {
  position: absolute;
  top: 0;
  left: 0;
  width: 280px;
  height: 100%;
  background: var(--card);
  box-shadow: 4px 0 24px rgba(0,0,0,0.12);
  transform: translateX(-100%);
  transition: transform 300ms cubic-bezier(0.4,0,0.2,1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.mobile-nav-overlay.open .mobile-nav-panel {
  transform: translateX(0);
}
.mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.mobile-nav-header .navbar-logo { margin-right: 0; }
.mobile-nav-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  color: var(--muted-fg);
  transition: all var(--transition);
}
.mobile-nav-close:hover { background: var(--muted); color: var(--fg); }
.mobile-nav-close svg { width: 20px; height: 20px; }
.mobile-nav-links {
  display: flex;
  flex-direction: column;
  padding: 12px 0;
}
.mobile-nav-links a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 500;
  color: var(--muted-fg);
  transition: all var(--transition);
}
.mobile-nav-links a:hover { background: var(--muted); color: var(--fg); }
.mobile-nav-links a.active {
  color: var(--fg);
  background: var(--muted);
  border-right: 3px solid var(--secondary);
}
.mobile-nav-links a svg { width: 20px; height: 20px; flex-shrink: 0; }
.mobile-nav-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 20px;
}

/* ===== Account Drawer ===== */
.account-drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms ease;
}
.account-drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.account-drawer {
  position: absolute;
  top: 0;
  right: 0;
  width: 360px;
  max-width: 90vw;
  height: 100%;
  background: var(--card);
  box-shadow: -4px 0 24px rgba(0,0,0,0.12);
  transform: translateX(100%);
  transition: transform 300ms cubic-bezier(0.4,0,0.2,1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.account-drawer-overlay.open .account-drawer {
  transform: translateX(0);
}
.account-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.account-drawer-header h2 {
  font-size: 18px;
  font-weight: 700;
}
.account-drawer-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  color: var(--muted-fg);
  transition: all var(--transition);
}
.account-drawer-close:hover { background: var(--muted); color: var(--fg); }
.account-drawer-close svg { width: 20px; height: 20px; }
.account-drawer-profile {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 24px;
  border-bottom: 1px solid var(--border);
}
.account-drawer-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}
.account-drawer-info h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 2px;
}
.account-drawer-info p {
  font-size: 13px;
  color: var(--muted-fg);
}
.account-drawer-section {
  padding: 16px 24px 8px;
}
.account-drawer-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted-fg);
  margin-bottom: 8px;
}
.account-drawer-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  color: var(--fg);
  transition: all var(--transition);
  width: 100%;
  text-align: left;
}
.account-drawer-item:hover {
  background: var(--muted);
}
.account-drawer-item svg {
  width: 18px;
  height: 18px;
  color: var(--muted-fg);
  flex-shrink: 0;
}
.account-drawer-item--danger { color: var(--destructive); }
.account-drawer-item--danger svg { color: var(--destructive); }
.account-drawer-footer {
  margin-top: auto;
  padding: 16px 24px 24px;
  border-top: 1px solid var(--border);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .navbar-links { display: none; }
  .hamburger-btn { display: flex; }
  .navbar-actions { margin-left: auto; }
  
  /* Shared card adjustments for mobile */
  .post-shared-card-body { padding: 12px; }
  .post-shared-name { font-size: 15px; }
  .post-shared-meta { font-size: 12px; }
  .post-shared-meta-item svg { width: 13px; height: 13px; }
  .post-shared-author { font-size: 11px; }
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted-fg); }

/* ===== Lightbox ===== */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 200ms ease;
}
.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
}
.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: white;
  transition: background var(--transition);
}
.lightbox-close:hover { background: rgba(255,255,255,0.2); }
.lightbox-close svg { width: 22px; height: 22px; }
.lightbox-img-wrap {
  position: relative;
  z-index: 5;
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  transition: opacity 180ms ease;
}
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: white;
  transition: background var(--transition);
}
.lightbox-nav:hover { background: rgba(255,255,255,0.25); }
.lightbox-nav:disabled { opacity: 0.3; cursor: default; }
.lightbox-nav:disabled:hover { background: rgba(255,255,255,0.1); }
.lightbox-nav svg { width: 24px; height: 24px; }
.lightbox-nav--prev { left: 16px; }
.lightbox-nav--next { right: 16px; }
.lightbox-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  color: rgba(255,255,255,0.7);
  font-size: 13px;
  font-weight: 500;
  background: rgba(0,0,0,0.4);
  padding: 4px 14px;
  border-radius: 999px;
}

/* ===== Feed video thumbnails ===== */
.post-video-wrap {
  margin-top: 0;
}
.post-video-single-link {
  display: block;
  width: 100%;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
}
.post-video-masonry-link {
  display: block;
  width: 100%;
  height: 100%;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
}
.post-video-thumb {
  position: relative;
  background: #111;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.post-video-single {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 320px;
}
.post-video-masonry-thumb {
  width: 100%;
  height: 100%;
}
.post-video-play-icon {
  width: 52px;
  height: 52px;
  position: absolute;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.4));
  transition: transform 150ms ease;
  pointer-events: none;
}
.post-video-single-link:hover .post-video-play-icon,
.post-video-masonry-link:hover .post-video-play-icon {
  transform: scale(1.1);
}
