﻿.nm-visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.sg-page {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 600px;
    margin: auto;
    padding: 30px 0;
}

.sg-game-area {
    position: relative;
    flex-shrink: 0;
    width: 600px;
    height: 800px;
    overflow: hidden;
    border: 1px solid rgba(150, 100, 220, .25);
    border-radius: 16px;
    background: linear-gradient(180deg, #063e37, #001d19);
    box-shadow: 0 8px 32px rgba(0, 0, 0, .4);
}

.sg-intro-screen {
    position: absolute;
    z-index: 20;
    inset: 0;
}

.sg-intro-bg {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nm-member-screen {
    position: absolute;
    z-index: 40;
    inset: 0;
    background: url("/Content/Landding/minigamenewmember/Group 7439.png") no-repeat center / cover;
}

.nm-member-check,
.nm-member-later {
    position: absolute;
    left: 50%;
    display: block;
    transform: translateX(-50%);
    transition: transform .2s ease;
}

.nm-member-check {
    top: 58%;
    width: 53.33%;
}

.nm-member-later {
    top: 78%;
    width: 26.67%;
}

.nm-member-check:hover,
.nm-member-later:hover {
    transform: translateX(-50%) scale(1.04);
}

.nm-member-check img,
.nm-member-later img {
    display: block;
    width: 100%;
    height: auto;
}

.sg-btn-play-now {
    position: absolute;
    z-index: 30;
    bottom: 10%;
    left: 50%;
    display: block;
    cursor: pointer;
    transform: translateX(-50%);
    border-radius: 40px;
    -webkit-tap-highlight-color: transparent;
}

.sg-play-screen {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    background: url("/Content/Landding/minigamenewmember/Group 7438.png") no-repeat center / cover;
}

.sg-gift-board {
    position: relative;
    z-index: 1;
    width: 80%;
    max-width: 384px;
    margin: 230px auto 0;
    padding: 12px 10px 14px;
    border: 2px solid rgba(255, 211, 91, .75);
    border-radius: 20px;
    background: rgba(0, 54, 47, .92);
    box-shadow: 0 0 30px rgba(255, 202, 65, .35);
}

.sg-board-title {
    margin-bottom: 8px;
    color: #fff;
    text-align: center;
}

.sg-board-title h2,
.sg-board-title p {
    margin: 0;
}

.sg-board-title h2 {
    font-size: 16px;
    font-weight: 800;
}

.sg-board-title p {
    font-size: 11px;
}

.sg-sparkle-l,
.sg-sparkle-r {
    display: inline-block;
    color: #ffd45b;
    animation: sg-sparkle 2s ease-in-out infinite;
}

@keyframes sg-sparkle {
    50% {
        opacity: .5;
        transform: scale(1.2);
    }
}

.sg-gift-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.sg-card {
    position: relative;
    cursor: pointer;
    perspective: 800px;
    aspect-ratio: 1;
}

.sg-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform .7s cubic-bezier(.4, 0, .2, 1);
    transform-style: preserve-3d;
}

.sg-card.sg-flipped .sg-card-inner {
    transform: rotateY(180deg);
}

.sg-card-front,
.sg-card-back {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 14px;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.sg-card-back {
    transform: rotateY(180deg);
}

.sg-card-front img,
.sg-card-back img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.sg-card.sg-disabled {
    cursor: not-allowed;
    pointer-events: none;
}

.sg-card.sg-disabled:not(.sg-selected) .sg-card-front {
    opacity: .5;
}

.sg-count {
    position: absolute;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #fff;
    font-size: 48px;
    font-weight: 900;
    opacity: 0;
    border-radius: 14px;
    background: rgba(0, 0, 0, .7);
}

.sg-zoom {
    animation: sg-zoom-fade 1s ease forwards;
}

@keyframes sg-zoom-fade {
    0% {
        opacity: 0;
        transform: scale(.2);
    }

    50% {
        opacity: 1;
        transform: scale(1.4);
    }

    100% {
        opacity: 0;
        transform: scale(1);
    }
}

.sg-the-le {
    position: absolute;
    z-index: 30;
    bottom: 6%;
    left: 50%;
    display: block;
    transform: translateX(-50%);
    transition: transform .3s ease;
}

.sg-the-le:hover {
    transform: translateX(-50%) scale(1.08);
}

.sg-the-le img {
    display: block;
    width: auto;
    filter: drop-shadow(0 3px 8px rgba(0, 0, 0, .3));
}

.sg-swal-popup {
    color: #fff !important;
    border: 2px solid rgba(255, 211, 91, .3) !important;
    border-radius: 16px !important;
    background: linear-gradient(180deg, #075249, #002e28) !important;
}

.sg-swal-popup .swal2-title {
    color: #fff !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    text-align: center !important;
}

.sg-swal-popup .swal2-html-container {
    color: rgba(255, 255, 255, .85) !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    text-align: center !important;
    margin-top: 10px !important;
}

.sg-swal-popup .swal2-actions {
    margin-top: 20px !important;
    gap: 12px !important;
}

.sg-swal-btn {
    padding: 10px 30px !important;
    border: 0 !important;
    border-radius: 10px !important;
    background: linear-gradient(135deg, #b47b00, #e5ad24) !important;
    font-weight: 700 !important;
    margin: 0 !important;
}

.sg-swal-btn-cancel {
    padding: 10px 30px !important;
    border: 0 !important;
    border-radius: 10px !important;
    background: #6c757d !important;
    color: #fff !important;
    font-weight: 700 !important;
    margin: 0 !important;
}

.nm-game button {
    font: inherit;
}

.nm-play-now,
.nm-rules,
.nm-game .sg-card {
    padding: 0;
    border: 0;
    background-color: transparent;
}

.nm-play-now img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.nm-play-now:focus-visible,
.nm-rules:focus-visible,
.nm-member-check:focus-visible,
.nm-member-later:focus-visible,
.nm-game .sg-card:focus-visible,
.nm-win-result a:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 4px;
}

.nm-game .sg-card:disabled {
    cursor: wait;
}

.nm-game .sg-card-inner {
    display: block;
}

.nm-game .sg-play-screen[hidden] {
    display: none;
}

.nm-state-panel {
    position: absolute;
    z-index: 2;
    inset: 50% auto auto 50%;
    width: min(84%, 420px);
    padding: 28px 20px;
    color: #fff;
    text-align: center;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(190, 130, 255, .75);
    border-radius: 18px;
    background: rgba(20, 8, 42, .92);
    box-shadow: 0 0 30px rgba(160, 60, 240, .45);
}

.nm-state-panel h2,
.nm-state-panel p {
    margin: 0;
}

.nm-state-panel p {
    margin-top: 10px;
}

.nm-voucher-title {
    position: absolute;
    inset-inline: 6px;
    bottom: 5px;
    padding: 3px 5px;
    overflow: hidden;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
    border-radius: 6px;
    background: rgba(0, 0, 0, .68);
}

.nm-win-result {
    position: absolute;
    z-index: 40;
    inset: 0;
    overflow: hidden;
    color: #fff;
    text-align: center;
    background: url("/Content/Landding/minigamenewmember/Group 7437.png") no-repeat center / cover;
}

.nm-win-content {
    position: absolute;
    top: 30.5%;
    left: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.nm-win-label {
    margin: 0 0 2.25% !important;
    color: #fff;
    font-size: clamp(12px, 2.7vw, 18px);
    font-weight: 700;
}

.nm-win-voucher {
    position: relative;
    width: 61.67%;
    aspect-ratio: 370 / 229;
}

.nm-win-voucher > img {
    display: block;
    width: 100%;
    height: 100%;
}

.nm-win-voucher-copy {
    position: absolute;
    inset: 10% 10%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #073b32;
    text-transform: uppercase;
}

.nm-win-voucher-label {
    font-size: clamp(13px, 3.2vw, 20px);
    font-weight: 800;
    line-height: 1;
}

.nm-win-voucher-copy strong {
    margin-top: 2px;
    font-size: clamp(42px, 12vw, 78px);
    line-height: .95;
    letter-spacing: -3px;
}

.nm-win-voucher-copy strong small {
    font-size: 58%;
    letter-spacing: -1px;
}

.nm-win-voucher-max {
    width: 90%;
    margin-top: 8px;
    padding-top: 7px;
    font-size: clamp(12px, 3vw, 18px);
    font-weight: 800;
    line-height: 1;
    border-top: 2px dashed rgba(7, 59, 50, .7);
}

.nm-win-saved {
    margin: 3.9% 0 0 !important;
    color: #fff;
    font-size: clamp(12px, 2.7vw, 18px);
    font-weight: 700;
    line-height: 1.35;
}

.nm-win-action {
    display: block;
    width: 40%;
    margin-top: 4.9%;
}

.nm-win-action img {
    display: block;
    width: 100%;
    height: auto;
}

@media (prefers-reduced-motion: reduce) {
    .nm-game *,
    .nm-game *::before,
    .nm-game *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

@media (max-width: 768px) {
    .sg-page {
        padding: 10px 0;
    }

    .sg-game-area {
        width: 100%;
        max-width: 600px;
        height: auto;
        border-radius: 12px;
        aspect-ratio: 600 / 800;
    }

    .sg-gift-board {
        width: 70%;
        margin: 35% auto 0;
        padding: 10px 8px 12px;
    }

    .sg-board-title h2 {
        font-size: 14px;
    }

    .sg-gift-grid {
        gap: 6px;
    }

    .sg-count {
        font-size: 32px;
    }

    .sg-the-le img {
        height: 32px;
    }
}

@media (max-width: 380px) {
    .sg-gift-board {
        width: 84%;
        padding: 8px 6px 10px;
    }

    .sg-board-title h2 {
        font-size: 12px;
    }

    .sg-gift-grid {
        gap: 4px;
    }

    .sg-the-le img {
        height: 28px;
    }
}
