/* ════════════════════════════════════════════════
   INSTAFACEX.COM — Production Stylesheet v3.0
   Font: Outfit (Google Fonts)
   Design: Warm Indigo × Coral × Slate system
   Modes: Light + Dark
   ════════════════════════════════════════════════ */

/* ── DESIGN TOKENS ──────────────────────────── */
:root {
  /* Brand palette */
  --brand-insta: #f97316;   /* Insta orange */
  --brand-face:  #1877f2;   /* Facebook blue */
  --brand-x:     #0f172a;   /* X black */

  /* Surface & background */
  --bg:          #f8f7ff;
  --surface:     #ffffff;
  --surface-2:   #f1f0fc;
  --surface-3:   #e8e6f8;
  --border:      #e2dff5;

  /* Text */
  --text-primary:   #1a1535;
  --text-secondary: #6b6391;
  --text-muted:     #9d99b8;

  /* Accent — deep violet × coral */
  --accent:      #5b3ef8;
  --accent-2:    #f0522a;
  --accent-grad: linear-gradient(135deg,#5b3ef8 0%,#c026d3 100%);
  --accent-glow: 0 4px 24px rgba(91,62,248,.22);

  /* Platform colors */
  --fb:  #1877f2;
  --ig:  #e1306c;
  --xc:  #0f172a;

  /* Layout */
  --header-h:   62px;
  --nav-h:      68px;
  --max-w:      640px;
  --r:          16px;
  --r-sm:       10px;
  --r-lg:       22px;

  /* Transitions */
  --ease: cubic-bezier(.4,0,.2,1);
}

[data-theme="dark"] {
  --bg:            #0d0b1e;
  --surface:       #16132e;
  --surface-2:     #1e1a38;
  --surface-3:     #252248;
  --border:        #2d2850;
  --text-primary:  #eeeaf8;
  --text-secondary:#a09cc0;
  --text-muted:    #6660a0;
  --accent-grad:   linear-gradient(135deg,#7c5cfc 0%,#d946ef 100%);
}

/* ── RESET ──────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}
html { scroll-behavior: smooth; }
body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background .25s var(--ease), color .25s var(--ease);
}
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
input, textarea { font-family: inherit; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.hidden { display: none !important; }

/* Scrollbar */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 8px; }

/* ── LOGIN SCREEN ───────────────────────────── */
.login-screen {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(150deg, #0d0b1e 0%, #1a0a3c 40%, #0c1a3c 100%);
  position: relative;
  overflow: hidden;
  padding: 20px;
}
.login-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.lc-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .5;
  animation: blobPulse 10s ease-in-out infinite alternate;
}
.b1 { width: 500px; height: 500px; background: #5b3ef8; top: -150px; left: -150px; animation-delay: 0s; }
.b2 { width: 400px; height: 400px; background: #f0522a; bottom: -120px; right: -100px; animation-delay: -4s; }
.b3 { width: 300px; height: 300px; background: #1877f2; top: 40%; left: 55%; animation-delay: -7s; }
.lc-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.03) 1px,transparent 1px),
                    linear-gradient(90deg,rgba(255,255,255,.03) 1px,transparent 1px);
  background-size: 40px 40px;
}
@keyframes blobPulse {
  0%   { transform: translate(0,0) scale(1); }
  100% { transform: translate(30px,-20px) scale(1.1); }
}

.login-card {
  position: relative;
  z-index: 1;
  background: rgba(255,255,255,.06);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--r-lg);
  padding: 44px 38px 38px;
  width: min(420px, 100%);
  text-align: center;
  box-shadow: 0 32px 80px rgba(0,0,0,.5);
}

