/* 导航栏组件样式 */

/* ===== 侧边栏优化样式 ===== */
.sidebar {
    width: 260px !important;
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%) !important;
    border-radius: 12px !important;
    padding: 16px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06), 0 1px 4px rgba(0, 0, 0, 0.04) !important;
    height: fit-content !important;
    position: sticky !important;
    top: 80px !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    transition: all 0.3s ease !important;
    z-index: 10000 !important; /* 确保侧边栏在下拉菜单之上 */
}

.sidebar:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1), 0 2px 8px rgba(0, 0, 0, 0.06) !important;
    transform: translateY(-2px) !important;
}

.sidebar-section {
    margin-bottom: 16px !important;
    padding-bottom: 12px !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
}

.sidebar-section:last-child {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    border-bottom: none !important;
}

.section-title {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #2c3e50 !important;
    margin-bottom: 8px !important;
    padding: 6px 12px !important;
    background: #f8f9fa !important;
    border: 1px solid #e9ecef !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
    cursor: default !important;
}

.section-title:hover {
    background: #e9ecef !important;
    border-color: #dee2e6 !important;
}

.section-title i {
    font-size: 12px !important;
    color: #6c757d !important;
}

.tool-list {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.tool-list li {
    margin-bottom: 2px !important;
}

.tool-list li:last-child {
    margin-bottom: 0 !important;
}

.tool-link {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 8px 12px !important;
    color: #5a6c7d !important;
    text-decoration: none !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
    position: relative !important;
    border: 1px solid transparent !important;
    background: rgba(255, 255, 255, 0.5) !important;
    margin-bottom: 2px !important;
}

/* 侧边栏图标 - 统一尺寸，确保清晰度 */
.tool-icon,
.sidebar .tool-icon,
.tool-link .tool-icon,
.tool-link img.tool-icon {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    min-height: 48px !important;
    max-width: 48px !important;
    max-height: 48px !important;
    object-fit: contain !important;
    flex-shrink: 0 !important;
    transition: transform 0.2s ease !important;
    image-rendering: -webkit-optimize-contrast !important;
    image-rendering: crisp-edges !important;
}

.tool-icon-fa {
    width: 24px !important;
    height: 24px !important;
    font-size: 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #667eea !important;
    flex-shrink: 0 !important;
    transition: all 0.2s ease !important;
    font-weight: 600 !important;
}

.tool-link:hover .tool-icon,
.tool-link:hover .tool-icon-fa {
    transform: scale(1.1) !important;
}

.tool-link.active .tool-icon-fa {
    color: white !important;
}

.tool-link:hover {
    background: #e3f2fd !important;
    color: #1976d2 !important;
    transform: translateX(4px) !important;
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.2) !important;
    border-color: #bbdefb !important;
}

.tool-link.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    box-shadow: 0 3px 12px rgba(102, 126, 234, 0.4) !important;
    border-color: rgba(102, 126, 234, 0.3) !important;
    font-weight: 600 !important;
}

.tool-link.active::after {
    content: '' !important;
    position: absolute !important;
    right: 8px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 6px !important;
    height: 6px !important;
    background: white !important;
    border-radius: 50% !important;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3) !important;
}

