/* BattleRanker shared header — teal / pink / purple identity */

:root{
    --sh-bg:var(--theme-bg-deep);
    --sh-bg-2:var(--theme-surface);
    --sh-line:var(--theme-border);
    --sh-text:var(--theme-text);
    --sh-muted:var(--theme-text-muted);
    --sh-teal:var(--theme-page-accent,var(--theme-teal));
    --sh-pink:var(--theme-pink);
    --sh-purple:var(--theme-purple);
}

.site-header{
    position:relative;
    z-index:100;
    width:100%;
    border-bottom:1px solid var(--sh-line);
    background:
        radial-gradient(circle at 18% 0,var(--theme-raw-rgba-91-32-200-13-3ba1c6),transparent 260px),
        var(--sh-bg);
    color:var(--sh-text);
    box-shadow:0 8px 24px var(--theme-raw-rgba-0-0-0-16-dc0c50);
}

.site-header .header-inner{
    min-height:68px;
    display:flex;
    align-items:center;
    gap:26px;
}

.site-header .brand{
    flex:0 0 auto;
    min-width:205px;
    display:flex;
    flex-direction:column;
    justify-content:center;
    color:var(--theme-raw-fff);
    text-decoration:none;
    line-height:1;
    transform:translateY(3px);
}

.site-header .brand-main{
    display:block;
    font-family:"Arial Narrow","Segoe UI",Arial,sans-serif;
    font-size:25px;
    line-height:.9;
    font-weight:950;
    font-style:italic;
    letter-spacing:-1.2px;
    white-space:nowrap;
}

.site-header .brand-accent{
    color:var(--sh-teal);
}

.site-header .brand-tagline{
    display:block;
    margin-top:2px;
    color:var(--sh-muted);
    font-size:8px;
    line-height:1;
    font-weight:700;
    letter-spacing:.08px;
}

.site-header .main-nav{
    margin-left:auto;
    display:flex;
    align-items:center;
    gap:4px;
}

.site-header .main-nav a{
    position:relative;
    display:flex;
    align-items:center;
    min-height:40px;
    padding:0 13px;
    border-radius:7px;
    color:var(--theme-raw-d4d8e5);
    text-decoration:none;
    font-size:10px;
    font-weight:950;
    letter-spacing:.15px;
    white-space:nowrap;
    transition:color .16s ease,background .16s ease;
}

.site-header .main-nav a:hover{
    color:var(--theme-raw-fff);
    background:var(--theme-raw-151a35);
}

.site-header .main-nav a.active{
    color:var(--sh-teal);
    background:var(--theme-raw-rgba-255-255-255-055-ca2d2f);
}

.site-header .main-nav a.active::after{
    content:"";
    position:absolute;
    left:14px;
    right:14px;
    bottom:2px;
    height:3px;
    border-radius:3px;
    background:var(--sh-teal);
}

.site-header .header-actions{
    display:flex;
    align-items:center;
    gap:5px;
}

.site-header .login-link{
    display:flex;
    align-items:center;
    min-height:38px;
    padding:0 9px;
    color:var(--theme-raw-c7cada);
    text-decoration:none;
    font-size:9px;
    font-weight:900;
    white-space:nowrap;
}

.site-header .login-link:hover{
    color:var(--theme-raw-fff);
}

.site-header .join-btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:40px;
    margin-left:4px;
    padding:0 14px;
    border:1px solid var(--theme-raw-ff67aa);
    border-radius:7px;
    background:var(--sh-pink);
    color:var(--theme-raw-fff);
    text-decoration:none;
    font-size:9px;
    font-weight:950;
    white-space:nowrap;
    box-shadow:3px 3px 0 var(--theme-shadow-deep);
}

.site-header .join-btn:hover{
    filter:brightness(1.06);
}

.site-menu-toggle{
    display:none;
    width:42px;
    height:42px;
    margin-left:auto;
    padding:0;
    border:0;
    border-radius:7px;
    background:var(--theme-surface);
    cursor:pointer;
    align-items:center;
    justify-content:center;
    flex-direction:column;
    gap:5px;
}

