/* 统一的底部导航样式 */
:root {
  --primary: #12caa2;
  --primary-2: #0fb895;
  --text: #1f2b33;
  --muted: #6b747c;
  --divider: #eef2f4;
  --tab-inactive: #88939a;
}

.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 68px;
  background: #fff;
  border-top: 1px solid var(--divider);
  display: grid;
  /* grid-template-columns 由 JavaScript 动态设置 */
  align-items: center;
  box-shadow: 0 -10px 24px rgba(0, 0, 0, 0.06);
  z-index: 1000;
}

.tab {
  text-decoration: none;
  color: var(--tab-inactive);
  display: grid;
  justify-items: center;
  gap: 4px;
  font-size: 12px;
  padding: 8px 4px;
  transition: color 0.2s ease;
  cursor: pointer;
}

.tab i {
  font-size: 18px;
  transition: transform 0.2s ease;
}

.tab.active {
  color: var(--primary);
}

.tab:hover:not(.active) {
  color: var(--muted);
}

.tab:active i {
  transform: scale(0.95);
}

/* 禁用状态（用于占位链接） */
.tab[href="#"] {
  opacity: 0.5;
  cursor: not-allowed;
}

.tab[href="#"]:hover {
  color: var(--tab-inactive);
}

/* 响应式调整 */
@media (max-width: 360px) {
  .tab {
    font-size: 11px;
    gap: 2px;
  }
  
  .tab i {
    font-size: 16px;
  }
}

/* 确保页面内容不被tab栏遮挡 */
.page {
  padding-bottom: 80px;
}

/* 为不同页面类型提供一致的底部间距 */
body {
  margin: 0;
  padding-bottom: 0;
}