@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@100..900&display=swap');

:root {
    --main-color: rgb(25, 150, 150);
}
body,
html {
    margin: 0.3rem;
    height: 100%;
    max-height: calc(100% - 0.6rem);
    font-family: "Noto Sans TC", sans-serif;
    font-optical-sizing: auto;
    font-weight: 500;
    font-style: normal;
}
p {
    font-size: 1.3rem;
    font-weight: 800;
    color: #0f9a9e;
    letter-spacing: 2px;
    line-height: 1.3;
    margin: 0 .5rem 1rem;
}
.bg-main {
    background: linear-gradient(to bottom, #fee43d, #ffcb22);
    width: calc(100% - 0.6rem);
    border: 5px solid transparent;
    border-radius: 2rem;
    /* overflow: hidden; */
    height: calc(100% - 0.6rem);
    max-width: 768px;
    margin: 0 auto;
    position: relative;
    background-clip: padding-box; 
}
.bg-main::after {
    content: '';
    position: absolute;
    width: calc(100% + 12px);
    height: calc(100% + 12px);;
    background: linear-gradient(to bottom, #0ba5b1, #204d48);
    top: 0; right: 0; bottom: 0; left: 0;
    z-index: -1;
    border-radius: 2rem;
    margin: -6px;
}
.header-bar {
    background: #0f999d;
    padding: .6rem 1rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 1.7rem 1.7rem 0 0;
}
.brand {
    display: none;
}
.logo {
    height: 32px;
}
.progress-bar {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr;
}
.progress-bar span {
    height: 10px;
}
.progress-bar span:nth-child(1) {
    background: #088b8f;
}
.progress-bar span:nth-child(2) {
    background: #fff;
}
.progress-bar span:nth-child(3) {
    background: #efefef;
}
.progress-bar span:nth-child(4) {
    background: #e3e3e3;
}
.progress-bar span:nth-child(5) {
    background: #d6d6d6;
}
.progress-bar span:nth-child(6) {
    background: #cccccc;
}
.progress-bar span.active {
    background: rgb(13, 114, 114);
}
.progress-bar.cover span {
    background: #fff!important;
}
.content-box {
    text-align: center;
    overflow-y: auto;
    height: calc(100% - 66px);
    background: url("../img/bg-content-pc.png") no-repeat center center/auto 100%;
    border-radius: 0 0 1.7rem 1.7rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.content-box.cover {
    background: url("../img/bg-cover-pc.png") no-repeat center center/auto 100%;
}
.content-box.level {
    background: url("../img/bg-deco-pc-r.png") no-repeat center center/auto 100%, url("../img/bg-deco-pc-l.png") no-repeat 20% center/auto 100%;
}  
.content-box.video {
    background: url("../img/bg-deco-pc-r.png") no-repeat center center/auto 100%, url("../img/bg-deco-pc-l.png") no-repeat 20% center/auto 100%;
} 
.content-box.result {
    background: url("../img/bg-deco-pc-r.png") no-repeat center center/auto 100%, url("../img/bg-deco-pc-l.png") no-repeat 20% center/auto 100%;
}  
.btn-main {
    border-style: none;
    transition: 0.3s;
    text-decoration: none;
    color: #fff;
    background: url("../img/btn-bg.png") no-repeat center center/100%;;
    padding: 1rem;
    cursor: pointer;
    margin: .5rem auto 2rem;
    width: 55%;
    max-width: 200px;
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: 2px;
    position: relative;
    filter: drop-shadow(3px 3px 6px rgba(61, 61, 61, 0.23));
}
.btn-main::after {
    content: '';
    width: 48px;
    height: 48px;
    object-fit: contain;
    display: block;
    position: absolute;
    right: -1rem;
    bottom: -1rem;
    pointer-events: none;
    background: url("../img/icon-finger.png") no-repeat center center/ contain;
}
.btn-main[data-step="invite"] {
    width: 85%;
    max-width: 330px;
    padding: 2rem 3rem 2rem 1rem;
    background: url("../img/btn-bg-l.png") no-repeat center center/100%;;
}
.btn-main[data-step="invite"]::after {
    content: '';
    background: url("../img/icon-share.png") no-repeat center center/ contain;
    right: 1.2rem;
    bottom: 50%;
    transform: translateY(50%);
    width: 28px;
    height: 28px;
}
.btn-main:hover {
    filter: brightness(1.2);
}
.btn-main.disable {
    filter: grayscale(1);
    pointer-events: none;
}
.content-box-detail {
    display: none;
    position: relative;
}
.content-box-detail.active {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.btn-level, .btn-video {
    pointer-events: none;
    position: absolute;
    opacity: 0;
    text-align: center;
    margin: 0 auto 1rem;
}
.btn-level-item, .btn-video-item {
    width: 60%;
    /* max-width: 240px; */
    display: block;
    margin: 0 auto;
    cursor: pointer;
}
.btn-level-item img {
    width: 100%;
}
.btn-level + .btn-level-item .select {
    display: none;
}
.btn-level + .btn-level-item .unselect {
    display: block;
}
.btn-level:checked + .btn-level-item .select {
    display: block;
}
.btn-level:checked + .btn-level-item .unselect {
    display: none;
}
.btn-video + .btn-video-item {
    transition: 0.3s;
    display: flex;
    max-width: 50%;
    margin: 0 auto 1rem;
    cursor: pointer;
    /* height: 5rem; */
    height: 0;
    max-width: 180px;
    padding-bottom: 12%;
    position: relative;
    justify-content: center;
    align-items: center;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 0 4px rgba(61, 61, 61, 0.7);
    font-size: 1.5rem;
    letter-spacing: .2rem;
    filter: grayscale(1) drop-shadow(3px 3px 6px rgba(61, 61, 61, 0.23));
}
.btn-video + .btn-video-item >span {
    position: absolute;
    top: 50%;
    transform: translateY(-53%);
    pointer-events: none;
}

.with-title.beginner .btn-video + .btn-video-item {
    background: url("../img/btn-select-video-beginner.png") no-repeat center center/contain;
}
.with-title.medium .btn-video + .btn-video-item {
    background: url("../img/btn-select-video-medium.png") no-repeat center center/contain;
}
.with-title.hard .btn-video + .btn-video-item {
    background: url("../img/btn-select-video-hard.png") no-repeat center center/contain;
}

.btn-video:checked + .btn-video-item {
    filter: grayscale(0) drop-shadow(3px 3px 6px rgba(61, 61, 61, 0.23));
}
.paper {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 1rem;
    width: 95%;
    margin: 0 auto 1.5rem;
    padding: 1rem;
    box-sizing: border-box;
    box-shadow: 3px 3px 6px 0 rgba(61, 61, 61, 0.23);
    height: 100%;
    max-width: 450px;
}
.paper.with-title {
    padding: 6rem 1rem 1rem;
    top: 1rem;
    position: relative;
}
.paper.with-title-ribbon {
    padding: 1rem;
    top: 1rem;
    position: relative;
}
.input-style {
    border-style: none;
    border-radius: 1rem;
    padding: 4px 1.5rem;
    font-size: 1.2rem;
    line-height: 2.5rem;
    margin-bottom: .5rem;
    width: 100%;
    max-width: 260px;
    box-shadow: 3px 3px 6px 0 rgba(61, 61, 61, 0.23);
}
.input-style {
    outline: none;
}
.result-modal {
    position: fixed;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.7);
    top: 0;
    left: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: .3s;
}
.result-modal.active {
    opacity: 1;
    pointer-events: auto;
}
.result-modal-content {
    /* width: calc(100% - 1rem);
    height: calc(100% - 1rem); */
    /* max-width: 768px; */
    /* background: var(--main-color); */
    /* border-radius: 2rem; */
    /* padding: 1.5rem; */

    box-sizing: border-box;
    position: relative;
}
.result-modal-content .close {
    cursor: pointer;
    border-style: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    right: 0;
    top: 0;
    border: 2px solid #fff;
}
.result-modal-content .close img {
    display: block;
    width: 20px;
    pointer-events: none;
}
.result-modal-content.beginner .close {
    background: #ffa726;
}
.result-modal-content.hard .close {
    background: #e53935;
}
.result-modal-content.medium .close {
    background: #29b6f6;
}
.video-modal {
    position: fixed;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    top: 0;
    left: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    display: none;
    transition: .3s;
}
.video-modal.active {
    opacity: 1;
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}
.video-modal-mask {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}
.modal-close {
    position: absolute;
    width: 2.8rem;
    height: 2.8rem;
    background: rgba(0,0,0,.6);
    top: -3rem;
    right: -3rem;
    border-radius: 50%;
    cursor: pointer;
}
.modal-close::before {
    content: '';
    display: block;
    width: 65%;
    height: 1.5px;
    background: #fff;
    left: 50%;
    position: absolute;
    top: 50%;
    transform-origin: left;
    transform: rotate(45deg) translate(-50%, -50%);
}
.modal-close::after {
    content: '';
    display: block;
    width: 65%;
    height: 1.5px;
    background: #fff;
    left: 50%;
    position: absolute;
    top: 50%;
    transform-origin: left;
    transform: rotate(-45deg) translate(-50%, -50%);
}
.modal-content {
    position: relative;
    max-height: calc(100% - 6rem);
}
@media screen and (max-width: 450px) {
    .modal-close {
        width: 2rem;
        height: 2rem;
        top: -2.5rem;
        right: 0;
    }
}

.canvas-box {
    opacity: 0;
    position: absolute;
    pointer-events: none;
}
.toast-box {
    opacity: 0;
    pointer-events: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: .3s;
    background: rgba(0, 0, 0, .6);
    color: #fff;
    /* display: inline-block; */
    padding: .5rem 1rem;
    border-radius: .5rem;
    font-size: 1.2rem;
}
.toast-box.active {
    opacity: 1;
}
.player-box{
    aspect-ratio: 9 / 16;
    max-height: 85vh;
    margin: 0 auto;
  }
#btnCta.hidden {
    display: none;
}
.cover-pattern {
    width: 100%;
    height: 40vh;
    object-fit: contain;
    /* max-width: 300px; */
    animation: moving 1s infinite alternate-reverse 1s;
    margin: 1rem;
    position: relative;
}
@keyframes moving {
    0% {
        /* width: 80%; */
        transform: translateY(.2rem);
    }
    20% {
        /* width: 78%; */
        transform: translateY(0);
    }
    100% {
        /* width: 80%; */
        transform: translateY(.2rem);
    }
}
.content-pattern {
    width: 100%;
    height: 50vh;
    object-fit: contain;
}
[data-step="invite"] .content-pattern {
    width: 100%;
    height: 20vh;
    object-fit: contain;
}
[data-step="result"] .content-pattern {
    width: 100%;
    height: 35vh;
}
.slogan-mo {
    display: none;
    width: 80%;
    max-width: 240px;
    margin: 1rem auto;
}
.slogan-pc {
    display: block;
    width: 80%;
    max-width: 550px;
    margin: 1rem auto;
}
.choosedLevel, .choosedLevelTitle {
    width: 64%;
    max-width: 230px;
    position: absolute;
    top: -1.3rem;
    left: 50%;
    transform: translateX(-50%);
}
.videoTag {
    font-size: 2rem;
}
.result-image {
    display: block;
    max-width: 400px;
    max-height: 88vh;
    height: 100%;
    object-fit: contain;
}
.result-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
.btn-share {
    left: 7%;
    position: absolute;
    bottom: 8%;
    width: 40%;
    height: 6%;
    opacity: 0;
    cursor: pointer;
}
.btn-keep {
    right: 7%;
    position: absolute;
    bottom: 8%;
    width: 40%;
    height: 6%;
    opacity: 0;
    cursor: pointer;
}
.player-cover {
    border: 1px solid #088b8f;
    cursor: pointer;
    width: 30%;
    max-width: 200px;
    aspect-ratio: 9 / 16;
    position: relative;
    margin: 0 auto;
}
.player-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    display: block;
}
.player-cover-btn-play {
    width: 3rem;
    height: 3rem;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    filter: drop-shadow(3px 3px 6px rgba(0, 0, 0, 1));
}
#userName {
    position: absolute;
    bottom: 27.2%;
    font-size: clamp(1rem, 16px, 3rem);
    left: 51%;
    transform: translateX(-50%);
    font-weight: 700;
    color: #fff;
}
.choosedLevel-content {
    width: 100%;
}

