/* PeekGram - Premium Anonymous Instagram Viewer */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  --ig-pink: #E1306C;
  --ig-purple: #833AB4;
  --ig-orange: #F77737;
  --ig-yellow: #FCAF45;
  --ig-gradient: linear-gradient(135deg, #833AB4, #E1306C, #F77737);
  --ig-gradient-h: linear-gradient(90deg, #833AB4, #E1306C, #F77737, #FCAF45);

  /* Deep navy base — not pure black */
  --bg-primary: #0c0c16;
  --bg-secondary: #11111f;
  --bg-card: #181828;
  --bg-elevated: #20203a;
  --bg-card-hover: #20203a;
  --bg-input: #181828;

  /* Glass-style borders */
  --border: rgba(255,255,255,0.09);
  --border-light: rgba(255,255,255,0.18);

  --text-primary: #f0f0f8;
  --text-secondary: #9090b0;
  --text-muted: #52527a;

  --radius: 20px;
  --radius-sm: 14px;
  --radius-xs: 8px;

  --shadow-glow: 0 0 80px rgba(131,58,180,0.25);
  --shadow-card: 0 8px 50px rgba(0,0,0,0.5);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html { font-size: 18px; }

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}
/* Fixed-position gradient overlay — always covers full viewport on all devices (incl. iOS) */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 180% 85% at 50% -15%, rgba(131,58,180,0.40) 0%, transparent 68%),
    radial-gradient(ellipse 110% 60% at 105% 110%, rgba(225,48,108,0.20) 0%, transparent 55%);
}

a { color: var(--ig-pink); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--ig-orange); }

::selection { background: rgba(225,48,108,0.3); }
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.22); }

/* === ANIMATED GRADIENT BORDER === */
.gradient-border { position: relative; }
.gradient-border::before {
  content: ''; position: absolute; inset: -2px;
  background: var(--ig-gradient-h); border-radius: inherit;
  z-index: -1; opacity: 0; transition: opacity 0.4s;
}
.gradient-border:hover::before { opacity: 1; }

/* === NAVBAR === */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(12,12,22,0.75); backdrop-filter: blur(24px) saturate(160%);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.navbar-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 2rem;
  display: flex; align-items: center; justify-content: space-between; height: 68px;
}
.navbar-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem; font-weight: 700;
  background: var(--ig-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  display: flex; align-items: center; gap: 0.5rem;
}
.navbar-logo svg { width: 28px; height: 28px; }
.navbar-links { display: flex; gap: 2rem; align-items: center; }
.navbar-links a {
  color: var(--text-secondary); font-weight: 500; font-size: 0.9rem;
  transition: var(--transition); position: relative;
}
.navbar-links a:hover { color: var(--text-primary); }
.navbar-links a.active { color: var(--text-primary); }
.navbar-links a.active::after {
  content: ''; position: absolute; bottom: -4px; left: 0; right: 0;
  height: 2px; background: var(--ig-gradient); border-radius: 1px;
}
.nav-badge {
  background: var(--ig-gradient); color: #fff; font-size: 0.65rem;
  padding: 0.15rem 0.5rem; border-radius: 20px; font-weight: 700; letter-spacing: 0.5px;
}

/* === HERO === */
.hero {
  position: relative; text-align: center;
  padding: 5rem 2rem 2.25rem;
  overflow: hidden;
  transition: padding 0.5s cubic-bezier(0.4,0,0.2,1);
}
/* Collapsed hero — after a search is done */
.hero.collapsed { padding: 1.5rem 2rem; }
.hero.collapsed .hero-badge,
.hero.collapsed h1,
.hero.collapsed > p,
.hero.collapsed .search-hint {
  opacity: 0; max-height: 0; margin: 0; overflow: hidden;
  pointer-events: none;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: rgba(225,48,108,0.1); border: 1px solid rgba(225,48,108,0.2);
  padding: 0.4rem 1rem; border-radius: 30px; font-size: 0.78rem; color: var(--ig-pink);
  font-weight: 600; margin-bottom: 1.25rem; overflow: hidden;
  transition: opacity 0.3s ease, max-height 0.4s ease, margin 0.4s ease;
  max-height: 50px;
}
.hero-badge .dot { width: 7px; height: 7px; background: var(--ig-pink); border-radius: 50%; animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

.hero h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 800;
  line-height: 1.1; margin-bottom: 1rem;
  letter-spacing: -0.03em; overflow: hidden;
  transition: opacity 0.3s ease, max-height 0.4s ease, margin 0.4s ease;
  max-height: 260px; /* was 100px — clipped the 3-line title ("…Story Viewer") on phones */
}
.hero h1 .gradient-text {
  background: var(--ig-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero > p {
  color: var(--text-secondary); font-size: 1rem; max-width: 500px;
  margin: 0 auto 2rem; line-height: 1.7; overflow: hidden;
  transition: opacity 0.3s ease, max-height 0.4s ease, margin 0.4s ease;
  max-height: 90px;
}

/* === SEARCH BAR === */
.search-container { max-width: 600px; margin: 0 auto; position: relative; }
.search-bar {
  display: flex; align-items: center;
  background: rgba(24,24,40,0.9); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 60px; padding: 0.4rem;
  transition: var(--transition);
  box-shadow: 0 4px 40px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.05);
}
.search-bar:focus-within {
  border-color: rgba(225,48,108,0.45);
  box-shadow: 0 0 0 3px rgba(225,48,108,0.12), 0 4px 40px rgba(0,0,0,0.35);
}
.search-bar .icon { padding: 0 0.75rem 0 1.25rem; color: var(--text-muted); display: flex; }
.search-bar input {
  flex: 1; background: none; border: none; color: var(--text-primary);
  font-size: 1rem; font-family: inherit; padding: 0.8rem 0; outline: none;
}
.search-bar input::placeholder { color: var(--text-muted); }
.search-bar .search-btn {
  background: var(--ig-gradient); border: none; color: #fff;
  padding: 0.8rem 2rem; border-radius: 50px; font-weight: 700;
  font-size: 0.9rem; cursor: pointer; font-family: inherit;
  transition: var(--transition); white-space: nowrap;
}
.search-bar .search-btn:hover { transform: scale(1.04); filter: brightness(1.12); }

.search-hint {
  margin-top: 0.85rem; font-size: 0.82rem; color: var(--text-muted);
  overflow: hidden; max-height: 40px;
  transition: opacity 0.25s ease, max-height 0.35s ease, margin 0.35s ease;
}
/* Stagger collapse so elements fade out sequentially, not all at once */
.hero.collapsed .hero-badge   { transition-delay: 0s; }
.hero.collapsed h1             { transition-delay: 0.04s; }
.hero.collapsed > p            { transition-delay: 0.07s; }
.hero.collapsed .search-hint   { transition-delay: 0.07s; }

/* === FEATURES === */
.features { max-width: 1200px; margin: 0 auto; padding: 5rem 2rem; }
.features-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}
.feature-card {
  background: linear-gradient(145deg, #1d1d32 0%, #181828 100%);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: var(--radius); padding: 2.25rem;
  transition: var(--transition); position: relative; overflow: hidden;
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.feature-card::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(145deg, rgba(255,255,255,0.03) 0%, transparent 60%);
  pointer-events: none;
}
.feature-card:hover {
  border-color: rgba(255,255,255,0.16);
  transform: translateY(-4px);
  box-shadow: 0 16px 60px rgba(0,0,0,0.5), 0 0 30px rgba(131,58,180,0.1);
}
.feature-card .icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.25rem; font-size: 1.5rem;
}
.feature-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.6rem; }
.feature-card p { color: var(--text-secondary); font-size: 0.87rem; line-height: 1.65; }

