:root {
  --bg:#0d1117;
  --card:#161b22;
  --border:rgba(201,209,217,0.12);
  --text:#c9d1d9;
  --text-muted:rgba(201,209,217,0.75);
  --green:#2ea043;
  --green-hover:#3fb950;
  --danger:#f85149;
  --warn:#d29922;
  --info:#58a6ff;
}
* { box-sizing: border-box; }
body {
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif;
}
.container { width:min(1200px, 95vw); margin:0 auto; }

.nav {
  position: sticky; top:0; z-index: 20;
  height:56px; display:flex; align-items:center;
  background:var(--bg);
  border-bottom:1px solid var(--border);
}
.nav-row { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.brand { display:inline-flex; align-items:center; gap:8px; color:var(--text); text-decoration:none; font-weight:600; }
.brand img { width:22px; height:22px; border-radius:6px; }
.nav-center { flex:1; display:flex; justify-content:center; }
.nav-links { display:flex; gap:18px; }
.nav-link { color:var(--text); text-decoration:none; font-weight:600; position:relative; padding:6px 0; }
.nav-link.active::after { content:""; position:absolute; left:0; right:0; bottom:-8px; height:2px; background:var(--green); border-radius:2px; }
.nav-right { position:relative; }
.profile-trigger { display:inline-flex; align-items:center; gap:6px; background:transparent; border:1px solid var(--border); color:var(--text); padding:4px 8px; border-radius:8px; cursor:pointer; }
.nav-avatar { width:28px; height:28px; border-radius:50%; background:#0b0f14; border:1px solid var(--border); display:inline-block; background-size:cover; background-position:center; }
.caret { font-size:12px; color:var(--text-muted); }
.profile-menu { position:absolute; right:0; top:44px; background:var(--card); border:1px solid var(--border); border-radius:10px; min-width:180px; padding:6px; display:none; }
.profile-menu.show { display:block; }
.menu-item { display:block; width:100%; text-align:left; padding:8px 10px; border-radius:8px; color:var(--text); text-decoration:none; background:transparent; border:0; cursor:pointer; }
.menu-item:hover { background: rgba(201,209,217,0.06); }
.menu-item.danger { color:var(--danger); }

.card {
  background:var(--card);
  border:1px solid var(--border);
  border-radius:12px;
  padding:16px;
  box-shadow:none;
}

.btn {
  border:1px solid rgba(201,209,217,0.18);
  background:transparent;
  color:var(--text);
  padding:8px 12px;
  border-radius:8px;
  cursor:pointer;
  font-weight:600;
}
.btn:hover { background: rgba(201,209,217,0.06); }
.btn-primary {
  background:var(--green);
  color:#0d1117;
  border-color:var(--green);
}
.btn-primary:hover { background:var(--green-hover); border-color:var(--green-hover); }
.btn-danger {
  border-color: rgba(248,81,73,0.45);
  color: var(--danger);
}
.btn-danger:hover { background: rgba(248,81,73,0.08); }

.input, textarea, input[type=file] {
  width:100%;
  background:var(--bg);
  border:1px solid rgba(201,209,217,0.18);
  color:var(--text);
  padding:10px;
  border-radius:8px;
}
.input::placeholder, textarea::placeholder { color: rgba(201,209,217,0.45); }
.input:focus, textarea:focus, input[type=file]:focus {
  outline: none;
  border-color: var(--info);
  box-shadow: 0 0 0 3px rgba(88,166,255,0.15);
}

.muted { color:var(--text-muted); }
.error { color:var(--danger); }
.success { color:var(--green); }

.app-grid { display:grid; grid-template-columns: 1fr; gap:24px; padding:24px 16px; }
.feed-shell { max-width: 680px; width:100%; margin: 0 auto; }
.sidebar { display:none; width:100%; }
.sidebar .card { padding:14px; }
.sidebar .title { font-weight:600; margin-bottom:8px; }
.composer {
  display:flex; align-items:center; gap:12px;
  background:var(--card);
  border:1px solid var(--border);
  padding:12px 14px; border-radius:12px; margin-bottom:16px;
}
.avatar { width:32px; height:32px; border-radius:50%; background:#0b0f14; border:1px solid var(--border); display:inline-block; background-size:cover; background-position:center; }
.avatar-link { display:inline-flex; align-items:center; }
.avatar-link:visited { color:inherit; }
.badge-verified {
  display:inline-flex; align-items:center; justify-content:center;
  width:16px; height:16px; border-radius:50%;
  background:#58a6ff; color:#fff; margin:0; flex:0 0 auto;
}
.badge-verified svg { width:10px; height:10px; }
.username-badge { display:inline-flex; align-items:center; gap:4px; color:var(--text); text-decoration:none; }
.username-badge:visited { color:var(--text); }
.username-badge:hover { text-decoration:underline; }
.post-caption .username-badge { margin-right:6px; }

.verified-page { max-width: 720px; margin: 24px auto; padding: 0 16px; }
.verified-hero h1 { margin:0; font-size:1.4rem; }
.verified-header { display:flex; align-items:center; gap:12px; }
.verified-header .badge-verified { width:28px; height:28px; font-size:14px; }
.verified-benefits { margin-top:12px; display:grid; gap:6px; color:var(--text-muted); }
.verified-actions { margin-top:16px; display:flex; gap:10px; flex-wrap:wrap; }
.verified-feedback { text-align:center; padding:24px; display:grid; gap:10px; }

.toast {
  position: fixed; right: 20px; bottom: 20px; z-index: 80;
  background: var(--card); border:1px solid var(--border); color: var(--text);
  padding: 10px 12px; border-radius: 8px; display:none;
}
.toast.show { display:block; }

.comments-list { display:grid; gap:10px; }
.comment-item { padding:8px; border:1px solid var(--border); border-radius:8px; background:var(--bg); }
.comment-form { display:flex; gap:8px; align-items:center; }
.comment-form .input { flex:1; }

.explore-page { max-width: 900px; margin: 24px auto; padding: 0 16px; }
.explore-header h1 { margin:0 0 6px; font-size:1.4rem; }
.explore-grid { display:grid; grid-template-columns: repeat(2, 1fr); gap:16px; }
.explore-box { padding:16px; }
.explore-box-row { display:grid; grid-template-columns: repeat(2, 1fr); gap:16px; }
.explore-col { display:grid; gap:10px; }
.explore-list { display:grid; gap:12px; margin-top:10px; }
.explore-row { display:flex; align-items:center; gap:10px; }
.explore-row .avatar {
  width:44px; height:44px; border-radius:50%;
  background:#0b0f14; border:1px solid var(--border);
  background-size:cover; background-position:center;
  flex:0 0 44px; display:inline-block;
}
.explore-info { flex:1; }
.card-title { font-weight:600; }

@media (max-width: 820px) {
  .explore-grid { grid-template-columns: 1fr; }
  .explore-box-row { grid-template-columns: 1fr; }
}
.composer-input { flex:1; background:var(--bg); border:1px solid var(--border); border-radius:8px; padding:8px 10px; color:var(--text-muted); cursor:pointer; }
.composer-input:hover { border-color: rgba(201,209,217,0.24); }
.composer .btn { height:34px; padding:0 12px; }

.feed-list { display:grid; gap:16px; }
.post-card {
  background:var(--card);
  border:1px solid var(--border);
  border-radius:12px;
  overflow:hidden;
}
.fade-in { animation: fadeInCard 0.3s ease; }
@keyframes fadeInCard { from { opacity:0; transform: translateY(6px);} to { opacity:1; transform: translateY(0);} }
.post-card:hover { background: rgba(201,209,217,0.03); }
.post-header { display:flex; align-items:center; justify-content:space-between; padding:12px 14px; border-bottom:1px solid var(--border); }
.post-user { display:flex; align-items:center; gap:10px; }
.post-user a { color:var(--text); text-decoration:none; font-weight:600; }
.post-time { color:var(--text-muted); font-size:0.8rem; }
.post-media { position:relative; background:#0d1117; display:grid; place-items:center; max-height:520px; overflow:hidden; }
.post-media img { width:100%; height:auto; max-height:520px; object-fit:contain; display:block; }
.post-image { width:100%; border-radius:12px; margin-top:10px; object-fit:cover; max-height:600px; }
.heart-burst { position:absolute; inset:0; display:grid; place-items:center; pointer-events:none; opacity:0; transform:scale(0.8); }
.heart-burst.show { animation: heartPop 0.8s ease forwards; }
@keyframes heartPop { 0%{opacity:0;transform:scale(0.7);} 30%{opacity:0.9;transform:scale(1.15);} 100%{opacity:0;transform:scale(1.4);} }

.post-actions { display:flex; align-items:center; gap:12px; padding:10px 14px; }
.icon-btn {
  display:inline-flex; align-items:center; gap:6px;
  padding:4px; border-radius:8px; border:0;
  background:transparent; color:var(--text-muted); cursor:pointer;
}
.icon-btn:hover { color:var(--text); }
.icon-btn.liked { color:var(--green); }
.icon-btn.liked svg path { stroke: var(--green); fill: var(--green); }
.icon-btn.pop { animation: likePop 0.25s ease; }
@keyframes likePop { 0%{transform:scale(1);} 50%{transform:scale(1.12);} 100%{transform:scale(1);} }

.post-counts { padding:0 14px 6px; color:var(--text-muted); font-size:0.85rem; }
.post-caption { padding:0 14px 10px; color:var(--text); }
.post-caption .u { font-weight:600; margin-right:6px; }
.post-comments-link { padding:0 14px 12px; color:var(--info); font-size:0.85rem; cursor:pointer; }

.skeleton {
  height:360px; border-radius:12px; background: linear-gradient(90deg, #161b22, #1a2028, #161b22);
  background-size: 200% 100%; animation: shimmer 1.2s linear infinite; border:1px solid var(--border);
}
@keyframes shimmer { 0%{ background-position:0 0;} 100%{ background-position:-200% 0;} }

.feed-error {
  padding:14px; border:1px solid rgba(248,81,73,0.4); color:var(--danger); border-radius:12px;
  background: rgba(248,81,73,0.08);
}

.modal-backdrop { position:fixed; inset:0; background:rgba(0,0,0,0.6); display:none; place-items:center; z-index:50; }
.modal-backdrop.show { display:grid; animation: fadeIn 0.2s ease; }
.modal {
  width:min(720px, 92vw); background:var(--card); border:1px solid var(--border); border-radius:12px;
  padding:16px; transform:translateY(8px); animation: modalIn 0.2s ease forwards;
}
.modal-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; }
.modal-title { font-weight:600; }
.modal-body { display:grid; gap:10px; }
.preview { width:100%; height:260px; border:1px dashed var(--border); border-radius:12px; display:grid; place-items:center; color:var(--text-muted); overflow:hidden; background:var(--bg); }
.preview img { width:100%; height:100%; object-fit:contain; }
.modal-actions { display:flex; gap:10px; justify-content:flex-end; }
.inline-error { color:var(--danger); font-size:0.9rem; }

@keyframes fadeIn { from{opacity:0;} to{opacity:1;} }
@keyframes modalIn { to{transform:translateY(0);} }

@media (max-width: 640px) {
  .post-actions { gap:6px; flex-wrap:wrap; }
  .icon-btn { padding:6px 8px; }
}

@media (min-width: 1100px) {
  .app-grid { grid-template-columns: 680px 320px; justify-content:center; align-items:start; }
  .sidebar { display:block; }
}

.auth-body .nav { display:none; }
.auth-body main { padding: 32px 0 56px; }
.auth-page { max-width: 420px; margin: 0 auto; text-align: center; }
.auth-logo { margin: 8px 0 16px; }
.auth-logo img { width: 72px; height: 72px; }
.auth-title { font-size: 24px; font-weight: 600; margin: 0 0 16px; }
.auth-card { background: var(--card); border:1px solid var(--border); border-radius: 8px; padding: 16px; text-align: left; }
.auth-card-alt { margin-top: 16px; text-align: center; }
.auth-label { display:block; font-size: 14px; margin: 8px 0 6px; color: var(--text); }
.auth-input { height: 40px; font-size: 14px; }
.auth-row { display:flex; align-items:center; justify-content:space-between; margin-top: 6px; }
.auth-link { color: var(--info); text-decoration: none; font-size: 12.5px; }
.auth-link:hover { text-decoration: underline; }
.auth-submit { width: 100%; height: 40px; margin-top: 14px; }
.auth-divider { margin: 16px 0; position: relative; color: var(--text-muted); font-size: 12px; }
.auth-divider::before, .auth-divider::after { content: ""; position: absolute; top: 50%; width: 45%; height: 1px; background: var(--border); }

/* Landing page */
.landing-body .nav { display:none; }
.landing-body main.container { width:100%; max-width:none; padding:0; }
.landing-header {
  position: fixed; top:0; left:0; right:0; height:56px;
  background: var(--bg); border-bottom:1px solid var(--border); z-index:30;
}
.landing-header-inner {
  max-width:1200px; margin:0 auto; height:100%;
  display:flex; align-items:center; justify-content:space-between; padding:0 16px;
}
.landing-nav { display:flex; gap:16px; }
.landing-link { color:var(--text); text-decoration:none; font-weight:600; }
.landing-link:hover { color:var(--info); text-decoration:underline; }

.landing-main { padding: 96px 16px 40px; max-width:1200px; margin:0 auto; }
.landing-hero { margin-bottom:48px; }
.hero-grid {
  display:grid; grid-template-columns: 1fr 420px; gap:32px; align-items:center;
}
.hero-mock { display:grid; gap:16px; }
.mock-card {
  background:var(--card); border:1px solid var(--border); border-radius:14px; padding:14px;
}
.stories { display:flex; gap:10px; }
.story-dot {
  width:46px; height:46px; border-radius:50%; border:2px solid var(--green); background:var(--bg);
}
.mock-header { display:flex; align-items:center; gap:10px; margin-bottom:10px; }
.mock-avatar { width:32px; height:32px; border-radius:50%; background:#0b0f14; border:1px solid var(--border); }
.mock-user { display:grid; gap:2px; }
.mock-name { font-weight:600; }
.mock-time { font-size:0.75rem; color:var(--text-muted); }
.mock-media { height:200px; border-radius:10px; background:#0b0f14; border:1px solid var(--border); }
.mock-media.small { height:140px; }
.mock-actions { display:flex; gap:10px; margin:10px 0; }
.mock-icon { width:16px; height:16px; border-radius:4px; background:#0b0f14; border:1px solid var(--border); }
.mock-text { color:var(--text-muted); font-size:0.9rem; }

.hero-card {
  background:var(--card); border:1px solid var(--border); border-radius:14px; padding:24px;
  display:grid; gap:12px;
}
.hero-logo { display:flex; justify-content:center; }
.hero-logo img { width:64px; height:64px; }
.hero-card h1 { margin:0; font-size:1.4rem; font-weight:700; }
.hero-actions { display:flex; gap:10px; flex-wrap:wrap; }
.btn-outline { background:transparent; border:1px solid rgba(201,209,217,0.18); color:var(--text); }
.btn-outline:hover { background: rgba(201,209,217,0.06); }
.hero-divider { text-align:center; color:var(--text-muted); font-size:0.85rem; position:relative; }
.hero-divider::before, .hero-divider::after {
  content:""; position:absolute; top:50%; width:40%; height:1px; background:var(--border);
}
.hero-divider::before { left:0; }
.hero-divider::after { right:0; }
.hero-small { font-size:0.85rem; color:var(--text-muted); }
.hero-small a { color:var(--info); text-decoration:none; }
.hero-small a:hover { text-decoration:underline; }

.landing-proof h2 { margin:0 0 16px; font-size:1.4rem; font-weight:700; }
.proof-grid { display:grid; grid-template-columns: repeat(3, 1fr); gap:16px; }
.proof-card {
  background:var(--card); border:1px solid var(--border); border-radius:12px; padding:16px;
  display:grid; gap:8px;
}
.proof-card h3 { margin:0; font-size:1rem; }

.landing-footer {
  max-width:1200px; margin:0 auto; padding:24px 16px 40px;
  display:flex; align-items:center; justify-content:space-between; gap:16px; border-top:1px solid var(--border);
}
.footer-links { display:flex; gap:12px; }
.footer-links a { color:var(--text-muted); text-decoration:none; font-size:0.85rem; }
.footer-links a:hover { color:var(--text); text-decoration:underline; }

.fade-in { opacity:0; transform: translateY(8px); transition: opacity 0.4s ease, transform 0.4s ease; }
.fade-in.visible { opacity:1; transform: translateY(0); }

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr 360px; }
}
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-mock { display:none; }
  .hero-actions .btn { width:100%; }
  .proof-grid { grid-template-columns: 1fr; }
  .landing-footer { flex-direction:column; align-items:flex-start; }
}
/* Feed layout (Instagram-like, GitHub Dark) */
.feed-body .nav { display:none; }
.feed-body main.container { width:100%; max-width:none; padding:0; }

.ig-layout {
  display:grid;
  grid-template-columns: 240px minmax(0, 1fr) 320px;
  gap:24px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px 80px;
}

.ig-sidebar {
  position: sticky;
  top: 24px;
  height: calc(100vh - 48px);
  display:flex;
  flex-direction:column;
  gap:12px;
}

.ig-brand {
  display:flex; align-items:center; gap:10px;
  font-weight:600; margin-bottom:4px;
  color:var(--text); text-decoration:none;
}
.ig-brand:visited { color:var(--text); }
.ig-brand span { color:var(--text); }
.ig-brand img { width:28px; height:28px; border-radius:8px; }

.ig-nav { display:flex; flex-direction:column; gap:4px; }
.ig-nav-item {
  display:flex; align-items:center; gap:12px;
  padding:10px 12px; border-radius:10px;
  color:var(--text); background:transparent; border:0; cursor:pointer; text-decoration:none;
  position:relative;
}
.ig-nav-item:hover { background: rgba(201,209,217,0.06); }
.ig-nav-item.active { background: rgba(201,209,217,0.08); font-weight:600; }
.ig-nav-item:visited { color: var(--text); }
.ig-nav-label { font-size:0.95rem; }
.nav-badge {
  position:absolute; right:10px; top:8px;
  background: var(--danger); color:#fff; font-size:0.7rem; padding:2px 6px; border-radius:999px;
}
.fab-badge {
  background: var(--danger); color:#fff; font-size:0.7rem; padding:2px 6px; border-radius:999px; margin-left:6px;
}

.ig-main { min-width:0; }

.stories-bar {
  background:var(--card);
  border:1px solid var(--border);
  border-radius:12px;
  padding:12px;
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:16px;
  position:relative;
}
.stories-track {
  display:flex; gap:12px; overflow-x:auto; scrollbar-width:none; flex:1;
}
.stories-track::-webkit-scrollbar { display:none; }
.stories-next {
  border:1px solid var(--border); background:var(--bg); color:var(--text);
  border-radius:999px; width:28px; height:28px; cursor:pointer;
}
.story-item { display:flex; flex-direction:column; align-items:center; gap:6px; min-width:72px; cursor:pointer; }
.story-avatar {
  width:56px; height:56px; border-radius:50%;
  border:2px solid var(--green); background:var(--bg); overflow:hidden;
  display:grid; place-items:center;
}
.story-avatar img { width:100%; height:100%; object-fit:cover; }
.story-item.viewed .story-avatar { border-color: rgba(201,209,217,0.3); }
.story-name { font-size:0.75rem; color:var(--text-muted); max-width:72px; text-align:center; }

.feed-list { display:grid; gap:16px; }
.feed-more { display:flex; justify-content:center; margin-top:16px; }

.ig-right { position: sticky; top: 24px; align-self:start; display:flex; flex-direction:column; gap:12px; }
.right-card {
  background:var(--card); border:1px solid var(--border); border-radius:12px; padding:12px;
}
.user-row { display:flex; align-items:center; gap:10px; }
.user-info { flex:1; }
.user-username { font-weight:600; }
.user-username a { color:var(--text); text-decoration:none; }
.user-username a:hover { text-decoration:underline; }
.user-username a:visited { color:var(--text); }
.user-name { font-size:0.85rem; color:var(--text-muted); }
.user-name a { color:var(--text-muted); text-decoration:none; }
.user-name a:hover { text-decoration:underline; }
.user-name a:visited { color:var(--text-muted); }
.muted-link { color:var(--text-muted); text-decoration:none; font-size:0.85rem; }
.muted-link:hover { color:var(--text); text-decoration:underline; }

.right-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; }
.suggestions-list { display:grid; gap:12px; }
.suggestion-item { display:flex; align-items:center; gap:12px; }
.suggestion-item .avatar {
  width:44px; height:44px; border-radius:50%;
  overflow:hidden; background:#0b0f14; border:1px solid var(--border);
  background-size:cover; background-position:center;
}
.suggestion-info { flex:1; display:grid; gap:2px; }
.suggestion-sub { font-size:0.82rem; color:var(--text-muted); display:flex; align-items:center; gap:6px; }
.btn-link { border:0; background:transparent; color:var(--green); font-weight:600; cursor:pointer; }
.btn-link:hover { color:var(--green-hover); }

.right-footer { font-size:0.8rem; display:grid; gap:6px; }

.drawer-backdrop {
  position:fixed; inset:0; background:rgba(0,0,0,0.45); display:none; z-index:60;
}
.drawer-backdrop.show { display:block; }
.drawer {
  position:fixed; top:0; bottom:0; left:0; width:320px; background:var(--card);
  border-right:1px solid var(--border); transform:translateX(-100%);
  transition: transform 0.2s ease; z-index:70; display:flex; flex-direction:column;
}
.drawer.right { left:auto; right:0; border-right:0; border-left:1px solid var(--border); transform:translateX(100%); }
.drawer.open { transform:translateX(0); }
.drawer-header { padding:14px; border-bottom:1px solid var(--border); display:flex; align-items:center; justify-content:space-between; gap:10px; }
.drawer-title { font-weight:600; }
.drawer-body { padding:14px; display:grid; gap:12px; overflow:auto; }
.drawer-actions { display:flex; gap:8px; }
.search-results { display:grid; gap:8px; margin-top:10px; }
.search-row { display:flex; align-items:center; gap:10px; padding:8px; border-radius:8px; text-decoration:none; color:var(--text); }
.search-row:hover { background: rgba(201,209,217,0.06); }

.notif-item { display:flex; align-items:center; gap:10px; padding:8px; border-radius:10px; background:var(--bg); border:1px solid var(--border); }
.notif-item.read { opacity:0.7; }
.notif-text { flex:1; font-size:0.9rem; }

.conversation-item { display:flex; align-items:center; gap:10px; padding:8px; border-radius:10px; background:var(--bg); border:1px solid var(--border); }
.conversation-panel { display:grid; gap:10px; }
.conversation-header { display:flex; align-items:center; justify-content:space-between; }
.conversation-messages { max-height:260px; overflow:auto; display:grid; gap:8px; }
.conversation-bubble { padding:8px 10px; border-radius:10px; background:var(--bg); border:1px solid var(--border); }
.conversation-input { display:flex; gap:8px; align-items:center; }
.conversation-input .input { flex:1; }

.fab {
  position:fixed; right:24px; bottom:24px; z-index:50;
  background:var(--card); color:var(--text); border:1px solid var(--border);
  padding:10px 16px; border-radius:999px; cursor:pointer;
}
.fab:hover { background: rgba(201,209,217,0.06); }

.bottom-nav {
  display:none; position:fixed; left:0; right:0; bottom:0; height:56px;
  background:var(--bg); border-top:1px solid var(--border); z-index:40;
  align-items:center; justify-content:space-around;
}
.bottom-item { background:transparent; border:0; color:var(--text); padding:8px; display:grid; place-items:center; }
.bottom-item.active svg path { stroke: var(--green); }

.feed-error.center { text-align:center; }
.feed-error .error-title { font-weight:600; margin-bottom:6px; }

.story-overlay {
  position:fixed; inset:0; background:rgba(0,0,0,0.85);
  display:none; z-index:80; color:var(--text);
}
.story-overlay.show { display:flex; align-items:center; justify-content:center; }
.story-shell { width:100%; height:100%; position:relative; padding:24px; }
.story-brand { position:absolute; left:24px; top:16px; font-weight:700; }
.story-close { position:absolute; right:24px; top:12px; background:transparent; border:0; color:#fff; font-size:28px; cursor:pointer; }

.story-stage { display:flex; align-items:center; justify-content:center; gap:16px; height:100%; }
.story-main {
  width:360px; max-width:360px; height:640px; background:#111; border-radius:14px;
  position:relative; overflow:hidden; border:1px solid var(--border);
  display:flex; flex-direction:column;
}
.story-progress { height:2px; background:rgba(201,209,217,0.2); }
.story-progress span { display:block; height:2px; background:#fff; width:100%; }
.story-header { display:flex; align-items:center; justify-content:space-between; padding:10px 12px; }
.story-userline { display:flex; align-items:center; gap:8px; font-size:0.85rem; }
.story-avatar-small { width:26px; height:26px; border-radius:50%; background:#222; background-size:cover; background-position:center; border:1px solid var(--border); }
.story-actions { display:flex; gap:10px; }
.story-action { background:transparent; border:0; color:#fff; cursor:pointer; font-size:16px; }
.story-media { flex:1; display:grid; place-items:center; background:#000; }
.story-media img { width:100%; height:100%; object-fit:cover; }

.story-nav { background:rgba(255,255,255,0.1); border:0; color:#fff; font-size:32px; width:40px; height:40px; border-radius:50%; cursor:pointer; }
.story-nav.left { margin-right:8px; }
.story-nav.right { margin-left:8px; }

.story-sides { position:absolute; left:0; right:0; top:0; bottom:0; pointer-events:none; }
.story-side { position:absolute; top:50%; transform:translateY(-50%); display:grid; gap:12px; }
#storyLeft { left:18%; }
#storyRight { right:18%; }
.story-thumb { width:140px; height:240px; border-radius:12px; background:#222; background-size:cover; background-position:center; opacity:0.6; border:1px solid var(--border); }

@media (max-width: 900px) {
  .story-thumb { display:none; }
  .story-main { width:320px; height:560px; }
}

@media (max-width: 1199px) {
  .ig-layout { grid-template-columns: 200px minmax(0, 1fr); }
  .ig-right { display:none; }
  .ig-nav-label { display:none; }
  .ig-sidebar { width:72px; }
}

@media (max-width: 768px) {
  .ig-layout { grid-template-columns: 1fr; }
  .ig-sidebar { display:none; }
  .bottom-nav { display:flex; }
  .fab { bottom:70px; right:16px; }
}
.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }
.auth-divider span { background: var(--bg); padding: 0 8px; }
.auth-oauth { width: 100%; margin-top: 8px; }
.google-btn { display:flex; align-items:center; justify-content:center; gap:10px; background:#21262d; border:1px solid #30363d; color:var(--text); }
.google-btn:hover { background:#2a313b; }
.google-icon { width:18px; height:18px; display:inline-flex; }
.google-icon svg { width:18px; height:18px; }
.auth-signup { font-size: 14px; color: var(--text-muted); }
.auth-footer { margin-top: 24px; display:flex; gap: 12px; justify-content:center; flex-wrap: wrap; font-size: 12px; color: var(--text-muted); }
.password-wrap { position: relative; }
.toggle-pass { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: transparent; border: 0; color: var(--info); cursor: pointer; font-size: 12px; }
.auth-alert { border: 1px solid rgba(248,81,73,0.5); background: rgba(248,81,73,0.08); color: var(--danger); padding: 8px 10px; border-radius: 6px; margin: 0 0 12px; text-align: left; font-size: 13px; }

.profile-header { padding:16px; }
.profile-header-inner { display:flex; gap:16px; align-items:center; }
.profile-avatar { width:92px; height:92px; border-radius:50%; object-fit:cover; border:1px solid var(--border); }
.profile-meta { flex:1; }
.profile-actions { display:flex; align-items:center; gap:10px; margin-bottom:8px; }
.profile-actions .username { font-weight:600; }
.profile-stats { display:flex; gap:14px; margin-bottom:8px; }
.profile-stats .stat { background:transparent; border:0; color:var(--text); cursor:pointer; font-weight:600; }
.display-name { font-weight:600; margin-bottom:6px; }
.pronoun { color:var(--text-muted); font-weight:500; }
.bio { color:var(--text); margin-bottom:6px; }
.meta-line { color:var(--text-muted); font-size:0.9rem; }
.link { color:var(--info); text-decoration:none; }
.link:hover { text-decoration:underline; }

.profile-tabs { display:flex; gap:18px; margin:16px 0; border-bottom:1px solid var(--border); }
.tab-btn { background:transparent; border:0; color:var(--text-muted); padding:10px 0; cursor:pointer; font-weight:600; }
.tab-btn.active { color:var(--text); border-bottom:2px solid var(--green); }

.grid { display:grid; gap:8px; grid-template-columns: repeat(2, 1fr); }
.grid-item { background:#0d1117; border:1px solid var(--border); border-radius:8px; aspect-ratio:1/1; background-size:cover; background-position:center; position:relative; cursor:pointer; }
.grid-overlay { position:absolute; inset:0; background:rgba(0,0,0,0.45); color:#fff; display:flex; align-items:center; justify-content:center; opacity:0; transition:opacity 0.2s; border-radius:8px; font-size:0.9rem; }
.grid-item:hover .grid-overlay { opacity:1; }

.edit-avatar { display:flex; gap:12px; align-items:center; }
.edit-avatar img { width:72px; height:72px; border-radius:50%; border:1px solid var(--border); object-fit:cover; }

.follow-list { display:grid; gap:10px; margin-top:10px; }
.follow-row { display:flex; align-items:center; gap:10px; justify-content:space-between; }
.follow-name { flex:1; }

.post-modal img { width:100%; border-radius:8px; border:1px solid var(--border); margin-bottom:10px; }

@media (min-width: 900px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 700px) {
  .profile-header-inner { flex-direction:column; align-items:flex-start; }
  .profile-stats { width:100%; justify-content:space-between; }
}
