/* 顶部导航栏样式 */
.nav-shadow {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

/* 移除a标签默认样式 */
.nav-menu a {
  text-decoration: none !important;
  color: inherit;
}

.nav-menu a:hover {
  text-decoration: none !important;
  color: inherit;
}

a {
  text-decoration: none !important;
}

a:hover {
  text-decoration: none !important;
}

.nav-header {
  margin: 0 auto;
  height: 80px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-left: 100px;
}

.nav-left {
  display: flex;
  align-items: center;
  margin-left: 0;
}

.nav-icon img {
  height: 45px;
}

.nav-menu {
  display: flex;
  gap: 40px;
  position: relative;
  padding: 5px 0;
}

/* 公共下划线 */
.nav-line {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  height: 0 !important;
  width: 0 !important;
  overflow: hidden !important;
  position: static !important;
}

.nav-item {
  color: #333;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none !important;
  padding: 10px 0;
  position: relative;
  transition: color 0.3s;
  white-space: nowrap;
  border-bottom: none !important;
  box-shadow: none !important;
}

.nav-item:hover, .nav-item.active {
  color: #1890ff;
  border-bottom: none !important;
  box-shadow: none !important;
  text-decoration: none !important;
}

/* 导航右侧 */
.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-right: 0;
}

/* 图片样式的控制按钮 */
.control {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #666;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  white-space: nowrap;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(79, 143, 247, 0.1);
  position: relative;
  overflow: hidden;
}

.control::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(79, 143, 247, 0.1), transparent);
  transition: left 0.5s;
}

.control:hover::before {
  left: 100%;
}

.control:hover {
  color: #4f8ff7;
  background: rgba(79, 143, 247, 0.05);
  border-color: rgba(79, 143, 247, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(79, 143, 247, 0.15);
}

/* 为控制按钮添加图标 */
.control[href*="docs"]::before {
  content: '📚';
  font-size: 16px;
  margin-right: 6px;
}

.control[href*="home"]::before {
  content: '⚙️';
  font-size: 16px;
  margin-right: 6px;
}

/* 现代化按钮样式 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 25px;
  border-radius: 12px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  white-space: nowrap;
  min-width: 120px;
  max-width: 160px;
  width: auto;
  font-weight: 500;
  box-sizing: border-box;
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
  border: none;
  backdrop-filter: blur(10px);
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

/* 确保登录注册按钮容器不会被挤压 */
.no-login {
  flex-shrink: 0 !important;
  min-width: fit-content !important;
}

/* 防止按钮文字换行 */
#site-header-login-btn,
#site-header-register-btn {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  box-sizing: border-box !important;
}

/* 强制显示登录注册按钮用于调试 */
.no-login {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex-wrap: nowrap !important;
  order: 2 !important; /* 确保按钮区域在最右边 */
}

.btn-normal {
  background: #1890ff !important;
  color: #fff !important;
  border: 1px solid #1890ff !important;
  border-radius: 0 !important; /* 去掉圆角 */
}

.btn-normal:hover {
  background: #6ba3f8 !important;
  border-color: #6ba3f8 !important;
  color: #fff !important;
}

/* 登录按钮样式 */
.btn-normal-light {
  background: #fff !important;
  color: #4f8ff7 !important;
  border: 1px solid #4f8ff7 !important;
}

.btn-normal-light:hover {
  background: #f0f7ff !important;
  color: #4f8ff7 !important;
}

.mr-10 {
  margin-right: 10px;
}

.ml-10 {
  margin-left: 10px;
}



.font-el1 {
  font-size: 15px;
  color: #333;
}

/* 汉堡菜单按钮样式 */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 20px;
  color: #333;
  cursor: pointer;
  padding: 8px;
  border-radius: 4px;
  transition: background-color 0.3s;
}

.mobile-menu-toggle:hover {
  background-color: #f5f5f5;
}

/* 移动端导航菜单 */
.mobile-nav-menu {
  display: none;
  position: fixed;
  top: 80px;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 999;
  padding: 20px;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
}

.mobile-nav-menu.active {
  display: block;
}