/* === PROFILE PAGE === */
.profile-section { max-width: 960px; margin: 0 auto; padding: 2rem; }

.profile-header {
  display: flex; gap: 2.5rem; align-items: center;
  padding: 2.5rem;
  background: linear-gradient(135deg, #1e1e38 0%, #181828 100%);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius); margin-bottom: 2rem;
  box-shadow: 0 4px 40px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.06);
}
.profile-avatar {
  width: 120px; height: 120px; border-radius: 50%; overflow: hidden;
  background: var(--ig-gradient); padding: 3px; flex-shrink: 0;
}
.profile-avatar img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
  border: 3px solid #1e1e38;
}
.profile-avatar .placeholder {
  width: 100%; height: 100%; border-radius: 50%;
  background: var(--bg-secondary); display: flex; align-items: center;
  justify-content: center; font-size: 2.5rem; color: var(--text-muted);
  border: 3px solid #1e1e38;
}
.profile-info { flex: 1; }
.profile-info .username {
  font-family: 'Space Grotesk'; font-size: 1.5rem; font-weight: 700;
  display: flex; align-items: center; gap: 0.5rem;
}
.profile-info .fullname { color: var(--text-secondary); font-size: 0.95rem; margin-top: 0.25rem; }
.profile-info .bio { color: var(--text-secondary); font-size: 0.9rem; margin-top: 0.75rem; line-height: 1.55; }
.profile-stats { display: flex; gap: 2rem; margin-top: 1.25rem; }
.profile-stats .stat { text-align: center; }
.profile-stats .stat .num { font-weight: 800; font-size: 1.2rem; display: block; }
.profile-stats .stat .label { color: var(--text-muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.5px; }

/* === CONTENT TABS === */
.content-tabs {
  display: flex; gap: 0; border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}
.content-tab {
  flex: 1; padding: 1rem; text-align: center; cursor: pointer;
  color: var(--text-muted); font-weight: 600; font-size: 0.85rem;
  border-bottom: 2px solid transparent; transition: var(--transition);
  text-transform: uppercase; letter-spacing: 1px;
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  background: none; border-top: none; border-left: none; border-right: none;
  font-family: inherit;
}
.content-tab:hover { color: var(--text-secondary); }
.content-tab.active { color: var(--text-primary); border-bottom-color: var(--ig-pink); }

/* === STORIES ROW === */
.stories-row {
  display: flex; gap: 1.1rem; overflow-x: auto; padding: 1rem 0;
  scrollbar-width: none; min-height: 80px; align-items: center;
}
.stories-row::-webkit-scrollbar { display: none; }
.story-circle {
  flex-shrink: 0; cursor: pointer; text-align: center; transition: var(--transition);
}
.story-circle:hover { transform: scale(1.06); }
.story-ring {
  width: 76px; height: 76px; border-radius: 50%;
  background: var(--ig-gradient); padding: 3px;
}
.story-ring img, .story-ring .placeholder {
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
  border: 3px solid var(--bg-primary);
}
.story-ring .placeholder {
  background: var(--bg-card); display: flex; align-items: center;
  justify-content: center; color: var(--text-muted); font-size: 1.2rem;
}
.story-label {
  margin-top: 0.5rem; font-size: 0.72rem; color: var(--text-secondary);
  max-width: 76px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* === POSTS GRID === */
.posts-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.post-item {
  overflow: hidden; cursor: pointer; display: flex; flex-direction: column;
  background: linear-gradient(145deg, #1d1d32 0%, #181828 100%);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.08);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.22s;
  box-shadow: 0 2px 14px rgba(0,0,0,0.3);
}
.post-item:hover {
  border-color: rgba(255,255,255,0.20);
  transform: translateY(-3px);
  box-shadow: 0 10px 35px rgba(0,0,0,0.5);
}
.post-thumb {
  aspect-ratio: 1; overflow: hidden; position: relative; flex-shrink: 0;
}
.post-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: var(--transition);
}
.post-item:hover .post-thumb img { transform: scale(1.05); filter: brightness(0.70); }
.post-thumb .overlay {
  position: absolute; inset: 0; display: flex; align-items: center;
  justify-content: center; gap: 1.5rem; opacity: 0; transition: var(--transition);
  background: rgba(0,0,0,0.3);
}
.post-item:hover .post-thumb .overlay { opacity: 1; }
.post-thumb .overlay span {
  display: flex; align-items: center; gap: 0.4rem;
  font-weight: 700; font-size: 0.9rem; color: #fff;
}
.post-thumb .post-placeholder {
  width: 100%; height: 100%; display: flex; align-items: center;
  justify-content: center; color: rgba(255,255,255,0.25); font-size: 1.5rem;
}
.post-card-caption {
  padding: 10px 12px 6px; font-size: 0.84rem; color: var(--text-secondary); line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  flex: 1; min-height: 28px; margin: 0;
}
.post-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  height: 40px; padding: 0 10px; border-top: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.post-card-stats {
  display: flex; gap: 6px; align-items: center; flex: 1; justify-content: center; overflow: hidden;
}
.stat-pair {
  display: flex; gap: 3px; align-items: center; white-space: nowrap;
  font-size: 0.74rem; color: var(--text-muted);
}
.si { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; font-size: 0.92rem; line-height: 1; flex-shrink: 0; }
.sv { font-size: 0.86rem; line-height: 1; }
.post-card-dl {
  background: rgba(34,197,94,0.18);
  border: 1px solid rgba(74,222,128,0.45);
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  color: #4ade80;
  width: 30px; height: 30px; border-radius: 8px; cursor: pointer; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; transition: all 0.2s;
}
.post-card-dl:hover {
  background: rgba(34,197,94,0.32);
  border-color: rgba(74,222,128,0.70);
  color: #86efac;
}

/* === STORY VIEWER (FULLSCREEN) === */
.story-viewer-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.92); backdrop-filter: blur(16px);
  display: none; align-items: center; justify-content: center;
  gap: 20px; padding: 0 16px;
}
.story-viewer-overlay.active { display: flex; }

