/* Header layout */
.site-header {
    --steam-button-height: 56px;
    position: relative;
    width: 100%;
    flex-shrink: 0;
    background: #111417;
    border-bottom: 1px solid #2b3035;
}
.header-inner {
    width: min(1400px, calc(100% - 48px));
    height: 82px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    grid-template-areas: "brand nav account";
    align-items: center;
    gap: 42px;
}
/* Rust Hub logo */
.brand {
    grid-area: brand;
    justify-self: start;
    display: inline-flex;
    align-items: center;
    min-width: 0;
    max-width: 100%;
    text-decoration: none;
    line-height: 0;
}
.brand-logo {
    display: block;
    width: 240px;
    max-width: 100%;
    height: auto;
}
.brand:focus-visible {
    outline: 2px solid #d74732;
    outline-offset: 6px;
}
/* Centred navigation */
.main-nav {
    grid-area: nav;
    justify-self: center;
    display: flex;
    align-items: center;
    gap: 30px;
}
.main-nav a {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 10px 0;
    color: #9da5ac;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
    transition: color 0.2s ease;
}
.main-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    border-radius: 2px;
    background: #db3c19;
    transform: scaleX(0);
    transition: transform 0.2s ease;
}
.main-nav a:hover,
.main-nav a[aria-current="page"],
.main-nav a[aria-current="location"] {
    color: #ffffff;
}
.main-nav a[aria-current="page"]::after,
.main-nav a[aria-current="location"]::after {
    transform: scaleX(1);
}
.main-nav a:focus-visible {
    outline: 2px solid #db3c19;
    outline-offset: 5px;
}
/* Steam account */
.header-account {
    grid-area: account;
    justify-self: end;
    min-width: 0;
    max-width: 100%;
}
.steam-account {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}
.steam-avatar {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    object-fit: cover;
    border: 1px solid #393f45;
    background: #1a1e22;
}
.steam-user {
    min-width: 0;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
}
/* Existing Steam image buttons */
.steam-auth-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0;
    border: 0;
    background: transparent;
    text-decoration: none;
    line-height: 0;
    transition: filter 0.2s ease;
}
.steam-auth-image {
    display: block;
    width: auto;
    height: var(--steam-button-height);
}
.steam-auth-button:hover {
    filter: brightness(1.12);
}
.steam-auth-button:focus-visible {
    outline: 2px solid #d74732;
    outline-offset: 4px;
}
/* Smaller screens */
@media (max-width: 900px) {
    .site-header { --steam-button-height: 48px; }
    .header-inner {
        height: auto;
        min-height: 82px;
        padding: 14px 0;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-areas: "brand account" "nav nav";
        gap: 16px 20px;
        box-sizing: border-box;
    }
    .steam-user { max-width: 120px; }
}
@media (max-width: 600px) {
    .steam-user { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .main-nav a, .main-nav a::after, .steam-auth-button {
        transition: none;
    }
}