.mobile-nav-item {
  display: block;
  padding: 12px 0;
  color: #333;
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  border-bottom: 1px solid #f0f0f0;
  transition: color 0.3s;
}

.mobile-nav-item:hover {
  color: #1890ff;
}

.mobile-nav-item:last-child {
  border-bottom: none;
}

/* 响应式调整 */
@media (max-width: 992px) {
  .nav-menu {
    display: none;
  }
  
  .mobile-menu-toggle {
    display: block;
  }
  
  .nav-right {
    gap: 15px;
  }
  
  .control {
    padding: 6px 10px;
    font-size: 13px;
    border-radius: 6px;
  }
  
  .btn {
    padding: 8px 16px;
    font-size: 13px;
    min-width: 85px;
    max-width: 120px;
    border-radius: 10px;
  }
}

/* 移动端按钮优化 */
@media (max-width: 768px), (max-width: 1180px) and (max-height: 820px), (max-width: 820px) and (max-height: 1180px) {
  .nav-header {
    height: 60px !important;
    padding: 0 15px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
  }
  
  .nav-left {
    flex: 1 !important;
    min-width: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
  }
  
  .nav-icon img {
    height: 32px !important;
  }
  
  .mobile-menu-toggle {
    display: block !important;
    order: 2;
  }
  
  .nav-menu {
    display: none !important;
  }
  
  .mobile-nav-menu {
    top: 60px !important;
  }
  
  .nav-right {
    gap: 8px !important;
    min-width: 180px !important;
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
  }
  
  .nav-links {
    display: none !important; /* 在移动端隐藏导航链接 */
  }
  
  .control {
    font-size: 12px;
    padding: 6px 8px;
    white-space: nowrap;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.7);
  }
  
  .control[href*="docs"]::after,
  .control[href*="home"]::after {
    font-size: 14px;
  }
  
  /* 强制显示登录注册按钮用于调试 */
  .no-login {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-wrap: nowrap !important;
    flex-shrink: 0 !important;
  }
  
  .btn {
    padding: 8px 14px !important;
    font-size: 13px !important;
    min-width: 75px !important;
    max-width: 95px !important;
    min-height: 36px !important;
    border-radius: 8px !important;
    white-space: nowrap !important;
  }
  
  .btn::after {
    font-size: 10px !important;
    right: 6px !important;
  }
  
  /* 确保按钮在768px以下屏幕正常显示 */
  #site-header-login-btn {
    padding: 8px 12px !important;
    min-width: 70px !important;
    max-width: 90px !important;
  }
  
  #site-header-register-btn {
    padding: 8px 12px !important;
    min-width: 75px !important;
    max-width: 95px !important;
  }
}

/* 头像样式 */
.user-avatar {
  display: none; /* 默认隐藏 */
}

/* 移动端显示头像 */
@media (max-width: 768px) {
  .user-avatar {
    display: flex !important;
    align-items: center;
    margin-left: 15px;
    cursor: pointer;
    transition: color 0.3s;
  }
  
  .user-avatar:hover i {
    color: #4f8ff7;
  }
  
  .btn.btn-normal {
    display: none !important;
  }
  
  /* 隐藏整个按钮容器 */
  #site-header-auth-buttons {
    display: none !important;
  }
}

/* 超小屏幕按钮优化 */
@media (max-width: 480px) {
  .nav-header {
    padding: 0 12px !important;
  }
  
  .nav-icon img {
    height: 28px !important;
  }
  
  .mobile-nav-menu {
    top: 60px !important;
    padding: 15px !important;
  }
  
  .control {
    display: none; /* 在超小屏幕上隐藏以节省空间 */
  }
  
  .nav-right {
    gap: 6px !important;
    min-width: 160px !important;
  }
  
  /* 强制显示登录注册按钮 */
  .no-login {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex-wrap: nowrap !important;
    flex-shrink: 0 !important;
    min-width: 150px !important;
  }
  
  .btn {
    padding: 6px 10px !important;
    font-size: 12px !important;
    min-width: 65px !important;
    max-width: 80px !important;
    min-height: 32px !important;
    border-radius: 6px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  
  .btn::after {
    font-size: 9px !important;
    right: 4px !important;
  }
  
  /* 确保按钮文字不被截断 */
  #site-header-login-btn {
    padding: 6px 8px !important;
    min-width: 60px !important;
    max-width: 75px !important;
    font-size: 11px !important;
  }
  
  #site-header-register-btn {
    padding: 6px 8px !important;
    min-width: 65px !important;
    max-width: 80px !important;
    font-size: 11px !important;
  }
}

