/* Header Styling - Dark Theme */
.site-header {
    background-color: #1a1a1a;
    color: #ffffff;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: bold;
}

.header-brand a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-brand a:hover {
    color: #e5e5e5;
}

.header-brand img {
    width: 32px;
    height: 32px;
    border-radius: 4px;
}

/* Logo-only variant for index page */
.header-brand.logo-only a {
    gap: 0;
}

.header-brand.logo-only a span {
    display: none;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

/* Ensure avatar wrapper aligns perfectly in the header row */
.nav-links .avatar-wrap {
    display: flex;
    align-items: center;
}

.nav-links a,
.nav-links .nav-link {
    color: #e5e5e5;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    padding: 8px 12px;
    border-radius: 4px;
}

.nav-links a:hover,
.nav-links .nav-link:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.1);
}

/* Active link styling */
.nav-links .nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-weight: 500;
}

.nav-links .nav-link.active:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.nav-links .login-btn {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid #e5e5e5;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 500;
}

.nav-links .login-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: #ffffff;
}

/* Avatar button (injected when logged in) */
.nav-links .avatar-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #e5e5e5;
    background: #f3f4f6;
    color: #111827;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    margin: 0; /* reset global button margins from page-level CSS */
    line-height: 1; /* avoid extra vertical space */
    box-sizing: border-box;
}

/* Ensure consistent avatar alignment on all pages */
.site-header .nav-links .avatar-btn { vertical-align: middle; }

/* Responsive Design */
@media (max-width: 768px) {
    .site-header {
        padding: 0 15px;
    }
    
    .nav-links {
        gap: 16px;
    }
    
    .nav-links a {
        font-size: 13px;
        padding: 6px 8px;
    }
    
    .header-brand {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .nav-links {
        gap: 12px;
    }
    
    .nav-links a {
        font-size: 12px;
        padding: 4px 6px;
    }
}