/* 统一的前端导航栏样式 (rszmro.cc，不含论坛) */
.top-navbar {
    background: #ffffff;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding: 0;
    margin: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    height: 72px;
    position: relative;
}

.navbar-logo {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
    margin-right: 32px;
    min-width: 0;
}
.navbar-logo a {
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 0;
    text-decoration: none;
}
.navbar-logo img { max-height: 40px; flex-shrink: 0; }
.navbar-logo-text {
    font-size: 22px;
    font-weight: 700;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
    white-space: nowrap;
}

.navbar-links {
    display: flex;
    gap: 32px;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: nowrap;
    white-space: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    flex: 0 1 auto;
    min-width: 0;
    margin-left: 0;
}
.navbar-links::-webkit-scrollbar { height: 0; }
.navbar-links { scrollbar-width: none; }

.navbar-links a {
    color: #1a1a1a;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: 8px 0;
    white-space: nowrap !important;
}
.navbar-links a:hover { color: #10b981; }
.navbar-links a.active { color: #10b981; }
.navbar-links a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    flex-shrink: 0;
}

.navbar-lang-switch {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-right: 8px;
    padding-right: 12px;
    border-right: 1px solid #e0e0e0;
}
.lang-btn { padding: 4px 8px; color: #666; font-size: 13px; font-weight: 500; text-decoration: none; border-radius: 4px; transition: all 0.3s ease; white-space: nowrap; }
.lang-btn:hover { color: #10b981; background: #f0fdf4; }
.lang-btn.active { color: #10b981; font-weight: 600; background: #f0fdf4; }
.lang-separator { color: #ccc; font-size: 12px; margin: 0 2px; }

.navbar-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #10b981;
    flex-shrink: 0;
    cursor: pointer;
    transition: transform 0.3s ease;
    text-decoration: none;
    display: block;
}
.navbar-user-avatar:hover { transform: scale(1.1); border-color: #059669; }
.navbar-user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.navbar-user-avatar .avatar-placeholder {
    width: 100%; height: 100%;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; font-weight: 600;
}

.navbar-user-center-link {
    padding: 10px 20px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.35);
    display: inline-block;
}
.navbar-user-center-link:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
    transform: translateY(-1px);
}

.navbar-user-id { font-size: 12px; color: #666; line-height: 1.2; white-space: nowrap; }

.navbar-user-btn {
    padding: 6px 12px;
    background: #ef4444;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
}
.navbar-user-btn:hover { box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3); }

.navbar-auth-btn { padding: 10px 20px; border-radius: 8px; font-size: 14px; font-weight: 500; text-decoration: none; transition: all 0.3s ease; }
.navbar-auth-btn.login { background: linear-gradient(135deg, #10b981 0%, #059669 100%); color: #fff; box-shadow: 0 2px 10px rgba(16, 185, 129, 0.35); }
.navbar-auth-btn.login:hover { filter: brightness(1.05); box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4); }
.navbar-auth-btn.register { background: #f5f5f5; color: #333; border: 1px solid #ddd; }
.navbar-auth-btn.register:hover { background: #eee; }
.navbar-auth-btn.quote-login { background: #f5f5f5; color: #333; border: 1px solid #ddd; }
.navbar-auth-btn.quote-login:hover { background: #eee; }

.navbar-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}
.navbar-toggle span { display: block; width: 24px; height: 2px; background: #1a1a1a; border-radius: 2px; transition: all 0.3s ease; }
.navbar-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(6px, 6px); }
.navbar-toggle.active span:nth-child(2) { opacity: 0; }
.navbar-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(6px, -6px); }

.mobile-nav-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
.mobile-nav-overlay.active { opacity: 1; pointer-events: auto; }

.mobile-nav-sidebar {
    display: none;
    position: fixed;
    top: 0;
    left: -100%;
    width: 280px;
    max-width: 85%;
    height: 100%;
    background: #fff;
    z-index: 1000;
    transition: left 0.3s ease;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}
.mobile-nav-sidebar.active { left: 0; }

.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 1001;
}
.mobile-nav-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #1a1a1a; }
.mobile-nav-logo .navbar-logo-text { font-size: 20px; font-weight: 700; background: linear-gradient(135deg, #10b981 0%, #059669 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.mobile-nav-close { background: none; border: none; font-size: 28px; color: #1a1a1a; cursor: pointer; padding: 0; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 4px; }
.mobile-nav-close:hover { background: #f3f4f6; }

.mobile-nav-links { list-style: none; margin: 0; padding: 0; }
.mobile-nav-links li { border-bottom: 1px solid #f3f4f6; }
.mobile-nav-links a { display: block; padding: 16px 20px; color: #1a1a1a; text-decoration: none; font-size: 15px; font-weight: 500; transition: all 0.2s ease; }
.mobile-nav-links a:hover, .mobile-nav-links a.active { background: #f0fdf4; color: #10b981; padding-left: 24px; }

.mobile-nav-user { padding: 20px; border-top: 1px solid #e5e7eb; margin-top: auto; }
.mobile-nav-user-logged-in { display: flex; align-items: center; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid #f3f4f6; margin-bottom: 16px; }
.mobile-nav-user-avatar { width: 44px; height: 44px; border-radius: 50%; overflow: hidden; border: 2px solid #10b981; flex-shrink: 0; cursor: pointer; transition: transform 0.3s ease; text-decoration: none; display: block; }
.mobile-nav-user-avatar:hover { transform: scale(1.05); border-color: #059669; }
.mobile-nav-user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.mobile-nav-user-avatar .avatar-placeholder { width: 100%; height: 100%; background: linear-gradient(135deg, #10b981 0%, #059669 100%); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 600; }
.mobile-nav-user-info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.mobile-nav-user-name { padding: 6px 14px; background: linear-gradient(135deg, #10b981 0%, #059669 100%); color: #fff; font-size: 14px; font-weight: 600; text-decoration: none; border-radius: 6px; transition: all 0.3s ease; box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3); display: inline-block; width: fit-content; }
.mobile-nav-user-name:hover { background: linear-gradient(135deg, #059669 0%, #047857 100%); box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4); transform: translateY(-1px); }
.mobile-nav-user-id { font-size: 12px; color: #999; }
.mobile-nav-actions { display: flex; flex-direction: column; gap: 8px; }

.mobile-nav-lang { padding: 16px 20px; border-top: 1px solid #e5e7eb; border-bottom: 1px solid #e5e7eb; display: flex; align-items: center; gap: 12px; }
.mobile-lang-label { font-size: 14px; color: #666; font-weight: 500; }
.mobile-lang-btn { padding: 6px 12px; color: #666; font-size: 14px; font-weight: 500; text-decoration: none; border-radius: 6px; transition: all 0.3s ease; border: 1px solid #e0e0e0; background: #fff; }
.mobile-lang-btn:hover { color: #10b981; border-color: #10b981; background: #f0fdf4; }
.mobile-lang-btn.active { color: #10b981; font-weight: 600; border-color: #10b981; background: #f0fdf4; }
.mobile-nav-actions .navbar-auth-btn, .mobile-nav-actions .navbar-user-btn { width: 100%; text-align: center; padding: 10px 16px; }
.mobile-nav-auth-btns { flex-direction: row; flex-wrap: wrap; gap: 10px; }
.mobile-nav-auth-btns .navbar-auth-btn { flex: 1; min-width: 100px; }

@media (max-width: 768px) {
    .navbar-content { padding: 0 20px; }
    .navbar-links, .navbar-user, .navbar-lang-switch { display: none !important; }
    .navbar-toggle { display: flex; }
    .mobile-nav-overlay, .mobile-nav-sidebar { display: block; }
    .mobile-nav-links a { word-break: break-word; white-space: normal; line-height: 1.5; }
    .mobile-nav-lang { flex-wrap: wrap; gap: 8px; }
    .mobile-lang-label { width: 100%; margin-bottom: 4px; }
    .mobile-lang-btn { flex: 1; min-width: 80px; text-align: center; }
}
