/* 公共头部导航样式 - 所有页面共用 */

.navbar {
    background: #181A20;
    padding: 12px 0;
    top: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-section img {
    width: 180px;
    height: 40px;
    object-fit: contain;
    /* 支持3倍图 */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* 高分辨率屏幕使用3倍图 */
@media (-webkit-min-device-pixel-ratio: 3), (min-resolution: 288dpi) {
    .logo-section img {
        content: url('../assets/components/header/logo@3x.png');
    }
}

.logo-text {
    font-family: 'Refinery', 'BlenderPro', sans-serif;
    font-size: 24px;
    font-weight: 600;
    color: white;
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-item {
    position: relative;
}

.nav-link {
    color: #FFF;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    font-family: 'BlenderPro', sans-serif;
    transition: color 0.3s ease;
    padding: 8px 0;
}

.nav-link:hover,
.nav-link.active {
    color: #00F0FF;
}

.nav-link.active {
    color: #FDED0E;
}

.right-section {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #FFF;
    font-size: 16px;
    font-family: 'BlenderPro', sans-serif;
    font-weight: 400;
}

.user-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(45deg, #00F0FF, #0080ff);
}

.language-selector {
    position: relative;
}

.language-btn {
    background: transparent;
    border: none;
    color: #ccc;
    padding: 6px 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    font-family: 'BlenderPro', sans-serif;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.language-btn:hover {
    color: #00F0FF;
}

.language-icon {
    width: 20px;
    height: 20px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: all 0.3s ease;
}

.dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: #1a1a2e;
    border: 1px solid #444;
    border-radius: 4px;
    margin-top: 5px;
    min-width: 120px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    z-index: 1001;
}

.dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    padding: 10px 15px;
    color: #ccc;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-family: 'BlenderPro', sans-serif;
    font-weight: 400;
    font-size: 14px;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background: rgba(0, 240, 255, 0.1);
    color: #00F0FF;
}

.dropdown-item.active {
    color: #00F0FF;
    background: rgba(0, 240, 255, 0.1);
}

/* H5移动端汉堡菜单样式 */
.hamburger-btn {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1002;
    order: -1;
    position: relative;
    width: 45px;
    height: 45px;
    align-items: center;
    justify-content: center;
}

.hamburger-icon {
    width: 45px;
    height: 45px;
    object-fit: contain;
    transition: all 0.3s ease;
    opacity: 1;
    transform: rotate(0deg);
}

.close-icon-btn {
    width: 45px;
    height: 45px;
    object-fit: contain;
    transition: all 0.3s ease;
    opacity: 0;
    position: absolute;
    transform: rotate(-90deg);
}

.hamburger-btn.active .hamburger-icon {
    opacity: 0;
    transform: rotate(90deg);
}

.hamburger-btn.active .close-icon-btn {
    opacity: 1;
    transform: rotate(0deg);
}

/* 移动端下拉菜单容器 */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    background: transparent;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

/* 平板尺寸下的移动端菜单优化 */
@media (max-width: 853px) {
    .mobile-menu-container {
        max-height: 80vh;
        overflow-y: auto;
    }
}

@media (max-width: 820px) {
    .mobile-nav-link {
        font-size: 20px;
        padding: 18px 0;
    }
    
    .mobile-menu-header {
        padding: 25px 25px 35px 25px;
    }
    
    .mobile-logo {
        width: 160px;
        height: 36px;
    }
    
    .mobile-close-btn {
        width: 80px;
        height: 80px;
    }
    
    .close-icon {
        width: 80px;
        height: 80px;
    }
}

/* 针对768x1024等较小平板的优化 */
@media (max-width: 768px) and (min-width: 641px) {
    .mobile-nav-link {
        font-size: 18px;
        padding: 16px 0;
    }
    
    .mobile-menu-header {
        padding: 20px 20px 30px 20px;
    }
    
    .mobile-logo {
        width: 144px;
        height: 32px;
    }
    
    .mobile-close-btn {
        width: 70px;
        height: 70px;
    }
    
    .close-icon {
        width: 70px;
        height: 70px;
    }
}

.mobile-menu-overlay.show {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(205.98deg, #100D14 0%, #1A133C 100%);
    border-radius: 0 0 20px 20px;
    padding: 0;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

.mobile-menu-overlay.show .mobile-menu-container {
    transform: translateY(0);
}

/* 移动端菜单头部 */
.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px 30px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-logo-section {
    display: flex;
    align-items: center;
}

.mobile-logo {
    width: 144px;
    height: 32px;
    object-fit: contain;
}

.mobile-close-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    border-radius: 50%;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
}

.mobile-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.close-icon {
    width: 70px;
    height: 70px;
    object-fit: contain;
}

.mobile-nav-menu {
    list-style: none;
    padding: 20px 20px 40px 20px;
    margin: 0;
}

.mobile-nav-item {
    margin-bottom: 20px;
}

.mobile-nav-link {
    display: block;
    color: #fff;
    text-decoration: none;
    font-size: 18px;
    font-weight: 500;
    font-family: 'BlenderPro', sans-serif;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: color 0.3s ease;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: #00F0FF;
}

.mobile-nav-link.active {
    color: #FDED0E;
}

/* 响应式设计 */

/* 平板尺寸 - 853x1280, 820x1180, 768x1024 等 */
@media (max-width: 853px) {
    /* 隐藏原始桌面端导航菜单 */
    .nav-menu {
        display: none;
    }
    
    /* 显示移动端汉堡菜单按钮 */
    .hamburger-btn {
        display: flex;
        order: -1;
    }
    
    /* 调整导航容器布局 */
    .navbar-container {
        justify-content: space-between;
        padding: 0 15px;
    }
    
    /* 调整右侧区域 */
    .right-section {
        gap: 15px;
    }
    
    /* 隐藏用户信息文字，只保留图标 */
    .user-info span {
        display: none;
    }
    
    /* 调整Logo区域 */
    .logo-section {
        flex: 1;
        justify-content: center;
    }
    
    /* 调整Logo尺寸 */
    .logo-section img {
        width: 144px;
        height: 32px;
    }
    
    /* 调整语言选择器 */
    .language-btn {
        padding: 4px 6px;
        font-size: 12px;
    }
    
    .language-icon {
        width: 16px;
        height: 16px;
    }
}

/* 针对853x1280等较大平板的优化 */
@media (max-width: 853px) and (min-width: 821px) {
    .mobile-nav-link {
        font-size: 22px;
        padding: 20px 0;
    }
    
    .mobile-menu-header {
        padding: 30px 30px 40px 30px;
    }
    
    .mobile-logo {
        width: 180px;
        height: 40px;
    }
    
    .mobile-close-btn {
        width: 90px;
        height: 90px;
    }
    
    .close-icon {
        width: 90px;
        height: 90px;
    }
    
    .mobile-nav-menu {
        padding: 25px 25px 50px 25px;
    }
}

@media (max-width: 768px) {
    .navbar-container {
        padding: 0 20px;  /* 与主页内容保持一致 */
    }

    .nav-menu {
        gap: 20px;
    }

    .nav-link {
        font-size: 14px;
    }

    .logo-text {
        font-size: 20px;
    }
}

@media (max-width: 640px) {
    .nav-menu {
        display: none;
    }
    
    .hamburger-btn {
        display: flex;
        order: -1;
    }
    
    .navbar-container {
        justify-content: space-between;
    }
    
    .right-section {
        gap: 15px;
    }
    
    .user-info span {
        display: none;
    }
    
    .logo-section {
        flex: 1;
        justify-content: center;
    }
} 