/* ============================================
   底部导航栏 - 简洁版
   ============================================ */

.treasure-tabbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: linear-gradient(135deg, #DC143C 0%, #B22222 100%);
  border-top: 2px solid rgba(255, 215, 0, 0.3);
  display: flex;
  justify-content: space-around;
  align-items: center;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.15);
  z-index: 999;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 8px 0;
}

.treasure-tabbar::before {
  display: none;
}

.tabbar-item {
  flex: 1;
  text-align: center;
  position: relative;
  transition: all 0.2s ease;
}

.tabbar-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  font-weight: 500;
  transition: all 0.2s ease;
  padding: 6px 4px;
  border-radius: 8px;
  margin: 0 4px;
}

.tabbar-item.active .tabbar-link {
  color: #FFD700;
}

.tabbar-link:hover {
  color: #FFD700;
}

.icon-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  margin-bottom: 4px;
  transition: all 0.2s ease;
  position: relative;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.icon-wrapper::before {
  display: none;
}

.tabbar-item.active .icon-wrapper {
  background: rgba(255, 215, 0, 0.25);
  border-color: rgba(255, 215, 0, 0.5);
  transform: scale(1.05);
}

.tabbar-item.active .icon-wrapper::after {
  display: none;
}

.tabbar-link:hover .icon-wrapper {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
}

.tab-icon {
  font-size: 20px;
  color: #FFFFFF;
  transition: all 0.2s ease;
  width: 20px;
  height: 20px;
  position: relative;
  z-index: 1;
}

.tabbar-item.active .tab-icon {
  color: #FFD700;
  transform: scale(1.1);
}

.tabbar-link:hover .tab-icon {
  color: #FFD700;
}

.tab-text {
  margin: 0;
  font-size: 11px;
  font-weight: 500;
  color: inherit;
  transition: all 0.2s ease;
  line-height: 1.2;
}

.tabbar-item.active .tab-text {
  color: #FFD700;
  font-weight: 600;
}

/* 中间按钮特殊样式 */
.center-tab {
  position: relative;
  top: -8px;
  z-index: 10;
}

.center-tab .icon-wrapper {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #FFD700, #FFA500);
  border: 3px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
}

.center-tab .tab-icon {
  color: #DC143C;
  font-size: 24px;
  width: 24px;
  height: 24px;
}

.center-tab .tab-text {
  font-size: 12px;
  font-weight: 600;
  color: #FFD700;
}

.center-tab.active .icon-wrapper {
  background: linear-gradient(135deg, #FFA500, #FFD700);
  box-shadow: 0 6px 16px rgba(255, 215, 0, 0.5);
}

.center-tab.active .tab-text {
  color: #FFD700;
}

/* 响应式设计 */
@media (max-width: 375px) {
  .treasure-tabbar {
    height: 60px;
    padding: 6px 0;
  }
  
  .icon-wrapper {
    width: 36px;
    height: 36px;
  }
  
  .tab-icon {
    font-size: 18px;
    width: 18px;
    height: 18px;
  }
  
  .center-tab .icon-wrapper {
    width: 44px;
    height: 44px;
  }
  
  .center-tab .tab-icon {
    font-size: 22px;
    width: 22px;
    height: 22px;
  }
  
  .tab-text {
    font-size: 10px;
  }
  
  .center-tab .tab-text {
    font-size: 11px;
  }
}

@media (min-width: 768px) {
  .treasure-tabbar {
    height: 72px;
    padding: 10px 0;
  }
  
  .icon-wrapper {
    width: 44px;
    height: 44px;
  }
  
  .tab-icon {
    font-size: 22px;
    width: 22px;
    height: 22px;
  }
  
  .center-tab .icon-wrapper {
    width: 56px;
    height: 56px;
  }
  
  .center-tab .tab-icon {
    font-size: 26px;
    width: 26px;
    height: 26px;
  }
  
  .tab-text {
    font-size: 12px;
  }
  
  .center-tab .tab-text {
    font-size: 13px;
  }
}

/* 焦点状态 */
.tabbar-link:focus {
  outline: none;
}

.tabbar-link:focus .icon-wrapper {
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.3);
}

/* 无障碍支持 */
@media (prefers-reduced-motion: reduce) {
  .treasure-tabbar *,
  .tabbar-item,
  .tabbar-link,
  .icon-wrapper,
  .tab-icon,
  .tab-text {
    transition: none !important;
    animation: none !important;
  }
}

/* 安全区域支持（iPhone X 等） */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .treasure-tabbar {
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
  }
}