.ai-badge {
    background: linear-gradient(135deg, #ff6b9d 0%, #ff8c42 100%) !important;
    color: white !important;
    font-size: 9px !important;
    padding: 2px 6px !important;
    border-radius: 10px !important;
    margin-left: 6px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    box-shadow: 0 1px 3px rgba(255, 107, 157, 0.3) !important;
}

/* 响应式侧边栏 */
@media (max-width: 1024px) {
    .sidebar {
        width: 240px !important;
        padding: 16px !important;
    }
    
    .section-title {
        font-size: 13px !important;
        padding: 6px 10px !important;
    }
    
    .tool-link {
        padding: 8px 10px !important;
        font-size: 12px !important;
    }
    
    .tool-icon {
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        min-height: 44px !important;
        max-width: 44px !important;
        max-height: 44px !important;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 100% !important;
        position: relative !important;
        top: 0 !important;
        margin-bottom: 20px !important;
        border-radius: 8px !important;
    }
    
    .sidebar-section {
        margin-bottom: 16px !important;
        padding-bottom: 16px !important;
    }
    
    .tool-icon {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        min-height: 40px !important;
        max-width: 40px !important;
        max-height: 40px !important;
    }
}

/* 顶部导航栏 */
.top-nav {
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    position: sticky;
    top: 0;
    z-index: 10000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: visible !important;
    /* 防止页面加载时的滑动动画 */
    transform: translateY(0) !important;
    transition: none !important;
}

/* 页面加载完成后才启用过渡动画 */
body.loaded .top-nav {
    transition: transform 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    height: 60px;
    flex-wrap: nowrap;
    overflow: visible !important;
    position: relative;
    z-index: 10001;
    /* 防止内容滑动动画 - 但不影响定位计算 */
    opacity: 1;
    transition: none !important;
}

/* 页面加载完成后才启用过渡动画 */
body.loaded .nav-container {
    transition: opacity 0.3s ease;
}

/* 导航菜单项 - 防止加载时的滑动 */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 30px;
    flex: 1;
    justify-content: center;
    flex-shrink: 1;
    min-width: 0;
    /* 防止加载时的位置变化 - 但不使用transform，避免影响定位计算 */
    opacity: 1;
    transition: none !important;
}

/* 页面加载完成后才启用过渡动画 */
body.loaded .nav-menu {
    transition: opacity 0.3s ease;
}

body.loaded .nav-link {
    transition: color 0.3s ease;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    /* 防止加载时的滑动动画 - 但不使用transform，避免影响定位计算 */
    opacity: 1;
    transition: none !important;
}

