/**
 * 导航栏优化样式
 * 
 * 优化内容：
 * - 字体更清晰美观
 * - 增加视觉层次
 * - 突出主站链接
 * - 优化hover效果
 */

/* ============================================
   导航栏整体优化
   ============================================ */

.nav {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* 导航项文字优化 */
.nav_item {
  font-size: 15px !important;
  font-weight: 500 !important;
  letter-spacing: 0.3px;
  transition: all 0.3s ease;
  position: relative;
}

/* 导航项悬停效果 */
.nav_item:hover {
  color: #e62828 !important;
  transform: translateY(-1px);
}

/* 导航项底部下划线动画 */
.nav_parent > .nav_item::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #e62828, #ff4444);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav_parent:hover > .nav_item::after {
  width: 80%;
}

/* ============================================
   特殊样式 - 突出主站链接
   ============================================ */

/* 第一个导航项（首页）- 特殊样式 */
.nav_parent:first-of-type .nav_item {
  font-weight: 600 !important;
  color: #e62828 !important;
  position: relative;
}

.nav_parent:first-of-type .nav_item::before {
  content: '🏠';
  margin-right: 6px;
  font-size: 14px;
}

.nav_parent:first-of-type:hover .nav_item {
  color: #cc0000 !important;
  background: linear-gradient(135deg, rgba(230, 40, 40, 0.05) 0%, rgba(255, 68, 68, 0.08) 100%);
  border-radius: 8px;
}

/* ============================================
   其他导航项优化
   ============================================ */

/* 标准导航网 - 蓝色主题 */
.nav_parent:nth-of-type(2) .nav_item:hover {
  color: #0066cc !important;
}

/* 标准品牌 - 紫色主题 */
.nav_parent:nth-of-type(3) .nav_item:hover {
  color: #6f42c1 !important;
}

/* 金标社区 - 绿色主题 */
.nav_parent:nth-of-type(4) .nav_item:hover {
  color: #28a745 !important;
}

/* ============================================
   活动状态
   ============================================ */

.nav_active .nav_item {
  font-weight: 600 !important;
  color: #e62828 !important;
  background: linear-gradient(135deg, rgba(230, 40, 40, 0.08) 0%, rgba(255, 68, 68, 0.12) 100%);
  border-radius: 8px;
}

/* ============================================
   移动端优化
   ============================================ */

@media screen and (max-width: 768px) {
  .nav_item {
    font-size: 16px !important;
    padding: 0.8rem 1rem !important;
  }
  
  .nav_parent:first-of-type .nav_item::before {
    font-size: 16px;
  }
  
  /* 移动端导航项间距 */
  .nav_parent {
    margin: 0.5rem 0 !important;
  }
  
  /* 移动端取消下划线动画 */
  .nav_parent > .nav_item::after {
    display: none;
  }
}

/* ============================================
   暗黑模式优化
   ============================================ */

@media (prefers-color-scheme: dark) {
  .nav {
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.05);
  }
  
  .nav_item {
    color: #e0e0e0 !important;
  }
  
  .nav_item:hover {
    color: #ff6b6b !important;
  }
  
  .nav_parent:first-of-type .nav_item {
    color: #ff6b6b !important;
  }
  
  .nav_parent:first-of-type:hover .nav_item {
    color: #ff8888 !important;
    background: linear-gradient(135deg, rgba(255, 68, 68, 0.1) 0%, rgba(255, 102, 102, 0.15) 100%);
  }
  
  .nav_active .nav_item {
    color: #ff6b6b !important;
    background: linear-gradient(135deg, rgba(255, 68, 68, 0.15) 0%, rgba(255, 102, 102, 0.2) 100%);
  }
}

/* ============================================
   高分辨率屏幕优化
   ============================================ */

@media screen and (min-width: 1441px) {
  .nav_item {
    font-size: 16px !important;
    padding: 0.6rem 1.2rem !important;
  }
}

/* ============================================
   辅助效果
   ============================================ */

/* 导航项点击反馈 */
.nav_item:active {
  transform: scale(0.98);
}

/* 平滑过渡 */
.nav_parent,
.nav_item,
.nav_item::after {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Logo 区域优化 */
.nav_brand img {
  transition: transform 0.3s ease;
}

.nav_brand:hover img {
  transform: scale(1.05);
}

/* ============================================
   可访问性优化
   ============================================ */

.nav_item:focus {
  outline: 2px solid #e62828;
  outline-offset: 4px;
  border-radius: 4px;
}

.nav_item:focus:not(:focus-visible) {
  outline: none;
}

/* ============================================
   特殊标记（可选）
   ============================================ */

/* 给导航项添加小图标 */
.nav_parent:nth-of-type(2) .nav_item::before {
  content: '🧭';
  margin-right: 6px;
  font-size: 14px;
}

.nav_parent:nth-of-type(3) .nav_item::before {
  content: '⭐';
  margin-right: 6px;
  font-size: 14px;
}

.nav_parent:nth-of-type(4) .nav_item::before {
  content: '💬';
  margin-right: 6px;
  font-size: 14px;
}

