/* ============ 头部导航 - 修正版（Logo位+间距优化） ============ */
.header {
    background: #1E9FFF;
    color: white;
    padding: 0;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .layui-container {
    display: flex;
    align-items: center;
    height: 60px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
    /* 👇 关键：取消 justify-content: space-between，改用 auto margin 控制间距 */
}

/* Logo容器（带图片位） */
.logo {
    display: flex;
    align-items: center;
    gap: 8px; /* 图片和文字的间距 */
    height: 100%;
    /* 👇 固定宽度，避免和导航菜单距离过远 */
    width: 120px;
}

.logo-img {
    width: 36px;
    height: 36px;
    border-radius: 4px;
    object-fit: contain;
    /* 图片不存在时也不会撑布局 */
    display: block;
}

.logo-text {
    font-size: 20px;
    font-weight: bold;
    color: #fff;
    letter-spacing: 1px;
    white-space: nowrap;
}

/* 导航菜单 */
.nav-menu {
    display: flex;
    align-items: center;
    height: 100%;
    /* 👇 关键：让导航菜单紧贴Logo，不撑开间距 */
    margin-left: 0;
}

.nav-menu a {
    display: inline-flex;
    align-items: center;
    height: 100%;
    padding: 0 15px;
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    font-size: 15px;
    transition: all 0.25s ease;
    position: relative;
}

.nav-menu a:hover {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

.nav-menu a.active {
    color: #fff;
    background: rgba(0,0,0,0.1);
    font-weight: 500;
}

/* 登录区域 */
.login-area {
    display: flex;
    align-items: center;
    gap: 5px;
    /* 👇 关键：自动推到最右边 */
    margin-left: auto;
}

.login-area a {
    display: inline-flex;
    align-items: center;
    height: 60px;
    padding: 0 14px;
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.25s ease;
}

.login-area a:hover {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

.logout-btn {
    color: #ffeeee !important;
}
.logout-btn:hover {
    background: rgba(255,70,70,0.15) !important;
    color: #fff !important;
}

/* 小屏适配 */
@media (max-width: 992px) {
    .logo {
        width: 100px;
    }
    .logo-img {
        width: 30px;
        height: 30px;
    }
    .logo-text {
        font-size: 18px;
    }
    .nav-menu a {
        padding: 0 12px;
        font-size: 14px;
    }
    .login-area a {
        padding: 0 10px;
    }
}

@media (max-width: 768px) {
    .header .layui-container {
        padding: 0 10px;
    }
    .logo {
        width: auto;
    }
    .nav-menu a {
        padding: 0 8px;
        font-size: 13px;
    }
}

/* 课程中心导航：暖橙，和页面中考标签#ff7d00同源，柔和降饱和度 */
.nav-course-item {
    color: #e67500;
    transition: color 0.24s;
}
.nav-course-item:hover {
    color: #ff7d00;
}
.nav-course-item.active {
    color: #165DFF;
    font-weight: 550;
    border-bottom: 2px solid #165DFF;
}

/* VIP充值导航：浅紫，和页面vip标签#722ed1配套，弱化不刺眼 */
.nav-vip-item {
    color: #8554cc;
    transition: color 0.24s;
}
.nav-vip-item:hover {
    color: #722ed1;
}
.nav-vip-item.active {
    color: #165DFF;
    font-weight: 550;
    border-bottom: 2px solid #165DFF;
}

/* 导航强制不换行，防止文字换行挤压 */
.nav-menu {
    display: flex;
    flex-wrap: nowrap !important;  /* 强制不换行 */
    white-space: nowrap !important;
    align-items: center;
    gap: 2px; /* 轻微间距，更清爽 */
}

/* 每个导航项固定不换行 */
.nav-menu a {
    flex-shrink: 0 !important; /* 不让文字被挤变形 */
    white-space: nowrap !important;
    padding: 0 10px; /* 均匀间距 */
}

/* 图标垂直居中 */
.nav-menu a .layui-icon {
    vertical-align: middle;
    margin-right: 3px;
}