/* ==========================================================================
   INTRO — Instagram-style simulation
   Runs inside a phone frame on top of the Void brand backdrop.
   ========================================================================== */

body.intro-body{
  background:var(--void);
  min-height:100vh;
  display:flex; align-items:center; justify-content:center;
  padding:40px 16px;
}

.intro-backdrop{
  position:fixed; inset:0; z-index:0;
  background:radial-gradient(circle at 50% 20%, rgba(77,232,192,0.08), transparent 55%);
}
.intro-backdrop .bg-label{
  position:absolute; bottom:28px; left:0; right:0; text-align:center;
  font-family:var(--font-mono); font-size:12px; color:var(--slate);
  letter-spacing:.05em;
}

/* Skip control */
.skip-btn{
  position:fixed; top:24px; right:24px; z-index:50;
  font-family:var(--font-mono); font-size:12px; color:var(--slate);
  border:1px solid var(--line); border-radius:999px; padding:8px 16px;
  background:rgba(22,22,29,0.7); backdrop-filter:blur(4px);
  transition:color .2s, border-color .2s;
}
.skip-btn:hover{ color:var(--signal); border-color:var(--signal); }

/* ---------- Phone frame ---------- */
.phone{
  position:relative; z-index:1;
  width:390px; max-width:100%;
  height:820px; max-height:88vh;
  background:#0d0d0d;
  border-radius:46px;
  border:8px solid #1c1c1c;
  box-shadow:0 40px 100px -20px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.04);
  overflow:hidden;
  display:flex; flex-direction:column;
}
.phone::before{
  content:"";
  position:absolute; top:0; left:50%; transform:translateX(-50%);
  width:120px; height:22px; background:#0d0d0d; border-radius:0 0 16px 16px; z-index:20;
}
.status-bar{
  height:44px; flex:0 0 auto;
  display:flex; align-items:center; justify-content:space-between;
  padding:0 24px; background:#fff;
  font-family:var(--font-body); font-size:13px; font-weight:600; color:#000;
}

/* screens are stacked, toggled via .active */
.screen{
  flex:1; min-height:0; background:#fff; color:#111;
  display:none; flex-direction:column; overflow-y:auto;
  -ms-overflow-style:none; scrollbar-width:none;
}
.screen::-webkit-scrollbar{ display:none; }
.screen.active{ display:flex; }

/* ---------- Splash screen ---------- */
#screen-splash{
  align-items:center; justify-content:center; background:#fff;
}
.splash-logo{
  font-family:'Brush Script MT', cursive;
  font-family:var(--font-display);
  font-weight:700; font-size:34px; color:#111;
  opacity:0; transform:scale(0.85);
  animation:splash-in 1.1s var(--ease) forwards;
}
@keyframes splash-in{ to{ opacity:1; transform:scale(1); } }

/* ---------- Profile screen ---------- */
.ig-topbar{
  display:flex; align-items:center; justify-content:space-between;
  padding:10px 16px; border-bottom:1px solid #eee; flex:0 0 auto;
}
.ig-topbar .uname{ font-family:var(--font-display); font-weight:700; font-size:17px; }
.ig-topbar .icons{ display:flex; gap:18px; font-size:19px; }

.profile-head{ display:flex; align-items:center; gap:22px; padding:20px 16px 12px; }
.avatar{
  width:86px; height:86px; border-radius:50%; overflow:hidden; flex:0 0 auto;
  border:2.5px solid var(--signal); padding:2px; background:#fff;
}
.avatar img{ width:100%; height:100%; border-radius:50%; object-fit:cover; }

