/* =========================================================
   VibeSocial – Creative & Colourful Social UI
   Table of contents
   1. Fonts & design tokens
   2. Base
   3. Top bar & search
   4. Layout, cards, sidebars
   5. Stories
   6. Composer
   7. Feed posts & comments
   8. Right sidebar widgets & promos
   9. Views (explore, friends, profile, notifications)
   10. Modals, story viewer, chat, toasts
   11. Mobile bottom nav & responsive
   ========================================================= */

/* 1. FONTS & TOKENS ------------------------------------- */
@font-face { font-family: "Poppins"; font-weight: 400; font-display: swap; src: url("../fonts/poppins-regular.woff") format("woff"); }
@font-face { font-family: "Poppins"; font-weight: 500; font-display: swap; src: url("../fonts/poppins-medium.woff") format("woff"); }
@font-face { font-family: "Poppins"; font-weight: 600 700; font-display: swap; src: url("../fonts/poppins-bold.woff") format("woff"); }

:root {
  --vs-purple: #7c3aed;
  --vs-violet: #8b5cf6;
  --vs-indigo: #4f46e5;
  --vs-blue: #3b82f6;
  --vs-pink: #ec4899;
  --vs-red: #ef4444;
  --vs-orange: #f97316;
  --vs-amber: #f59e0b;
  --vs-green: #22c55e;

  --vs-grad: linear-gradient(135deg, #8b5cf6 0%, #6366f1 50%, #4f46e5 100%);
  --vs-grad-pink: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
  --vs-grad-story: linear-gradient(135deg, #f59e0b, #ec4899 45%, #8b5cf6 75%, #3b82f6);

  --vs-bg: #f4f2fd;
  --vs-surface: #ffffff;
  --vs-surface-2: #f6f4ff;
  --vs-border: #ece9f8;
  --vs-text: #1e1b3a;
  --vs-muted: #6b6889;
  --vs-active-bg: #efeaff;

  --vs-radius-sm: 12px;
  --vs-radius: 18px;
  --vs-radius-lg: 24px;
  --vs-shadow: 0 6px 24px rgba(91, 63, 197, .08), 0 1px 3px rgba(91, 63, 197, .06);
  --vs-shadow-lg: 0 18px 40px rgba(91, 63, 197, .18);
  --vs-topbar-h: 72px;
  --vs-bottomnav-h: 68px;
  --vs-ease: cubic-bezier(.2, .8, .2, 1);

  --bs-body-font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bs-primary: #7c3aed;
  --bs-primary-rgb: 124, 58, 237;
  --bs-link-color: #6d28d9;
  --bs-link-color-rgb: 109, 40, 217;
  --bs-link-hover-color: #5b21b6;
  --bs-heading-color: inherit;
  --bs-emphasis-color: var(--vs-text);
}

[data-bs-theme="dark"] {
  --vs-bg: #0f0d1d;
  --vs-surface: #1a1730;
  --vs-surface-2: #231f3d;
  --vs-border: #2d2850;
  --vs-text: #ece9ff;
  --vs-muted: #a29fc4;
  --vs-active-bg: #2b2452;
  --vs-shadow: 0 6px 24px rgba(0, 0, 0, .35);
  --vs-shadow-lg: 0 18px 40px rgba(0, 0, 0, .5);
  --bs-body-bg: #0f0d1d;
  --bs-body-color: #ece9ff;
  --bs-link-color: #c4b5fd;
  --bs-link-color-rgb: 196, 181, 253;
}

/* 2. BASE ----------------------------------------------- */
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--vs-topbar-h) + 16px); }
body {
  font-family: var(--bs-body-font-family);
  background: var(--vs-bg);
  color: var(--vs-text);
  overflow-x: hidden;
  min-height: 100vh;
}
img { max-width: 100%; }
button { font-family: inherit; color: inherit; }
.text-muted { color: var(--vs-muted) !important; }
.c-red { color: var(--vs-red); } .c-pink { color: var(--vs-pink); } .c-indigo { color: var(--vs-indigo); }
.c-green { color: var(--vs-green); } .c-amber { color: var(--vs-amber); }
[data-bs-theme="dark"] .c-indigo { color: #a5b4fc; }
:focus-visible { outline: 3px solid rgba(124, 58, 237, .45); outline-offset: 2px; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 2000; background: #fff; padding: 8px 14px; border-radius: 10px; }

.bg-blobs { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg-blobs span { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; }
.bg-blobs span:nth-child(1) { width: 480px; height: 480px; background: #c4b5fd; top: -160px; left: -120px; }
.bg-blobs span:nth-child(2) { width: 420px; height: 420px; background: #fbcfe8; top: 20%; right: -160px; }
.bg-blobs span:nth-child(3) { width: 380px; height: 380px; background: #bfdbfe; bottom: -140px; left: 30%; }
[data-bs-theme="dark"] .bg-blobs span { opacity: .14; }

.vs-card {
  background: var(--vs-surface);
  border: 1px solid var(--vs-border);
  border-radius: var(--vs-radius);
  box-shadow: var(--vs-shadow);
}
.vs-avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }

.vs-btn-gradient {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  border: 0; border-radius: 999px; padding: .7rem 1.4rem;
  background: var(--vs-grad); color: #fff; font-weight: 600;
  box-shadow: 0 8px 20px rgba(99, 102, 241, .35);
  transition: transform .2s var(--vs-ease), box-shadow .2s, opacity .2s;
}
.vs-btn-gradient:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(99, 102, 241, .45); color: #fff; }
.vs-btn-gradient:disabled { opacity: .5; transform: none; box-shadow: none; cursor: not-allowed; }
.vs-btn-sm { padding: .45rem 1.1rem; font-size: .875rem; }
.vs-btn-white {
  display: inline-flex; align-items: center; gap: .5rem; border: 0; border-radius: 999px;
  padding: .65rem 1.3rem; background: rgba(255, 255, 255, .95); color: var(--vs-purple); font-weight: 600;
  box-shadow: 0 8px 20px rgba(30, 10, 80, .25); transition: transform .2s var(--vs-ease);
}
.vs-btn-white:hover { transform: translateY(-2px); }
.vs-btn-soft { background: var(--vs-active-bg); color: var(--vs-purple); border: 0; border-radius: 999px; font-weight: 600; padding: .45rem 1rem; }
.vs-btn-soft:hover { background: var(--vs-purple); color: #fff; }
[data-bs-theme="dark"] .vs-btn-soft { color: #c4b5fd; }

/* 3. TOP BAR -------------------------------------------- */
.vs-topbar {
  position: sticky; top: 0; z-index: 1030; height: var(--vs-topbar-h);
  background: rgba(255, 255, 255, .82); backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--vs-border);
}
[data-bs-theme="dark"] .vs-topbar { background: rgba(20, 17, 38, .85); }
.vs-topbar-inner { height: 100%; display: flex; align-items: center; gap: 1.25rem; }
.vs-brand { display: flex; align-items: center; gap: .55rem; text-decoration: none; flex-shrink: 0; }
.vs-brand img { width: 38px; height: 38px; }
.vs-brand span {
  font-size: 1.5rem; font-weight: 700; letter-spacing: -.02em;
  background: linear-gradient(135deg, #4c1d95, #4338ca); -webkit-background-clip: text; background-clip: text; color: transparent;
}
[data-bs-theme="dark"] .vs-brand span { background-image: linear-gradient(135deg, #c4b5fd, #a5b4fc); }

.vs-search { position: relative; flex: 0 1 340px; }
.vs-search > .bi { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--vs-muted); }
.vs-search input {
  width: 100%; height: 46px; border-radius: 999px; border: 1px solid transparent;
  background: var(--vs-surface-2); padding: 0 2.6rem 0 2.75rem; color: var(--vs-text); transition: border-color .2s, box-shadow .2s, background .2s;
}
.vs-search input::placeholder { color: var(--vs-muted); }
.vs-search input:focus { outline: none; border-color: #c4b5fd; background: var(--vs-surface); box-shadow: 0 0 0 4px rgba(139, 92, 246, .15); }
.vs-search kbd { position: absolute; right: .9rem; top: 50%; transform: translateY(-50%); background: var(--vs-surface); color: var(--vs-muted); border: 1px solid var(--vs-border); font-size: .7rem; padding: .1rem .4rem; }
.vs-search-results { position: absolute; top: calc(100% + 8px); left: 0; right: 0; min-width: 320px; max-height: 420px; overflow: auto; padding: .5rem; z-index: 10; }
.card-soft { background: var(--vs-surface); border: 1px solid var(--vs-border); border-radius: var(--vs-radius); box-shadow: var(--vs-shadow-lg); }
.vs-sr-group { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--vs-muted); padding: .5rem .6rem .25rem; font-weight: 600; }
.vs-sr-item { display: flex; align-items: center; gap: .75rem; width: 100%; padding: .55rem .6rem; border-radius: 12px; border: 0; background: none; text-align: left; }
.vs-sr-item:hover, .vs-sr-item:focus-visible { background: var(--vs-active-bg); }
.vs-sr-item img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.vs-sr-item .vs-sr-thumb { border-radius: 10px; }
.vs-sr-item small { display: block; color: var(--vs-muted); font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 230px; }
.vs-sr-empty { padding: 1.25rem; text-align: center; color: var(--vs-muted); }
mark { background: #fde68a; padding: 0 2px; border-radius: 4px; color: inherit; }

.vs-topnav { list-style: none; margin: 0 auto; padding: 0; gap: .5rem; height: 100%; }
.vs-topnav li { height: 100%; }
.vs-topnav-btn {
  position: relative; height: 100%; width: 84px; border: 0; background: none; color: var(--vs-muted); font-size: 1.6rem;
  display: grid; place-items: center; transition: color .2s;
}
.vs-topnav-btn::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--vs-grad); transform: scaleX(0); transition: transform .25s var(--vs-ease); }
.vs-topnav-btn:hover { color: var(--vs-purple); }
.vs-topnav-btn.active { color: var(--vs-purple); }
.vs-topnav-btn.active::after { transform: scaleX(1); }
.vs-topnav-btn .vs-badge { top: 14px; right: 20px; }

.vs-actions { display: flex; align-items: center; gap: .6rem; margin-left: auto; }
.vs-icon-btn {
  position: relative; width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: var(--vs-surface-2); color: var(--vs-text); font-size: 1.3rem; display: grid; place-items: center;
  transition: background .2s, color .2s, transform .2s;
}
.vs-icon-btn:hover { background: var(--vs-active-bg); color: var(--vs-purple); transform: translateY(-1px); }
.vs-badge {
  position: absolute; top: -3px; right: -3px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px;
  background: linear-gradient(135deg, #f43f5e, #ef4444); color: #fff; font-size: .68rem; font-weight: 700; font-style: normal; line-height: 19px; text-align: center;
  border: 2px solid var(--vs-surface);
}
.vs-badge:empty, .vs-count:empty { display: none; }
.vs-avatar-btn { border: 0; background: none; padding: 0; border-radius: 50%; }
.vs-avatar-btn img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid #fff; box-shadow: 0 0 0 2px #a78bfa; }

/* Dropdowns */
.vs-dropdown { border: 1px solid var(--vs-border); border-radius: var(--vs-radius); box-shadow: var(--vs-shadow-lg); padding: .5rem; background: var(--vs-surface); min-width: 220px; }
.vs-dropdown .dropdown-item { border-radius: 10px; padding: .55rem .75rem; display: flex; align-items: center; gap: .65rem; color: var(--vs-text); font-size: .92rem; }
.vs-dropdown .dropdown-item:hover, .vs-dropdown .dropdown-item:focus { background: var(--vs-active-bg); color: var(--vs-purple); }
.vs-dropdown .dropdown-item.text-danger:hover { color: var(--vs-red) !important; }
.vs-dropdown .dropdown-item .bi { font-size: 1.05rem; width: 20px; text-align: center; }
.vs-dropdown-head { display: flex; justify-content: space-between; align-items: center; padding: .5rem .6rem .75rem; }
.vs-dropdown-head .btn-link { color: var(--vs-purple); text-decoration: none; font-size: .8rem; }
.vs-dropdown-foot { width: 100%; border: 0; background: var(--vs-surface-2); border-radius: 12px; padding: .6rem; margin-top: .4rem; font-weight: 600; color: var(--vs-purple); font-size: .88rem; }
.vs-notif-menu { width: 370px; max-width: calc(100vw - 24px); }
.vs-notif-list { max-height: 380px; overflow: auto; }
.vs-notif-list-lg { max-height: none; }
.vs-notif { display: flex; gap: .75rem; align-items: flex-start; padding: .65rem; border-radius: 14px; border: 0; background: none; text-align: left; width: 100%; position: relative; }
.vs-notif:hover { background: var(--vs-surface-2); }
.vs-notif.unread { background: var(--vs-active-bg); }
.vs-notif.unread::after { content: ""; position: absolute; right: 12px; top: 50%; width: 9px; height: 9px; border-radius: 50%; background: var(--vs-purple); transform: translateY(-50%); }
.vs-notif-av { position: relative; flex-shrink: 0; }
.vs-notif-av img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; }
.vs-notif-av .bi { position: absolute; right: -4px; bottom: -2px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: .7rem; border: 2px solid var(--vs-surface); }
.vs-notif p { margin: 0; font-size: .88rem; padding-right: 16px; }
.vs-notif small { color: var(--vs-purple); font-weight: 500; font-size: .76rem; }
.vs-profile-menu { min-width: 260px; }
.vs-profile-card { display: flex; align-items: center; gap: .75rem; padding: .5rem .6rem; }
.vs-profile-card img { border-radius: 50%; }
.vs-profile-card small { display: block; color: var(--vs-muted); }

/* 4. LAYOUT --------------------------------------------- */
.vs-page { padding-top: 1.5rem; padding-bottom: 2rem; }
.vs-sticky { position: sticky; top: calc(var(--vs-topbar-h) + 1.5rem); display: flex; flex-direction: column; gap: 1.25rem; }
.vs-sidenav { padding: .75rem; display: flex; flex-direction: column; gap: .25rem; }
.vs-sidenav-link {
  display: flex; align-items: center; gap: .9rem; width: 100%; border: 0; background: none; border-radius: 14px;
  padding: .75rem 1rem; font-weight: 500; color: var(--vs-text); text-align: left; transition: background .2s, color .2s, transform .2s;
}
.vs-sidenav-link .bi { font-size: 1.3rem; width: 24px; text-align: center; }
.vs-sidenav-link:hover { background: var(--vs-surface-2); transform: translateX(3px); }
.vs-sidenav-link.active { background: var(--vs-active-bg); color: var(--vs-purple); font-weight: 600; }
.vs-sidenav-link.active .bi { color: var(--vs-purple); }
[data-bs-theme="dark"] .vs-sidenav-link.active, [data-bs-theme="dark"] .vs-sidenav-link.active .bi { color: #c4b5fd; }
.vs-count { margin-left: auto; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; background: linear-gradient(135deg, #f43f5e, #ef4444); color: #fff; font-size: .74rem; font-weight: 700; display: grid; place-items: center; }
.vs-legal { font-size: .75rem; color: var(--vs-muted); text-align: center; margin: 0; }

/* Promo cards */
.vs-promo { position: relative; border-radius: var(--vs-radius-lg); padding: 1.5rem; overflow: hidden; color: #fff; isolation: isolate; }
.vs-promo h3 { color: #fff; font-weight: 700; line-height: 1.2; margin-bottom: .4rem; }
.vs-promo p { opacity: .92; font-size: .9rem; }
.vs-promo-world {
  background: radial-gradient(circle at 85% 10%, rgba(255, 255, 255, .25), transparent 40%), linear-gradient(160deg, #a855f7 0%, #7c3aed 45%, #4f46e5 100%);
  padding-top: 9rem; box-shadow: 0 16px 36px rgba(124, 58, 237, .35);
}
.vs-promo-world::before, .vs-promo-world::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; }
.vs-promo-world::before { width: 220px; height: 220px; background: radial-gradient(circle, #f472b6 0%, transparent 70%); bottom: -90px; right: -70px; opacity: .8; }
.vs-promo-world::after { width: 160px; height: 160px; background: radial-gradient(circle, #60a5fa 0%, transparent 70%); top: 30px; left: -60px; opacity: .6; }
.vs-promo-world h3 { font-size: 1.45rem; }
.vs-promo-rocket { position: absolute; top: .25rem; right: .75rem; width: 150px; height: 150px; animation: vs-float 4s ease-in-out infinite; }
@keyframes vs-float { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-6px, -10px); } }

.vs-promo-connect { text-align: center; color: var(--vs-text); background: linear-gradient(135deg, #fde68a 0%, #fbcfe8 45%, #c4b5fd 100%); }
.vs-promo-connect::before { content: ""; position: absolute; z-index: -1; width: 140px; height: 140px; border-radius: 50%; background: #93c5fd; opacity: .6; right: -40px; bottom: -50px; }
.vs-promo-connect::after { content: ""; position: absolute; z-index: -1; width: 100px; height: 100px; border-radius: 50%; background: #f9a8d4; left: -30px; top: -30px; }
.vs-promo-connect h3 { font-size: 1.3rem; color: #3b0764; }
.vs-promo-connect p { color: #4c1d95; }
.vs-promo-connect img { animation: vs-beat 2.4s ease-in-out infinite; }
@keyframes vs-beat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.12); } 30% { transform: scale(1); } }

/* Views */
.vs-view { display: none; }
.vs-view.active { display: block; animation: vs-fade .35s var(--vs-ease); }
@keyframes vs-fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.vs-view-head { padding: 1.1rem 1.25rem; margin-bottom: 1.25rem; }
.vs-view-head h2 { font-size: 1.25rem; font-weight: 700; margin: 0; display: flex; align-items: center; gap: .5rem; }

/* 5. STORIES -------------------------------------------- */
.vs-stories {
  display: flex; gap: .85rem; overflow-x: auto; padding: .25rem .1rem 1rem; margin-bottom: .5rem;
  scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: #c4b5fd transparent; -webkit-overflow-scrolling: touch;
}
.vs-stories::-webkit-scrollbar { height: 6px; }
.vs-stories::-webkit-scrollbar-thumb { background: #c4b5fd; border-radius: 6px; }
.vs-story {
  position: relative; flex: 0 0 auto; width: 112px; height: 160px; border-radius: var(--vs-radius); overflow: hidden;
  border: 0; padding: 0; scroll-snap-align: start; box-shadow: var(--vs-shadow); background: var(--vs-surface);
  transition: transform .25s var(--vs-ease), box-shadow .25s;
}
.vs-story:hover { transform: translateY(-4px); box-shadow: var(--vs-shadow-lg); }
.vs-story > img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--vs-ease); }
.vs-story:hover > img { transform: scale(1.06); }
.vs-story::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .05) 40%, rgba(20, 8, 50, .75)); }
.vs-story-ring { position: absolute; top: 8px; left: 8px; z-index: 2; width: 40px; height: 40px; padding: 2.5px; border-radius: 50%; background: var(--vs-grad-story); }
.vs-story-ring img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 2px solid #fff; }
.vs-story.seen .vs-story-ring { background: #cbd5e1; }
.vs-story-name { position: absolute; z-index: 2; bottom: 10px; left: 10px; right: 10px; color: #fff; font-weight: 600; font-size: .82rem; text-align: left; line-height: 1.2; text-shadow: 0 1px 4px rgba(0, 0, 0, .4); }
.vs-story-create { background: var(--vs-surface); display: flex; flex-direction: column; }
.vs-story-create::after { display: none; }
.vs-story-create > img { height: 62%; }
.vs-story-create .vs-plus { position: absolute; top: calc(62% - 20px); left: 50%; transform: translateX(-50%); width: 40px; height: 40px; border-radius: 50%; background: var(--vs-grad); color: #fff; display: grid; place-items: center; font-size: 1.3rem; border: 3px solid var(--vs-surface); z-index: 2; }
.vs-story-create span:last-child { margin-top: auto; padding: 0 .5rem .7rem; font-weight: 600; font-size: .82rem; color: var(--vs-text); line-height: 1.2; }

/* 6. COMPOSER ------------------------------------------- */
.vs-composer { padding: 1.1rem 1.25rem .6rem; margin-bottom: 1.25rem; }
.vs-composer-input {
  flex: 1; height: 50px; border-radius: 999px; border: 1px solid var(--vs-border); background: var(--vs-surface-2);
  text-align: left; padding: 0 1.25rem; color: var(--vs-muted); transition: background .2s, border-color .2s; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.vs-composer-input:hover { background: var(--vs-active-bg); border-color: #ddd6fe; }
.vs-composer-actions { display: flex; justify-content: space-between; margin-top: .9rem; padding-top: .55rem; border-top: 1px solid var(--vs-border); }
.vs-composer-actions > button, .vs-composer-actions .dropdown > button {
  display: flex; align-items: center; gap: .55rem; border: 0; background: none; padding: .55rem 1rem; border-radius: 12px; font-weight: 500; color: var(--vs-text); transition: background .2s;
}
.vs-composer-actions > button:hover, .vs-composer-actions .dropdown > button:hover { background: var(--vs-surface-2); }
.vs-composer-actions .bi { font-size: 1.25rem; }

.vs-filter-chip { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .65rem 1rem; margin-bottom: 1rem; border-radius: 14px; background: var(--vs-active-bg); color: var(--vs-purple); font-weight: 600; }
.vs-filter-chip button { border: 0; background: var(--vs-surface); width: 30px; height: 30px; border-radius: 50%; color: var(--vs-purple); }
[data-bs-theme="dark"] .vs-filter-chip { color: #c4b5fd; }

/* 7. POSTS ---------------------------------------------- */
.vs-feed { display: flex; flex-direction: column; gap: 1.25rem; }
.vs-post { overflow: hidden; animation: vs-fade .4s var(--vs-ease); }
.vs-post.is-new { animation: vs-pop .5s var(--vs-ease); }
@keyframes vs-pop { from { opacity: 0; transform: translateY(-14px) scale(.98); } to { opacity: 1; transform: none; } }
.vs-post-head { display: flex; align-items: center; gap: .8rem; padding: 1.1rem 1.25rem .6rem; }
.vs-post-head .vs-avatar { width: 50px; height: 50px; }
.vs-post-author { font-weight: 600; font-size: 1.05rem; line-height: 1.25; color: var(--vs-text); border: 0; background: none; padding: 0; text-align: left; }
.vs-post-author:hover { color: var(--vs-purple); }
.vs-post-meta { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem; font-size: .8rem; color: var(--vs-muted); }
.vs-post-meta .vs-topic-tag { color: var(--vs-purple); font-weight: 600; background: var(--vs-active-bg); padding: 0 .5rem; border-radius: 999px; border: 0; }
.vs-post-menu-btn { margin-left: auto; width: 38px; height: 38px; border-radius: 50%; border: 0; background: none; font-size: 1.2rem; color: var(--vs-muted); }
.vs-post-menu-btn:hover { background: var(--vs-surface-2); color: var(--vs-text); }
.vs-post-text { padding: 0 1.25rem .85rem; font-size: 1.02rem; white-space: pre-line; word-wrap: break-word; margin: 0; }
.vs-post-text .vs-feeling { color: var(--vs-muted); font-size: .9rem; }
.vs-post-media { position: relative; background: var(--vs-surface-2); margin: 0 .5rem; border-radius: 16px; overflow: hidden; cursor: pointer; user-select: none; }
.vs-post-media img { width: 100%; max-height: 560px; object-fit: cover; display: block; aspect-ratio: 16 / 9; }
.vs-post-media .vs-heart-burst { position: absolute; left: 50%; top: 50%; font-size: 6rem; color: #fff; transform: translate(-50%, -50%) scale(0); opacity: 0; pointer-events: none; filter: drop-shadow(0 8px 24px rgba(236, 72, 153, .7)); }
.vs-post-media.burst .vs-heart-burst { animation: vs-burst .8s var(--vs-ease); }
@keyframes vs-burst { 0% { transform: translate(-50%, -50%) scale(0); opacity: 0; } 30% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; } 70% { opacity: 1; } 100% { transform: translate(-50%, -50%) scale(1); opacity: 0; } }

.vs-post-stats { display: flex; align-items: center; justify-content: space-between; padding: .85rem 1.25rem .6rem; font-size: .9rem; color: var(--vs-muted); }
.vs-reactions { display: flex; align-items: center; gap: .45rem; }
.vs-reaction-icons { display: flex; }
.vs-reaction-icons span { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: .7rem; border: 2px solid var(--vs-surface); }
.vs-reaction-icons span + span { margin-left: -6px; }
.vs-r-like { background: linear-gradient(135deg, #60a5fa, #2563eb); }
.vs-r-love { background: linear-gradient(135deg, #fb7185, #e11d48); }
.vs-stat-btn { border: 0; background: none; color: inherit; padding: 0; }
.vs-stat-btn:hover { text-decoration: underline; color: var(--vs-text); }
.vs-post-actions { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: .25rem; margin: 0 1rem; padding: .35rem 0; border-top: 1px solid var(--vs-border); }
.vs-act {
  display: flex; align-items: center; justify-content: center; gap: .5rem; border: 0; background: none; border-radius: 12px;
  padding: .65rem .5rem; font-weight: 500; color: var(--vs-muted); transition: background .2s, color .2s;
}
.vs-act .bi { font-size: 1.25rem; }
.vs-act:hover { background: var(--vs-surface-2); color: var(--vs-text); }
.vs-act.liked { color: var(--vs-indigo); font-weight: 600; }
[data-bs-theme="dark"] .vs-act.liked { color: #a5b4fc; }
.vs-act.liked .bi { animation: vs-like .45s var(--vs-ease); }
@keyframes vs-like { 0% { transform: scale(1); } 40% { transform: scale(1.35) rotate(-12deg); } 100% { transform: scale(1); } }
.vs-act-more { padding: .65rem .85rem; }

.vs-comments { padding: .25rem 1.25rem 1.1rem; border-top: 1px solid var(--vs-border); margin: 0 1rem; padding-left: 0; padding-right: 0; }
.vs-comment { display: flex; gap: .6rem; margin-top: .75rem; animation: vs-fade .3s var(--vs-ease); }
.vs-comment img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.vs-comment-bubble { background: var(--vs-surface-2); border-radius: 4px 16px 16px 16px; padding: .5rem .85rem; font-size: .9rem; min-width: 0; }
.vs-comment-bubble strong { display: block; font-size: .84rem; }
.vs-comment-bubble p { margin: 0; word-wrap: break-word; }
.vs-comment-time { font-size: .72rem; color: var(--vs-muted); margin: .2rem 0 0 .6rem; }
.vs-comment-form { display: flex; gap: .6rem; align-items: center; margin-top: .9rem; }
.vs-comment-form img { width: 36px; height: 36px; border-radius: 50%; }
.vs-comment-form .vs-comment-input-wrap { flex: 1; position: relative; }
.vs-comment-form input { width: 100%; height: 42px; border-radius: 999px; border: 1px solid var(--vs-border); background: var(--vs-surface-2); padding: 0 3rem 0 1rem; color: var(--vs-text); }
.vs-comment-form input:focus { outline: none; border-color: #c4b5fd; box-shadow: 0 0 0 3px rgba(139, 92, 246, .15); }
.vs-comment-form button { position: absolute; right: 4px; top: 4px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--vs-grad); color: #fff; font-size: .85rem; }
.vs-no-comments { font-size: .85rem; color: var(--vs-muted); margin: .75rem 0 0; }

/* Skeleton / empty */
.vs-skeleton { padding: 1.25rem; }
.vs-sk { background: linear-gradient(90deg, var(--vs-surface-2) 25%, var(--vs-active-bg) 50%, var(--vs-surface-2) 75%); background-size: 200% 100%; animation: vs-shimmer 1.2s infinite linear; border-radius: 10px; }
@keyframes vs-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.vs-empty { text-align: center; padding: 2.5rem 1.5rem; color: var(--vs-muted); }
.vs-empty .bi { font-size: 2.6rem; display: block; margin-bottom: .5rem; }
.vs-empty .bi::before { background: var(--vs-grad-pink); }
.vs-load-more { text-align: center; padding: 1.5rem 0 .5rem; }
.vs-end-msg { color: var(--vs-muted); margin: 0; font-weight: 500; }
.vs-load-more .spin .bi { display: inline-block; animation: vs-spin .8s linear infinite; }
@keyframes vs-spin { to { transform: rotate(360deg); } }

/* 8. RIGHT SIDEBAR -------------------------------------- */
.vs-widget { padding: 1.1rem 1rem; }
.vs-widget-head { display: flex; justify-content: space-between; align-items: center; padding: 0 .25rem .6rem; }
.vs-widget-head h2 { font-size: 1.12rem; font-weight: 700; margin: 0; }
.vs-widget-head button { border: 0; background: none; color: var(--vs-purple); font-weight: 600; font-size: .85rem; }
[data-bs-theme="dark"] .vs-widget-head button { color: #c4b5fd; }
.vs-topics, .vs-online { list-style: none; margin: 0; padding: 0; }
.vs-topics button, .vs-online button {
  display: flex; align-items: center; gap: .85rem; width: 100%; padding: .55rem .4rem; border: 0; background: none; border-radius: 12px; font-weight: 500; text-align: left; transition: background .2s, transform .2s;
}
.vs-topics button:hover, .vs-online button:hover { background: var(--vs-surface-2); transform: translateX(3px); }
.vs-topics button.active { background: var(--vs-active-bg); color: var(--vs-purple); }
.vs-topics small { margin-left: auto; color: var(--vs-muted); font-size: .75rem; font-weight: 400; }
.vs-topic-ic { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 1.05rem; flex-shrink: 0; }
.bg-blue { background: linear-gradient(135deg, #60a5fa, #2563eb); }
.bg-red { background: linear-gradient(135deg, #fb7185, #ef4444); }
.bg-pink { background: linear-gradient(135deg, #f472b6, #c026d3); }
.bg-purple { background: linear-gradient(135deg, #a78bfa, #6d28d9); }
.bg-green { background: linear-gradient(135deg, #4ade80, #16a34a); }
.bg-amber { background: linear-gradient(135deg, #fcd34d, #f59e0b); }
.vs-online-av { position: relative; flex-shrink: 0; }
.vs-online-av img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; }
.vs-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--vs-green); box-shadow: 0 0 0 3px rgba(34, 197, 94, .18); margin-left: auto; flex-shrink: 0; }
.vs-dot.away { background: var(--vs-amber); box-shadow: 0 0 0 3px rgba(245, 158, 11, .18); }

/* 9. VIEWS ---------------------------------------------- */
.vs-tabs { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .85rem; }
.vs-tabs button { border: 1px solid var(--vs-border); background: var(--vs-surface); border-radius: 999px; padding: .35rem 1rem; font-size: .85rem; font-weight: 500; }
.vs-tabs button.active { background: var(--vs-grad); color: #fff; border-color: transparent; }
.vs-explore-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; }
.vs-explore-item { position: relative; border: 0; padding: 0; border-radius: var(--vs-radius); overflow: hidden; aspect-ratio: 1; box-shadow: var(--vs-shadow); }
.vs-explore-item:first-child { grid-column: span 2; grid-row: span 2; }
.vs-explore-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--vs-ease); }
.vs-explore-item:hover img { transform: scale(1.06); }
.vs-explore-item > span { position: absolute; inset: auto 0 0 0; padding: 2rem .75rem .6rem; color: #fff; font-size: .8rem; font-weight: 600; text-align: left; background: linear-gradient(transparent, rgba(20, 8, 50, .8)); display: flex; gap: .75rem; }

.vs-friends-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; }
.vs-friend-card { text-align: center; padding: 1.25rem 1rem; }
.vs-friend-card img { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; padding: 3px; background: var(--vs-grad-story); margin-bottom: .6rem; }
.vs-friend-card h3 { font-size: 1rem; font-weight: 600; margin: 0; }
.vs-friend-card p { font-size: .8rem; color: var(--vs-muted); margin: .2rem 0 .85rem; }
.vs-friend-card .vs-btn-gradient, .vs-friend-card .vs-btn-soft { width: 100%; }

.vs-profile { overflow: hidden; margin-bottom: 1.25rem; }
.vs-profile-cover { height: 200px; overflow: hidden; }
.vs-profile-cover img { width: 100%; height: 100%; object-fit: cover; }
.vs-profile-body { display: flex; align-items: center; gap: 1.25rem; padding: 1rem 1.5rem 1.25rem; flex-wrap: wrap; }
.vs-profile-avatar { width: 120px; height: 120px; border-radius: 50%; border: 5px solid var(--vs-surface); box-shadow: var(--vs-shadow-lg); object-fit: cover; margin-top: -64px; align-self: flex-start; }
.vs-profile-info { flex: 1; min-width: 200px; }
.vs-profile-info h2 { font-size: 1.45rem; font-weight: 700; margin: 0 0 .1rem; }
.vs-profile-stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--vs-border); }
.vs-profile-stats div { text-align: center; padding: .9rem .25rem; }
.vs-profile-stats div + div { border-left: 1px solid var(--vs-border); }
.vs-profile-stats strong { display: block; font-size: 1.15rem; }
.vs-profile-stats span { font-size: .78rem; color: var(--vs-muted); }

/* 10. MODALS -------------------------------------------- */
.vs-modal { border: 0; border-radius: var(--vs-radius-lg); background: var(--vs-surface); color: var(--vs-text); box-shadow: var(--vs-shadow-lg); }
.vs-modal .modal-header { border-bottom: 1px solid var(--vs-border); justify-content: center; position: relative; }
.vs-modal .modal-header .btn-close { position: absolute; right: 1rem; }
.vs-modal .modal-title { font-weight: 700; display: flex; align-items: center; gap: .5rem; }
.vs-modal .modal-footer { border-top: 0; padding-top: 0; }
.vs-privacy-select { border: 0; background: var(--vs-surface-2); border-radius: 8px; font-size: .78rem; padding: .15rem .4rem; color: var(--vs-text); }
.vs-textarea { width: 100%; border: 0; resize: none; font-size: 1.15rem; background: transparent; color: var(--vs-text); }
.vs-textarea:focus { outline: none; }
.vs-textarea::placeholder { color: var(--vs-muted); }
.vs-input { border-radius: 12px; border-color: var(--vs-border); background: var(--vs-surface-2); }
.vs-post-meta-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.vs-post-meta-chips span { background: var(--vs-active-bg); color: var(--vs-purple); border-radius: 999px; padding: .15rem .65rem; font-size: .8rem; font-weight: 500; }
.vs-upload-preview { position: relative; border-radius: 16px; overflow: hidden; margin: .75rem 0; border: 1px solid var(--vs-border); }
.vs-upload-preview img { width: 100%; max-height: 320px; object-fit: cover; display: block; }
.vs-remove-img { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(15, 10, 40, .65); color: #fff; }
.vs-feelings { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: .4rem; margin: .75rem 0; }
.vs-feelings button { border: 1px solid var(--vs-border); background: var(--vs-surface); border-radius: 12px; padding: .45rem .6rem; font-size: .85rem; text-align: left; }
.vs-feelings button.active, .vs-feelings button:hover { border-color: #c4b5fd; background: var(--vs-active-bg); }
.vs-extra-field { display: flex; align-items: center; gap: .6rem; border: 1px solid var(--vs-border); border-radius: 12px; padding: .5rem .85rem; margin: .6rem 0; }
.vs-extra-field input { flex: 1; border: 0; background: transparent; color: var(--vs-text); }
.vs-extra-field input:focus { outline: none; }
.vs-topic-select { display: flex; align-items: center; gap: .6rem; margin: .75rem 0; flex-wrap: wrap; font-size: .85rem; color: var(--vs-muted); }
.vs-topic-pills { display: flex; gap: .35rem; flex-wrap: wrap; }
.vs-topic-pills label { border: 1px solid var(--vs-border); border-radius: 999px; padding: .2rem .7rem; cursor: pointer; font-size: .8rem; color: var(--vs-text); }
.vs-topic-pills .btn-check:checked + label { background: var(--vs-grad); color: #fff; border-color: transparent; }
.vs-add-to-post { display: flex; justify-content: space-between; align-items: center; border: 1px solid var(--vs-border); border-radius: 14px; padding: .5rem .5rem .5rem 1rem; font-weight: 500; font-size: .9rem; gap: .5rem; }
.vs-add-to-post > div { display: flex; gap: .15rem; }
.vs-add-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; border: 0; background: none; font-size: 1.3rem; cursor: pointer; margin: 0; }
.vs-add-btn:hover { background: var(--vs-surface-2); }

/* Story viewer */
.vs-story-modal .modal-dialog { max-width: 420px; }
.vs-story-modal .modal-content { position: relative; height: min(88vh, 760px); border: 0; border-radius: var(--vs-radius-lg); overflow: hidden; background: #0b0618; color: #fff; }
.vs-story-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vs-story-modal .modal-content::after { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(0, 0, 0, .45), transparent 22%, transparent 70%, rgba(0, 0, 0, .65)); pointer-events: none; }
.vs-story-progress { position: absolute; top: 10px; left: 10px; right: 10px; z-index: 3; display: flex; gap: 4px; }
.vs-story-progress span { flex: 1; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .35); overflow: hidden; }
.vs-story-progress span i { display: block; height: 100%; width: 0; background: #fff; }
.vs-story-progress span.done i { width: 100%; }
.vs-story-head { position: absolute; top: 22px; left: 12px; right: 12px; z-index: 3; display: flex; align-items: center; gap: .6rem; }
.vs-story-head img { border-radius: 50%; border: 2px solid #fff; object-fit: cover; }
.vs-story-head strong { display: block; font-size: .92rem; }
.vs-story-head small { opacity: .8; font-size: .76rem; }
.vs-story-ctrl { width: 38px; height: 38px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .15); color: #fff; }
.vs-story-caption { position: absolute; z-index: 3; left: 1.25rem; right: 1.25rem; bottom: 86px; text-align: center; font-weight: 600; font-size: 1.1rem; text-shadow: 0 2px 8px rgba(0, 0, 0, .6); margin: 0; }
.vs-story-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .22); color: #fff; backdrop-filter: blur(6px); }
.vs-story-nav.prev { left: 10px; } .vs-story-nav.next { right: 10px; }
.vs-story-nav:hover { background: rgba(255, 255, 255, .4); }
.vs-story-reply { position: absolute; z-index: 3; left: 12px; right: 12px; bottom: 14px; display: flex; gap: .5rem; }
.vs-story-reply input { flex: 1; min-width: 0; height: 46px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .5); background: rgba(0, 0, 0, .25); color: #fff; padding: 0 1rem; }
.vs-story-reply input::placeholder { color: rgba(255, 255, 255, .75); }
.vs-story-reply button { width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--vs-grad); color: #fff; flex-shrink: 0; }
.vs-story-reply .vs-story-react { background: rgba(255, 255, 255, .18); }
.vs-story-reply .vs-story-react.loved { background: var(--vs-grad-pink); }
.vs-story-drop { display: grid; place-items: center; height: 300px; border: 2px dashed #c4b5fd; border-radius: var(--vs-radius); cursor: pointer; overflow: hidden; background: var(--vs-surface-2); color: var(--vs-purple); font-weight: 600; }
.vs-story-drop img { width: 100%; height: 100%; object-fit: cover; }
.vs-story-drop .bi { font-size: 1.6rem; margin-right: .4rem; vertical-align: middle; }

/* Live */
.vs-live-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--vs-red); box-shadow: 0 0 0 4px rgba(239, 68, 68, .25); animation: vs-beat 1.4s infinite; }
.vs-live-stage { position: relative; aspect-ratio: 4 / 3; border-radius: var(--vs-radius); overflow: hidden; background: linear-gradient(135deg, #312e81, #6d28d9 60%, #db2777); }
.vs-live-stage video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.vs-live-placeholder { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; color: #fff; }
.vs-live-placeholder .bi { font-size: 2.5rem; }
.vs-live-tag { position: absolute; top: 12px; left: 12px; background: var(--vs-red); color: #fff; font-weight: 700; font-size: .78rem; padding: .25rem .6rem; border-radius: 8px; }

.vs-invite-link { display: flex; gap: .5rem; background: var(--vs-surface-2); border-radius: 999px; padding: .35rem .35rem .35rem 1rem; }
.vs-invite-link input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--vs-text); font-size: .88rem; }
.vs-switch { padding: .75rem 0 .75rem 3.2em; border-bottom: 1px solid var(--vs-border); }
.vs-switch:last-child { border: 0; }
.vs-switch .form-check-input { width: 2.6em; height: 1.4em; margin-left: -3.2em; }
.form-check-input:checked { background-color: var(--vs-purple); border-color: var(--vs-purple); }

/* Mobile search */
.vs-mobile-search { position: fixed; inset: 0; z-index: 1060; background: var(--vs-surface); display: flex; flex-direction: column; animation: vs-fade .2s; }
.vs-mobile-search-bar { display: flex; gap: .5rem; padding: .75rem; border-bottom: 1px solid var(--vs-border); }
.vs-mobile-search-bar input { flex: 1; min-width: 0; height: 44px; border-radius: 999px; border: 1px solid var(--vs-border); background: var(--vs-surface-2); padding: 0 1rem; color: var(--vs-text); }
.vs-mobile-search-results { overflow: auto; padding: .5rem; }

/* Chat */
.vs-chat { background: var(--vs-surface); color: var(--vs-text); max-width: 100vw; }
.vs-chat .offcanvas-header { border-bottom: 1px solid var(--vs-border); }
.vs-chat .offcanvas-title { font-weight: 700; display: flex; align-items: center; gap: .6rem; }
.vs-chat .offcanvas-title img { width: 36px; height: 36px; border-radius: 50%; }
.vs-chat-list { list-style: none; margin: 0; padding: .5rem; overflow: auto; }
.vs-chat-list button { display: flex; align-items: center; gap: .8rem; width: 100%; border: 0; background: none; padding: .65rem; border-radius: 14px; text-align: left; }
.vs-chat-list button:hover { background: var(--vs-surface-2); }
.vs-chat-list .vs-online-av img { width: 50px; height: 50px; }
.vs-chat-list .vs-online-av .vs-dot { position: absolute; right: 1px; bottom: 2px; width: 13px; height: 13px; border: 2px solid var(--vs-surface); box-shadow: none; }
.vs-chat-list .vs-chat-preview { min-width: 0; flex: 1; }
.vs-chat-list strong { display: block; }
.vs-chat-list small { color: var(--vs-muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vs-chat-list .unread small { color: var(--vs-text); font-weight: 600; }
.vs-chat-list .vs-unread-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--vs-purple); flex-shrink: 0; }
.vs-chat-thread { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.vs-chat-messages { flex: 1; overflow: auto; padding: 1rem; display: flex; flex-direction: column; gap: .45rem; background: var(--vs-surface-2); }
.vs-msg { max-width: 78%; padding: .55rem .9rem; border-radius: 18px; font-size: .92rem; word-wrap: break-word; animation: vs-fade .25s; }
.vs-msg.them { background: var(--vs-surface); border-bottom-left-radius: 6px; align-self: flex-start; box-shadow: var(--vs-shadow); }
.vs-msg.me { background: var(--vs-grad); color: #fff; border-bottom-right-radius: 6px; align-self: flex-end; }
.vs-typing { align-self: flex-start; color: var(--vs-muted); font-size: .8rem; font-style: italic; }
.vs-chat-form { display: flex; gap: .5rem; padding: .75rem; border-top: 1px solid var(--vs-border); padding-bottom: calc(.75rem + env(safe-area-inset-bottom)); }
.vs-chat-form input { flex: 1; min-width: 0; height: 46px; border-radius: 999px; border: 1px solid var(--vs-border); background: var(--vs-surface-2); padding: 0 1rem; color: var(--vs-text); }
.vs-chat-form button { width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--vs-grad); color: #fff; }

/* Toasts */
.vs-toasts { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 1090; }
.vs-toast { border: 0; border-radius: 16px; background: var(--vs-surface); color: var(--vs-text); box-shadow: var(--vs-shadow-lg); overflow: hidden; }
.vs-toast .toast-body { display: flex; align-items: center; gap: .75rem; padding: .85rem 1rem; font-weight: 500; }
.vs-toast .vs-toast-ic { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; flex-shrink: 0; }
.vs-toast .btn-close { margin-left: auto; font-size: .7rem; }

/* Dark mode tweaks for Bootstrap pieces */
[data-bs-theme="dark"] .btn-close { filter: invert(1) grayscale(100%) brightness(200%); }
[data-bs-theme="dark"] .vs-story-modal .btn-close { filter: none; }
[data-bs-theme="dark"] .vs-avatar-btn img { border-color: var(--vs-surface); }
[data-bs-theme="dark"] mark { background: #7c3aed; color: #fff; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
.reduce-motion *, .reduce-motion *::before, .reduce-motion *::after { animation: none !important; transition: none !important; }

/* 11. RESPONSIVE ---------------------------------------- */
.vs-bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1035;
  height: calc(var(--vs-bottomnav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--vs-border); box-shadow: 0 -6px 24px rgba(91, 63, 197, .08);
}
[data-bs-theme="dark"] .vs-bottomnav { background: rgba(20, 17, 38, .92); }
.vs-bottomnav button { position: relative; border: 0; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--vs-muted); font-size: .7rem; font-weight: 500; min-width: 0; }
.vs-bottomnav .bi { font-size: 1.35rem; transition: transform .2s var(--vs-ease); }
.vs-bottomnav button.active { color: var(--vs-purple); font-weight: 600; }
[data-bs-theme="dark"] .vs-bottomnav button.active { color: #c4b5fd; }
.vs-bottomnav button.active .bi { transform: translateY(-2px); }
.vs-bottomnav button.active::before { content: ""; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--vs-grad); }
.vs-bottomnav .vs-badge { top: 8px; right: calc(50% - 22px); }
.vs-bottomnav span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }
.vs-fab { position: fixed; right: 1rem; bottom: calc(var(--vs-bottomnav-h) + 1rem + env(safe-area-inset-bottom)); z-index: 1034; width: 56px; height: 56px; border-radius: 50%; border: 0; background: var(--vs-grad-pink); color: #fff; font-size: 1.5rem; box-shadow: 0 10px 24px rgba(236, 72, 153, .45); }

@media (min-width: 1400px) {
  .vs-topnav-btn { width: 96px; }
}
@media (max-width: 1199.98px) {
  .vs-search { flex-basis: 280px; }
  .vs-topnav-btn { width: 70px; }
}
@media (max-width: 991.98px) {
  :root { --vs-topbar-h: 64px; }
  body { padding-bottom: calc(var(--vs-bottomnav-h) + env(safe-area-inset-bottom)); }
  .vs-search { display: none; }
  .vs-page { max-width: 680px; padding-top: 1rem; }
  .vs-toasts { bottom: calc(var(--vs-bottomnav-h) + 1rem); left: 1rem; right: 1rem; }
  .vs-toasts .toast { width: 100%; }
}
@media (max-width: 767.98px) {
  .vs-brand span { font-size: 1.3rem; }
  .vs-brand img { width: 32px; height: 32px; }
  .vs-icon-btn { width: 40px; height: 40px; font-size: 1.1rem; }
  .vs-story { width: 96px; height: 140px; }
  .vs-explore-grid { grid-template-columns: repeat(2, 1fr); }
  .vs-profile-cover { height: 150px; }
}
@media (max-width: 575.98px) {
  .vs-page { padding-left: 0; padding-right: 0; padding-top: .75rem; }
  .vs-page > .row { --bs-gutter-x: 0; }
  .vs-topbar-inner { gap: .5rem; }
  .vs-actions { gap: .4rem; }
  /* Edge-to-edge cards like a native app */
  .vs-card { border-radius: 0; border-left: 0; border-right: 0; box-shadow: none; }
  .vs-feed { gap: .6rem; }
  .vs-composer { margin-bottom: .6rem; padding: .85rem 1rem .4rem; }
  .vs-composer-input { height: 44px; font-size: .9rem; }
  .vs-composer-actions > button, .vs-composer-actions .dropdown > button { padding: .5rem .55rem; font-size: .85rem; gap: .4rem; }
  .vs-stories { padding: .85rem .75rem .75rem; gap: .6rem; margin: -.75rem 0 .6rem; background: var(--vs-surface); border-bottom: 1px solid var(--vs-border); }
  /* Circular stories on phones (as in mobile reference) */
  .vs-story { width: 70px; height: auto; background: none; box-shadow: none; overflow: visible; border-radius: 0; display: flex; flex-direction: column; align-items: center; gap: .3rem; }
  .vs-story:hover { transform: none; box-shadow: none; }
  .vs-story::after { display: none; }
  .vs-story > img { width: 66px; height: 66px; border-radius: 50%; padding: 3px; background: var(--vs-grad-story); border: 0; object-fit: cover; }
  .vs-story.seen > img { background: #cbd5e1; }
  .vs-story:hover > img { transform: none; }
  .vs-story-ring { display: none; }
  .vs-story-name { position: static; color: var(--vs-text); text-shadow: none; text-align: center; font-size: .72rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 70px; }
  .vs-story-create { background: none; }
  .vs-story-create > img { height: 66px; }
  .vs-story-create .vs-plus { top: 13px; width: 40px; height: 40px; }
  .vs-story-create span:last-child { margin: 0; padding: 0; font-size: .72rem; font-weight: 500; }
  .vs-post-head { padding: .85rem 1rem .5rem; }
  .vs-post-head .vs-avatar { width: 44px; height: 44px; }
  .vs-post-author { font-size: .98rem; }
  .vs-post-text { padding: 0 1rem .7rem; font-size: .95rem; }
  .vs-post-media { margin: 0; border-radius: 0; }
  .vs-post-media img { aspect-ratio: 4 / 3; }
  .vs-post-stats { padding: .7rem 1rem .5rem; font-size: .82rem; }
  .vs-post-actions { margin: 0 .5rem; }
  .vs-act { font-size: .88rem; padding: .6rem .25rem; gap: .35rem; }
  .vs-comments { margin: 0 1rem; }
  .vs-view-head { margin-bottom: .6rem; }
  .vs-friends-grid { grid-template-columns: repeat(2, 1fr); gap: .6rem; padding: 0 .6rem; }
  .vs-friends-grid .vs-card { border-radius: var(--vs-radius); border: 1px solid var(--vs-border); }
  .vs-explore-grid { gap: .35rem; padding: 0 .35rem; }
  .vs-profile-body { padding: 0 1rem 1rem; gap: .75rem; }
  .vs-profile-avatar { width: 96px; height: 96px; }
  .vs-profile-body .vs-btn-gradient { width: 100%; }
  .vs-filter-chip { margin: 0 .75rem .6rem; }
}
@media (max-width: 424.98px) {
  .vs-composer-actions > button span { font-size: .8rem; }
  .vs-act span { font-size: .82rem; }
  .vs-bottomnav span { font-size: .64rem; }
  .vs-profile-stats strong { font-size: 1rem; }
}
@media (max-width: 374.98px) {
  .vs-brand span { font-size: 1.12rem; }
  .vs-brand img { width: 28px; height: 28px; }
  .vs-icon-btn { width: 36px; height: 36px; font-size: 1rem; }
  .vs-composer-actions > button span { display: none; }
  .vs-composer-actions > button { flex: 1; justify-content: center; }
  .vs-act span { display: none; }
  .vs-bottomnav span { font-size: .62rem; }
  .vs-friends-grid { grid-template-columns: 1fr; }
}
