/* ============================================
   统一导航栏样式 - 2025 优化版
   说明: 优化UI设计与交互体验，保留原有结构
   ============================================ */

:root {
    /* 覆盖部分全局变量以优化导航体验 */
    --header-height: 70px; /* 增加高度，更显大气 */
    --nav-item-radius: 4px; /* 矩形圆角 */
    --dropdown-animation: cubic-bezier(0.16, 1, 0.3, 1); /* iOS风格弹簧动画 */
}

/* 基础导航栏结构 */
.header {
    background: rgba(255, 255, 255, 0.95) !important; /* 轻微透明 */
    backdrop-filter: blur(12px) !important; /* 毛玻璃效果 */
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05) !important; /* 极细分割线代替粗阴影 */
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 1000 !important;
    transition: background 0.4s ease, box-shadow 0.4s ease !important; /* 只过渡背景和阴影，不过渡位置 */
    margin: 0 !important;
    padding: 0 !important;
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

/* 为页面内容添加顶部边距，避免被固定导航栏遮挡 */
html body {
    padding-top: var(--header-height, 70px) !important;
    box-sizing: border-box;
}

/* 有 header 容器时的内容区域 */
body.has-fixed-header {
    padding-top: var(--header-height, 70px) !important;
}

.nav-container {
    max-width: 1440px !important; /* 更宽的视野，强制应用 */
    margin: 0 auto !important; /* 强制居中 */
    display: grid !important; /* 强制使用grid布局 */
    grid-template-columns: 200px 1fr 240px !important; /* Logo固定200px | 菜单(自适应) | 按钮固定240px */
    align-items: center !important;
    gap: 24px !important; /* Logo和菜单、菜单和按钮之间的间距，强制应用 */
    padding: 0 24px !important; /* 强制应用padding */
    height: var(--header-height) !important; /* 强制应用高度 */
    box-sizing: border-box !important;
    position: relative !important;
}

/* Logo 优化 */
.nav-logo {
    flex-shrink: 0 !important; /* Logo区域不收缩，保持固定宽度 */
    width: 200px !important; /* 固定宽度，与grid列宽一致 */
    min-width: 200px !important;
    max-width: 200px !important;
    display: flex !important;
    align-items: center !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 10 !important;
}

.nav-logo a {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    letter-spacing: -0.5px;
    transition: opacity 0.3s;
    white-space: nowrap; /* 防止文字换行 */
}

.nav-logo a:hover {
    opacity: 0.8;
    transform: none; /* 移除原有位移，保持稳重 */
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 8px; /* 矩形Logo圆角 */
    box-shadow: 0 4px 10px rgba(245, 87, 108, 0.2);
    transition: transform 0.3s var(--dropdown-animation);
}

.nav-logo a:hover .logo-icon {
    transform: rotate(-5deg) scale(1.05);
    box-shadow: 0 6px 15px rgba(245, 87, 108, 0.3);
}

/* 导航菜单项优化 */
.nav-menu {
    display: flex !important;
    gap: 2px !important; /* 矩形交互间距更紧凑 */
    list-style: none !important;
    align-items: center !important;
    height: 100% !important;
    justify-content: center !important; /* 菜单项居中显示 */
    flex-wrap: nowrap !important; /* 防止换行 */
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
}

.nav-menu > li {
    height: 100%;
    display: flex;
    align-items: center;
}

.nav-menu > li > a {
    display: flex;
    align-items: center;
    padding: 0 16px; /* 上下padding设为0，配合height 100% */
    height: 40px; /* 固定高度，形成矩形按钮 */
    font-size: 0.95rem;
    font-weight: 400; /* 调整为更细的字体权重 */
    color: #4b5563;
    border-radius: var(--nav-item-radius);
    transition: all 0.2s ease;
    position: relative;
}

/* 悬停状态 - 矩形背景 */
.nav-menu > li > a:hover {
    background: #f3f4f6;
    color: #1f2937;
}

/* 激活状态 - 优雅的渐变背景效果 */
.nav-menu > li > a.active {
    background: linear-gradient(135deg, rgba(255, 71, 133, 0.1) 0%, rgba(230, 54, 112, 0.08) 100%);
    color: #FF4785;
    font-weight: 600;
    border-radius: 8px;
    position: relative;
}

