/**
 * Grand Archive 导航栏样式
 * 包含导航栏、logo、链接、用户区域的样式
 */

.navbar {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: var(--z-index-sticky, 200);
    border-bottom: 1px solid rgba(255, 215, 0, 0.3);
}

.nav-container {
    max-width: var(--layout-wide-max-width, 1600px);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    color: #ffd700;
    text-decoration: none;
    font-weight: 700;
    transition: opacity var(--transition-fast, 0.15s ease);
}

.nav-logo-mobile,
.mobile-page-indicator,
.mobile-nav-actions,
.mobile-nav-back,
.mobile-auth-entry {
    display: none;
}

/* 桌面端也需要承载 logo：不要用 mobile 命名的 wrapper 隐藏桌面 logo。 */
.mobile-nav-leading {
    display: flex;
    align-items: center;
}

.nav-logo:hover {
    opacity: 0.9;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: #e0e0e0;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s;
    position: relative;
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
    color: #ffd700;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 2px;
    background: #ffd700;
}

.user-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.desktop-locale-switch {
    display: none;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.1);
}

@media (min-width: 769px) {
    .desktop-locale-switch {
        display: inline-flex;
    }
}

.desktop-locale-option {
    padding: 4px 8px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 12px;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.desktop-locale-option:hover {
    background: rgba(255, 255, 255, 0.2);
}

.desktop-locale-option.is-active {
    background: rgba(255, 255, 255, 0.3);
    font-weight: 600;
}

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

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 215, 0, 0.5);
}

.user-name {
    color: #e0e0e0;
    font-size: 0.9rem;
}

.user-avatar-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    font-size: 0.85rem;
    border: 2px solid rgba(255, 215, 0, 0.5);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #ffd700;
    cursor: pointer;
    padding: 0.5rem;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.22rem;
}

.mobile-menu-toggle span {
    display: block;
    width: 18px;
    height: 1.8px;
    border-radius: 999px;
    background: currentColor;
}

@media (max-width: 992px) {
    .nav-links {
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
}

@media (max-width: 480px) {
    .user-name {
        display: none;
    }
}