/* 页面加载完成后才启用过渡动画 */
body.loaded .logo {
    transition: opacity 0.3s ease;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-icon {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    object-fit: cover;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.logo-icon:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.logo-squares {
    display: flex;
    gap: 2px;
}

.square {
    width: 8px;
    height: 8px;
    border-radius: 1px;
}

.square.pink { background-color: #ff6b9d; }
.square.orange { background-color: #ff8c42; }
.square.green { background-color: #4ecdc4; }
.square.blue { background-color: #45b7d1; }

.logo-text {
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

/* 导航菜单样式已移至上方，此处保留以避免重复 */

.nav-link {
    text-decoration: none;
    color: #666;
    font-size: 14px;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    /* 默认不启用过渡动画，防止加载时的滑动 */
    transition: none;
    white-space: nowrap;
    vertical-align: middle;
}

.nav-link:hover {
    color: #007bff;
}

.nav-link i.fa-chevron-down {
    font-size: 10px;
    margin-left: 2px;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    flex-shrink: 0;
    font-style: normal;
    transform: none;
}

/* Font Awesome 图标替代 - 统一所有页面 */
.fas.fa-chevron-down::before,
.fa-chevron-down::before,
.nav-link i.fa-chevron-down::before {
    content: '▼';
    font-family: inherit;
    font-size: 10px;
    font-weight: normal;
    font-style: normal;
    display: inline-block;
    vertical-align: middle;
    line-height: 1;
    transform: none !important;
}

.fas.fa-fire::before,
.fa-fire::before,
.nav-link i.fa-fire::before {
    content: '🔥';
    font-family: inherit;
    font-size: 12px;
    font-weight: normal;
    font-style: normal;
    display: inline-block;
    vertical-align: middle;
    line-height: 1;
    transform: none !important;
}

/* 确保所有 Font Awesome 图标不倾斜 */
.fas,
.fa,
.nav-link i,
.benefit-icon i {
    font-style: normal !important;
    transform: none !important;
}

.fas::before,
.fa::before {
    font-style: normal !important;
    transform: none !important;
}

/* 权益卡片图标替代 */
.fas.fa-crown::before,
.fa-crown::before {
    content: '👑';
    font-family: inherit;
    font-size: inherit;
    font-weight: normal;
    font-style: normal;
    display: inline-block;
    vertical-align: middle;
    line-height: 1;
    transform: none !important;
}

.fas.fa-times::before,
.fa-times::before {
    content: '×';
    font-family: inherit;
    font-size: inherit;
    font-weight: normal;
    font-style: normal;
    display: inline-block;
    vertical-align: middle;
    line-height: 1;
    transform: none !important;
}

.fas.fa-infinity::before,
.fa-infinity::before {
    content: '∞';
    font-family: inherit;
    font-size: inherit;
    font-weight: normal;
    font-style: normal;
    display: inline-block;
    vertical-align: middle;
    line-height: 1;
    transform: none !important;
}

.fas.fa-bolt::before,
.fa-bolt::before {
    content: '⚡';
    font-family: inherit;
    font-size: inherit;
    font-weight: normal;
    font-style: normal;
    display: inline-block;
    vertical-align: middle;
    line-height: 1;
    transform: none !important;
}

.fas.fa-file-archive::before,
.fa-file-archive::before {
    content: '📦';
    font-family: inherit;
    font-size: inherit;
    font-weight: normal;
    font-style: normal;
    display: inline-block;
    vertical-align: middle;
    line-height: 1;
    transform: none !important;
}

.nav-dropdown {
    position: relative;
    z-index: 9999; /* 降低z-index，确保在侧边栏之下 */
    overflow: visible !important;
}

.dropdown-menu {
    position: fixed !important;
    top: 60px !important; /* 导航栏高度 */
    left: 50% !important; /* 居中显示 */
    transform: translateX(-50%) translateY(0);
    /* 确保下拉菜单不会进入左侧边栏区域 - 使用margin-left */
    margin-left: 180px; /* 侧边栏宽度(260px) + 边距(20px) - 菜单宽度的一半 */
    background: linear-gradient(to bottom, #ffffff 0%, #fafbfc 100%);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.08),
        0 2px 8px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    min-width: 900px;
    max-width: 1000px;
    opacity: 0;
    visibility: hidden;
    /* 页面加载时不启用过渡动画，避免抖动 */
    transition: none;
    z-index: 9999 !important; /* 降低z-index，确保在侧边栏之下 */
    padding: 20px 24px;
    max-height: 550px;
    overflow-x: auto;
    overflow-y: hidden;
    display: flex;
    flex-direction: row;
    gap: 24px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* 强制隐藏下拉菜单（避免闪烁） - 优先级最高 */
.nav-dropdown.force-hide .dropdown-menu,
.nav-dropdown.force-hide .dropdown-menu[style*="display: none"],
.nav-dropdown.force-hide .dropdown-menu[style*="visibility: hidden"],
.nav-dropdown.force-hide:hover .dropdown-menu,
.nav-dropdown.force-hide:hover .dropdown-menu[style*="display: none"],
.nav-dropdown.force-hide:hover .dropdown-menu[style*="visibility: hidden"],
.nav-dropdown.force-hide:active .dropdown-menu,
.nav-dropdown.force-hide:focus .dropdown-menu,
.nav-dropdown.force-hide:focus-within .dropdown-menu {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translateX(-50%) translateY(-15px) !important;
    max-height: 0 !important;
    overflow: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    box-shadow: none !important;
    transition: none !important; /* 移除过渡动画，立即隐藏 */
}

/* 当API链接被点击或悬停时，强制隐藏所有下拉菜单 */
body.api-link-active .nav-dropdown .dropdown-menu,
body.api-link-active .nav-dropdown:hover .dropdown-menu {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* 正常hover效果 - 但只在没有force-hide时生效 */
/* 页面加载完成后才启用过渡动画 */
body.loaded .dropdown-menu {
    transition: opacity 0.15s ease, visibility 0.15s ease;
}

.nav-dropdown:not(.force-hide):hover .dropdown-menu {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(-50%) translateY(0) !important;
    /* 使用CSS margin-left确保不进入侧边栏 */
}

/* API链接附近的保护区域 - 防止误触发下拉菜单 */
#apiLink {
    position: relative;
    z-index: 10003;
}

#apiLink::before {
    content: '';
    position: absolute;
    left: -10px;
    right: -10px;
    top: -10px;
    bottom: -10px;
    z-index: -1;
}

/* 强制隐藏样式 - 优先级最高（已在上方定义，此处保留以兼容旧代码） */
.nav-dropdown.force-hide .dropdown-menu {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

.dropdown-item {
    display: flex !important;
    align-items: center !important;
    padding: 10px 16px !important;
    color: #495057 !important;
    text-decoration: none !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 0 !important;
    white-space: nowrap !important;
    background: transparent !important;
    border: none !important;
    flex-shrink: 0 !important;
    box-shadow: none !important;
    position: relative !important;
    overflow: visible !important;
    width: 100% !important;
    border-left: 3px solid transparent !important;
    height: 40px !important; /* 固定高度，统一间距 */
    min-height: 40px !important;
    max-height: 40px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    line-height: 1.5 !important;
}

.dropdown-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.25s ease;
    z-index: -1;
    pointer-events: none;
}

.dropdown-item:hover {
    color: #667eea !important;
    border-left-color: #667eea;
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.04) 100%);
    transform: translateX(4px);
    box-shadow: none;
}

.dropdown-item:hover::before {
    opacity: 1;
}

/* 选中/激活/聚焦 状态下保持可见的文字与高亮背景 */
.dropdown-item.active,
.dropdown-item:focus,
.dropdown-item[aria-current="true"] {
    color: #667eea !important;
    border-left-color: #667eea;
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.05) 100%);
    outline: none;
}

.dropdown-item.active::before,
.dropdown-item:focus::before,
.dropdown-item[aria-current="true"]::before {
    opacity: 1;
}

.dropdown-section {
    width: auto;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
    flex-shrink: 0;
    /* 确保单个section时也有足够的宽度 */
    flex: 0 1 auto;
}

/* 当下拉菜单只有一个section时，确保section有足够的宽度 */
.dropdown-section:only-child {
    min-width: 250px;
    max-width: 100%;
}

/* 使用:has选择器（现代浏览器支持） */
@supports selector(:has(*)) {
    .dropdown-menu:has(.dropdown-section:only-child) {
        min-width: 300px; /* 单个section时减小最小宽度，避免过宽 */
    }
    
    .dropdown-menu:has(.dropdown-section:only-child) .dropdown-section {
        min-width: 280px;
    }
}

.dropdown-section:first-child {
    margin-left: 0;
}

.dropdown-section:last-child {
    margin-right: 0;
}

/* 下拉菜单section滚动条样式 */
.dropdown-section::-webkit-scrollbar {
    width: 5px;
}

.dropdown-section::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 3px;
}

.dropdown-section::-webkit-scrollbar-thumb {
    background: #d0d0d0;
    border-radius: 3px;
}

.dropdown-section::-webkit-scrollbar-thumb:hover {
    background: #b0b0b0;
}

/* 单列下拉菜单的section样式 - 无滚动条，保持竖向布局 */
.manual-dropdown .dropdown-section,
.translation-dropdown .dropdown-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 0;
    min-width: auto;
    width: 100%;
    max-height: none !important;
    overflow-y: visible !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
}

.translation-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    width: 100%;
}

.translation-column {
    display: flex;
    flex-direction: column;
}

/* 特殊下拉菜单的列表保持竖向 */
.manual-dropdown .dropdown-list,
.translation-dropdown .dropdown-list {
    display: block;
    flex-wrap: nowrap;
    gap: 0;
}

.manual-dropdown .dropdown-list li,
.translation-dropdown .dropdown-list li {
    margin-bottom: 4px;
}

/* 特殊下拉菜单的菜单项保持块级显示 */
.manual-dropdown .dropdown-item,
.translation-dropdown .dropdown-item {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    width: 100%;
    background: transparent !important;
    border: none !important;
    border-left: 3px solid transparent;
    text-align: left;
    color: #495057;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.25s ease;
}

.translation-dropdown .translation-column .dropdown-item {
    width: 100%;
}

.manual-dropdown .dropdown-item:hover,
.translation-dropdown .dropdown-item:hover {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.04) 100%) !important;
    color: #667eea !important;
    border-left-color: #667eea;
    transform: translateX(4px);
    box-shadow: none;
}

