/* ===== 顶部导航栏（复用 iwantlearn） ===== */
:root {
    --nav-height: 64px;
}

#navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--nav-height);
    gap: 16px;
}

/* 网站标题 - 金色流光渐变 */
.nav-brand {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 1px;
    background: linear-gradient(135deg, #d4a017, #f5d76e, #d4a017, #f5d76e);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: goldFlow 4s ease infinite;
    cursor: pointer;
    white-space: nowrap;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 暗夜模式按钮（太阳 / 月亮） */
.theme-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    position: relative;
}

.theme-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.theme-btn .icon-sun,
.theme-btn .icon-moon {
    position: absolute;
    transition: all 0.3s ease;
}

.theme-btn .icon {
    width: 20px;
    height: 20px;
    color: var(--gold);
}

.dark-mode .theme-btn .icon {
    color: var(--gold-light);
}

.theme-btn .icon-moon {
    opacity: 0;
    transform: scale(0.5);
}

.dark-mode .theme-btn .icon-sun {
    opacity: 0;
    transform: scale(0.5);
}

.dark-mode .theme-btn .icon-moon {
    opacity: 1;
    transform: scale(1);
}

.dark-mode .theme-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* 导航菜单 */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 4px;
}

.nav-menu li a {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    color: #555;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-menu li a .icon {
    color: var(--gold);
    opacity: 0.9;
}

.nav-menu .mobile-only {
    display: none;
}

.nav-menu li a:hover,
.nav-menu li a.active {
    color: #d4a017;
    background: rgba(212, 160, 23, 0.08);
}

/* 用户状态区域 */
.nav-user {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 8px;
}

.nav-user .btn {
    padding: 6px 16px;
    font-size: 0.82rem;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 6px 4px 4px;
    border-radius: 50px;
    cursor: pointer;
    transition: background 0.25s ease;
}

.user-chip:hover {
    background: rgba(0, 0, 0, 0.05);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #d4a017, #f5d76e);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    overflow: hidden;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: #555;
}

/* 汉堡按钮 */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.3s;
}

.hamburger:hover {
    background: rgba(0, 0, 0, 0.05);
}

.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: #555;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger span + span {
    margin-top: 5px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* 导航未读消息徽标 */
.nav-badge {
    display: inline-block;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    margin-left: 5px;
    border-radius: 9px;
    background: #e05d5d;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    vertical-align: 1px;
}

/* 封禁提示条：跟随固定在导航栏底部 */
.account-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 18px;
    background: #fdecec;
    border-top: 1px solid #f5c2c2;
    color: #b23b3b;
    font-size: 0.82rem;
    line-height: 1.4;
    text-align: center;
}

/* 封禁提示条占用的高度 */
body.has-account-banner .page {
    padding-top: 144px;
}

body.has-account-banner .hero {
    padding-top: 168px;
}

body.has-account-banner .auth-page {
    padding-top: 148px;
}

/* 移动端菜单中的账号区 */
.mobile-account {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px 4px;
    margin-top: 6px;
    border-top: 1px solid var(--border);
}

.mobile-user-link {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    padding: 0 !important;
    font-weight: 600;
    color: var(--text) !important;
    background: none !important;
}

.mobile-user-link span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mobile-account form {
    flex-shrink: 0;
}