/* External highlight preview panels (flanking the story card) */
.hl-preview-panel {
  display: flex; flex-direction: column; align-items: center; gap: 0.55rem;
  cursor: pointer; opacity: 0.72; transition: opacity 0.2s, transform 0.2s;
  flex-shrink: 0; width: 72px;
}
.hl-preview-panel:hover { opacity: 1; transform: scale(1.05); }
.hl-preview-ring {
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--ig-gradient); padding: 2px; flex-shrink: 0;
}
.hl-preview-ring img {
  width: 100%; height: 100%; border-radius: 50%; object-fit: cover;
  border: 2px solid rgba(0,0,0,0.8);
}
.hl-preview-ring .hl-preview-placeholder {
  width: 100%; height: 100%; border-radius: 50%;
  background: #111; border: 2px solid rgba(0,0,0,0.8);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.5); font-size: 0.75rem; font-weight: 700;
}
.hl-preview-name {
  font-size: 0.68rem; color: rgba(255,255,255,0.75); text-align: center;
  max-width: 72px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.story-viewer {
  width: 100%; max-width: 420px; height: 90vh; max-height: 760px;
  background: #111120; border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.1);
  overflow: hidden; position: relative;
  box-shadow: 0 30px 80px rgba(0,0,0,0.7), 0 0 50px rgba(131,58,180,0.15);
}
.story-progress { display: flex; gap: 3px; padding: 12px 12px 0; position: absolute; top: 0; left: 0; right: 0; z-index: 10; }
.story-progress .bar { flex: 1; height: 2px; background: rgba(255,255,255,0.25); border-radius: 1px; overflow: hidden; }
.story-progress .bar .fill { height: 100%; background: #fff; border-radius: 1px; transition: width 0.1s linear; }
.story-viewer-header {
  position: absolute; top: 16px; left: 12px; right: 12px;
  display: flex; align-items: center; gap: 0.5rem; z-index: 10;
  padding-top: 8px;
}
.story-viewer-header .avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.story-viewer-header .name { font-weight: 600; font-size: 0.85rem; }
.story-viewer-header .time { font-size: 0.75rem; color: rgba(255,255,255,0.6); }
.story-viewer-close {
  position: absolute; top: 20px; right: 16px; z-index: 10;
  background: none; border: none; color: #fff; font-size: 1.5rem;
  cursor: pointer; opacity: 0.8; transition: opacity 0.2s;
}
.story-viewer-close:hover { opacity: 1; }
.story-viewer-content {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  background: #000;
}
.story-viewer-content img { width: 100%; height: 100%; object-fit: cover; }
/* Left/right tap zones with subtle arrow indicators */
.story-viewer-nav {
  position: absolute; top: 0; bottom: 0; width: 40%; cursor: pointer; z-index: 5;
  display: flex; align-items: center;
}
.story-viewer-nav.prev { left: 0; justify-content: flex-start; padding-left: 14px; }
.story-viewer-nav.next { right: 0; justify-content: flex-end; padding-right: 14px; }
.story-viewer-nav::after {
  content: '';
  display: block;
  width: 10px; height: 10px;
  border-top: 2.5px solid rgba(255,255,255,0.55);
  border-right: 2.5px solid rgba(255,255,255,0.55);
  opacity: 0; transition: opacity 0.2s;
}
.story-viewer-nav.prev::after { transform: rotate(-135deg); }
.story-viewer-nav.next::after { transform: rotate(45deg); }
.story-viewer:hover .story-viewer-nav::after { opacity: 1; }
/* Action bar — just download button, centered */
.story-viewer-actions {
  position: absolute; bottom: 16px; left: 12px; right: 12px;
  display: flex; gap: 0.5rem; z-index: 10; justify-content: center;
}
/* Mobile-only highlight nav pills — flex items inside story-viewer-actions */
.hl-mobile-nav {
  background: rgba(15,15,35,0.82);
  border: 1px solid rgba(255,255,255,0.26);
  box-shadow: 0 2px 12px rgba(0,0,0,0.4);
  color: #fff; cursor: pointer; font-family: inherit;
  font-size: 0.74rem; font-weight: 600;
  padding: 7px 11px; border-radius: 24px;
  align-items: center; gap: 4px;
  max-width: 36%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  flex-shrink: 1;
  /* Hidden by default; JS sets display:flex when inside a highlight */
  display: none;
}
.hl-mobile-nav:active { background: rgba(40,40,70,0.85); }
/* Force-hide on desktop regardless of JS inline style */
@media (min-width: 769px) {
  .hl-mobile-nav { display: none !important; }
}

/* === BUTTONS === */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.7rem 1.5rem; border-radius: 12px;
  font-weight: 600; font-size: 0.9rem; border: none;
  cursor: pointer; transition: var(--transition); font-family: inherit;
}
.btn-gradient { background: var(--ig-gradient); color: #fff; }
.btn-gradient:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn-ghost {
  background: rgba(255,255,255,0.08); color: var(--text-primary);
  border: 1px solid rgba(255,255,255,0.12);
}
.btn-ghost:hover { background: rgba(255,255,255,0.14); border-color: rgba(255,255,255,0.22); }
.btn-sm { padding: 0.5rem 1.1rem; font-size: 0.8rem; border-radius: 9px; }

/* === HOW IT WORKS === */
.how-section { max-width: 1200px; margin: 0 auto; padding: 5rem 2rem; }
.how-section h2 {
  font-family: 'Space Grotesk'; font-size: 2rem; text-align: center; margin-bottom: 0.5rem;
}
.how-section .subtitle { text-align: center; color: var(--text-secondary); margin-bottom: 3rem; }
.how-steps { display: flex; gap: 2rem; justify-content: center; flex-wrap: wrap; }
.how-step {
  flex: 1; min-width: 220px; max-width: 300px; text-align: center;
  padding: 2.25rem 2rem;
  background: linear-gradient(145deg, #1d1d32 0%, #181828 100%);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: var(--radius); transition: var(--transition);
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.how-step:hover {
  border-color: rgba(255,255,255,0.16);
  transform: translateY(-5px);
  box-shadow: 0 14px 50px rgba(0,0,0,0.5);
}
.how-step .step-num {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--ig-gradient); display: inline-flex; align-items: center;
  justify-content: center; font-weight: 800; font-size: 1.1rem; margin-bottom: 1rem;
}
.how-step h3 { margin-bottom: 0.5rem; font-size: 1rem; }
.how-step p { color: var(--text-secondary); font-size: 0.85rem; }

/* === FOOTER === */
.footer {
  border-top: 1px solid rgba(255,255,255,0.07); padding: 3.5rem 2rem 2rem;
  color: var(--text-muted); font-size: 0.8rem; margin-top: 3rem;
  background: linear-gradient(180deg, transparent 0%, rgba(131,58,180,0.04) 100%);
}
.footer-links { display: flex; gap: 2rem; justify-content: center; margin-bottom: 1rem; }
.footer-links a { color: var(--text-secondary); font-size: 0.85rem; }
.footer-grid {
  max-width: 1100px; margin: 0 auto; display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2.5rem; text-align: left;
}
.footer-logo {
  font-family: 'Space Grotesk', sans-serif; font-weight: 800; font-size: 1.35rem;
  background: var(--ig-gradient); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; display: inline-block; margin-bottom: 0.75rem;
}
.footer-brand p { color: var(--text-secondary); font-size: 0.85rem; line-height: 1.6; max-width: 300px; }
.footer-col h4 {
  font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-primary); margin-bottom: 0.9rem; font-weight: 700;
}
.footer-col a { display: block; color: var(--text-secondary); font-size: 0.85rem; padding: 0.3rem 0; transition: color 0.2s; }
.footer-col a:hover { color: var(--text-primary); }
.footer-bottom {
  max-width: 1100px; margin: 2.5rem auto 0; padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
}
.footer-bottom p { line-height: 1.6; }
.footer-bottom p span { font-size: 0.72rem; }
.footer-lang { display: flex; gap: 1.25rem; }
.footer-lang a { color: var(--text-secondary); font-size: 0.82rem; }
.footer-lang a:hover { color: var(--text-primary); }
@media (max-width: 820px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* === SHARED SECTION HEADINGS === */
.section-title { font-family: 'Space Grotesk', sans-serif; font-size: 2rem; text-align: center; margin-bottom: 0.5rem; }
.section-sub { text-align: center; color: var(--text-secondary); margin: 0 auto 3rem; max-width: 560px; }
.section-eyebrow {
  display: block; text-align: center; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ig-pink); margin-bottom: 0.6rem;
}
.feature-card .icon svg { width: 24px; height: 24px; }

/* === AD SLOT === */
.ad-slot {
  border-radius: var(--radius-sm); text-align: center;
  margin: 1.5rem auto; max-width: 728px;
  display: flex; align-items: center; justify-content: center;
}
/* An ad slot with no ad injected shows nothing (no empty dashed box). */
.ad-slot:empty { display: none; }

/* === LOADING SKELETON === */
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
.skeleton {
  background: linear-gradient(90deg, #1a1a2e 25%, #20203a 50%, #1a1a2e 75%);
  background-size: 200% 100%; animation: shimmer 1.5s infinite;
  border-radius: var(--radius-xs);
}

/* === TOAST === */
.toast {
  position: fixed; bottom: 2rem; right: 2rem;
  background: #1e1e38; border: 1px solid rgba(255,255,255,0.12);
  color: #fff; padding: 0.8rem 1.5rem;
  border-radius: 12px; font-weight: 600; font-size: 0.85rem;
  transform: translateY(100px); opacity: 0; transition: var(--transition);
  z-index: 1100; box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}
.toast.show { transform: translateY(0); opacity: 1; }

/* === POST GRID BADGES === */
.post-placeholder {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
}
.badge-reel {
  position: absolute; top: 8px; right: 8px;
  background: rgba(0,0,0,0.65); color: #fff;
  padding: 0.2rem 0.5rem; border-radius: 4px; font-size: 0.7rem; font-weight: 700;
}
.badge-carousel {
  position: absolute; top: 8px; right: 8px;
  background: rgba(0,0,0,0.55);
  padding: 0.25rem 0.35rem; border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
}

/* === POST MODAL === */
.post-modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.88); backdrop-filter: blur(16px);
  display: none; align-items: center; justify-content: center;
  gap: 16px; padding: 1rem;
}
.post-modal-overlay.active { display: flex; }

/* Post prev/next navigation (outside modal card) */
.post-nav-btn {
  flex-shrink: 0; width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2);
  color: #fff; font-size: 1.8rem; cursor: pointer; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s; z-index: 10;
}
.post-nav-btn:hover { background: rgba(255,255,255,0.25); }

