:root{
  --bg:#05070c;
  --panel:rgba(12,18,32,.72);
  --panel2:rgba(10,14,26,.65);
  --stroke:rgba(255,255,255,.08);
  --text:#e9eefc;
  --muted:rgba(233,238,252,.65);
  --red:#e50914;
  --shadow: 0 16px 40px rgba(0,0,0,.55);
  --radius:18px;

  --navH:64px;
}


/* Theme system */
body[data-theme="light"]{
  --bg:#f6f7fb;
  --panel:rgba(255,255,255,.85);
  --panel2:rgba(255,255,255,.72);
  --stroke:rgba(0,0,0,.10);
  --text:#0b1220;
  --muted:rgba(11,18,32,.65);
  --shadow: 0 16px 40px rgba(0,0,0,.12);
}
body[data-theme="system"]{
  /* Use default (dark) variables; system is handled by OS + user can override later */
}
@media (prefers-color-scheme: light){
  body[data-theme="system"]{
    --bg:#f6f7fb;
    --panel:rgba(255,255,255,.85);
    --panel2:rgba(255,255,255,.72);
    --stroke:rgba(0,0,0,.10);
    --text:#0b1220;
    --muted:rgba(11,18,32,.65);
    --shadow: 0 16px 40px rgba(0,0,0,.12);
  }
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Arial;
  background:
    radial-gradient(900px 600px at 20% 10%, rgba(229,9,20,.18), transparent 55%),
    radial-gradient(700px 500px at 70% 30%, rgba(120,80,255,.10), transparent 55%),
    radial-gradient(800px 600px at 60% 90%, rgba(0,180,255,.10), transparent 55%),
    var(--bg);
  color:var(--text);
  min-height:100vh;
  overflow-x:hidden;
}

img{max-width:100%; height:auto; display:block}
a{color:var(--text); text-decoration:none}
a:hover{color:white}

.container{max-width:1200px;margin:0 auto;padding:18px}
@media(max-width:520px){
  .container{padding:14px}
}

/* ---------------- NAVBAR (FIXED LOGO SIZE) ---------------- */
.navbar{
  position:sticky; top:12px; z-index:50;
  height:var(--navH);
  display:flex; align-items:center; justify-content:space-between;
  gap:12px;

  padding:10px 12px;
  border-radius: 18px;

  /* glass */
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: linear-gradient(180deg, rgba(10,14,24,.72), rgba(10,14,24,.35));
  border:1px solid var(--stroke);
  box-shadow: 0 10px 30px rgba(0,0,0,.35);

  margin-bottom:18px;
}

/* left side */
.brand{
  display:flex; align-items:center; gap:10px;
  min-width: 140px;
  height:100%;
}

/* ✅ IMPORTANT: keep 2.png always inside navbar */
.brand img.logo-sm{
  height:34px;               /* lock height */
  max-height:34px;
  width:auto;
  max-width:140px;           /* lock width */
  object-fit:contain;
  filter: drop-shadow(0 0 10px rgba(229,9,20,.30));
  animation: glow 2.8s ease-in-out infinite;
  transition: transform .18s ease, filter .18s ease;
}

.brand img.logo-sm:hover{
  transform: translateY(-1px) scale(1.02);
  filter: drop-shadow(0 0 20px rgba(229,9,20,.65));
}

@keyframes glow{
  0%,100%{ filter: drop-shadow(0 0 10px rgba(229,9,20,.35)); }
  50%{ filter: drop-shadow(0 0 18px rgba(229,9,20,.55)); }
}

.nav-mid{
  display:flex; align-items:center; gap:10px;
  flex:1;
  justify-content:center;
  min-width: 0;
}

.nav-right{
  display:flex; align-items:center; justify-content:flex-end;
  gap:10px;
  min-width: 220px;
}

@media(max-width:900px){
  .nav-mid{display:none}
  .nav-right{min-width:auto}
}

/* pills / buttons */
.pill{
  border:1px solid rgba(229,9,20,.35);
  background: rgba(229,9,20,.12);
  padding:7px 10px;
  border-radius:999px;
  color:#fff;
  font-size:12px;
  white-space:nowrap;
  display:inline-flex;
  align-items:center;
  gap:8px;
}