/* 横屏模式按钮优化 */
@media (max-width: 768px) and (orientation: landscape) {
  .nav-header {
    height: 50px !important;
    padding: 0 10px !important;
  }
  
  .nav-icon img {
    height: 26px !important;
  }
  
  .mobile-nav-menu {
    top: 50px !important;
    padding: 15px !important;
  }
  
  /* 强制显示登录注册按钮 */
  .no-login {
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
    flex-wrap: nowrap !important;
    flex-shrink: 0 !important;
  }
  
  .btn {
    padding: 4px 10px !important;
    font-size: 11px !important;
    min-width: 65px !important;
    max-width: 80px !important;
    min-height: 26px !important;
    border-radius: 5px !important;
  }
  
  .btn::after {
    font-size: 8px !important;
    right: 4px !important;
  }
  
  .nav-right {
    gap: 5px !important;
    min-width: 140px !important;
  }
}

/* 极小屏幕优化 (360px以下) */
@media (max-width: 360px) {
  .nav-header {
    padding: 0 8px !important;
  }
  
  .nav-icon img {
    height: 24px !important;
  }
  
  .mobile-nav-menu {
    top: 60px !important;
    padding: 12px !important;
  }
  
  .mobile-nav-item {
    padding: 10px 0 !important;
    font-size: 15px !important;
  }
  
  .nav-right {
    min-width: 130px !important;
    gap: 4px !important;
  }
  
  .no-login {
    gap: 4px !important;
    min-width: 120px !important;
  }
  
  .btn {
    padding: 5px 6px !important;
    font-size: 10px !important;
    min-width: 50px !important;
    max-width: 60px !important;
    min-height: 28px !important;
    border-radius: 4px !important;
  }
  
  .btn::after {
    font-size: 8px !important;
    right: 3px !important;
  }
  
  #site-header-login-btn {
    padding: 5px 6px !important;
    min-width: 45px !important;
    max-width: 55px !important;
  }
  
  #site-header-register-btn {
    padding: 5px 6px !important;
    min-width: 50px !important;
    max-width: 60px !important;
  }
}

.nav-cont {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 998;
}

/* 产品菜单基础样式（含尺寸与过渡） */
.nav-products { position: relative; padding: 10px 0; }

.nav-products-label { cursor: default; }

/* 关于菜单基础样式 */
.nav-about { position: relative; padding: 10px 0; }

.nav-about-label { cursor: default; }

/* 产品菜单箭头样式 */
.nav-arrow {
    display: inline-block;
    margin-left: 6px;
    transition: transform 0.25s ease;
    font-weight: normal;
    font-size: 12px;
    color: #666;
    vertical-align: middle;
}

.nav-item:hover .nav-arrow {
    transform: rotate(180deg);
}

/* 产品菜单下拉框 - 整体尺寸与圆角调整 */
.product-menu-dropdown {
    position: absolute;
    top: calc(100% + 20px);
    left: -50px; /* 从-30px改为-50px，再向左移动20px */
    background: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    min-width: 1020px;
    padding: 26px 22px;
    z-index: 1000;
    visibility: hidden;
    opacity: 0;
    pointer-events: auto; /* 允许自身hover成立，避免从.nav-products移入时丢失 */
    transition: all 0.25s ease;
    transform: translateY(-8px);
}

/* 添加尖角指向产品菜单 - 调整位置指向"产品"文字 */
.product-menu-dropdown::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 75px; /* 因为菜单向左移动了50px，所以尖角需要向右移动到75px */
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #ffffff;
    z-index: 1001;
}

