@font-face {
  font-family: 'InstagramSansExact';
  src: url('/static/fonts/InstagramSansExact.woff2') format('woff2'),
       url('/static/fonts/InstagramSansExact.woff') format('woff'),
       url('/static/fonts/InstagramSansExact.ttf') format('truetype');
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@700;800;900&display=swap');

:root {
  --primary: #ec4899;
  --primary-hover: #db2777;
  --primary-gradient: linear-gradient(135deg, #7c3aed 0%, #ec4899 55%, #f97316 100%);
  --story-gradient: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  --story-seen: #cbd5e1;
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;
  --border-color: #e8ecf2;
  --badge-bg: #f1f5f9;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --card-radius: 24px;
  --shadow-subtle: 0 4px 20px rgba(0, 0, 0, 0.04);
  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.06);
  --shadow-glow: 0 8px 24px rgba(236, 72, 153, 0.35);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg-main: #090d16;
    --bg-card: #131b2e;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-subtle: #64748b;
    --border-color: #1e293b;
    --badge-bg: #1e293b;
    --shadow-subtle: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.4);
  }
}

:root[data-theme="dark"] {
  --bg-main: #090d16;
  --bg-card: #131b2e;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;
  --border-color: #1e293b;
  --badge-bg: #1e293b;
  --shadow-subtle: 0 4px 20px rgba(0, 0, 0, 0.3);
  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.4);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  padding-bottom: 100px; /* space for elevated bottom nav */
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

/* App Container */
.app-container {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 14px;
  position: relative;
  animation: pageFadeIn 0.28s ease-out;
}

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

/* Top page-transition progress bar */
.page-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--primary-gradient);
  z-index: 9999;
  opacity: 0;
  transition: width 0.3s ease, opacity 0.3s ease;
}

.page-progress-bar.active {
  opacity: 1;
}

/* ========================================================
   TOP HEADER (PINTEREST / LOOP STYLE)
   ======================================================== */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 40;
  border-bottom: 1px solid var(--border-color);
  max-width: 480px;
  margin: 0 auto 12px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .app-header {
    background: rgba(19, 27, 46, 0.9);
  }
}

:root[data-theme="dark"] .app-header {
  background: rgba(19, 27, 46, 0.9);
}

.brand-logo-text {
  font-family: 'InstagramSansExact', 'Instagram Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 29px;
  font-weight: 400;
  letter-spacing: -0.3px;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 4px;
}

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

.header-icon-btn {
  font-size: 22px;
  color: var(--text-main);
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
}

.header-icon-btn:active {
  transform: scale(0.9);
}

.header-badge-count {
  position: absolute;
  top: -4px;
  right: -8px;
  background: var(--primary);
  color: white;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 5px;
  border-radius: 10px;
  border: 2px solid var(--bg-card);
}

/* ========================================================
   FEED TABS (Feed vs Discovery/Loops)
   ======================================================== */
.feed-tabs-switcher {
  display: flex;
  background: var(--badge-bg);
  padding: 4px;
  border-radius: var(--radius-full);
  margin-bottom: 16px;
  border: 1px solid var(--border-color);
}

.feed-tab-btn {
  flex: 1;
  text-align: center;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  background: transparent;
}

.feed-tab-btn.active {
  background: var(--bg-card);
  color: var(--text-main);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* ========================================================
   INSTAGRAM STORIES BAR
   ======================================================== */
.stories-section {
  margin-bottom: 18px;
}

.stories-wrapper {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 4px 2px 10px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.stories-wrapper::-webkit-scrollbar {
  display: none;
}

.story-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  flex-shrink: 0;
  width: 70px;
  text-align: center;
  transition: transform 0.2s ease;
}

.story-item:active {
  transform: scale(0.92);
}

.story-ring {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  padding: 2.5px;
  background: var(--story-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 4px 12px rgba(220, 39, 67, 0.25);
}

.story-ring.add-story {
  background: var(--border-color);
  box-shadow: none;
}

.story-ring.seen {
  background: var(--story-seen);
  box-shadow: none;
}

.story-plus-badge {
  position: absolute;
  bottom: 0px;
  right: 0px;
  width: 22px;
  height: 22px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 900;
  border: 2px solid var(--bg-card);
}

.story-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid var(--bg-card);
  object-fit: cover;
  background: #e2e8f0;
}

.story-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 66px;
}

/* ========================================================
   LOOP STYLE CREATOR FEED POST CARD
   ======================================================== */
.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--card-radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  margin-bottom: 20px;
  transition: transform 0.2s, box-shadow 0.2s;
}

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

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

