/* 2025ai Header 样式 */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-logo img {
    height: 50px;
    transition: height 0.3s ease;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 30px;
    list-style: none;
}

.nav-menu > li > a {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-dark);
    padding: 8px 0;
    position: relative;
    transition: color 0.3s ease;
}

.nav-menu > li > a:hover,
.nav-menu > li.active > a {
    color: var(--primary-color);
}

.nav-menu > li > a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-menu > li > a:hover::after,
.nav-menu > li.active > a::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 10px;
}

.nav-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--text-dark);
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        background: var(--white);
        flex-direction: column;
        padding: 20px;
        gap: 15px;
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: all 0.3s ease;
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }
}

/* 导航盒子 */
.nav-box {
    display: flex;
    align-items: center;
    gap: 30px;
}

/* 导航操作按钮 */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* 语言切换 */
.lang-switch {
    position: relative;
}

.lang-switch > a {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-dark);
    font-size: 14px;
    transition: all 0.3s ease;
}

.lang-switch > a:hover {
    background: rgba(0, 0, 0, 0.1);
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 5px;
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.lang-switch:hover .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-dropdown a {
    display: block;
    padding: 10px 20px;
    color: var(--text-dark);
    font-size: 14px;
    transition: background 0.3s ease;
}

.lang-dropdown a:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* 搜索触发器 */
.search-trigger {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.search-trigger:hover {
    background: var(--primary-color);
}

.search-trigger:hover svg path {
    stroke: var(--white);
}

/* AI聊天触发器 */
.ai-chat-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.ai-chat-trigger:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(10, 93, 44, 0.3);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--white);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.5; }
    100% { transform: scale(1); opacity: 1; }
}

/* 移动端搜索 */
.m-search {
    display: none;
    margin-bottom: 15px;
}

.m-search form {
    display: flex;
    gap: 10px;
}

.m-search input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-size: 14px;
}

.m-search button {
    padding: 10px 15px;
    background: var(--primary-color);
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

@media (max-width: 768px) {
    .m-search {
        display: block;
    }
    .nav-actions {
        display: none;
    }
}

/* 下拉菜单 */
.nav-menu li ul {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 180px;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 100;
}

.nav-menu li:hover > ul {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-menu li ul li {
    list-style: none;
}

.nav-menu li ul li a {
    display: block;
    padding: 10px 20px;
    color: var(--text-dark);
    font-size: 14px;
    transition: all 0.3s ease;
}

.nav-menu li ul li a:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--primary-color);
}

/* 导航箭头 */
.nav-arrow {
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 5px;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid currentColor;
}

/* Header 滚动效果 */
.header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.header.scrolled .header-logo img {
    height: 40px;
}

/* 搜索遮罩 */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.search-overlay.active {
    opacity: 1;
    visibility: visible;
}

.search-close {
    position: absolute;
    top: 30px;
    right: 30px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.search-close:hover {
    opacity: 1;
}

.search-container {
    width: 90%;
    max-width: 700px;
    text-align: center;
}

.search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 5px;
}

.search-input-wrap input {
    flex: 1;
    padding: 20px;
    background: none;
    border: none;
    color: var(--white);
    font-size: 20px;
    outline: none;
}

.search-input-wrap input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.search-input-wrap button {
    padding: 15px 25px;
    background: var(--primary-color);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-input-wrap button:hover {
    background: var(--secondary-color);
}

.search-hints {
    margin-top: 30px;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.search-hints span {
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-hints span:hover {
    background: var(--primary-color);
    color: var(--white);
}