.btn{
  background: var(--red);
  color:white;
  border:none;
  padding:10px 14px;
  border-radius: 12px;
  cursor:pointer;
  font-weight:800;
  box-shadow: 0 12px 30px rgba(229,9,20,.20);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.btn:hover{ transform: translateY(-1px); box-shadow: 0 16px 40px rgba(229,9,20,.28); }
.btn:active{ transform: translateY(0px) scale(.99); }

.btn.ghost{
  background: rgba(255,255,255,.06);
  border:1px solid var(--stroke);
  box-shadow:none;
}
.btn.ghost:hover{ background: rgba(255,255,255,.10); }

.avatar-mini{
  width:34px; height:34px;
  border-radius:999px;
  border:2px solid rgba(229,9,20,.55);
  object-fit:cover;
  background: rgba(255,255,255,.06);
}

/* ---------------- CARDS / LAYOUT ---------------- */
.card{
  background: var(--panel);
  border:1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding:16px;
}

.grid-auth{
  display:grid;
  grid-template-columns: 1.1fr .9fr;
  gap:16px;
  align-items:stretch;
}
@media(max-width:900px){
  .grid-auth{grid-template-columns:1fr}
}

.h1{margin:0 0 8px 0; font-size:28px}
.sub{color:var(--muted); font-size:14px}

label{display:block;margin-top:12px; color:rgba(233,238,252,.85); font-size:13px}
input, select{
  width:100%;
  margin-top:6px;
  padding:12px 12px;
  border-radius: 12px;
  border:1px solid var(--stroke);
  outline:none;
  background: rgba(0,0,0,.25);
  color:var(--text);
}
input:focus, select:focus{ border-color: rgba(229,9,20,.45); box-shadow: 0 0 0 4px rgba(229,9,20,.12); }

.msg{
  margin:12px 0;
  padding:10px 12px;
  border-radius: 12px;
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.06);
  font-size:13px;
}
.msg.err{ border-color: rgba(229,9,20,.35); background: rgba(229,9,20,.10); }
.msg.ok{ border-color: rgba(0,200,120,.35); background: rgba(0,200,120,.10); }

.footer{
  margin-top:26px;
  text-align:center;
  color:rgba(233,238,252,.55);
  font-size:12px;
  padding:12px 0;
}

/* ---------------- DASHBOARD ---------------- */
.dashboard-layout{
  display:grid;
  grid-template-columns: 1.6fr .8fr;
  gap:16px;
}
@media(max-width:1000px){
  .dashboard-layout{grid-template-columns:1fr}
}

.section-head{
  display:flex; align-items:center; justify-content:space-between;
  gap:10px;
  margin-bottom:12px;
}
.section-title{font-size:18px; font-weight:900}
.section-actions{display:flex; gap:8px; flex-wrap:wrap}

.row{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap:12px;
}
@media(max-width:900px){ .row{grid-template-columns: repeat(2, 1fr);} }
@media(max-width:520px){ .row{grid-template-columns: 1fr;} }

.thumb{
  position:relative;
  border-radius: 14px;
  overflow:hidden;
  border:1px solid var(--stroke);
  background: rgba(0,0,0,.18);
}
.thumb img, .thumb video{
  width:100%;
  height:160px;
  object-fit:cover;
  display:block;
}
.thumb .meta{
  position:absolute; left:0; right:0; bottom:0;
  padding:8px 10px;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.78));
  font-size:12px;
  display:flex; justify-content:space-between; gap:10px;
}
.thumb .del{
  position:absolute; right:8px; top:8px;
  background: rgba(0,0,0,.55);
  border:1px solid rgba(255,255,255,.12);
  color:white;
  padding:6px 9px;
  border-radius: 10px;
  cursor:pointer;
}
.thumb .del:hover{
  background: rgba(229,9,20,.35);
  border-color: rgba(229,9,20,.35);
}

/* uploader */
.dropzone{
  border:2px dashed rgba(229,9,20,.35);
  border-radius: 14px;
  padding:18px;
  text-align:center;
  background: rgba(0,0,0,.18);
}
.dropzone.drag{ background: rgba(229,9,20,.08); }
.progress{
  height:10px; background: rgba(255,255,255,.08);
  border-radius: 999px; overflow:hidden; margin-top:10px;
}
.progress > div{ height:100%; width:0%; background: var(--red); transition: width .1s ease; }