.product-menu-dropdown::after {
    content: '';
    position: absolute;
    top: -9px;
    left: 75px; /* 因为菜单向左移动了50px，所以尖角需要向右移动到75px */
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #e8e8e8;
    z-index: 1000;
}

/* 修复悬停逻辑：当鼠标在产品菜单项或下拉菜单上时都保持显示 */
.nav-products:hover .product-menu-dropdown,
.product-menu-dropdown:hover {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    transition-delay: 0s; /* 显示时无延迟 */
}

/* 添加鼠标离开时的延迟 */
/* 删除通用transition-delay，改由visibility延迟控制隐藏 */
/* .product-menu-dropdown { transition-delay: 0.3s; } */

.product-menu-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px 38px;
}

.menu-section-title {
    font-size: 15px; /* 从14px增加到15px */
    font-weight: 500; /* 从600减少到500，字体稍微细一点 */
    color: #333;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid #f5f5f5;
}

.menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-list li {
    margin-bottom: 6px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start; /* 改为左对齐，而不是两端对齐 */
}

.menu-list li a {
    color: #333;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    padding: 8px 6px;
    border-radius: 4px;
    transition: all 0.25s ease;
    line-height: 1.4;
    display: flex;
    align-items: center;
    /* 移除 flex: 1，让链接不占据全部空间 */
}

.menu-list li a:hover {
    background-color: #f8f9fa;
    color: #007bff;
}

/* 标签样式 - 紧跟在文字后面 */
.tag {
    font-size: 9px;
    font-weight: 400;
    padding: 2px 6px;
    border-radius: 10px;
    color: white;
    margin-left: 6px; /* 减少左边距，让标签更贴近文字 */
    flex-shrink: 0;
}

.tag-hot {
    background-color: #ff4757;
}

.tag-new {
    background-color: #2ed573;
}

.tag-soon {
    background-color: #ffa502;
}

.tag-pending {
    background-color: #747d8c;
}

/* 响应式调整 */
/* 移动端响应式设计 */
@media (max-width: 992px) {
  .mobile-menu-toggle {
    display: block !important;
  }
  
  .nav-menu {
    display: none !important;
  }
  
  .nav-links {
    display: none !important;
  }
}

@media (max-width: 768px) {
    .product-menu-dropdown {
        min-width: 540px;
        padding: 20px 18px;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px 30px;
    }
    
    .product-menu-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px 30px;
    }
}

@media (max-width: 480px) {
  .product-menu-dropdown { min-width: 100%; }
  .product-menu-grid { grid-template-columns: 1fr; }
}

/* 在"产品"与下拉之间增加悬停桥接，避免鼠标经过空隙时丢失hover */
.nav-products::after {
  content: '';
  position: absolute;
  left: -80px;   /* 因为菜单向左移动到-50px，所以桥接区域也需要扩大覆盖 */
  right: -40px;  /* 右侧也适当扩展，避免斜向移动时断层 */
  top: 100%;
  height: 20px;  /* 精准覆盖 vertical gap 20px，避免覆盖下拉顶部 */
  pointer-events: auto; /* 允许承接hover，避免间隙导致的丢失 */
}

/* 悬停或通过.open类名时显示下拉菜单（与JS配合） */
.nav-products:hover .product-menu-dropdown,
.product-menu-dropdown:hover,
.nav-products.open .product-menu-dropdown {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0s; /* 显示visibility不延迟 */
}

.product-menu-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px 38px;
}

.menu-section-title {
    font-size: 15px; /* 从14px增加到15px */
    font-weight: 500; /* 从600减少到500，字体稍微细一点 */
    color: #333;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid #f5f5f5;
}

.menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-list li {
    margin-bottom: 6px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.menu-list li a {
    color: #333;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    padding: 8px 6px;
    border-radius: 4px;
    transition: all 0.25s ease;
    line-height: 1.4;
    display: flex;
    align-items: center;
    flex: 1;
}

.menu-list li a:hover {
    background-color: #f8f9fa;
    color: #007bff;
}

/* 标签样式 - 显示在右边 */
.tag {
    font-size: 9px;
    font-weight: 400;
    padding: 2px 6px;
    border-radius: 10px;
    color: white;
    margin-left: 8px;
    flex-shrink: 0;
}

.tag-hot {
    background-color: #ff4757;
}

.tag-new {
    background-color: #2ed573;
}

.tag-soon {
    background-color: #ffa502;
}

.tag-pending {
    background-color: #747d8c;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .product-menu-dropdown {
        min-width: 540px;
        padding: 20px 18px;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px 30px;
    }
    
    .product-menu-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px 30px;
    }
}

@media (max-width: 480px) {
  .product-menu-dropdown { min-width: 100%; }
  .product-menu-grid { grid-template-columns: 1fr; }
}

/* 关于菜单基础样式 */
.nav-about { position: relative; padding: 10px 0; }

.nav-about-label { cursor: default; }

/* 关于菜单箭头样式 */
.nav-arrow {
    display: inline-block;
    margin-left: 6px;
    transition: transform 0.25s ease;
    font-weight: normal;
    font-size: 12px;
    color: #666;
    vertical-align: middle;
}

.nav-item:hover .nav-arrow {
    transform: rotate(180deg);
}

/* 关于菜单下拉框样式 */
.about-menu-dropdown {
    position: absolute;
    top: calc(100% + 20px);
    left: -20px;
    background: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    min-width: 160px;
    padding: 12px 0;
    z-index: 1000;
    visibility: hidden;
    opacity: 0;
    pointer-events: auto;
    transition: all 0.25s ease;
    transform: translateY(-8px);
}

/* 关于菜单尖角 */
.about-menu-dropdown::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 35px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #ffffff;
    z-index: 1001;
}

.about-menu-dropdown::after {
    content: '';
    position: absolute;
    top: -9px;
    left: 35px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #e8e8e8;
    z-index: 1000;
}

/* 关于菜单列表 */
.about-menu-list {
    display: flex;
    flex-direction: column;
}

/* 关于菜单项样式 */
.about-menu-item {
    display: block;
    padding: 10px 20px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.4;
    transition: color 0.3s ease;
    border-left: 3px solid transparent;
}

.about-menu-item:hover {
    color: #1890ff;
}

/* 关于菜单悬停显示 */
.nav-about:hover .about-menu-dropdown,
.about-menu-dropdown:hover {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    transition-delay: 0s;
}
.free{
  height: 80px !important;
}

/* 关于菜单悬停桥接 */
.nav-about::after {
    content: '';
    position: absolute;
    top: 100%;
    left: -40px;
    width: calc(100% + 80px);
    height: 20px;
    pointer-events: auto;
    z-index: 999;
}

/* 汉堡菜单按钮样式 */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 18px;
    color: #333;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1000;
    width: 34px; /* 固定宽度 */
    height: 34px; /* 固定高度 */
}

.mobile-menu-toggle:hover {
    background-color: #f5f5f5;
    color: #1890ff;
}

