html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

:root {
  --mg-primary-color: #0d6efd;
}

body {
    min-height: 100vh;
    background-color: #111 !important;
    background-repeat: no-repeat;
    background-size:cover;
}

.mg-catch-ghost {
    position: relative;
    width: 100%;
    max-width: 580px;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0 auto;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background-image: url('catch-ghost.jpg');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    overflow: hidden;
}

.mg-game-container {
    width: 100%;
    max-width: 680px;
    text-align: center;
}

.mg-game-logo {
    display: block;
    max-width: 180px;
    max-height: 80px;
    margin: 0 auto 24px;
    object-fit: contain;
}

.mg-game-start {
    padding: 10px;
}

.mg-game-start h1 {
    margin: 0 0 14px;
    font-size: clamp(30px, 7vw, 52px);
    line-height: 1.1;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.mg-game-start p {
    max-width: 560px;
    margin: 0 auto 28px;
    color: rgba(255,255,255,.82);
    font-size: clamp(16px, 4vw, 20px);
    line-height: 1.5;
}

.mg-game-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 50px;
    border: 0;
    border-radius: 14px;
    padding: 12px 22px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    touch-action: manipulation;
    transition: transform .15s ease, opacity .15s ease, background .15s ease, box-shadow .15s ease;
}

.mg-game-button:active {
    transform: scale(.97);
}

.mg-game-button:disabled {
    opacity: .35;
    cursor: not-allowed;
    transform: none;
}

.mg-game-button-primary {
    min-width: 220px;
    min-height: 56px;
    background: var(--mg-primary-color);
    color: #fff;
    font-size: 18px;
    box-shadow: 0 10px 28px rgba(0,0,0,.22);
}

.mg-game-button-primary:hover {
    opacity: .92;
}

.mg-game-button-secondary {
    min-width: 125px;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.2);
    color: #fff;
}

.mg-game-button-secondary:hover:not(:disabled) {
    background: rgba(255,255,255,.2);
}

.mg-button-icon {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex: 0 0 auto;
}

.mg-game-secondary-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
}

.mg-plays-remaining {
    min-height: 20px;
    margin-top: 12px;
    color: rgba(255,255,255,.65);
    font-size: 13px;
}

.mg-sound-toggle {
    position: absolute;
    top: max(16px, env(safe-area-inset-top));
    right: max(16px, env(safe-area-inset-right));
    z-index: 20;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 50%;
    background: rgba(0,0,0,.3);
    color: #fff;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    cursor: pointer;
    touch-action: manipulation;
}

.mg-sound-toggle:hover {
    background: rgba(255,255,255,.12);
}

.mg-sound-icon {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.mg-sound-icon-off {
    display: none;
}

.mg-sound-toggle.is-muted .mg-sound-icon-on {
    display: none;
}

.mg-sound-toggle.is-muted .mg-sound-icon-off {
    display: block;
}

.mg-game-screen {
    width: 100%;
}

.mg-game-hud {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding: 11px 14px;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 14px;
    background: rgba(0,0,0,.28);
    color: #fff;
    font-size: 14px;
}

.mg-game-board {
    position: relative;
    width: 100%;
    height: min(68dvh, 560px);
    min-height: 360px;
    overflow: hidden;
    border-radius: 20px;
    background-color: rgba(255, 255, 255, 0.05);
    /*background-image: var(--mg-background-image);*/
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    box-shadow: 0 15px 50px rgba(0,0,0,.3);
}

.mg-ghost {
    position: absolute;
    left: 0;
    top: 0;
    padding: 0;
    border: 0;
    background: transparent;
    line-height: 1;
    cursor: pointer;
    user-select: none;
    touch-action: manipulation;
    will-change: left, top, transform;
    z-index: 2;
}

.mg-game-result {
    padding: 10px;
}

.mg-result-icon {
    margin-bottom: 10px;
    font-size: 48px;
    line-height: 1;
}

.mg-game-result h2 {
    margin: 0 0 12px;
    font-size: clamp(30px, 8vw, 44px);
    line-height: 1.1;
}

.mg-result-score-label {
    margin: 0 0 4px;
    color: rgba(255,255,255,.72);
    font-size: 16px;
}

.mg-result-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 24px;
}

.mg-result-score strong {
    color: #fff;
    font-size: clamp(54px, 16vw, 82px);
    line-height: .95;
    font-weight: 800;
}

.mg-result-score span {
    margin-top: 5px;
    color: rgba(255,255,255,.65);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
}


.mg-reward-card{
    width:100%;
    max-width:500px;
    margin:0 auto 24px;
    padding:24px 22px 22px;
    box-sizing:border-box;
    border:1px solid rgba(255,255,255,.28);
    border-radius:20px;
    background:rgba(0,0,0,.32);
    backdrop-filter:blur(10px);
    -webkit-backdrop-filter:blur(10px);
    box-shadow:0 12px 35px rgba(0,0,0,.22);
    text-align:center;
}