/* Logo */
.lc-logo {
  font-size: 3rem;
  font-weight: 900;
  letter-spacing: -2px;
  line-height: 1;
  margin-bottom: 10px;
}
.ah-logo { font-size: 1.15rem; font-weight: 900; letter-spacing: -0.5px; line-height: 1; }
.lg-insta { color: #f97316; }
.lg-face  { color: #5b9cf8; }
.lg-x     { color: #ffffff; }
.lg-tld   { color: rgba(255,255,255,.45); font-size: .9em; font-weight: 600; }

.lc-tagline {
  color: rgba(255,255,255,.65);
  font-size: .95rem;
  font-weight: 400;
  margin-bottom: 16px;
}
.lc-features {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.lc-features span {
  background: rgba(255,255,255,.09);
  border: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.75);
  font-size: .78rem;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 50px;
}
.lc-divider {
  width: 48px;
  height: 2px;
  background: linear-gradient(90deg,#f97316,#5b3ef8);
  border-radius: 4px;
  margin: 0 auto 22px;
}

.g_id_signin { display: flex; justify-content: center; margin-bottom: 12px; }

.demo-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  padding: 13px 20px;
  background: rgba(255,255,255,.1);
  border: 1.5px solid rgba(255,255,255,.2);
  color: rgba(255,255,255,.9);
  border-radius: 50px;
  font-size: .95rem;
  font-weight: 600;
  transition: all .2s var(--ease);
}
.demo-btn:hover {
  background: rgba(255,255,255,.16);
  border-color: rgba(255,255,255,.35);
  transform: translateY(-1px);
}
.lc-legal {
  margin-top: 18px;
  font-size: .72rem;
  color: rgba(255,255,255,.35);
}
.lc-legal a { color: rgba(255,255,255,.55); }

/* ── APP SHELL ──────────────────────────────── */
.app {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

/* ── TOP HEADER ─────────────────────────────── */
.app-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: rgba(248,247,255,.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  z-index: 900;
  transition: background .25s var(--ease);
}
[data-theme="dark"] .app-header {
  background: rgba(13,11,30,.9);
}
.ah-logo {
  flex-shrink: 0;
  white-space: nowrap;
}
/* In header, X is dark in light, light in dark */
.ah-logo .lg-x { color: var(--text-primary); }

.ah-tabs {
  display: flex;
  align-items: center;
  gap: 3px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}
.ah-tabs::-webkit-scrollbar { display: none; }

.htab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: .855rem;
  font-weight: 500;
  border-radius: 50px;
  transition: all .18s var(--ease);
  white-space: nowrap;
  flex-shrink: 0;
}
.htab svg { width: 17px; height: 17px; flex-shrink: 0; }
.htab:hover { background: var(--surface-2); color: var(--text-primary); }
.htab.active {
  background: var(--accent-grad);
  color: white;
  box-shadow: var(--accent-glow);
  font-weight: 600;
}

/* tab text colors (inactive) */
.tc-face  { color: var(--fb); }
.tc-insta { color: var(--ig); }
.tc-x     { color: var(--xc); font-weight: 800; }
[data-theme="dark"] .tc-x { color: #e2e8f0; }
.htab.active .tc-face,
.htab.active .tc-insta,
.htab.active .tc-x { color: white; }

.ah-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  position: relative;
}
.ah-icon-btn {
  width: 38px; height: 38px;
  border: none;
  background: var(--surface-2);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  position: relative;
  transition: all .18s;
}
.ah-icon-btn svg { width: 20px; height: 20px; }
.ah-icon-btn:hover { background: var(--surface-3); color: var(--text-primary); }
.notif-dot {
  position: absolute;
  top: 6px; right: 6px;
  width: 8px; height: 8px;
  background: #ef4444;
  border-radius: 50%;
  border: 2px solid var(--surface);
}
.ah-avatar-btn { border: none; background: none; padding: 0; }
.ah-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  background: var(--surface-2);
}

/* Notification panel */
.notif-panel {
  position: absolute;
  top: calc(var(--header-h) + 4px);
  right: 0;
  width: 320px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: 0 16px 48px rgba(0,0,0,.14);
  z-index: 1200;
  overflow: hidden;
}
.np-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  font-size: .92rem;
}
.np-header button {
  background: none; border: none;
  color: var(--accent); font-size: .78rem;
  font-weight: 600; cursor: pointer;
}
.np-list { max-height: 320px; overflow-y: auto; }
.np-empty { padding: 28px 16px; text-align: center; color: var(--text-muted); font-size: .85rem; }
.np-item {
  display: flex; gap: 12px; padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: .855rem; line-height: 1.4;
}
.np-item:last-child { border-bottom: none; }
.np-item-av {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent-grad); color: white;
  font-size: .8rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.np-item-text strong { display: block; color: var(--text-primary); }
.np-item-time { font-size: .72rem; color: var(--text-muted); margin-top: 2px; }

/* User menu */
.user-menu {
  position: absolute;
  top: calc(var(--header-h) + 4px);
  right: 0;
  width: 240px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: 0 16px 48px rgba(0,0,0,.12);
  z-index: 1200;
  overflow: hidden;
}
.um-info {
  display: flex; align-items: center; gap: 12px;
  padding: 16px;
}
.um-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  object-fit: cover; border: 2px solid var(--border);
  background: var(--surface-2);
  flex-shrink: 0;
}
.um-name { font-weight: 700; font-size: .92rem; }
.um-email { font-size: .75rem; color: var(--text-muted); word-break: break-all; }
.um-divider { height: 1px; background: var(--border); }
.um-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 12px 16px;
  background: none; border: none;
  color: var(--text-secondary); font-size: .9rem; font-weight: 500;
  transition: background .15s;
  text-align: left;
}
.um-item svg { width: 17px; height: 17px; flex-shrink: 0; }
.um-item:hover { background: var(--surface-2); color: var(--text-primary); }
.um-danger { color: #ef4444 !important; }
.um-danger:hover { background: #fef2f2 !important; }
[data-theme="dark"] .um-danger:hover { background: rgba(239,68,68,.12) !important; }

/* ── TAB PANELS ─────────────────────────────── */
.tab-panel {
  display: none;
  padding-top: var(--header-h);
  padding-bottom: calc(var(--nav-h) + 8px);
  min-height: 100vh;
}
.tab-panel.active { display: block; }

/* ── FEED WRAP ──────────────────────────────── */
.feed-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 16px 12px;
}

/* ── COMPOSE CARD ───────────────────────────── */
.compose-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: 0 2px 16px rgba(91,62,248,.06);
}
.cc-top {
  display: flex; align-items: center; gap: 12px; margin-bottom: 12px;
}
.cc-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  object-fit: cover; background: var(--surface-2);
  border: 2px solid var(--border); flex-shrink: 0;
}
.cc-meta strong { display: block; font-weight: 700; font-size: .93rem; }
.cc-meta span { font-size: .75rem; color: var(--accent); font-weight: 500; }