.mobile-menu-toggle i {
    font-size: 18px;
    transition: all 0.3s ease;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* 菜单按钮激活状态 - 图标旋转动画 */
.mobile-menu-toggle.active i.fa-bars {
    transform: translate(-50%, -50%) rotate(90deg);
    opacity: 0;
}

.mobile-menu-toggle.active i.fa-times {
    transform: translate(-50%, -50%) rotate(0deg);
    opacity: 1;
}

/* 关闭图标初始状态 */
.mobile-menu-toggle i.fa-times {
    transform: translate(-50%, -50%) rotate(-90deg);
    opacity: 0;
    transition: all 0.3s ease;
}

/* 汉堡图标激活时的状态 */
.mobile-menu-toggle i.fa-bars {
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
}

/* 确保body和html不影响全屏菜单 */
body.mobile-menu-open {
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
}

html.mobile-menu-open {
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    height: 100% !important;
}

/* 移动端全屏导航菜单样式 */
.mobile-nav-menu {
    position: fixed !important;
    top: 60px !important; /* 保留页头高度 */
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: calc(100vh - 60px) !important; /* 减去页头高度 */
    min-height: calc(100vh - 60px) !important;
    max-width: none !important;
    max-height: none !important;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 50%, #dee2e6 100%);
    z-index: 999999 !important;
    transform: translateY(0);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    border: none !important;
    outline: none !important;
}

.mobile-nav-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

/* 移动端菜单头部 */
.mobile-nav-header {
    position: absolute;
    top: 0;
    right: 0;
    padding: 20px;
    z-index: 11;
}

.mobile-nav-title {
    display: none;
}

.mobile-nav-close {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #6c757d;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: #495057;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.mobile-nav-close:hover {
    background: #fff;
    border-color: #007bff;
    color: #007bff;
    transform: rotate(90deg);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
}

/* 移动端菜单内容区域 */
.mobile-nav-content {
    flex: 1;
    display: flex;
    width: 100vw !important;
    height: calc(100vh - 60px) !important; /* 减去页头高度 */
    min-height: calc(100vh - 60px) !important;
    padding-top: 0; /* 移除上外边距 */
    margin: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box !important;
    max-width: none !important;
    max-height: none !important;
    overflow: hidden;
}

/* 左侧一级菜单 */
.mobile-nav-primary {
    width: 40% !important;
    min-width: 40% !important;
    max-width: 40% !important;
    height: 100% !important;
    background: rgba(255, 255, 255, 0.95);
    border-right: 1px solid #dee2e6;
    overflow-y: auto;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.05);
    box-sizing: border-box !important;
}

.mobile-nav-item {
    display: block;
    padding: 20px 25px;
    color: #495057;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    border-bottom: 1px solid #f8f9fa;
    transition: all 0.3s ease;
    position: relative;
    width: 100% !important;
    box-sizing: border-box !important;
}

.mobile-nav-item:hover,
.mobile-nav-item.active {
    background: #f8f9fa;
    color: #007bff;
    transform: translateX(5px);
    border-left: 3px solid #007bff;
}

.mobile-nav-item.has-submenu::after {
    content: '\f054';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: #6c757d;
    transition: all 0.3s ease;
}

.mobile-nav-item.active.has-submenu::after {
    transform: translateY(-50%) rotate(90deg);
    color: #007bff;
}

/* 右侧二级菜单 */
.mobile-nav-secondary {
    width: 60% !important;
    min-width: 60% !important;
    max-width: 60% !important;
    height: 100% !important;
    background: #fff;
    overflow-y: auto;
    padding: 30px 0;
    box-shadow: inset 2px 0 8px rgba(0, 0, 0, 0.05);
    box-sizing: border-box !important;
}

.mobile-submenu {
    display: none;
    padding: 0;
    animation: fadeInUp 0.3s ease;
    width: 100% !important;
    box-sizing: border-box !important;
}

