/* ==========================================
   V5 导航重构：自适应三档 + 滚动 + 汉堡
   ========================================== */

/* 桌面端：横向导航（保留原样） */
@media (min-width: 1025px) {
    .mobile-menu-btn { display: none !important; }
    .navbar-menu {
        display: flex !important;
        gap: 4px;
        overflow-x: visible;
    }
    .navbar-menu a {
        padding: 6px 12px;
        font-size: 14px;
        white-space: nowrap;
    }
}

/* 平板（769-1024px）：横向滚动导航 + 渐隐提示 */
@media (max-width: 1024px) and (min-width: 769px) {
    .mobile-menu-btn { display: none !important; }
    .navbar {
        padding: 0 16px;
        height: 56px;
    }
    .navbar-brand span:not(.logo) { display: none; }
    .navbar-menu {
        display: flex !important;
        gap: 2px;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        flex: 1;
        justify-content: flex-start !important;
        margin: 0 8px;
        padding: 0 4px;
        scrollbar-width: none;
        -ms-overflow-style: none;
        position: relative;
        mask-image: linear-gradient(to right, transparent 0, black 12px, black calc(100% - 24px), transparent 100%);
        -webkit-mask-image: linear-gradient(to right, transparent 0, black 12px, black calc(100% - 24px), transparent 100%);
    }
    .navbar-menu::-webkit-scrollbar { display: none; }
    .navbar-menu li { flex-shrink: 0; }
    .navbar-menu a {
        padding: 6px 10px !important;
        font-size: 13px !important;
        border-radius: 6px;
    }
    .navbar-menu a span { display: none !important; }
    .navbar-user .user-dropdown span:not(.user-avatar) { display: none; }
    .navbar-user .user-dropdown > span:last-child { display: none; }
    .btn-login { padding: 4px 10px; font-size: 12px; }
}

/* 手机（< 769px）：汉堡菜单 */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .navbar-menu {
        display: none !important;
    }
    .navbar {
        padding: 0 12px;
        height: 56px;
    }
    .navbar-brand { font-size: 14px; }
    .navbar-brand span:not(.logo) { display: none; }
    .btn-login { padding: 4px 10px; font-size: 12px; }
}

/* ===== 滚动提示（仅平板显示） ===== */
.scroll-hint {
    display: none;
    position: fixed;
    top: 56px;
    left: 0; right: 0;
    height: 2px;
    background: linear-gradient(to right, transparent, rgba(45, 90, 61, 0.3) 30%, rgba(45, 90, 61, 0.3) 70%, transparent);
    z-index: 99;
    pointer-events: none;
    opacity: 0.6;
}

@media (max-width: 1024px) and (min-width: 769px) {
    .scroll-hint { display: block; }
}

/* ===== 移动端抽屉 ===== */
.mobile-menu-btn {
    background: none;
    border: none;
    color: white;
    font-size: 22px;
    cursor: pointer;
    padding: 6px 10px;
    margin-left: 8px;
    border-radius: 6px;
    -webkit-tap-highlight-color: transparent;
}

.mobile-menu-btn:active {
    background: rgba(255,255,255,0.15);
}

.mobile-drawer {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    max-width: 85vw;
    height: 100vh;
    background: white;
    box-shadow: -4px 0 24px rgba(0,0,0,0.18);
    z-index: 9999;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.mobile-drawer.open { right: 0; }

.mobile-drawer-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(2px);
    z-index: 9998;
    display: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.mobile-drawer-overlay.open {
    display: block;
    opacity: 1;
}

.mobile-drawer-header {
    padding: 18px 16px;
    background: linear-gradient(135deg, #2d5a3d 0%, #3d7a52 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1;
}

.mobile-drawer-header .title {
    font-size: 16px; font-weight: 600;
}

.mobile-drawer-close {
    background: rgba(255,255,255,0.15);
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 6px;
}

.mobile-drawer-close:active { background: rgba(255,255,255,0.25); }

/* 抽屉分组标题 */
.drawer-section-title {
    padding: 14px 18px 6px;
    font-size: 11px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.mobile-drawer a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    color: #333;
    text-decoration: none;
    font-size: 15px;
    transition: background 0.15s;
    position: relative;
}

.mobile-drawer a:active { background: #f5f5f5; }

.mobile-drawer a.active {
    background: #e8f5e9;
    color: #2d5a3d;
    font-weight: 600;
}

.mobile-drawer a.active::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: #2d5a3d;
}

.mobile-drawer a .icon {
    font-size: 20px;
    width: 28px;
    text-align: center;
}

.mobile-drawer a .badge {
    margin-left: auto;
    background: #ef4444;
    color: white;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

/* 抽屉底部：账号信息 */
.drawer-footer {
    margin-top: auto;
    padding: 14px 18px;
    background: #f8f9fa;
    border-top: 1px solid #e5e7eb;
    font-size: 12px;
    color: #888;
}