.post-modal {
  display: flex; width: 100%; max-width: 960px;
  /* Fixed height prevents layout shift when comments load */
  height: clamp(420px, 88vh, 88vh); max-height: 88vh;
  background: linear-gradient(145deg, #1e1e36 0%, #181828 100%);
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.1); overflow: hidden; position: relative;
  box-shadow: 0 30px 100px rgba(0,0,0,0.8), 0 0 60px rgba(131,58,180,0.15);
}

.post-modal-close {
  position: absolute; top: 12px; right: 12px; z-index: 20;
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.8); font-size: 0.95rem; cursor: pointer;
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.post-modal-close:hover { background: rgba(255,255,255,0.2); color: #fff; }

.post-type-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 20px; font-size: 0.72rem;
  font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase;
  margin-bottom: 10px;
}
.post-type-badge.photo { background: rgba(131,58,180,0.18); color: #c080ff; }
.post-type-badge.reel  { background: rgba(225,48,108,0.18); color: #ff6b9d; }
.post-type-badge.carousel { background: rgba(252,175,69,0.18); color: #fcaf45; }

.post-modal-image {
  flex: 0 0 56%; background: #000;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; position: relative;
  min-height: 400px;
}
.post-modal-image img,
.post-modal-image video {
  width: 100%; height: 100%; object-fit: contain;
  display: block;
}

/* Carousel arrows */
.carousel-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(0,0,0,0.65); border: 1px solid rgba(255,255,255,0.15);
  color: #fff; width: 36px; height: 36px; border-radius: 50%;
  font-size: 1.4rem; line-height: 1; cursor: pointer; z-index: 5;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s; backdrop-filter: blur(4px);
}
.carousel-arrow:hover { background: rgba(0,0,0,0.85); }
.carousel-arrow.prev { left: 12px; }
.carousel-arrow.next { right: 12px; }

/* Carousel counter */
.carousel-counter {
  position: absolute; top: 12px; left: 12px;
  background: rgba(0,0,0,0.65); color: #fff;
  padding: 0.2rem 0.65rem; border-radius: 20px;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.5px;
  backdrop-filter: blur(4px); z-index: 5;
}

/* Download button (image panel) */
.modal-download-btn {
  position: absolute; bottom: 14px; right: 14px; z-index: 5;
  background: rgba(0,0,0,0.68);
  border: 1px solid rgba(255,255,255,0.30);
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  color: #fff; padding: 0.5rem 1rem; border-radius: 40px;
  cursor: pointer; font-size: 0.78rem; font-weight: 600;
  display: flex; align-items: center; gap: 0.45rem;
  transition: background 0.2s, border-color 0.2s;
}
.modal-download-btn:hover {
  background: rgba(0,0,0,0.75);
  border-color: rgba(255,255,255,0.45);
}
/* Story viewer download button */
#storyDownloadBtn {
  background: rgba(0,0,0,0.65) !important;
  border: 1px solid rgba(255,255,255,0.30) !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.35) !important;
  border-radius: 40px !important;
  padding: 0.55rem 1.2rem !important;
  font-size: 0.82rem !important;
  color: #fff !important;
  transition: background 0.2s !important;
}
#storyDownloadBtn:hover {
  background: rgba(0,0,0,0.72) !important;
  border-color: rgba(255,255,255,0.44) !important;
}

/* Right info panel */
.post-modal-side {
  flex: 1; display: flex; flex-direction: column; position: relative;
  overflow: hidden; border-left: 1px solid rgba(255,255,255,0.07); min-width: 0;
}

.post-modal-info {
  padding: 1.35rem 1.35rem 1rem; flex: 1; overflow-y: auto;
}

.post-modal-stats {
  display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center;
  font-size: 0.82rem; font-weight: 600; margin-bottom: 0.75rem;
}

.post-modal-caption {
  color: var(--text-secondary); font-size: 0.88rem; line-height: 1.7;
  white-space: pre-wrap; word-break: break-word; margin-top: 0.75rem;
}

.post-modal-comments {
  flex: 0; overflow-y: auto; padding: 0 1.35rem 1.35rem;
  display: flex; flex-direction: column; gap: 0.65rem;
}

.comments-heading {
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: var(--text-secondary); margin-bottom: 0.25rem;
}
.comments-loading, .comments-empty { color: var(--text-muted); font-size: 0.82rem; }
.post-modal-ig-divider {
  margin: 1rem 0; border-top: 1px solid rgba(255,255,255,0.08);
}
.view-on-ig-btn {
  display: inline-block; font-size: 0.82rem;
  color: #4ade80; text-decoration: none; opacity: 0.8;
}
.view-on-ig-btn:hover { opacity: 1; text-decoration: underline; }

.post-modal-comment { font-size: 0.84rem; line-height: 1.55; }
.post-modal-comment .comment-user { font-weight: 700; color: var(--text-primary); margin-right: 0.4rem; }
.post-modal-comment .comment-text { color: var(--text-secondary); }

