/* Site header — sspai-inspired: flat, logo + nav cluster, auth on the right */

.navbar-container {
    background: #fff;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 60px;
    height: 56px;
    box-sizing: border-box;
}

.navbar-start {
    display: flex;
    align-items: center;
    gap: 2rem;
    min-width: 0;
    flex: 1;
}

.navbar-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    text-decoration: none;
}

.navbar-logo img {
    display: block;
    height: 28px;
    width: auto;
    object-fit: contain;
}

.navbar-menu ul {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.navbar-menu li {
    margin: 0;
}

.navbar-menu a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    height: 56px;
    padding: 0 0.65rem;
    color: #b0b0b0;
    text-decoration: none;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 0.9rem;
    font-weight: 400;
    white-space: nowrap;
    transition: color 0.15s ease, font-weight 0.15s ease;
}

.nav-item__icon {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
    color: inherit;
    opacity: 0.85;
    transition: opacity 0.15s ease;
}

.navbar-menu a:hover {
    color: #888;
}

.navbar-menu a.active {
    color: #1a1a1a;
    font-weight: 700;
}

.navbar-menu a.active .nav-item__icon {
    opacity: 1;
    stroke-width: 2.2;
}

.navbar-menu a.nav-link--vip {
    color: #b0b0b0;
}

.navbar-menu a.nav-link--vip:hover {
    color: #888;
}

.navbar-menu a.nav-link--vip.active {
    color: #1a1a1a;
    font-weight: 700;
}

/* Tools 下拉菜单：hover / focus-within 展开，主链接仍可直达 */
.nav-has-dropdown {
    position: relative;
}

.nav-caret {
    transition: transform 0.18s ease;
    opacity: 0.7;
}

.nav-has-dropdown:hover .nav-caret,
.nav-has-dropdown:focus-within .nav-caret {
    transform: rotate(180deg);
}

.nav-dropdown {
    display: block !important;           /* 覆盖 .navbar-menu ul 的 flex 穿透：一行一条竖排 */
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 250px;
    margin: 0;
    padding: 6px;
    list-style: none;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.10);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s;
    z-index: 1200;
}

.nav-has-dropdown:hover .nav-dropdown,
.nav-has-dropdown:focus-within .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown li {
    margin: 0;
    display: block;
}

.nav-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    height: auto;
    padding: 10px 12px;
    border-radius: 6px;
    color: #444;
    font-size: 0.875rem;
    font-weight: 400;
    white-space: nowrap;
    transition: background 0.12s ease, color 0.12s ease;
}

.nav-dropdown a:hover {
    background: #f5f6f8;
    color: #1956ff;
}

.nav-drop-ico {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: inherit;
    opacity: 0.85;
}

.nav-dropdown a:hover .nav-drop-ico {
    opacity: 1;
}



.navbar-auth {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.auth-button {
    padding: 0.45rem 0.85rem;
    border-radius: 4px;
    /* 显式字体栈：避免被页面正文内嵌 <style> 覆盖的 body font-family（如 About/VIP 公告富文本）继承污染，导致不同页面 auth 文字视觉大小不一致 */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.15s ease, background 0.15s ease;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.auth-button.primary {
    background: #1956ff;
    color: #fff;
    border: none;
}

.auth-button.primary:hover {
    background: #1445cc;
    color: #fff;
}

.auth-button.secondary {
    background: transparent;
    color: #595f6d;
    border: none;
}

.auth-button.secondary:hover {
    color: #1956ff;
}

@media (max-width: 1100px) {
    .main-navbar {
        padding: 0 24px;
        gap: 1rem;
    }

    .navbar-start {
        gap: 1.25rem;
    }

    .navbar-menu a {
        padding: 0 0.5rem;
        font-size: 0.85rem;
    }
}

/* 紧凑桌面（901~1024）：放在 1100 规则之后，覆盖其间距，避免导航项压到 Login/Sign Up */
@media (max-width: 1024px) {
    .main-navbar {
        padding: 0 16px;
        gap: 0.75rem;
    }

    .navbar-start {
        gap: 1rem;
    }

    .navbar-menu ul {
        gap: 0.15rem;
    }

    .navbar-menu a {
        padding: 0 0.4rem;
        font-size: 0.8rem;
    }

    .nav-item__icon {
        width: 15px;
        height: 15px;
    }

    .navbar-logo img {
        height: 24px;
    }

    .auth-button {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 768px) {
    .main-navbar {
        padding: 0 1rem;
    }

    .navbar-menu {
        display: none;
    }
}