.post-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--border-color);
}

.post-author-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 5px;
}

.post-subtitle {
  font-size: 12px;
  color: var(--text-muted);
}

.verified-badge-icon {
  color: #6366f1;
  font-size: 14px;
}

.post-menu-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  padding: 6px;
}

/* Post Media Presentation */
.post-media-container {
  position: relative;
  width: 100%;
  aspect-ratio: 4/5;
  background: #000;
  overflow: hidden;
  cursor: pointer;
}

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

.post-media-container:hover .post-media-img {
  transform: scale(1.02);
}

.post-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.2);
}

.play-circle-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.post-badge-tag {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.post-price-badge {
  position: absolute;
  bottom: 14px;
  right: 14px;
  background: var(--primary-gradient);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 12px rgba(236, 72, 153, 0.4);
}

/* Post Actions Bar */
.post-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 8px;
}

.post-left-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 20px;
}

.post-action-icon {
  cursor: pointer;
  color: var(--text-main);
  transition: transform 0.15s, color 0.15s;
}

.post-action-icon:active {
  transform: scale(0.85);
}

.post-action-icon.liked {
  color: #ef4444;
}

.post-likes-summary {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.post-likes-avatars {
  display: flex;
}

.post-likes-avatars img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--bg-card);
  margin-left: -6px;
}

.post-likes-avatars img:first-child {
  margin-left: 0;
}

/* Emoji Reaction Quick Bar */
.post-emoji-reactions {
  display: flex;
  gap: 8px;
  padding: 4px 16px 8px;
}

.reaction-pill {
  background: var(--badge-bg);
  border: 1px solid var(--border-color);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 13px;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
}

.reaction-pill:active {
  transform: scale(1.2);
  background: #fef3c7;
}

/* Post Content & Caption */
.post-content-section {
  padding: 0 16px 16px;
}

.post-caption-text {
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-main);
  margin-top: 4px;
}

.post-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 12px;
}

.post-tag {
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
}

.post-time-stamp {
  font-size: 11px;
  color: var(--text-subtle);
  text-transform: uppercase;
}

/* Post Direct CTA Row */
.post-cta-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.post-btn-cta {
  flex: 2;
  background: var(--primary-gradient);
  color: #fff;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(236, 72, 153, 0.25);
}

.post-btn-chat {
  flex: 1;
  background: var(--badge-bg);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 10px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* ========================================================
   DISCOVERY / SEARCH & TRENDING LOOPS (RIGHT SCREEN)
   ======================================================== */
.discovery-search-wrapper {
  position: relative;
  margin-bottom: 12px;
}

.discovery-search-input {
  width: 100%;
  padding: 12px 16px 12px 42px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-main);
  font-size: 14px;
  outline: none;
  box-shadow: var(--shadow-subtle);
}

.discovery-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.filter-pills-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 12px;
  scrollbar-width: none;
}

.filter-pills-row::-webkit-scrollbar {
  display: none;
}

.filter-pill-btn {
  padding: 7px 16px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-pill-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(236, 72, 153, 0.3);
}

/* ========================================================
   HOME FEED: TWITTER/X-EXPLORE-STYLE TRENDING LISTS
   (Vacancies / Creators / Paid) — a compact vertical list of
   rows, not boxy image cards: avatar/icon + bold title + a
   muted metadata line, divider-separated.
   ======================================================== */
.trend-list {
  border-radius: var(--card-radius);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.trend-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-color);
  text-decoration: none;
  color: inherit;
}

.trend-list-item:last-child {
  border-bottom: none;
}

.trend-list-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--badge-bg);
}

.trend-list-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--badge-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
}

.trend-list-content {
  flex: 1;
  min-width: 0;
}

.trend-list-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trend-list-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trend-list-meta.price {
  color: var(--primary);
  font-weight: 700;
}

.paid-inline-badge {
  color: var(--primary);
  font-weight: 800;
}

.trend-list-chevron {
  font-size: 11px;
  color: var(--text-subtle);
  flex-shrink: 0;
}

.trend-list-empty {
  padding: 24px 14px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}


/* Pure search results list (Qidiruv tab) */
.search-results-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.search-result-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  text-decoration: none;
  color: inherit;
}

.search-result-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.search-result-name {
  font-size: 14px;
  font-weight: 700;
}

.search-result-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ========================================================
   ELEVATED BOTTOM NAVIGATION (PINTEREST / LOOP STYLE)
   ======================================================== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 480px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px calc(8px + env(safe-area-inset-bottom));
  z-index: 50;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .bottom-nav {
    background: rgba(19, 27, 46, 0.94);
  }
}

