/* ========================================
   统一响应式导航样式 - 保持原有样式不变
   ======================================== */

/* ===== PC 端样式（默认） - 完全保持原样式 ===== */

/* 汉堡菜单按钮 - PC端隐藏 */
.mobile-menu-toggle {
    display: none;
}

/* 移动端关闭按钮 - PC端隐藏 */
.mobile-menu-close {
    display: none;
}

/* 移动端遮罩层 - 默认隐藏 */
.mobile-overlay {
    display: none;
}

/* 导航容器 - PC端保持原有布局 */
.nav-container {
    display: contents;
}

/* PC端隐藏 header-flex 下的 logo */
.header-flex > .logo {
    display: none;
}

/* 主导航使用原有的 nav-list 样式，不需要额外样式 */
/* 所有 PC 端样式继承自 style.css 中的 .nav-list 相关样式 */

/* ===== 移动端样式 (max-width: 1024px) - 优化版 ===== */
@media (max-width: 1024px) {
    
    /* 显示汉堡菜单按钮 - 优化触摸体验 */
    .mobile-menu-toggle {
        display: block;
        background: none;
        border: none;
        cursor: pointer;
        position: absolute;
        right: 2.5%;
        top: 50%;
        transform: translateY(-50%);
        padding: 10px; /* 增大点击区域 */
        z-index: 10000;
        transition: transform 0.3s ease;
    }
    
    .mobile-menu-toggle:active {
        transform: translateY(-50%) scale(0.9); /* 点击反馈 */
    }
    
    .mobile-menu-toggle img {
        width: auto;
        height: 18px; /* 稍微增大图标 */
        filter: brightness(0) invert(1);
        display: block;
    }
    
    /* Logo 调整 - 移动端显示 */
    .header-flex > .logo {
        display: block;
        padding-top: 10px;
        padding-left: 2.5%;
        float: left;
    }
    
    .header-flex > .logo img {
        height: 60px;
        width: auto;
    }
    
    /* 移动端遮罩层 - 复制原 .a_txt .div1 样式 */
    .mobile-overlay {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: #0b0d19;
        filter: alpha(opacity=0);
        opacity: 0;
        z-index: 1;
        pointer-events: none;
        transition: opacity 0.5s ease;
    }
    
    .mobile-overlay.active {
        opacity: 0.9;
        pointer-events: auto;
    }
    
    /* 导航容器 - 现代化设计 */
    .nav-container {
        display: block;
        position: fixed;
        top: 0;
        right: -85%;
        width: 85%;
        max-width: 400px;
        height: 100%;
        background: linear-gradient(135deg, #FFD73A 0%, #FFC700 100%);
        z-index: 100;
        overflow-y: auto;
        overflow-x: hidden;
        
        /* 优化滚动条样式 */
        scrollbar-width: thin;
        scrollbar-color: rgba(0,0,0,0.2) transparent;
        
        /* 更流畅的动画 */
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s ease;
        
        /* iOS 平滑滚动 */
        -webkit-overflow-scrolling: touch;
        
        /* 添加内阴影增加深度 */
        box-shadow: -5px 0 20px rgba(0,0,0,0.1);
    }
    
    /* WebKit 浏览器滚动条样式 */
    .nav-container::-webkit-scrollbar {
        width: 4px;
    }
    
    .nav-container::-webkit-scrollbar-track {
        background: transparent;
    }
    
    .nav-container::-webkit-scrollbar-thumb {
        background: rgba(0,0,0,0.15);
        border-radius: 2px;
    }
    
    .nav-container::-webkit-scrollbar-thumb:hover {
        background: rgba(0,0,0,0.25);
    }
    
    .nav-container.active {
        right: 0;
        box-shadow: -5px 0 30px rgba(0,0,0,0.2);
    }
    
    /* 移动端关闭按钮 - 现代化设计 */
    .mobile-menu-close {
        display: flex;
        position: absolute;
        left: 15px;
        top: 20px;
        z-index: 101;
        align-items: center;
        justify-content: center;
        background: rgba(255,255,255,0.9);
        border: none;
        border-radius: 50%;
        cursor: pointer;
        padding: 0;
        opacity: 0;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        width: 36px;
        height: 36px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    }
    
    .mobile-menu-close:active {
        transform: scale(0.9);
        background: rgba(255,255,255,1);
        box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    }
    
    .nav-container.active .mobile-menu-close {
        opacity: 1;
    }
    
    .mobile-menu-close img {
        display: block;
        width: 16px;
        height: 16px;
        opacity: 0.8;
        filter: brightness(0);
    }
    
    /* 主导航菜单 - 现代化设计 */
    .main-nav {
        width: 100%;
        padding-top: 70px; /* 给关闭按钮留出空间 */
    }
    
    .main-nav ul {
        padding: 0 20px 20px 20px;
        display: flex;
        flex-direction: column;
    }
    
    .main-nav > ul > li {
        border-bottom: 1px solid rgba(255,255,255,0.2);
        margin: 0;
        position: relative;
        width: 100%;
        float: none;
    }
    
    .main-nav > ul > li:last-child {
        border-bottom: none;
    }
    
    /* 展开状态的子菜单项背景 */
    .main-nav .sub-menu li.active {
        background-color: rgba(255,200,0,0.5);
        border-radius: 6px;
    }
    
    .main-nav > ul > li > a {
        display: block;
        padding: 16px 50px 16px 16px;
        color: #1a1a1a;
        font-size: 16px;
        font-weight: 500;
        position: relative;
        transition: all 0.2s ease;
        border-radius: 8px;
        margin: 4px 0;
    }
    
    /* 菜单项点击反馈 */
    .main-nav > ul > li > a:active {
        background-color: rgba(255,255,255,0.5);
        transform: translateX(4px);
    }
    
    /* 移除 hover 效果 */
    .main-nav > ul > li > a:hover {
        background-color: transparent;
        color: #1a1a1a;
    }
    
    /* 子菜单 - 现代化设计 */
    .main-nav .sub-menu {
        display: none;
        max-height: 350px;
        overflow-y: auto;
        overflow-x: hidden;
        padding: 8px 0;
        margin: 0 0 8px 0;
        /* background: rgba(255,255,255,0.25); */
        border-radius: 8px;
    }
    
    .main-nav .sub-menu.active {
        display: block;
    }
    
    .main-nav .sub-menu li {
        border-bottom: 1px solid rgba(255,255,255,0.1);
        margin: 0;
    }
    
    .main-nav .sub-menu li:last-child {
        border-bottom: none;
    }
    
    .main-nav .sub-menu a {
        display: block;
        padding: 12px 16px;
        font-size: 14px;
        color: #2a2a2a !important;
        transition: all 0.2s ease;
        border-radius: 6px;
        margin: 2px 8px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    /* 子菜单项点击反馈 */
    .main-nav .sub-menu a:active {
        background-color: rgba(255,255,255,0.6);
        transform: translateX(4px);
    }
    
    /* 特殊的 fx_company 子菜单样式 - 移动端文字版 */
    .main-nav .fx_company .sub-menu {
        /* background: rgba(255,255,255,0.25); */
        padding: 8px 0;
        width: 100%;
    }
    
    .main-nav .fx_company .sub-menu .sub-menu-list {
        display: block; /* 改为普通的垂直列表 */
        padding: 0;
    }
    
    .main-nav .fx_company .sub-menu li {
        border-bottom: 1px solid rgba(255,255,255,0.1);
        margin: 0;
        padding: 0;
        height: auto;
        line-height: normal;
    }
    
    .main-nav .fx_company .sub-menu li:last-child {
        border-bottom: none;
    }
    
    .main-nav .fx_company .sub-menu li a {
        font-size: 14px !important; /* 显示文字 */
        padding: 12px 16px;
        margin: 2px 8px;
        border-radius: 6px;
        display: block;
        color: #2a2a2a !important;
        transition: all 0.2s ease;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .main-nav .fx_company .sub-menu li a:active {
        background-color: rgba(255,255,255,0.6);
        transform: translateX(4px);
    }
    
    /* 隐藏图片 */
    .main-nav .fx_company .sub-menu li img {
        display: none;
    }
    
    .main-nav .fx_company .sub-menu li.fx_company_dsc {
        background: rgba(255,239,179,0.8);
        padding: 0;
        border-radius: 8px;
        margin: 8px;
        border-bottom: none;
    }
    
    .main-nav .fx_company .sub-menu li.fx_company_dsc a {
        font-size: 14px !important;
        line-height: 1.4;
        padding: 12px;
        color: #1a1a1a !important;
        display: flex;
        align-items: center;
        margin: 0;
    }
    
    .main-nav .fx_company .sub-menu li.fx_company_dsc a span {
        display: inline-block;
        width: 12px;
        height: 2px;
        background: #FFD73A;
        margin-right: 8px;
    }
    
    /* 子菜单展开按钮 - 现代化设计 */
    .main-nav .menu-item-has-children > a::after {
        content: '';
        display: inline-block;
        width: 20px;
        height: 20px;
        font-size: 0;
        background-image: url('../images/plus.png');
        background-repeat: no-repeat;
        background-size: 12px 12px;
        background-position: center;
        position: absolute;
        top: 50%;
        right: 16px;
        transform: translateY(-50%);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        border-radius: 4px;
        background-color: rgba(255,255,255,0.3);
    }
    
    .main-nav .menu-item-has-children > a:active::after {
        background-color: rgba(255,255,255,0.5);
    }
    
    .main-nav .menu-item-has-children.active > a::after {
        background-image: url('../images/reduce.jpg');
        transform: translateY(-50%) rotate(180deg);
        background-color: rgba(255,255,255,0.5);
    }
    
    /* 隐藏 PC 端的 menu-item-has-children::after */
    .menu-item-has-children::after {
        display: none;
    }
    
    /* 会员控制区域 - 现代化设计 */
    .member-control {
        text-align: center;
        width: 100%;
        margin-top: 30px;
        padding: 20px;
        /*background: rgba(255,255,255,0.2);*/
        border-radius: 12px;
        margin-left: 20px;
        margin-right: 20px;
        width: calc(100% - 40px);
    }
    
    .member-control ul {
        padding: 0;
        margin: 0;
        display: flex;
        gap: 12px;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .member-control ul li {
        list-style: none;
        margin: 0;
    }
    
    /* 语言切换器 - 移动端隐藏 */
    .language-switcher {
        display: none;
    }
    
    /* Header 调整 - 添加阴影提升层次感 */
    #header {
        height: 80px;
        background-color: #292829;
        top: 0;
        left: 0;
        width: 100%;
        z-index: 9999;
        position: fixed;
        box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    }
    
    .header-flex {
        position: relative;
        height: 80px;
        margin-top: 0;
    }
    
    /* 优化会员控制按钮样式 - 现代化设计 */
    .member-control .regiser-button,
    .member-control .login-button {
        padding: 12px 28px;
        font-size: 15px;
        border-radius: 30px;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        font-weight: 600;
        letter-spacing: 0.5px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        display: inline-block;
        text-decoration: none;
    }
    
    .member-control .regiser-button {
        border: 2px solid rgba(255,255,255,0.9);
        color: #1a1a1a;
        background: rgba(255,255,255,0.9);
    }
    
    .member-control .regiser-button:active {
        transform: scale(0.96) translateY(1px);
        box-shadow: 0 2px 6px rgba(0,0,0,0.2);
        background: rgba(255,255,255,1);
    }
    
    .member-control .login-button {
        background: #292829;
        color: #FFD73A;
        border: 2px solid #292829;
    }
    
    .member-control .login-button:active {
        transform: scale(0.96) translateY(1px);
        box-shadow: 0 2px 6px rgba(0,0,0,0.25);
        background: #1a1919;
    }
    
    /* 隐藏 PC 端元素 */
    .header-logo-rail {
        display: none;
    }
    
    .top-bar-padding {
        display: none;
    }
    
    .top-bar {
        display: block;
    }
}