.cc-textarea {
  width: 100%;
  min-height: 88px;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  padding: 12px 14px;
  font-size: .95rem;
  color: var(--text-primary);
  resize: none;
  outline: none;
  transition: border-color .2s, background .2s;
  line-height: 1.55;
}
.cc-textarea:focus {
  border-color: var(--accent);
  background: var(--surface);
}
.cc-textarea::placeholder { color: var(--text-muted); }

/* Image preview in compose */
.img-preview-wrap {
  position: relative;
  margin: 10px 0;
  border-radius: var(--r-sm);
  overflow: hidden;
}
.img-preview {
  width: 100%; max-height: 240px;
  object-fit: cover; border-radius: var(--r-sm);
}
.img-remove-btn {
  position: absolute; top: 8px; right: 8px;
  width: 28px; height: 28px;
  background: rgba(0,0,0,.55); color: white;
  border: none; border-radius: 50%;
  font-size: .85rem; display: flex; align-items: center; justify-content: center;
}

.cc-moods { margin-top: 12px; }
.mood-lbl {
  font-size: .75rem; color: var(--text-muted);
  font-weight: 600; letter-spacing: .4px;
  text-transform: uppercase; margin-bottom: 8px; display: block;
}
.mood-row { display: flex; flex-wrap: wrap; gap: 6px; }
.mpill {
  padding: 5px 12px;
  border-radius: 50px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: .8rem;
  font-weight: 500;
  transition: all .16s var(--ease);
}
.mpill:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--surface-2);
}
.mpill.active {
  background: var(--accent-grad);
  color: white;
  border-color: transparent;
  transform: scale(1.04);
}

