/* 移动端汉堡菜单样式 */

/* 汉堡菜单按钮 */
.mobile-hamburger-menu {
    display: none;
    position: relative;
}

.hamburger-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1002;
}

.hamburger-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* 汉堡图标 */
.hamburger-icon {
    width: 24px;
    height: 18px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hamburger-line {
    width: 100%;
    height: 2px;
    background-color: var(--text-color, #ffffff);
    border-radius: 1px;
    transition: all 0.3s ease;
    transform-origin: center;
}

/* 激活状态的汉堡图标动画 */
.hamburger-btn.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* 下拉菜单 */
.hamburger-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: linear-gradient(135deg, rgba(18, 36, 64, 0.95), rgba(30, 60, 100, 0.95));
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
    margin-top: 8px;
}

.hamburger-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.hamburger-menu-item {
    display: block;
    padding: 12px 16px;
    color: var(--text-color, #ffffff);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
}

.hamburger-menu-item:last-child {
    border-bottom: none;
}

.hamburger-menu-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--primary-color, #4a9eff);
}

.hamburger-menu-item i {
    margin-right: 8px;
    width: 16px;
    text-align: center;
}

/* 移动端登录模态框样式 */
.mobile-auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.mobile-auth-modal.active {
    display: flex;
}

.mobile-auth-content {
    background: linear-gradient(135deg, rgba(18, 36, 64, 0.95), rgba(30, 60, 100, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
    width: 100%;
    max-width: 400px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.mobile-auth-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-auth-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color, #ffffff);
    margin: 0;
}

.mobile-auth-close {
    background: none;
    border: none;
    color: var(--text-color, #ffffff);
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.mobile-auth-close:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* 移动端语言选择器样式 */
.mobile-language-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.mobile-language-modal.active {
    display: flex;
}

.mobile-language-content {
    background: linear-gradient(135deg, rgba(18, 36, 64, 0.95), rgba(30, 60, 100, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
    width: 100%;
    max-width: 300px;
    position: relative;
}

.mobile-language-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-language-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color, #ffffff);
    margin: 0;
}

.mobile-language-close {
    background: none;
    border: none;
    color: var(--text-color, #ffffff);
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.mobile-language-close:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.mobile-language-option {
    display: block;
    width: 100%;
    padding: 12px 16px;
    background: none;
    border: none;
    color: var(--text-color, #ffffff);
    font-size: 16px;
    text-align: left;
    cursor: pointer;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.mobile-language-option:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.mobile-language-option.active {
    background-color: var(--primary-color, #4a9eff);
    color: #ffffff;
}

/* 响应式显示控制 */
@media (max-width: 768px) {
    .mobile-hamburger-menu {
        display: block;
    }
    
    /* 隐藏桌面端的导航菜单和控件 */
    .nav-menu {
        display: none !important;
    }
    
    .user-auth {
        display: none !important;
    }
    
    .language-selector {
        display: none !important;
    }
}

/* 防止菜单溢出屏幕 */
@media (max-width: 480px) {
    .hamburger-dropdown {
        right: -10px;
        min-width: 180px;
    }
    
    .mobile-auth-content,
    .mobile-language-content {
        margin: 10px;
        padding: 20px;
    }
}

/* 暗色主题适配 */
@media (prefers-color-scheme: dark) {
    .hamburger-line {
        background-color: #ffffff;
    }
    
    .hamburger-dropdown,
    .mobile-auth-content,
    .mobile-language-content {
        background: linear-gradient(135deg, rgba(18, 36, 64, 0.98), rgba(30, 60, 100, 0.98));
        border-color: rgba(255, 255, 255, 0.15);
    }
}