:root[data-theme="dark"] .bottom-nav {
  background: rgba(19, 27, 46, 0.94);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  padding: 4px 8px;
  position: relative;
  transition: color 0.2s, transform 0.1s;
}

.nav-item:active {
  transform: scale(0.92);
}

.nav-item.active {
  color: var(--primary);
}

.nav-icon {
  font-size: 20px;
}

/* Center Elevated Floating Plus / Offer Button */
.nav-center-elevated-btn {
  width: 50px;
  height: 50px;
  border-radius: 18px;
  background: var(--primary-gradient);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: var(--shadow-glow);
  margin-top: -24px;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.nav-center-elevated-btn:active {
  transform: scale(0.92);
}

.nav-profile-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid currentColor;
}

/* ========================================================
   INSTAGRAM STORY FULLSCREEN VIEWER
   ======================================================== */
.story-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.96);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  touch-action: none;
}

.story-modal.active {
  display: flex;
}

.story-container {
  width: 100%;
  height: 100%;
  max-width: 440px;
  max-height: 94vh;
  position: relative;
  background: #111;
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

@media (max-width: 480px) {
  .story-container {
    max-height: 100vh;
    border-radius: 0;
  }
}

.story-progress-container {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  gap: 4px;
  z-index: 30;
}

.story-progress-segment {
  flex: 1;
  height: 2.5px;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 2px;
  overflow: hidden;
}

.story-progress-fill {
  height: 100%;
  background: #ffffff;
  width: 0%;
  transition: width 0.05s linear;
}

.story-progress-fill.completed {
  width: 100%;
}

.story-header-overlay {
  position: absolute;
  top: 24px;
  left: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 30;
  color: #fff;
}

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

.story-user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid #fff;
  object-fit: cover;
}

.story-username {
  font-size: 14px;
  font-weight: 700;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

.story-time {
  font-size: 11px;
  opacity: 0.8;
}

.story-close-btn {
  background: rgba(0, 0, 0, 0.4);
  border: none;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
}

.story-media-view {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

#storyStickersOverlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  pointer-events: none;
}

.story-touch-prev,
.story-touch-next {
  position: absolute;
  top: 70px;
  bottom: 100px;
  z-index: 25;
  cursor: pointer;
}

.story-touch-prev {
  left: 0;
  width: 35%;
}

.story-touch-next {
  right: 0;
  width: 65%;
}

.story-footer-cta {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.95));
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.story-caption-box {
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  text-shadow: 0 1px 4px rgba(0,0,0,0.9);
}

.story-actions-row {
  display: flex;
  gap: 8px;
}

.story-btn-primary {
  flex: 2;
  background: var(--primary-gradient);
  color: #fff;
  border: none;
  padding: 12px 16px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  box-shadow: 0 4px 12px rgba(236, 72, 153, 0.4);
}

.story-btn-secondary {
  flex: 1;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 12px 14px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}

/* Video Preview Modal */
.video-preview-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 99;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.video-preview-modal.active {
  display: flex;
}

.video-preview-modal video {
  max-width: 100%;
  max-height: 80vh;
  border-radius: var(--radius-lg);
}

.video-player-frame {
  position: relative;
  width: 100%;
  max-width: 440px;
}

.video-player-frame video {
  width: 100%;
  max-height: 80vh;
  border-radius: var(--radius-lg);
  display: block;
  cursor: pointer;
  background: #000;
}

.video-player-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
}

.video-player-center-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  transition: opacity 0.15s;
  pointer-events: none;
}

.video-player-center-btn.visible {
  pointer-events: auto;
}

.video-player-center-btn:not(.visible) {
  opacity: 0;
}

.video-player-mute {
  position: absolute;
  bottom: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  color: #fff;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* ========================================================
   CREATOR PROFILE DETAIL PAGE
   ======================================================== */
.profile-hero {
  position: relative;
  margin: -12px -14px 18px -14px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 16px;
}

.profile-cover {
  height: 140px;
  width: 100%;
  background: var(--primary-gradient);
  object-fit: cover;
}

.profile-avatar-container {
  padding: 0 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: -45px;
}

.profile-avatar-large {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 3.5px solid var(--bg-card);
  object-fit: cover;
  background: #fff;
  box-shadow: var(--shadow-card);
}

.profile-details-content {
  padding: 12px 16px 0;
}

.profile-name-lg {
  font-size: 22px;
  font-weight: 800;
}

.profile-bio-full {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-main);
}

