:root{
  --navbar-height: 56px;
  --brand:#4f46e5;
  --muted:#6b7280;
}

html, body {
  height: 100%;
  margin: 0;
}

body{
  font-family: Vazirmatn, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  display: flex;
  flex-direction: column;
}

main.container {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding-top: 0;   /* اگر می‌خوای فاصله بالا حذف بشه */
  padding-bottom: 0;
}

.card{
  border: 0;
  border-radius: 1rem;
  box-shadow: 0 8px 24px rgba(15,23,42,.06);
}

.btn-primary{
  background: var(--brand);
  border-color: var(--brand);
}

.auth-wrap{
  min-height: calc(100vh - 2rem);
  display:flex;
  align-items:center;
}

.bottom-nav{
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 62px;
  background: #fff;
  border-top: 1px solid #e5e7eb;
  display:flex;
  z-index:1030;
}
.bottom-nav-item{
  flex:1;
  text-decoration:none;
  color:#374151;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  font-size:.75rem;
}
.bottom-nav-item i{ font-size:1.15rem; line-height:1; margin-bottom:2px; }

.avatar-96{
  width:96px;height:96px;border-radius:50%;object-fit:cover;
}
.stat-card{
  border-radius:12px;
  background: linear-gradient(135deg,#eef2ff,#ffffff);
  border:1px solid #e5e7eb;
}

.navbar{
  z-index: 1000;   /* خیلی مهم */
  position: sticky;
  top: 0;
}


/* Bottom Nav Modern */
.mobile-bottom-nav{
  position: fixed;
  bottom: 12px;
  left: 12px;
  right: 12px;
  z-index: 1030;
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 18px;
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.12);
  border: 1px solid rgba(255,255,255,0.6);
}

.mobile-bottom-nav .nav-item{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 11px;
  color: #333;
  text-decoration: none;
  min-width: 56px;
}

.mobile-bottom-nav .nav-item i{
  font-size: 20px;
}

.mobile-bottom-nav .btn-menu{
  background: transparent;
  border: none;
  color: #333;
}

.mobile-bottom-nav .notif-badge{
  position: absolute;
  top: -4px;
  right: 2px;
  font-size: 10px;
}

/* فاصله محتوای اصلی از پایین */
main{
  padding-bottom: 90px !important;
}

.custom-offcanvas{
  width: 200px;     /* عرض دلخواه */
  max-width: 80vw;  /* برای موبایل */
}

/* حذف خط‌های بین آیتم‌های منو در آف‌کنواس */
.offcanvas .list-group-flush .list-group-item{
  border: 0 !important;
}

.grid-post-card{
    position:relative;
    display:block;
    overflow:hidden;
    aspect-ratio:1/1;
    background:#f2f2f2;
    border-radius:10px;
}

.grid-post-media{
    width:100%;
    height:100%;
    object-fit:cover;
    transition:.25s;
}

.grid-overlay{
    position:absolute;
    inset:0;
    background:rgba(0,0,0,.45);
    display:flex;
    align-items:center;
    justify-content:center;
    gap:24px;
    color:white;
    font-weight:700;
    opacity:0;
    transition:.2s;
}

.grid-post-card:hover .grid-overlay{
    opacity:1;
}

.grid-post-card:hover .grid-post-media{
    transform:scale(1.03);
}

.grid-video-icon{
    position:absolute;
    top:10px;
    right:10px;
    color:white;
    font-size:22px;
    text-shadow:0 1px 4px rgba(0,0,0,.5);
}

.grid-empty{
    width:100%;
    height:100%;
    display:flex;
    align-items:center;
    justify-content:center;
    color:#888;
    font-size:14px;
}
.explore-grid{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:4px;
}

@media(min-width:768px){
    .explore-grid{
        grid-template-columns:repeat(4,1fr);
    }
}

@media(min-width:1200px){
    .explore-grid{
        grid-template-columns:repeat(5,1fr);
    }
}

/* دکمه خروج مثل آیتم‌های منوی پایین */
.mobile-bottom-nav .logout-item {
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-bottom-nav .nav-btn {
  all: unset;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 12px;
  color: inherit;
  width: 100%;
}

.mobile-bottom-nav .nav-btn i {
  font-size: 20px;
}
/* حالت فعال برای آیتم‌های منوی پایین */
.mobile-bottom-nav .nav-item.active,
.mobile-bottom-nav .nav-item.active i,
.mobile-bottom-nav .nav-item.active span {
  color: #0d6efd; /* یا هر رنگ دلخواه */
  font-weight: 600;
}

.mobile-bottom-nav .nav-item.active::after {
  content: "";
  display: block;
  margin-top: 4px;
  width: 18px;
  height: 2px;
  background: #0d6efd;
  border-radius: 2px;
}