.manual-dropdown .dropdown-section:last-child,
.translation-dropdown .dropdown-section:last-child {
    margin-bottom: 0;
}

/* 单列下拉菜单的标题样式 */
.manual-dropdown .dropdown-section-title,
.translation-dropdown .dropdown-section-title {
    font-size: 14px;
    font-weight: 700;
    color: #2c3e50;
    padding: 12px 20px 10px 20px;
    text-transform: none;
    letter-spacing: 0.3px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    margin: 0;
    width: 100%;
    align-self: flex-start;
    background: linear-gradient(135deg, #2c3e50 0%, #667eea 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.manual-dropdown .dropdown-section:first-child .dropdown-section-title,
.translation-dropdown .dropdown-section:first-child .dropdown-section-title {
    border-top: none;
}


.dropdown-section-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0 0 12px 0;
    padding: 8px 12px;
    border-bottom: none;
    background: rgba(102, 126, 234, 0.05);
    flex-shrink: 0;
    transition: background 0.2s ease;
    border-radius: 6px;
    margin-left: 0;
    margin-right: 0;
    text-align: center;
}

.dropdown-section-header:hover {
    background: rgba(102, 126, 234, 0.08);
}

.dropdown-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 11px;
    font-weight: bold;
    color: white;
    flex-shrink: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
    transition: all 0.2s ease;
}

