/* 公共导航栏样式 */

/* 现代化顶部导航栏 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    height: 70px;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(152, 226, 60, 0.2);
    box-shadow: 0 1px 20px rgba(152, 226, 60, 0.1);
}

.navbar-container {
    width: 100%;
    max-width: none;
    margin: 0;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
    gap: 0;
}

/* 左侧Logo区域 - 始终在左侧 */
.navbar-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 20px;
    color: #ffffff !important;
    text-decoration: none;
    flex-shrink: 0;
    margin-left: 0; /* 完全贴左边 */
    padding-left: 0;
}

/* 版本号徽章 */
.version-badge {
    display: inline-block;
    padding: 4px 10px;
    margin-left: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #98e23c;
    background: rgba(152, 226, 60, 0.15);
    border: 1px solid rgba(152, 226, 60, 0.3);
    border-radius: 12px;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.version-badge:hover {
    background: rgba(152, 226, 60, 0.25);
    border-color: rgba(152, 226, 60, 0.5);
    transform: translateY(-1px);
}

.navbar-brand:hover {
    color: #ffffff !important;
}

.navbar-logo {
    width: 40px;
    height: 40px;
    border-radius: 0;
    object-fit: contain;
}

.brand-text {
    color: #ffffff !important;
    white-space: nowrap;
}

/* 汉堡菜单按钮 - 手机端显示在右侧 */
.navbar-toggler {
    display: none;
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    width: 42px;
    height: 42px;
    border-radius: 10px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-right: 0; /* 完全贴边 */
}

.navbar-toggler:hover {
    background: var(--primary-color);
    color: #0a0a0f;
}

/* 右侧导航菜单 - 桌面端水平排列在右侧 */
.navbar-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    margin-right: 0; /* 完全贴右边 */
}

/* 桌面端隐藏 .nav-text 以节省空间（可选，如需显示文字请注释掉） */
/* .nav-text { display: none; } */

.nav-btn {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 8px 14px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    white-space: nowrap;
}

.nav-btn:hover {
    background: var(--primary-color);
    color: #0a0a0f;
    transform: translateY(-1px);
}

.nav-btn.active {
    background: var(--primary-color);
    color: #0a0a0f;
}

.nav-btn i {
    font-size: 18px;
}

/* 用户信息区域 */
.nav-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0;
}

.user-avatar {
    width: 38px;
    height: 38px;
    background: var(--primary-gradient);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0a0a0f;
    font-weight: 600;
    font-size: 15px;
    flex-shrink: 0;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    color: #ffffff;
    font-size: 13px;
    line-height: 1.2;
}

.user-role {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
}

/* 退出按钮 */
.btn-logout {
    background: transparent;
    border: 2px solid #ef4444;
    color: #ef4444;
    padding: 8px 14px;
    border-radius: 10px;
    font-weight: 500;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-right: 0; /* 完全贴边 */
}

.btn-logout:hover {
    background: #ef4444;
    color: white;
    transform: translateY(-1px);
}

.btn-logout i {
    font-size: 16px;
}

