/* ═══════════════════════════════════════════════════════════
   CHELAK24 — Complete Stylesheet  (Light theme default)
   ═══════════════════════════════════════════════════════════ */

/* ── Variables ─────────────────────────────────────────────── */
/* Chelak 24 - v2.4.7 - UI Simplification */
:root {
  --accent:      #6366f1; /* Indigo – modern 2025 */
  --accent-2:    #8b5cf6; /* Violet */
  --accent-rgb:  99, 102, 241;
  --purple:      #a855f7;
  --purple-rgb:  168, 85, 247;
  --pink:        #ec4899;
  --danger:      #ef4444;
  --success:     #10b981;
  --warn:        #f59e0b;
  --bg:          #f4f6fb;
  --surface:     #ffffff;
  --surface-2:   #f1f4fa;
  --surface-3:   #e4e9f5;
  --border:      rgba(99,102,241,0.10);
  --border-2:    rgba(99,102,241,0.05);
  --text:        #0d0f1a;
  --text-muted:  #6b7280;
  --text-dim:    #374151;
  --nav-h:       64px;
  --desk-nav-w:  268px;
  --radius:      20px;
  --radius-sm:   12px;
  --radius-xs:   8px;
  --transition:  0.22s cubic-bezier(0.4, 0, 0.2, 1);
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --grad: linear-gradient(135deg, var(--accent), var(--purple));
  --grad-warm: linear-gradient(135deg, #f97316, #ec4899);
  --shadow:    0 2px 8px rgba(99,102,241,0.10), 0 1px 3px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 32px rgba(99,102,241,0.16), 0 2px 8px rgba(0,0,0,0.08);
  --shadow-xl: 0 20px 60px rgba(99,102,241,0.20), 0 4px 16px rgba(0,0,0,0.10);
  --glow:      0 0 20px rgba(99,102,241,0.30);
}

body.dark {
  --bg:          #08090f;
  --surface:     #0f1118;
  --surface-2:   #161824;
  --surface-3:   #1e2130;
  --border:      rgba(99,102,241,0.15);
  --border-2:    rgba(99,102,241,0.07);
  --text:        #f0f0ff;
  --text-muted:  #8890a8;
  --text-dim:    #b0b8d4;
  --shadow:      0 2px 8px rgba(0,0,0,0.40);
  --shadow-lg:   0 8px 32px rgba(0,0,0,0.50);
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; width: 100%; }
body { height: 100%; width: 100%; overflow: hidden; }
/* iOS/Android viewport fix — 100dvh = visible viewport (URL bar hisobga olinmaydi) */
html { min-height: 100vh; min-height: -webkit-fill-available; }
body { min-height: 100vh; min-height: -webkit-fill-available; }
body { font-family: var(--font); background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img, video { display: block; max-width: 100%; }
input, textarea, select { font-family: inherit; }

/* ── App Shell ─────────────────────────────────────────────── */
.app-shell {
  display: flex;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}
@supports not (height: 100dvh) {
  .app-shell { height: 100vh; height: -webkit-fill-available; }
}
.desktop-nav { width: var(--desk-nav-w); flex-shrink: 0; position: fixed; top: 0; left: 0; height: 100vh; height: 100dvh; z-index: 200; background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; overflow-y: auto; overflow-x: hidden; }
.desktop-nav.hidden { display: none; }
.app-main {
  flex: 1;
  min-width: 0;
  height: 100vh;
  height: 100dvh;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--bg);
  -webkit-overflow-scrolling: touch;
}
@supports not (height: 100dvh) {
  .app-main { height: auto; min-height: 100vh; min-height: -webkit-fill-available; }
}
@media(min-width:768px) { .app-main { margin-left: var(--desk-nav-w); } }
/* Auth pages: no sidebar margin so login fills full width */
.desktop-nav.hidden ~ .app-main { margin-left: 0 !important; }
@media(max-width:767px) { .desktop-nav { display: none !important; } .app-main { margin-left: 0 !important; } }

/* ── Mobile Bottom Nav ─────────────────────────────────────── */
.mobile-nav { position: fixed; bottom: 0; left: 0; right: 0; min-height: var(--nav-h); height: calc(var(--nav-h) + env(safe-area-inset-bottom)); z-index: 200; background: var(--surface); border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-around; padding: 0 8px env(safe-area-inset-bottom); }
.mobile-nav.hidden { display: none; }
@media(min-width:768px) { 
  .mobile-nav { display: none !important; visibility: hidden !important; pointer-events: none !important; } 
}
.mobile-nav-item { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; padding: 6px 4px; border-radius: 14px; background: none; border: none; color: var(--text-muted); font-size: 10px; font-weight: 600; transition: all var(--transition); flex: 1; }
.mobile-nav-item.active { color: var(--accent); }
.mobile-nav-item.active .material-symbols-rounded { filter: drop-shadow(0 0 6px rgba(99,102,241,0.5)); }
.mobile-nav-item .material-symbols-rounded { font-size: 24px; transition: transform var(--transition); }
.mobile-nav-item:active .material-symbols-rounded { transform: scale(0.88); }
.mobile-nav-item span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Blue pulse animation fix - ensure it's contained or hidden when nav is hidden */
.mobile-nav-item.active::after { display: none; } 
.nav-upload-btn { width: 48px; height: 48px; border-radius: 50%; background: var(--grad); border: none; display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0; box-shadow: 0 4px 14px rgba(99,102,241,0.40); transition: transform var(--transition); }
.nav-upload-btn:active { transform: scale(0.92); }

/* ── Desktop Sidebar ───────────────────────────────────────── */
.desk-nav-logo { display: flex; flex-direction: row; align-items: center; gap: 12px; padding: 18px 16px; border-bottom: 1px solid var(--border); text-align: left; overflow: hidden; }
.desk-nav-logo-img { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; flex-shrink: 0; box-shadow: 0 2px 10px rgba(99,102,241,0.25); }
.desk-nav-logo-text { font-size: 22px; font-weight: 900; background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; display: block; white-space: nowrap; letter-spacing: -0.5px; line-height: 1; }
.desk-nav-user { padding: 10px 14px; border-bottom: 1px solid var(--border); }
.desk-nav-user-row { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-radius: var(--radius-sm); cursor: pointer; transition: background var(--transition); }
.desk-nav-user-row:hover { background: var(--surface-2); }
.desk-nav-avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--surface-2); display: flex; align-items: center; justify-content: center; overflow: visible; flex-shrink: 0; border: 2px solid var(--border); position: relative; }
.desk-nav-avatar-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.desk-nav-avatar-inner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.desk-nav-avatar-inner .material-symbols-rounded { font-size: 22px; color: var(--text-muted); }
.desk-nav-biz-badge {
  position: absolute;
  right: -4px;
  bottom: -3px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 7px rgba(0,0,0,0.16);
}
.desk-nav-biz-badge .verified-badge { font-size: 14px; }
.desk-nav-name { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 4px; }
.desk-nav-phone { font-size: 11px; color: var(--text-muted); }
.desk-nav-items { flex: 1; padding: 6px 8px; }
.desk-nav-item { display: flex; align-items: center; gap: 12px; padding: 11px 14px; width: 100%; background: none; border: none; color: var(--text-muted); font-size: 15px; font-weight: 500; transition: all var(--transition); text-align: left; border-radius: var(--radius-sm); margin-bottom: 2px; }
.desk-nav-item:hover { background: var(--surface-2); color: var(--text); }
.desk-nav-item.active { 
  color: var(--accent); 
  background: rgba(var(--accent-rgb), 0.08); 
  font-weight: 700; 
  position: relative;
}
.desk-nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 4px;
  background: var(--grad);
  border-radius: 0 4px 4px 0;
}
.media-card-stat.like-btn.liked .material-symbols-rounded {
  color: #ff3b5c;
  font-variation-settings: 'FILL' 1;
}
.media-card-stat.like-btn.liked .like-count {
  color: #ff3b5c;
  font-weight: 600;
}
.desk-nav-item .material-symbols-rounded { font-size: 22px; flex-shrink: 0; }
.desk-nav-item.desk-nav-admin { color: var(--warn); }
.desk-nav-bottom { padding: 12px 16px; border-top: 1px solid var(--border); }

