/* ============================================================
   公共顶部导航栏样式 (适配 PC & Mobile)
   ============================================================ */

/* 1. 导航栏容器 */
.top-nav-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 54px; /* 导航栏高度 */
    background-color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    z-index: 2000; /* 保证在最上层 */
    transition: all 0.3s ease;
}

/* 2. 导航栏内部布局 (Flexbox) */
.nav-inner {
    display: flex;
    align-items: center;
    justify-content: center; /* 标题居中 */
    height: 100%;
    position: relative;
    padding: 0 15px;
    max-width: 100%; /* 默认全宽 */
    margin: 0 auto;  /* 居中 */
    box-sizing: border-box;
}

/* 3. 返回按钮样式 */
.nav-back-btn {
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s;
}

.nav-back-btn:hover {
    color: #1a5c9a; /* 悬停颜色 */
}

.nav-back-btn .icon {
    font-size: 20px;
    margin-right: 4px;
    margin-top: -2px; /* 微调对齐 */
}

/* 4. 标题文字样式 */
.nav-title {
    font-size: 18px;
    font-weight: bold;
    color: #2c3e50;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 60%;
}

/* 5. 页面内容避让 (重要：防止内容被遮挡) */
body {
    padding-top: 70px !important; /* 54px导航栏 + 间距 */
}

/* ================= PC 端适配 (宽度 > 768px) ================= */
@media (min-width: 769px) {
    .top-nav-bar {
        background-color: rgba(255, 255, 255, 0.95); /* 轻微透明 */
        backdrop-filter: blur(10px);
    }

    /* 让导航栏宽度与页面主体容器一致，看起来更整洁 */
    .nav-inner {
        max-width: 900px;
        border-left: 1px solid #f0f0f0;
        border-right: 1px solid #f0f0f0;
    }

    /* 隐藏页面内部重复的大标题 (可选) */
    /* .container > h1 { display: none; } */
}

/* ================= 移动端适配 (宽度 <= 768px) ================= */
@media (max-width: 768px) {
    .top-nav-bar {
        height: 50px;
    }
    .nav-title {
        font-size: 17px;
    }
    body {
        padding-top: 60px !important;
    }

    /* 移动端如果有侧边栏，这里强制隐藏，改用顶部返回 */
    .sidebar {
        display: none !important;
    }
}