/* =============================================================
   site-header.css — THE ONE HEADER FOR THE WHOLE SITE
   -------------------------------------------------------------
   Used by every page:
     index.html, overlays.html, updateLogs.html,
     escape-diablo/rules.html, escape-diablo/scripts.html,
     escape-diablo/logs.html

   The markup is identical on every page. The behaviour lives in
   js/site-header.js.

   Class prefix: gbnav-  (never collides with Tailwind utilities
   or the legacy .nav-link / .game-dropdown rules of the old pages)

   NOTE on !important
   ------------------
   The legacy pages (overlays.html / updateLogs.html) still carry an
   old `nav { background-color: ... !important; }` rule. Those rules
   are dead weight but would bleed into the new header, so the
   structural properties below are declared !important to win.
   ============================================================= */

.gbnav {
    position: fixed !important;
    top: 0; left: 0; right: 0;
    z-index: 100 !important;
    background: rgba(5, 5, 7, .86) !important;
    -webkit-backdrop-filter: blur(18px) saturate(140%) !important;
    backdrop-filter: blur(18px) saturate(140%) !important;
    border-bottom: 1px solid rgba(197, 160, 89, .20) !important;
    box-shadow: none !important;
    transition: background .35s cubic-bezier(.16, 1, .3, 1),
                box-shadow .35s cubic-bezier(.16, 1, .3, 1);
}
.gbnav.gbnav--solid {
    background: rgba(5, 5, 7, .96) !important;
    box-shadow: 0 10px 40px -22px rgba(0, 0, 0, .9) !important;
}

.gbnav__in {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 74px !important;
    min-height: 0 !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

/* ---------- logo ---------- */
.gbnav__logo {
    display: block;
    height: 38px;
    width: auto;
    flex: 0 0 auto;
    filter: drop-shadow(0 0 18px rgba(197, 160, 89, .45));
}
.gbnav__logo img {
    display: block;
    height: 100%;
    width: auto;
}

/* ---------- desktop links ---------- */
.gbnav__links {
    display: flex;
    align-items: center;
    gap: 32px;
    font-size: 14px;
    color: #8B8B95;
    font-family: inherit;
}
.gbnav__links a,
.gbnav__dropbtn {
    color: inherit;
    text-decoration: none;
    transition: color .25s;
    position: relative;
    font-family: inherit;
    font-size: 14px;
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    white-space: nowrap;
}
.gbnav__links a:hover,
.gbnav__dropbtn:hover {
    color: #C5A059;
}
.gbnav__links a.is-on,
.gbnav__dropbtn.is-on {
    color: #C5A059;
}
.gbnav__links a.is-on::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: -8px;
    height: 1px;
    background: #C5A059;
}
.gbnav__dropbtn.is-on::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: -8px;
    height: 1px;
    background: #C5A059;
}

/* ---------- Discord (right side, next to the download button) ---------- */
.gbnav__discord {
    color: #8B93F5 !important;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    text-decoration: none;
    font-size: 14px;
    font-family: inherit;
    font-weight: 500;
    padding: 8px 4px;
    transition: color .25s;
}
.gbnav__discord:hover { color: #A9AEF8 !important; }
.gbnav__discord svg { width: 16px; height: 16px; fill: currentColor; }

/* ---------- Game dropdown ---------- */
.gbnav__drop {
    position: relative;
}
.gbnav__dropbtn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.gbnav__dropbtn svg {
    width: 10px; height: 10px;
    fill: currentColor;
    transition: transform .25s;
}
.gbnav__drop.is-open .gbnav__dropbtn svg { transform: rotate(180deg); }

.gbnav__dropmenu {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    min-width: 200px;
    padding: 6px;
    background: rgba(11, 11, 15, .96);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(197, 160, 89, .28);
    border-radius: 12px;
    box-shadow: 0 22px 48px -18px rgba(0, 0, 0, .9);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .22s, transform .22s, visibility .22s;
    z-index: 120;
}
/* Visibility is driven entirely by JS (hover intent, see site-header.js)
   so the panel can stay open while the cursor travels down from the
   button into the menu — a pure CSS :hover would close it the moment
   the pointer left the button. */
.gbnav__drop.is-open .gbnav__dropmenu,
.gbnav__drop:focus-within .gbnav__dropmenu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}
.gbnav__dropmenu a {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 13px;
    border-radius: 8px;
    color: #C9C9D2 !important;
    font-size: 13.5px;
}
.gbnav__dropmenu a:hover,
.gbnav__dropmenu a.is-on {
    background: rgba(197, 160, 89, .12);
    color: #E4C580 !important;
}
.gbnav__dropmenu a.is-on::after { display: none; }
.gbnav__dropbtn.is-on::after { display: block; }
.gbnav__dropmenu .gbnav__dropicon {
    width: 20px; height: 20px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 6px;
    background: rgba(197, 160, 89, .14);
    color: #C5A059;
    font-size: 11px;
}