.cc-footer {
  display: flex; align-items: center;
  justify-content: space-between;
  margin-top: 14px; gap: 10px;
}
.cc-actions { display: flex; gap: 6px; }
.cc-action-btn {
  display: flex; align-items: center; gap: 5px;
  padding: 6px 12px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 50px;
  color: var(--text-secondary);
  font-size: .8rem;
  font-weight: 500;
  transition: all .16s;
  cursor: pointer;
}
.cc-action-btn svg { width: 15px; height: 15px; }
.cc-action-btn:hover { background: var(--surface-2); color: var(--text-primary); }
.cc-right { display: flex; align-items: center; gap: 10px; }
.char-count { font-size: .75rem; color: var(--text-muted); }
.post-btn {
  display: flex; align-items: center; gap: 7px;
  padding: 10px 22px;
  background: var(--accent-grad);
  color: white; border: none;
  border-radius: 50px;
  font-size: .9rem; font-weight: 700;
  box-shadow: var(--accent-glow);
  transition: all .18s var(--ease);
}
.post-btn svg { width: 15px; height: 15px; }
.post-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 28px rgba(91,62,248,.35); }
.post-btn:active { transform: scale(.97); }
.post-btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }

/* ── STORIES STRIP ──────────────────────────── */
.stories-strip {
  display: flex; gap: 12px;
  overflow-x: auto; scrollbar-width: none;
  padding: 4px 2px 14px;
}
.stories-strip::-webkit-scrollbar { display: none; }
.story-item {
  display: flex; flex-direction: column; align-items: center;
  gap: 5px; flex-shrink: 0; cursor: pointer;
}
.story-item span { font-size: .72rem; color: var(--text-secondary); font-weight: 500; }
.si-ring {
  width: 58px; height: 58px; border-radius: 50%;
  padding: 2.5px;
  background: var(--rc, var(--border));
}
.si-inner {
  width: 100%; height: 100%; border-radius: 50%;
  background: var(--surface-2);
  border: 2.5px solid var(--surface);
  display: flex; align-items: center; justify-content: center;
  font-size: .82rem; font-weight: 700; color: white;
  overflow: hidden;
}
.add-icon {
  font-size: 1.5rem; font-weight: 300; color: var(--accent);
  background: var(--surface-2) !important;
}
.add-story .si-ring { background: var(--border); padding: 2px; }

/* ── POST CARD ──────────────────────────────── */
.posts-feed { display: flex; flex-direction: column; gap: 12px; }

.feed-loader {
  text-align: center; padding: 40px 20px;
  color: var(--text-muted);
}
.fl-spinner {
  width: 34px; height: 34px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  margin: 0 auto 12px;
  animation: spin .75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  animation: fadeUp .28s var(--ease) both;
  box-shadow: 0 1px 8px rgba(91,62,248,.04);
  transition: box-shadow .2s var(--ease);
}
.post-card:hover { box-shadow: 0 4px 24px rgba(91,62,248,.1); }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.pc-header { display: flex; align-items: center; gap: 11px; padding: 14px 16px 8px; }
.pc-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--accent-grad);
  color: white; font-size: .88rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; overflow: hidden;
  box-shadow: 0 2px 8px rgba(91,62,248,.2);
}
.pc-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.pc-meta { flex: 1; }
.pc-name { font-weight: 700; font-size: .93rem; display: block; }
.pc-time {
  font-size: .73rem; color: var(--text-muted);
  display: flex; align-items: center; gap: 4px;
}
.pc-time svg { width: 11px; height: 11px; }
.pc-opts {
  background: none; border: none;
  color: var(--text-muted); font-size: 1.3rem; font-weight: 700;
  padding: 4px 8px; border-radius: var(--r-sm);
  transition: background .15s; line-height: 1;
}
.pc-opts:hover { background: var(--surface-2); color: var(--text-primary); }

.pc-body { padding: 4px 16px 14px; }
.pc-text { font-size: .93rem; line-height: 1.6; color: var(--text-primary); white-space: pre-wrap; }
.pc-mood {
  display: inline-flex; align-items: center; gap: 5px;
  margin-top: 9px;
  padding: 4px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 50px;
  font-size: .78rem; font-weight: 600;
  color: var(--accent);
}
.pc-image {
  width: 100%; max-height: 360px;
  object-fit: cover; display: block;
  margin-top: 10px; border-radius: var(--r-sm);
  cursor: pointer;
}