/* Social platform quick-link buttons (round, brand-colored) */
.social-icon-row {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.social-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  transition: transform 0.15s;
}

.social-icon-btn:active {
  transform: scale(0.92);
}

.social-icon-btn.instagram {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.social-icon-btn.tiktok {
  background: #000;
}

.social-icon-btn.telegram {
  background: #0088cc;
}

/* Stats Counter Row */
.stats-counter-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 16px 0;
  text-align: center;
}

.stat-box {
  background: var(--badge-bg);
  padding: 12px 8px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.stat-val {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
}

.stat-title {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 2px;
}

/* Packages Stack */
.packages-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.package-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 18px;
  position: relative;
  box-shadow: var(--shadow-subtle);
  transition: all 0.2s;
}

.package-card.popular {
  border-color: var(--primary);
  box-shadow: 0 8px 24px rgba(236, 72, 153, 0.15);
}

.popular-badge {
  position: absolute;
  top: -12px;
  right: 18px;
  background: var(--primary-gradient);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 12px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
}

.package-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
}

.package-price-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 8px 0 12px;
}

.package-price {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
}

.package-delivery {
  font-size: 12px;
  color: var(--text-muted);
}

.package-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.4;
}

.package-features-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.package-features-list li {
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-main);
}

.feature-check {
  color: var(--success);
  font-weight: 800;
}

.package-select-btn {
  width: 100%;
  padding: 12px;
  border-radius: var(--radius-md);
  background: var(--badge-bg);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  text-align: center;
  display: block;
}

.package-card.popular .package-select-btn,
.package-select-btn:hover {
  background: var(--primary-gradient);
  color: #fff;
  border-color: transparent;
}

/* ========================================================
   CHAT SCREEN
   ======================================================== */
.chat-screen {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 150px);
  position: relative;
}

.chat-header-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
}

.chat-messages-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 10px 4px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-bubble {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 14px;
  line-height: 1.4;
  word-break: break-word;
}

.chat-bubble.mine {
  align-self: flex-end;
  background: var(--primary-gradient);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chat-bubble.other {
  align-self: flex-start;
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-bottom-left-radius: 4px;
}

.chat-time {
  font-size: 10px;
  opacity: 0.75;
  margin-top: 4px;
  text-align: right;
}

.chat-quick-suggestions {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 6px 2px;
  scrollbar-width: none;
}

.chat-quick-suggestions::-webkit-scrollbar {
  display: none;
}

.quick-chip {
  padding: 6px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
  color: var(--text-muted);
}

.chat-input-row {
  display: flex;
  gap: 8px;
  padding: 8px 0;
  align-items: center;
}

.chat-input {
  flex: 1;
  padding: 12px 16px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-main);
  font-size: 14px;
  outline: none;
}

.chat-send-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary-gradient);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  flex-shrink: 0;
}

/* Common UI */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--primary-gradient);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(236, 72, 153, 0.25);
}

.btn:active {
  transform: scale(0.98);
}

.btn.secondary {
  background: var(--badge-bg);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  box-shadow: none;
}

.btn.success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-subtle);
}

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin: 12px 0 6px;
}

input, textarea, select {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--text-main);
  font-size: 14px;
  outline: none;
}

input:focus, textarea:focus, select:focus {
  border-color: var(--primary);
}

.status {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
}