.site-menu-toggle span{
    display:block;
    width:22px;
    height:2px;
    border-radius:2px;
    background:var(--theme-raw-fff);
}

.site-mobile-menu{
    display:none;
    background:
        radial-gradient(circle at 90% 0,var(--theme-raw-rgba-91-32-200-18-56164c),transparent 240px),
        var(--theme-raw-090e22);
    border-top:1px solid var(--theme-raw-2e3554);
    border-bottom:3px solid var(--sh-teal);
    box-shadow:0 15px 28px var(--theme-raw-rgba-0-0-0-28-ca0b96);
}

.site-mobile-menu nav{
    width:min(100% - 28px,1200px);
    margin:0 auto;
    display:grid;
    padding:8px 0 13px;
}

.site-mobile-menu a{
    position:relative;
    display:block;
    padding:12px 5px;
    border-bottom:1px solid var(--theme-raw-rgba-255-255-255-09-9e3854);
    color:var(--theme-raw-f3f4f8);
    text-decoration:none;
    font-size:11px;
    font-weight:900;
}

.site-mobile-menu a.active{
    padding-left:13px;
    color:var(--sh-teal);
}

.site-mobile-menu a.active::before{
    content:"";
    position:absolute;
    left:1px;
    top:50%;
    width:5px;
    height:20px;
    border-radius:4px;
    background:var(--sh-teal);
    transform:translateY(-50%);
}

.site-mobile-menu a:last-child{
    border-bottom:0;
}

.site-mobile-menu .site-mobile-build{
    margin-top:9px;
    padding:13px 12px;
    border:0;
    border-radius:7px;
    background:var(--sh-pink);
    color:var(--theme-raw-fff);
    text-align:center;
    box-shadow:3px 3px 0 var(--theme-shadow-deep);
}

@media(max-width:1050px){
    .site-header .header-inner{gap:15px}
    .site-header .brand{min-width:180px}
    .site-header .brand-main{font-size:22px}
    .site-header .main-nav a{
        padding-left:9px;
        padding-right:9px;
        font-size:9px;
    }
    .site-header .header-actions .login-link{display:none}
    .site-header .join-btn{
        padding-left:10px;
        padding-right:10px;
    }
}

@media(max-width:760px){
    .site-header .header-inner{
        min-height:56px;
        padding-top:5px;
        padding-bottom:5px;
    }

    .site-header .brand{
        min-width:0;
        transform:translateY(2px);
    }

    .site-header .brand-main{
        font-size:23px;
    }

    .site-header .brand-tagline{
        margin-top:2px;
        font-size:7px;
    }

    .site-header .main-nav,
    .site-header .header-actions{
        display:none;
    }

    .site-menu-toggle{
        display:flex;
    }

    .site-mobile-menu.is-open{
        display:block;
    }
}

@media(max-width:380px){
    .site-header .brand-main{
        font-size:21px;
    }

    .site-menu-toggle{
        width:39px;
        height:39px;
    }
}


/* Shared header V1.2 — page theme scope owns the visible accent */
.theme-ranking-electric .site-header{
    --sh-teal:var(--theme-header-accent,var(--theme-page-accent,var(--theme-teal)));
    --sh-cta:var(--theme-header-cta,var(--theme-pink));
}

.theme-ranking-electric .site-header .brand-accent,
.theme-ranking-electric .site-header .main-nav a.active,
.theme-ranking-electric .site-mobile-menu a.active{
    color:var(--sh-teal)!important;
}

.theme-ranking-electric .site-header .main-nav a.active::after,
.theme-ranking-electric .site-mobile-menu a.active::before,
.theme-ranking-electric .site-mobile-menu{
    border-color:var(--sh-teal)!important;
}

.theme-ranking-electric .site-header .main-nav a.active::after,
.theme-ranking-electric .site-mobile-menu a.active::before{
    background:var(--sh-teal)!important;
}

