/* =========================================================
   WeAlternative — Dark Mode Visual Social Platform
   ========================================================= */
:root {
  --bg-root: #09090b;
  --bg-surface: #111115;
  --bg-elevated: #18181f;
  --bg-glass: rgba(17, 17, 21, 0.84);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text-primary: #f4f4f5;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --accent-1: #8b5cf6;
  --accent-2: #ec4899;
  --accent-3: #f59e0b;
  --accent-grad: linear-gradient(135deg, #8b5cf6 0%, #ec4899 55%, #f59e0b 100%);
  --like-color: #f43f5e;
  --save-color: #a855f7;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --sidebar-w: 250px;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Plus Jakarta Sans', 'Inter', sans-serif;
}

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

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-root);
  color: var(--text-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

#wealt-root button,
#wealt-root [type="button"],
#wealt-root [type="submit"] {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
  box-shadow: none;
  outline: none;
}

#wealt-root button:hover,
#wealt-root button:focus {
  background: none;
  color: inherit;
}

input, textarea, select {
  font-family: inherit;
  color: var(--text-primary);
}

.hidden {
  display: none !important;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 99px;
}

/* ==================== LAYOUT SHELL ==================== */
.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 40;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  padding: 6px 10px;
  margin-bottom: 18px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(139, 92, 246, 0.12);
  display: grid;
  place-items: center;
}

.brand-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, #fff 20%, #d4d4d8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: background 0.18s ease, color 0.18s ease, transform 0.12s ease;
  position: relative;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

.nav-item.active {
  background: rgba(139, 92, 246, 0.14);
  color: var(--text-primary);
  font-weight: 600;
}

.nav-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.nav-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
}

.nav-pill {
  margin-left: auto;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 99px;
  background: var(--accent-grad);
  color: #fff;
  letter-spacing: 0.04em;
}

.notif-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-2);
  margin-left: auto;
}

.interest-tuner-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.16), rgba(236, 72, 153, 0.12));
  border: 1px solid rgba(139, 92, 246, 0.28);
  text-align: left;
  transition: border-color 0.2s ease, transform 0.15s ease;
}

.interest-tuner-btn:hover {
  border-color: rgba(236, 72, 153, 0.55);
  transform: translateY(-1px);
}

.tuner-spark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent-grad);
  display: grid;
  place-items: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.tuner-copy strong {
  display: block;
  font-size: 0.85rem;
}

.tuner-copy small {
  color: var(--text-secondary);
  font-size: 0.74rem;
}

.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-width: 0;
  padding: 24px 28px 60px;
}

.view {
  display: none;
}

.view.active {
  display: block;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==================== HOME / FEED ==================== */
.home-layout {
  max-width: 1060px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 620px) 320px;
  gap: 36px;
  justify-content: center;
}

/* Stories */
.stories-strip {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 6px 2px 14px;
  scrollbar-width: none;
}
.stories-strip::-webkit-scrollbar { display: none; }

.story-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  min-width: 72px;
}

.story-ring {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  padding: 2.5px;
  background: var(--accent-grad);
  transition: transform 0.18s ease;
}

.story-chip:hover .story-ring {
  transform: scale(1.05);
}

.story-ring.seen {
  background: rgba(255, 255, 255, 0.2);
}

.story-ring img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--bg-root);
}

.story-name {
  font-size: 0.74rem;
  color: var(--text-secondary);
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Feed Controls */
.feed-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 18px;
}

.feed-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}

.feed-tab {
  padding: 7px 16px;
  border-radius: 99px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.18s ease;
}

.feed-tab.active {
  background: var(--text-primary);
  color: var(--bg-root);
}

.interest-pills-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.interest-pills-scroll::-webkit-scrollbar { display: none; }

.filter-pill {
  padding: 6px 13px;
  border-radius: 99px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  font-size: 0.79rem;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: all 0.16s ease;
}

.filter-pill:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.filter-pill.active {
  background: rgba(139, 92, 246, 0.2);
  border-color: var(--accent-1);
  color: #fff;
}

/* Post Card */
.feed-list {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.post-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.post-card:hover {
  border-color: rgba(255, 255, 255, 0.14);
}

.post-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
}

