* { box-sizing: border-box; margin:0; padding:0; font-family: 'Segoe UI', sans-serif; }
body { background:#f0f2f5; color:#050505; padding-bottom:60px; }

/* ===== FB-STYLE TOP APP BAR ===== */
.fb-topbar { position:sticky; top:0; z-index:30; background:#fff; display:flex; align-items:center; justify-content:space-between; padding:10px 16px; box-shadow:0 1px 3px rgba(0,0,0,.15); }
.fb-logo { color:#1877f2; font-weight:800; font-size:1.3rem; }
.fb-icons { display:flex; gap:10px; }
.fb-icon { background:#e4e6eb; width:38px; height:38px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:1.1rem; }

/* ===== TABS ===== */
.tabs { display:flex; gap:8px; overflow-x:auto; padding:12px 16px; background:#fff; border-bottom:1px solid #e4e6eb; }
.tab { flex:0 0 auto; background:#e4e6eb; color:#050505; border:none; padding:8px 16px; border-radius:20px; cursor:pointer; font-size:.85rem; font-weight:600; }
.tab.active { background:#1877f2; color:#fff; }

/* ===== FEED ===== */
.feed { max-width:560px; margin:12px auto; display:flex; flex-direction:column; gap:12px; padding:0 10px; }
.post { background:#fff; border-radius:10px; box-shadow:0 1px 2px rgba(0,0,0,.15); overflow:hidden; }
.post-header { display:flex; align-items:center; gap:10px; padding:12px; }
.avatar { width:42px; height:42px; border-radius:50%; object-fit:cover; }
.post-meta { display:flex; flex-direction:column; }
.post-name { font-weight:700; font-size:.95rem; }
.post-time { color:#65676b; font-size:.75rem; }
.post-caption { padding:0 12px 10px; font-size:.9rem; }
.post-photo { width:100%; max-height:420px; object-fit:cover; display:block; }
.reaction-summary { display:flex; justify-content:space-between; padding:10px 12px; color:#65676b; font-size:.82rem; border-bottom:1px solid #e4e6eb; }
.action-row-fb { display:flex; }
.fb-action { flex:1; text-align:center; padding:10px 4px; color:#65676b; font-weight:600; font-size:.85rem; text-decoration:none; }
.fb-action:hover { background:#f0f2f5; }

/* ===== SPONSORED (NATIVE AD) POST ===== */
.sponsored-post { padding:10px 12px 16px; }
.sponsored-label { color:#65676b; font-size:.78rem; font-weight:600; margin-bottom:8px; }

/* ===== FOOTER ===== */
footer { text-align:center; padding:25px 15px; color:#65676b; font-size:.75rem; }
.disclaimer { max-width:560px; margin:0 auto 12px; }
.links a { color:#1877f2; text-decoration:none; margin:0 6px; }

/* ===== WEBVIEW-STYLE BOTTOM APP NAV ===== */
.app-bottom-nav { position:fixed; bottom:0; left:0; right:0; background:#fff; display:flex; justify-content:space-around; border-top:1px solid #e4e6eb; z-index:35; }
.nav-item { flex:1; background:none; border:none; padding:8px 0 6px; display:flex; flex-direction:column; align-items:center; gap:2px; font-size:.65rem; color:#65676b; }
.nav-item span { font-size:1.2rem; }
.nav-item.active { color:#1877f2; }

/* ===========================================================
   REELS-STYLE FULL-SCREEN VERTICAL FEED
   =========================================================== */
body.reels-body { background:#000; padding-bottom:0; }

.reels-topbar { position:fixed; top:0; left:0; right:0; z-index:40; display:flex; align-items:center; justify-content:space-between; padding:14px 16px; background:linear-gradient(180deg,rgba(0,0,0,.6),transparent); }
.reels-logo { color:#fff; font-weight:800; font-size:1.2rem; }
.fb-icon-ghost { color:#fff; font-size:1.2rem; margin-left:14px; }

.reels-tabs { position:fixed; top:52px; left:0; right:0; z-index:39; background:none; border:none; padding:0 16px; display:flex; gap:8px; overflow-x:auto; }
.reels-tabs .tab { background:rgba(255,255,255,.15); color:#fff; backdrop-filter:blur(4px); }
.reels-tabs .tab.active { background:#fff; color:#000; }

.reels-feed { scroll-snap-type:y proximity; overflow-y:scroll; height:100vh; width:100%; }
.reel { position:relative; scroll-snap-align:start; height:100vh; width:100%; overflow:hidden; display:flex; align-items:flex-end; }
.reel-bg { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.reel-gradient { position:absolute; inset:0; background:linear-gradient(0deg,rgba(0,0,0,.85) 0%,rgba(0,0,0,.1) 45%,rgba(0,0,0,.35) 100%); }

.reel-side-actions { position:absolute; right:12px; bottom:110px; z-index:2; display:flex; flex-direction:column; align-items:center; gap:22px; }
.side-action { display:flex; flex-direction:column; align-items:center; color:#fff; }
.side-icon { font-size:1.7rem; filter:drop-shadow(0 1px 3px rgba(0,0,0,.6)); }
.side-count { font-size:.72rem; margin-top:2px; font-weight:600; }
.side-avatar { width:38px; height:38px; border-radius:50%; border:2px solid #fff; object-fit:cover; margin-top:4px; }

.reel-bottom-info { position:relative; z-index:2; padding:0 16px 26px; color:#fff; max-width:80%; }
.reel-name { font-weight:700; font-size:1.05rem; }
.online-badge { color:#4ade80; font-size:.75rem; font-weight:600; }
.reel-location { font-size:.85rem; opacity:.9; margin:4px 0 12px; }
.reel-cta-row { display:flex; gap:8px; }
.reel-cta { background:rgba(255,255,255,.18); backdrop-filter:blur(6px); color:#fff; border:1px solid rgba(255,255,255,.4); padding:8px 14px; border-radius:20px; text-decoration:none; font-size:.8rem; font-weight:600; }

/* Sponsored full-screen reel */
.sponsored-reel { display:flex; flex-direction:column; align-items:center; justify-content:center; background:#111; }
.sponsored-reel .sponsored-label { color:#aaa; font-size:.8rem; margin-bottom:10px; }
.sponsored-reel .ad-demo { max-width:85%; }

.reels-footer { position:relative; z-index:2; background:#000; color:#aaa; text-align:center; padding:24px 16px 30px; }
.reels-footer .disclaimer { max-width:500px; margin:0 auto 10px; font-size:.72rem; }
.reels-footer .links a { color:#4da3ff; text-decoration:none; margin:0 6px; }

/* ===== CALL PAGE ===== */
.call-page { display:flex; flex-direction:column; align-items:center; justify-content:center; min-height:100vh; padding:20px; }
.phone-frame { background:#161a2e; border-radius:26px; padding:34px 26px; width:300px; text-align:center; border:1px solid #232742; }

.ring-pulse { position:relative; width:130px; height:130px; margin:0 auto 16px; }
.ring-pulse::before, .ring-pulse::after {
  content:''; position:absolute; inset:0; border-radius:50%; border:2px solid #25d366; animation:pulse 1.6s infinite;
}
.ring-pulse::after { animation-delay:.8s; }
.ring-pulse img { width:100%; height:100%; border-radius:50%; object-fit:cover; position:relative; z-index:1; }
@keyframes pulse { 0%{ transform:scale(.9); opacity:1;} 100%{ transform:scale(1.4); opacity:0;} }

.status { color:#9aa; margin:10px 0 22px; font-size:.9rem; }
.call-actions { display:flex; justify-content:space-around; }
.accept { background:#25d366; color:#fff; border:none; padding:12px 22px; border-radius:50px; font-weight:600; cursor:pointer; }
.decline { background:#e74c3c; color:#fff; border:none; padding:12px 22px; border-radius:50px; font-weight:600; margin-top:12px; cursor:pointer; }

.small-photo { width:100px; height:100px; border-radius:50%; object-fit:cover; margin-bottom:14px; }

.waveform { display:flex; justify-content:center; align-items:flex-end; gap:4px; height:40px; margin:14px 0; }
.waveform span { width:4px; background:#25d366; border-radius:2px; animation:wave 1s infinite ease-in-out; }
.waveform span:nth-child(1){height:10px;animation-delay:0s;}
.waveform span:nth-child(2){height:22px;animation-delay:.1s;}
.waveform span:nth-child(3){height:34px;animation-delay:.2s;}
.waveform span:nth-child(4){height:16px;animation-delay:.3s;}
.waveform span:nth-child(5){height:28px;animation-delay:.4s;}
.waveform span:nth-child(6){height:12px;animation-delay:.5s;}
.waveform span:nth-child(7){height:20px;animation-delay:.6s;}
@keyframes wave { 0%,100%{transform:scaleY(1);} 50%{transform:scaleY(1.8);} }

.video-frame { position:relative; width:100%; aspect-ratio:3/4; border-radius:16px; overflow:hidden; margin-bottom:16px; }
.video-frame img { width:100%; height:100%; object-fit:cover; filter:brightness(.9); }
.video-overlay { position:absolute; bottom:0; left:0; right:0; background:linear-gradient(0deg,rgba(0,0,0,.7),transparent); padding:10px; font-size:.85rem; text-align:left; }

.sms-header { display:flex; align-items:center; gap:10px; margin-bottom:14px; }
.sms-header img { width:40px; height:40px; border-radius:50%; object-fit:cover; }
.sms-chat { height:220px; overflow-y:auto; text-align:left; display:flex; flex-direction:column; gap:8px; margin-bottom:12px; }
.bubble { max-width:80%; padding:8px 12px; border-radius:14px; font-size:.85rem; }
.bubble.them { background:#232742; align-self:flex-start; border-bottom-left-radius:2px; }
.sms-input { display:flex; gap:6px; }
.sms-input input { flex:1; background:#0b0e1a; border:1px solid #232742; border-radius:20px; padding:8px 14px; color:#fff; }
.sms-input button { background:#25d366; border:none; color:#fff; width:36px; border-radius:50%; }

.back-link { display:block; margin-top:22px; color:#9aa; text-decoration:none; font-size:.85rem; }

/* ===== AD PLACEHOLDER DEMO BOXES (temporary — remove ad-demo styling once real ad code is pasted; neutral so it works on light feed + dark call page) ===== */
.ad-slot { max-width:560px; margin:12px auto; padding:0 10px; }
.ad-demo { background:repeating-linear-gradient(45deg,#e4e6eb,#e4e6eb 10px,#d8dadf 10px,#d8dadf 20px); border:1px dashed #9aa; border-radius:10px; color:#65676b; text-align:center; padding:22px 10px; font-size:.85rem; }
.ad-demo small { color:#8a8d93; font-size:.7rem; }
.ad-banner-top .ad-demo { min-height:70px; display:flex; flex-direction:column; align-items:center; justify-content:center; }
.ad-native .ad-demo { min-height:90px; display:flex; flex-direction:column; align-items:center; justify-content:center; }
.ad-card { display:flex; align-items:center; justify-content:center; }
.ad-card .ad-demo.small { min-height:150px; width:100%; display:flex; flex-direction:column; align-items:center; justify-content:center; }

/* ===== STICKY BOTTOM AD (sits just above bottom nav) ===== */
.ad-sticky-bottom { position:fixed; bottom:56px; left:0; right:0; max-width:100%; margin:0; background:#fff; border-top:1px solid #e4e6eb; padding:6px 16px; z-index:36; }
.ad-sticky-bottom .ad-demo.small { min-height:44px; display:flex; align-items:center; justify-content:center; padding:6px; }
.ad-close { position:absolute; top:2px; right:8px; background:none; border:none; color:#65676b; font-size:1rem; cursor:pointer; z-index:41; }

/* ===== EXIT-INTENT POPUP ===== */
.exit-overlay { display:none; position:fixed; inset:0; background:rgba(0,0,0,.75); z-index:60; align-items:center; justify-content:center; }
.exit-overlay.show { display:flex; }
.exit-box { position:relative; background:#fff; border-radius:16px; padding:30px 20px 20px; max-width:320px; width:90%; box-shadow:0 8px 30px rgba(0,0,0,.3); }
.exit-box .ad-close { top:8px; right:10px; }
