/* ===== GLOBAL THEME (once in main css top) ===== */
:root {
    --mcw-primary: #1f2f9b;
    --mcw-primary-light: #4b45c7;
    --mcw-primary-dark: #141f6b;

    --mcw-accent: #ff7a00;

    --mcw-bg-main: #0e0e0e;
    --mcw-bg-card: #161616;
    --mcw-bg-soft: #222;

    --mcw-text: #ffffff;
    --mcw-text-dark: #000;
}

/* hide on pc + tablet */
.mcw-header-wrap {
    display: none;
}

#mcw-notice-wraps {
    background: black !important;
    margin-left: 6px;
    margin-right: 6px;
    border-radius: 7px;
    padding: 2px 6px;
}

/* ===== MOBILE HEADER ===== */
@media (max-width: 768px) {

    * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }

    body {
        font-family: 'Poppins', sans-serif;
        background: var(--mcw-bg-main);
        color: var(--mcw-text);
        padding-bottom: 50px;
    }

    .mcw-header-wrap {
        display: block;
        position: sticky;
        top: 0;
        z-index: 9999;
        width: 100%;
    }

    .mcw-appbar {
        width: 100%;
        min-height: 46px;
        background: var(--mcw-appbar-bg, red);
        color: var(--mcw-appbar-text, black);
        display: grid;
        grid-template-columns: 28px minmax(0, 1fr) auto;
        align-items: center;
        gap: 8px;
        padding: 6px max(10px, env(safe-area-inset-right)) 6px max(10px, env(safe-area-inset-left));
        border-bottom: 1px solid rgba(255, 255, 255, .12);
    }

    .mcw-close {
        width: 24px;
        height: 24px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        /* background: rgba(255, 255, 255, .12); */
        color: var(--mcw-appbar-icon, black);
        font-size: 18px;
        line-height: 1;
        cursor: pointer;
        font-weight: 700;
    }

    .mcw-app-text {
        min-width: 0;
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 12px;
        /* font-weight: 700; */
        line-height: 1.15;
        color: var(--mcw-appbar-text, black);
    }

    .mcw-app-icon {
        width: 32px;
        height: 32px;
        flex: 0 0 32px;
        border-radius: 7px;
        background: #fff;
        overflow: hidden;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .mcw-app-icon-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    .mcw-app-icon-fallback {
        color: var(--mcw-appbar-icon, #111);
        font-size: 12px;
        font-weight: 800;
    }

    .mcw-download-btn {
        min-width: 86px;
        height: 32px;
        padding: 0 12px;
        border: 0;
        border-radius: 3px;
        background: var(--mcw-appbar-btn-bg, yellow);
        color: var(--mcw-appbar-btn-text, #111);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        font-size: 12px;
        font-weight: 400;
        white-space: nowrap;
        box-shadow: 0 4px 10px rgba(0, 0, 0, .22);
    }

    .mcw-download-btn:active {
        transform: scale(.97);
    }

    /* ===== Main Header ===== */
    .mcw-header {
        width: 100%;
        height: 52px;

        background: linear-gradient(to bottom,
                var(--mcw-primary-light),
                var(--mcw-primary));

        display: grid;
        grid-template-columns: 112px minmax(0, 1fr) 112px;
        align-items: center;

        padding-left: max(12px, env(safe-area-inset-left));
        padding-right: max(12px, env(safe-area-inset-right));

        box-shadow: 0 6px 16px rgba(0, 0, 0, .35);
    }

    .mcw-menu {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        min-width: 0;
    }

    .mcw-header>a {
        min-width: 0;
        display: flex;
        justify-content: center;
        text-decoration: none;
    }

    .mcw-menu i {
        color: black;
        font-size: 20px;
    }

    .mcw-logo {
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .mcw-logo img {
        max-height: 100%;
        max-width: 92px;
        width: auto;
        height: auto;
        object-fit: contain;
        display: block;
    }

    .mcw-right {
        flex: 0 0 112px;
        display: flex;
        justify-content: flex-end;
        align-items: center;
        min-width: 0;
    }

    .mcw-header-balance {
        min-width: 96px;
        max-width: 112px;
        min-height: 34px;
        padding: 4px 8px;
        border: 1px solid rgba(255, 255, 255, .28);
        border-radius: 6px;
        background: black !important;
        color: #fff;
        text-decoration: none;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: flex-end;
        line-height: 1.1;
        overflow: hidden;
    }

    .mcw-header-balance span {
        font-size: 10px;
        font-weight: 500;
        opacity: .82;
        white-space: nowrap;
    }

    .mcw-header-balance strong {
        display: block;
        max-width: 100%;
        font-size: 12px;
        font-weight: 700;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* ===== SIDEBAR ===== */

    .mcw-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, .55);
        opacity: 0;
        visibility: hidden;
        transition: .25s ease;
        z-index: 9998;
        backdrop-filter: blur(2px);
    }

    .mcw-overlay.show {
        opacity: 1;
        visibility: visible;
    }

    .mcw-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: 53%;
        max-width: 320px;

        background: var(--mcw-bg-card);
        z-index: 9999;

        transform: translateX(-100%);
        transition: transform .30s cubic-bezier(.4, 0, .2, 1);

        display: flex;
        flex-direction: column;
        overflow-y: auto;
        will-change: transform;
    }

    .mcw-sidebar.show {
        transform: translateX(0);
    }

    /* sidebar top */
    .mcw-side-top {
        background: var(--mcw-bg-soft);
        padding: 5px 16px;
        border-bottom: 1px solid #2a2a2a;
    }

    .mcw-side-top img {
        height: 34px;
    }

    /* menu list */
    .mcw-menu-list {
        list-style: none;
        padding: 10px 0;
        background: black !important;
    }

    .mcw-menu-list li {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 10px 15px;
        font-size: 12px;
        color: white;
        font-weight: 500;
        border: 1px solid white;
        background: transparent;
        transition: .15s;
    }

    .mcw-menu-list li a {
        display: flex;
        align-items: center;
        gap: 14px;
        width: 100%;
        color: inherit;
        text-decoration: none;
    }

    .mcw-menu-list li i {
        width: 17px;
        text-align: center;
        font-size: 14px;
        color: yellow;
    }

    .mcw-menu-list li:active {
        background: #202020;
        transform: scale(.98);
    }

    /* rank badge */
    .mcw-rank .new {
        background: #1bbf3a;
        color: #fff;
        font-size: 11px;
        padding: 2px 6px;
        border-radius: 10px;
        margin-left: 6px;
    }

    /* language flag */
    .mcw-lang .flag {
        width: 18px;
        height: 18px;
        border-radius: 50%;
        background: green;
        border: 3px solid red;
        display: inline-block;
    }

}