.post-author {
  display: flex;
  align-items: center;
  gap: 11px;
}

.post-author img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
}

.post-author-meta strong {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
}

.verified-badge {
  display: inline-grid;
  place-items: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--accent-1);
  font-size: 0.62rem;
  color: #fff;
}

.post-author-meta small {
  color: var(--text-muted);
  font-size: 0.76rem;
}

.post-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.match-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 99px;
  background: rgba(139, 92, 246, 0.15);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.28);
}

.follow-mini-btn {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}
.follow-mini-btn.following {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
}

.post-media-wrap {
  position: relative;
  background: #000;
  aspect-ratio: 4 / 5;
  max-height: 620px;
  width: 100%;
  overflow: hidden;
  user-select: none;
}

.post-media-wrap img,
.post-media-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.double-tap-heart {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  font-size: 5rem;
  color: #fff;
  filter: drop-shadow(0 8px 24px rgba(244, 63, 94, 0.65));
  pointer-events: none;
  opacity: 0;
}

.double-tap-heart.pop {
  animation: heartPop 0.7s ease forwards;
}

@keyframes heartPop {
  0% { transform: translate(-50%, -50%) scale(0.3); opacity: 0; }
  30% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
  70% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1.3); opacity: 0; }
}

.media-type-tag {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 10px;
  border-radius: 99px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  font-size: 0.72rem;
  font-weight: 600;
}

.post-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 6px;
}

.post-actions-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding: 4px 2px;
  transition: color 0.15s ease, transform 0.15s ease;
}

.action-btn:hover {
  color: var(--text-primary);
  transform: scale(1.05);
}

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

.action-btn.saved {
  color: var(--save-color);
}

.action-btn svg {
  width: 22px;
  height: 22px;
}

.post-body {
  padding: 4px 16px 16px;
}

.post-likes-count {
  font-size: 0.86rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.post-caption {
  font-size: 0.9rem;
  line-height: 1.48;
  color: #e4e4e7;
}

.post-caption .hashtag {
  color: #c4b5fd;
  cursor: pointer;
}

.post-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.cat-chip {
  font-size: 0.72rem;
  padding: 3px 9px;
  border-radius: 99px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.post-comment-preview {
  margin-top: 10px;
  font-size: 0.82rem;
  color: var(--text-muted);
  cursor: pointer;
}

.quick-comment-form {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.quick-comment-form input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 0.85rem;
}

.quick-comment-form button {
  color: #c4b5fd;
  font-weight: 600;
  font-size: 0.84rem;
}

/* ==================== RIGHT RAIL ==================== */
.right-rail {
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: sticky;
  top: 24px;
  align-self: start;
}

.rail-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
}

.user-mini-card {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-mini-card img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.user-mini-info {
  flex: 1;
  min-width: 0;
}

.user-mini-info strong {
  display: block;
  font-size: 0.9rem;
}

.user-mini-info span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.text-btn {
  color: #c4b5fd;
  font-size: 0.82rem;
  font-weight: 600;
}

.rail-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.rail-card-header h3 {
  margin: 0;
  font-size: 0.94rem;
  font-weight: 700;
}

.rail-sub {
  margin: 0 0 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.interest-bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ibar-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ibar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.ibar-track {
  height: 6px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.ibar-fill {
  height: 100%;
  border-radius: 99px;
  background: var(--accent-grad);
  transition: width 0.35s ease;
}

.suggested-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

.suggested-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.suggested-item img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.suggested-item-info {
  flex: 1;
  min-width: 0;
}

.suggested-item-info strong {
  display: block;
  font-size: 0.84rem;
}

.suggested-item-info small {
  color: var(--text-muted);
  font-size: 0.74rem;
}

.rail-footer {
  font-size: 0.74rem;
  color: var(--text-muted);
  padding: 0 4px;
}

/* ==================== EXPLORE ==================== */
.explore-header {
  max-width: 1080px;
  margin: 0 auto 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 16px;
}

.search-box input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 0.95rem;
}

.clear-search {
  font-size: 1.2rem;
  color: var(--text-muted);
}

.explore-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.explore-grid {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.explore-tile {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-elevated);
  cursor: pointer;
}

.explore-tile img,
.explore-tile video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.28s ease;
}

.explore-tile:hover img,
.explore-tile:hover video {
  transform: scale(1.04);
}

.explore-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, transparent 55%);
  opacity: 0;
  transition: opacity 0.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px;
}