@media screen and (max-width: 768px) {
    .paper.with-title {
        padding: 4rem 1rem 1rem;
    }
    .paper.with-title-ribbon {
        padding: 2rem 1rem 1rem;
    }
    .btn-video + .btn-video-item {
        padding-bottom: 20%;
    }
    .slogan-mo {
        display: block;
    }
    .slogan-pc {
        display: none;
    }
    .brand {
        display: block;
        height: 22px;
        margin-right: 1rem;
    }
    .logo {
        height: 22px;
    }
    .content-box {
        text-align: center;
        overflow-y: auto;
        height: calc(100% - 66px);
        background: url("../img/bg-content.png") no-repeat center center/100%;
        border-radius: 0 0 1.7rem 1.7rem;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }
    .content-box.cover {
        background: url("../img/bg-cover.png") no-repeat center center/100%;
    }
    .content-box.level {
        background: url("../img/bg-deco.png") no-repeat top center/100%;
    }  
    .content-box.video {
        background: url("../img/bg-deco-2.png") no-repeat top center/100%;
    } 
    .content-box.result {
        background: url("../img/bg-deco-3.png") no-repeat/100%;
    }
}
@media screen and (max-height: 600px) {
    .logo {
        height: 22px;
    }
    .slogan-pc {
        max-width: 450px;
    }
    /* .cover-pattern {
        width: 100%;
        height: 40vh;
    } */
    .btn-level-item, .btn-video-item {
        max-width: 280px;
    }
    .paper.with-title {
        padding: 4.5rem 1rem 1rem;
    }
    .paper.with-title-ribbon {
        padding: 2.5rem 1rem 1rem;
    }
    .player-cover {
        max-width: 80px;
    }
}