.nav-menu > li > a.active::before {
    display: none; /* 移除选中下划线 */
}

.nav-menu > li > a.active::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 71, 133, 0.05) 0%, rgba(230, 54, 112, 0.03) 100%);
    border-radius: 8px;
    z-index: -1;
}

/* 父级菜单激活状态（子页面打开时） */
.nav-dropdown.active-parent > a,
.nav-mega-menu.active-parent > a {
    background: linear-gradient(135deg, rgba(255, 71, 133, 0.1) 0%, rgba(230, 54, 112, 0.08) 100%);
    color: #FF4785;
    font-weight: 600;
    border-radius: 8px;
    position: relative;
}

.nav-dropdown.active-parent > a::before,
.nav-mega-menu.active-parent > a::before {
    display: none; /* 移除选中下划线 */
}

.nav-dropdown.active-parent > a::after,
.nav-mega-menu.active-parent > a::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 71, 133, 0.05) 0%, rgba(230, 54, 112, 0.03) 100%);
    border-radius: 8px;
    z-index: -1;
}

/* 下拉箭头微调 */
.nav-dropdown-toggle {
    gap: 6px;
}

.dropdown-arrow {
    font-size: 0.7rem;
    opacity: 0.5;
    transition: transform 0.3s var(--dropdown-animation);
}

.nav-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
    opacity: 1;
}

/* ============================================
   下拉菜单 & Mega Menu 交互优化
   ============================================ */

/* 通用下拉容器动画基础 */
.mega-menu-content,
.dropdown-menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    width: 100%;
    background: #ffffff;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border-top: 1px solid rgba(0, 0, 0, 0.03);
    
    /* 动画状态 */
    visibility: hidden;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s var(--dropdown-animation);
    z-index: 900;
    
    /* 防止鼠标快速划过时闪烁 */
    pointer-events: none; 
}

/* 激活状态 */
.nav-dropdown:hover .mega-menu-content,
.nav-dropdown:hover .dropdown-menu,
.nav-dropdown.active .mega-menu-content,
.nav-dropdown.active .dropdown-menu {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* 普通下拉菜单特殊处理 - 不再全宽 */
.dropdown-menu {
    position: absolute;
    top: calc(100% - 10px); /* 稍微向上偏移 */
    left: 50%;
    width: auto;
    min-width: 220px; /* 稍微加宽 */
    transform: translateX(-50%) translateY(15px); /* 初始位置 */
    border-radius: 12px;
    padding: 8px;
    margin-top: 14px; /* 增加与导航栏的距离 */
    border: 1px solid rgba(0,0,0,0.05);
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.nav-dropdown:hover .dropdown-menu {
    transform: translateX(-50%) translateY(0);
}

.dropdown-menu a {
    padding: 10px 16px !important;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #4b5563;
    transition: all 0.2s;
    margin-bottom: 4px !important;
    display: flex; /* 支持图标对齐 */
    align-items: center;
    border-left: 3px solid transparent; /* 预留边框位置 */
}

.dropdown-menu a:hover {
    background: #fff5f7; /* 极淡的粉色背景 */
    color: #f5576c;
    transform: translateX(4px);
    border-left-color: #f5576c; /* 悬停显示左侧色条 */
    box-shadow: 0 2px 8px rgba(245, 87, 108, 0.05);
}

/* ============================================
   Mega Menu 内容布局优化
   ============================================ */

.mega-menu-layout {
    display: flex;
    max-width: 1280px;
    margin: 0 auto;
    min-height: 300px;
}

/* 左侧介绍区域 - 视觉增强 */
.mega-menu-intro {
    flex: 0 0 260px;
    background: linear-gradient(135deg, #fff8f9 0%, #fff 100%); /* 更暖的渐变 */
    padding: 32px;
    border-right: 1px solid rgba(245, 87, 108, 0.08);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* 装饰性背景圆 */
.mega-menu-intro::before {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    opacity: 0.05;
    border-radius: 50%;
}

.mega-menu-intro-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 12px;
    background: none;
    -webkit-text-fill-color: initial;
    position: relative;
}

.mega-menu-intro-desc {
    color: #6b7280;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 24px;
    position: relative;
}

.mega-menu-intro-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%); /* 深色渐变 */
    color: #fff;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    align-self: flex-start;
    position: relative;
}

.mega-menu-intro-link:hover {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); /* 悬停变品牌渐变色 */
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(245, 87, 108, 0.3);
    color: #fff;
}

