/* ============================================================================
   客户版导航样式（OJ-TENANT-SITE-001）
   ----------------------------------------------------------------------------
   OJ-TENANT-NAV-ALIGN-002：客户版导航向总部版看齐（方案 B）
   问题：客户版 64px/18px/14px 与总部版 80px/26px/18px 差别明显，
        从客户站首页点进其他页面时导航会"跳一下"，视觉不连续。
   做法：尺寸与总部版 nav-hetao.css 对齐（80px 高、26px Logo、18px 菜单、
        相同的毛玻璃与阴影），但保留客户站自己的品牌色高亮与下拉交互。
   ============================================================================ */

.tn-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  padding: 0 40px;
  background: rgba(255, 255, 255, .88);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  backdrop-filter: blur(20px) saturate(140%);
  border-bottom: 1px solid rgba(255, 255, 255, .95);
  box-shadow: 0 5px 25px rgba(0, 0, 0, .05);
  transition: background .3s;
}
.tn-nav.scrolled { background: rgba(255, 255, 255, .96); }

/* ---------- Logo / 机构名 ---------- */
.tn-logo {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  font-size: 26px;
  font-weight: 800;
  color: #1D2129;
  letter-spacing: 1px;
  white-space: nowrap;
  text-decoration: none;
}
.tn-logo-text {
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tn-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #167BFF;
  display: inline-block;
  flex: 0 0 auto;
}

/* ---------- 主导航 ---------- */
.tn-links {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  justify-content: center;
  gap: 0;
  min-width: 0;
}
.tn-link { position: relative; }
.tn-link > a {
  display: inline-block;
  font-size: 18px;
  color: rgb(50, 50, 50);
  padding: 8px 20px;
  line-height: 28px;
  white-space: nowrap;
  transition: color .2s;
  text-decoration: none;
  border-radius: 0;
  background: none;
}
.tn-link > a:hover { color: #167BFF; }
.tn-link > a.current { color: #167BFF; font-weight: 700; }

/* 创作工具下拉 */
.tn-dd-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 220px;
  background: rgba(255, 255, 255, .97);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .12);
  padding: 8px;
  z-index: 1001;
}
.tn-dd.hover .tn-dd-menu,
.tn-dd.open .tn-dd-menu { display: block; }
.tn-dd-menu a {
  display: block;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 15px;
  color: rgb(50, 50, 50);
  text-decoration: none;
  white-space: nowrap;
}
.tn-dd-menu a:hover { background: #F2F6FF; color: #167BFF; }

/* ---------- 右侧：登录/用户 ---------- */
.tn-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}
.tn-btn {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 22px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 500;
  color: rgb(50, 50, 50);
  border: 1px solid #E4E8EE;
  background: #fff;
  transition: background .15s, border-color .15s;
  text-decoration: none;
}
.tn-btn:hover { background: #F8FAFC; border-color: #167BFF; color: #167BFF; }
/* OJ-TENANT-NAV-ALIGN-002：注册按钮颜色与总部版 nav-hetao.css 一致（橙色） */
.tn-btn-primary {
  background: #FF8819;
  border-color: #FF8819;
  color: #fff;
  font-weight: 600;
}
.tn-btn-primary:hover { background: #e9750a; border-color: #e9750a; color: #fff; }

/* 用户区 */
.tn-user { position: relative; }
.tn-user-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 5px;
  border-radius: 999px;
  border: 1px solid #E4E8EE;
  background: #fff;
  transition: background .15s;
  text-decoration: none;
}
.tn-user-trigger:hover { background: #F8FAFC; }
.tn-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
}
.tn-avatar-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #EFF4FF;
  color: #167BFF;
  font-size: 15px;
  font-weight: 700;
}
.tn-username {
  font-size: 15px;
  font-weight: 500;
  color: rgb(50, 50, 50);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tn-user-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 160px;
  padding: 8px;
  background: rgba(255, 255, 255, .97);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .12);
  z-index: 1001;
}
.tn-user.open .tn-user-menu { display: block; }
.tn-user-menu a {
  display: block;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 15px;
  color: rgb(50, 50, 50);
  text-decoration: none;
}
.tn-user-menu a:hover { background: #F2F6FF; color: #167BFF; }

/* ---------- 内容区需要让开固定导航的高度 ---------- */
body { padding-top: 80px; }

/* ---------- 响应式 ---------- */
@media (max-width: 1280px) {
  .tn-nav { padding: 0 24px; }
  .tn-link > a { font-size: 16px; padding: 8px 14px; }
  .tn-logo { font-size: 22px; }
  .tn-logo-text { max-width: 220px; }
}
@media (max-width: 1024px) {
  .tn-nav { height: 68px; padding: 0 16px; }
  body { padding-top: 68px; }
  .tn-link > a { font-size: 15px; padding: 8px 10px; }
  .tn-logo { font-size: 19px; }
  .tn-logo-text { max-width: 160px; }
  .tn-btn { height: 36px; padding: 0 16px; font-size: 14px; }
}
@media (max-width: 900px) {
  .tn-nav { height: auto; flex-wrap: wrap; padding: 10px 14px; }
  body { padding-top: 0; }
  .tn-links {
    order: 3;
    flex-basis: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }
  .tn-links::-webkit-scrollbar { display: none; }
  .tn-username { display: none; }
}