.theme-ranking-electric .site-header .join-btn,
.theme-ranking-electric .site-mobile-menu .site-mobile-build{
    border-color:var(--sh-cta)!important;
    background:var(--sh-cta)!important;
    color:var(--theme-raw-101225)!important;
}


/* Shared header V1.4 — item page theme scope */
.theme-item-electric .site-header{
    --sh-teal:var(--theme-header-accent,var(--theme-page-accent,var(--theme-teal)));
    --sh-cta:var(--theme-header-cta,var(--theme-page-accent,var(--theme-pink)));
}

.theme-item-electric .site-header .brand-accent,
.theme-item-electric .site-header .main-nav a.active,
.theme-item-electric .site-mobile-menu a.active{
    color:var(--sh-teal)!important;
}

.theme-item-electric .site-header .main-nav a.active::after,
.theme-item-electric .site-mobile-menu a.active::before{
    background:var(--sh-teal)!important;
}

.theme-item-electric .site-header .join-btn,
.theme-item-electric .site-mobile-menu .site-mobile-build{
    border-color:var(--sh-cta)!important;
    background:var(--sh-cta)!important;
    color:var(--theme-ink)!important;
}


/* Shared header V1.5 — auth + create-battle scopes */
.theme-account-electric .site-header,
.theme-create-battle-electric .site-header{
    --sh-teal:var(--theme-header-accent,var(--theme-page-accent,var(--theme-teal)));
    --sh-cta:var(--theme-header-cta,var(--theme-page-accent,var(--theme-pink)));
}

.theme-account-electric .site-header .brand-accent,
.theme-account-electric .site-header .main-nav a.active,
.theme-account-electric .site-mobile-menu a.active,
.theme-create-battle-electric .site-header .brand-accent,
.theme-create-battle-electric .site-header .main-nav a.active,
.theme-create-battle-electric .site-mobile-menu a.active{
    color:var(--sh-teal)!important;
}

.theme-account-electric .site-header .main-nav a.active::after,
.theme-account-electric .site-mobile-menu a.active::before,
.theme-create-battle-electric .site-header .main-nav a.active::after,
.theme-create-battle-electric .site-mobile-menu a.active::before{
    background:var(--sh-teal)!important;
}

.theme-account-electric .site-header .join-btn,
.theme-account-electric .site-mobile-menu .site-mobile-build,
.theme-create-battle-electric .site-header .join-btn,
.theme-create-battle-electric .site-mobile-menu .site-mobile-build{
    border-color:var(--sh-cta)!important;
    background:var(--sh-cta)!important;
    color:var(--theme-ink)!important;
}


/* ================================================================
   BattleRanker shared header — Theme Sync V1
   Ensure all current page scopes obey their page accent.
   ================================================================ */
.theme-home-electric .site-header,
.theme-ranking-electric .site-header,
.theme-battle-arena .site-header,
.theme-item-electric .site-header,
.theme-account-electric .site-header,
.theme-create-battle-electric .site-header{
    --sh-teal:var(--theme-header-accent,var(--theme-page-accent,var(--theme-teal)));
    --sh-cta:var(--theme-header-cta,var(--theme-page-accent,var(--theme-pink)));
}

.theme-home-electric .site-header .brand-accent,
.theme-home-electric .site-header .main-nav a.active,
.theme-home-electric .site-mobile-menu a.active{
    color:var(--theme-page-accent)!important;
}

.theme-home-electric .site-header .main-nav a.active::after,
.theme-home-electric .site-mobile-menu a.active::before{
    background:var(--theme-page-accent)!important;
}

.theme-home-electric .site-header .join-btn,
.theme-home-electric .site-mobile-menu .site-mobile-build{
    border-color:var(--theme-page-accent)!important;
    background:var(--theme-page-accent)!important;
    color:var(--theme-ink)!important;
}