/* ---------- right side ---------- */
.gbnav__actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
}
.gbnav__cta {
    border: 0;
    cursor: pointer;
    font-family: inherit;
    font-weight: 700;
    font-size: 14px;
    color: #0B0B0F;
    padding: 12px 24px;
    border-radius: 999px;
    background: linear-gradient(140deg, #C5A059 0%, #E4C580 70%, #C5A059 100%);
    background-size: 200% auto;
    transition: background .4s cubic-bezier(.16, 1, .3, 1),
                transform .4s cubic-bezier(.16, 1, .3, 1),
                box-shadow .4s cubic-bezier(.16, 1, .3, 1);
    box-shadow: 0 6px 20px rgba(197, 160, 89, .22);
    white-space: nowrap;
}
.gbnav__cta:hover {
    background-position: right center;
    transform: translateY(-2px);
    box-shadow: 0 14px 34px rgba(197, 160, 89, .4);
}

.gbnav__burger {
    display: none;
    width: 38px; height: 38px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(197, 160, 89, .22);
    border-radius: 10px;
    background: rgba(11, 11, 15, .6);
    color: #C5A059;
    cursor: pointer;
}
.gbnav__burger svg { width: 18px; height: 18px; fill: currentColor; }

/* ---------- mobile drawer ---------- */
.gbnav__mobile {
    display: none;
    flex-direction: column;
    gap: 4px;
    padding: 14px 24px 22px;
    background: rgba(5, 5, 7, .97);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    border-top: 1px solid rgba(197, 160, 89, .18);
}
.gbnav__mobile.is-open { display: flex; }
.gbnav__mobile a {
    color: #C9C9D2;
    text-decoration: none;
    font-size: 15px;
    padding: 11px 12px;
    border-radius: 9px;
    transition: background .2s, color .2s;
}
.gbnav__mobile a:hover,
.gbnav__mobile a.is-on {
    color: #C5A059;
    background: rgba(197, 160, 89, .10);
}
.gbnav__mobile a.gbnav__discord { color: #8B93F5 !important; }
.gbnav__mobile a.gbnav__discord:hover { color: #A9AEF8 !important; }
.gbnav__mobile a.gbnav__discord svg { width: 17px; height: 17px; fill: currentColor; }

@media (max-width: 980px) {
    .gbnav__links { display: none; }
    .gbnav__burger { display: inline-flex; }
    .gbnav__in { height: 66px; }
    .gbnav__cta { padding: 10px 18px; font-size: 13px; }
}
/* on phones the Discord label is dropped, the icon is enough */
@media (max-width: 700px) {
    .gbnav__discordtext { display: none; }
    .gbnav__discord { padding: 8px; }
}
/* only on very narrow phones does the header get too crowded for both
   the download button and the burger */
@media (max-width: 360px) {
    .gbnav__cta { display: none; }
}