.explore-tile:hover .explore-overlay {
  opacity: 1;
}

.explore-tile-stats {
  display: flex;
  gap: 12px;
  font-size: 0.84rem;
  font-weight: 600;
}

/* ==================== CLIPS (VERTICAL SHORT VIDEO) ==================== */
.reels-stage {
  max-width: 440px;
  margin: 0 auto;
  height: calc(100vh - 56px);
  display: flex;
  flex-direction: column;
}

.reels-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.reels-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
}

.reels-scroller {
  flex: 1;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  border-radius: var(--radius-lg);
  scrollbar-width: none;
}
.reels-scroller::-webkit-scrollbar { display: none; }

.reel-card {
  position: relative;
  height: 100%;
  min-height: 540px;
  scroll-snap-align: start;
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 14px;
}

.reel-card video,
.reel-card img.reel-fallback {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.reel-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.1) 45%, rgba(0,0,0,0.3) 100%);
  pointer-events: none;
}

.reel-info {
  position: absolute;
  left: 16px;
  right: 74px;
  bottom: 18px;
  z-index: 2;
}

.reel-author {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.reel-author img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid #fff;
}

.reel-caption {
  font-size: 0.88rem;
  line-height: 1.4;
  margin-bottom: 8px;
}

.reel-actions-rail {
  position: absolute;
  right: 12px;
  bottom: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  z-index: 2;
}

.reel-act-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 0.74rem;
  color: #fff;
  text-shadow: 0 2px 6px rgba(0,0,0,0.7);
}

.reel-act-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(24, 24, 31, 0.7);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  font-size: 1.15rem;
}

.reel-act-btn.liked .reel-act-circle {
  background: rgba(244, 63, 94, 0.25);
  color: var(--like-color);
}

/* ==================== ACTIVITY & PROFILE ==================== */
.section-wrap {
  max-width: 920px;
  margin: 0 auto;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.activity-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.activity-item.unread {
  border-color: rgba(139, 92, 246, 0.45);
  background: rgba(139, 92, 246, 0.08);
}

.activity-item img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
}

.profile-hero {
  display: flex;
  gap: 28px;
  align-items: center;
  padding: 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 22px;
}

.profile-avatar-lg {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent-1);
}

.profile-name-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.profile-name-row h2 {
  margin: 0;
  font-size: 1.35rem;
}

