/* ============================================================
   Kingdom Championships – auth pages (login / register) + the
   top navigation bar, styled to match dynamitemc.net:
   gold background, thick ink borders, hard offset shadows,
   red pill buttons, Anton/Teko display type.
   Loads alongside style.css (uses its :root palette).
   ============================================================ */

/* ---- Top navigation bar (bracket page) ---- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 22px;
    background: var(--ink);
    color: var(--white);
    border-bottom: 4px solid var(--gold);
    box-shadow: 0 4px 0 var(--red);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.brand-badge {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--red);
    color: var(--white);
    border: 3px solid var(--gold);
    font-family: var(--font-hero);
    font-size: 18px;
    letter-spacing: 1px;
    box-shadow: 3px 4px 0 rgba(0, 0, 0, 0.35);
}

.brand-name {
    font-family: var(--font-display);
    font-size: 20px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--gold);
}
.brand-name b { color: var(--white); font-weight: 400; }

/* ---- Logged-in user pill (inside topbar) ---- */
.user-bar {
    display: none;            /* revealed by auth-guard.js */
    align-items: center;
    gap: 10px;
    background: var(--white);
    color: var(--ink);
    border: 3px solid var(--gold);
    border-radius: 999px;
    padding: 4px 5px 4px 10px;
    font-family: var(--font-ui);
    font-size: 15px;
    letter-spacing: 0.5px;
}
.user-bar .user-meta { white-space: nowrap; text-transform: uppercase; }
.user-bar strong { color: var(--red); font-weight: 600; }

.nav-avatar {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: var(--cream);
    border: 2px solid var(--ink);
    object-fit: cover;
    image-rendering: pixelated;
}

.user-bar button {
    background: var(--red);
    border: 2px solid var(--ink);
    color: var(--white);
    border-radius: 999px;
    padding: 6px 14px;
    font-family: var(--font-ui);
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 0.15s var(--ease-out, ease), box-shadow 0.15s;
    box-shadow: 2px 3px 0 var(--ink);
}
.user-bar button:hover { transform: translateY(-2px); box-shadow: 3px 5px 0 var(--ink); }

/* ---- Language flag switcher ---- */
.kc-lang {
    display: inline-flex;
    gap: 6px;
    align-items: center;
}
.kc-flag {
    width: 38px;
    height: 30px;
    padding: 0;
    display: grid;
    place-items: center;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    background: var(--white);
    border: 2px solid var(--ink);
    border-radius: 8px;
    box-shadow: 2px 3px 0 var(--ink);
    filter: grayscale(0.85) opacity(0.7);
    transition: transform 0.12s var(--ease-out, ease), filter 0.12s;
}
.kc-flag:hover { transform: translateY(-2px); filter: none; }
.kc-flag.active {
    filter: none;
    border-color: var(--red);
    box-shadow: 2px 3px 0 var(--red);
}
/* Flags sitting on the dark top bar get a gold ring instead. */
.topbar .kc-flag { box-shadow: 2px 3px 0 rgba(0,0,0,0.4); }
.topbar .kc-flag.active { border-color: var(--gold); box-shadow: 2px 3px 0 var(--gold); }

/* ---- Hero kicker ---- */
.hero-kicker {
    display: inline-block;
    margin: 0 0 10px;
    color: var(--white);
    background: var(--red);
    border: 3px solid var(--ink);
    box-shadow: 3px 4px 0 var(--ink);
    border-radius: 999px;
    padding: 5px 16px;
    font-family: var(--font-ui);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 4px;
    text-transform: uppercase;
}

/* ============================================================
   Auth pages (login / register)
   ============================================================ */

.auth-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
    z-index: 1;
}

.auth-card {
    width: 100%;
    max-width: 410px;
    background: var(--white);
    border: 4px solid var(--ink);
    border-radius: var(--radius-lg);
    padding: 30px 28px 26px;
    box-shadow: var(--hard);
    position: relative;
    overflow: hidden;
}
/* Red strip along the top edge of the card. */
.auth-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 8px;
    background: var(--red);
    border-bottom: 3px solid var(--ink);
}

.auth-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    margin: 8px 0 14px;
}
.auth-brand .brand-name { color: var(--ink); font-size: 19px; }
.auth-brand .brand-name b { color: var(--red); }

.auth-card .sub {
    margin: 0 0 22px;
    text-align: center;
    color: var(--ink);
    font-family: var(--font-ui);
    font-size: 18px;
    letter-spacing: 3px;
    text-transform: uppercase;
    opacity: 0.7;
}

.auth-field { margin-bottom: 15px; }

.auth-field label {
    display: block;
    font-family: var(--font-ui);
    font-size: 15px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--ink);
    margin-bottom: 6px;
}

.auth-field input {
    width: 100%;
    padding: 12px 13px;
    background: var(--cream);
    border: 3px solid var(--ink);
    border-radius: 12px;
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 15px;
    outline: none;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.auth-field input::placeholder { color: rgba(26, 10, 8, 0.4); }
.auth-field input:focus {
    border-color: var(--red);
    box-shadow: 3px 4px 0 var(--ink);
}

/* Username row: input + live player head preview. */
.field-avatar {
    display: flex;
    align-items: center;
    gap: 12px;
}
.field-avatar input { flex: 1; }

.avatar-box {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    border-radius: 12px;
    background: var(--cream) center/70% no-repeat;
    border: 3px solid var(--ink);
    object-fit: cover;
    image-rendering: pixelated;
    box-shadow: 3px 4px 0 var(--ink);
    transition: transform 0.2s var(--ease-bounce, ease);
}
.avatar-box.has-avatar { transform: rotate(-2deg); }

.auth-btn {
    width: 100%;
    padding: 13px;
    margin-top: 10px;
    background: var(--red);
    color: var(--white);
    border: 4px solid var(--ink);
    border-radius: 999px;
    font-family: var(--font-ui);
    font-weight: 600;
    font-size: 19px;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 0.18s var(--ease-out, ease), box-shadow 0.18s var(--ease-out, ease);
    box-shadow: 4px 6px 0 var(--ink);
}
.auth-btn:hover { transform: translateY(-3px); box-shadow: 6px 9px 0 var(--ink); }
.auth-btn:active { transform: translateY(0); box-shadow: 3px 4px 0 var(--ink); }
.auth-btn:disabled { opacity: 0.55; cursor: default; transform: none; box-shadow: 4px 6px 0 var(--ink); }

.auth-alt {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
    color: var(--ink);
}
.auth-alt a { color: var(--red); text-decoration: none; font-weight: 700; }
.auth-alt a:hover { text-decoration: underline; }

.auth-msg {
    margin: 0 0 16px;
    padding: 11px 13px;
    border: 3px solid var(--ink);
    border-radius: 12px;
    font-size: 13.5px;
    line-height: 1.4;
    display: none;
    box-shadow: 3px 4px 0 var(--ink);
}
.auth-msg.error {
    display: block;
    background: var(--red);
    color: var(--white);
}
.auth-msg.info {
    display: block;
    background: var(--gold);
    color: var(--ink);
}

.auth-hint {
    margin-top: 14px;
    text-align: center;
    font-size: 12.5px;
    color: rgba(26, 10, 8, 0.7);
    line-height: 1.55;
}
.auth-hint strong { color: var(--ink); background: var(--gold); padding: 1px 6px; border-radius: 6px; }