/* 右侧内容区域 */
.mega-menu-content-area {
    flex: 1;
    padding: 32px 40px;
    background: #fff;
    background-image: radial-gradient(#f3f4f6 1px, transparent 1px); /* 点阵背景纹理 */
    background-size: 20px 20px;
}

.mega-menu-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 默认三列，更宽敞 */
    gap: 40px;
}

/* 单栏布局（用于子项较少的菜单） */
.mega-menu-columns.single-column {
    grid-template-columns: 1fr;
    gap: 8px;
}

.mega-menu-columns.single-column .mega-menu-section {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* 三栏布局（用于百宝箱等子项较多的菜单） */
.mega-menu-columns.three-columns {
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.mega-menu-columns.three-columns .mega-menu-section {
    min-width: 0;
}

.mega-menu-columns.three-columns .mega-menu-title {
    font-size: 0.8rem;
    margin-bottom: 12px;
    padding-bottom: 6px;
}

.mega-menu-columns.three-columns .mega-menu-item {
    padding: 6px 10px !important;
    font-size: 0.9rem;
}

/* 更多菜单的样式优化 */
.dropdown-mega-content .mega-menu-content-area {
    padding: 24px 32px;
}

.dropdown-mega-content .mega-menu-columns.single-column .mega-menu-section {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.dropdown-mega-content .mega-menu-item {
    padding: 8px 14px !important;
}

.mega-menu-columns.special-layout {
    grid-template-columns: 1fr 2fr; /* 左侧窄，右侧宽 */
    gap: 60px;
}

/* 栏目标题 */
.mega-menu-title, 
.mega-menu-column h4.mega-menu-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #f5576c; /* 标题使用强调色 */
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid rgba(245, 87, 108, 0.1); /* 增加彩色下划线 */
    display: inline-block; /* 让下划线只包裹文字 */
}

/* 链接项 */
.mega-menu-item,
.mega-menu-content a {
    display: block;
    padding: 8px 12px !important; /* 增加内部padding */
    color: #4b5563;
    font-size: 0.95rem;
    font-weight: 400 !important;
    transition: all 0.2s;
    border: none;
    margin-bottom: 4px !important;
    background: transparent !important;
    border-radius: 6px;
    border-left: 3px solid transparent; /* 预留边框 */
}

.mega-menu-item:hover,
.mega-menu-content a:hover {
    color: #f5576c;
    transform: translateX(4px); /* 仅移动 */
    background: #fff5f7 !important; /* 浅粉色背景 */
    border-left-color: #f5576c; /* 左侧强调色条 */
}

/* 热门标签 */
.mega-menu-tags {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed #e5e7eb;
}

.tag {
    display: inline-block;
    padding: 4px 10px;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 0.75rem;
    border-radius: 4px;
    margin: 0 6px 6px 0;
    transition: all 0.2s;
}

.tag:hover {
    background: #f5576c;
    color: #fff;
    transform: scale(1.05);
}

/* 导航操作按钮区 */
.nav-actions {
    display: flex !important;
    gap: 12px !important;
    align-items: center !important;
    flex-shrink: 0 !important; /* 按钮区域不收缩，保持固定宽度 */
    justify-content: flex-end !important; /* 按钮右对齐 */
    width: 240px !important; /* 固定宽度，与grid列宽一致 */
    min-width: 240px !important;
    max-width: 240px !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 10 !important;
    position: relative !important;
}

.nav-actions .btn-secondary,
.nav-actions .btn-primary {
    padding: 10px 24px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    cursor: pointer;
}

.nav-actions .btn-secondary {
    background: white;
    color: #1a202c;
    border: 1px solid #e2e8f0;
}

.nav-actions .btn-secondary:hover {
    border-color: #cbd5e0;
    background: #f7fafc;
    transform: translateY(-2px);
}

.nav-actions .btn-primary {
    background: linear-gradient(135deg, #FF4785 0%, #E63670 100%);
    color: white;
    border: none;
    box-shadow: 0 6px 15px rgba(255, 71, 133, 0.25);
}

.nav-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 71, 133, 0.35);
}

/* 用户信息区域 */
.nav-user-info {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
}

.nav-user-link {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 8px 12px !important;
    min-width: 140px !important;
    width: auto !important;
    background: linear-gradient(135deg, #FF4785 0%, #E63670 100%) !important;
    color: #ffffff !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 4px 12px rgba(255, 71, 133, 0.25) !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
    flex-wrap: nowrap !important;
}

.nav-user-link:hover {
    background: linear-gradient(135deg, #FF5C9D 0%, #F04A7A 100%) !important;
    box-shadow: 0 6px 20px rgba(255, 71, 133, 0.35) !important;
    transform: translateY(-2px) !important;
}

.nav-user-avatar {
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.2) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    color: #ffffff !important;
    flex-shrink: 0 !important;
}

.nav-user-name {
    font-weight: 600 !important;
    font-size: 14px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    flex-shrink: 0 !important;
    line-height: 1.4 !important;
    word-break: keep-all !important;
    word-wrap: normal !important;
    max-width: none !important;
}

/* 用户下拉菜单 */
.nav-user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 180px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.05);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001;
    padding: 8px;
    margin-top: 4px;
}

