@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@400;500;600;700;800&display=swap");

.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgb(255 49 112 / 87%);
    background-size: cover;
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.popup-close {
    position: absolute;
    width: 6vw;
    max-width: 100px;
    height: auto;
    top: -0.2vw;
    right: -0.2vw;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 99;
    transform: skew(0deg);
    transition: 0.1s;
    padding: 0;
}

.popup-box {
    position: relative;
    width: 51vw;
    max-width: 966px;
    height: 29vw;
    max-height: 556px;
    color: aliceblue;
    background: url("../img/popup_bg1.png") no-repeat center center;
    background-size: contain;
    display: flex;
    align-items: center;
}

.popup-bg-picture {
    display: none;
}

#popup_box.animate__animated {
    animation-duration: 0.7s;
}

.popup_main {
    display: flex;
    flex-direction: column;
    position: relative;
    width: 50vw;
    height: auto;
    margin: 0 auto;
    background-size: cover;
    color: #464141;
    overflow: auto;
    align-items: flex-start;
    z-index: 2;
}

.content-stage-box {
    width: 43vw;
    max-width: 800px;
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.stage-title-wrapper1 {
    width: 100%;
    max-width: 519px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.stage-title-wrapper2 {
    width: 33vw;
    max-width: 617px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.stage-title-wrapper1 img,
.stage-title-wrapper1 picture,
.stage-title-wrapper2 img,
.stage-title-wrapper2 picture {
    width: 100%;
    height: auto;
    display: block;
}

.stage-login-zone {
    width: auto;
    height: 8vw;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-panel {
    width: 100%;
}

#panel-logged-out {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.login-hint {
    font-size: 1.1rem;
    color: #333333;
    font-weight: 500;
    letter-spacing: 1px;
    text-align: center;
}

.login-hint .highlight {
    color: #ff1a58;
}

.login-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1vw;
}

.btn-login-trigger {
    display: block;
    width: 3vw;
    max-width: 43px;
    transition: transform 0.25s ease;
}

.btn-login-trigger img {
    width: 100%;
    height: auto;
    display: block;
}

.logged-in-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 50px;
    width: 100%;
}

.user-info-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
}

.user-welcome {
    font-size: 1.5rem;
    font-weight: bold;
    color: #ff1a58;
    letter-spacing: 1px;
}

.user-info-text .user-welcome {
    color: #ff1a58;
}

.user-status {
    font-size: 1.1rem;
    color: #333333;
    letter-spacing: 1px;
}

.user-status .highlight {
    color: #ff1a58;
    font-weight: 500;
    letter-spacing: 1px;
}