/* modals */
.modal{
  position:fixed; inset:0; z-index:200;
  background: rgba(0,0,0,.72);
  display:none;
  align-items:center; justify-content:center;
  padding:18px;
}
.modal.open{display:flex}
.modal .box{
  width:min(1100px, 96vw);
  max-height: 90vh;
  overflow:auto;
  background: rgba(10,14,24,.92);
  border:1px solid rgba(255,255,255,.10);
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0,0,0,.60);
  padding:14px;
}
.modal .top{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  margin-bottom:12px;
}
.modal .viewer{
  display:flex; align-items:center; justify-content:center;
  background: rgba(0,0,0,.25);
  border-radius: 14px;
  border:1px solid rgba(255,255,255,.08);
  overflow:hidden;
  min-height: 320px;
}
.modal .viewer img, .modal .viewer video{
  max-width: 100%;
  max-height: 70vh;
  display:block;
}


/* ===== App Shell (YouTube-like) ===== */
.app-shell{display:flex;min-height:100vh;background:var(--bg);color:var(--text)}
.sidebar{position:sticky;top:0;height:100vh;width:260px;flex:0 0 260px;background:rgba(10,14,26,.82);border-right:1px solid var(--stroke);backdrop-filter: blur(12px);padding:14px 12px;display:flex;flex-direction:column;gap:10px;z-index:30}
.side-top{display:flex;align-items:center;justify-content:space-between;gap:10px}
.brand{display:flex;align-items:center;gap:10px;color:var(--text);text-decoration:none}
.brand .logo{height:28px;width:auto;max-width:28px;display:block;object-fit:contain}
.brandtxt{font-weight:800;letter-spacing:.2px}
.iconbtn{background:transparent;border:1px solid var(--stroke);color:var(--text);border-radius:12px;padding:8px 10px;cursor:pointer}
.iconbtn:hover{background:rgba(255,255,255,.06)}
.msgbtn{position:relative;display:inline-flex;align-items:center;justify-content:center}
.badge{position:absolute;top:-6px;right:-6px;min-width:18px;height:18px;padding:0 6px;border-radius:999px;background:#22c55e;color:#06100a;font-weight:900;font-size:11px;display:inline-flex;align-items:center;justify-content:center;border:2px solid rgba(5,7,12,.95)}
.snav{display:flex;flex-direction:column;gap:6px;margin-top:8px}
.snav-item{display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:14px;color:var(--text);text-decoration:none;border:1px solid transparent}
.snav-item svg{width:20px;height:20px;fill:currentColor;opacity:.92}
.snav-item:hover{background:rgba(255,255,255,.06);border-color:rgba(255,255,255,.06)}
.snav-item.active{background:rgba(229,9,20,.14);border-color:rgba(229,9,20,.25)}
.side-bottom{margin-top:auto;display:flex;flex-direction:column;gap:8px}
.side-guest{margin-top:20px;padding:10px 12px;border:1px solid var(--stroke);border-radius:14px;background:rgba(255,255,255,.03)}

.main{flex:1;min-width:0;display:flex;flex-direction:column}
.topbar{position:sticky;top:0;z-index:25;height:var(--navH);display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 16px;background:rgba(6,10,18,.72);border-bottom:1px solid var(--stroke);backdrop-filter: blur(10px)}
.top-left{display:flex;align-items:center;gap:12px;min-width:0;flex:1}
.searchbox{flex:1;min-width:0}
.searchbox input{width:100%;max-width:720px;background:rgba(255,255,255,.05);border:1px solid var(--stroke);border-radius:999px;padding:10px 14px;color:var(--text);outline:none}
.searchbox input:disabled{opacity:.55}
.top-right{display:flex;align-items:center;gap:10px;flex:0 0 auto}
.avatar-sm{width:32px;height:32px;border-radius:999px;object-fit:cover;border:1px solid rgba(255,255,255,.12)}
.profile-menu{position:relative}
.profile-btn{display:flex;align-items:center;gap:10px;border:1px solid var(--stroke);background:rgba(255,255,255,.04);border-radius:999px;padding:7px 10px;color:var(--text);cursor:pointer}
.profile-btn:hover{background:rgba(255,255,255,.07)}
.profile-btn .chev{opacity:.8}
.profile-dd{position:absolute;right:0;top:calc(100% + 10px);min-width:220px;background:rgba(12,18,32,.92);border:1px solid var(--stroke);border-radius:16px;box-shadow:var(--shadow);padding:8px;display:none}
.profile-dd a{display:block;padding:10px 12px;border-radius:12px;color:var(--text);text-decoration:none}
.profile-dd a:hover{background:rgba(255,255,255,.06)}
.profile-dd .dd-sep{height:1px;background:var(--stroke);margin:6px 6px}
.profile-dd a.danger{color:#ffb4b4}
.content{padding:18px 16px;flex:1;min-width:0}

/* Mobile behavior */
.mobile-toggle{display:none}
@media (max-width: 980px){
  .sidebar{position:fixed;left:-280px;top:0;transition:left .2s ease;box-shadow:var(--shadow)}
  .sidebar.open{left:0}
  .mobile-toggle{display:inline-flex}
}
@media (max-width: 520px){
  .brandtxt{display:none}
  .topbar{padding:10px 12px}
  .pill{display:none}
}


/* Instagram-like grids */
.pagehead{display:flex;align-items:flex-end;justify-content:space-between;gap:14px;flex-wrap:wrap;margin-bottom:14px}
.h1{font-size:22px;font-weight:900;letter-spacing:.2px}
.pagehead-actions{display:flex;gap:10px;flex-wrap:wrap}
.feed-grid{display:flex;flex-direction:column;gap:18px;max-width:640px;margin:0 auto}
@media (max-width: 900px){.feed-grid{max-width:600px}}
@media (max-width: 720px){.feed-grid{max-width:520px}}
@media (max-width: 420px){.feed-grid{max-width:100%}}
.postcard{display:block;text-decoration:none;color:var(--text);border:1px solid var(--stroke);border-radius:16px;overflow:hidden;background:rgba(255,255,255,.03);position:relative}
.postcard:hover{transform:translateY(-1px);transition:.15s ease;box-shadow:0 10px 24px rgba(0,0,0,.35)}
.pm{aspect-ratio:1/1;background:rgba(0,0,0,.35);position:relative}
.pm img,.pm video{width:100%;height:100%;object-fit:cover;display:block}
.pm-shadow{position:absolute;inset:0;background:linear-gradient(to bottom, transparent 55%, rgba(0,0,0,.55));pointer-events:none}
.pmeta{display:flex;align-items:center;gap:10px;padding:10px 10px 12px}
.pava{width:34px;height:34px;border-radius:999px;object-fit:cover;border:1px solid rgba(255,255,255,.12)}
.ptitle{font-weight:800;font-size:13px;line-height:1.1}
.vbadge{display:inline-flex;align-items:center;justify-content:center;font-size:12px;margin-left:6px;background:rgba(0,190,255,.16);border:1px solid rgba(0,190,255,.24);border-radius:999px;padding:1px 6px}

.ig-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
@media (max-width: 820px){.ig-grid{grid-template-columns:repeat(2,1fr)}}
@media (max-width: 420px){.ig-grid{grid-template-columns:repeat(1,1fr)}}
.ig-item{display:block;aspect-ratio:1/1;border-radius:14px;overflow:hidden;border:1px solid var(--stroke);background:rgba(255,255,255,.03);position:relative}
.ig-item img,.ig-item video{width:100%;height:100%;object-fit:cover;display:block}
.ig-overlay{position:absolute;right:8px;top:8px;background:rgba(0,0,0,.55);border:1px solid rgba(255,255,255,.12);border-radius:999px;padding:4px 8px;font-size:12px}

/* Live page */
.live-layout{display:grid;grid-template-columns:1.6fr .9fr;gap:14px}
@media (max-width: 980px){.live-layout{grid-template-columns:1fr}}
.live-preview{width:100%;max-height:520px;background:rgba(0,0,0,.4);border:1px solid var(--stroke);border-radius:16px}
.admin-results{display:flex;flex-direction:column;gap:10px}
.admin-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;border:1px solid var(--stroke);border-radius:16px;background:rgba(255,255,255,.03)}
.admin-left{display:flex;align-items:center;gap:10px}
.notice{padding:10px 12px;border-radius:14px;border:1px solid var(--stroke);margin:10px 0}
.notice.ok{background:rgba(34,197,94,.12);border-color:rgba(34,197,94,.24)}
.notice.err{background:rgba(239,68,68,.12);border-color:rgba(239,68,68,.24)}


/* ReDone (DaVinci-like layout) */
.redone-shell{display:flex;flex-direction:column;gap:12px}
.redone-menubar{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.redone-main{display:grid;grid-template-columns:320px 1fr 320px;gap:12px;min-height:60vh}
@media (max-width: 1180px){.redone-main{grid-template-columns:280px 1fr}}
@media (max-width: 980px){.redone-main{grid-template-columns:1fr}}
.redone-left,.redone-right{min-height:520px}
.pool-list{margin-top:12px;display:flex;flex-direction:column;gap:8px;max-height:64vh;overflow:auto;padding-right:4px}
.pool-item{display:grid;grid-template-columns:56px 1fr;gap:10px;align-items:center;text-align:left;background:rgba(255,255,255,.03);border:1px solid var(--stroke);border-radius:14px;padding:8px;cursor:pointer;color:var(--text)}
.pool-item:hover{background:rgba(255,255,255,.06)}
.pool-thumb{width:56px;height:56px;border-radius:12px;overflow:hidden;border:1px solid rgba(255,255,255,.10);background:rgba(0,0,0,.35)}
.pool-thumb img,.pool-thumb video{width:100%;height:100%;object-fit:cover;display:block}
.pool-name{font-size:13px;font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.redone-view .viewer-box{margin-top:10px;min-height:300px;display:flex;align-items:center;justify-content:center;border:1px dashed rgba(255,255,255,.14);border-radius:16px;background:rgba(0,0,0,.18);padding:12px}
.redone-timeline{margin-top:12px}
.ins-controls{display:flex;flex-direction:column;gap:8px;margin-top:10px}
.ins-controls label{font-size:12px;color:var(--muted)}


/* IG-like profile */
.ig-profile{max-width:1100px;margin:0 auto}
.ig-head{display:grid;grid-template-columns:170px 1fr;gap:22px;align-items:start}
.ig-ava-wrap{display:flex;justify-content:center}
.ig-ava{width:150px;height:150px;border-radius:50%;object-fit:cover;border:2px solid rgba(255,255,255,.12)}
.ig-row1{display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.ig-handle{font-size:22px;font-weight:900;display:flex;align-items:center;gap:8px}
.ig-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.ig-stats{display:flex;gap:22px;margin-top:12px;color:rgba(233,238,252,.9)}
.ig-bio{margin-top:12px}
.ig-name{font-weight:900}
.ig-biotxt{opacity:.9;margin-top:4px}
.ig-link a{color:var(--text);opacity:.85;text-decoration:none}
.ig-link a:hover{opacity:1}
.ig-live{margin-top:8px;color:#ffb3b3;font-weight:800;display:flex;gap:8px;align-items:center}
.live-dot{color:#e50914}
.ig-divider{height:1px;background:rgba(255,255,255,.08);margin:18px 0}
.ig-grid{display:grid;grid-template-columns:repeat(3, minmax(0,1fr));gap:6px}
.ig-tile{position:relative;display:block;aspect-ratio:1/1;overflow:hidden;border-radius:12px;background:rgba(255,255,255,.04)}
.ig-tile img,.ig-tile video{width:100%;height:100%;object-fit:cover;display:block}
.ig-ico{position:absolute;right:10px;top:10px;background:rgba(0,0,0,.55);border:1px solid rgba(255,255,255,.12);backdrop-filter:blur(8px);padding:4px 8px;border-radius:10px;font-weight:900}
.ig-lock{position:absolute;left:10px;top:10px;background:rgba(0,0,0,.55);border:1px solid rgba(255,255,255,.12);backdrop-filter:blur(8px);padding:4px 8px;border-radius:10px}
@media (max-width:860px){.ig-head{grid-template-columns:110px 1fr}.ig-ava{width:96px;height:96px}.ig-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (max-width:520px){.ig-stats{gap:12px;font-size:13px}.ig-grid{gap:4px}.ig-tile{border-radius:10px}}

/* IG-like post */
.igpost-head{display:flex;align-items:center;gap:10px;margin-bottom:10px}
.igpost-user{display:flex;align-items:center;gap:10px;text-decoration:none;color:inherit;min-width:0}
.igpost-ava{width:38px;height:38px;border-radius:14px;object-fit:cover;border:1px solid rgba(255,255,255,.10)}
.igpost-name{font-weight:900}
.igpost-actions{display:flex;gap:10px;align-items:center;margin-top:12px;flex-wrap:wrap}
.ig-heart{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%) scale(.6);opacity:0;pointer-events:none;font-size:84px;color:rgba(255,255,255,.95);text-shadow:0 18px 50px rgba(0,0,0,.55)}
.ig-heart.show{animation:igHeart .75s ease-out 1}
@keyframes igHeart{0%{opacity:0;transform:translate(-50%,-50%) scale(.4)}20%{opacity:1;transform:translate(-50%,-50%) scale(1)}100%{opacity:0;transform:translate(-50%,-50%) scale(1.2)}}


/* Search dropdown */
.searchbox{position:relative;max-width:520px;width:100%}
.search-results{position:absolute;left:0;right:0;top:46px;z-index:50;background:rgba(12,18,32,.92);border:1px solid rgba(255,255,255,.10);border-radius:14px;box-shadow:0 18px 48px rgba(0,0,0,.55);overflow:hidden}
.search-results a{display:flex;gap:10px;align-items:center;padding:10px 12px;color:var(--text);text-decoration:none}
.search-results a:hover{background:rgba(255,255,255,.06)}
.search-results .sr-ava{width:34px;height:34px;border-radius:12px;object-fit:cover;border:1px solid rgba(255,255,255,.12)}
.search-results .sr-title{font-weight:900}
.search-results .sr-sub{font-size:12px;opacity:.7}
.search-results .sr-sep{height:1px;background:rgba(255,255,255,.08);margin:6px 0}


/* Comments */
.citem{display:flex;gap:10px;padding:10px 0;border-top:1px solid rgba(255,255,255,.08)}
.citem:first-child{border-top:none}
.cava{width:34px;height:34px;border-radius:12px;object-fit:cover;border:1px solid rgba(255,255,255,.10)}
.cbody{flex:1;min-width:0}
.ctop{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.ctxt{opacity:.92;line-height:1.35;margin-top:4px;word-break:break-word}


/* Stories */
.stories-bar{display:flex;gap:14px;overflow:auto;padding:10px 2px 16px 2px;scrollbar-width:none}
.stories-bar::-webkit-scrollbar{display:none}
.story-chip{display:flex;flex-direction:column;align-items:center;gap:8px;min-width:78px;text-decoration:none;color:var(--text)}
.story-ava{width:62px;height:62px;border-radius:999px;object-fit:cover;border:2px solid rgba(229,9,20,.7);box-shadow:0 10px 24px rgba(0,0,0,.35)}
.story-ava.add{display:flex;align-items:center;justify-content:center;background:rgba(255,255,255,.06);border:2px dashed rgba(255,255,255,.18);font-weight:900;font-size:22px}

/* Floating Messages button (Instagram-like) */
.msg-fab{position:fixed;right:22px;bottom:22px;z-index:60;display:flex;align-items:center;gap:10px;text-decoration:none;color:var(--text);padding:12px 14px;border-radius:999px;background:rgba(12,18,32,.82);border:1px solid rgba(255,255,255,.12);box-shadow:0 16px 40px rgba(0,0,0,.55);backdrop-filter:blur(10px)}
.msg-fab:hover{background:rgba(12,18,32,.92)}
@media (max-width:520px){.msg-fab{right:14px;bottom:14px;padding:10px 12px;font-size:13px}}


/* Messages */
.chatlist{display:flex;flex-direction:column;gap:8px}
.chatrow{width:100%;display:flex;gap:10px;align-items:center;padding:10px;border-radius:14px;border:1px solid rgba(255,255,255,.10);background:rgba(255,255,255,.03);cursor:pointer;text-align:left}
.chatrow:hover{background:rgba(255,255,255,.06)}
.chatava{width:38px;height:38px;border-radius:14px;object-fit:cover;border:1px solid rgba(255,255,255,.10)}
.chatmeta{min-width:0}
.chatname{font-weight:900;display:flex;align-items:center;justify-content:space-between;gap:10px}
.chatname .cname{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.chatname .ctime{font-size:12px;opacity:.75;font-weight:800}
.chatsub{font-size:12px;opacity:.7;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:220px}
.ubadge{margin-left:auto;min-width:22px;height:22px;padding:0 7px;border-radius:999px;background:#22c55e;color:#06100a;font-weight:900;font-size:12px;display:inline-flex;align-items:center;justify-content:center}
.chatbox{height:420px;overflow:auto;border:1px solid rgba(255,255,255,.08);border-radius:14px;padding:10px;background:rgba(0,0,0,.18)}
.bubble{max-width:76%;padding:10px 12px;border-radius:14px;margin:8px 0;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.10)}
.bubble.me{margin-left:auto;background:rgba(229,9,20,.16);border-color:rgba(229,9,20,.35)}
/* Messenger-like layout (3 columns) */
.msg-shell{display:grid;grid-template-columns:320px 1fr 300px;gap:14px;max-width:1200px;margin:0 auto}
.msg-left-top{display:flex;flex-direction:column;gap:10px;margin-bottom:10px}
.msg-search{width:100%;padding:10px 12px;border-radius:999px;border:1px solid rgba(255,255,255,.10);background:rgba(0,0,0,.25);color:var(--text)}
.msg-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-bottom:10px;border-bottom:1px solid rgba(255,255,255,.08)}
.msg-peer-ava{width:40px;height:40px;border-radius:16px;object-fit:cover;border:1px solid rgba(255,255,255,.10)}
.msg-peer-name{font-weight:900;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.msg-compose{display:flex;gap:10px;align-items:flex-end;margin-top:10px}
.msg-compose textarea{flex:1;min-height:44px;max-height:120px;padding:10px 12px;border-radius:16px;border:1px solid rgba(255,255,255,.10);background:rgba(0,0,0,.25);color:var(--text)}
.msg-right-card{display:flex;flex-direction:column;align-items:center;gap:10px;padding:8px}
.msg-right-ava{width:84px;height:84px;border-radius:32px;object-fit:cover;border:1px solid rgba(255,255,255,.10)}
.msg-right-name{font-weight:900}
.msg-right-pill{padding:8px 12px;border-radius:999px;border:1px solid rgba(255,255,255,.10);background:rgba(255,255,255,.05);font-size:12px;opacity:.9}
.msg-right-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:center}
.bubble .btime{margin-top:6px;font-size:11px;opacity:.7}
.bubble .batt{display:block;margin-top:8px;text-decoration:none;color:inherit}
.bubble .batt img{max-width:280px;border-radius:14px;border:1px solid rgba(255,255,255,.10)}

@media (max-width:1020px){.msg-shell{grid-template-columns:320px 1fr}.msg-right{display:none}}
@media (max-width:720px){.msg-shell{grid-template-columns:1fr}.msg-left{display:none}.chatbox{height:60vh}}

/* IG-like comment input */
.comment-input{
  width:100%;
  resize:none;
  min-height:44px;
  max-height:120px;
  padding:12px 12px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  color: var(--text);
  outline:none;
}
body[data-theme="light"] .comment-input{
  border:1px solid rgba(0,0,0,.12);
  background: rgba(0,0,0,.03);
  color: var(--text);
}

/* Floating messages badge */
.fab-badge{
  margin-left:8px;
  background:#22c55e;
  color:#03110a;
  font-weight:900;
  font-size:12px;
  border-radius:999px;
  padding:2px 8px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}


/* Instagram-like feed cards (UI only) */
.ig-card{border:1px solid var(--stroke);border-radius:18px;overflow:hidden;background:rgba(255,255,255,.03);box-shadow:0 10px 24px rgba(0,0,0,.25)}
.ig-head{display:flex;align-items:center;gap:10px;padding:12px 14px;background:linear-gradient(to bottom, rgba(255,255,255,.03), transparent)}
.ig-ava{width:38px;height:38px;border-radius:999px;object-fit:cover;border:1px solid rgba(255,255,255,.14)}
.ig-who{min-width:0}
.ig-name{font-weight:850;font-size:14px;line-height:1.1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ig-handle{font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ig-more{margin-left:auto;color:var(--muted);font-weight:900;letter-spacing:2px}
.ig-media{background:rgba(0,0,0,.35)}
.ig-media img,.ig-media video{width:100%;height:auto;display:block;max-height:78vh;object-fit:cover}
.ig-foot{padding:10px 14px 14px}
.ig-actions{display:flex;align-items:center;gap:12px;font-size:18px}
.ig-ic{opacity:.92}
.ig-save{margin-left:auto}
.ig-meta{margin-top:8px;color:var(--muted)}
/* Make anchor postcard wrap look clean */
a.postcard{border:none;background:transparent;box-shadow:none}
a.postcard:hover{transform:none}


/* Followers/Following modal list */
.modal-list{max-width:760px;margin:22px auto;padding:16px;border:1px solid var(--stroke);border-radius:18px;background:var(--panel);box-shadow:var(--shadow)}
.ml-head{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:12px}
.ml-title{font-size:18px;font-weight:900;letter-spacing:.2px}
.ml-sub{color:var(--muted);font-size:13px;margin-top:2px}
.ml-search{width:100%;padding:12px 14px;border-radius:14px;border:1px solid var(--stroke);background:rgba(255,255,255,.04);color:var(--text);outline:none}
body[data-theme="light"] .ml-search{background:rgba(0,0,0,.03)}
.ml-body{margin-top:12px;max-height:min(66vh,720px);overflow:auto;border-radius:14px}
.ml-item{display:flex;align-items:center;gap:12px;padding:12px 12px;border-radius:14px;text-decoration:none;color:var(--text)}
.ml-item:hover{background:rgba(255,255,255,.04)}
body[data-theme="light"] .ml-item:hover{background:rgba(0,0,0,.04)}
.ml-ava{width:42px;height:42px;border-radius:999px;object-fit:cover;border:1px solid rgba(255,255,255,.14);flex:0 0 auto}
.ml-meta{min-width:0}
.ml-user{font-weight:850;font-size:14px;display:flex;align-items:center;gap:6px}
.ml-name{font-size:12px;line-height:1.2;margin-top:2px}

/* Comment input blend + non-resizable */
textarea{resize:none}
.commentbox textarea,.commentbox input[type="text"],.commentbox .input{background:rgba(255,255,255,.04);border:1px solid var(--stroke);color:var(--text);border-radius:14px;outline:none}
body[data-theme="light"] .commentbox textarea{background:rgba(0,0,0,.03)}
.commentbox textarea:focus{box-shadow:0 0 0 3px rgba(229,9,20,.20);border-color:rgba(229,9,20,.35)}



/* ===== UI polish additions (v7) ===== */
.iconbtn.createbtn{
  width:40px;height:40px;display:inline-flex;align-items:center;justify-content:center;
  border-radius:999px;border:1px solid rgba(255,255,255,.10);
  background:rgba(12,18,32,.55);
  font-size:22px;line-height:1;color:var(--text);
  transition:transform .15s ease, background .15s ease, border-color .15s ease;
}
.iconbtn.createbtn:hover{ transform:translateY(-1px); background:rgba(12,18,32,.75); border-color:rgba(255,255,255,.18); }
.iconbtn.createbtn:active{ transform:translateY(0px) scale(.98); }

/* Upload modal layout (YouTube-ish calm) */
#uploadModal .box{ max-width:980px; width:min(980px, calc(100vw - 28px)); }
#uploadModal textarea#uploadCaption{
  resize:none; border-radius:14px; padding:12px 12px; 
  border:1px solid rgba(255,255,255,.10); background:rgba(8,12,22,.55); color:var(--text);
}
#uploadModal input[type="file"]{ max-width:360px; }
#uploadModal .dropzone{
  border:1px dashed rgba(229,9,20,.45);
  background:rgba(8,12,22,.35);
  border-radius:18px;
  padding:26px;
  min-height:96px;
}
#uploadModal .top .small{ opacity:.75; }

/* Comments input (blend, not resizable) */
textarea.comment-input, .comment-input textarea{
  resize:none !important;
  background:rgba(8,12,22,.55);
  border:1px solid rgba(255,255,255,.10);
  color:var(--text);
  border-radius:14px;
}

/* Post media fit */
.post-media img, .post-media video{
  width:100%;
  height:auto;
  display:block;
}


/* Comments inline (IG-like) */
.ig-comments{ margin-top:10px; padding-top:8px; border-top:1px solid rgba(255,255,255,.06); }
.cmtrow{ display:flex; align-items:flex-start; justify-content:space-between; gap:10px; padding:6px 0; }
.cmtmain{ min-width:0; }
.cmtwho{ font-weight:700; font-size:12px; color:rgba(233,238,252,.92); }
.cmtbody{ display:block; font-size:13px; color:rgba(233,238,252,.78); margin-top:2px; white-space:normal; word-break:break-word; }
.cmtactions{ display:flex; align-items:center; gap:8px; flex:0 0 auto; }
.cmtlike,.cmtpin{ background:transparent; border:0; color:rgba(233,238,252,.8); cursor:pointer; padding:4px 6px; border-radius:10px; }
.cmtlike:hover,.cmtpin:hover{ background:rgba(255,255,255,.06); }
.cmtlikes{ font-size:12px; color:rgba(233,238,252,.62); min-width:18px; text-align:right; }
.pinbadge{ margin-left:6px; font-size:12px; opacity:.85; }
