/* MeritKing header – reference layout */
:root {
    --mk-bg: #091840;
    --mk-gold: #ebb058;
    --mk-yellow: #fdd835;
    --mk-red: #ca113d;
    --mk-row-main: 68px;
    --mk-row-sub: 34px;
}

body {
    padding-top: calc(var(--mk-row-main) + var(--mk-row-sub) + env(safe-area-inset-top)) !important;
}

#warningDomain {
    display: none !important;
}

.app-header {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    width: 100%;
    height: auto !important;
    min-height: 0 !important;
    background: var(--mk-bg) !important;
    padding-top: env(safe-area-inset-top);
}

.mk-head__inner {
    max-width: 1420px;
    margin: 0 auto;
    padding: 0 8px;
}

/* ── Main row: nav | 20.YIL | boss + auth ── */
.mk-head__row-main {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) auto minmax(0, 1fr);
    align-items: center;
    min-height: var(--mk-row-main);
    gap: 6px;
}

.mk-head__nav-left,
.mk-head__right {
    display: flex;
    align-items: center;
    min-width: 0;
}

.mk-head__nav-left {
    justify-content: flex-start;
    overflow: hidden;
}

.mk-head__right {
    justify-content: flex-end;
    gap: 4px;
    flex-wrap: nowrap;
}

.mk-head__nav-right {
    display: flex;
    align-items: center;
    min-width: 0;
    overflow: hidden;
}

.mk-head__nav-left ul,
.mk-head__nav-right ul {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    height: var(--mk-row-main);
}

.mk-head__hamburger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: var(--mk-row-main);
    padding: 0;
    margin-right: 2px;
    border: 0;
    background: transparent;
    color: #fff;
    cursor: pointer;
    flex-shrink: 0;
}

.mk-head__hamburger i {
    font-size: 20px;
    color: #fff !important;
}

.mk-head__nav-left a,
.mk-head__nav-right a {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: var(--mk-row-main);
    padding: 0 7px;
    color: #fff !important;
    font-family: 'Titillium Web', sans-serif;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none !important;
    white-space: nowrap;
    overflow: visible !important;
    text-overflow: clip !important;
}

.mk-head__nav-left a.active::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4px;
    background: var(--mk-gold);
    border-radius: 8px 8px 0 0;
}

.mk-head__nav-right a i {
    font-size: 13px;
    color: #fff !important;
}

.mk-head__brand {
    justify-self: center;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none !important;
    line-height: 1;
    flex-shrink: 0;
    padding: 2px 8px;
    height: calc(var(--mk-row-main) - 2px);
}

.mk-head__brand img {
    display: block;
    height: 100%;
    width: auto;
    max-width: min(210px, 30vw);
    object-fit: contain;
}