.dropdown-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 6px rgba(102, 126, 234, 0.4);
}

.dropdown-icon.pdf-icon {
    background: #ff8c42;
}

.dropdown-icon.star-icon {
    background: #ff8c42;
    font-size: 14px;
}

.dropdown-icon.play-icon {
    background: #ff8c42;
    font-size: 10px;
}

.dropdown-icon.camera-icon {
    background: #ff8c42;
    font-size: 12px;
}

.dropdown-icon.doc-icon {
    background: #ff8c42;
    font-size: 12px;
}

.dropdown-section-title {
    font-size: 13px;
    font-weight: 700;
    color: #2c3e50;
    flex: 0 0 auto;
    letter-spacing: 0.3px;
    background: linear-gradient(135deg, #2c3e50 0%, #667eea 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s ease;
    white-space: nowrap;
    text-align: center;
    width: 100%;
}

.dropdown-list {
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 40px; /* 固定行高为40px，统一间距 */
    row-gap: 2px; /* 统一行间距 */
    column-gap: 8px; /* 统一列间距 */
    max-height: calc(40px * 8 + 2px * 7); /* 8个项目的高度 + 7个间距 = 334px */
    overflow-y: visible;
    overflow-x: visible;
    padding-right: 0;
    width: 100%;
    align-items: start;
}

.dropdown-list li {
    margin: 0 !important;
    padding: 0 !important;
    flex-shrink: 0;
    width: 100% !important;
    display: block !important;
    position: relative !important;
    height: 40px !important; /* 固定高度 */
    min-height: 40px !important;
    max-height: 40px !important;
    line-height: 1.5;
    overflow: visible !important;
    box-sizing: border-box !important;
}

/* 特定下拉菜单样式 - 改为竖列布局 */
.manual-dropdown {
    min-width: 300px;
    max-width: 340px;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0 !important;
    padding: 20px 0 !important;
    overflow-y: visible !important;
    max-height: none !important;
}

.translation-dropdown {
    min-width: 500px;
    max-width: 600px;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0 !important;
    padding: 20px 0 !important;
    overflow-y: visible !important;
    max-height: none !important;
}

/* 确保主下拉菜单使用横向flex布局 */
.dropdown-menu:not(.manual-dropdown):not(.translation-dropdown) {
    display: flex !important;
    flex-direction: row !important;
    gap: 24px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
}

/* 下拉菜单滚动条样式 - 更精致 */
.dropdown-menu::-webkit-scrollbar {
    height: 6px;
    width: 6px;
}

.dropdown-menu::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.02);
    border-radius: 10px;
    margin: 8px 0;
}

