:root {
  --navbar-height: 56px;
  --brand: #4f46e5;
  --muted-old: #6b7280; /* نامگذاری متفاوت برای عدم تداخل با متغیر جدید */
  --bg: #070816;
  --card: rgba(255, 255, 255, .08);
  --border: rgba(255, 255, 255, .14);
  --text: #fff;
  --muted: rgba(255, 255, 255, .68);
  --blue: #25b7ff;
  --purple: #7c4dff;
  --pink: #ff2f8e;
  --orange: #ffb234;
}

html, body {
  height: 100%;
  margin: 0;
}

body {
  font-family: "Vazirmatn", system-ui, -apple-system, sans-serif;
  display: flex;
  flex-direction: column;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 18%, rgba(37, 183, 255, .30), transparent 28%),
    radial-gradient(circle at 88% 15%, rgba(255, 47, 142, .28), transparent 30%),
    linear-gradient(145deg, #050612 0%, #10122b 50%, #070816 100%);
  background-attachment: fixed;
}

/* === استایل‌های اصلی محتوا === */
main.container {
  flex: 1;
  position: relative;
  z-index: 1;
  padding-top: 0;
}

.tc-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .06;
  background-image:
    linear-gradient(rgba(255, 255, 255, .1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .1) 1px, transparent 1px);
  background-size: 40px 40px;
  z-index: 0;
}

.card {
  border: 0;
  border-radius: 1rem;
  background: var(--card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
}

/* === نوار ناوبری دسکتاپ === */
.tc-navbar {
  background: rgba(7, 8, 22, .75);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  position: sticky;
  top: 0;
}

.tc-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
}

.tc-brand img {
  width: 44px; height: 44px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .08);
  box-shadow: 0 10px 30px rgba(255, 47, 142, .18);
}

.tc-icon-btn {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid var(--border);
  color: #fff;
  transition: .2s;
}

/* === نوار ناوبری موبایل (فیکس شده) === */
.mobile-bottom-nav {
  position: fixed;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: min(560px, calc(100% - 24px));
  z-index: 9999;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  padding: 8px;
  background: rgba(12, 14, 32, 0.92);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  border: 1px solid var(--border);
  border-radius: 26px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.55);
}

.mobile-bottom-nav .nav-item {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 64px;
  border-radius: 18px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 700;
  transition: .2s;
  background: transparent;
  border: none;
  padding: 0 !important;
  margin: 0 !important;
}

.mobile-bottom-nav .nav-item i {
  font-size: 1.3rem;
  line-height: 1;
}

.mobile-bottom-nav .nav-item.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(37, 183, 255, .3), rgba(255, 47, 142, .25));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1);
}

.mobile-bottom-nav .nav-btn {
  all: unset;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: inherit;
  font-family: inherit;
  border-radius: 18px;
}

/* === گرید پست‌ها و اکسپلور === */
.explore-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.grid-post-card {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 1/1;
  background: var(--card);
  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; }

@media (max-width: 767.98px) {
  main.container { padding-bottom: 130px !important; }
}

@media (min-width: 768px) {
  .explore-grid { grid-template-columns: repeat(4, 1fr); }
}