/* === POST MODAL MOBILE NAV ROW === */
.post-modal-nav-row {
  display: none; /* shown only on mobile via override below */
}
@media (max-width: 768px) {
  .post-modal-nav-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 14px 6px; gap: 8px; border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  .post-modal-nav-btn {
    background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.85); font-size: 1.5rem; line-height: 1;
    width: 38px; height: 38px; border-radius: 50%; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s;
  }
  .post-modal-nav-btn:active { background: rgba(255,255,255,0.18); }
  .post-modal-nav-count {
    font-size: 0.78rem; color: var(--text-muted); font-weight: 600; flex: 1; text-align: center;
  }
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  html { font-size: 16px; }
  .navbar-links { display: none; }
  .navbar-inner { height: 58px; padding: 0 1rem; }

  .hero { padding: 3.5rem 1.25rem 2.5rem; }
  .hero.collapsed { padding: 1rem 1.25rem; }
  .hero h1 { font-size: clamp(2.6rem, 11vw, 3.4rem); }
  .hero > p { font-size: 0.92rem; margin-bottom: 1.5rem; }
  .hero-badge { font-size: 0.72rem; margin-bottom: 1rem; }
  /* Icon-only search button on mobile — text hidden, arrow shown via ::after */
  .search-bar .search-btn {
    font-size: 0; /* hides "View Profile" text */
    padding: 0;
    width: 46px; height: 46px; min-width: 46px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
  }
  .search-bar .search-btn::after {
    content: '→';
    font-size: 1.25rem;
    color: #fff;
    line-height: 1;
  }
  /* 16px prevents iOS focus zoom */
  .search-bar input { font-size: 16px; }

  /* Tabs — scrollable row on mobile so all 4 fit without wrapping */
  .content-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; flex-wrap: nowrap; }
  .content-tabs::-webkit-scrollbar { display: none; }
  .content-tab { flex: 0 0 auto; padding: 0.75rem 0.8rem; font-size: 0.72rem; letter-spacing: 0.4px; }

  /* Loading skeleton — prevent fixed-width children from overflowing */
  #loadingState { padding: 0.75rem !important; }
  #loadingState > div:first-child { padding: 1rem !important; overflow: hidden; }
  #loadingState .skeleton { max-width: 100%; }

  .profile-section { padding: 0.5rem; }
  .profile-header { flex-direction: column; text-align: center; gap: 1.25rem; padding: 1.5rem 1rem; }
  .profile-avatar { width: 90px; height: 90px; }
  .profile-stats { justify-content: center; gap: 1.25rem; }
  .profile-info .username { justify-content: center; font-size: 1.25rem; }
  .posts-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  /* Hide captions on mobile to maximise thumbnail */
  .post-card-caption { display: none; }
  /* Horizontal stat row — single line, properly centered with DL button */
  .post-card-footer { height: 50px; padding: 0 8px; }
  .post-card-stats { flex: 1; justify-content: space-evenly; gap: 0; align-items: center; align-self: center; }
  .stat-pair { flex-direction: row; align-items: center; gap: 4px; font-size: 0.78rem; }
  .si { width: 18px; height: 18px; font-size: 0.9rem; }
  .sv { font-size: 0.75rem; font-weight: 700; color: var(--text-secondary); }
  /* Larger download button on mobile */
  .post-card-dl {
    width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  }
  /* Bigger story download button on mobile */
  #storyDownloadBtn { padding: 0.85rem 1.75rem !important; font-size: 0.9rem !important; }
  /* Bigger X close button on stories */
  .story-viewer-close { font-size: 1.8rem; top: 14px; right: 14px;
    width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,0.35); border-radius: 50%; }

  .features { padding: 3rem 1.25rem; }
  .how-section { padding: 3rem 1.25rem; }

  /* Post modal — full-screen on mobile, rounded top */
  .post-modal-overlay { padding: 0; align-items: flex-end; }
  .post-modal {
    flex-direction: column;
    height: 100svh; max-height: 100svh;
    max-width: 100%; border-radius: 20px 20px 0 0;
  }
  .post-modal-image {
    flex: 0 0 auto;
    height: clamp(260px, 46vh, 440px);
    max-height: none; border-radius: 20px 20px 0 0; overflow: hidden;
  }
  /* Close button — reposition into image area on mobile */
  .post-modal-side { position: static; flex: 1; border-left: none;
    border-top: 1px solid rgba(255,255,255,0.07);
    max-height: unset; overflow-y: auto; }
  .post-modal-close {
    position: absolute; top: 14px; right: 14px; z-index: 30;
    width: 38px; height: 38px; font-size: 1.1rem;
    background: rgba(0,0,0,0.55); border: 1px solid rgba(255,255,255,0.25);
  }
  /* Bigger modal download button on mobile */
  .modal-download-btn { padding: 0.65rem 1.3rem; font-size: 0.84rem; }

  /* Story viewer — full width on mobile */
  .story-viewer { max-width: 100%; height: 100dvh; max-height: none; border-radius: 0; border: none; }
  .story-viewer-overlay { align-items: stretch; padding: 0; gap: 0; }
  .hl-preview-panel { display: none !important; }
  .carousel-arrow { width: 42px; height: 42px; font-size: 1.5rem; }
  .modal-download-btn { bottom: 8px; right: 8px; }
  /* Hide external post nav buttons on mobile — replaced by in-panel nav row */
  .post-nav-btn { display: none; }

  /* Story ring larger tap targets */
  .story-ring { width: 64px; height: 64px; }
  .story-label { max-width: 64px; }
}

@media (max-width: 480px) {
  html { font-size: 15px; }
  .features-grid { grid-template-columns: 1fr; }
  .how-steps { flex-direction: column; align-items: center; }
  .posts-grid { grid-template-columns: repeat(2, 1fr); gap: 4px; }
  /* Column stat-pairs: icon stacked above value, three pairs side-by-side in 50px footer */
  .post-card-stats { display: flex; justify-content: space-around; align-items: center; }
  .stat-pair { flex-direction: column; align-items: center; gap: 6px; }
  .si { width: 20px; height: 20px; font-size: 1rem; }
  .sv { font-size: 0.75rem; line-height: 1; font-weight: 700; color: var(--text-secondary); }
  .search-hint { display: none; }
}
@media (max-width: 360px) {
  .profile-section { padding: 0.25rem; }
  .posts-grid { grid-template-columns: 1fr; gap: 6px; }
}

/* ===== Animated FAQ accordion (click chevron + smooth expand) ===== */
:root { interpolate-size: allow-keywords; }
.faq-list { display: flex; flex-direction: column; gap: 0.6rem; margin-top: 0.9rem; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  overflow: hidden;
  transition: border-color 0.2s ease;
}
.faq-item[open] { border-color: color-mix(in srgb, var(--ig-pink) 45%, var(--border)); }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
  transition: color 0.2s ease;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--ig-pink); }