.nav-user-info:hover .nav-user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-user-dropdown .dropdown-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: #4b5563;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
    font-size: 14px;
    font-weight: 500;
}

.nav-user-dropdown .dropdown-item:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.nav-user-dropdown .dropdown-item:last-child {
    border-top: 1px solid #e5e7eb;
    margin-top: 4px;
    padding-top: 12px;
    color: #dc2626;
}

.nav-user-dropdown .dropdown-item:last-child:hover {
    background: #fef2f2;
    color: #dc2626;
}

/* 移动端菜单按钮 */
.mobile-menu-btn {
    display: none;
    width: 40px;
    height: 40px;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
    transition: background 0.2s;
}

.mobile-menu-btn:hover {
    background: #f3f4f6;
}

/* ============================================
   功能地图弹窗
   ============================================ */
.function-map-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

.function-map-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.function-map-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
}

.function-map-content {
    position: relative;
    width: 90%;
    max-width: 1100px;
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(0,0,0,0.05);
    overflow: hidden;
}

.function-map-modal.active .function-map-content {
    transform: scale(1);
}

.function-map-header {
    padding: 24px 32px;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.function-map-body {
    padding: 40px;
    max-height: 70vh;
    overflow-y: auto;
}

.map-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.map-card {
    padding: 16px;
    border-radius: 12px;
    background: #f9fafb;
    text-align: center;
    color: #4b5563;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.map-card:hover {
    background: #fff;
    border-color: #f5576c;
    color: #f5576c;
    box-shadow: 0 4px 12px rgba(245, 87, 108, 0.1);
    transform: translateY(-2px);
}

/* ============================================
   导航栏登录按钮区域优化
   ============================================ */
/* 补充样式：确保按钮区域在所有情况下都正确显示 */
.nav-actions {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    flex-shrink: 0 !important;
    /* 保持240px宽度以配合grid布局，不要改为auto */
    width: 240px !important;
    min-width: 240px !important;
    max-width: 240px !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 10 !important;
    position: relative !important;
    justify-content: flex-end !important;
}

/* 登录按钮样式优化 */
#navLoginBtn,
#navRegisterBtn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 10px 20px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    white-space: nowrap !important;
    cursor: pointer !important;
    outline: none !important;
    position: relative !important;
    overflow: hidden !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* 登录按钮（次要按钮） */
#navLoginBtn {
    background: #ffffff !important;
    color: #1f2937 !important;
    border: 1.5px solid #d1d5db !important;
    font-weight: 600 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
}

#navLoginBtn:hover {
    background: #fef2f2 !important;
    border-color: #FF4785 !important;
    color: #FF4785 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(255, 71, 133, 0.2) !important;
}

#navLoginBtn:active {
    transform: translateY(0) !important;
}