.status.pending { background: #fef3c7; color: #92400e; }
.status.accepted { background: #dbeafe; color: #1e40af; }
.status.delivered { background: #f3e8ff; color: #6b21a8; }
.status.approved, .status.completed { background: #d1fae5; color: #065f46; }
.status.rejected { background: #fee2e2; color: #991b1b; }
.status.escrow_held { background: #ccfbf1; color: #115e59; }

.section-title {
  font-size: 18px;
  font-weight: 800;
  margin: 20px 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.reviews-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.review-item-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
}

.review-author-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.review-author-name {
  font-size: 14px;
  font-weight: 700;
}

.review-stars {
  color: #f59e0b;
  font-size: 13px;
}

.review-text {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
}

.floating-cta-bar {
  position: fixed;
  bottom: 70px;
  left: 0;
  right: 0;
  max-width: 480px;
  margin: 0 auto;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 10px;
  z-index: 45;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .floating-cta-bar {
    background: rgba(19, 27, 46, 0.9);
  }
}

:root[data-theme="dark"] .floating-cta-bar {
  background: rgba(19, 27, 46, 0.9);
}

/* ========================================================
   DESKTOP LAYOUT (Instagram-web style sidebar)
   Hidden on mobile; takes over above 1024px.
   ======================================================== */
.desktop-sidebar {
  display: none;
}

@media (min-width: 1024px) {
  body {
    display: flex;
    align-items: flex-start;
    padding-bottom: 0;
  }

  .app-header,
  .bottom-nav,
  .floating-cta-bar {
    /* .floating-cta-bar is a fixed-position bar centered against the full
       viewport width, so once the sidebar pushes the content column right
       it visually reads as "stuck to the left". The profile header above
       already has the same Chat/Offer buttons on desktop, so just drop it
       instead of recomputing its offset. */
    display: none;
  }

  .desktop-sidebar {
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    width: 245px;
    flex-shrink: 0;
    padding: 24px 12px;
    border-right: 1px solid var(--border-color);
    box-sizing: border-box;
  }

  .app-container {
    flex: 1;
    max-width: 630px;
    margin: 32px auto;
    padding: 0 20px;
  }

  .story-modal,
  .video-preview-modal {
    /* keep overlays centered over the whole viewport, not just the feed column */
    left: 0;
  }
}

.desktop-sidebar-logo {
  font-family: 'InstagramSansExact', 'Instagram Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 29px;
  font-weight: 400;
  letter-spacing: -0.3px;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  padding: 16px 12px 28px;
  display: block;
}

.desktop-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.desktop-sidebar-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
  transition: background 0.15s;
}

.desktop-sidebar-item i {
  font-size: 20px;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

.desktop-sidebar-item:hover {
  background: var(--badge-bg);
}

.desktop-sidebar-item.active {
  font-weight: 800;
}

.desktop-sidebar-item.active i {
  color: var(--primary);
}

.desktop-sidebar-profile {
  margin-top: auto;
}

.desktop-sidebar-profile .nav-profile-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

/* ========================================================
   COMMENTS / LIKERS BOTTOM SHEET
   ======================================================== */
.comments-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 200;
  display: none;
  align-items: flex-end;
  justify-content: center;
}

.comments-modal.active {
  display: flex;
}

.comments-sheet {
  background: var(--bg-card);
  width: 100%;
  max-width: 480px;
  max-height: 75vh;
  border-radius: 20px 20px 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: sheetSlideUp 0.2s ease-out;
}

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

.comments-sheet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
}

.comments-sheet-header button {
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
}

.comments-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 80px;
}

.comments-empty {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  padding: 24px 0;
}

.comment-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.comment-author {
  font-weight: 700;
  font-size: 13px;
}

.comment-text {
  font-size: 14px;
  color: var(--text-main);
  line-height: 1.4;
}

.comment-time {
  font-size: 11px;
  color: var(--text-muted);
}

.comment-input-row {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border-color);
  flex-shrink: 0;
}

.comment-input-row input {
  flex: 1;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 10px 14px;
  background: var(--badge-bg);
  color: var(--text-main);
  font-size: 14px;
}

.comment-input-row button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-gradient);
  color: #fff;
  border: none;
  flex-shrink: 0;
  cursor: pointer;
}

.liker-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

.liker-row i {
  color: var(--primary);
  font-size: 16px;
}

/* ========================================================
   PROFILE: INSTAGRAM-STYLE 3-COLUMN CONTENT GRID
   ======================================================== */
.reels-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}

.reel-card {
  position: relative;
  aspect-ratio: 1/1;
  overflow: hidden;
  cursor: pointer;
  background: #000;
  border-radius: 5px;
}

.reel-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.reel-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 55%, rgba(0, 0, 0, 0.8));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 6px;
  opacity: 0;
  transition: opacity 0.15s;
}

.reel-card:hover .reel-overlay,
.reel-card:active .reel-overlay {
  opacity: 1;
}

.reel-niche-tag {
  align-self: flex-start;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-full);
}

.reel-bottom-info {
  color: #fff;
}

.reel-title {
  font-size: 10px;
  font-weight: 700;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.reel-views-count {
  font-size: 9px;
  opacity: 0.9;
  margin-top: 2px;
}

/* Highlights bubble row (Instagram-style, sits under profile bio) */
.highlights-row {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 4px 2px 10px;
  scrollbar-width: none;
}

.highlights-row::-webkit-scrollbar {
  display: none;
}

.highlight-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  width: 64px;
  text-align: center;
  text-decoration: none;
  color: inherit;
  position: relative;
}

.highlight-ring {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  padding: 2.5px;
  background: var(--story-seen);
  display: flex;
  align-items: center;
  justify-content: center;
}

.highlight-ring img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: var(--badge-bg);
}

.highlight-ring.add-highlight {
  background: var(--border-color);
}