.mg-reward-icon{
    width:58px;
    height:58px;
    display:flex;
    align-items:center;
    justify-content:center;
    margin:0 auto 10px;
    border-radius:50%;
    background:rgba(255,255,255,.12);
    font-size:32px;
}

.mg-reward-label{
    margin-bottom:6px;
    color:rgba(255,255,255,.68);
    font-size:12px;
    font-weight:700;
    letter-spacing:1.8px;
}

.mg-reward-name{
    color:#fff;
    font-size:25px;
    line-height:1.25;
    font-weight:800;
}

.mg-reward-description{
    margin-top:7px;
    color:rgba(255,255,255,.75);
    font-size:14px;
    line-height:1.45;
}

.mg-reward-value{
    margin-top:7px;
    color:#fff;
    font-size:14px;
    font-weight:600;
}

.mg-reward-status{
    margin:16px auto 0;
    width:max-content;
    max-width:100%;
    padding:6px 12px;
    border-radius:999px;
    background:rgba(255,193,7,.14);
    color:#ffd666;
    font-size:13px;
    font-weight:600;
}

.mg-reward-claim-button{
    width:min(240px,100%);
    min-height:52px;
    margin-top:18px;
}

.mg-reward-voucher{
    margin-top:18px;
    padding:14px 16px;
    border:1px dashed rgba(255,255,255,.35);
    border-radius:12px;
    background:rgba(255,255,255,.08);
}

.mg-reward-voucher-label{
    color:rgba(255,255,255,.6);
    font-size:11px;
    font-weight:700;
    letter-spacing:1.5px;
}

.mg-reward-voucher-code{
    margin-top:5px;
    color:#fff;
    font-size:20px;
    font-weight:800;
    letter-spacing:1.5px;
    word-break:break-all;
}

.mg-result-buttons {
    margin-top: 14px;
}

.mg-game-playing .mg-game-logo {
    display: none;
}

@media (max-width: 576px) {
    .mg-catch-ghost {
        padding: 16px;
    }

    .mg-game-logo {
        max-width: 150px;
        max-height: 65px;
        margin-bottom: 20px;
    }

    .mg-game-start h1 {
        font-size: clamp(28px, 8vw, 38px);
    }

    .mg-game-start p {
        margin-bottom: 24px;
        font-size: 16px;
    }

    .mg-game-button-primary {
        width: min(260px, 90vw);
    }

    .mg-game-secondary-buttons {
        gap: 8px;
    }

    .mg-game-button-secondary {
        min-width: 120px;
        padding-left: 14px;
        padding-right: 14px;
    }

    .mg-game-board {
        height: 66dvh;
        min-height: 340px;
        border-radius: 16px;
    }

    .mg-game-hud {
        padding: 10px 12px;
        font-size: 13px;
    }

    .mg-result-icon {
        font-size: 42px;
    }


    .mg-reward-card{
        padding:20px 16px 18px;
        border-radius:18px;
    }

    .mg-reward-name{
        font-size:22px;
    }

    .mg-reward-icon{
        width:52px;
        height:52px;
        font-size:29px;
    }

    .mg-reward-voucher-code{
        font-size:18px;
    }
}

@media (max-height: 700px) {
    .mg-game-logo {
        max-height: 55px;
        margin-bottom: 14px;
    }

    .mg-game-start p {
        margin-bottom: 18px;
    }

    .mg-game-button-primary {
        min-height: 50px;
    }
}


.mg-modal-open{overflow:hidden}
.mg-customer-modal{position:fixed;inset:0;z-index:9999;display:flex;align-items:center;justify-content:center;padding:20px}
.mg-customer-modal[hidden]{display:none}
.mg-customer-modal-overlay{position:absolute;inset:0;background:rgba(0,0,0,.65)}
.mg-customer-modal-dialog{position:relative;width:100%;max-width:440px;background:#fff;color:#222;border-radius:18px;padding:30px;box-shadow:0 20px 60px rgba(0,0,0,.3);z-index:1}
.mg-customer-modal-dialog h2{margin:0 40px 8px 0;font-size:24px}
.mg-customer-modal-description{margin:0 0 24px;color:#666}
.mg-customer-modal-close{position:absolute;top:12px;right:14px;border:0;background:transparent;font-size:30px;line-height:1;color:#777;cursor:pointer}
.mg-customer-field{margin-bottom:16px;display: flex; text-align:left;}
.mg-customer-field label{display:block;width: 180px;}
.mg-customer-field input{width:100%;box-sizing:border-box;padding:11px 13px;border:1px solid #ddd;border-radius:8px;font-size:16px;outline:none}
.mg-customer-field input:focus{border-color:var(--mg-primary-color);box-shadow:0 0 0 3px rgba(0,0,0,.06)}
.mg-customer-submit{width:100%;margin-top:4px;background: var(--bs-primary);color: var(--bs-white);}
@media(max-width:480px){.mg-customer-modal{padding:15px}.mg-customer-modal-dialog{padding:25px 20px;border-radius:15px}.mg-customer-modal-dialog h2{font-size:21px}}