.btn-logout {
    display: block;
    width: 9vw;
    max-width: 156px;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.btn-logout img {
    width: 100%;
    height: auto;
    display: block;
}

.stage-share-group {
    width: 93%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5vw;
}

.share-btn {
    display: block;
    width: 10vw;
    max-width: 160px;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.share-btn img {
    width: 100%;
    height: auto;
    display: block;
}

.pop_npc {
    position: absolute;
    left: 0;
    bottom: -.5vw;
    width: 8vw;
    max-width: 148px;
    z-index: 4;
    animation: sway-symmetrical 3s ease-in-out infinite;
    transform-origin: bottom center;
}


.m-br {
    display: none;
}


@keyframes sway-symmetrical {
    0%,
    100% {
        transform: scale(1) rotate(-4deg);
    }
    50% {
        transform: scale(1) rotate(4deg);
    }
}

.popup_info {
    font-size: 1rem;
    width: 100%;
    height: auto;
    max-height: 18vw;
    overflow: auto;
    text-align: left;
    margin-top: 1vw;
}

.stage-rules-wrapper {
    width: 100%;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
}

.rules-list {
    margin: 0;
    padding-left: 24px;
    list-style-type: decimal;
    width: 100%;
}

.rules-list li {
    color: #333333;
    line-height: 1.7;
    margin-bottom: 12px;
    text-align: left;
    letter-spacing: 0.5px;
}

.rules-list li:last-child {
    margin-bottom: 0;
}

@media (hover: hover) and (pointer: fine) {
    .popup-close:hover {
        transform: scale(0.9);
        filter: brightness(1.2);
    }
    .btn-login-trigger:hover {
        filter: brightness(1.08);
        transform: scale(0.95);
    }
    .btn-logout:hover {
        transform: translate(0px, -3px);
    }
    .share-btn:hover {
        transform: translate(-3px, -3px);
    }
}

@media screen and (max-width: 1180px) {
    .popup-box {
        background-image: none;
        width: 68vw;
        height: auto;
        min-height: 38vw;
        padding: 3vw 0;
        max-width: none;
        max-height: none;
    }
    .popup-bg-picture {
        display: block;
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 1;
    }
    .popup-bg-img {
        width: 100%;
        height: 100%;
        object-fit: fill;
    }
    .popup_main {
        width: 60vw;
        height: auto;
        overflow: visible;
        max-width: none;
        max-height: none;
    }
    .content-stage-box {
        width: 100%;
        max-width: none;
    }
    .stage-title-wrapper1 {
        width: 33vw;
        max-width: none;
    }
    .stage-title-wrapper2 {
        width: 38vw;
        max-width: none;
    }
    .popup_info {
        max-height: 22vw;
        margin-top: 1vw;
    }
    .rules-list li {
        font-size: 1rem;
    }
    .popup-close {
        width: 6vw;
        top: -1vw;
        right: -1vw;
        max-width: none;
    }
    .pop_npc {
        width: 10vw;
        left: -1vw;
        bottom: -1vw;
        max-width: none;
    }
    .btn-login-trigger {
        width: 4.5vw;
        max-width: none;
    }
    .btn-logout {
        width: 12vw;
        max-width: none;
    }
    .share-btn {
        width: 12vw;
        max-width: none;
    }
    .stage-share-group {
        width: 60%;
        gap: 2.5vw;
        margin-top: 2vw;
    }
    .login-icons {
        gap: 2vw;
    }
}

@media screen and (max-width: 1024px) {
    .popup-box {
        background-image: none;
        width: 80vw;
        height: auto;
        min-height: 60vw;
        padding: 8vw 0 6vw;
        max-width: none;
        max-height: none;
    }
    .popup-bg-picture {
        display: block;
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 1;
    }
    .popup-bg-img {
        width: 100%;
        height: 100%;
        object-fit: fill;
    }
    .popup_main {
        width: 65vw;
        height: auto;
        overflow: visible;
        max-width: none;
        max-height: none;
    }
    .content-stage-box {
        width: 100%;
        max-width: none;
    }
    .stage-title-wrapper1 {
        position: relative;
        width: 50vw;
        top: -7vw;
        max-width: none;
    }
    .stage-title-wrapper2 {
        position: relative;
        width: 65vw;
        left: -1vw;
        top: -4vw;
        max-width: none;
    }
    .stage-login-zone {
        height: auto;
        padding: 0 0 5vw;
    }
    #panel-logged-out {
        gap: 15px;
    }
    .login-hint {
        font-size: 1.15rem;
    }
    .login-icons {
        gap: 4vw;
    }
    .btn-login-trigger {
        width: 8vw;
        max-width: none;
    }
    .logged-in-content {
        flex-direction: column;
        gap: 15px;
    }
    .user-welcome {
        font-size: 1.25rem;
        letter-spacing: 0;
    }
    .user-status {
        font-size: 1.05rem;
        letter-spacing: 0;
    }
    .btn-logout {
        width: 30vw;
        max-width: none;
    }
    .stage-share-group {
        flex-wrap: wrap;
        gap: 3vw;
        width: 100%;
    }
    .share-btn {
        width: 18vw;
        max-width: none;
    }
    .share-btn:hover {
        transform: none;
    }
    .popup_info {
        max-height: 50vw;
        margin-top: 0;
        padding-right: 5px;
    }
    .rules-list li {
        margin-bottom: 10px;
        font-size: 1.05rem;
    }
    .popup-close {
        width: 10vw;
        top: -4vw;
        right: -2vw;
        max-width: none;
    }
    .pop_npc {
        display: none;
    }
}

@media screen and (max-width: 639px) {
    .popup-box {
        background-image: none;
        width: 90vw;
        height: auto;
        min-height: 125vw;
        padding: 12vw 0 8vw;
    }
    .popup-bg-picture {
        display: block;
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 1;
    }
    .popup-bg-img {
        width: 100%;
        height: 100%;
        object-fit: fill;
    }
    .popup_main {
        width: 70vw;
        height: auto;
        overflow: visible;
        top: -3vw;
    }
    .content-stage-box {
        width: 100%;
    }
    .stage-title-wrapper1 {
        position: relative;
        width: 65vw;
        top: -8vw;
    }
    .stage-title-wrapper2 {
        position: relative;
        width: 83vw;
        left: -2vw;
        top: -3vw;
    }
    .stage-login-zone {
        height: auto;
        padding: 0 0 7vw;
    }
    #panel-logged-out {
        gap: 15px;
    }
    .login-hint {
        font-size: 1.1rem;
    }
    .login-icons {
        gap: 5vw;
    }
    .btn-login-trigger {
        width: 12vw;
        max-width: none;
    }
    .logged-in-content {
        flex-direction: column;
        gap: 15px;
    }
    .user-welcome {
        font-size: 1.15rem;
        letter-spacing: 0;
    }
    .user-status {
        font-size: 1rem;
        letter-spacing: 0;
    }
    .btn-logout {
        width: 45vw;
        max-width: none;
    }
    .stage-share-group {
        flex-wrap: wrap;
        gap: 4vw;
        width: 100%;
    }
    .share-btn {
        width: 26vw;
        max-width: none;
    }
    .share-btn:hover {
        transform: none;
    }
    .popup_info {
        max-height: 88vw;
        margin-top: 0;
        padding-right: 5px;
    }
    .rules-list li {
        margin-bottom: 10px;
        font-size: 0.95rem;
    }
    .popup-close {
        width: 15vw;
        top: -6vw;
        right: -3vw;
    }
    .pop_npc {
        display: none;
        width: 26vw;
        left: -2vw;
        bottom: auto;
        top: -14vw;
        z-index: 5;
    }


.m-br {
    display: block;
}


}