.highlight-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 64px;
}

.highlight-edit-pencil {
  position: absolute;
  top: -2px;
  right: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  border: 2px solid var(--bg-card);
}

/* My Stories / Highlights management pages */
.manage-story-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
}

.manage-story-thumb {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--badge-bg);
}

.manage-story-caption {
  font-size: 13px;
  font-weight: 600;
}

.manage-story-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.manage-highlight-item-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.manage-highlight-item {
  position: relative;
  aspect-ratio: 1/1;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #000;
}

.manage-highlight-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.manage-highlight-item-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: none;
  font-size: 11px;
  cursor: pointer;
}

/* ========================================================
   STORY COMPOSER: sticker placement, emoji picker, music
   ======================================================== */
.story-composer-preview {
  position: relative;
  width: 220px;
  height: 390px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--badge-bg);
  border: 2px dashed var(--border-color);
  touch-action: none;
}

.story-composer-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.story-sticker {
  position: absolute;
  transform: translate(-50%, -50%);
  font-size: 32px;
  cursor: grab;
  user-select: none;
  line-height: 1;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
  touch-action: none;
  z-index: 5;
}

.story-sticker:active {
  cursor: grabbing;
}

.composer-tools-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 14px 0;
}

.composer-tool-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--badge-bg);
  border: 1px solid var(--border-color);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.emoji-picker-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 8px 2px;
  margin-bottom: 10px;
  scrollbar-width: none;
}

.emoji-picker-row::-webkit-scrollbar {
  display: none;
}

.emoji-picker-btn {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--badge-bg);
  border: 1px solid var(--border-color);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.music-preview-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--badge-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 10px;
  max-width: 220px;
  margin-left: auto;
  margin-right: auto;
}

.music-preview-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.music-preview-chip button {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  flex-shrink: 0;
}

/* Story viewer: sticker overlay + music badge */
.story-sticker-view {
  position: absolute;
  transform: translate(-50%, -50%);
  font-size: 34px;
  line-height: 1;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
  z-index: 20;
  pointer-events: none;
}

.story-music-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(6px);
  border-radius: var(--radius-full);
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  border: none;
  margin-left: 8px;
  flex-shrink: 0;
}

/* ========================================================
   TWITTER / X STYLE FEED & TIMELINE STYLES
   ======================================================== */

/* Sticky Header */
.x-sticky-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  margin: -12px -16px 12px;
  padding: 10px 16px 0;
}

[data-theme="dark"] .x-sticky-header,
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .x-sticky-header {
    background: rgba(9, 13, 22, 0.88);
  }
}

.x-top-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.x-user-avatar-sm {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--border-color);
  cursor: pointer;
}

.x-search-box-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--badge-bg);
  padding: 8px 14px;
  border-radius: 9999px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.x-search-box-wrap:hover {
  border-color: var(--border-color);
}

.x-search-icon {
  color: var(--text-muted);
  font-size: 13px;
}

.x-search-input-fake {
  background: transparent;
  border: none;
  outline: none;
  font-size: 13px;
  color: var(--text-muted);
  width: 100%;
  cursor: pointer;
}

.x-filter-cog-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--badge-bg);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  transition: transform 0.15s ease, background 0.15s ease;
}

.x-filter-cog-btn:active {
  transform: scale(0.92);
}

/* X Topic Tabs */
.x-topics-tab-row {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 0 -16px;
  padding: 0 16px;
}

.x-topics-tab-row::-webkit-scrollbar {
  display: none;
}

.x-topic-tab {
  padding: 10px 4px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  transition: color 0.15s ease;
}

.x-topic-tab:hover {
  color: var(--text-main);
}

.x-topic-tab.active {
  color: var(--text-main);
  font-weight: 700;
}

.x-topic-tab.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: #1d9bf0;
}

/* Timeline Feed & Cards */
.x-timeline-feed {
  display: flex;
  flex-direction: column;
  margin: 0 -16px;
}

.x-post-card {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-card);
  transition: background 0.15s ease;
}

.x-post-card:hover {
  background: rgba(0, 0, 0, 0.015);
}

[data-theme="dark"] .x-post-card:hover,
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .x-post-card:hover {
    background: rgba(255, 255, 255, 0.02);
  }
}

.x-post-left {
  flex-shrink: 0;
}

.x-post-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-color);
  display: block;
}

.x-post-right {
  flex: 1;
  min-width: 0;
}

/* Post Header */
.x-post-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.x-post-author-line {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  font-size: 14px;
  line-height: 1.3;
}