/* 注册按钮（主要按钮） */
#navRegisterBtn {
    background: linear-gradient(135deg, #FF4785 0%, #E63670 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(255, 71, 133, 0.25) !important;
}

#navRegisterBtn:hover {
    background: linear-gradient(135deg, #FF5C9D 0%, #F04A7A 100%) !important;
    box-shadow: 0 6px 20px rgba(255, 71, 133, 0.35) !important;
    transform: translateY(-2px) !important;
}

#navRegisterBtn:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 8px rgba(255, 71, 133, 0.3) !important;
}

/* 用户信息按钮（已登录状态） */
#navUserInfo {
    display: none !important;
    align-items: center !important;
    position: relative !important;
}

#navUserInfo[style*="display: flex"] {
    display: flex !important;
}

.nav-user-link {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 8px 12px !important;
    min-width: 140px !important;
    width: auto !important;
    background: linear-gradient(135deg, #FF4785 0%, #E63670 100%) !important;
    color: #ffffff !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 4px 12px rgba(255, 71, 133, 0.25) !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
    flex-wrap: nowrap !important;
}

.nav-user-link:hover {
    background: linear-gradient(135deg, #FF5C9D 0%, #F04A7A 100%) !important;
    box-shadow: 0 6px 20px rgba(255, 71, 133, 0.35) !important;
    transform: translateY(-2px) !important;
}

.nav-user-link:active {
    transform: translateY(0) !important;
}

/* 用户头像 */
.nav-user-avatar {
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.2) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    flex-shrink: 0 !important;
}

.nav-user-name {
    font-weight: 600 !important;
    font-size: 14px !important;
    white-space: nowrap !important;
    max-width: 100px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    flex-shrink: 1 !important;
}

/* 用户下拉菜单 */
.nav-user-dropdown {
    position: absolute !important;
    top: calc(100% + 8px) !important;
    right: 0 !important;
    min-width: 180px !important;
    background: #ffffff !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(-10px) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    z-index: 1001 !important;
    padding: 8px !important;
    margin-top: 4px !important;
}

.nav-user-info:hover .nav-user-dropdown {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

.nav-user-dropdown .dropdown-item {
    display: flex !important;
    align-items: center !important;
    padding: 12px 16px !important;
    color: #4b5563 !important;
    text-decoration: none !important;
    border-radius: 8px !important;
    transition: all 0.2s !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
}

.nav-user-dropdown .dropdown-item:hover {
    background: #f3f4f6 !important;
    color: #1f2937 !important;
}

.nav-user-dropdown .dropdown-item:last-child {
    border-top: 1px solid #e5e7eb !important;
    margin-top: 4px !important;
    padding-top: 12px !important;
    color: #dc2626 !important;
}

.nav-user-dropdown .dropdown-item:last-child:hover {
    background: #fef2f2 !important;
    color: #dc2626 !important;
}

/* ============================================
   响应式调整
   ============================================ */
@media (max-width: 1024px) {
    /* 移动端导航栏布局调整为flex，保持Logo和按钮位置一致 */
    .nav-container {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        grid-template-columns: none !important;
        gap: 0 !important;
    }
    
    .nav-logo {
        width: auto !important;
        min-width: auto !important;
        max-width: none !important;
        flex-shrink: 0 !important;
    }
    
    .nav-menu { 
        display: none !important; 
    }
    
    .nav-actions { 
        display: none !important; 
        width: auto !important;
        min-width: auto !important;
        max-width: none !important;
    }
    
    .mobile-menu-btn { 
        display: flex !important; 
        flex-shrink: 0 !important;
        width: 40px !important;
        min-width: 40px !important;
    }
    
    /* 移动端 body padding 调整 */
    body {
        padding-top: var(--header-height, 70px);
    }
    
    .nav-menu.active {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        bottom: 0;
        background: #fff;
        padding: 20px;
        align-items: flex-start;
        overflow-y: auto;
        z-index: 999;
        justify-content: flex-start;
    }
    
    .nav-menu.active > li {
        width: 100%;
        height: auto;
        margin-bottom: 10px;
    }
    
    .nav-menu.active > li > a {
        width: 100%;
        padding: 12px;
        font-size: 1.1rem;
    }
}