@media screen and (min-width: 1921px) {

    html {
        font-size: min(0.8333vw, 21.333px) !important;
    }

    .popup-box {
        max-height: none !important;
    }

    .btn-login-trigger,
    .btn-logout,
    .pop_npc,
    .popup-box,
    .popup-close,
    .share-btn {
        max-width: none !important;
    }

    .popup-box {
        width: 60.375rem !important;
        height: 34.75rem !important;
    }

    .popup_main {
        width: 60rem !important;
    }

    .popup_info {
        max-height: 21.6rem !important;
        margin-top: 1.2rem !important;
    }

    .content-stage-box {
        width: 50rem !important;
        max-width: none !important;
    }

    .stage-title-wrapper1 {
        width: 32.4375rem !important;
        max-width: none !important;
    }

    .stage-title-wrapper2 {
        width: 38.5625rem !important;
        max-width: none !important;
    }

    .stage-login-zone {
        height: 9.6rem !important;
    }

    .login-icons {
        gap: 1.2rem !important;
    }

    .btn-login-trigger {
        width: 2.6875rem !important;
    }

    .btn-logout {
        width: 9.75rem !important;
    }

    .stage-share-group {
        gap: 1.8rem !important;
    }

    .share-btn {
        width: 10rem !important;
    }

    .popup-close {
        width: 6.25rem !important;
        top: -0.24rem !important;
        right: -0.24rem !important;
    }

    .pop_npc {
        width: 9.25rem !important;
        bottom: -0.6rem !important;
    }
}

@supports (-webkit-touch-callout: none) {
    @media screen and (max-width: 639x) {

        .popup-box {
            min-height: 118vw;
        }

    }
}