/* ── Buttons ────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 10px 20px; border-radius: var(--radius-sm); font-size: 15px; font-weight: 600; border: none; cursor: pointer; transition: all var(--transition); position: relative; overflow: hidden; }
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 4px 14px rgba(99,102,241,0.35); }
.btn-primary:hover { opacity: 0.92; box-shadow: 0 6px 20px rgba(99,102,241,0.45); transform: translateY(-1px); }
.btn-secondary { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:not(.btn) { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 10px 16px; border-radius: var(--radius-sm); font-size: 15px; font-weight: 600; cursor: pointer; }
.btn-secondary:hover { background: var(--surface-3); }
.btn-ghost { background: transparent; color: var(--text); border: 1.5px solid var(--border); }
.btn-ghost:hover { background: var(--surface-2); border-color: rgba(99,102,241,0.25); }
.btn-danger { background: var(--danger); color: #fff; box-shadow: 0 4px 14px rgba(239,68,68,0.30); }
.btn-danger:hover { opacity: 0.88; box-shadow: 0 6px 20px rgba(239,68,68,0.40); }
.btn-success { background: var(--success); color: #fff; }
.btn-full { width: 100%; }
.btn-lg { padding: 14px 22px; font-size: 16px; border-radius: 14px; }
.btn-icon { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: none; border: none; color: var(--text); cursor: pointer; transition: background var(--transition); }
.btn-icon:hover { background: var(--surface-2); }
.btn-icon-sm { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--surface-2); border: none; color: var(--text); cursor: pointer; transition: background var(--transition); }
.btn-icon-sm:hover { background: var(--surface-3); }
.btn-icon-xs { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--surface-2); border: none; color: var(--text); cursor: pointer; }
.btn-icon-xs .material-symbols-rounded { font-size: 16px; }

/* ── Utilities ──────────────────────────────────────────────── */
.mt4  { margin-top: 4px; }
.mt8  { margin-top: 8px; }
.mt12 { margin-top: 12px; }
.mt16 { margin-top: 16px; }
.mb4  { margin-bottom: 4px; }
.mb8  { margin-bottom: 8px; }
.mb12 { margin-bottom: 12px; }
.mb16 { margin-bottom: 16px; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hidden { display: none !important; }
.hidden-input { position: absolute !important; width: 1px !important; height: 1px !important; opacity: 0 !important; pointer-events: none !important; overflow: hidden !important; clip-path: inset(50%) !important; }
.danger { color: var(--danger); }

/* ── Spinner ────────────────────────────────────────────────── */
.spin-sm { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.35); border-top-color: #fff; border-radius: 50%; animation: spin 0.7s linear infinite; display: inline-block; flex-shrink: 0; }
.spin-dark { border-color: rgba(0,0,0,0.15); border-top-color: var(--text); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Animations ─────────────────────────────────────────────── */
.anim-fade { animation: fadeInO 0.2s ease forwards; }
@keyframes fadeInO { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOutO { to { opacity: 0; } }
@keyframes slideUp { from { transform: translateY(40px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.anim-pop { animation: popAnim 0.55s ease forwards; }
@keyframes popAnim { 0% { transform:translate(-50%,-50%) scale(0); opacity:1; } 50% { transform:translate(-50%,-50%) scale(1.3); opacity:1; } 100% { transform:translate(-50%,-50%) scale(0.9); opacity:0; } }

/* ── Splash ────────────────────────────────────────────────── */
.splash {
  position: fixed; inset: 0; z-index: 9999;
  background: linear-gradient(160deg, #0d0f1a 0%, #1a1040 50%, #0d1630 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px;
}
.splash-logo {
  width: 92px; height: 92px; border-radius: 24px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 40px rgba(99,102,241,0.55), 0 0 80px rgba(168,85,247,0.28);
  animation: splashPulse 2.2s ease-in-out infinite;
  overflow: hidden;
}
.splash-logo-img { width: 92px; height: 92px; border-radius: 24px; object-fit: cover; }
@keyframes splashPulse {
  0%,100% { box-shadow: 0 0 40px rgba(99,102,241,0.55), 0 0 80px rgba(168,85,247,0.28); }
  50% { box-shadow: 0 0 70px rgba(99,102,241,0.85), 0 0 130px rgba(168,85,247,0.50); }
}
.splash-icon { font-size: 44px; color: #fff; }
.splash-title { font-size: 32px; font-weight: 900; color: #fff; letter-spacing: -0.5px; }
.splash-sub { font-size: 14px; color: rgba(255,255,255,0.50); }
.splash-bar-wrap { width: 220px; height: 3px; background: rgba(255,255,255,0.10); border-radius: 2px; overflow: hidden; }
.splash-bar { height: 100%; background: var(--grad); border-radius: 2px; transition: width 0.35s cubic-bezier(0.4,0,0.2,1); }

/* ── Toast ──────────────────────────────────────────────────── */
.toasts-container { position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%); z-index: 10000; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; width: min(420px, calc(100vw - 32px)); }
@media(min-width:768px) { .toasts-container { bottom: 24px; } }
.toast { display: flex; align-items: center; gap: 10px; width: fit-content; max-width: 100%; padding: 12px 18px; border-radius: 18px; font-size: 14px; font-weight: 500; line-height: 1.35; pointer-events: auto; box-shadow: 0 4px 20px rgba(0,0,0,0.14); animation: slideUpToast 0.3s ease forwards; white-space: normal; overflow-wrap: anywhere; }
.toast-out { animation: fadeDownToast 0.3s ease forwards; }
.toast-success { background: #1A1A1A; color: #fff; }
body.dark .toast-success { background: #FFF; color: #111; }
.toast-error { background: var(--danger); color: #fff; }
.toast-info { background: var(--accent); color: #fff; }
.toast-warning { background: var(--warn); color: #fff; }
.toast .material-symbols-rounded { font-size: 19px; flex-shrink: 0; }
@keyframes slideUpToast { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:translateY(0); } }
@keyframes fadeDownToast { from { opacity:1; transform:translateY(0); } to { opacity:0; transform:translateY(10px); } }
@media(max-width:767px) {
  body.auth-screen .toasts-container {
    top: calc(env(safe-area-inset-top) + 14px);
    bottom: auto;
  }
  body.auth-screen .toast {
    width: 100%;
    justify-content: flex-start;
    animation-name: slideDownToast;
  }
  body.auth-screen .toast-out {
    animation-name: fadeUpToast;
  }
}
@keyframes slideDownToast { from { opacity:0; transform:translateY(-12px); } to { opacity:1; transform:translateY(0); } }
@keyframes fadeUpToast { from { opacity:1; transform:translateY(0); } to { opacity:0; transform:translateY(-10px); } }

.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 6px;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.skeleton.aspect-1-1 {
  width: 100%;
  border-radius: 8px;
  position: relative;
}
.skeleton.aspect-1-1::before {
  content: "";
  display: block;
  padding-bottom: 100%;
}

.skel-row { display: flex; align-items: center; gap: 12px; padding: 10px 16px; }
.skel-avatar { width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0; }
.skel-lines { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.skel-line-sm { height: 12px; width: 40%; border-radius: 6px; }
.skel-line-md { height: 12px; width: 65%; border-radius: 6px; }

.media-card-img-shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  z-index: 1;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.grid-video-playing .media-card-img-shimmer, 
.media-card-thumb[src] ~ .media-card-img-shimmer {
  opacity: 0 !important;
  pointer-events: none;
}
.grid-video-playing .media-card-play-icon {
  display: none !important;
}
.media-card-thumb {
  z-index: 2;
  position: relative;
}

/* Grid Mute Button */
.grid-mute-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.media-card:hover .grid-mute-btn, .grid-video-playing .grid-mute-btn { opacity: 1; }
.grid-mute-btn .material-symbols-rounded { font-size: 18px; }

/* Like button in grid */
.like-btn {
  background: none;
  border: none;
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 20px;
  transition: all 0.2s;
}
.like-btn:hover { background: var(--surface-2); }
.like-btn.liked { color: var(--danger); }
.like-btn .material-symbols-rounded { font-size: 20px; }


/* ── Empty state ───────────────────────────────────────────── */
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 64px 24px; gap: 12px; text-align: center; }
.empty-state .material-symbols-rounded { font-size: 48px; color: var(--text-muted); }
.empty-state strong { font-size: 18px; font-weight: 700; }
.empty-state span { font-size: 14px; color: var(--text-muted); }

/* ── Page layout ───────────────────────────────────────────── */
.screen-scroll { min-height: 100vh; min-height: 100dvh; padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 16px); }
@media(min-width:768px) { .screen-scroll { padding-bottom: 24px; max-width: 820px; margin: 0 auto; } }
.screen-header { position: sticky; top: 0; z-index: 100; background: var(--surface); border-bottom: 1px solid var(--border); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.screen-header-inner { display: flex; align-items: center; justify-content: space-between; height: 56px; padding: 0 16px; gap: 12px; }
.screen-title { font-size: 18px; font-weight: 800; flex: 1; }
.screen-body { padding: 0; }
/* Media grid bo'lmagan sahifalar uchun padding */
.screen-body.padded { padding: 16px; }
.page-container { overflow-y: auto; height: 100%; padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 20px); -webkit-overflow-scrolling: touch; }
@media(min-width:768px) { .page-container { padding-bottom: 40px; max-width: 820px; margin: 0 auto; } }
.section-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px 8px; }
.header-title-group { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 700; }
.header-actions { display: flex; align-items: center; gap: 6px; }
.load-more-wrap { display: flex; justify-content: center; padding: 16px; }

/* ═══════════════════════════════════════════════════════════
   AUTH PAGES — Full Screen Layout
   ═══════════════════════════════════════════════════════════ */
.auth-page {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-y: auto;
  display: flex;
  background: var(--surface-2);
  padding-bottom: 0 !important;
}

/* Auth centered screens */
.auth-center { width: 100%; min-height: 100%; display: flex; align-items: center; justify-content: center; padding: 28px 20px; }

/* Apple-style card */
.auth-card-apple {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border-radius: 28px;
  padding: 40px 32px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.06);
  border: 1px solid var(--border-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}

.auth-logo-wrap {
  margin-bottom: 24px;
}
.auth-logo-img {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  object-fit: cover;
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.auth-icon-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(var(--accent-rgb), 0.10);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}
.auth-icon-circle .material-symbols-rounded { font-size: 32px; }
.green-circle { background: rgba(16, 185, 129, 0.10); color: var(--success); }

.auth-apple-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
  color: var(--text);
}

.auth-apple-sub {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 32px;
}

.apple-input-group {
  width: 100%;
  display: flex;
  align-items: center;
  background: var(--surface-2);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 20px;
  border: 1.5px solid transparent;
  transition: all 0.2s ease;
}
.apple-input-group:focus-within {
  background: var(--surface);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.1);
}

.apple-input-prefix {
  padding: 16px 4px 16px 18px;
  font-size: 17px;
  font-weight: 600;
  color: var(--text-muted);
}

.apple-input {
  flex: 1;
  background: none;
  border: none;
  padding: 16px 18px 16px 8px;
  font-size: 17px;
  color: var(--text);
  outline: none;
  font-weight: 500;
}

.btn-apple-primary {
  width: 100%;
  padding: 16px;
  background: var(--text);
  color: var(--surface);
  border: none;
  border-radius: 16px;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, opacity 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-apple-primary:active { transform: scale(0.97); }
.btn-apple-primary:hover { opacity: 0.9; }

.btn-apple-secondary {
  width: 100%;
  padding: 14px;
  background: rgba(var(--accent-rgb), 0.08);
  color: var(--accent);
  border: none;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-apple-secondary:hover { background: rgba(var(--accent-rgb), 0.12); }
.btn-apple-secondary:active { transform: scale(0.97); }

.auth-apple-footer {
  margin-top: 24px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.apple-back-btn {
  position: absolute;
  top: 24px;
  left: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface-2);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}
.apple-back-btn:hover { background: var(--surface-3); color: var(--text); }

.apple-otp-wrap {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}

.apple-otp-input {
  width: calc(100% - 76px); /* 64px for button + 12px for gap */
  box-sizing: border-box;
  text-align: center;
  letter-spacing: 12px; /* reduced slightly to ensure fitting */
  padding: 16px 0 16px 12px; /* offset for letter spacing */
  font-size: 28px; /* slightly smaller font to guarantee it fits on all mobile screens */
  font-weight: 800;
  background: var(--surface-2);
  border: 1.5px solid transparent;
  border-radius: 16px;
  color: var(--text);
  outline: none;
  transition: all 0.2s;
}
.apple-otp-input:focus {
  background: var(--surface);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.1);
}

.apple-paste-btn {
  width: 64px;
  flex-shrink: 0;
  height: 68px; /* matching input height nicely */
  border-radius: 16px;
  background: var(--surface-2);
  border: 1.5px solid transparent;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}
.apple-paste-btn:hover { background: var(--surface-3); color: var(--text); }

.apple-input-container {
  width: 100%;
  text-align: left;
  margin-bottom: 16px;
}
.apple-input-container label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
  padding-left: 4px;
}

.apple-input-clean {
  width: 100%;
  padding: 16px;
  background: var(--surface-2);
  border: 1.5px solid transparent;
  border-radius: 16px;
  font-size: 16px;
  color: var(--text);
  outline: none;
  transition: all 0.2s;
}
.apple-input-clean:focus {
  background: var(--surface);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.1);
}

.apple-username-flex {
  display: flex;
  align-items: center;
  background: var(--surface-2);
  border-radius: 16px;
  border: 1.5px solid transparent;
  transition: all 0.2s;
}
.apple-username-flex:focus-within {
  background: var(--surface);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.1);
}
.apple-username-flex span {
  padding-left: 16px;
  font-weight: 600;
  color: var(--text-muted);
}
.apple-username-flex input {
  flex: 1;
  background: none;
  border: none;
  padding: 16px 16px 16px 8px;
  font-size: 16px;
  color: var(--text);
  outline: none;
}

/* ── Form elements ──────────────────────────────────────────── */
.form-label { display: block; font-size: 12px; font-weight: 700; color: var(--text-muted); margin-bottom: 7px; letter-spacing: 0.3px; text-transform: uppercase; }
.form-input { width: 100%; padding: 13px 16px; background: var(--surface-2); border: 1.5px solid var(--border); border-radius: var(--radius-sm); color: var(--text); font-size: 15px; outline: none; transition: all var(--transition); }
.form-input:focus { border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 4px rgba(99,102,241,0.10); }
.form-input::placeholder { color: var(--text-muted); opacity: 0.7; }
.form-hint { margin-top: 6px; font-size: 12px; line-height: 1.4; color: var(--text-muted); }
.username-input-wrap { display: flex; align-items: center; background: var(--surface-2); border: 1.5px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; transition: border-color var(--transition); }
.username-input-wrap:focus-within { border-color: var(--accent); background: var(--surface); }
.username-input-wrap span { padding-left: 14px; color: var(--text-muted); font-weight: 700; }
.username-input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); padding: 13px 14px 13px 4px; font-size: 16px; }
.form-textarea { width: 100%; background: var(--surface-2); border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: 10px 14px; color: var(--text); font-size: 15px; resize: vertical; outline: none; min-height: 80px; }
.form-textarea:focus { border-color: var(--accent); }
.form-card { background: var(--surface); border-radius: var(--radius); border: 1px solid var(--border); padding: 16px; margin-bottom: 16px; }
.form-body { display: flex; flex-direction: column; gap: 12px; }
.form-row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.form-row-title { font-size: 15px; font-weight: 600; }
.form-row-sub { font-size: 13px; color: var(--text-muted); }
.phone-input-wrap { display: flex; align-items: center; background: var(--surface-2); border: 1.5px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; margin-bottom: 14px; transition: border-color var(--transition); }
.phone-input-wrap:focus-within { border-color: var(--accent); background: var(--surface); }
.phone-prefix { padding: 13px 4px 13px 14px; font-size: 16px; font-weight: 600; color: var(--text-muted); white-space: nowrap; }
.phone-input { flex: 1; background: none; border: none; padding: 13px 14px; font-size: 16px; color: var(--text); outline: none; min-width: 0; }
.otp-input-group { display: flex; align-items: center; gap: 8px; margin: 18px 0; }
.otp-input-wrap { flex: 1; margin: 0; }
.otp-input { width: 100%; text-align: center; letter-spacing: 12px; font-size: 28px; font-weight: 800; padding: 14px; background: var(--surface-2); border: 1.5px solid var(--border); border-radius: var(--radius-sm); color: var(--text); outline: none; }
.otp-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb),0.12); }
.otp-paste-btn { width: 48px; height: 54px; flex-shrink: 0; background: var(--surface-2); border: 1.5px solid var(--border); border-radius: var(--radius-sm); color: var(--text-muted); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all var(--transition); }
.otp-paste-btn:hover { background: var(--surface-3, var(--surface-2)); border-color: var(--accent); color: var(--accent); }
.otp-paste-btn .material-symbols-rounded { font-size: 20px; }
.otp-tg-btn { margin-bottom: 4px !important; }
.otp-bot-info { display: flex; align-items: flex-start; gap: 8px; margin-top: 14px; padding: 10px 14px; background: rgba(var(--accent-rgb),0.07); border-radius: 12px; font-size: 12px; color: var(--text-muted); line-height: 1.5; }
.otp-bot-info .material-symbols-rounded { font-size: 16px; color: var(--accent); flex-shrink: 0; margin-top: 1px; }

/* ── Toggle ─────────────────────────────────────────────────── */
.toggle-switch { position: relative; display: inline-block; width: 48px; height: 26px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; inset: 0; background: #ccc; border-radius: 26px; cursor: pointer; transition: background 0.2s; }
.toggle-slider::before { content: ''; position: absolute; width: 20px; height: 20px; left: 3px; bottom: 3px; background: white; border-radius: 50%; transition: transform 0.2s; box-shadow: 0 1px 4px rgba(0,0,0,0.2); }
.toggle-switch input:checked + .toggle-slider { background: var(--accent); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(22px); }
.toggle-track { position: absolute; inset: 0; background: #ccc; border-radius: 26px; cursor: pointer; transition: background 0.2s; }
.toggle-track::before { content: ''; position: absolute; width: 20px; height: 20px; left: 3px; bottom: 3px; background: white; border-radius: 50%; transition: transform 0.2s; box-shadow: 0 1px 4px rgba(0,0,0,0.2); }
.toggle-switch input:checked + .toggle-track { background: var(--accent); }
.toggle-switch input:checked + .toggle-track::before { transform: translateX(22px); }

/* ── Welcome modals ─────────────────────────────────────────── */
.welcome-overlay { align-items: flex-end; }
@media(min-width:600px) { .welcome-overlay { align-items: center; } }
.welcome-card { background: var(--surface); border-radius: 24px 24px 0 0; width: 100%; max-width: 420px; padding: 32px 24px 28px; text-align: center; animation: slideUp 0.3s ease; }
@media(min-width:600px) { .welcome-card { border-radius: 24px; } }
.welcome-emoji { font-size: 56px; margin-bottom: 12px; }
.welcome-title { font-size: 22px; font-weight: 800; margin-bottom: 8px; }
.welcome-sub { font-size: 15px; color: var(--text-muted); line-height: 1.5; margin-bottom: 4px; }
.welcome-admin-tag { font-size: 13px; color: var(--warn); font-weight: 600; margin-bottom: 4px; }

/* ── Confirm dialog ─────────────────────────────────────────── */
.confirm-box { background: var(--surface); border-radius: 24px; padding: 24px; max-width: 320px; width: 90%; box-shadow: var(--shadow-xl); border: 1px solid var(--border); animation: slideUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); display: flex; flex-direction: column; align-items: center; margin: auto; }
.confirm-msg { font-size: 16px; font-weight: 600; line-height: 1.5; color: var(--text); margin-bottom: 24px; text-align: center; overflow-wrap: break-word; width: 100%; }
.confirm-btns { display: flex; gap: 12px; width: 100%; }
.confirm-btns .btn { flex: 1; padding: 12px; border-radius: 12px; font-size: 15px; font-weight: 700; }

/* ── Modal ──────────────────────────────────────────────────── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 1000; display: flex; align-items: flex-end; justify-content: center; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.modal-overlay.center { align-items: center; }
@media(min-width:600px) { .modal-overlay { align-items: center; padding: 20px; } }
.modal-box { background: var(--surface); border-radius: 24px 24px 0 0; width: 100%; max-width: 460px; max-height: 85vh; overflow: hidden; display: flex; flex-direction: column; animation: slideUp 0.3s ease; box-shadow: 0 -8px 40px rgba(0,0,0,0.2); }
@media(min-width:600px) { .modal-box { border-radius: 24px; max-height: calc(100vh - 40px); } }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--border); }
.modal-header h3 { font-size: 18px; font-weight: 800; letter-spacing: -0.3px; }
.modal-close-btn { background: var(--surface-2); border: none; cursor: pointer; color: var(--text-muted); display: flex; padding: 6px; border-radius: 50%; transition: all var(--transition); }
.modal-close-btn:hover { background: var(--surface-3); color: var(--text); transform: rotate(90deg); }
.modal-body { padding: 20px 24px; flex: 1; overflow-y: auto; scrollbar-width: thin; }
.modal-footer { display: flex; gap: 12px; padding: 16px 24px; border-top: 1px solid var(--border); }
.modal-footer .btn-secondary, .modal-footer .btn-primary, .modal-footer .btn-danger { flex: 1; padding: 14px; border-radius: 14px; font-weight: 700; cursor: pointer; border: none; font-size: 15px; }
.modal-footer .btn-secondary { background: var(--surface-2); color: var(--text); }
.modal-footer .btn-primary { background: var(--accent); color: #fff; }
.modal-footer .btn-danger { background: var(--danger); color: #fff; }

/* ── Bottom sheet ───────────────────────────────────────────── */
.bottom-sheet { position: fixed; bottom: 0; left: 0; right: 0; background: var(--surface); border-radius: 20px 20px 0 0; z-index: 900; padding: 0 0 max(16px, env(safe-area-inset-bottom)); animation: slideUp 0.25s ease; max-height: 80vh; overflow-y: auto; }
.bottom-sheet-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 12px; border-bottom: 1px solid var(--border); }
.bottom-sheet-header h3 { font-size: 16px; font-weight: 700; }
.sheet-action-item { display: flex; align-items: center; gap: 14px; padding: 14px 20px; cursor: pointer; transition: background var(--transition); font-size: 15px; }
.sheet-action-item:hover { background: var(--surface-2); }
.sheet-action-item .material-symbols-rounded { font-size: 22px; color: var(--text-muted); }
.sheet-action-item { width: 100%; border: 0; background: transparent; color: var(--text); text-align: left; }
.sheet-action-item div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sheet-action-item strong { font-size: 15px; font-weight: 650; }
.sheet-action-item small { font-size: 12px; color: var(--text-muted); }
/* Share sheet */
.share-url-row { display: flex; align-items: center; gap: 8px; margin: 12px 20px; padding: 10px 14px; background: var(--surface-2); border-radius: 12px; border: 1px solid var(--border); }
.share-url-text { flex: 1; font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.share-copy-btn { flex-shrink: 0; background: var(--grad); border: none; color: #fff; border-radius: 8px; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.share-copy-btn .material-symbols-rounded { font-size: 17px; }
/* Create Ad Modal */
.create-ad-sheet { max-width: 520px; margin: 0 auto; }
.create-ad-field { display: flex; flex-direction: column; gap: 6px; }
.create-ad-label { font-size: 12px; font-weight: 700; color: var(--text-muted); display: flex; align-items: center; gap: 5px; text-transform: uppercase; letter-spacing: 0.4px; }
.create-ad-label .material-symbols-rounded { font-size: 15px; }
.create-ad-input { width: 100%; padding: 11px 14px; background: var(--surface-2); border: 1.5px solid var(--border); border-radius: 12px; color: var(--text); font-size: 14px; outline: none; transition: border-color 0.2s; box-sizing: border-box; }
.create-ad-input:focus { border-color: var(--accent); }
.create-ad-file { padding: 10px 14px; cursor: pointer; }
.create-ad-row { display: flex; gap: 10px; }
.create-ad-row .create-ad-field { flex: 1; }
.create-ad-submit { width: 100%; padding: 14px; background: var(--grad); color: #fff; font-size: 15px; font-weight: 800; border: none; border-radius: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 6px; transition: opacity 0.2s; }
.create-ad-submit:hover { opacity: 0.9; }
.create-ad-submit .material-symbols-rounded { font-size: 20px; }
.profile-pic-preview { display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.profile-pic-preview img { width: 72px; height: 72px; border-radius: 50%; background: var(--surface-2); object-fit: cover; display: block; flex-shrink: 0; border: 3px solid var(--border); }
.profile-pic-preview > .material-symbols-rounded { width: 72px; height: 72px; border-radius: 50%; background: var(--surface-2); object-fit: cover; display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 40px; flex-shrink: 0; }
.profile-pic-preview div { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.profile-pic-preview strong { font-size: 16px; font-weight: 750; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-pic-preview span { font-size: 13px; color: var(--text-muted); }
/* Profile pic sheet desktop */
.profile-pic-sheet { max-width: 420px; width: 100%; }
@media(min-width:600px) { .profile-pic-sheet { border-radius: 20px; } }
/* Hidden file input — allaqachon 158-qatorda aniqlangan, bu duplicate */
.share-item { display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; padding: 8px; border-radius: 12px; transition: background var(--transition); }
.share-item:hover { background: var(--surface-2); }
.share-item span { font-size: 12px; color: var(--text-muted); }

/* ── Zoom overlay ───────────────────────────────────────────── */
.zoom-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.92); z-index: 2000; display: flex; align-items: center; justify-content: center; cursor: zoom-out; animation: fadeInO 0.2s ease; }
.zoom-img { max-width: 95vw; max-height: 95vh; object-fit: contain; border-radius: 12px; cursor: default; }
.zoom-close { position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; border-radius: 50%; background: rgba(0,0,0,0.5); color: #fff; border: none; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.zoom-close .material-symbols-rounded { font-size: 22px; }

/* ── Verified Badge ─────────────────────────────────────────── */
.verified-badge { color: var(--accent); font-variation-settings: 'FILL' 1; vertical-align: middle; display: inline-flex; align-items: center; flex-shrink: 0; line-height: 1; }
.verified-badge.badge-lg { font-size: 22px; }
.verified-badge.badge-sm { font-size: 16px; }
.verified-badge.badge-xs { font-size: 14px; }
.verified-badge.badge-feed { font-size: 15px; }

/* ═══════════════════════════════════════════════════════════
   EXPLORE / SEARCH
   ═══════════════════════════════════════════════════════════ */
.search-bar-wrap { padding: 10px 16px; position: sticky; top: 0; z-index: 50; background: var(--surface); border-bottom: 1px solid var(--border); }
.search-bar { display: flex; align-items: center; gap: 10px; background: var(--surface-2); border-radius: 30px; padding: 0 16px; border: 1.5px solid var(--border); }
.search-bar:focus-within { border-color: var(--accent); }
.search-icon { color: var(--text-muted); font-size: 20px; flex-shrink: 0; }
.search-input { flex: 1; background: none; border: none; outline: none; padding: 11px 0; font-size: 15px; color: var(--text); }
.search-input::placeholder { color: var(--text-muted); }
.search-section { padding: 0 16px 16px; }
.search-section-title { font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin: 12px 0 8px; display: flex; align-items: center; gap: 6px; }
.search-count { background: var(--surface-2); border-radius: 20px; padding: 1px 7px; font-size: 11px; color: var(--text-muted); font-weight: 600; text-transform: none; letter-spacing: 0; }
.search-users { display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.search-user-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; cursor: pointer; border-bottom: 1px solid var(--border); transition: background var(--transition); text-align: left; width: 100%; background: none; }
.search-user-item:last-child { border-bottom: none; }
.search-user-item:hover { background: var(--surface-2); }
.search-user-biz { background: linear-gradient(135deg, rgba(29,155,240,0.04), transparent) !important; }
.search-user-avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; background: var(--surface-2); flex-shrink: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; position: relative; }
.search-avatar-biz { border: 2px solid var(--accent); }
.search-biz-dot { position: absolute; bottom: -2px; right: -2px; line-height: 1; }
.search-user-info { flex: 1; min-width: 0; }
.search-user-name { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-user-sub { font-size: 12px; color: var(--text-muted); display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.search-user-loc { display: flex; align-items: center; gap: 2px; font-size: 12px; color: var(--text-muted); }
.search-user-arrow { color: var(--text-muted); font-size: 20px; flex-shrink: 0; }

.media-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  padding: 2px;
}
.explore-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: transparent;
  padding: 12px 10px 22px;
}
@media(min-width:600px) {
  .explore-grid { max-width: 440px; margin: 0 auto; padding: 16px 10px 28px; }
}
/* ── Kartochka kirish animatsiyasi ── */
@keyframes cardFadeIn {
  from { opacity: 0; transform: translateY(14px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
/* ── Rasm yuklanayotganda shimmer ── */
@keyframes imgShimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.media-card {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  cursor: pointer;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 8px 26px rgba(15,23,42,0.08);
  width: 100%;
  display: block;
  aspect-ratio: auto;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.media-card.is-loading {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3,#2a2a2a) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}
.media-card:hover { transform: translateY(-2px); z-index: 1; box-shadow: 0 14px 36px rgba(15,23,42,0.12); }
.media-card-thumb-wrap > .media-card-thumb,
.media-card-visual > img,
.media-card-visual > video { 
  position: absolute;
  top: 0;
  left: 0;
  width: 100%; 
  height: 100%; 
  object-fit: cover; 
  object-position: center center; 
  transition: transform 0.35s ease; 
}
.media-card:hover .media-card-thumb { transform: scale(1.025); }
.media-card-visual {
  position: relative;
  width: 100%;
  background: #000;
  overflow: hidden;
  border-radius: inherit;
}
.media-card-visual::before {
  content: "";
  display: block;
  padding-bottom: 125%; /* 4:5 Ratio — biroz ixchamroq */
}
.media-card-thumb-wrap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}
.media-card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: relative;
  z-index: 2;
}
.media-card-img-shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3, #2a2a2a) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: imgShimmer 1.4s infinite;
  border-radius: inherit;
  z-index: 1;
  transition: opacity 0.25s ease;
}
.media-card-img-shimmer.hidden { opacity: 0; pointer-events: none; }
.media-card-thumb-failed::after {
  content: 'play_circle';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Material Symbols Rounded';
  font-size: 34px;
  color: var(--text-muted);
  background: linear-gradient(135deg, var(--surface-2) 0%, var(--surface-3,var(--surface-2)) 100%);
}

/* Poster yo'q video — skeleton ustida ko'rsatiladi */
.media-card-thumb.loading-thumb { opacity: 1; }
/* Poster yo'q bo'lganda chiroyli placeholder */
.media-card-no-poster { width:100%; height:100%; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px; background: linear-gradient(135deg, var(--surface-2) 0%, var(--surface-3,var(--surface-2)) 100%); }
.media-card-no-poster .material-symbols-rounded { font-size:32px; color:var(--text-muted); opacity:0.5; font-variation-settings:'FILL' 1; }
.media-card-no-poster span.np-label { font-size:10px; color:var(--text-muted); opacity:0.4; }
.media-card-overlay { display: none; }
.media-card-top { position: absolute; top: 10px; left: 10px; right: 10px; z-index: 5; display: flex; align-items: center; justify-content: space-between; pointer-events: none; }
.media-card-badge { position: static; z-index: 5; }
.ad-badge-mini { display: inline-flex; align-items: center; gap: 3px; background: rgba(0,0,0,0.60); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,0.18); border-radius: 20px; padding: 3px 8px; font-size: 10px; font-weight: 800; color: #fff; letter-spacing: 0.2px; }
.ad-badge-mini .material-symbols-rounded { font-size: 12px; color: var(--accent); font-variation-settings: 'FILL' 1; }
.media-card-multi { position: static; z-index: 5; background: rgba(0,0,0,0.65); border-radius: 999px; padding: 4px 9px; font-size: 11px; font-weight: 800; color: #fff; display: flex; align-items: center; gap: 3px; backdrop-filter: blur(4px); }
/* Play icon — markazda */
.media-card-play-icon {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 4;
  opacity: 0.82;
  transition: opacity 0.2s ease;
  pointer-events: none;
}
.media-card-play-icon .material-symbols-rounded {
  font-size: 50px;
  color: rgba(255,255,255,0.85);
  filter: drop-shadow(0 2px 12px rgba(0,0,0,0.5));
  font-variation-settings: 'FILL' 1;
}
.media-card-type-icon { position: absolute; top: 10px; right: 10px; z-index: 5; background: rgba(0,0,0,0.55); border-radius: 50%; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(4px); }
.media-card-type-icon .material-symbols-rounded { font-size: 15px; color: #fff; }
/* Bottom info */
.media-card-info { padding: 11px 12px 12px; background: var(--surface); }
.media-card-author-row {
  display: flex; align-items: center; gap: 9px; margin-bottom: 7px; min-width: 0;
}
.media-card-avatar {
  width: 34px !important; height: 34px !important; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
  border: 2px solid var(--border);
  background: var(--surface-2);
  display: block;
}
.media-card-avatar-icon {
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: var(--text-muted);
}
.media-card-author-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.media-card-author-name {
  font-size: 13.5px; font-weight: 800; color: var(--text);
  text-shadow: none;
  display: flex; align-items: center; gap: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.media-card-location {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.media-card-location .material-symbols-rounded { font-size: 13px; }
.media-card-desc {
  display: block; font-size: 13px; color: var(--text);
  margin: 0 0 8px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-shadow: none;
}
.media-card-stats {
  display: flex; align-items: center; gap: 12px;
}
.media-card-stat {
  display: flex; align-items: center; gap: 4px;
  font-size: 12.5px; font-weight: 800; color: var(--text-muted);
  text-shadow: none;
}
.media-card-stat .material-symbols-rounded {
  font-size: 16px;
  font-variation-settings: 'FILL' 1;
}
.media-card-stat .material-symbols-rounded.like { color: #ef4444; }
/* Hover: play icon chiqadi */
@media(hover:hover) {
  .media-card:hover .media-card-play-icon { opacity: 1; }
}
/* Touch qurilmalar: tap da play icon ko'rinmaydi (flicker oldini olish) */
@media(hover:none) {
  .media-card-play-icon { display: none; }
  .my-delete-btn { opacity: 1; }
}
.media-card-views { font-size: 13px; font-weight: 700; color: var(--text-muted); display: flex; align-items: center; gap: 4px; text-shadow: none; }
.aspect-916 { aspect-ratio: 9/16; width: 100%; }
/* Explore skeleton: 1 ustunli, ixcham */
.media-grid-skeleton { display: flex; flex-direction: column; gap: 14px; background: transparent; padding: 12px 0; }
.media-grid-skeleton .skeleton { aspect-ratio: 1/1; width: 100%; border-radius: 16px; }
.my-media-card { position: relative; overflow: hidden; background: var(--surface-2); border-radius: 6px; cursor: pointer; transition: transform var(--transition); }
.my-media-card::before { content: ""; display: block; padding-bottom: 100%; }
.my-media-card:hover { transform: scale(1.02); }
.my-delete-btn { position: absolute; top: 6px; right: 6px; z-index: 4; width: 30px; height: 30px; border-radius: 50%; background: rgba(0,0,0,0.70); border: none; color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity var(--transition); backdrop-filter: blur(4px); }
.my-media-card:hover .my-delete-btn { opacity: 1; }

/* ═══════════════════════════════════════════════════════════
   REELS / FEED
   ═══════════════════════════════════════════════════════════ */
.reels-wrap {
  /* Reels fullscreen — nav pastida ham ko'rinsin */
  position: fixed;
  inset: 0;
  z-index: 150;
  background: #000;
  overflow: hidden;
}
.feed-container {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}
.feed-container::-webkit-scrollbar { display: none; }
.feed-item {
  height: 100vh;
  height: 100dvh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  position: relative;
  background: #000;
  overflow: hidden;
  contain: layout style;
}
.reels-topbar { position: absolute; top: 0; left: 0; right: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; padding: calc(12px + env(safe-area-inset-top)) 16px 12px; background: linear-gradient(to bottom, rgba(0,0,0,0.55), transparent); pointer-events: all; }
.reels-topbar-title { font-size: 17px; font-weight: 800; color: #fff; }
/* Legacy (eski kod uchun) */
.reels-btn-back, .reels-btn-mute { background: rgba(255,255,255,0.15); border: none; color: #fff; width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; }

/* Yangi topbar tugmalar */
.reels-topbar-btn { background: rgba(255,255,255,0.15); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.25); color: #fff; border-radius: 24px; display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0 14px; height: 38px; gap: 6px; font-size: 13px; font-weight: 600; transition: background var(--transition); }
.reels-topbar-btn:hover { background: rgba(255,255,255,0.25); }
.reels-topbar-btn .material-symbols-rounded { font-size: 20px; }
.reels-mute-btn { min-width: 100px; }
.reels-mute-btn.muted { background: rgba(244,33,46,0.25); border-color: rgba(244,33,46,0.4); }
.mute-btn-label { font-size: 12px; font-weight: 600; }
.reels-empty-screen { background: var(--bg); }
.reels-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: calc(100dvh - 56px - var(--nav-h)); background: var(--bg); color: var(--text); gap: 12px; text-align: center; padding: 24px; }
.reels-container { height: 100vh; height: 100dvh; overflow-y: auto; scroll-snap-type: y mandatory; scrollbar-width: none; background: #000; }
.reels-container::-webkit-scrollbar { display: none; }
/* feed-container va feed-item — yuqorida .reels-wrap ichida ta'riflangan */

/* ── Feed Skeleton (yuklanish vaqtida) ── */
@keyframes skelPulse {
  0%, 100% { opacity: 0.45; }
  50%       { opacity: 0.85; }
}
.skel-pulse {
  background: rgba(255,255,255,0.12);
  border-radius: 8px;
  animation: skelPulse 1.4s ease-in-out infinite;
}
.feed-skeleton-wrap {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  background: #111;
  overflow: hidden;
}
.feed-skeleton-anim { animation: none; }
.feed-skeleton-item {
  flex: 1 0 100dvh;
  height: 100dvh;
  position: relative;
  display: flex;
  flex-direction: column;
  background: #111;
  scroll-snap-align: start;
}
.feed-sk-media {
  flex: 1;
  width: 100%;
  background: rgba(255,255,255,0.08);
  border-radius: 0;
  animation: skelPulse 1.4s ease-in-out infinite;
}
.feed-sk-info {
  position: absolute;
  bottom: 80px;
  left: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.feed-sk-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  animation-delay: 0.1s;
}
.feed-sk-lines { display: flex; flex-direction: column; gap: 8px; }
.feed-sk-line { height: 12px; border-radius: 6px; animation-delay: 0.2s; }

/* ── Feed bottom loader ── */
.feed-load-spinner {
  display: flex; align-items: center; justify-content: center;
  padding: 24px 0; min-height: 80px;
}
@keyframes feedSpinnerAnim { to { transform: rotate(360deg); } }
.feed-spinner-ring {
  width: 32px; height: 32px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.12);
  border-top-color: rgba(255,255,255,0.7);
  animation: feedSpinnerAnim 0.8s linear infinite;
}
.feed-media-wrap { position: absolute; inset: 0; }
.feed-media-wrap video, .feed-media-wrap img { width: 100%; height: 100%; object-fit: cover; }
.feed-media { width: 100%; height: 100%; position: relative; overflow: hidden; z-index: 1; touch-action: manipulation; }
.feed-media-img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* GPU layer — video decode tezroq, UI qotmaydi */
.feed-video { width: 100%; height: 100%; object-fit: cover; display: block; will-change: transform; transform: translateZ(0); }
.feed-video, .feed-media-img { object-position: center center; }
/* 1:1 yoki landscape media uchun contain rejimi */
.feed-media-img.fit-contain { width: 100% !important; height: auto !important; max-height: 100% !important; object-fit: contain !important; position: absolute !important; top: 50% !important; left: 50% !important; transform: translate(-50%,-50%) !important; z-index: 1; }
.feed-video.fit-contain { width: 100% !important; height: auto !important; max-height: 100% !important; object-fit: contain !important; position: absolute !important; top: 50% !important; left: 50% !important; transform: translate(-50%,-50%) !important; z-index: 1; }
.media-blur-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(26px) brightness(0.4) saturate(1.4); transform: scale(1.1); pointer-events: none; z-index: 0; }

/* ── Video yuklanish animatsiyasi ── */
@keyframes videoSpinner {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
@keyframes videoPulse {
  0%, 100% { opacity: 0.5; transform: scale(0.92); }
  50%       { opacity: 1;   transform: scale(1); }
}
.video-loading-overlay {
  position: absolute; inset: 0; z-index: 15;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; pointer-events: none;
  background: transparent;
  transition: opacity 0.35s ease;
}
/* Poster yo'q bo'lganda qoʻngʻir gradient fon */
.video-loading-overlay.no-poster {
  background: linear-gradient(135deg, #111 0%, #1a1a1a 100%);
}
/* Poster bor bo'lganda — overlay ko'rinmaydi */
.video-loading-overlay.has-poster { display: none !important; }
.video-loading-overlay.hidden { opacity: 0; pointer-events: none; }
.video-loading-ring {
  width: 52px; height: 52px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.08);
  border-top-color: rgba(255,255,255,0.75);
  animation: videoSpinner 0.9s linear infinite;
}
.video-loading-logo {
  width: 26px; height: 26px; border-radius: 8px;
  background: var(--grad); position: absolute;
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  display: flex; align-items: center; justify-content: center;
  animation: videoPulse 1.6s ease-in-out infinite;
}
.video-loading-logo .material-symbols-rounded { font-size: 14px; color: #fff; font-variation-settings: 'FILL' 1; }
.video-loading-wrap { position: relative; width: 52px; height: 52px; }
.video-loading-label { font-size: 12px; color: rgba(255,255,255,0.4); letter-spacing: 0.3px; }
.feed-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, transparent 45%, transparent 70%, rgba(0,0,0,0.15) 100%); }
.feed-gradient { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 50%); pointer-events: none; }
.feed-info { position: absolute; bottom: 0; left: 0; right: 70px; z-index: 8; padding: 12px 12px calc(var(--nav-h) + env(safe-area-inset-bottom) + 14px); display: flex; flex-direction: column; align-items: flex-start; transition: opacity 0.16s ease, transform 0.16s ease; pointer-events: none; }
.feed-info button,
.feed-info a,
.feed-info .feed-desc-toggle { pointer-events: auto; }
@media(min-width:768px) { .feed-info { right: 80px; padding-bottom: 32px; } }
.feed-meta-card { width: min(100%, 340px); padding: 0; border-radius: 0; background: none; border: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; pointer-events: auto; }
.feed-author-line { display: flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; margin-bottom: 0; }
.feed-author-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.feed-author { font-size: 14px; font-weight: 700; color: #fff; display: flex; align-items: center; gap: 7px; max-width: 100%; min-width: 0; padding: 0; background: none; border: 0; text-align: left; }
.feed-author-line .feed-author { flex: 1 1 auto; max-width: min(100%, 300px); align-items: center; }
.feed-author-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.feed-avatar { width: 36px; height: 36px; border-radius: 50%; overflow: hidden; border: 2px solid rgba(255,255,255,0.62); flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.15); box-shadow: 0 2px 8px rgba(0,0,0,0.3); }
.feed-avatar img { width: 100%; height: 100%; object-fit: cover; }
.feed-avatar .material-symbols-rounded { color: rgba(255,255,255,0.8); font-size: 24px; }
.feed-avatar-biz { border: 2px solid var(--accent); box-shadow: 0 0 0 1.5px rgba(29,155,240,0.42), 0 2px 8px rgba(0,0,0,0.3); }
.feed-author-name { font-size: 14px; font-weight: 800; color: #fff; display: flex; align-items: center; gap: 4px; min-width: 0; text-shadow: 0 1px 3px rgba(0,0,0,0.55); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.feed-author-name .verified-badge.badge-feed { font-size: 13px; }
.feed-date { font-size: 12px; color: rgba(255,255,255,0.82); display: inline-flex; align-items: center; gap: 4px; text-shadow: 0 1px 2px rgba(0,0,0,0.45); margin-top: 0; line-height: 1.25; flex-wrap: wrap; }
.feed-date .material-symbols-rounded { font-size: 12px; line-height: 1; }
.feed-meta-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; color: #fff; font-size: 11px; font-weight: 700; }
.feed-meta-stats > span { display: inline-flex; align-items: center; gap: 4px; min-height: 24px; padding: 0 8px; border-radius: 6px; background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.15); line-height: 1; text-shadow: 0 1px 2px rgba(0,0,0,0.8); }
.feed-meta-stats .material-symbols-rounded { font-size: 13px; line-height: 1; color: #fff; }
@media(max-width:420px) {
  .feed-info { right: 68px; padding-left: 12px; padding-right: 8px; }
  .feed-avatar { width: 34px; height: 34px; }
  .feed-author-name { font-size: 13.5px; }
  .feed-date { font-size: 11.5px; }
  .feed-author-line { gap: 9px; }
  .feed-author-line .feed-author { max-width: 100%; }
}
@media(min-width:768px) {
  .feed-author-line .feed-author { max-width: min(100%, 300px); }
  .feed-meta-card { width: min(100%, 322px); padding: 10px; border-radius: 17px; }
}
.feed-desc-wrap { margin-top: 8px; }
.feed-desc { font-size: 14px; color: rgba(255,255,255,0.92); line-height: 1.45; text-shadow: 0 1px 2px rgba(0,0,0,0.4); overflow-wrap: anywhere; white-space: pre-wrap; word-break: break-word; margin: 0; }
.feed-desc-clamped { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.feed-desc-expanded { display: block; max-height: 50vh; overflow-y: auto; padding: 8px 10px; background: rgba(0,0,0,0.35); border-radius: 12px; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.feed-desc-expanded::-webkit-scrollbar { width: 4px; }
.feed-desc-expanded::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.3); border-radius: 4px; }
.feed-desc-toggle { display: inline-block; margin-top: 4px; padding: 2px 0; background: none; border: 0; color: #fff; font-size: 12.5px; font-weight: 700; cursor: pointer; opacity: 0.85; text-shadow: 0 1px 2px rgba(0,0,0,0.4); }
.feed-desc-toggle:hover { opacity: 1; text-decoration: underline; }
.profile-bio-wrap { max-width: 320px; margin: 0 auto 12px; }
.profile-bio-clamped { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.profile-bio-toggle { display: inline-block; margin-top: 4px; background: none; border: 0; color: var(--accent); font-size: 13px; font-weight: 600; cursor: pointer; padding: 2px 6px; }
.profile-bio-toggle:hover { text-decoration: underline; }
/* ── Hashtag + Mention links ── */
.hashtag-link, .mention-link { display: inline; background: none; border: 0; padding: 0; margin: 0; font-size: inherit; font-weight: 700; cursor: pointer; line-height: inherit; text-shadow: none; }
.hashtag-link { color: #60a5fa; }
.mention-link { color: #a78bfa; }
.hashtag-link:hover { color: #93c5fd; text-decoration: underline; }
.mention-link:hover { color: #c4b5fd; text-decoration: underline; }
.feed-desc .hashtag-link { color: #93c5fd; text-shadow: 0 1px 3px rgba(0,0,0,0.5); }
.feed-desc .mention-link { color: #c4b5fd; text-shadow: 0 1px 3px rgba(0,0,0,0.5); }
.profile-bio .hashtag-link { color: var(--accent); }
.profile-bio .mention-link { color: #7c3aed; }

/* ── Nav badge ── */
.nav-notif-wrap { position: relative; display: inline-flex; align-items: center; justify-content: center; }
.nav-badge { position: absolute; top: -6px; right: -8px; min-width: 17px; height: 17px; border-radius: 9px; background: #ef4444; color: #fff; font-size: 10px; font-weight: 700; line-height: 17px; text-align: center; padding: 0 3px; border: 2px solid var(--surface); }
.mobile-nav-item .nav-badge { top: -4px; right: -4px; }

/* ── Notifications screen ── */
.notif-list { display: flex; flex-direction: column; gap: 0; }
.notif-card { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background var(--transition); position: relative; }
.notif-card:hover { background: var(--surface-2); }
.notif-card.unread { background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.notif-card.unread:hover { background: color-mix(in srgb, var(--accent) 13%, var(--surface)); }
.notif-avatar { position: relative; flex-shrink: 0; width: 46px; height: 46px; border-radius: 50%; background: var(--surface-2); overflow: visible; cursor: pointer; }
.notif-avatar img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; display: block; }
.notif-avatar .material-symbols-rounded { font-size: 28px; color: var(--text-muted); position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); }
.notif-type-icon { position: absolute; bottom: -2px; right: -4px; width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 2px solid var(--surface); font-size: 10px; }
.notif-type-icon .material-symbols-rounded { font-size: 11px; }
.notif-type-like { background: #ef4444; color: #fff; }
.notif-type-comment { background: var(--accent); color: #fff; }
.notif-type-reply { background: #10b981; color: #fff; }
.notif-type-mention { background: #f59e0b; color: #fff; }
.notif-body { flex: 1; min-width: 0; }
.notif-msg { font-size: 14px; color: var(--text); margin: 0 0 3px; line-height: 1.4; }
.notif-msg strong { color: var(--text); }
.notif-text { font-size: 13px; color: var(--text-muted); margin: 0 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.notif-time { font-size: 12px; color: var(--text-dim); }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex-shrink: 0; margin-top: 6px; }
.notif-loading { padding: 16px; }
.notif-skel { display: flex; gap: 12px; align-items: center; padding: 10px 0; }
.notif-skel-avatar { width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0; }
.notif-skel-lines { flex: 1; display: flex; flex-direction: column; gap: 6px; }

/* ── @mention autocomplete ── */
.mention-dropdown { position: absolute; bottom: 100%; left: 0; right: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 -4px 24px rgba(0,0,0,0.15); overflow: hidden; z-index: 200; max-height: 220px; overflow-y: auto; }
.mention-option { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 14px; background: none; border: 0; border-bottom: 1px solid var(--border); cursor: pointer; text-align: left; transition: background var(--transition); }
.mention-option:last-child { border-bottom: 0; }
.mention-option:hover { background: var(--surface-2); }
.mention-option-pic { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--surface-2); display: flex; align-items: center; justify-content: center; }
.mention-no-pic { font-size: 20px; color: var(--text-muted); }
.mention-option-name { font-size: 14px; font-weight: 600; color: var(--text); }
.mention-option-un { font-size: 12px; color: var(--text-muted); margin-left: 4px; }
.feed-actions { position: absolute; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 20px); right: 10px; z-index: 10; display: flex; flex-direction: column; align-items: center; gap: 13px; transition: opacity 0.16s ease, transform 0.16s ease; }
.feed-item.controls-hidden .feed-info,
.feed-item.controls-hidden .feed-actions,
.feed-item.controls-hidden .feed-dots,
.feed-item.controls-hidden .ad-badge {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: translateY(10px) scale(0.98) !important;
}
.feed-item.controls-hidden .feed-gradient {
  opacity: 0 !important;
}
.feed-item.controls-hidden .feed-media,
.feed-item.controls-hidden .media-slider,
.feed-item.controls-hidden .media-slide {
  background: #000 !important;
}
.feed-item.controls-hidden .feed-video,
.feed-item.controls-hidden .feed-media-img {
  object-fit: contain !important;
}
@media(min-width:768px) { .feed-actions { bottom: 28px; } }
.feed-action-btn { display: flex; flex-direction: column; align-items: center; gap: 5px; width: 62px; color: #fff; font-size: 11px; font-weight: 700; cursor: pointer; text-shadow: 0 1px 3px rgba(0,0,0,0.5); border: none; background: none; transition: transform 0.15s; outline: none; -webkit-tap-highlight-color: transparent; }
.feed-action-btn:focus { outline: none; }
.feed-action-btn:active { transform: scale(0.92); }
.feed-action-icon { width: 48px; height: 48px; aspect-ratio: 1 / 1; border-radius: 50%; background: rgba(255,255,255,0.16); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); display: flex; align-items: center; justify-content: center; border: 1px solid rgba(255,255,255,0.28); box-sizing: border-box; flex: 0 0 48px; overflow: visible; transition: all var(--transition); }
.feed-action-btn:focus-visible .feed-action-icon { outline: none; box-shadow: 0 0 0 3px rgba(255,255,255,0.36); }
.feed-action-btn:hover .feed-action-icon, .feed-action-btn:active .feed-action-icon { background: rgba(255,255,255,0.24); }
.feed-action-icon .material-symbols-rounded { font-size: 28px; line-height: 1; }
.feed-like-btn,
.feed-action-btn:has(.feed-action-like) { width: 74px; padding: 0; border-radius: 999px; background: transparent !important; }
.feed-action-icon.feed-action-like,
.feed-like-btn .feed-action-icon.feed-action-like {
  width: 52px !important;
  height: 52px !important;
  min-width: 52px;
  min-height: 52px;
  flex-basis: 52px;
  border-radius: 9999px !important;
  clip-path: circle(50% at 50% 50%);
  background: rgba(12,12,12,0.52);
  border: 2px solid rgba(255,255,255,0.36);
  box-shadow: 0 8px 22px rgba(0,0,0,0.32), inset 0 0 0 1px rgba(255,255,255,0.08);
}
.feed-action-btn:hover .feed-action-icon.feed-action-like,
.feed-action-btn:active .feed-action-icon.feed-action-like,
.feed-like-btn:hover .feed-action-icon.feed-action-like,
.feed-like-btn:active .feed-action-icon.feed-action-like {
  background: rgba(18,18,18,0.66);
}
.feed-action-icon.feed-action-like > .material-symbols-rounded,
.feed-like-btn .feed-action-icon.feed-action-like > .material-symbols-rounded {
  font-size: 32px !important;
}
.feed-call-btn { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; background: #008254; color: #fff; padding: 10px 20px; border-radius: 12px; font-size: 14px; font-weight: 800; border: none; width: fit-content; margin-top: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; box-shadow: 0 4px 15px rgba(0,0,0,0.3); transition: transform 0.2s; }
.feed-call-btn:active { transform: scale(0.95); }
.like-active { color: #F4212E !important; font-variation-settings: 'FILL' 1 !important; }

/* Feed action like wrapper */
.feed-action-icon.feed-action-like { border-radius: 9999px !important; }
.feed-action-like { position: relative; display: flex; align-items: center; justify-content: center; width: 56px !important; height: 56px !important; }
.feed-action-like.liked .material-symbols-rounded { color: #F4212E; font-variation-settings: 'FILL' 1; }

/* Biznes like icon */
.biz-like-icon { position: relative; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; }
.biz-heart { font-size: 38px; color: rgba(255,255,255,0.9); transition: color 0.2s, transform 0.2s; }
.biz-heart.filled { color: #F4212E; font-variation-settings: 'FILL' 1; transform: scale(1.1); }
.biz-like-badge { position: absolute; bottom: 2px; right: 0; background: var(--accent); border-radius: 50%; width: 17px; height: 17px; display: flex; align-items: center; justify-content: center; border: 1.5px solid rgba(0,0,0,0.55); }
.biz-like-badge .material-symbols-rounded { font-size: 10px; color: #fff; font-variation-settings: 'FILL' 1; }
.biz-like-icon.liked .biz-heart { color: #F4212E; font-variation-settings: 'FILL' 1; }
.biz-like-icon.liked .biz-like-badge { background: #F4212E; animation: bizLikePop 0.4s cubic-bezier(0.175,0.885,0.32,1.275); }
@keyframes bizLikePop { 0% { transform: scale(0); } 70% { transform: scale(1.3); } 100% { transform: scale(1); } }
.feed-dots {
  position: absolute;
  top: 52px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 30;
  padding: 6px 10px;
  background: rgba(0,0,0,0.25);
  backdrop-filter: blur(4px);
  border-radius: 20px;
}
.feed-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.feed-dot.active {
  background: #fff;
  width: 24px;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(var(--accent-rgb), 0.5);
}
.media-slider {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  width: 100%;
  height: 100%;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.3) transparent;
  -webkit-overflow-scrolling: touch;
}
.media-slider::-webkit-scrollbar {
  height: 6px;
}
.media-slider::-webkit-scrollbar-track {
  background: transparent;
}
.media-slider::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.25);
  border-radius: 10px;
}
.media-slider:hover::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.45);
}
@media(max-width: 768px) {
  .media-slider::-webkit-scrollbar { display: none; }
  .media-slider { scrollbar-width: none; }
}
.media-slide { flex: 0 0 100%; scroll-snap-align: start; width: 100%; height: 100%; position: relative; overflow: hidden; }
.mute-icon { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); background: rgba(0,0,0,0.55); border-radius: 50%; width: 56px; height: 56px; display: flex; align-items: center; justify-content: center; color: #fff; pointer-events: none; z-index: 30; animation: fadeInO 0.2s ease, fadeOutO 0.5s ease 1s forwards; }
.play-pop-anim { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); background: rgba(0,0,0,0.55); border-radius: 50%; width: 64px; height: 64px; display: flex; align-items: center; justify-content: center; color: #fff; pointer-events: none; z-index: 30; animation: fadeInO 0.2s ease, fadeOutO 0.4s ease 0.8s forwards; }
.play-pop-anim .material-symbols-rounded { font-size: 36px; }
/* Video paused holati — doimiy ko'rinadigan overlay */
.feed-item.is-paused::before { content: ''; position: absolute; inset: 0; background: rgba(0,0,0,0.25); z-index: 20; pointer-events: none; }
.feed-item.is-paused .pause-indicator { opacity: 1 !important; }
/* Bosib turganda (controls-hidden) + paused — pause icon doim ko'rinsin */
.feed-item.controls-hidden.is-paused .pause-indicator { opacity: 1 !important; visibility: visible !important; }
/* Bosib turganda (controls-hidden) + o'ynayotgan — icon ko'rinmasin */
.feed-item.controls-hidden:not(.is-paused) .pause-indicator { opacity: 0 !important; }
.pause-indicator { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); background: rgba(0,0,0,0.60); border-radius: 50%; width: 64px; height: 64px; display: flex; align-items: center; justify-content: center; color: #fff; pointer-events: none; z-index: 35; opacity: 0; transition: opacity 0.2s; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.pause-indicator .material-symbols-rounded { font-size: 36px; }
.is-buffering::after { content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 40px; height: 40px; border: 3px solid rgba(255,255,255,0.3); border-top-color: #fff; border-radius: 50%; animation: spin 0.8s linear infinite; }
/* ── Heart (double-tap like) animatsiyasi ────────────────────── */
.heart-anim {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%,-50%) scale(0);
  font-size: 88px; color: #F4212E; pointer-events: none; z-index: 30;
  filter: drop-shadow(0 4px 16px rgba(244,33,46,0.55));
  will-change: transform, opacity;
}
.heart-anim.anim-pop {
  animation: heartBurst 0.65s cubic-bezier(0.175,0.885,0.32,1.275) forwards !important;
}
@keyframes heartBurst {
  0%   { transform: translate(-50%,-50%) scale(0);   opacity: 1; }
  35%  { transform: translate(-50%,-50%) scale(1.25); opacity: 1; }
  55%  { transform: translate(-50%,-50%) scale(0.95); opacity: 1; }
  75%  { transform: translate(-50%,-50%) scale(1.08); opacity: 1; }
  90%  { transform: translate(-50%,-50%) scale(1.0);  opacity: 1; }
  100% { transform: translate(-50%,-50%) scale(0);    opacity: 0; }
}

/* ── Like tugmasi animatsiyasi ───────────────────────────────── */
@keyframes likeBounce {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.45); }
  60%  { transform: scale(0.88); }
  80%  { transform: scale(1.15); }
  100% { transform: scale(1); }
}
.like-bounce { animation: likeBounce 0.4s cubic-bezier(0.175,0.885,0.32,1.275) forwards; }

/* ── Biznes like animatsiyasi (profil rasmi + yurak) ─────────── */
.biz-like-anim {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%,-50%) scale(0);
  pointer-events: none; z-index: 30;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  will-change: transform, opacity;
}
.biz-like-anim.anim-pop {
  animation: bizLikeBurst 0.7s cubic-bezier(0.175,0.885,0.32,1.275) forwards !important;
}
@keyframes bizLikeBurst {
  0%   { transform: translate(-50%,-50%) scale(0);    opacity: 1; }
  35%  { transform: translate(-50%,-50%) scale(1.2);  opacity: 1; }
  60%  { transform: translate(-50%,-50%) scale(0.92); opacity: 1; }
  80%  { transform: translate(-50%,-50%) scale(1.05); opacity: 1; }
  90%  { transform: translate(-50%,-50%) scale(1.0);  opacity: 1; }
  100% { transform: translate(-50%,-50%) scale(0);    opacity: 0; }
}
.biz-like-anim-img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 3px solid #fff; box-shadow: 0 6px 28px rgba(0,0,0,0.55); }
.biz-like-anim-fallback { width: 96px; height: 96px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--purple)); display: flex; align-items: center; justify-content: center; border: 3px solid #fff; box-shadow: 0 6px 28px rgba(0,0,0,0.55); }
.biz-like-anim-fallback .material-symbols-rounded { font-size: 44px; color: #fff; font-variation-settings: 'FILL' 1; }
.biz-like-anim-heart { font-size: 32px; line-height: 1; filter: drop-shadow(0 2px 8px rgba(244,33,46,0.7)); }
.feed-ad { background: #0a0a0a; }
.ad-badge {
  position: absolute;
  top: calc(72px + env(safe-area-inset-top));
  left: 16px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 24px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.3px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  animation: adBadgeFadeIn 0.5s ease;
}
.ad-badge .material-symbols-rounded {
  font-size: 18px;
  color: var(--accent);
  font-variation-settings: 'FILL' 1;
}
@keyframes adBadgeFadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
.ad-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: 28px;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  border: none;
  cursor: pointer;
  margin-top: 14px;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
  width: fit-content;
}
.ad-cta-btn:hover {
  transform: translateY(-2px) scale(1.03);
  filter: brightness(1.1);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
}
.ad-cta-btn:active { transform: scale(0.96); }
.ad-cta-btn .material-symbols-rounded { font-size: 20px; }
.ad-title { font-size: 14px; font-weight: 600; }

@media(min-width:768px) {
  :root { --reel-desktop-h: min(calc(100dvh - 36px), 760px); }
  .reels-wrap {
    left: var(--desk-nav-w);
    display: flex;
    justify-content: center;
    align-items: center;
    background: #111;
    padding: 18px 0;
  }
  .reels-topbar {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    top: calc((100dvh - var(--reel-desktop-h)) / 2);
    width: min(calc(100vw - var(--desk-nav-w) - 72px), calc(var(--reel-desktop-h) * 9 / 16));
    max-width: 392px;
    border-top-left-radius: 22px;
    border-top-right-radius: 22px;
  }
  .feed-container {
    position: relative;
    width: min(calc(100vw - var(--desk-nav-w) - 72px), calc(var(--reel-desktop-h) * 9 / 16));
    max-width: 392px;
    height: var(--reel-desktop-h);
    background: #000;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.08), 0 18px 60px rgba(0,0,0,0.35);
  }
  .feed-item { width: 100%; height: var(--reel-desktop-h); }
  .feed-actions { right: 8px; gap: 12px; }
  .feed-info { right: 68px; padding-bottom: 28px; }
}

/* ═══════════════════════════════════════════════════════════
   PROFILE
   ═══════════════════════════════════════════════════════════ */
/* ─── Profile Card ──────────────────────────────────────────── */
.profile-card { text-align: center; padding: 28px 20px 20px; background: var(--surface); margin-bottom: 2px; }

/* Avatar */
.profile-avatar-wrap { display: flex; justify-content: center; margin-bottom: 16px; position: relative; width: fit-content; margin-left: auto; margin-right: auto; }
.profile-avatar { width: 96px; height: 96px; border-radius: 50%; overflow: hidden; background: var(--surface-2); display: flex; align-items: center; justify-content: center; border: 3px solid var(--surface); box-shadow: 0 0 0 2px var(--border), var(--shadow); cursor: pointer; transition: transform var(--transition); }
.profile-avatar:hover { transform: scale(1.04); }
.profile-avatar-biz { box-shadow: 0 0 0 3px var(--accent), 0 4px 20px rgba(99,102,241,0.25); animation: bizPulse 2.5s ease infinite; }
@keyframes bizPulse { 0%,100% { box-shadow: 0 0 0 3px var(--accent), 0 4px 20px rgba(99,102,241,0.20); } 50% { box-shadow: 0 0 0 5px var(--accent), 0 4px 24px rgba(99,102,241,0.35); } }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-avatar-icon { font-size: 48px; color: var(--text-muted); }
.avatar-edit-btn { position: absolute; bottom: 0; right: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--grad); border: 2.5px solid var(--surface); display: flex; align-items: center; justify-content: center; cursor: pointer; color: #fff; box-shadow: 0 2px 8px rgba(99,102,241,0.35); transition: transform var(--transition); }
.avatar-edit-btn:hover { transform: scale(1.1); }
.avatar-edit-btn .material-symbols-rounded { font-size: 15px; }
.avatar-biz-ring { display: none; }

/* Name & info */
.profile-name { font-size: 21px; font-weight: 800; display: flex; align-items: center; justify-content: center; gap: 6px; margin-bottom: 3px; letter-spacing: -0.3px; }
.profile-username { font-size: 14px; color: var(--text-muted); margin-bottom: 8px; font-weight: 500; }
.profile-bio { max-width: 320px; margin: 0 auto 12px; font-size: 14px; line-height: 1.5; color: var(--text-dim); overflow-wrap: anywhere; }

.profile-action-chips { display: flex; justify-content: center; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 auto 16px; padding: 0 16px; width: 100%; max-width: 400px; }
.profile-chip { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; border-radius: 10px; font-size: 13.5px; font-weight: 650; cursor: pointer; transition: all var(--transition); border: 1px solid var(--border); background: var(--surface-2); color: var(--text); position: relative; min-width: 120px; }
.profile-chip:hover { border-color: var(--accent); background: var(--surface); transform: translateY(-1px); box-shadow: var(--shadow); }
.profile-chip .material-symbols-rounded { font-size: 18px; color: var(--accent); }
.chip-copy-icon { font-size: 14px !important; opacity: 0.4; margin-left: auto; }
.profile-chip-hidden { cursor: default; background: var(--surface-2); border-color: transparent; color: var(--text-muted); opacity: 0.7; }
.profile-chip-hidden .material-symbols-rounded { color: var(--text-muted); }

.profile-premium-badge { display: inline-flex; align-items: center; gap: 5px; background: linear-gradient(135deg, rgba(99,102,241,0.10), rgba(168,85,247,0.12)); border: 1px solid rgba(99,102,241,0.20); border-radius: 20px; padding: 5px 14px; font-size: 12px; font-weight: 700; color: var(--accent); margin-bottom: 12px; cursor: pointer; transition: all var(--transition); }

/* Stats row — Instagram style */
.profile-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(86px, 1fr)); gap: 8px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); overflow: visible; }
.profile-stat { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-width: 0; min-height: 62px; padding: 10px 8px; position: relative; cursor: default; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.profile-stat:not(:last-child)::after { display: none; }
.profile-stat-num { font-size: 18px; font-weight: 800; color: var(--text); line-height: 1; letter-spacing: -0.5px; white-space: nowrap; }
.profile-stat-lbl { font-size: 10px; color: var(--text-muted); font-weight: 500; margin-top: 2px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; padding: 0 2px; }
.profile-stat-btn { cursor: pointer; transition: background var(--transition), transform var(--transition), border-color var(--transition); }
.profile-stat-btn:hover { background: var(--surface-2); }
@media(min-width:480px) {
  .profile-stat-num { font-size: 22px; }
  .profile-stat-lbl { font-size: 11px; }
  .profile-stat { padding: 16px 8px 12px; }
}

.profile-media-section { padding: 0 2px; background: var(--surface); }
.badge-biz { display: inline-flex; align-items: center; gap: 4px; background: rgba(29,155,240,0.10); color: var(--accent); border-radius: 20px; padding: 3px 10px; font-size: 11px; font-weight: 700; }
.badge-free { display: inline-flex; align-items: center; gap: 4px; background: var(--surface-2); color: var(--text-muted); border-radius: 20px; padding: 3px 10px; font-size: 11px; font-weight: 700; }

/* ═══════════════════════════════════════════════════════════
   UPLOAD — Redesigned
   ═══════════════════════════════════════════════════════════ */
.upload-screen { background: var(--bg); }
.upload-header-icon { width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, var(--accent), var(--purple)); display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0; }
.upload-header-icon .material-symbols-rounded { font-size: 20px; }

.upload-page-body { max-width: 540px; margin: 0 auto; padding: 16px; display: flex; flex-direction: column; gap: 14px; padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 24px); }
@media(min-width:768px) { .upload-page-body { padding-bottom: 40px; } }

/* Drop zone */
.upload-zone-card { background: var(--surface); border-radius: 20px; border: 2px dashed var(--border); cursor: pointer; overflow: hidden; transition: border-color var(--transition), box-shadow var(--transition); min-height: 200px; }
.upload-zone-card:hover, .upload-zone-card.drag-active { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(29,155,240,0.08); }

/* Empty state */
.upload-dz-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 44px 24px; text-align: center; }
.upload-dz-icon-wrap { width: 72px; height: 72px; border-radius: 20px; background: linear-gradient(135deg, rgba(29,155,240,0.12), rgba(124,58,237,0.12)); display: flex; align-items: center; justify-content: center; margin-bottom: 4px; }
.upload-dz-big-icon { font-size: 36px; color: var(--accent); }
.upload-dz-texts { display: flex; flex-direction: column; gap: 4px; }
.upload-dz-texts strong { font-size: 16px; font-weight: 700; }
.upload-dz-texts span { font-size: 13px; color: var(--text-muted); }
.upload-dz-tag { display: inline-flex; align-items: center; gap: 4px; background: rgba(29,155,240,0.10); color: var(--accent); border-radius: 20px; padding: 4px 10px; font-size: 12px; font-weight: 600; margin-top: 4px; width: fit-content; align-self: center; }

/* Preview grid */
.upload-preview-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 8px; }
.upload-preview-grid.single { grid-template-columns: 1fr; max-width: 320px; margin: 0 auto; }
.upload-preview-item { position: relative; border-radius: 14px; overflow: hidden; aspect-ratio: 1/1; background: #000; }
.upload-preview-grid.single .upload-preview-item { aspect-ratio: 1/1; max-height: 320px; }
.upload-preview-add { border-radius: 14px; aspect-ratio: 1/1; background: var(--surface-2); border: 2px dashed var(--border); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--text-muted); font-size: 12px; font-weight: 600; cursor: pointer; transition: all var(--transition); }
.upload-preview-thumb { width: 100%; height: 100%; object-fit: cover; display: block; }
.upload-preview-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.5) 0%, transparent 50%); }
.upload-preview-type { position: absolute; top: 8px; left: 8px; background: rgba(0,0,0,0.5); border-radius: 8px; padding: 4px 6px; display: flex; align-items: center; }
.upload-preview-type .material-symbols-rounded { font-size: 16px; color: #fff; }
.upload-preview-remove { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 50%; background: rgba(244,33,46,0.9); border: none; color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.upload-preview-remove .material-symbols-rounded { font-size: 16px; }
.upload-preview-name { position: absolute; bottom: 0; left: 0; right: 0; padding: 6px 8px; font-size: 11px; color: #fff; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upload-preview-add:hover { border-color: var(--accent); color: var(--accent); background: rgba(99,102,241,0.05); }
.upload-preview-add .material-symbols-rounded { font-size: 32px; }

/* File detail list */
.upload-files-detail { background: var(--surface); border-radius: 14px; border: 1px solid var(--border); overflow: hidden; }
.upload-file-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--border-2); }
.upload-file-row:last-child { border-bottom: none; }
.upload-file-icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.upload-file-icon.img-icon { background: rgba(0,186,124,0.12); color: var(--success); }
.upload-file-icon.vid-icon { background: rgba(29,155,240,0.12); color: var(--accent); }
.upload-file-icon .material-symbols-rounded { font-size: 20px; }
.upload-file-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.upload-file-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upload-file-size { font-size: 12px; color: var(--text-muted); }
.upload-file-del { width: 32px; height: 32px; border-radius: 50%; background: rgba(244,33,46,0.08); border: none; color: var(--danger); display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }
.upload-file-del .material-symbols-rounded { font-size: 18px; }

/* Fields */
.upload-field-card { background: var(--surface); border-radius: 16px; border: 1px solid var(--border); padding: 16px; }
.upload-field-label { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text-muted); margin-bottom: 10px; }
.upload-field-label .material-symbols-rounded { font-size: 17px; }
.upload-field-hint { font-size: 12px; color: var(--text-muted); margin-top: 6px; }
.upload-textarea { width: 100%; background: var(--surface-2); border: 1.5px solid var(--border); border-radius: 12px; padding: 12px 14px; color: var(--text); font-size: 15px; resize: none; outline: none; transition: border-color var(--transition); line-height: 1.5; }
.upload-textarea:focus { border-color: var(--accent); background: var(--surface); }
.upload-char-count { font-size: 11px; color: var(--text-muted); text-align: right; margin-top: 4px; }

/* Toggle row */
.upload-toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.upload-toggle-info { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.upload-toggle-icon { font-size: 20px; color: var(--accent); flex-shrink: 0; }
.upload-toggle-title { font-size: 15px; font-weight: 600; }
.upload-toggle-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.upload-biz-only-notice { display: flex; align-items: center; gap: 12px; padding: 4px 0; color: var(--text-muted); }
.upload-biz-only-notice .material-symbols-rounded { font-size: 24px; color: var(--text-muted); opacity: 0.5; }
.upload-biz-only-notice div { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.upload-biz-only-notice strong { font-size: 14px; color: var(--text); }
.upload-biz-only-notice span { font-size: 12px; }

/* Promo banner */
.upload-promo-banner { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: linear-gradient(135deg, rgba(29,155,240,0.08), rgba(124,58,237,0.08)); border: 1.5px solid rgba(124,58,237,0.20); border-radius: 16px; padding: 14px 16px; cursor: pointer; transition: all var(--transition); }
.upload-promo-banner:hover { border-color: var(--purple); background: linear-gradient(135deg, rgba(29,155,240,0.12), rgba(124,58,237,0.12)); }
.upload-promo-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.upload-promo-icon { width: 42px; height: 42px; border-radius: 12px; background: linear-gradient(135deg, var(--accent), var(--purple)); display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0; }
.upload-promo-icon .material-symbols-rounded { font-size: 22px; }
.upload-promo-title { font-size: 14px; font-weight: 700; color: var(--purple); }
.upload-promo-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.upload-promo-arrow { font-size: 22px; color: var(--purple); flex-shrink: 0; }

/* Progress */
.upload-progress-card { background: var(--surface); border-radius: 14px; border: 1px solid var(--border); padding: 14px 16px; }
.upload-progress-header { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; margin-bottom: 10px; }
.upload-progress-pct { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--accent); }
.upload-progress-pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: progressPulse 1s ease infinite; flex-shrink: 0; }
@keyframes progressPulse { 0%,100% { opacity:1; transform:scale(1); } 50% { opacity:0.5; transform:scale(1.3); } }
.upload-progress-track { height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.upload-progress-bar { height: 100%; background: linear-gradient(90deg, var(--accent), var(--purple)); border-radius: 3px; transition: width 0.25s ease; }

/* Submit button — big & bold */
.upload-submit-btn-main { width: 100%; padding: 0; background: linear-gradient(135deg, var(--accent) 0%, #1a7fd4 50%, var(--purple) 100%); border: none; border-radius: 18px; color: #fff; font-size: 16px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: space-between; overflow: hidden; transition: opacity var(--transition), transform var(--transition); min-height: 58px; box-shadow: 0 6px 24px rgba(29,155,240,0.35); }
.upload-submit-btn-main:hover:not(:disabled) { opacity: 0.93; transform: translateY(-1px); box-shadow: 0 8px 28px rgba(29,155,240,0.45); }
.upload-submit-btn-main:active:not(:disabled) { transform: translateY(0); }
.upload-submit-btn-main.disabled, .upload-submit-btn-main:disabled { background: var(--surface-3); color: var(--text-muted); cursor: not-allowed; box-shadow: none; }
.upload-submit-btn-main.uploading { opacity: 0.7; cursor: wait; }
.upload-btn-inner { display: flex; align-items: center; gap: 10px; padding: 16px 20px; font-size: 16px; font-weight: 700; }
.upload-btn-inner .material-symbols-rounded { font-size: 22px; }
.upload-btn-badge { background: rgba(255,255,255,0.2); border-radius: 20px; padding: 4px 14px; font-size: 12px; font-weight: 700; margin-right: 16px; white-space: nowrap; }

/* Legacy compat */
.progress-track { height: 4px; background: var(--surface-2); border-radius: 2px; overflow: hidden; margin-top: 8px; }
.progress-bar { height: 100%; background: linear-gradient(90deg, var(--accent), var(--purple)); border-radius: 2px; transition: width 0.3s ease; }
.progress-label { font-size: 12px; color: var(--text-muted); text-align: right; margin-top: 2px; }

/* ═══════════════════════════════════════════════════════════
   SETTINGS
   ═══════════════════════════════════════════════════════════ */
.settings-wrap { max-width: 600px; margin: 0 auto; padding: 16px; }
.settings-title { font-size: 22px; font-weight: 700; margin-bottom: 20px; }
.settings-section { background: var(--surface); border-radius: var(--radius); overflow: hidden; margin-bottom: 16px; border: 1px solid var(--border); }
.settings-section-title { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; padding: 12px 16px 4px; }
.settings-item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer; transition: background var(--transition); border-top: 1px solid var(--border); }
.settings-item:first-of-type { border-top: none; }
.settings-item:hover { background: var(--surface-2); }
.settings-item-left { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.settings-item-left > .material-symbols-rounded { font-size: 22px; color: var(--accent); flex-shrink: 0; }
.settings-item-label { font-size: 15px; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; }
.settings-premium-tag { display: inline-flex; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #fff; box-shadow: 0 1px 3px rgba(245,158,11,0.3); letter-spacing: 0.2px; }
.settings-item-sub { font-size: 13px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.settings-chevron { color: var(--text-muted); font-size: 20px; flex-shrink: 0; }
.settings-logout-btn { width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 14px; background: none; border: none; color: var(--danger); font-size: 16px; font-weight: 600; cursor: pointer; }
.settings-logout-btn:hover { background: rgba(244,33,46,0.06); }
.settings-version { text-align: center; color: var(--text-muted); font-size: 12px; padding: 16px 0 8px; }
.settings-input { width: 100%; background: var(--surface-2); border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: 10px 14px; color: var(--text); font-size: 15px; outline: none; transition: border-color 0.2s; }
.settings-input:focus { border-color: var(--accent); }
.settings-input-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.settings-label { font-size: 13px; color: var(--text-muted); margin-bottom: 6px; display: block; }
.settings-input-with-prefix { display: flex; align-items: center; background: var(--surface-2); border: 1.5px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; transition: border-color 0.2s; }
.settings-input-with-prefix:focus-within { border-color: var(--accent); }
.settings-input-prefix { padding: 0 8px 0 14px; font-size: 16px; font-weight: 600; color: var(--text-muted); flex-shrink: 0; }
.settings-input-prefixed { border: none !important; background: transparent !important; border-radius: 0 !important; padding-left: 2px !important; flex: 1; }
.reply-banner { display: flex; align-items: center; gap: 6px; padding: 8px 16px; background: var(--surface-2); border-top: 1px solid var(--border); font-size: 13px; color: var(--text-muted); }

/* ═══════════════════════════════════════════════════════════
   COMMENTS
   ═══════════════════════════════════════════════════════════ */
.comments-panel { position: fixed; bottom: 0; left: 0; right: 0; height: min(78vh, calc(100dvh - env(safe-area-inset-top) - 12px)); background: var(--surface); border-radius: 20px 20px 0 0; z-index: 700; display: flex; flex-direction: column; transform: translateY(100%); transition: transform 0.3s cubic-bezier(0.4,0,0.2,1); box-shadow: 0 -4px 32px rgba(0,0,0,0.12); }
.comments-panel.active { transform: translateY(0); }
@media(min-width:900px) { .comments-panel { left: var(--desk-nav-w); max-width: 480px; } }
.comments-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.comments-header h3 { font-size: 16px; font-weight: 700; }
.comments-close-btn { background: none; border: none; cursor: pointer; color: var(--text-muted); display: flex; padding: 4px; }
.comments-list { flex: 1; overflow-y: auto; padding: 8px 0; }
.comments-input-row { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--border); flex-shrink: 0; padding-bottom: max(10px, env(safe-area-inset-bottom)); }
.comments-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.avatar-fallback { display: flex; align-items: center; justify-content: center; background: var(--surface-2); color: var(--text-muted); }
.comments-input { flex: 1; background: var(--surface-2); border: 1.5px solid var(--border); border-radius: 20px; padding: 8px 14px; color: var(--text); font-size: 14px; outline: none; }
.comments-input:focus { border-color: var(--accent); }
.comments-send-btn { background: var(--accent); border: none; border-radius: 50%; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: #fff; flex-shrink: 0; }
.comments-empty, .comments-error, .comments-end { text-align: center; padding: 32px 16px; color: var(--text-muted); font-size: 14px; }
.comment-item { display: flex; gap: 10px; padding: 10px 16px; }
.comment-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; cursor: pointer; flex-shrink: 0; }
.comment-avatar-biz { border: 1.5px solid var(--accent); }
.comment-body { flex: 1; min-width: 0; }
.comment-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; }
.comment-author { font-weight: 600; font-size: 13px; cursor: pointer; }
.comment-author:hover { color: var(--accent); }
.comment-time { font-size: 12px; color: var(--text-muted); }
.comment-text { font-size: 14px; line-height: 1.4; word-break: break-word; }
.comment-actions { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.comment-like-btn, .comment-reply-btn, .comment-delete-btn { background: none; border: none; cursor: pointer; color: var(--text-muted); display: flex; align-items: center; gap: 4px; font-size: 12px; padding: 2px 4px; border-radius: 6px; }
.comment-like-btn.liked { color: var(--danger); }
.comment-like-btn.liked .material-symbols-rounded { font-variation-settings: 'FILL' 1; }
.comment-reply-btn:hover { color: var(--accent); }
.comment-delete-btn:hover { color: var(--danger); }
.comment-like-count { font-size: 12px; color: var(--text-muted); }
.comment-replies { margin-top: 8px; padding-left: 8px; border-left: 2px solid var(--border); }
.reply-item { display: flex; gap: 8px; padding: 6px 0; }
.reply-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; cursor: pointer; flex-shrink: 0; }
.comment-avatar.material-symbols-rounded { font-size: 20px; }
.reply-avatar.material-symbols-rounded { font-size: 16px; }
.reply-body { flex: 1; min-width: 0; }

/* ═══════════════════════════════════════════════════════════
   BUSINESS
   ═══════════════════════════════════════════════════════════ */
.biz-wrap { max-width: 480px; margin: 0 auto; padding: 16px; }
.biz-hero { text-align: center; padding: 24px 16px 20px; }
.biz-hero-icon { width: 72px; height: 72px; border-radius: 20px; background: linear-gradient(135deg, rgba(124,58,237,0.12), rgba(29,155,240,0.12)); display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.biz-hero-icon .material-symbols-rounded { font-size: 38px; color: var(--purple); }
.biz-hero-title { font-size: 26px; font-weight: 800; margin-bottom: 6px; }
.biz-hero-sub { color: var(--text-muted); font-size: 15px; }
.biz-active-card { background: linear-gradient(135deg, rgba(124,58,237,0.08), rgba(29,155,240,0.08)); border: 1.5px solid var(--purple); border-radius: 14px; padding: 14px 16px; margin-bottom: 16px; }
.biz-active-badge { display: flex; align-items: center; gap: 6px; font-weight: 700; color: var(--purple); margin-bottom: 4px; }
.biz-expire-text { color: var(--text-muted); font-size: 13px; }
.biz-features { background: var(--surface); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); margin-bottom: 20px; }
.biz-feature-item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-top: 1px solid var(--border); }
.biz-feature-item:first-child { border-top: none; }
.biz-feature-icon { font-size: 22px; color: var(--text-muted); flex-shrink: 0; }
.biz-feature-item.active .biz-feature-icon { color: var(--purple); }
.biz-feature-title { font-size: 15px; font-weight: 500; }
.biz-feature-desc { font-size: 13px; color: var(--text-muted); }
.biz-cta { text-align: center; padding: 8px 0 16px; }
.biz-cta-text { color: var(--text-muted); margin-bottom: 12px; }
.biz-cta-btn { display: inline-flex; align-items: center; gap: 8px; background: #0088cc; color: #fff; padding: 12px 24px; border-radius: 30px; font-weight: 700; text-decoration: none; font-size: 15px; }
.biz-cta-hint { color: var(--text-muted); font-size: 13px; margin-top: 8px; }
.biz-back { text-align: center; padding: 8px 0; }
.promo-icon { width: 48px; height: 48px; border-radius: 14px; background: linear-gradient(135deg,var(--accent),var(--purple)); display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0; }
.promo-icon .material-symbols-rounded { font-size: 26px; }
.promo-card-btn { display: inline-flex; align-items: center; gap: 8px; background: #0088cc; color: #fff; padding: 12px 24px; border-radius: 30px; font-weight: 700; text-decoration: none; font-size: 15px; border: none; cursor: pointer; }

/* ═══════════════════════════════════════════════════════════
   ADMIN
   ═══════════════════════════════════════════════════════════ */
.admin-wrap { max-width: 800px; margin: 0 auto; padding: 16px; }
.admin-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.admin-title { font-size: 22px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.admin-badge { background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 20px; }
.admin-tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin-bottom: 16px; }
.admin-tabs::-webkit-scrollbar { display: none; }
.admin-tab { display: flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 20px; border: 1px solid var(--border); background: var(--surface); color: var(--text-muted); font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: all var(--transition); }
.admin-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.admin-tab .material-symbols-rounded { font-size: 18px; }
.admin-content { min-height: 200px; }
.admin-stats-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; margin-bottom: 20px; }
@media(min-width:600px) { .admin-stats-grid { grid-template-columns: repeat(3,1fr); } }
@media(min-width:800px) { .admin-stats-grid { grid-template-columns: repeat(5,1fr); } }
.admin-stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.stat-icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.stat-icon .material-symbols-rounded { font-size: 20px; }
.stat-value { font-size: 22px; font-weight: 800; }
.stat-label { font-size: 12px; color: var(--text-muted); }
.stat-sub { font-size: 11px; color: var(--success); }
.admin-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.admin-search { flex: 1; min-width: 180px; background: var(--surface); border: 1.5px solid var(--border); border-radius: 10px; padding: 9px 14px; color: var(--text); font-size: 14px; outline: none; }
.admin-search:focus { border-color: var(--accent); }
.admin-toolbar-count { font-size: 13px; color: var(--text-muted); }
.admin-users-list { display: flex; flex-direction: column; gap: 8px; }
.admin-user-row { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.admin-user-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--surface-2); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.admin-user-info { flex: 1; min-width: 0; }
.admin-user-name { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.admin-user-phone { font-size: 12px; color: var(--text-muted); }
.admin-user-username { font-size: 12px; color: var(--accent); }
.admin-blocked-badge { background: rgba(244,33,46,0.10); color: var(--danger); font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 20px; }
.admin-user-actions { display: flex; gap: 6px; flex-shrink: 0; }
.admin-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--border); font-size: 13px; font-weight: 600; cursor: pointer; background: var(--surface); color: var(--text); transition: all var(--transition); }
.admin-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.admin-btn-sm { padding: 6px 10px; }
.admin-btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.admin-btn-danger { background: rgba(244,33,46,0.08); color: var(--danger); border-color: rgba(244,33,46,0.2); }
.admin-btn-success { background: rgba(0,186,124,0.08); color: var(--success); border-color: rgba(0,186,124,0.2); }
.admin-btn .material-symbols-rounded { font-size: 16px; }
.admin-file-picker { width: 100%; display: flex; align-items: center; gap: 12px; border: 1.5px dashed var(--border); background: var(--surface-2); color: var(--text); border-radius: 12px; padding: 14px; text-align: left; cursor: pointer; }
.admin-file-picker:hover { border-color: var(--accent); background: rgba(29,155,240,0.06); }
.admin-file-picker > .material-symbols-rounded { width: 40px; height: 40px; border-radius: 10px; background: var(--surface); display: flex; align-items: center; justify-content: center; color: var(--accent); flex-shrink: 0; }
.admin-file-picker div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.admin-file-picker strong { font-size: 14px; font-weight: 700; }
.admin-file-picker small { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-videos-grid { display: flex; flex-direction: column; gap: 8px; }
.admin-videos-grid { display: flex; flex-direction: column; gap: 8px; }
.admin-video-card { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.admin-video-thumb { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: var(--surface-2); }
.admin-video-info { flex: 1; min-width: 0; }
.admin-video-title { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-video-meta { font-size: 12px; color: var(--text-muted); display: flex; gap: 8px; flex-wrap: wrap; }
.admin-video-actions { display: flex; gap: 6px; flex-shrink: 0; }
.admin-ads-grid { display: flex; flex-direction: column; gap: 10px; }
.admin-ad-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px; }
.admin-ad-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.admin-ad-thumb { width: 60px; height: 60px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: var(--surface-2); }
.admin-ad-info { flex: 1; min-width: 0; }
.admin-ad-title { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-ad-meta { font-size: 12px; color: var(--text-muted); display: flex; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.admin-ad-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 20px; }
.admin-ad-badge.active { background: rgba(0,186,124,0.12); color: var(--success); }
.admin-ad-badge.inactive { background: rgba(244,33,46,0.10); color: var(--danger); }
.admin-ad-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 16px; }
.admin-stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px; text-align: center; }
.admin-stat-num { font-size: 26px; font-weight: 800; color: var(--accent); }
.admin-stat-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.admin-section-title { font-size: 16px; font-weight: 700; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.admin-section-divider { height: 1px; background: var(--border); margin: 16px 0; }

/* ─── Admin recent activity ─────────────────────────────────── */
.admin-recent-list { display: flex; flex-direction: column; gap: 10px; }
.admin-recent-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; border-radius: 14px;
  background: var(--surface-2); border: 1px solid var(--border);
  transition: background 0.15s;
}
.admin-recent-item:hover { background: var(--surface-3, #2a2a2a); }
.admin-recent-avatar {
  width: 40px; height: 40px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
  background: var(--surface-3, #2a2a2a); display: flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--border);
}
.admin-recent-avatar img { width: 100%; height: 100%; object-fit: cover; }
.admin-recent-avatar .material-symbols-rounded { font-size: 22px; color: var(--text-muted); }
.admin-recent-info { flex: 1; min-width: 0; }
.admin-recent-name { font-size: 14px; font-weight: 600; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-recent-sub { font-size: 12px; color: var(--text-muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-recent-meta { font-size: 12px; color: var(--accent); font-weight: 600; white-space: nowrap; flex-shrink: 0; }
.admin-recent-empty { text-align: center; padding: 20px; color: var(--text-muted); font-size: 14px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.admin-recent-empty .material-symbols-rounded { font-size: 32px; }

/* ─── Responsive ────────────────────────────────────────────── */
@media (max-width: 480px) {
  .admin-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-user-actions { flex-direction: column; }
  .admin-ad-actions { flex-direction: column; }
  .profile-stats { gap: 8px; }
  .desk-nav-logo-img { width: 72px; height: 72px; }
}

/* ─── Follow list modal (kuzatuvchilar) — desktop ───────────── */
.follow-list-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; cursor: pointer; transition: background var(--transition); border-bottom: 1px solid var(--border); }
.follow-list-item:last-child { border-bottom: none; }
.follow-list-item:hover { background: var(--surface-2); }
.follow-list-avatar { width: 44px; height: 44px; border-radius: 50%; overflow: hidden; background: var(--surface-2); display: flex; align-items: center; justify-content: center; flex-shrink: 0; position: relative; border: 2px solid var(--border); }
.follow-list-avatar img { width: 100%; height: 100%; object-fit: cover; }
.follow-list-avatar .material-symbols-rounded { font-size: 24px; color: var(--text-muted); }
.follow-list-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.follow-list-info strong { font-size: 15px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.follow-list-info span { font-size: 13px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.follow-list-body { overflow-y: auto; max-height: 55vh; overscroll-behavior: contain; }
.follow-list-sheet { max-height: 72vh; overflow-y: auto; }
.empty-list-msg { text-align: center; padding: 32px 16px; color: var(--text-muted); font-size: 14px; }

/* Follow list lazy loading spinnerlar */
.follow-list-loading { display: flex; align-items: center; justify-content: center; padding: 32px 16px; }
.follow-spinner { width: 32px; height: 32px; border: 3px solid var(--border); border-top-color: var(--primary,#6366F1); border-radius: 50%; animation: spin 0.8s linear infinite; }
.follow-spinner-sm { width: 22px; height: 22px; border: 2px solid var(--border); border-top-color: var(--primary,#6366F1); border-radius: 50%; animation: spin 0.8s linear infinite; }

/* Grid sentinel & loading dots */
.grid-sentinel { display: flex; align-items: center; justify-content: center; padding: 20px 0 32px; min-height: 60px; }
.grid-loading-dots { display: flex; gap: 6px; align-items: center; }
.grid-loading-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--primary,#6366F1); opacity: 0.4; animation: dotPulse 1.2s ease-in-out infinite; }
.grid-loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.grid-loading-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dotPulse { 0%,80%,100% { opacity: 0.3; transform: scale(0.85); } 40% { opacity: 1; transform: scale(1.1); } }
@media(min-width:600px) {
  .bottom-sheet { border-radius: 20px; max-width: 480px; margin: auto; }
  .follow-list-body { max-height: 60vh; }
  .follow-list-sheet {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    width: min(460px, calc(100vw - 40px));
    border-radius: 18px;
    padding-bottom: 16px;
  }
}

/* ═══════════════════════════════════════════════════════════
   GLOBAL TOP PROGRESS BAR
   ═══════════════════════════════════════════════════════════ */
.global-progress-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  z-index: 99999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.global-progress-bar.active { opacity: 1; }
.global-progress-bar.done { opacity: 0; transition: opacity 0.3s ease 0.1s; }
.global-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent, #1d9bf0), var(--purple, #a855f7));
  border-radius: 0 2px 2px 0;
  box-shadow: 0 0 8px rgba(29,155,240,0.6);
}

/* ═══════════════════════════════════════════════════════════
   NOTIFICATIONS SCREEN  v2.0
   ═══════════════════════════════════════════════════════════ */

/* ── Header ── */
.notif-header { padding-bottom: 0 !important; }
.notif-header .screen-header-inner { padding-bottom: 10px; }
.notif-header-left { display: flex; align-items: center; gap: 8px; }
.notif-header-count {
  font-size: 12px; font-weight: 700; color: var(--text-muted);
  background: var(--surface-2); border-radius: 20px;
  padding: 2px 9px; line-height: 1.5;
}
.notif-header-actions { display: flex; gap: 4px; }
.notif-mark-all-btn { color: var(--accent) !important; }

/* ── Filter bar ── */
.notif-filter-bar {
  display: flex; gap: 6px; padding: 0 16px 12px;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.notif-filter-bar::-webkit-scrollbar { display: none; }
.notif-filter-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 14px; border-radius: 20px; border: none;
  font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap;
  background: var(--surface-2); color: var(--text-muted);
  transition: all 0.18s ease;
}
.notif-filter-btn:hover { background: var(--surface-3); color: var(--text); }
.notif-filter-btn.active {
  background: var(--accent); color: #fff;
  box-shadow: 0 2px 8px rgba(var(--accent-rgb), 0.35);
}
.nf-icon { font-size: 14px; font-variation-settings: 'FILL' 1; }
.like-icon    { color: #ef4444; }
.comment-icon { color: var(--accent); }
.reply-icon   { color: var(--purple); }
.notif-filter-btn.active .nf-icon { color: #fff !important; }

/* ── List ── */
.notif-list { display: flex; flex-direction: column; gap: 8px; padding: 8px 12px 80px; }

/* ── Card base ── */
.notif-card {
  cursor: pointer;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  overflow: hidden;
  position: relative;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.12s ease, box-shadow 0.18s ease;
  animation: notifSlideIn 0.28s ease both;
}
@keyframes notifSlideIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.notif-card:hover {
  background: var(--surface-2);
  border-color: color-mix(in srgb, var(--accent) 30%, var(--border));
  box-shadow: 0 3px 10px rgba(var(--accent-rgb),0.10);
}
.notif-card:active { transform: scale(0.985); }

/* ── Unread card — ko'k chap chiziq + fon ── */
.notif-card.unread {
  background: color-mix(in srgb, var(--accent) 6%, var(--surface));
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
  border-left: 3.5px solid var(--accent);
}
.notif-card.unread:hover {
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
}

/* ── HOT LIKE card ── */
.notif-card.notif-hot {
  background: linear-gradient(135deg,
    color-mix(in srgb, #ef4444 8%, var(--surface)),
    color-mix(in srgb, #f97316 5%, var(--surface)));
  border-color: color-mix(in srgb, #ef4444 40%, var(--border));
  border-left: 3.5px solid #ef4444;
}
.notif-card.notif-hot:hover {
  background: linear-gradient(135deg,
    color-mix(in srgb, #ef4444 14%, var(--surface)),
    color-mix(in srgb, #f97316 10%, var(--surface)));
  border-color: #ef4444;
  box-shadow: 0 4px 16px rgba(239,68,68,0.18);
}
.notif-card.notif-hot.unread {
  border-left: 3.5px solid #ef4444;
}

/* ── Hot banner ── */
.notif-hot-banner {
  display: flex; align-items: center; gap: 5px;
  padding: 5px 14px 4px;
  background: linear-gradient(90deg, rgba(239,68,68,0.12), rgba(249,115,22,0.08));
  font-size: 11px; font-weight: 700;
  color: #ef4444;
  border-bottom: 1px solid rgba(239,68,68,0.15);
}

/* ── Card inner ── */
.notif-card-inner {
  display: flex; align-items: flex-start;
  gap: 12px; padding: 13px 14px;
}

/* ── Avatar ── */
.notif-avatar {
  position: relative; flex-shrink: 0;
  width: 46px; height: 46px;
  border-radius: 50%; overflow: visible;
  cursor: pointer;
}
.notif-avatar img {
  width: 46px; height: 46px;
  border-radius: 50%; object-fit: cover;
  display: block;
  background: var(--surface-2);
}
.notif-avatar > .material-symbols-rounded {
  width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-2); border-radius: 50%;
  font-size: 24px; color: var(--text-muted);
}

/* ── Type icon ── */
.notif-type-icon {
  position: absolute; bottom: -3px; right: -3px;
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2.5px solid var(--surface);
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}
.notif-type-icon .material-symbols-rounded { font-size: 11px; color: #fff; }
/* -- Rang sxemasi -- */
.notif-type-like    { background: #ef4444; }
.notif-type-comment { background: var(--accent); }
.notif-type-reply   { background: var(--purple, #a855f7); }
.notif-type-mention { background: #f59e0b; }
.notif-type-follow  { background: #10b981; }
.notif-type-hot     { background: linear-gradient(135deg, #ef4444, #f97316) !important; }

/* ── Grouped follow card ── */
.notif-avatar-stack {
  position: relative;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  width: 54px;
  height: 44px;
}
.grouped-follow-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--surface);
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
}
.grouped-follow-avatar img { width: 100%; height: 100%; object-fit: cover; }
.grouped-follow-avatar .material-symbols-rounded { font-size: 18px; color: var(--text-muted); }

/* follow filter icon */
.nf-icon.follow-icon { color: #10b981; }

/* ── Body ── */
.notif-body { flex: 1; min-width: 0; }
.notif-msg { font-size: 14px; color: var(--text); line-height: 1.45; margin: 0 0 3px; }
.notif-msg strong { color: var(--text); font-weight: 700; }
.notif-text {
  font-size: 13px; color: var(--text-muted); margin: 0 0 5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 220px;
  font-style: italic;
}
.notif-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.notif-time {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11px; color: var(--text-muted);
}
.notif-hot-label {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11px; font-weight: 700; color: #ef4444;
  background: rgba(239,68,68,0.10); border-radius: 20px;
  padding: 1px 7px;
}
.notif-hot-badge {
  display: inline-flex; align-items: center; gap: 2px;
  background: rgba(239,68,68,0.12); color: #ef4444;
  font-size: 11px; font-weight: 700; border-radius: 20px;
  padding: 1px 7px; margin-left: 4px;
  vertical-align: middle;
}

/* ── Right side (thumb + dot) ── */
.notif-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.notif-thumb { width: 44px; height: 44px; border-radius: 8px; overflow: hidden; flex-shrink: 0; }
.notif-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ── Unread dot ── */
.notif-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}
.notif-card.notif-hot .notif-dot { background: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,0.20); }

@keyframes notifDotFade {
  to { opacity: 0; transform: scale(0); }
}

/* ── Empty state ── */
.notif-empty {
  display: flex; flex-direction: column; align-items: center;
  padding: 60px 24px 40px; text-align: center; gap: 10px;
}
.notif-empty-icon {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 8px;
}
.notif-empty-icon .material-symbols-rounded { font-size: 36px; color: var(--text-muted); }
.notif-empty h3 { font-size: 17px; font-weight: 700; color: var(--text); margin: 0; }
.notif-empty p  { font-size: 14px; color: var(--text-muted); margin: 0; line-height: 1.5; max-width: 260px; }
.notif-empty-menu {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.notif-empty-menu span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 700;
}
.notif-empty-menu .material-symbols-rounded { font-size: 15px; color: var(--accent); }

/* ── Skeleton ── */
.notif-skel-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  margin: 0 12px 8px;
  overflow: hidden;
}
.notif-skel { display: flex; align-items: center; gap: 12px; padding: 13px 14px; }
.notif-skel-avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--surface-2); flex-shrink: 0; }
.notif-skel-lines { flex: 1; display: flex; flex-direction: column; gap: 7px; }
.notif-loading { padding: 8px 0 0; }

/* ── Nav badge ── */
.nav-notif-wrap { position: relative; display: inline-flex; align-items: center; justify-content: center; }
.nav-badge {
  position: absolute; top: -6px; right: -8px;
  min-width: 16px; height: 16px; padding: 0 4px;
  background: #ef4444; color: #fff;
  font-size: 10px; font-weight: 700; line-height: 16px;
  border-radius: 8px; text-align: center;
  border: 2px solid var(--bg);
  pointer-events: none;
  box-shadow: 0 1px 4px rgba(239,68,68,0.40);
}

/* ═══════════════════════════════════════════════════════════════
   MEDIA LOADING FADE-IN ANIMATIONS (HLS + Images)
   ═══════════════════════════════════════════════════════════════ */

/* Feed videolar va rasmlar uchun universal fade-in */
@keyframes mediaFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Feed video — yuklanganida asta paydo bo'ladi */
.feed-video {
  animation: none;
  transition: opacity 0.35s ease;
}
.feed-video.media-ready {
  animation: mediaFadeIn 0.35s ease both;
}

/* Feed rasm */
.feed-media-img {
  opacity: 0;
  transition: opacity 0.4s ease;
}
.feed-media-img.img-loaded {
  opacity: 1;
}

/* Profil rasmlari */
.feed-avatar img,
.profile-avatar img,
.admin-user-avatar img,
.search-user-avatar img,
.notif-thumb img,
.notif-avatar img {
  opacity: 0;
  transition: opacity 0.3s ease;
}
.feed-avatar img.img-loaded,
.profile-avatar img.img-loaded,
.admin-user-avatar img.img-loaded,
.search-user-avatar img.img-loaded,
.notif-thumb img.img-loaded,
.notif-avatar img.img-loaded {
  opacity: 1;
}

/* Media kartochkalar (explore grid) */
.media-card-thumb {
  opacity: 0;
  transition: opacity 0.35s ease;
}
.media-card-thumb.img-loaded {
  opacity: 1;
}

/* Explore grid kirganida kartalar silliq fade */
@keyframes exploreCardIn {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.media-card {
  animation: exploreCardIn 0.32s ease both;
  animation-delay: var(--card-delay, 0ms);
  aspect-ratio: auto;
  border-radius: 16px;
  width: 100%;
}

/* HLS yuklanish indikatori */
.hls-buffering-bar {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent);
  transform-origin: left;
  animation: hlsBuffer 1.2s ease-in-out infinite;
  z-index: 10;
  border-radius: 0 1px 1px 0;
}
@keyframes hlsBuffer {
  0%   { transform: scaleX(0); opacity: 1; }
  70%  { transform: scaleX(0.8); opacity: 1; }
  100% { transform: scaleX(1); opacity: 0; }
}

/* Video loading overlay — poster bor bo'lsa yashirinadi */
.video-loading-overlay {
  transition: opacity 0.3s ease;
}


/* ═══════════════════════════════════════════════════════════
   STORIES (ISTORIYA) TIZIMI
   ═══════════════════════════════════════════════════════════ */

/* ─── Stories Bar ─────────────────────────────────────────── */
.stories-bar {
  width: 100%;
  overflow: hidden;
  padding: 12px 0 9px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(244,246,251,0.86));
}
body.dark .stories-bar {
  background: linear-gradient(180deg, rgba(15,17,24,0.98), rgba(8,9,15,0.94));
}

.stories-scroll {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 0 12px 4px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.stories-scroll::-webkit-scrollbar { display: none; }

.story-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  flex-shrink: 0;
  min-width: 64px;
  max-width: 72px;
}

.story-ring {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 2px;
  background: #d8deea;
  box-shadow: 0 2px 10px rgba(15,23,42,0.08);
  flex-shrink: 0;
}

.story-ring-unseen {
  background: conic-gradient(from 180deg, #ff8a00, #f43f5e, #7c3aed, #0ea5e9, #ff8a00);
  padding: 2.5px;
}

.story-ring-seen {
  background: #c9d2e3;
  padding: 2px;
}

.story-ring-mine {
  background: conic-gradient(from 180deg, #14b8a6, #0ea5e9, #6366f1, #14b8a6);
  padding: 2.5px;
}
body.dark .story-ring { background: rgba(255,255,255,0.16); box-shadow: none; }
body.dark .story-ring-seen { background: rgba(255,255,255,0.22); }

.story-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  position: relative;
}

.story-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.story-avatar-icon {
  font-size: 28px;
  color: var(--text-muted, #888);
}

.story-add-btn {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #2563eb;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  border: 2px solid var(--surface);
}

.story-name {
  font-size: 11px;
  color: var(--text-dim, #374151);
  text-align: center;
  max-width: 64px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}
body.dark .story-name { color: var(--text-muted, #aaa); }

/* ─── Story Viewer Overlay ───────────────────────────────── */
.story-viewer-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 12%, #172033 0, #050608 48%, #000 100%);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.story-viewer-wrap {
  width: 100%;
  height: 100%;
  max-width: 520px;
  max-height: 100vh;
  position: relative;
  display: flex;
  flex-direction: column;
  background: #050505;
  overflow: hidden;
}

/* Progress bar */
.story-progress-bar {
  display: flex;
  gap: 4px;
  padding: 10px 10px 0;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
}

.story-prog-item {
  flex: 1;
  height: 2px;
  background: rgba(255,255,255,0.3);
  border-radius: 2px;
  overflow: hidden;
}

.story-prog-fill {
  height: 100%;
  background: #fff;
  width: 0%;
  transition: none;
  border-radius: 2px;
}

.story-prog-done .story-prog-fill {
  width: 100%;
}

/* Header */
.story-header {
  position: absolute;
  top: 18px;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
}

.story-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  cursor: pointer;
  border-radius: 999px;
  padding: 3px 8px 3px 3px;
  transition: background 0.16s ease;
}
.story-header-left:hover { background: rgba(255,255,255,0.12); }

.story-header-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,0.5);
  background: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
}
.story-header-avatar img { width: 100%; height: 100%; object-fit: cover; }
.story-avatar-verified {
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.26);
}
.story-avatar-verified .verified-badge { font-size: 14px; }

.story-header-info strong {
  display: block;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}
.story-header-info span {
  color: rgba(255,255,255,0.7);
  font-size: 11px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.story-header-right {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
  position: relative;
  z-index: 30;
  padding: 4px;
  border-radius: 999px;
  background: rgba(7, 10, 18, 0.42);
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 12px 34px rgba(0,0,0,0.25);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.story-action-btn {
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.92);
  border-radius: 999px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  gap: 4px;
  font-size: 12px;
  font-weight: 800;
  flex-direction: row;
  position: relative;
  z-index: 31;
  transition: transform 0.16s ease, background 0.16s ease, color 0.16s ease;
  -webkit-tap-highlight-color: transparent;
}
.story-action-btn:hover { background: rgba(255,255,255,0.14); }
.story-action-btn:active { transform: scale(0.94); }
.story-action-btn.danger { color: #ff5c75; }
.story-action-btn.danger:hover { background: rgba(239,68,68,0.18); }
.story-action-btn span.material-symbols-rounded { font-size: 20px; line-height: 1; }
.story-metric-btn {
  width: auto;
  min-width: 44px;
  padding: 0 9px;
  border-radius: 999px;
}
.story-metric-btn span:last-child {
  font-size: 11px;
  line-height: 1;
}
#storyPauseBtn .material-symbols-rounded {
  font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24;
}

/* Media */
.story-media-wrap {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.story-media {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  transition: opacity 0.18s ease;
}

.story-media.is-loading {
  opacity: 0.18;
}

.story-confirm-overlay {
  z-index: 9800;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(0,0,0,0.54);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.story-confirm-card {
  width: min(330px, calc(100vw - 34px));
  border-radius: 28px;
  padding: 24px 22px 20px;
  color: #111827;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.94));
  border: 1px solid rgba(255,255,255,0.86);
  box-shadow: 0 28px 80px rgba(0,0,0,0.36);
  text-align: center;
  animation: storyConfirmIn 0.2s cubic-bezier(.2,.8,.2,1);
}

.story-confirm-icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ef4444;
  background: #fee2e2;
}

.story-confirm-icon .material-symbols-rounded { font-size: 26px; }

.story-confirm-card h3 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
}

.story-confirm-card p {
  margin: 0 0 20px;
  color: #64748b;
  font-size: 14px;
  line-height: 1.35;
}

.story-confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.story-confirm-btn {
  min-height: 46px;
  border: none;
  border-radius: 16px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}
.story-confirm-btn:active { transform: scale(0.97); }
.story-confirm-cancel {
  color: #111827;
  background: #f1f5f9;
}
.story-confirm-cancel:hover { background: #e2e8f0; }
.story-confirm-delete {
  color: #fff;
  background: linear-gradient(135deg, #ff5c75, #ef4444);
  box-shadow: 0 12px 28px rgba(239,68,68,0.32);
}
.story-confirm-delete:hover { box-shadow: 0 16px 36px rgba(239,68,68,0.38); }
.story-confirm-delete:disabled { opacity: 0.72; cursor: progress; }
@keyframes storyConfirmIn {
  from { opacity: 0; transform: translateY(10px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.story-media-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.story-media-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.story-loader {
  position: absolute;
  inset: 0;
  z-index: 18;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: rgba(255,255,255,0.86);
  font-size: 13px;
  font-weight: 700;
  pointer-events: none;
  background: radial-gradient(circle at center, rgba(255,255,255,0.08), rgba(0,0,0,0.08) 45%, rgba(0,0,0,0.18));
}
.story-loader.hidden {
  display: none;
}
.story-loader-ring {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.25);
  border-top-color: #fff;
  animation: storySpin 0.75s linear infinite;
}
@keyframes storySpin {
  to { transform: rotate(360deg); }
}

/* Tap zones */
.story-tap-left,
.story-tap-center,
.story-tap-right {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 26%;
  cursor: pointer;
  z-index: 4;
  touch-action: pan-y;
}
.story-tap-left  { left: 0; }
.story-tap-center {
  left: 26%;
  width: 48%;
  cursor: pointer;
}
.story-tap-right { right: 0; }

.story-nav-btn {
  position: absolute;
  top: 50%;
  z-index: 12;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 50%;
  color: #fff;
  background: rgba(7,10,18,0.38);
  box-shadow: 0 14px 36px rgba(0,0,0,0.24);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.72;
  transition: opacity 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.story-media-wrap:hover .story-nav-btn,
.story-nav-btn:focus-visible {
  opacity: 1;
}

.story-nav-btn:hover {
  background: rgba(255,255,255,0.16);
  transform: translateY(-50%) scale(1.04);
}

.story-nav-prev { left: 16px; }
.story-nav-next { right: 16px; }
.story-nav-btn .material-symbols-rounded { font-size: 30px; }

/* Footer */
.story-footer {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 16px;
}

.story-like-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(8,12,20,0.44);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  border-radius: 24px;
  padding: 8px 18px;
  font-size: 14px;
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
  position: relative;
  z-index: 31;
  overflow: visible;
}
.story-like-btn:hover { background: rgba(255,255,255,0.16); }
.story-like-btn.liked { color: #ef4444; }
.story-like-btn.liked .material-symbols-rounded { color: #ef4444; }
.story-like-btn.story-like-pop { animation: storyLikePop 0.34s ease; }
.story-like-burst {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 68px;
  height: 68px;
  margin: -34px 0 0 -34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ff3b63;
  pointer-events: none;
  animation: storyLikeBurst 0.74s ease forwards;
  text-shadow: 0 10px 26px rgba(239,68,68,0.4);
}
.story-like-burst .material-symbols-rounded { font-size: 42px; font-variation-settings: 'FILL' 1; }
@keyframes storyLikePop {
  0% { transform: scale(1); }
  42% { transform: scale(1.13); }
  100% { transform: scale(1); }
}
@keyframes storyLikeBurst {
  0% { opacity: 0; transform: scale(0.35) translateY(4px); }
  28% { opacity: 1; transform: scale(1.04) translateY(-10px); }
  100% { opacity: 0; transform: scale(1.45) translateY(-34px); }
}
.story-like-count { font-size: 13px; font-weight: 600; }

.story-footer-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(0,0,0,0.42);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(6px);
  position: relative;
  z-index: 31;
}
.story-footer-btn .material-symbols-rounded { font-size: 18px; }
.story-modal-overlay {
  z-index: 9500;
}
.story-modal-overlay .bottom-sheet {
  z-index: 9501;
}
.story-viewers-sheet {
  max-height: min(70vh, 520px);
  overflow-y: auto;
}
.story-viewer-row { position: relative; }
.story-viewer-row:active { transform: scale(0.99); }
.story-viewer-liked {
  margin-left: auto;
  color: #ef4444;
  display: inline-flex;
  align-items: center;
}
.story-viewer-liked .material-symbols-rounded {
  font-size: 20px;
  font-variation-settings: 'FILL' 1;
}
.story-viewer-avatar-badge {
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card-bg, #fff);
}
.story-viewer-avatar-badge .verified-badge { font-size: 13px; }
.story-viewer-verified-text {
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
}

/* ─── Follow list modal ───────────────────────────────────── */
.follow-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: background 0.15s;
}
.follow-list-item:hover { background: var(--hover, rgba(255,255,255,0.05)); }
.follow-list-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg2, #222);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  position: relative;
}
.follow-list-avatar img { width: 100%; height: 100%; object-fit: cover; }
.follow-list-info { display: flex; flex-direction: column; gap: 2px; }
.follow-list-info strong { font-size: 14px; font-weight: 600; color: var(--text); }
.follow-list-info span { font-size: 12px; color: var(--text-muted); }
.follow-list-body { padding: 8px 0; min-height: 60px; }
.empty-list-msg { text-align: center; color: var(--text-muted); padding: 32px 16px; font-size: 14px; }

/* ─── Follow action buttons ──────────────────────────────── */
.profile-follow-section {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 12px 0;
  flex-wrap: wrap;
}

.profile-avatar-has-story {
  padding: 4px;
  background: conic-gradient(from 180deg, #ff7a1a, #f43f5e, #7c3aed, #06b6d4, #ff7a1a);
  cursor: pointer;
}
.profile-avatar-has-story img,
.profile-avatar-has-story .profile-avatar-icon {
  border: 3px solid var(--surface, #111);
  border-radius: 50%;
  background: var(--surface, #111);
}
.profile-stat-btn {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  padding: 0;
}
.profile-stat-btn:hover .profile-stat-num,
.profile-stat-btn:hover .profile-stat-lbl {
  color: var(--accent, #3b82f6);
}

@media (max-width: 520px) {
  .profile-stats {
    flex-wrap: wrap;
  }
  .profile-stat {
    min-width: 33.333%;
    flex: 1 0 33.333%;
    padding: 12px 6px 10px;
  }
  .profile-stat-num { font-size: 18px; letter-spacing: 0; }
  .profile-stat-lbl { font-size: 10px; }
  .profile-stat:not(:last-child)::after { display: none; }
}

.btn-follow-action {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  border-radius: 24px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

/* ─── Story Upload Sheet ──────────────────────────────────── */
.story-upload-sheet { padding-bottom: env(safe-area-inset-bottom, 0); }

.story-duration-select {
  padding: 16px;
  border-top: 1px solid var(--border, rgba(255,255,255,0.08));
}

.story-duration-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 10px;
  font-weight: 500;
}

.story-duration-options {
  display: flex;
  gap: 8px;
}

.story-dur-btn {
  flex: 1;
  padding: 8px 4px;
  border-radius: 10px;
  border: 1.5px solid var(--border, rgba(255,255,255,0.12));
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.story-dur-btn.active {
  background: var(--accent, #3b82f6);
  border-color: var(--accent, #3b82f6);
  color: #fff;
}

.story-dur-info {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
}

@media (min-width: 600px) {
  .story-viewer-wrap {
    width: min(420px, calc(100vw - 40px));
    height: min(760px, calc(100vh - 40px));
    border-radius: 16px;
    box-shadow: 0 24px 70px rgba(0,0,0,0.5);
  }
  .story-upload-sheet,
  .story-viewers-sheet {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    width: min(440px, calc(100vw - 40px));
    border-radius: 16px;
  }
}

@media (max-width: 480px) {
  .story-header {
    top: max(18px, env(safe-area-inset-top));
    padding: 0 8px;
  }
  .story-header-info strong { max-width: 128px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .story-header-right { gap: 2px; padding: 3px; }
  .story-action-btn { width: 32px; height: 32px; }
  .story-action-btn span.material-symbols-rounded { font-size: 19px; }
  .story-metric-btn { min-width: 42px; padding: 0 8px; }
  .story-confirm-card { border-radius: 18px; padding: 20px; }
  .story-nav-btn { display: none; }
  .story-footer {
    bottom: max(16px, env(safe-area-inset-bottom));
    flex-wrap: wrap;
  }
  .story-footer-btn span:last-child { display: none; }
}


/* ─── Admin Stories ────────────────────────────────────────── */
.admin-stories-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
}

.admin-story-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border-radius: 16px;
  padding: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 10px 26px rgba(15,23,42,0.06);
}

.admin-story-media {
  flex-shrink: 0;
  width: 72px;
  height: 86px;
  border-radius: 12px;
  overflow: hidden;
  background: #0f172a;
}

.admin-story-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
}

.admin-story-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.admin-story-info strong {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 4px;
}

.admin-story-info span {
  font-size: 12px;
  color: var(--text-muted);
}

.story-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-muted);
}
.story-bar-biz-badge,
.follow-biz-badge {
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}
.story-bar-biz-badge .verified-badge,
.follow-biz-badge .verified-badge { font-size: 13px; }
.follow-list-info strong {
  display: flex;
  align-items: center;
  gap: 4px;
}
.follow-list-info small {
  font-size: 11px;
  color: var(--accent);
  font-weight: 700;
}
.story-limit-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 16px 0;
  padding: 10px 12px;
  border-radius: 14px;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 13px;
}
.story-limit-note .material-symbols-rounded { color: var(--accent); font-size: 18px; }
