/* ============================================
   导航栏公共样式
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--navbar-height);
  backdrop-filter: blur(12px);
}

.navbar-inner {
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 calc(var(--space-lg) * var(--hero-scale-ratio));
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.05);
}

.nav-logo {
  width: max(100px, calc(141px * var(--hero-scale-ratio)));
}

.nav-logo img {
  width: 100%;
  height: auto;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: var(--space-3xl);
  position: relative;
  transform: scale(var(--hero-scale-ratio));
  transform-origin: right center;
}

.nav-link {
  font-size: var(--font-size-xl);
  color: var(--color-text-primary);
  position: relative;
  padding: var(--space-xs) 0;
  text-decoration: none;
  transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
  font-weight: 600;
}

.nav-indicator {
  position: absolute;
  bottom: -8px;
  left: 19px;
  width: 8px;
  height: 8px;
  background: var(--color-primary);
  border-radius: var(--radius-full);
  transition: transform var(--transition-base);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  transform: scale(max(0.7, var(--hero-scale-ratio)));
  transform-origin: right center;
}

.nav-points,
.nav-profile {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--font-size-lg);
  color: var(--color-text-primary);
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  cursor: pointer;
  width: 160px;
  height: 50px;
  box-sizing: border-box;
  padding: 12px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.nav-points {
  background-color: #fdf4d9;
}

.nav-points:hover,
.nav-profile:hover {
  border-color: var(--color-primary);
  font-weight: 600;
}

.nav-arrow {
  font-size: var(--font-size-base);
  color: var(--color-text-tertiary);
}

.nav-icon {
  width: 27px;
}

/* 消息未读铃铛 */
.nav-bell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  box-sizing: border-box;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  background: #fff;
  color: var(--color-text-primary);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s ease;
}

.nav-bell:hover {
  border-color: var(--color-primary);
}

.nav-bell .nav-icon {
  width: 24px;
  height: 24px;
}

.nav-bell-badge {
  position: absolute;
  top: -6px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  box-sizing: border-box;
  font-size: 11px;
  line-height: 18px;
  text-align: center;
  color: #fff;
  background: #f56c6c;
  border-radius: 9px;
}

.return-btn {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--font-size-md);
  color: var(--color-text-primary);
  text-decoration: none;
  transition: all 0.3s ease;
  line-height: 1;
}

.return-btn:hover {
  color: var(--color-primary);
}

.return-arrow {
  width: 24px;
  height: 24px;
}

.subPage_nav {
  border-bottom: 1px solid var(--color-border-light);
}

.subPage_nav .navbar {
  height: var(--navbar-height-subPage);
  position: static;
}

.subPage_nav .nav-logo {
  width: 100px;
}

.subPage_nav .nav-link {
  font-size: var(--font-size-base);
}

.subPage_nav .nav-indicator {
    bottom: -11px;
    left: 8px;
    width: 30px;
    height: 3px;
    border-radius: 0;
  }

/* 媒体查询 */
@media screen and (min-width: 768px) {
  .subPage_nav .nav-points,
  .subPage_nav .nav-profile {
    font-size: var(--font-size-base);
    width: 140px;
    height: 34px;
  }

  .subPage_nav .nav-icon {
    width: 16px;
  }
}

@media screen and (max-width: 768px) {
  .nav-menu,
  .nav-profile {
    display: none;
  }
}