.mobile-submenu.active {
    display: block;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-submenu-section {
    margin-bottom: 35px;
}

.mobile-submenu-title {
    font-size: 18px;
    font-weight: 700;
    color: #343a40;
    padding: 0 25px 15px;
    position: relative;
    margin-bottom: 20px;
}

.mobile-submenu-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 25px;
    width: 30px;
    height: 3px;
    background: linear-gradient(90deg, #007bff, #0056b3);
    border-radius: 2px;
}

.mobile-submenu-item {
    display: block;
    padding: 15px 25px;
    color: #6c757d;
    text-decoration: none;
    font-size: 15px;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    position: relative;
}

.mobile-submenu-item:hover {
    background: linear-gradient(90deg, rgba(0, 123, 255, 0.05), rgba(0, 86, 179, 0.05));
    color: #495057;
    border-left-color: #007bff;
    transform: translateX(5px);
}

.mobile-submenu-item .tag {
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 12px;
    color: white;
    margin-left: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mobile-submenu-item .tag-hot {
    background: linear-gradient(45deg, #dc3545, #c82333);
}

.mobile-submenu-item .tag-new {
    background: linear-gradient(45deg, #28a745, #1e7e34);
}

.mobile-submenu-item .tag-soon {
    background: linear-gradient(45deg, #ffc107, #e0a800);
}

.mobile-submenu-item .tag-pending {
    background: linear-gradient(45deg, #6c757d, #545b62);
}

/* 移动端隐藏注册按钮和显示头像 */
@media (max-width: 768px) {
    /* 隐藏注册按钮容器与按钮本身（双保险） */
    #site-header-auth-buttons,
    #site-header-register-btn,
    .btn.btn-normal {
        display: none !important;
    }

    /* 隐藏右侧文本链接 */
    .nav-links {
        display: none !important;
    }

    /* 显示汉堡菜单按钮 */
    .mobile-menu-toggle {
        display: inline-flex !important;
        order: 1; /* 置于头像右侧 */
    }

    /* 头像样式 - 仅在移动端显示 */
    .user-avatar {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 34px;
        height: 34px;
        margin-right: 4px;
        cursor: pointer;
        border-radius: 50%;
        transition: all 0.3s ease;
        background: rgba(255, 255, 255, 0.8);
        order: 0; /* 在汉堡左侧 */
    }

    .user-avatar:hover {
        background: rgba(24, 144, 255, 0.1);
        transform: scale(1.05);
    }

    .user-avatar i {
        font-size: 20px;
        color: #666;
        transition: color 0.3s ease;
    }

    .user-avatar:hover i {
        color: #1890ff;
    }

    /* nav-right不允许换行，确保头像在汉堡左侧同一行 */
    .nav-right {
        display: flex;
        align-items: center;
        gap: 4px;
        flex-wrap: nowrap !important;
        justify-content: flex-end;
    }

    /* 调整导航头部在移动端的左右内边距 */
    .nav-header {
        padding-left: 16px;
        padding-right: 16px;
    }
}

/* 桌面端隐藏头像 */
@media (min-width: 769px) {
    .user-avatar {
        display: none !important;
    }
}

/* 平板端适配 (769px - 1366px) - 覆盖iPad Pro横屏 */
@media (min-width: 769px) and (max-width: 1366px) {
    /* 导航头部调整 */
    .nav-header {
        padding-left: 20px;
        height: 70px;
        max-width: 100%;
        margin: 0;
        width: 100%;
    }
    .free{
      height: 70px !important;
    }
    
    /* Logo尺寸调整 */
    .nav-icon img {
        height: 38px !important;
    }
    
    /* 导航菜单间距调整 */
    .nav-menu {
        gap: 20px;
    }
    
    /* 导航项字体调整 */
    .nav-item {
        font-size: 14px;
        padding: 8px 0;
    }
    
    /* 右侧按钮区域调整 */
    .nav-right {
        gap: 12px;
    }
    
    /* 按钮样式调整 */
    .btn {
        padding: 8px 16px;
        font-size: 13px;
        min-width: 80px;
        max-width: 120px;
    }
    
    /* 关于菜单下拉框调整 */
    .about-menu-dropdown {
        width: 260px;
        right: -10px;
    }
    
    .about-menu-item {
        padding: 12px 18px;
        font-size: 13px;
    }
    
    /* 移动端菜单按钮在平板端隐藏 */
    .mobile-menu-toggle {
        display: none !important;
    }
    
    /* 确保导航菜单在平板端显示 */
    .nav-menu {
        display: flex !important;
    }
    
    /* 确保右侧链接在平板端显示 */
    .nav-links {
        display: flex !important;
    }
    
    /* 确保注册按钮在平板端显示 */
    #site-header-auth-buttons,
    #site-header-register-btn {
        display: flex !important;
    }
}

/* 大尺寸平板优化 (1025px - 1366px) */
@media (min-width: 1025px) and (max-width: 1366px) {
    .nav-header {
        padding-left: 40px;
        padding-right: 0px !important;
        height: 72px;
    }
    
    .nav-menu {
        gap: 25px;
    }
    
    .nav-item {
        font-size: 15px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 14px;
        min-width: 100px;
        max-width: 140px;
    }
}