.pc-actions {
  display: flex;
  border-top: 1px solid var(--border);
}
.pca-btn {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 5px;
  padding: 10px 0;
  background: none; border: none;
  font-size: .83rem; font-weight: 600;
  color: var(--text-muted);
  border-radius: 0;
  transition: all .15s var(--ease);
}
.pca-btn svg { width: 17px; height: 17px; }
.pca-btn:hover { background: var(--surface-2); color: var(--accent); }
.pca-btn.liked { color: #ef4444; }
.pca-btn:not(:last-child) { border-right: 1px solid var(--border); }

/* Comments */
.pc-comments {
  display: none;
  border-top: 1px solid var(--border);
  padding: 12px 16px;
}
.pc-comments.open { display: block; }
.cm-item { display: flex; gap: 9px; margin-bottom: 10px; }
.cm-av {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent-grad); color: white;
  font-size: .72rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.cm-bubble {
  background: var(--surface-2);
  border-radius: 12px 12px 12px 3px;
  padding: 7px 11px;
  font-size: .84rem;
  flex: 1;
}
.cm-author { font-weight: 700; font-size: .75rem; margin-bottom: 2px; color: var(--text-primary); }
.cm-text { color: var(--text-secondary); }
.cm-input-row { display: flex; gap: 7px; margin-top: 10px; }
.cm-input {
  flex: 1; padding: 9px 14px;
  border: 1.5px solid var(--border);
  border-radius: 50px;
  font-size: .85rem;
  color: var(--text-primary);
  background: var(--surface);
  outline: none;
  transition: border-color .18s;
}
.cm-input:focus { border-color: var(--accent); }
.cm-send {
  padding: 9px 16px;
  background: var(--accent-grad);
  color: white; border: none;
  border-radius: 50px;
  font-size: .83rem; font-weight: 700;
  transition: all .18s;
}
.cm-send:hover { transform: scale(1.04); }

/* ── PLATFORM PANELS ────────────────────────── */
.platform-panel {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 16px 12px;
}
.pp-hero {
  display: flex; align-items: center; gap: 14px;
  padding: 20px 22px;
  border-radius: var(--r-lg);
  margin-bottom: 14px;
  color: white;
  position: relative; overflow: hidden;
}
.pp-hero::after {
  content: '';
  position: absolute;
  right: -20px; top: -20px;
  width: 120px; height: 120px;
  background: rgba(255,255,255,.08);
  border-radius: 50%;
}
.pp-hero-fb { background: linear-gradient(135deg,#1877f2,#0d5fd8); }
.pp-hero-ig { background: linear-gradient(135deg,#833ab4,#fd1d1d,#fcb045); }
.pp-hero-x  { background: linear-gradient(135deg,#0f172a,#1e293b); }
.pp-hero-icon {
  width: 54px; height: 54px; border-radius: 14px;
  background: rgba(255,255,255,.15);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.pp-hero h2 { font-size: 1.25rem; font-weight: 800; }
.pp-hero p  { font-size: .82rem; opacity: .8; margin-top: 2px; }
.pp-hero > div { flex: 1; }
.pp-open-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 9px 16px;
  background: rgba(255,255,255,.2);
  border: 1.5px solid rgba(255,255,255,.35);
  color: white; border-radius: 50px;
  font-size: .82rem; font-weight: 700;
  transition: all .18s;
  white-space: nowrap;
  text-decoration: none;
}
.pp-open-btn:hover { background: rgba(255,255,255,.32); text-decoration: none; }

.pp-info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  box-shadow: 0 2px 16px rgba(91,62,248,.05);
}
.pp-info-card h4 { font-weight: 800; font-size: .95rem; margin-bottom: 8px; }
.pp-info-card > p { font-size: .85rem; color: var(--text-secondary); margin-bottom: 16px; line-height: 1.55; }

.pp-api-steps { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.api-step { display: flex; align-items: flex-start; gap: 12px; font-size: .84rem; color: var(--text-secondary); }
.as-num {
  min-width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent-grad); color: white;
  font-size: .72rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  margin-top: 1px; flex-shrink: 0;
}
.api-step code {
  background: var(--surface-2); border: 1px solid var(--border);
  padding: 1px 6px; border-radius: 5px; font-size: .8rem;
  font-family: 'SF Mono', 'Fira Code', monospace;
  color: var(--accent);
}

.pp-placeholder-feed { display: flex; flex-direction: column; gap: 12px; }
.ppf-post { display: flex; gap: 12px; }
.ppf-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  color: white; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; flex-shrink: 0;
}
.ppf-body { flex: 1; }
.ppf-body strong { font-size: .88rem; }
.ppf-time { font-size: .73rem; color: var(--text-muted); margin-left: 6px; }
.ppf-body p { font-size: .84rem; color: var(--text-secondary); margin: 4px 0 8px; line-height: 1.5; }
.ppf-reactions { display: flex; gap: 14px; font-size: .78rem; color: var(--text-muted); }

/* IG Grid */
.ig-grid {
  display: grid; grid-template-columns: repeat(3,1fr);
  gap: 5px; border-radius: var(--r-sm); overflow: hidden;
}
.ig-cell {
  aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem; border-radius: 8px;
  cursor: pointer; transition: transform .18s;
}
.ig-cell:hover { transform: scale(.96); }

/* X embed */
.x-embed-box {
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  overflow: hidden;
  min-height: 200px;
}

/* ── FIND FRIENDS ────────────────────────────── */
.section-head { margin-bottom: 14px; }
.section-head h2 { font-size: 1.3rem; font-weight: 800; }
.section-head p  { font-size: .84rem; color: var(--text-secondary); margin-top: 3px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px;
  margin-bottom: 12px;
  box-shadow: 0 1px 8px rgba(91,62,248,.04);
}
.card-title { font-weight: 800; font-size: .93rem; margin-bottom: 4px; }
.card-sub { font-size: .8rem; color: var(--text-muted); margin-bottom: 12px; }

.friends-gmail-card .fgc-top {
  display: flex; align-items: flex-start; gap: 14px; margin-bottom: 16px;
}
.fgc-logo { flex-shrink: 0; }
.fgc-top h3 { font-weight: 700; font-size: .93rem; margin-bottom: 3px; }
.fgc-top p  { font-size: .82rem; color: var(--text-secondary); line-height: 1.45; }

.gmail-btn {
  display: flex; align-items: center; gap: 9px;
  justify-content: center;
  width: 100%; padding: 13px 20px;
  background: #ffffff;
  border: 1.5px solid #dadce0;
  border-radius: 50px;
  font-size: .92rem; font-weight: 600; color: #3c4043;
  transition: all .18s; box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
[data-theme="dark"] .gmail-btn { background: var(--surface-2); border-color: var(--border); color: var(--text-primary); }
.gmail-btn:hover { background: #f1f3f4; box-shadow: 0 3px 12px rgba(0,0,0,.12); transform: translateY(-1px); }
[data-theme="dark"] .gmail-btn:hover { background: var(--surface-3); }

.gcc-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}
.gcc-item:last-child { border-bottom: none; }
.gcc-av {
  width: 40px; height: 40px; border-radius: 50%;
  color: white; font-size: .82rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.gcc-info { flex: 1; }
.gcc-info strong { display: block; font-size: .88rem; font-weight: 700; }
.gcc-info span   { font-size: .75rem; color: var(--text-muted); }
.gcc-on-badge {
  font-size: .72rem; font-weight: 700; padding: 4px 10px;
  border-radius: 50px; background: #dcfce7; color: #15803d;
  white-space: nowrap;
}
[data-theme="dark"] .gcc-on-badge { background: rgba(21,128,61,.2); color: #4ade80; }

.search-row { display: flex; gap: 8px; margin: 12px 0; }
.search-input {
  flex: 1; padding: 10px 15px;
  border: 1.5px solid var(--border);
  border-radius: 50px;
  font-size: .88rem;
  background: var(--surface-2);
  color: var(--text-primary);
  outline: none;
  transition: border-color .18s, background .18s;
}
.search-input:focus { border-color: var(--accent); background: var(--surface); }
.search-btn {
  padding: 10px 20px;
  background: var(--accent-grad);
  color: white; border: none;
  border-radius: 50px;
  font-size: .88rem; font-weight: 700;
  transition: all .18s; white-space: nowrap;
}
.search-btn:hover { transform: translateY(-1px); box-shadow: var(--accent-glow); }

.suggestions-list { display: flex; flex-direction: column; }
.sug-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 8px; border-radius: var(--r-sm);
  transition: background .15s;
}
.sug-item:hover { background: var(--surface-2); }
.sug-av {
  width: 44px; height: 44px; border-radius: 50%;
  color: white; font-size: .82rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.sug-info { flex: 1; }
.sug-info strong { display: block; font-size: .9rem; font-weight: 700; }
.sug-info span   { font-size: .75rem; color: var(--text-muted); }
.add-btn {
  padding: 7px 16px;
  background: var(--accent-grad);
  color: white; border: none;
  border-radius: 50px;
  font-size: .8rem; font-weight: 700;
  transition: all .18s;
  white-space: nowrap;
  box-shadow: 0 2px 10px rgba(91,62,248,.22);
}
.add-btn:hover { transform: scale(1.05); }
.add-btn.sent {
  background: #dcfce7; color: #15803d;
  box-shadow: none;
}
[data-theme="dark"] .add-btn.sent { background: rgba(21,128,61,.2); color: #4ade80; }
.add-btn:disabled { opacity: .7; cursor: default; transform: none; }

.sent-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 8px; border-bottom: 1px solid var(--border);
}
.sent-item:last-child { border-bottom: none; }
.sent-av {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent-grad); color: white;
  font-size: .75rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sent-info { flex: 1; }
.sent-info strong { display: block; font-size: .86rem; }
.sent-info span   { font-size: .73rem; color: var(--text-muted); }
.sent-badge {
  font-size: .71rem; font-weight: 700; padding: 3px 9px;
  border-radius: 50px; background: #fef9c3; color: #854d0e;
}
[data-theme="dark"] .sent-badge { background: rgba(133,77,14,.2); color: #fbbf24; }

/* ── BOTTOM NAV ─────────────────────────────── */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(248,247,255,.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  justify-content: space-around;
  align-items: center;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  z-index: 900;
  box-shadow: 0 -4px 24px rgba(91,62,248,.07);
  transition: background .25s var(--ease);
}
[data-theme="dark"] .bottom-nav { background: rgba(13,11,30,.96); }
.bnav {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 7px 14px; border: none; background: none;
  color: var(--text-muted);
  font-size: .63rem; font-weight: 600;
  border-radius: 14px; transition: all .18s;
  min-width: 54px; position: relative;
}
.bnav svg { width: 22px; height: 22px; }
.bnav.active {
  color: var(--accent);
  background: var(--surface-2);
}
.bnav:active { transform: scale(.9); }

/* ── TOAST ──────────────────────────────────── */
.toast {
  position: fixed;
  bottom: calc(var(--nav-h) + 12px);
  left: 50%; transform: translateX(-50%);
  background: var(--text-primary);
  color: var(--surface);
  padding: 11px 22px;
  border-radius: 50px;
  font-size: .87rem; font-weight: 600;
  z-index: 9000;
  white-space: nowrap;
  box-shadow: 0 6px 24px rgba(0,0,0,.22);
  animation: toastSlide .3s var(--ease);
  pointer-events: none;
}
@keyframes toastSlide {
  from { opacity: 0; transform: translateX(-50%) translateY(12px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ── FRIEND MODAL ────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(10,8,30,.65);
  backdrop-filter: blur(6px);
  z-index: 8000;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  animation: fadeIn .2s var(--ease);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  width: min(520px,100%);
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 32px 80px rgba(0,0,0,.3);
  animation: modalPop .25s cubic-bezier(.34,1.56,.64,1);
}
@keyframes modalPop {
  from { opacity: 0; transform: scale(.88) translateY(16px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-top {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
}
.modal-logo {
  width: 42px; height: 42px; border-radius: 12px;
  background: linear-gradient(135deg,#fff8f3,#eef4ff);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; font-weight: 900; letter-spacing: -1px;
  flex-shrink: 0;
}
.modal-top h3 { flex: 1; font-weight: 800; font-size: 1rem; }
.modal-close {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--surface-2); border: none;
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.modal-close svg { width: 16px; height: 16px; }
.modal-close:hover { background: #fee2e2; color: #dc2626; }

.modal-body { padding: 16px 20px; }
.modal-intro { font-size: .84rem; color: var(--text-secondary); margin-bottom: 12px; line-height: 1.5; }
.modal-target {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 15px;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: 50px;
  font-weight: 700; font-size: .88rem;
  color: var(--accent);
  margin-bottom: 16px;
}
.modal-target::before { content: '✉️'; }

.email-preview {
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
}
.ep-bar {
  background: var(--surface-2);
  padding: 8px 14px;
  display: flex; align-items: center; gap: 6px;
  border-bottom: 1px solid var(--border);
}
.ep-dots { display: flex; gap: 5px; }
.ep-dots span {
  width: 10px; height: 10px; border-radius: 50%;
}
.ep-dots span:nth-child(1) { background: #ff6b6b; }
.ep-dots span:nth-child(2) { background: #ffd93d; }
.ep-dots span:nth-child(3) { background: #6bcb77; }
.ep-label { font-size: .72rem; color: var(--text-muted); margin-left: 4px; }
.ep-meta {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  display: flex; flex-direction: column; gap: 3px;
  font-size: .78rem; color: var(--text-secondary);
}
.ep-meta b { color: var(--text-primary); }
.ep-subject { color: var(--accent); font-weight: 700; }
.ep-body { padding: 14px; background: white; font-size: .83rem; line-height: 1.6; color: #1a1535; }
.ep-cta {
  display: inline-block; margin: 12px 0;
  padding: 11px 26px;
  background: linear-gradient(135deg,#f97316,#1877f2);
  color: white; border-radius: 50px;
  font-weight: 800; font-size: .88rem;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(91,62,248,.3);
}

.modal-footer {
  display: flex; gap: 10px;
  padding: 14px 20px 18px;
  border-top: 1px solid var(--border);
}
.mf-cancel {
  flex: 1; padding: 12px;
  background: var(--surface-2); border: none;
  border-radius: 50px;
  font-size: .9rem; font-weight: 600;
  color: var(--text-secondary);
  transition: background .15s;
}
.mf-cancel:hover { background: var(--surface-3); }
.mf-send {
  flex: 2; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px;
  background: linear-gradient(135deg,#f97316,#1877f2);
  color: white; border: none;
  border-radius: 50px;
  font-size: .9rem; font-weight: 800;
  box-shadow: 0 4px 20px rgba(91,62,248,.28);
  transition: all .18s;
}
.mf-send svg { width: 15px; height: 15px; }
.mf-send:hover { transform: translateY(-1px); box-shadow: 0 6px 28px rgba(91,62,248,.38); }

/* ── LIGHTBOX ────────────────────────────────── */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.9);
  z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  animation: fadeIn .2s var(--ease);
}
.lightbox img {
  max-width: 100%; max-height: 90vh;
  border-radius: var(--r-sm);
  object-fit: contain;
}
.lb-close {
  position: absolute; top: 16px; right: 16px;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,.12); border: none;
  color: white; font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.lb-close:hover { background: rgba(255,255,255,.22); }

/* ── RESPONSIVE ─────────────────────────────── */
@media (max-width: 680px) {
  .ah-tabs { display: none; }
  .bottom-nav { display: flex; }
  .tab-panel { padding-bottom: calc(var(--nav-h) + 12px); }
  .ah-logo { font-size: 1rem; }
  .modal-footer { flex-direction: column; }
  .mf-send, .mf-cancel { flex: none; width: 100%; }
  .pp-hero { flex-wrap: wrap; }
}
@media (min-width: 681px) {
  .ah-tabs { display: flex; }
  .bottom-nav { display: none; }
  .feed-wrap, .platform-panel { padding: 20px 16px; }
}
@media (max-width: 380px) {
  .login-card { padding: 32px 20px 28px; }
  .lc-logo { font-size: 2.4rem; }
}