.x-post-author-name {
  font-weight: 700;
  color: var(--text-main);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.x-post-author-name:hover {
  text-decoration: underline;
}

.x-verified-check {
  color: #1d9bf0;
  font-size: 13px;
}

.x-post-handle {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 400;
}

.x-post-dot {
  color: var(--text-muted);
  font-size: 12px;
}

.x-post-time {
  color: var(--text-muted);
  font-size: 13px;
}

.x-post-options-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  font-size: 14px;
  transition: color 0.15s ease;
}

.x-post-options-btn:hover {
  color: #1d9bf0;
}

/* Badges Row */
.x-post-badges-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 3px 0 6px;
  flex-wrap: wrap;
}

.x-paid-tag {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.12);
  padding: 1px 7px;
  border-radius: 5px;
  border: 1px solid rgba(245, 158, 11, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.x-category-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
}

.x-category-tag.badge-vacancy {
  background: rgba(59, 130, 246, 0.12);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.x-category-tag.badge-cofounder {
  background: rgba(168, 85, 247, 0.12);
  color: #a855f7;
  border: 1px solid rgba(168, 85, 247, 0.25);
}

.x-category-tag.badge-investor {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.x-category-tag.badge-ugc {
  background: rgba(236, 72, 153, 0.12);
  color: #ec4899;
  border: 1px solid rgba(236, 72, 153, 0.25);
}

.x-category-tag.badge-barter {
  background: rgba(249, 115, 22, 0.12);
  color: #f97316;
  border: 1px solid rgba(249, 115, 22, 0.25);
}

.x-category-tag.badge-creator {
  background: rgba(124, 58, 237, 0.12);
  color: #7c3aed;
  border: 1px solid rgba(124, 58, 237, 0.25);
}

.x-location-tag {
  font-size: 11px;
  color: var(--text-muted);
  background: var(--badge-bg);
  padding: 2px 7px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

/* Post Content */
.x-post-content-wrap {
  margin: 4px 0 8px;
}

.x-post-title {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 5px;
  color: var(--text-main);
  line-height: 1.35;
}

.x-post-text {
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-main);
  margin: 0;
  white-space: pre-line;
  word-break: break-word;
}

/* Opportunity Box */
.x-opportunity-card {
  background: rgba(124, 58, 237, 0.05);
  border: 1px solid rgba(124, 58, 237, 0.18);
  border-radius: 14px;
  padding: 10px 14px;
  margin: 10px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.x-opp-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.x-opp-price {
  font-size: 12.5px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 5px;
}

.x-opp-price strong {
  color: #10b981;
  font-size: 14px;
}

.x-opp-loc {
  font-size: 11.5px;
  color: var(--text-muted);
}

.x-opp-action-btn {
  background: var(--primary-gradient);
  color: #fff;
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 2px 10px rgba(236, 72, 153, 0.25);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Media Containers */
.x-post-media-container {
  margin: 10px 0;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  max-height: 380px;
  position: relative;
  background: #000;
}

.x-image-wrapper {
  cursor: pointer;
  overflow: hidden;
}

.x-post-image {
  width: 100%;
  max-height: 380px;
  object-fit: cover;
  display: block;
}

.x-video-wrapper {
  position: relative;
}

.x-post-video {
  width: 100%;
  max-height: 380px;
  object-fit: cover;
  display: block;
}

.x-video-badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  color: #fff;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  pointer-events: none;
}

/* Tags */
.x-post-tags-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 6px 0;
}

.x-tag-item {
  color: #1d9bf0;
  font-size: 13px;
  font-weight: 500;
}

/* Engagement Bar */
.x-engagement-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 13px;
  padding-right: 4px;
}

.x-eng-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 9999px;
  transition: color 0.15s ease;
  font-size: 13px;
}

.x-eng-icon-wrap {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.15s ease;
}