.dropdown-menu::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    transition: background 0.3s ease;
}

.dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

/* 分类列表滚动条样式 */
.dropdown-list::-webkit-scrollbar {
    width: 4px;
}

.dropdown-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.02);
    border-radius: 4px;
}

.dropdown-list::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.3);
    border-radius: 4px;
}

.dropdown-list::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.5);
}

.ai-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 8px;
    margin-left: 4px;
    font-weight: 600;
    line-height: 1.2;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    flex-shrink: 0;
}

.hot-icon {
    color: #ff6b9d;
    font-size: 12px;
    margin-left: 4px;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    flex-shrink: 0;
}

.hot-badge {
    background: #ff4757;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 8px;
    margin-left: 4px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    line-height: 1.2;
    flex-shrink: 0;
    white-space: nowrap;
}

.free-badge {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 8px;
    margin-left: 4px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    line-height: 1.2;
    flex-shrink: 0;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(16, 185, 129, 0.3);
}

/* 导航栏右侧操作区 */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    /* 防止加载时的滑动动画 - 但不使用transform，避免影响定位计算 */
    opacity: 1;
    transition: none !important;
}

/* 页面加载完成后才启用过渡动画 */
body.loaded .nav-actions {
    transition: opacity 0.3s ease;
}

/* 用户操作区 */
.user-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
    z-index: 1000;
    /* 防止加载时的滑动动画 - 但不使用transform，避免影响定位计算 */
    opacity: 1;
    transition: none !important;
}

/* 页面加载完成后才启用过渡动画 */
body.loaded .user-actions {
    transition: opacity 0.3s ease;
}

.login-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 80px;
    height: 36px;
}

.login-btn:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* 开通权益按钮样式 */
.vip-activate-btn {
    background: linear-gradient(135deg, #ff8c42 0%, #ff6b9d 100%);
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(255, 140, 66, 0.3);
    white-space: nowrap;
}

.vip-activate-btn:hover {
    background: linear-gradient(135deg, #ff7a2f 0%, #ff5a8a 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(255, 140, 66, 0.4);
}

/* 已登录状态按钮样式 */
.login-btn.logged-in {
    background: none !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    overflow: hidden !important;
}

/* 确保头像图片样式正确 */
.login-btn.logged-in img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 50% !important;
    display: block !important;
    aspect-ratio: 1 / 1 !important;
    max-width: 100% !important;
    max-height: 100% !important;
}

/* 强制覆盖所有可能的样式冲突 */
.login-btn.logged-in,
.login-btn.logged-in * {
    border-radius: 50% !important;
    overflow: hidden !important;
}

/* 确保登录按钮容器是圆形的 */
.login-btn.logged-in {
    background: none !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* 最强优先级规则 - 覆盖所有可能的样式 */
#loginBtn.logged-in,
#loginBtn.logged-in *,
.login-btn.logged-in,
.login-btn.logged-in * {
    background: none !important;
    background-color: transparent !important;
    border-radius: 50% !important;
    overflow: hidden !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* 确保头像图片是圆形的 */
#loginBtn.logged-in img,
.login-btn.logged-in img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 50% !important;
    display: block !important;
    aspect-ratio: 1 / 1 !important;
    max-width: 100% !important;
    max-height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
}

/* 最终强制规则 - 覆盖所有可能的样式冲突 */
button.login-btn.logged-in,
button#loginBtn.logged-in,
.login-btn.logged-in,
#loginBtn.logged-in {
    background: none !important;
    background-color: transparent !important;
    border-radius: 50% !important;
    overflow: hidden !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 32px !important;
    height: 32px !important;
    aspect-ratio: 1 / 1 !important;
    min-width: 32px !important;
    min-height: 32px !important;
    max-width: 32px !important;
    max-height: 32px !important;
}

button.login-btn.logged-in img,
button#loginBtn.logged-in img,
.login-btn.logged-in img,
#loginBtn.logged-in img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 50% !important;
    display: block !important;
    aspect-ratio: 1 / 1 !important;
    max-width: 100% !important;
    max-height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
}

