* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@media (max-width: 809px) {
    html,
    body {
        touch-action: manipulation;
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
        overscroll-behavior: none;
    }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header - 黑色背景 */
.header {
    background-color: #000000;
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    height: 80px;
}

/* 左侧：汉堡菜单 + Logo */
.header-left {
    display: flex;
    align-items: center;
    gap: 30px;
}

.hamburger-menu {
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hamburger-menu i {
    color: white;
    font-size: 32px;
}

.hamburger-menu:hover i {
    color: #cccccc;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

/* EFOTUNE 文字品牌（替代圆形 logo 图） */
.brand-wordmark,
.logo-link--wordmark {
    font-family: "Antonio", "Arial Narrow", sans-serif;
    font-weight: 500;
    letter-spacing: -0.06em;
    text-transform: uppercase;
    color: #ffffff;
    line-height: 1;
    text-decoration: none;
}

.logo-link--wordmark {
    font-size: clamp(1rem, 2.2vw, 1.25rem);
}

.logo-link--wordmark:hover,
a.brand-wordmark:hover {
    color: #ffffff;
    opacity: 0.88;
}

.brand-wordmark--sidebar {
    display: block;
    text-align: center;
    font-size: clamp(1.35rem, 4vw, 1.75rem);
    padding: 20px 0;
}

.brand-wordmark--footer {
    font-size: clamp(1.1rem, 2.5vw, 1.35rem);
}

.logo-link img {
    height: 38px;
    width: auto;
}

/* 右侧：语言选择器 + 个人图标 */
.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* 语言选择器 */
.language-selector {
    position: relative;
}

.language-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.language-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.language-btn i {
    font-size: 14px;
}

.language-btn .fa-chevron-down {
    font-size: 10px;
    transition: transform 0.3s ease;
}

.language-btn.active .fa-chevron-down {
    transform: rotate(180deg);
}

.current-language {
    font-weight: 600;
}

.language-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 150px;
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    overflow: hidden;
}

.language-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-option {
    padding: 12px 16px;
    color: #d1d5db;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.language-option:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.language-option.selected {
    background: rgba(102, 126, 234, 0.2);
    color: #667eea;
    font-weight: 600;
}

/* 个人图标 - 缩小尺寸 */
.profile-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

.profile-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 50%;
}

.profile-icon:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.profile-icon:hover::before {
    opacity: 1;
}

.profile-icon i {
    color: white;
    font-size: 18px;
    position: relative;
    z-index: 1;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 0;
}

/* 侧边栏遮罩 */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

/* 侧边栏 */
.sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: 370px;
    height: 100vh;
    background-color: #000000;
    z-index: 1999;
    overflow-y: auto;
    transition: left 0.3s ease;
    padding: 15px 0;
}

/* 自定义滚动条 - 蓝色细条 */
.sidebar::-webkit-scrollbar {
    width: 4px; /* 更细 */
}

.sidebar::-webkit-scrollbar-track {
    background: transparent; /* 透明背景 */
}

.sidebar::-webkit-scrollbar-thumb {
    background: #4A90E2; /* 蓝色 */
    border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: #5BA3F5; /* 悬停时更亮的蓝色 */
}

/* 侧边栏内容容器的滚动条 */
.sidebar-content::-webkit-scrollbar {
    width: 4px;
}

.sidebar-content::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-content::-webkit-scrollbar-thumb {
    background: #4A90E2;
    border-radius: 10px;
}

.sidebar-content::-webkit-scrollbar-thumb:hover {
    background: #5BA3F5;
}

.sidebar.active {
    left: 0;
}

/* 关闭按钮 */
.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    padding: 5px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    color: #cccccc;
}

/* 侧边栏 Logo */
.sidebar-logo {
    text-align: center;
    padding: 25px 20px 20px;
}

.sidebar-logo .brand-wordmark--sidebar {
    padding: 25px 20px 20px;
}

/* Login 按钮 */
.sidebar-login {
    padding: 0 30px 20px;
    display: flex;
    justify-content: center;
}

.sidebar-login .sidebar-login-btn {
    display: inline-block;
    width: auto;
    padding: 15px 60px;
    border: none;
    border-radius: 50px;
    background: linear-gradient(90deg, #FFA500, #FF1493) !important;
    color: white !important;
    font-size: 18px;
    font-weight: bold;
    letter-spacing: 2px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    text-align: center;
}

.sidebar-login .sidebar-login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 165, 0, 0.4);
}

/* 侧边栏内容容器 */
.sidebar-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
    padding-bottom: 20px;
}

/* Logo 图片 (登录后显示在顶部) */
.sidebar-logo-img {
    display: flex;
    justify-content: center;
    padding: 20px 0;
}

.sidebar-logo-img .brand-wordmark--sidebar {
    padding: 20px 0;
}

/* 用户信息区域 */
.sidebar-user-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 20px 15px;
}