.mk-head__auth {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* ── Sub row: games | slogan | warning ── */
.mk-head__row-sub {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(220px, 30%);
    align-items: stretch;
    min-height: var(--mk-row-sub);
}

.mk-head__games {
    display: flex !important;
    align-items: center;
    overflow-x: auto;
    scrollbar-width: none;
    background: linear-gradient(180deg, #0a1b49 0%, #6b0f24 50%, var(--mk-red) 100%);
    padding: 0 6px;
    position: static !important;
    transform: none !important;
    border: 0 !important;
}

.mk-head__games::-webkit-scrollbar {
    display: none;
}

.mk-head__games ul {
    display: flex !important;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    position: static !important;
    transform: none !important;
    background: transparent !important;
    border-radius: 0 !important;
}

.mk-head__games a {
    display: inline-flex;
    align-items: center;
    color: #fff !important;
    font-family: 'Titillium Web', sans-serif;
    font-size: 8.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none !important;
    white-space: nowrap;
    padding: 6px 8px;
    height: auto !important;
}

.mk-head__games li + li a::before {
    content: '|';
    margin-right: 8px;
    color: rgba(255, 255, 255, 0.35);
    font-weight: 400;
}

.mk-head__slogan {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3px 18px 4px;
    background: linear-gradient(180deg, #0a1b49 0%, var(--mk-red) 100%);
    color: #fff;
    text-align: center;
    position: static !important;
    transform: none !important;
    width: auto !important;
    left: auto !important;
    top: auto !important;
    z-index: 1 !important;
    clip-path: polygon(6% 0, 100% 0, 94% 100%, 0 100%);
}

.mk-head__slogan h2 {
    margin: 0;
    font-family: 'Titillium Web', sans-serif;
    font-size: 9.5px;
    font-weight: 700;
    font-style: italic;
    line-height: 1.15;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.mk-head__warn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: var(--mk-yellow);
    padding: 0 10px;
    position: static !important;
    transform: none !important;
    width: auto !important;
    left: auto !important;
    top: auto !important;
    max-width: none !important;
    border-radius: 0 6px 6px 0;
}

.mk-head__warn span {
    color: #000;
    font-family: 'Titillium Web', sans-serif;
    font-size: 8.5px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
}

/* Kill legacy app.css header positioning */
@media (min-width: 1024px) {
    .app-header__slogan,
    .app-header__warning,
    .app-header__dropdown,
    .app-header__links {
        position: static !important;
        transform: none !important;
        height: auto !important;
    }

    .app-header__warning div,
    .app-header__dropdown ul {
        position: static !important;
        transform: none !important;
        left: auto !important;
        top: auto !important;
        width: auto !important;
        max-width: none !important;
        padding: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
    }
}

/* ── Auth / toggle ── */
.toggle-switcher > div {
    display: inline-block;
    height: 30px;
    position: relative;
    width: 56px;
}

.toggle-switcher input {
    cursor: pointer;
    height: 30px;
    left: 0;
    opacity: 0;
    position: absolute;
    top: 0;
    width: 56px;
    z-index: 1;
}

.toggle-switcher .icon {
    background: #fff;
    border-radius: 50px;
    inset: 0;
    position: absolute;
    transition: 0.3s;
}

.toggle-switcher .icon::after {
    background: var(--mk-bg);
    border-radius: 50%;
    bottom: 3px;
    content: '';
    height: 24px;
    left: 3px;
    position: absolute;
    transition: 0.3s;
    width: 24px;
}

.toggle-switcher input:checked + .icon::after {
    transform: translateX(26px);
}

.toggle-switcher .sun-icon {
    left: 8px;
    height: 14px;
    position: absolute;
    top: 7px;
    width: 14px;
}

.toggle-switcher .moon-icon {
    right: 8px;
    height: 14px;
    position: absolute;
    top: 7px;
    width: 14px;
}

.mk-head__guest,
.mk-head__user {
    display: flex;
    align-items: center;
    gap: 6px;
}

.mk-btn-login,
.mk-btn-register,
.mk-btn-deposit,
.mk-btn-profile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 30px;
    padding: 0 16px;
    border-radius: 999px;
    font-family: 'Titillium Web', sans-serif;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none !important;
    white-space: nowrap;
    border: 0;
    cursor: pointer;
}

.mk-btn-login {
    color: #fff !important;
    background: #0a1033;
    border: 1px solid rgba(255, 255, 255, 0.45);
}

.mk-btn-register {
    color: #fff !important;
    background: linear-gradient(90deg, #7b1128 0%, #b01835 50%, #d41f3f 100%);
}

.mk-btn-deposit {
    color: #fff !important;
    background: linear-gradient(90deg, #7b1128 0%, var(--mk-red) 100%);
}

.mk-btn-profile {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.mk-btn-register i,
.mk-btn-deposit i,
.mk-btn-profile i {
    color: #fff !important;
}

.app-header__wrapper,
.app-header__menu-toggle,
.app-header__logo {
    display: none !important;
}

@media (max-width: 1023px) {
    .mk-head__row-main {
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
    }

    .mk-head__nav-left {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .mk-head__brand {
        grid-column: 1;
        grid-row: 1;
        justify-self: start;
    }

    .mk-head__right {
        grid-column: 2;
        grid-row: 1;
    }

    .mk-head__nav-right {
        display: none;
    }

    .toggle-switcher {
        display: none;
    }

    .mk-head__brand img {
        max-width: min(165px, 44vw);
    }

    .mk-head__row-sub {
        grid-template-columns: 1fr;
    }

    .mk-btn-login,
    .mk-btn-register {
        padding: 0 11px;
        font-size: 10px;
    }
}

@media (max-width: 768px) {
    .mk-head__nav-left a {
        font-size: 9px;
        padding: 0 5px;
    }
}