/* Shared header V1.6 — builder + account page scopes */
.theme-builder-electric .site-header,
.theme-account-electric .site-header{
    --sh-teal:var(--theme-header-accent,var(--theme-page-accent,var(--theme-teal)));
    --sh-cta:var(--theme-header-cta,var(--theme-page-accent,var(--theme-pink)));
}

.theme-builder-electric .site-header .brand-accent,
.theme-builder-electric .site-header .main-nav a.active,
.theme-builder-electric .site-mobile-menu a.active,
.theme-account-electric .site-header .brand-accent,
.theme-account-electric .site-header .main-nav a.active,
.theme-account-electric .site-mobile-menu a.active{
    color:var(--sh-teal)!important;
}

.theme-builder-electric .site-header .main-nav a.active::after,
.theme-builder-electric .site-mobile-menu a.active::before,
.theme-account-electric .site-header .main-nav a.active::after,
.theme-account-electric .site-mobile-menu a.active::before{
    background:var(--sh-teal)!important;
}

.theme-builder-electric .site-header .join-btn,
.theme-builder-electric .site-mobile-menu .site-mobile-build,
.theme-account-electric .site-header .join-btn,
.theme-account-electric .site-mobile-menu .site-mobile-build{
    border-color:var(--sh-cta)!important;
    background:var(--sh-cta)!important;
    color:var(--theme-ink)!important;
}


/* ================================================================
   Shared Header V2 — self-contained shell
   Do not rely on a page stylesheet to define .site-shell.
   This keeps header alignment identical on every route.
   ================================================================ */
.site-header .header-inner{
    width:min(1400px,calc(100% - 44px));
    margin-left:auto;
    margin-right:auto;
}

@media(max-width:720px){
    .site-header .header-inner{
        width:min(100% - 24px,1400px);
    }
}


/* ================================================================
   BattleRanker Shared Header V3 — CANONICAL HEADER LOCK
   One header identity on every public page. Page theme accent colours
   must not recolour or resize the global header.
   ================================================================ */
.site-header{
    --sh-bg:#090d20!important;
    --sh-bg-2:#11162b!important;
    --sh-line:#29314f!important;
    --sh-text:#ffffff!important;
    --sh-muted:#858ca7!important;
    --sh-teal:#e7ff00!important;
    --sh-pink:#ff3f91!important;
    --sh-purple:#6b3cff!important;
    background:#090d20!important;
    border-bottom:1px solid #29314f!important;
    color:#fff!important;
    box-shadow:0 8px 24px rgba(0,0,0,.16)!important;
}

.site-header .header-inner{
    width:min(1400px,calc(100% - 44px))!important;
    min-height:68px!important;
    margin-left:auto!important;
    margin-right:auto!important;
    display:flex!important;
    align-items:center!important;
    gap:26px!important;
}

.site-header .brand{
    flex:0 0 auto!important;
    min-width:230px!important;
    display:flex!important;
    flex-direction:column!important;
    justify-content:center!important;
    color:#fff!important;
    text-decoration:none!important;
    line-height:1!important;
    transform:translateY(3px)!important;
}

.site-header .brand-main{
    display:flex!important;
    align-items:center!important;
    gap:7px!important;
    font-family:"Arial Narrow","Segoe UI",Arial,sans-serif!important;
    font-size:25px!important;
    line-height:.9!important;
    font-weight:950!important;
    font-style:italic!important;
    letter-spacing:-1.2px!important;
    white-space:nowrap!important;
}