.faq-item summary::after {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  margin-right: 4px;
  border-right: 2px solid var(--ig-pink);
  border-bottom: 2px solid var(--ig-pink);
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.28s ease;
}
.faq-item[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.faq-item p { margin: 0; padding: 0 1.15rem 1rem; color: var(--text-secondary); font-size: 0.85rem; line-height: 1.7; }
.faq-item::details-content {
  block-size: 0;
  overflow: hidden;
  content-visibility: hidden;
  transition: block-size 0.3s ease, content-visibility 0.3s allow-discrete;
}
.faq-item[open]::details-content { block-size: auto; content-visibility: visible; }
@media (prefers-reduced-motion: reduce) {
  .faq-item::details-content, .faq-item summary::after { transition: none; }
}

/* ============================================================
   POPULAR PROFILES — Instagram-style story circles under the search
   ============================================================ */
/* Vertical rhythm under the search: form →~40px→ label →~16px→ circles →~28px→ trust strip.
   The label sits close to its circles (they're one group) and well clear of the search bar. */
.hero .search-hint { margin: 2.25rem 0 0.9rem; }
.pop-circles { display: flex; gap: 1.25rem; justify-content: center; flex-wrap: wrap; margin: 0 auto; max-width: 560px; }
.pc { background: none; border: none; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 0.5rem; padding: 0; width: 76px; transition: var(--transition); }
.pc-ring { width: 64px; height: 64px; border-radius: 50%; padding: 3px; background: var(--ig-gradient-h); display: flex; box-shadow: 0 4px 16px rgba(131,58,180,0.22); }
.pc-av { position: relative; width: 100%; height: 100%; border-radius: 50%; overflow: hidden; background: var(--bg-card); border: 2px solid var(--bg-primary); display: flex; align-items: center; justify-content: center; }
.pc-av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pc-ini { font-weight: 800; font-size: 1.4rem; color: var(--text-primary); }
.pc-name { font-size: 0.78rem; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 76px; }
.pc:hover { transform: translateY(-4px); }
.pc:hover .pc-ring { box-shadow: 0 8px 26px rgba(225,48,108,0.4); }
.pc:hover .pc-name { color: var(--text-primary); }
/* Phones: one swipeable row like Instagram's story tray (no orphan circle on a 2nd line) */
@media (max-width: 480px) {
  .pop-circles {
    flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; -webkit-overflow-scrolling: touch; gap: 0.6rem;
    margin-top: 1.9rem; padding: 2px 0.25rem 6px; scrollbar-width: none; scroll-snap-type: x mandatory;
  }
  .pop-circles::-webkit-scrollbar { display: none; }
  .pc { width: 62px; flex-shrink: 0; scroll-snap-align: start; }
  .pop-circles > :first-child { margin-left: auto; }
  .pop-circles > :last-child { margin-right: auto; }
  .pc-ring { width: 56px; height: 56px; }
  .pc-ini { font-size: 1.2rem; }
  .pc-name { font-size: 0.68rem; max-width: 62px; }
}
@media (prefers-reduced-motion: reduce) { .pc { transition: none; } }

/* Hero extras collapse with the rest of the hero after a search */
.pop-circles, .trust-strip { transition: opacity 0.3s ease, max-height 0.4s ease, margin 0.4s ease; max-height: 260px; }
.hero.collapsed .pop-circles,
.hero.collapsed .trust-strip { opacity: 0; max-height: 0; margin: 0; overflow: hidden; pointer-events: none; }

/* ============================================================
   TRUST STRIP — small reassurance row under the hero
   ============================================================ */
.trust-strip {
  list-style: none; padding: 0; margin: 1.55rem auto 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem 1.4rem;
}
/* Phones: tidy 2×2 grid instead of a ragged 3+1 wrap */
@media (max-width: 480px) {
  .trust-strip { display: grid; grid-template-columns: repeat(2, max-content); justify-content: center; gap: 0.55rem 1.4rem; margin-top: 1.2rem; }
}
.trust-strip li { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.82rem; color: var(--text-secondary); }
.trust-strip svg { width: 15px; height: 15px; fill: none; stroke: #3fb950; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }

/* ============================================================
   LIVE EXAMPLE — analytics showcase in a browser frame
   ============================================================ */
.demo-section { max-width: 1100px; margin: 0 auto; padding: 2.75rem 2rem 1rem; }
.demo-frame {
  max-width: 820px; margin: 0 auto; border-radius: var(--radius);
  border: 1px solid var(--border-light); overflow: hidden;
  background: var(--bg-card);
  box-shadow: 0 30px 80px rgba(0,0,0,0.55), 0 0 60px rgba(131,58,180,0.15);
}
.demo-bar {
  display: flex; align-items: center; gap: 6px; padding: 0.7rem 1rem;
  background: var(--bg-elevated); border-bottom: 1px solid var(--border);
}
.demo-bar i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.15); }
.demo-bar i:first-child { background: #ff5f57; } .demo-bar i:nth-child(2) { background: #febc2e; } .demo-bar i:nth-child(3) { background: #28c840; }
.demo-bar em {
  font-style: normal; margin-left: 0.8rem; font-size: 0.75rem; color: var(--text-muted);
  background: var(--bg-card); padding: 0.25rem 0.8rem; border-radius: 6px; flex: 1; max-width: 320px;
}
.demo-body { padding: 1.6rem; }
.demo-profile { display: flex; align-items: center; gap: 1.2rem; margin-bottom: 1.4rem; }
.demo-avatar {
  width: 76px; height: 76px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
  padding: 3px; background: var(--ig-gradient-h);
}
.demo-user { font-weight: 800; font-size: 1.1rem; display: flex; align-items: center; gap: 0.35rem; }
.demo-name { color: var(--text-secondary); font-size: 0.88rem; margin: 0.15rem 0 0.5rem; }
.demo-stats { display: flex; gap: 1.2rem; flex-wrap: wrap; font-size: 0.82rem; color: var(--text-secondary); }
.demo-stats b { color: var(--text-primary); }
.demo-grid { margin-bottom: 1rem; }
.demo-chart .an-bars { height: 70px; }
.demo-cta { text-align: center; margin-top: 2rem; }
.demo-btn { padding: 0.95rem 1.8rem; font-size: 1rem; border: none; cursor: pointer; border-radius: 50px; font-weight: 700; }
@media (max-width: 640px) {
  .demo-section { padding: 2.25rem 1.25rem 0.5rem; }
  .demo-body { padding: 1.1rem; }
  .demo-avatar { width: 60px; height: 60px; }
}

/* ============================================================
   LANDING PAGES (tools / celebs / alternatives) — visual upgrade.
   Prefixed with `body` so these win over each page's own inline <style>.
   ============================================================ */
body .alt-wrap { max-width: 880px; padding-top: 3.5rem; }
body .alt-wrap h1 { font-size: clamp(2rem, 5vw, 2.9rem); letter-spacing: -0.02em; margin-bottom: 0.9rem; }
body .alt-wrap .alt-lede { font-size: 1.08rem; margin-bottom: 1.6rem; }
body .alt-wrap .lp-search {
  max-width: 600px; padding: 0.5rem 0.5rem 0.5rem 1.4rem; margin-bottom: 1.25rem;
  border-color: rgba(225,48,108,0.35);
  box-shadow: 0 0 0 4px rgba(225,48,108,0.06), 0 12px 40px rgba(0,0,0,0.35);
}
body .alt-wrap .lp-search input { font-size: 1.02rem; padding: 0.4rem 0; }
body .alt-wrap .lp-search button { padding: 0.8rem 1.5rem; font-size: 0.95rem; }
body .alt-wrap .lp-cta { max-width: 600px; box-shadow: 0 10px 30px rgba(225,48,108,0.3); }
body .alt-wrap h2 {
  font-family: 'Space Grotesk', sans-serif; font-size: 1.45rem; color: var(--text-primary);
  margin: 3rem 0 1.1rem; display: flex; align-items: center; gap: 0.6rem;
}
body .alt-wrap h2::before { content: ''; width: 4px; height: 1.15em; border-radius: 4px; background: var(--ig-gradient); flex-shrink: 0; }
body .alt-wrap .lp-step { position: relative; transition: var(--transition); padding: 1.3rem; }
body .alt-wrap .lp-step:hover { transform: translateY(-3px); border-color: var(--border-light); }
body .alt-wrap .alt-why { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0.75rem; }
body .alt-wrap .alt-why li {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 0.95rem 1rem 0.95rem 2.9rem; position: relative; line-height: 1.5;
}
body .alt-wrap .alt-why li::before {
  left: 1rem; top: 50%; transform: translateY(-50%);
  width: 22px; height: 22px; border-radius: 50%; background: rgba(63,185,80,0.15);
  display: flex; align-items: center; justify-content: center; font-size: 0.72rem;
}
body .alt-wrap .alt-more {
  font-size: 0; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.4rem 1.4rem 1.1rem;
}
body .alt-wrap .alt-more strong { display: block; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-primary); margin: 0.9rem 0 0.6rem; }
body .alt-wrap .alt-more strong:first-child { margin-top: 0; }
body .alt-wrap .alt-more a {
  display: inline-block; font-size: 0.85rem; margin: 0 0.4rem 0.5rem 0; padding: 0.35rem 0.85rem;
  border: 1px solid var(--border-light); border-radius: 999px; color: var(--text-secondary); text-decoration: none;
  transition: var(--transition);
}
body .alt-wrap .alt-more a:hover { color: var(--text-primary); border-color: var(--ig-pink); background: rgba(225,48,108,0.08); }
body .alt-wrap .celeb-av {
  width: 96px; height: 96px; border-radius: 50%; object-fit: cover; display: block; margin-bottom: 1.2rem;
  padding: 3px; background: var(--ig-gradient-h); box-shadow: 0 10px 30px rgba(225,48,108,0.3);
}