.stats{ display:flex; gap:22px; flex:1; }
.stats div{ text-align:center; }
.stats strong{ display:block; font-size:17px; font-weight:700; }
.stats span{ font-size:12px; color:#666; }

.profile-bio{ padding:2px 16px 14px; }
.profile-bio .name{ font-weight:700; font-size:14px; }
.profile-bio .bio-text{ font-size:13.5px; color:#333; line-height:1.5; margin-top:2px; }
.profile-bio .bio-text .todo{ font-size:11px; padding:1px 6px; }

.profile-actions{ display:flex; gap:8px; padding:4px 16px 16px; }
.profile-actions button{
  flex:1; border:1px solid #dbdbdb; background:#efefef; border-radius:8px;
  padding:8px 0; font-size:13.5px; font-weight:600; color:#111;
}
.profile-actions button.msg-btn{ position:relative; }
.msg-btn.pulse::after{
  content:""; position:absolute; top:-4px; right:-4px; width:10px; height:10px;
  border-radius:50%; background:var(--flare);
  animation:pulse-dot 1.4s ease-in-out infinite;
}
@keyframes pulse-dot{ 0%,100%{ transform:scale(1); opacity:1; } 50%{ transform:scale(1.4); opacity:.6; } }

.grid-tabs{ display:flex; border-top:1px solid #eee; border-bottom:1px solid #eee; }
.grid-tabs div{ flex:1; text-align:center; padding:10px 0; font-size:18px; color:#999; }
.grid-tabs div.active{ color:#111; border-bottom:1.5px solid #111; }

.post-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:2px; padding-top:2px; }
.post-grid .cell{ aspect-ratio:1/1; overflow:hidden; background:#f2f2f2; }
.post-grid .cell img{ width:100%; height:100%; object-fit:cover; }
.post-grid .cell.empty{
  display:flex; align-items:center; justify-content:center;
  font-family:var(--font-mono); font-size:9px; color:#bbb;
}

/* ---------- Single post screen ---------- */
.post-header{ display:flex; align-items:center; gap:10px; padding:10px 14px; }
.post-header .avatar-sm{ width:32px; height:32px; border-radius:50%; overflow:hidden; }
.post-header .avatar-sm img{ width:100%; height:100%; object-fit:cover; }
.post-header .who{ font-size:13px; font-weight:700; flex:1; }
.post-photo{ width:100%; aspect-ratio:1/1; overflow:hidden; background:#eee; }
.post-photo img{ width:100%; height:100%; object-fit:cover; }
.post-actions{ display:flex; align-items:center; gap:16px; padding:10px 14px 4px; font-size:22px; }
.post-actions .heart{ transition:transform .25s var(--ease); cursor:pointer; }
.post-actions .heart.liked{ color:var(--flare); transform:scale(1.15); }
.post-likes{ padding:2px 14px; font-size:13px; font-weight:700; }
.post-caption{ padding:4px 14px 4px; font-size:13.5px; line-height:1.4; }
.post-caption b{ margin-right:5px; }
.post-comments-link{ padding:2px 14px 14px; font-size:13px; color:#8e8e8e; }

/* ---------- DM screen ---------- */
.dm-header{
  display:flex; align-items:center; gap:12px; padding:10px 14px;
  border-bottom:1px solid #eee; flex:0 0 auto;
}
.dm-header .avatar-sm{ width:34px; height:34px; border-radius:50%; overflow:hidden; }
.dm-header .avatar-sm img{ width:100%; height:100%; object-fit:cover; }
.dm-header .who{ font-size:14px; font-weight:700; }
.dm-header .status{ font-size:11.5px; color:#8e8e8e; }

.dm-body{ flex:1; padding:14px 12px; display:flex; flex-direction:column; gap:8px; overflow-y:auto; }

.bubble{
  max-width:76%; padding:10px 14px; border-radius:20px;
  font-size:14px; line-height:1.4;
  opacity:0; transform:translateY(10px) scale(0.98);
  animation:bubble-in .35s var(--ease) forwards;
}
@keyframes bubble-in{ to{ opacity:1; transform:none; } }
.bubble.them{ align-self:flex-start; background:#efefef; color:#111; border-bottom-left-radius:6px; }
.bubble.me{ align-self:flex-end; background:linear-gradient(135deg,#4DE8C0,#2fbf9c); color:#04241c; font-weight:600; border-bottom-right-radius:6px; }

.typing{
  align-self:flex-start; background:#efefef; border-radius:20px; border-bottom-left-radius:6px;
  padding:12px 16px; display:flex; gap:4px;
}
.typing span{
  width:6px; height:6px; border-radius:50%; background:#9a9a9a;
  animation:typing-blink 1.1s infinite ease-in-out;
}
.typing span:nth-child(2){ animation-delay:.15s; }
.typing span:nth-child(3){ animation-delay:.3s; }
@keyframes typing-blink{ 0%,60%,100%{ transform:translateY(0); opacity:.5; } 30%{ transform:translateY(-4px); opacity:1; } }

.dm-options{
  flex:0 0 auto; padding:10px 12px 20px;
  display:flex; flex-direction:column; gap:8px;
  border-top:1px solid #f0f0f0;
}
.dm-options.hidden{ display:none; }
.dm-options button{
  border:1.5px solid var(--void); background:#fff; color:var(--void);
  border-radius:999px; padding:11px 16px; font-size:13.5px; font-weight:600;
  text-align:left; transition:background .2s, color .2s;
}
.dm-options button:hover{ background:var(--void); color:#fff; }
.dm-options .opt-hint{
  font-family:var(--font-mono); font-size:10.5px; color:#a3a3a3; padding:0 4px 2px;
}

.dm-cta{ flex:0 0 auto; padding:14px 16px 22px; }
.dm-cta.hidden{ display:none; }
.dm-cta button{
  width:100%; background:var(--void); color:#fff; border:0; border-radius:999px;
  padding:15px 0; font-family:var(--font-mono); font-size:14px; font-weight:600;
  display:flex; align-items:center; justify-content:center; gap:8px;
}
.dm-cta button:hover{ background:#000; }

@media (max-width:420px){
  .phone{ height:100vh; max-height:100vh; border-radius:0; border-width:0; }
  .phone::before{ display:none; }
}