.x-eng-btn.comment-btn:hover { color: #1d9bf0; }
.x-eng-btn.comment-btn:hover .x-eng-icon-wrap { background: rgba(29, 155, 240, 0.12); }

.x-eng-btn.repost-btn:hover { color: #00ba7c; }
.x-eng-btn.repost-btn:hover .x-eng-icon-wrap { background: rgba(0, 186, 124, 0.12); }
.x-eng-btn.repost-btn.reposted { color: #00ba7c; }

.x-eng-btn.like-btn:hover { color: #f91880; }
.x-eng-btn.like-btn:hover .x-eng-icon-wrap { background: rgba(249, 24, 128, 0.12); }
.x-eng-btn.like-btn.liked { color: #f91880; }
.x-heart-filled { color: #f91880; }

.heart-pop {
  animation: heartPulse 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes heartPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.35); }
  100% { transform: scale(1); }
}

.x-eng-right-actions {
  display: flex;
  gap: 2px;
}

.x-eng-btn.bookmark-btn:hover,
.x-eng-btn.share-btn:hover {
  color: #1d9bf0;
}

/* FAB Button */
.x-fab-create-btn {
  position: fixed;
  bottom: 84px;
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1d9bf0 0%, #7c3aed 100%);
  color: #fff;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  box-shadow: 0 8px 24px rgba(29, 155, 240, 0.45);
  z-index: 99;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.x-fab-create-btn:active {
  transform: scale(0.92);
}

/* Empty State */
.x-empty-state {
  text-align: center;
  padding: 60px 20px;
  background: var(--bg-card);
  border-radius: 20px;
  margin: 16px;
}

.x-empty-icon {
  font-size: 36px;
  color: #1d9bf0;
  margin-bottom: 12px;
}

.x-empty-state h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
}

.x-empty-state p {
  font-size: 13px;
  color: var(--text-muted);
}

/* Bottom Sheets & Modals */
.x-sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.x-sheet-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.x-sheet-card {
  width: 100%;
  max-width: 540px;
  max-height: 85vh;
  background: var(--bg-card);
  border-radius: 24px 24px 0 0;
  padding: 20px 20px 32px;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.25s cubic-bezier(0.1, 0.9, 0.2, 1);
  overflow-y: auto;
}

.x-sheet-overlay.active .x-sheet-card {
  transform: translateY(0);
}

.x-sheet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.x-sheet-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
}

.x-sheet-close-btn {
  background: var(--badge-bg);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
}

.x-sheet-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.4;
}

/* Topic Toggle List */
.x-topic-toggle-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.x-topic-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: var(--badge-bg);
  border-radius: 14px;
}

.x-topic-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.x-topic-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1d9bf0;
  font-size: 15px;
}

.x-topic-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

/* iOS-style Switch */
.x-switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
  flex-shrink: 0;
}

.x-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.x-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #475569;
  transition: .25s;
  border-radius: 26px;
}

.x-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .25s;
  border-radius: 50%;
}

.x-switch input:checked + .x-slider {
  background: linear-gradient(135deg, #1d9bf0 0%, #7c3aed 100%);
}

.x-switch input:checked + .x-slider:before {
  transform: translateX(20px);
}

.x-sheet-footer {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.x-sheet-reset-btn {
  flex: 1;
  padding: 12px;
  border-radius: 9999px;
  background: var(--badge-bg);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}

.x-sheet-apply-btn {
  flex: 1.5;
  padding: 12px;
  border-radius: 9999px;
  background: #1d9bf0;
  border: none;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}

/* Create Form Sheet */
.x-category-chips-grid {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 12px;
  scrollbar-width: none;
}

.x-cat-chip {
  padding: 6px 14px;
  border-radius: 9999px;
  background: var(--badge-bg);
  border: 1px solid var(--border-color);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.x-cat-chip input {
  display: none;
}

.x-cat-chip.active {
  background: var(--primary-gradient);
  color: #fff;
  border-color: transparent;
}

.x-form-group {
  margin-bottom: 12px;
}

.x-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.x-form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.x-input, .x-select, .x-textarea {
  width: 100%;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background: var(--badge-bg);
  color: var(--text-main);
  font-size: 13.5px;
  outline: none;
}

.x-publish-btn {
  width: 100%;
  padding: 14px;
  border-radius: 9999px;
  background: linear-gradient(135deg, #1d9bf0 0%, #7c3aed 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
  box-shadow: 0 4px 16px rgba(29, 155, 240, 0.35);
}

/* Comments Sheet */
.x-comments-list {
  max-height: 320px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.x-comment-item {
  background: var(--badge-bg);
  padding: 10px 12px;
  border-radius: 12px;
}

.x-comment-author {
  font-weight: 700;
  font-size: 12.5px;
  color: var(--text-main);
  display: flex;
  justify-content: space-between;
}

.x-comment-time {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 11px;
}

.x-comment-body {
  font-size: 13px;
  color: var(--text-main);
  margin-top: 4px;
}

.x-comment-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.x-comment-input {
  flex: 1;
  padding: 10px 14px;
  border-radius: 9999px;
  border: 1px solid var(--border-color);
  background: var(--badge-bg);
  color: var(--text-main);
  font-size: 13px;
  outline: none;
}

.x-comment-send-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #1d9bf0;
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