/* Features header spacing (section now has a title) */
.features .section-title + .section-sub { margin-bottom: 2.5rem; }

/* ============================================================
   RECENT SEARCHES — chips under the search bar (this browser only)
   ============================================================ */
.recent-searches { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.45rem; margin: 1rem auto 0; max-width: 640px; }
.recent-searches[hidden] { display: none; }
.rs-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-right: 0.2rem; }
.rs-chip {
  display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.25rem 0.75rem 0.25rem 0.25rem;
  border-radius: 999px; background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-secondary); font-size: 0.8rem; cursor: pointer; transition: var(--transition); white-space: nowrap;
}
.rs-chip:hover { border-color: var(--ig-pink); color: var(--text-primary); }
.rs-av { position: relative; width: 22px; height: 22px; border-radius: 50%; overflow: hidden; background: var(--bg-elevated); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.rs-av b { font-size: 0.65rem; color: var(--text-primary); }
.rs-av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rs-clear { background: none; border: none; color: var(--text-muted); font-size: 0.74rem; cursor: pointer; text-decoration: underline; padding: 0.25rem; }
.rs-clear:hover { color: var(--text-primary); }
@media (max-width: 480px) {
  .recent-searches { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; justify-content: flex-start; scrollbar-width: none; padding-bottom: 2px; }
  .recent-searches > :first-child { margin-left: auto; }
  .recent-searches > :last-child { margin-right: auto; }
  .recent-searches::-webkit-scrollbar { display: none; }
}

/* ============================================================
   SCROLL REVEAL — sections fade up as they enter the viewport (JS adds/removes .sr)
   ============================================================ */
.sr { opacity: 0 !important; transform: translateY(22px) !important; transition: opacity 0.7s ease, transform 0.8s cubic-bezier(.22,1,.36,1) !important; }
.sr.sr-in { opacity: 1 !important; transform: none !important; }

/* ============================================================
   FLOATING SEARCH BUTTON — phones, once the search bar is off-screen
   ============================================================ */
.fab-search {
  position: fixed; right: 16px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 900;
  width: 54px; height: 54px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--ig-gradient); color: #fff; display: none; align-items: center; justify-content: center;
  box-shadow: 0 10px 30px rgba(225,48,108,0.45);
  opacity: 0; transform: translateY(16px) scale(0.9); pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
@media (max-width: 768px) { .fab-search { display: flex; } }
.fab-search.show { opacity: 1; transform: none; pointer-events: auto; }

/* ============================================================
   SEARCH GATE — freemium "watch an ad / go Pro" modal
   ============================================================ */
.sg-overlay {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  background: rgba(5,5,12,0.74); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; pointer-events: none; transition: opacity 0.25s ease;
}
.sg-overlay.active { opacity: 1; pointer-events: auto; }
.sg-card {
  background: var(--bg-card); border: 1px solid var(--border-light);
  border-radius: var(--radius); box-shadow: var(--shadow-card);
  max-width: 400px; width: 100%; padding: 32px 28px; text-align: center;
  transform: translateY(14px) scale(0.97); transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
}
.sg-overlay.active .sg-card { transform: none; }
.sg-icon {
  width: 66px; height: 66px; border-radius: 50%; margin: 0 auto 18px;
  display: flex; align-items: center; justify-content: center; font-size: 30px;
  background: var(--ig-gradient); box-shadow: var(--shadow-glow);
}
.sg-card h3 { margin: 0 0 10px; font-size: 1.3rem; color: var(--text-primary); }
.sg-card p { margin: 0 0 22px; color: var(--text-secondary); font-size: 0.95rem; line-height: 1.55; }
.sg-card p b { color: var(--text-primary); }
.sg-btn {
  display: block; width: 100%; padding: 15px; border: none; cursor: pointer;
  border-radius: var(--radius-sm); font-size: 1rem; font-weight: 700; color: #fff;
  background: var(--ig-gradient); transition: var(--transition);
}
.sg-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.sg-note { margin-top: 14px; font-size: 0.78rem; color: var(--text-muted); line-height: 1.4; }
.sg-pro { display: inline-block; margin-top: 16px; color: var(--text-secondary); font-size: 0.88rem; text-decoration: none; }
.sg-pro:hover { color: var(--text-primary); }
@media (prefers-reduced-motion: reduce) {
  .sg-overlay, .sg-card { transition: none; }
}

/* ============================================================
   PROFILE ANALYTICS
   ============================================================ */
.analytics {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px 22px 18px; margin: 18px 0 8px;
}
.an-toggle {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%;
  padding: 2px; background: none; border: none; cursor: pointer;
  color: var(--text-primary); font-size: 0.98rem; font-weight: 600;
}
.an-toggle .an-chev { color: var(--text-secondary); font-size: 0.9rem; }
.an-toggle:hover { color: var(--ig-pink); }
.an-body { margin-top: 16px; }
.an-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.an-head h3 { margin: 0; font-size: 1.05rem; color: var(--text-primary); }
.an-sub { font-size: 0.78rem; color: var(--text-muted); }
.an-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.an-card {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 16px 14px; text-align: center;
}
.an-val {
  font-size: 1.5rem; font-weight: 800; line-height: 1.1;
  background: var(--ig-gradient); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; display: flex; align-items: baseline; justify-content: center; gap: 6px;
}
.an-label { margin-top: 6px; font-size: 0.74rem; color: var(--text-secondary); letter-spacing: 0.01em; }
.an-tier {
  font-size: 0.6rem; font-weight: 700; padding: 2px 7px; border-radius: 999px;
  -webkit-text-fill-color: initial; color: #fff; align-self: center;
}
.an-tier.exc  { background: #16a34a; } .an-tier.good { background: #2563eb; }
.an-tier.ok   { background: #d97706; } .an-tier.low  { background: #6b7280; }
.an-activity { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; margin-top: 16px; }
.an-chart { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; }
.an-chart-title { font-size: 0.76rem; color: var(--text-secondary); margin-bottom: 12px; }
.an-bars { display: flex; align-items: flex-end; gap: 7px; height: 76px; }
.an-bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; }
.an-bar-track { flex: 1; width: 100%; display: flex; align-items: flex-end; }
.an-bar-fill { width: 100%; min-height: 3px; border-radius: 4px 4px 0 0; background: var(--border-light); transition: height 0.9s cubic-bezier(.22,1,.36,1); }
.an-bar-fill.peak { background: var(--ig-gradient); }
.an-bar-x { font-size: 0.66rem; color: var(--text-muted); }
.an-insights { display: flex; flex-direction: column; gap: 10px; justify-content: center; }
.an-insight { display: flex; align-items: center; gap: 11px; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 11px 13px; }
.an-ic { font-size: 1.25rem; }
.an-insight b { display: block; color: var(--text-primary); font-size: 0.92rem; }
.an-insight span { font-size: 0.72rem; color: var(--text-muted); }
.an-foot { margin-top: 14px; font-size: 0.72rem; color: var(--text-muted); text-align: center; }
/* Staggered entrance when the panel is revealed */
@keyframes anRise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes anPop  { 0% { transform: scale(0); } 70% { transform: scale(1.18); } 100% { transform: scale(1); } }
.an-body .an-head, .an-body .an-card, .an-body .an-chart, .an-body .an-insight, .an-body .an-foot { opacity: 0; }
.an-body.revealed .an-head  { animation: anRise .7s ease forwards; }
.an-body.revealed .an-grid .an-card { animation: anRise .8s cubic-bezier(.22,1,.36,1) forwards; }
.an-body.revealed .an-grid .an-card:nth-child(1) { animation-delay: .15s; }
.an-body.revealed .an-grid .an-card:nth-child(2) { animation-delay: .35s; }
.an-body.revealed .an-grid .an-card:nth-child(3) { animation-delay: .55s; }
.an-body.revealed .an-grid .an-card:nth-child(4) { animation-delay: .75s; }
.an-body.revealed .an-chart { animation: anRise .8s cubic-bezier(.22,1,.36,1) .95s forwards; }
.an-body.revealed .an-insights .an-insight:nth-child(1) { animation: anRise .8s cubic-bezier(.22,1,.36,1) 1.15s forwards; }
.an-body.revealed .an-insights .an-insight:nth-child(2) { animation: anRise .8s cubic-bezier(.22,1,.36,1) 1.35s forwards; }
.an-body.revealed .an-foot  { animation: anRise .7s ease 1.55s forwards; }
.an-tier { transform: scale(0); transform-origin: center; }
.an-body.revealed .an-tier { animation: anPop .55s ease 1.2s forwards; }
@media (prefers-reduced-motion: reduce) {
  .an-body .an-head, .an-body .an-card, .an-body .an-chart, .an-body .an-insight, .an-body .an-foot, .an-tier {
    opacity: 1 !important; transform: none !important; animation: none !important;
  }
  .an-bar-fill { transition: none; }
}
@media (max-width: 640px) {
  .an-grid { grid-template-columns: repeat(2, 1fr); }
  .an-activity { grid-template-columns: 1fr; }
}

/* Autocomplete (local list, no network) */
.ac-list { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 50; background: var(--bg-card, #16161d); border: 1px solid var(--border, rgba(255,255,255,.1)); border-radius: 14px; padding: .35rem; box-shadow: 0 14px 40px rgba(0,0,0,.45); text-align: left; }
.ac-list[hidden] { display: none; }
.ac-item { display: flex; align-items: center; gap: .7rem; width: 100%; padding: .5rem .6rem; border: 0; background: none; color: var(--text-primary); border-radius: 10px; cursor: pointer; font: inherit; text-align: left; }
.ac-item:hover, .ac-item.on { background: rgba(255,255,255,.07); }
.ac-item img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex: 0 0 36px; background: rgba(255,255,255,.08); }
.ac-item span { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.ac-item b { font-size: .92rem; font-weight: 600; }
.ac-item small { font-size: .78rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* "You might also like" under a profile */
.related-profiles { margin: 2.5rem 0 .5rem; padding-top: 1.75rem; border-top: 1px solid var(--border, rgba(255,255,255,.08)); text-align: center; }
.rp-title { font-size: 1.05rem; font-weight: 700; margin: 0 0 1.1rem; }
.rp-row { display: flex; justify-content: center; gap: .6rem; flex-wrap: wrap; }
.rp-item { display: flex; flex-direction: column; align-items: center; gap: .45rem; width: 100px; background: none; border: 0; color: var(--text-secondary); cursor: pointer; font: inherit; padding: 0; transition: transform .2s ease; }
.rp-item:hover { transform: translateY(-3px); color: var(--text-primary); }
.rp-item .pc-ring { width: 68px; height: 68px; }
.rp-name { font-size: .74rem; line-height: 1.2; max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 600px) {
  .rp-row { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; -webkit-overflow-scrolling: touch; touch-action: pan-x pan-y; scrollbar-width: none; padding: 0 .5rem .25rem; }
  .rp-row > :first-child { margin-left: auto; }
  .rp-row > :last-child { margin-right: auto; }
  .rp-row::-webkit-scrollbar { display: none; }
  .rp-item { flex: 0 0 76px; width: 76px; }
}

/* Stories tab nudge — visual only */
.content-tab.tab-pulse { position: relative; color: var(--text-primary); }
.content-tab.tab-pulse::after { content: ''; position: absolute; top: .55rem; right: .3rem; width: 7px; height: 7px; border-radius: 50%; background: var(--ig-pink, #e1306c); box-shadow: 0 0 0 0 rgba(225,48,108,.6); animation: tabPulse 1.8s ease-out infinite; }
@keyframes tabPulse { 0% { box-shadow: 0 0 0 0 rgba(225,48,108,.6); } 80%,100% { box-shadow: 0 0 0 8px rgba(225,48,108,0); } }
@media (prefers-reduced-motion: reduce) { .content-tab.tab-pulse::after { animation: none; } }

/* HD upsell card after a download (only shown when an affiliate URL is configured) */
.hd-offer { position: fixed; left: 50%; bottom: 1.25rem; transform: translateX(-50%); z-index: 9000; width: min(92vw, 360px); background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: .9rem 1rem; box-shadow: 0 14px 40px rgba(0,0,0,.45); display: flex; flex-direction: column; gap: .35rem; }
.hd-offer small { color: var(--text-muted); font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; }
.hd-offer b { font-size: .95rem; }
.hd-offer a { align-self: flex-start; background: var(--ig-gradient); color: #fff; text-decoration: none; font-weight: 600; font-size: .85rem; padding: .5rem 1rem; border-radius: 50px; margin-top: .2rem; }
.hd-offer .hd-x { position: absolute; top: .4rem; right: .6rem; background: none; border: 0; color: var(--text-muted); font-size: 1.3rem; cursor: pointer; }

/* Pro entry points (fake-door test) */
.navbar-inner { gap: 1rem; }
.nav-pro { margin-left: auto; flex-shrink: 0; font-size: .8rem; font-weight: 700; letter-spacing: .02em; color: #fff !important; background: var(--ig-gradient); padding: .38rem .9rem; border-radius: 50px; text-decoration: none; box-shadow: 0 4px 14px rgba(225,48,108,.3); }
.navbar-links + .nav-pro { margin-left: 1.5rem; }
@media (max-width: 768px) { .navbar-links + .nav-pro { margin-left: auto; } }
.pro-cta { display: block; width: fit-content; max-width: 100%; margin: .2rem auto 1.2rem; padding: .55rem 1rem; border: 1px solid rgba(225,48,108,.35); border-radius: 50px; background: rgba(225,48,108,.08); color: var(--text-secondary); font-size: .85rem; text-align: center; text-decoration: none; }
.pro-cta b { color: var(--text-primary); }
.pro-cta:hover { border-color: var(--ig-pink); color: var(--text-primary); }
.pro-nudge { position: fixed; left: 50%; bottom: 1.25rem; transform: translateX(-50%); z-index: 9000; width: min(92vw, 380px); background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: .9rem 2.2rem .9rem 1rem; box-shadow: 0 14px 40px rgba(0,0,0,.45); }
.pro-nudge p { margin: 0 0 .5rem; font-size: .9rem; color: var(--text-secondary); line-height: 1.45; }
.pro-nudge p b { color: var(--text-primary); }
.pro-nudge a { display: inline-block; background: var(--ig-gradient); color: #fff; text-decoration: none; font-weight: 600; font-size: .85rem; padding: .45rem 1rem; border-radius: 50px; }
.pro-nudge .hd-x { position: absolute; top: .4rem; right: .6rem; background: none; border: 0; color: var(--text-muted); font-size: 1.3rem; cursor: pointer; }