/* 手机端响应式菜单 */
@media (max-width: 991px) {
    /* 手机端显示汉堡菜单按钮 */
    .navbar-toggler {
        display: flex;
    }

    /* 手机端菜单变为下拉式 */
    .navbar-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: rgba(10, 10, 15, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 20px;
        gap: 8px;
        border-bottom: 1px solid rgba(152, 226, 60, 0.2);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }

    .navbar-menu.show {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    /* 手机端按钮样式 - 图标+白色文字组合 */
    .navbar-menu .nav-btn {
        width: 100%;
        justify-content: flex-start;
        padding: 14px 20px;
        gap: 14px;
        border: 1px solid rgba(152, 226, 60, 0.3);
        background: rgba(255, 255, 255, 0.03);
    }

    .navbar-menu .nav-btn:hover {
        background: rgba(152, 226, 60, 0.15);
    }

    .navbar-menu .nav-btn.active {
        background: rgba(152, 226, 60, 0.2);
        border-color: var(--primary-color);
    }

    /* 手机端toggleMenu中显示图标+白色文字 */
    .navbar-menu .nav-btn .nav-text {
        display: inline !important;
        color: #ffffff !important;
        font-size: 14px;
    }

    .navbar-menu .nav-btn i {
        font-size: 20px;
        color: var(--primary-color);
        width: 24px;
        text-align: center;
    }

    /* 用户信息区域 */
    .navbar-menu .nav-user-info {
        width: 100%;
        justify-content: flex-start;
        padding: 16px 20px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        margin-top: 8px;
        background: rgba(255, 255, 255, 0.03);
        border-radius: 10px;
    }

    /* 退出按钮样式 */
    .navbar-menu .btn-logout {
        width: 100%;
        justify-content: flex-start;
        padding: 14px 20px;
        gap: 14px;
    }

    .navbar-menu .btn-logout .nav-text {
        display: inline !important;
        color: #ffffff !important;
        font-size: 14px;
    }

    .navbar-menu .btn-logout i {
        width: 24px;
        text-align: center;
    }

    .user-details {
        display: flex;
    }

    .user-name {
        color: #ffffff !important;
        font-size: 14px;
    }

    .user-role {
        color: rgba(255, 255, 255, 0.7) !important;
    }
}

/* 更小屏幕 */
@media (max-width: 576px) {
    .navbar-container {
        padding: 0 10px;
    }

    .navbar-brand {
        font-size: 16px;
        gap: 4px;
    }

    .navbar-logo {
        width: 38px;
        height: 38px;
    }

    .brand-text {
        font-size: 20px;
    }
}

/* 层级穿透图操作按钮样式 */
.action-buttons {
    display: flex;
    gap: 10px;
}

.btn-outline {
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-outline-primary {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: #0a0a0f;
}

.btn-outline-secondary {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.7);
}

.btn-outline-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

/* 手机端隐藏操作按钮文字 */
@media (max-width: 768px) {
    .action-text {
        display: none;
    }

    .btn-outline {
        padding: 10px 12px;
    }

    .btn-outline i {
        font-size: 18px;
    }
}

/* VIP等级标识样式 */
.nav-vip-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 13px;
    cursor: default;
    background: rgba(255, 215, 0, 0.1);
    border: 2px solid rgba(255, 215, 0, 0.5);
    color: #ffd700;
}

.nav-vip-badge i {
    font-size: 18px;
}

/* 不同VIP等级颜色 */
.nav-vip-badge.vip-level-0 {
    color: #6c757d;
    border-color: rgba(108, 117, 125, 0.5);
    background: rgba(108, 117, 125, 0.1);
}

.nav-vip-badge.vip-level-1 {
    color: #cd7f32;
    border-color: rgba(205, 127, 50, 0.5);
    background: rgba(205, 127, 50, 0.1);
}

.nav-vip-badge.vip-level-2 {
    color: #c0c0c0;
    border-color: rgba(192, 192, 192, 0.5);
    background: rgba(192, 192, 192, 0.1);
}

.nav-vip-badge.vip-level-3 {
    color: #ffd700;
    border-color: rgba(255, 215, 0, 0.5);
    background: rgba(255, 215, 0, 0.1);
}

.nav-vip-badge.vip-level-4 {
    color: #e5e4e2;
    border-color: rgba(229, 228, 226, 0.5);
    background: rgba(229, 228, 226, 0.1);
}

.nav-vip-badge.vip-level-5 {
    color: #b9f2ff;
    border-color: rgba(185, 242, 255, 0.5);
    background: rgba(185, 242, 255, 0.15);
}

/* 手机端VIP标识样式 */
@media (max-width: 991px) {
    .navbar-menu .nav-vip-badge {
        width: 100%;
        justify-content: flex-start;
        padding: 14px 20px;
        gap: 14px;
        border: 1px solid;
    }

    .navbar-menu .nav-vip-badge i {
        font-size: 20px;
        width: 24px;
        text-align: center;
    }

    .navbar-menu .nav-vip-badge .nav-text {
        display: inline !important;
        font-size: 14px;
    }
}