/* 额外强制规则 - 确保头像在所有情况下都是圆形 */
.login-btn.logged-in,
.login-btn.logged-in *,
#loginBtn.logged-in,
#loginBtn.logged-in * {
    border-radius: 50% !important;
    overflow: hidden !important;
}

.login-btn.logged-in img,
#loginBtn.logged-in img {
    border-radius: 50% !important;
    object-fit: cover !important;
    width: 100% !important;
    height: 100% !important;
    display: block !important;
    aspect-ratio: 1 / 1 !important;
}

.login-btn.logged-in:hover {
    background: none;
    box-shadow: none;
    transform: none;
}

.login-btn.logged-in i {
    display: none;
}

/* 转换记录按钮样式 - 与开通权益按钮保持一致的大小 */
.convert-record-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    border: none !important;
    padding: 6px 16px !important;
    border-radius: 16px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-right: 8px;
    white-space: nowrap;
    min-width: auto;
    height: auto;
    text-decoration: none !important;
    position: relative;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
    flex-shrink: 0;
    line-height: 1.5;
}

.convert-record-btn:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%) !important;
    color: white !important;
    border: none !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    text-decoration: none !important;
}

.convert-record-btn i {
    font-size: 12px;
    color: white;
    transition: color 0.3s ease;
}

.convert-record-btn:hover i {
    color: white;
}

/* 移除下划线效果 */
.convert-record-btn::after {
    display: none !important;
}

.convert-record-btn:hover::after {
    display: none !important;
}

/* 确保按钮容器不换行 */
.login-btn-container {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px;
    white-space: nowrap;
}

/* 导航栏右侧按钮布局 */
.nav-actions .convert-record-btn {
    margin-right: 8px;
    flex-shrink: 0;
}

.nav-actions .login-btn {
    flex-shrink: 0;
}

/* 小头像样式已移除，现在直接使用 .login-btn.logged-in img 样式 */

/* 响应式设计 - 导航栏 */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        height: auto;
        padding: 10px;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        gap: 15px;
        margin: 10px 0;
        justify-content: center;
    }
    
    .nav-actions {
        gap: 8px;
    }
    
    .convert-record-btn {
        padding: 6px 12px !important;
        font-size: 12px !important;
        height: 32px;
        margin-right: 6px;
    }
    
    .convert-record-btn i {
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .nav-menu {
        gap: 10px;
    }
    
    .nav-link {
        font-size: 13px;
    }
    
    .nav-actions {
        gap: 6px;
    }
    
    .convert-record-btn {
        padding: 6px 10px !important;
        font-size: 11px !important;
        height: 30px;
        margin-right: 4px;
    }
    
    .convert-record-btn i {
        font-size: 9px;
    }
}