.profile-stats {
  display: flex;
  gap: 20px;
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.profile-stats strong {
  color: var(--text-primary);
}

.profile-bio {
  margin: 0 0 10px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.profile-interest-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.profile-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}

.profile-tab {
  padding: 7px 16px;
  border-radius: 99px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.profile-tab.active {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
}

/* ==================== BUTTONS & MODALS ==================== */
.btn-primary {
  padding: 10px 18px;
  border-radius: 12px;
  background: var(--accent-grad);
  color: #fff;
  font-weight: 600;
  font-size: 0.88rem;
}

.btn-secondary {
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  font-weight: 600;
  font-size: 0.88rem;
}

.chip-btn {
  padding: 6px 13px;
  border-radius: 99px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  font-size: 0.8rem;
  font-weight: 600;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 16px;
}

.modal-card {
  width: 100%;
  max-width: 540px;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 22px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.modal-post-card {
  max-width: 820px;
  padding: 0;
  overflow: hidden;
}

.modal-post-body {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  min-height: 460px;
}

.modal-post-media {
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-post-media img,
.modal-post-media video {
  width: 100%;
  height: 100%;
  max-height: 540px;
  object-fit: cover;
}

.modal-post-details {
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}

.comments-scroll {
  flex: 1;
  max-height: 260px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.comment-row {
  font-size: 0.86rem;
  line-height: 1.4;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.modal-header h2 {
  margin: 4px 0 4px;
  font-size: 1.25rem;
}

.modal-sub {
  margin: 0;
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.badge-gradient {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 3px 9px;
  border-radius: 99px;
  background: rgba(139, 92, 246, 0.2);
  color: #c4b5fd;
}

.modal-close {
  font-size: 1.5rem;
  color: var(--text-secondary);
  line-height: 1;
  padding: 4px 8px;
}

.floating-close {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 5;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 50%;
}

.interest-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.interest-option {
  padding: 12px 10px;
  border-radius: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  text-align: center;
  font-size: 0.84rem;
  font-weight: 600;
  transition: all 0.16s ease;
}

.interest-option.selected {
  background: rgba(139, 92, 246, 0.22);
  border-color: var(--accent-1);
  color: #fff;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
}

.create-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.type-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.type-btn {
  padding: 10px;
  border-radius: 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  font-weight: 600;
  font-size: 0.86rem;
}

.type-btn.active {
  background: rgba(139, 92, 246, 0.22);
  border-color: var(--accent-1);
}

.field-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.text-input, .file-input {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.9rem;
  outline: none;
}

.text-input:focus {
  border-color: var(--accent-1);
}

/* Story Viewer */
.story-viewer {
  position: relative;
  width: 100%;
  max-width: 410px;
  height: 82vh;
  max-height: 740px;
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-strong);
}

.story-progress-track {
  position: absolute;
  top: 10px;
  left: 12px;
  right: 12px;
  height: 3px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 99px;
  z-index: 4;
}

.story-progress-fill {
  height: 100%;
  width: 0%;
  background: #fff;
  border-radius: 99px;
  transition: width 0.1s linear;
}

.story-viewer-header {
  position: absolute;
  top: 22px;
  left: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 4;
}

.story-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.story-user img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
}

.story-user strong {
  display: block;
  font-size: 0.88rem;
}

.story-user span {
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.7);
}

.story-media-wrap {
  width: 100%;
  height: 100%;
  position: relative;
}

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

.story-caption {
  position: absolute;
  bottom: 24px;
  left: 16px;
  right: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  font-size: 0.9rem;
}

.story-nav-zones {
  position: absolute;
  inset: 60px 0 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  z-index: 3;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  color: #fff;
  padding: 10px 18px;
  border-radius: 99px;
  font-size: 0.86rem;
  font-weight: 500;
  z-index: 200;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* Mobile Header & Nav */
.mobile-header, .mobile-nav {
  display: none;
}

@media (max-width: 1040px) {
  .home-layout {
    grid-template-columns: minmax(0, 620px);
  }
  .right-rail {
    display: none;
  }
}

@media (max-width: 768px) {
  .sidebar {
    display: none;
  }
  .mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 40;
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 10px 16px;
  }
  .mobile-header .brand {
    margin-bottom: 0;
    padding: 0;
  }
  .mobile-header-actions {
    display: flex;
    gap: 8px;
  }
  .icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    font-size: 1rem;
  }
  .main-content {
    margin-left: 0;
    padding: 14px 12px 84px;
  }
  .mobile-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--bg-glass);
    backdrop-filter: blur(14px);
    border-top: 1px solid var(--border);
    z-index: 45;
  }
  .mobile-nav-item {
    padding: 8px 14px;
    color: var(--text-secondary);
  }
  .mobile-nav-item.active {
    color: var(--text-primary);
  }
  .mobile-nav-item svg {
    width: 24px;
    height: 24px;
  }
  .modal-post-body {
    grid-template-columns: 1fr;
  }
  .profile-hero {
    flex-direction: column;
    text-align: center;
  }
  .profile-name-row, .profile-stats, .profile-interest-tags {
    justify-content: center;
  }
  .interest-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


/* ==================== WORDPRESS & BUDDYPRESS DARK MODE ==================== */
body.elementor-page,
body.buddypress,
body.bp-nouveau {
  background: #09090b !important;
  color: #f4f4f5 !important;
}

.buddypress-wrap,
#buddypress,
.buddypress-wrap .bp-navs,
.buddypress-wrap .activity-list .activity-item {
  background: #111115 !important;
  color: #f4f4f5 !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

.buddypress-wrap a,
#buddypress a {
  color: #c4b5fd;
}

.buddypress-wrap input,
.buddypress-wrap textarea,
.buddypress-wrap select {
  background: #18181f !important;
  color: #f4f4f5 !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
}
