/* 头部样式 */
.header-main {
    background: #fff;
    padding: 12px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo-container {
    display: flex;
    align-items: center;
}
.logo-img {
    height: 40px;
    cursor: pointer; /* 提示可点击 */
}
.right-area {
    display: flex;
    align-items: center;
}
/* 用户信息样式 */
.user-info {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 5px 8px;
    border-radius: 20px;
    transition: background-color 0.2s;
}
.user-info:hover {
    background-color: #f5f7fa;
}
.user-pic {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    margin-right: 0; /* 移除头像右侧间距 */
    object-fit: cover;
    border: 2px solid transparent;
}
.user-info:hover .user-pic {
    border-color: #e0e0e0;
}
/* 隐藏用户名字样式 */
.user-name {
    display: none; /* 隐藏用户名 */
}
.login-link {
    color: #4886ff;
    text-decoration: none;
    font-size: 16px; /* 放大字体 */
    display: flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.2s;
}
.login-link:hover {
    background-color: #f0f7ff;
}
.login-link svg {
    margin-right: 5px;
    width: 20px; /* 放大图标 */
    height: 20px;
    fill: #4886ff; /* 图标颜色与文字一致 */
}
.user-more {
    position: absolute;
    top: 48px;
    right: 16px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    width: 140px;
    padding: 5px 0;
    display: none;
    z-index: 101;
}
.user-more::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 15px;
    width: 16px;
    height: 16px;
    background: #fff;
    transform: rotate(45deg);
    box-shadow: -2px -2px 4px rgba(0,0,0,0.05);
}
.user-more a {
    display: block;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}
.user-more a:hover {
    background: #f5f7fa;
    color: #4886ff;
    padding-left: 18px;
}
.hasLogin {
    position: relative;
}
.hasLogin:hover .user-more {
    display: block;
    animation: fadeIn 0.2s ease;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}
/* 全局基础样式（确保容器等样式生效） */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
body {
    background: #f5f7fa;
    color: #333;
    font-size: 14px;
    line-height: 1.5;
}
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* 工具导航样式 */
.left-nav-container {
    display: flex;
    align-items: center;
}
.nav-area {
    display: flex;
    align-items: center;
    margin-left: 20px;
}
.tool-item {
    position: relative;
    margin: 0 8px;
}
.tool-link {
    display: flex;
    align-items: center;
    padding: 5px 10px;
    color: #333;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    border-radius: 4px;
    transition: background-color 0.2s;
}
.tool-link:hover {
    background-color: #f5f7fa;
}
.tool-link svg {
    margin-right: 8px;
    width: 18px;
    height: 18px;
}
.tool-more {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 4px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    padding: 15px;
    display: none;
    z-index: 102;
    min-width: 900px;
}
.tool-item:hover .tool-more {
    display: block;
    animation: fadeIn 0.2s ease;
}
.tool-more::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 15px;
    width: 16px;
    height: 16px;
    background: #fff;
    transform: rotate(45deg);
    box-shadow: -2px -2px 4px rgba(0,0,0,0.05);
}
.tool-more-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}
.tool-column {
    flex: 1;
    min-width: 160px;
}
.column-title {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
    padding-left: 10px;
    font-weight: 600;
}
.tool-more-list {
    list-style: none;
}
.tool-more-item {
    margin-bottom: 4px;
}
.tool-more-link {
    display: flex;
    align-items: center;
    padding: 7px 10px;
    color: #333;
    text-decoration: none;
    font-size: 13px;
    border-radius: 4px;
    transition: all 0.2s;
}
.tool-more-link:hover {
    background: #f5f7fa;
    color: #4886ff;
}
.tool-more-link svg {
    margin-right: 6px;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* 移动端汉堡菜单样式 */
.hamburger-menu {
    display: none;
    cursor: pointer;
    padding: 5px;
    margin-right: 10px;
}
.hamburger-icon {
    width: 24px;
    height: 24px;
    position: relative;
}
.hamburger-icon span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #333;
    border-radius: 3px;
    position: absolute;
    transition: all 0.3s ease;
}
.hamburger-icon span:nth-child(1) {
    top: 0;
}
.hamburger-icon span:nth-child(2) {
    top: 50%;
    transform: translateY(-50%);
}
.hamburger-icon span:nth-child(3) {
    bottom: 0;
}

/* 移动端适配 */
@media (max-width: 768px) {
    /* 显示汉堡菜单，隐藏原导航 */
    .hamburger-menu {
        display: block;
    }
    .nav-area {
        display: none;
        position: fixed; /* 改为fixed定位，确保在视口内 */
        top: 64px; /* 与头部高度匹配 */
        left: 0;
        width: 85%; /* 调整宽度为85%，变窄一些 */
        max-width: 160px; /* 最大宽度限制 */
        background: #fff;
        box-shadow: 2px 0 8px rgba(0,0,0,0.1);
        padding: 15px 0;
        z-index: 99;
        margin-left: 0;
        flex-direction: column;
        align-items: flex-start;
        max-height: calc(100vh - 64px); /* 最大高度为视口高度减去头部 */
        overflow-y: auto; /* 添加垂直滚动 */
        -webkit-overflow-scrolling: touch; /* 平滑滚动 */
    }
    .nav-area.active {
        display: flex;
    }
    .tool-item {
        width: 100%;
        margin: 0;
        border-bottom: 1px solid #f5f7fa;
    }
    .tool-link {
        width: 100%;
        padding: 12px 20px;
        justify-content: space-between;
    }
    .tool-more {
        position: static;
        display: none;
        box-shadow: none;
        padding: 0 20px 10px;
        min-width: auto;
        width: 100%;
    }
    .tool-item.active .tool-more {
        display: block;
    }
    .tool-more-columns {
        flex-direction: column;
        gap: 10px;
    }
    .tool-column {
        min-width: auto;
    }
    
    /* 移动端logo居中 */
    .header-inner {
        justify-content: center;
        position: relative;
    }
    .logo-container {
        margin: 0 auto;
    }
    
    /* 移动端登录按钮位置调整 */
    .right-area {
        position: absolute;
        right: 16px;
    }
    .hamburger-menu {
        position: absolute;
        left: 16px;
    }
    
    /* 汉堡菜单激活状态样式 */
    .hamburger-menu.active .hamburger-icon span:nth-child(1) {
        top: 50%;
        transform: translateY(-50%) rotate(45deg);
    }
    .hamburger-menu.active .hamburger-icon span:nth-child(2) {
        opacity: 0;
    }
    .hamburger-menu.active .hamburger-icon span:nth-child(3) {
        bottom: 50%;
        transform: translateY(50%) rotate(-45deg);
    }
    
    /* 为长菜单添加滚动提示 */
    .nav-area::after {
        content: '';
        display: block;
        height: 10px;
    }
}