.site-header .brand-word{display:inline-block!important}
.site-header .brand-accent{color:#e7ff00!important}

.site-header .brand-logo-bolt{
    display:inline-flex!important;
    width:20px!important;
    height:28px!important;
    flex:0 0 20px!important;
    align-items:center!important;
    justify-content:center!important;
    transform:translateY(-1px) skewX(-5deg)!important;
    filter:drop-shadow(0 0 6px rgba(255,139,44,.28))!important;
}
.site-header .brand-logo-bolt svg{
    display:block!important;
    width:100%!important;
    height:100%!important;
    overflow:visible!important;
}
.site-header .brand-logo-bolt path{fill:#ff8b2c!important}

.site-header .brand-tagline{
    display:block!important;
    margin-top:2px!important;
    margin-left:27px!important;
    color:#858ca7!important;
    font-size:8px!important;
    line-height:1!important;
    font-weight:700!important;
    letter-spacing:.08px!important;
}

.site-header .main-nav{
    margin-left:auto!important;
    display:flex!important;
    align-items:center!important;
    gap:4px!important;
}
.site-header .main-nav a{
    min-height:40px!important;
    padding:0 13px!important;
    border-radius:7px!important;
    color:#d4d8e5!important;
    background:transparent!important;
    font-size:10px!important;
    font-weight:950!important;
}
.site-header .main-nav a:hover{color:#fff!important;background:#151a35!important}
.site-header .main-nav a.active{color:#e7ff00!important;background:rgba(255,255,255,.055)!important}
.site-header .main-nav a.active::after{background:#e7ff00!important}

.site-header .login-link{
    min-height:38px!important;
    padding:0 9px!important;
    color:#c7cada!important;
    font-size:9px!important;
    font-weight:900!important;
}
.site-header .login-link:hover{color:#fff!important}

.site-header .join-btn{
    min-height:40px!important;
    margin-left:4px!important;
    padding:0 14px!important;
    border:1px solid #ff3f91!important;
    border-radius:7px!important;
    background:#ff3f91!important;
    color:#fff!important;
    font-size:9px!important;
    font-weight:950!important;
    box-shadow:3px 3px 0 #060815!important;
}

.site-mobile-menu{
    background:#090e22!important;
    border-top:1px solid #2e3554!important;
    border-bottom:3px solid #e7ff00!important;
}
.site-mobile-menu a.active{color:#e7ff00!important}
.site-mobile-menu a.active::before{background:#e7ff00!important}
.site-mobile-menu .site-mobile-build{
    border-color:#ff3f91!important;
    background:#ff3f91!important;
    color:#fff!important;
}

@media(max-width:1050px){
    .site-header .header-inner{gap:15px!important}
    .site-header .brand{min-width:205px!important}
    .site-header .brand-main{font-size:22px!important;gap:6px!important}
    .site-header .brand-logo-bolt{width:18px!important;height:25px!important;flex-basis:18px!important}
    .site-header .brand-tagline{margin-left:24px!important}
    .site-header .main-nav a{padding-left:9px!important;padding-right:9px!important;font-size:9px!important}
}

@media(max-width:760px){
    .site-header .header-inner{
        width:min(100% - 24px,1400px)!important;
        min-height:56px!important;
        padding-top:5px!important;
        padding-bottom:5px!important;
    }
    .site-header .brand{min-width:0!important;transform:translateY(2px)!important}
    .site-header .brand-main{font-size:23px!important;gap:6px!important}
    .site-header .brand-logo-bolt{width:18px!important;height:26px!important;flex-basis:18px!important}
    .site-header .brand-tagline{margin-top:2px!important;margin-left:24px!important;font-size:7px!important}
    .site-header .main-nav,.site-header .header-actions{display:none!important}
    .site-menu-toggle{display:flex!important}
}

@media(max-width:380px){
    .site-header .brand-main{font-size:21px!important}
    .site-header .brand-logo-bolt{width:17px!important;height:24px!important;flex-basis:17px!important}
}

/* ================================================================
   BattleRanker Shared Header V4 — LOGO GEOMETRY LOCK
   Unique brh-* classes keep page CSS from changing the logo spacing.
   The tagline is positioned explicitly, so every page renders it at
   exactly the same distance beneath the logo.
   ================================================================ */
.site-header a.brand{
    position:relative!important;
    width:230px!important;
    min-width:230px!important;
    height:42px!important;
    min-height:42px!important;
    margin:0!important;
    padding:0!important;
    display:block!important;
    line-height:normal!important;
    transform:none!important;
    overflow:visible!important;
}

.site-header .brh-logo-line{
    position:absolute!important;
    left:0!important;
    top:1px!important;
    height:28px!important;
    margin:0!important;
    padding:0!important;
    display:flex!important;
    align-items:center!important;
    gap:7px!important;
    white-space:nowrap!important;
    line-height:1!important;
}

.site-header .brh-logo-bolt{
    width:20px!important;
    height:28px!important;
    flex:0 0 20px!important;
    margin:0!important;
    padding:0!important;
    display:block!important;
    line-height:1!important;
    transform:skewX(-5deg)!important;
    filter:drop-shadow(0 0 6px rgba(255,139,44,.28))!important;
}

.site-header .brh-logo-bolt svg{
    display:block!important;
    width:20px!important;
    height:28px!important;
    margin:0!important;
    padding:0!important;
    overflow:visible!important;
}

.site-header .brh-logo-bolt path{
    fill:#ff8b2c!important;
}

.site-header .brh-logo-word{
    display:block!important;
    margin:0!important;
    padding:0!important;
    font-family:"Arial Narrow","Segoe UI",Arial,sans-serif!important;
    font-size:25px!important;
    line-height:25px!important;
    font-weight:950!important;
    font-style:italic!important;
    letter-spacing:-1.2px!important;
    color:#fff!important;
    white-space:nowrap!important;
}

.site-header .brh-logo-accent{
    color:#e7ff00!important;
}

.site-header .brh-logo-tagline{
    position:absolute!important;
    left:27px!important;
    top:31px!important;
    display:block!important;
    margin:0!important;
    padding:0!important;
    font-family:Arial,sans-serif!important;
    font-size:8px!important;
    line-height:8px!important;
    font-weight:700!important;
    font-style:normal!important;
    letter-spacing:.08px!important;
    color:#858ca7!important;
    white-space:nowrap!important;
}

@media(max-width:1050px){
    .site-header a.brand{
        width:205px!important;
        min-width:205px!important;
        height:39px!important;
        min-height:39px!important;
    }
    .site-header .brh-logo-line{
        top:1px!important;
        height:25px!important;
        gap:6px!important;
    }
    .site-header .brh-logo-bolt,
    .site-header .brh-logo-bolt svg{
        width:18px!important;
        height:25px!important;
    }
    .site-header .brh-logo-bolt{flex-basis:18px!important}
    .site-header .brh-logo-word{
        font-size:22px!important;
        line-height:22px!important;
    }
    .site-header .brh-logo-tagline{
        left:24px!important;
        top:28px!important;
        font-size:7px!important;
        line-height:7px!important;
    }
}

@media(max-width:760px){
    .site-header a.brand{
        width:210px!important;
        min-width:0!important;
        height:40px!important;
        min-height:40px!important;
    }
    .site-header .brh-logo-line{
        top:1px!important;
        height:26px!important;
        gap:6px!important;
    }
    .site-header .brh-logo-bolt,
    .site-header .brh-logo-bolt svg{
        width:18px!important;
        height:26px!important;
    }
    .site-header .brh-logo-bolt{flex-basis:18px!important}
    .site-header .brh-logo-word{
        font-size:23px!important;
        line-height:23px!important;
    }
    .site-header .brh-logo-tagline{
        left:24px!important;
        top:29px!important;
        font-size:7px!important;
        line-height:7px!important;
    }
}

@media(max-width:380px){
    .site-header a.brand{
        width:195px!important;
    }
    .site-header .brh-logo-line{
        height:24px!important;
    }
    .site-header .brh-logo-bolt,
    .site-header .brh-logo-bolt svg{
        width:17px!important;
        height:24px!important;
    }
    .site-header .brh-logo-bolt{flex-basis:17px!important}
    .site-header .brh-logo-word{
        font-size:21px!important;
        line-height:21px!important;
    }
    .site-header .brh-logo-tagline{
        left:23px!important;
        top:27px!important;
    }
}