/* 用户名显示 */
.user-id-display {
    color: white;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

/* Referral Code */
.user-referral {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #aaa;
    font-size: 14px;
    margin-bottom: 10px;
}

.copy-icon {
    cursor: pointer;
    transition: color 0.3s;
}

.copy-icon:hover {
    color: #FFA500;
}

/* Current Level */
.user-level-text {
    color: white;
    font-size: 14px;
    margin-bottom: 0;
}

/* 余额卡片 */
.user-balance-card {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 20px;
    width: 90%;
    margin: 15px auto;
    text-align: center;
}

.balance-label {
    color: #aaa;
    font-size: 12px;
    margin-bottom: 8px;
}

.balance-amount {
    color: white;
    font-size: 24px;
    font-weight: bold;
}

/* Remittance In 按钮 */
.remittance-btn {
    display: block;
    margin: 15px auto;
    padding: 12px 50px;
    background: linear-gradient(90deg, #FF6B35, #F7931E, #4ECDC4);
    color: white;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
    border-radius: 25px;
    transition: transform 0.3s, box-shadow 0.3s;
    width: fit-content;
}

.remittance-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 107, 53, 0.5);
}

/* 底部导航菜单 */
.sidebar-nav-bottom {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: transparent;
    border-top: 1px solid #333;
    border-bottom: 1px solid #333;
    padding: 15px 0;
    margin: 15px 0;
}

.nav-bottom-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    color: white;
    text-decoration: none;
    font-size: 11px;
    padding: 5px 10px;
    transition: color 0.3s;
}

.nav-bottom-item i {
    font-size: 22px;
}

.nav-bottom-item.disabled {
    opacity: 0.3;
    /* 移除 pointer-events: none，允许点击跳转到登录 */
}

.nav-bottom-item:not(.disabled):hover {
    color: #FFA500;
}

/* 折叠菜单列表 */
.sidebar-menu-list {
    padding: 0 20px;
    margin-bottom: 20px;
}

.menu-item {
    margin-bottom: 5px;
}

.menu-title {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 10px;
    background: transparent;
    border: none;
    color: white;
    font-size: 14px;
    cursor: pointer;
    text-align: left;
    transition: background-color 0.2s;
    border-radius: 5px;
}

.menu-title:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.menu-title i {
    font-size: 16px;
    transition: transform 0.3s;
}

.menu-title.active i {
    transform: rotate(45deg);
}

.menu-title-link {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 10px;
    color: white;
    font-size: 14px;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.2s;
}

.menu-title-link:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.menu-title-link i {
    font-size: 16px;
}

.menu-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding-left: 20px;
}

.menu-content.active {
    max-height: 300px;
    padding: 10px 20px;
}

/* LOG OUT 按钮 */
.logout-btn {
    display: block;
    margin: 20px 20px;
    padding: 15px;
    background: transparent;
    border: 2px solid #FF4444;
    color: #FF4444;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
    text-align: center;
    border-radius: 5px;
    transition: all 0.3s;
}

.logout-btn:hover {
    background: #FF4444;
    color: white;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-container {
        padding: 0 25px;
        height: 65px;
    }

    .logo-link img {
        height: 30px;
    }

    .header-right {
        gap: 10px;
    }

    .language-btn {
        padding: 6px 10px;
        font-size: 13px;
    }

    .language-btn i {
        font-size: 12px;
    }

    .profile-icon {
        width: 36px;
        height: 36px;
    }

    .profile-icon i {
        font-size: 16px;
    }

    .hamburger-menu i {
        font-size: 28px;
    }

    /* 移动端侧边栏 */
    .sidebar {
        width: 100%;
        max-width: 320px;
    }

    .sidebar-login .sidebar-login-btn {
        font-size: 16px;
        padding: 12px 25px;
    }
}

@media (max-width: 480px) {
    .sidebar {
        width: 100%;
        max-width: 280px;
    }

}

/* Footer 样式 */
.footer {
    background: #000;
    padding: 20px;
    width: 100%;
    margin: 0;
    display: block;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.footer-logo .brand-wordmark--footer {
    display: inline-block;
}

.footer-content {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-size: 14px;
}

.footer-copyright {
    color: #fff;
    font-size: 13px;
    margin: 0;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
}

.footer-text {
    color: #fff;
    font-size: 13px;
}

.footer-btn {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 13px;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 6px;
    transition: background 0.2s, border-color 0.2s;
}

.footer-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
}

.footer-links .separator {
    color: #fff;
    margin: 0 3px;
}

/* Footer 响应式 */
@media (max-width: 768px) {
    .footer {
        padding: 15px 20px;
    }

    .footer-container {
        gap: 10px;
    }

    .footer-copyright,
    .footer-text {
        font-size: 11px;
    }

    .separator {
        font-size: 11px;
    }
}


