

body.main-login{
    min-height: 100vh;

    display: flex;
    justify-content: center;
    align-items: center;
    background: url('../img/bg.jpg') center center / cover no-repeat fixed;
}
.login-box{
    padding: 20px 40px 20px;
    border-radius: 20px;
    background: rgba(255,255,255,1);
    border: 15px solid #e8dcec;
    border-radius: 50px;
    box-shadow:
        0 10px 30px rgba(0,0,0,.08),
        inset 0 0 0 2px rgba(255,255,255,.6);
    backdrop-filter: blur(10px);
}
.login-wrapper {
    position: relative;
    width: 100%;
    max-width: 420px;
}
.logo-wrapper {
    /* position: absolute;

    top: 0;
    left: 50%;

    transform: translateX(-50%);

    z-index: 10; */
    display: flex;
    justify-content: center;
    align-items: center;
}
.logo {
    width: 80%;

    /*animation: float 5s ease-in-out infinite;*/
}

/* animation ขึ้นลง */
@keyframes float {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0);
    }
}

.image-btn {
    width: 100%;

    border: 0;
    padding: 0;

    background: transparent;

    cursor: pointer;
}

.login-btn-img {
    width: 100%;

    transition: .3s;
}

/* hover */
.login-btn-img:hover {
    transform: scale(1.03);
}

/* click */
.login-btn-img:active {
    transform: scale(.98);
}

.text-title-box{
    display: flex;
    justify-content: center;
    align-items: center;
}
.text-wel{
    font-size: 1.5rem;
    font-weight: bold;
    color: #8f02a1;
    opacity: 0.8;
}
.text-detail{
    font-size: 0.8rem;
    /*color: #8f02a1;
    opacity: 0.8; */
}
.line-border{
    display: flex;
    justify-content: center;
    align-items: center;
}

.line-border img{
    max-width: 100%;
}

.btn-to-register-box{
    display: flex;
    justify-content: center;
    align-items: center;
}
.link-register, .link-register:hover{
    color: #000;
    text-decoration: none;
}

/******************************************************************/
body.main-entrance{
    min-height: 100vh;

    display: flex;
    justify-content: center;
    align-items: center;
    background: url('../img/bg.jpg') center center / cover no-repeat fixed;
}
body.main{
    /*min-height: 100vh;*/

    /* display: flex;
    justify-content: center;
    align-items: center; */
    background: url('../img/bg.jpg') center center / cover no-repeat fixed;
}
.main-wrapper {
    position: relative;
    width: 100%;
    max-width: 720px;
}

.main-logo {
    width: 100%;
    /*max-width: 500px;*/
}
.entrance-btn-img{
    width: 100%;
    max-width: 500px;
    transition: .3s;
}
.entrance-btn-img:hover {
    transform: scale(1.03);
}
.entrance-btn-img:active {
    transform: scale(.98);
}


.central-wrapper{
    display: flex;
    flex-direction: column;
}
.top-main-content{
    display: flex;
}
.rank-popup{
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100%;
}
.rank-popup-btn{
    width: 100%;
    max-width: 200px;
    animation: float 3s ease-in-out infinite;
}
.rank-popup-img-wrapper{
    display: flex;
    justify-content: center;
    align-items: center;
}
.central-logo-wrapper{
    display: flex;
    justify-content: center;
    align-items: center;
}
.central-logo{
    width: 100%;
    max-width: 400px;
}
.mission-wrapper{
    display: flex;
    flex-direction: row;
}
.mission-box-wrapper{
    width: 20%;
}
.mission-box{
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
}
.mission-btn-img{
    width: 100%;
}
.mission-log-wrapper{
    position: relative;
}
.mission-log-bg{
    position: absolute;
    width: 100%;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
}
.mission-log-bg-wrapper{
    display: flex;
    justify-content: center;
    align-items: center;
}
.mission-block-img{
    width: 80%;
    /*max-width: 100%;*/
}

.info-popup{
    padding-top: 15px;
    padding-right: 15px;
    display: flex;
    /* justify-content: center;
    align-items: center; */
    flex-direction: column;
    height: 100%;
}
.flex-center{
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}
.sound-popup-img-wrapper, .info-popup-img-wrapper{
    display: flex;
    justify-content: right;
    align-items: center;
}
.info-popup-btn{
    width: 100%;
    max-width: 200px;
    padding: 15px;
}

/********************************************************/
body.main-mission{
    background: url('../img/mission/bg.jpg') center center / cover no-repeat fixed;
}
.mission-main-wrapper{
    display: flex;
    flex-direction: column;
}
.mission-logo-wrapper{
    /* display: flex;
    justify-content: center;
    align-items: center; */
    position: relative;
}
.mission-logo-box{
    position: relative;
}
.mission-logo-inner{
    position: absolute;
    top: -250px;
    left: 50%;
    transform: translateX(-50%);
}
.mission-logo{
    /*width: 100%;*/
    max-width: 400px;
}
.mission-content-wrapper{
    background-color:rgba(255,255,255,0.8);
    margin-left: 5%;
    margin-right: 5%;
    padding: 80px 50px 20px;
    margin-top: 170px;
    margin-bottom: 20px;
    position: relative;
    border: 15px solid #e8dcec;
    border-radius: 50px;
    box-shadow:
        0 10px 30px rgba(0,0,0,.08),
        inset 0 0 0 2px rgba(255,255,255,.6);
    backdrop-filter: blur(10px);
}
.content-logo-wrapper{
    position: absolute;
    bottom: 0;
    left: -5%;
}
.content-logo{
    width: 100%;
    max-width: 300px;
}


/****************************/

/* container */
.question-wrapper {
    position: relative;

    overflow: hidden;

    min-height: 320px;
}

/* question */
.question-block {
    width: 100%;
    animation-duration: .35s;
    animation-fill-mode: both;
}

/* slide in right */
.slide-in-right {
    animation-name: slideInRight;
}

/* slide in left */
.slide-in-left {
    animation-name: slideInLeft;
}

/* keyframes */
@keyframes slideInRight {

    from {
        opacity: 0;
        transform: translateX(60px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {

    from {
        opacity: 0;
        transform: translateX(-60px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* choice */
.choice-card {
    display: block;
    border: 2px solid #ddd;
    border-radius: 20px;
    padding: 20px;
    cursor: pointer;
    transition: .2s;
}

.choice-card:hover {
    border-color: #fd0df5;
    background: rgba(13,110,253,.05);
}

.choice-card input {
    display: none;
}

.choice-card input:checked + .choice-content {
    color: #fd0df5;
    font-weight: bold;
}
button:disabled {
    opacity: .5;
    cursor: not-allowed;
}
.custom-progress {
    background: linear-gradient(
        90deg,
        #c084fc,
        #8b5cf6
    );
}
.q-title{
    font-size: 1.1rem;
}
/*.choice-card:has(input:checked) {
    transform: scale(1.02);
}*/
/*.q-wrapper{
    padding: 15px;
}*/

/***************************/



.swl--theme .swal2-modal {
    background-color: rgba(23, 20, 17, 0.95);
    padding: 15px 15px 15px 15px;
    border-radius: 20px;
    border-color: rgb(150, 150, 150);
    border-width: 1px 1px 1px 1px;
    margin: 5px 5px 5px 5px;
    border-style: dashed;
}

.swl--theme .swal2-confirm {
    background-image: linear-gradient( #13dc8e,#06bc51,#116c49);
    text-shadow: 1px 2px 0px #116c49;
    border-radius: 10px;
    padding: 0px 20px 0px 20px;
    font-size: 1.15em;
    color: #fff;
    margin: 0 10px;
}
.swl--theme .swal2-cancel {
    color: #fff;
    font-size: 1.15em;
    border-radius: 10px;
    background-image: linear-gradient( #b20000,#b81a1a,#580909);
    text-shadow: 1px 2px 0px #b20000;
    padding: 0px 20px 0px 20px;
    margin: 0 10px;
}
.swl--theme .swal2-icon.swal2-question {
    border-color: #ffcf7e;
    color: #ffcf7e;
}
.swl--theme .swal2-title {
    font-size: 1.5rem;
    color: #fff;
    line-height: 1.5;
}
.swl--theme .swl-img{
    width: 30%;
}
.swl--loading .swal2-title{
    color: #fff;
}
.swl--loading .swal2-confirm{
    border-left-color: rgb(255, 255, 255)!important;
    border-right-color: rgb(255, 255, 255)!important;
}

.btn-purple {
    --bs-btn-color: #fff;
    --bs-btn-bg: #bd01b7;
    --bs-btn-border-color: #bd01b7;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #970092;
    --bs-btn-hover-border-color: #970092;
    --bs-btn-focus-shadow-rgb: 49, 132, 253;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #970092;
    --bs-btn-active-border-color: #970092;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: #fa66f5;
    --bs-btn-disabled-border-color: #ff8bfb;
}


/************* mission2 ************/

body.main-mission2{
    background: url('../img/mission2/bg.jpg') center center / cover no-repeat fixed;
}

.slider {
    position: relative;
    width: 100%;
    /*max-width: 900px;*/
    margin: auto;
    overflow: hidden;
    border-radius: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,.2);
}

.slides {
    display: flex;
    transition: transform .5s ease;
}

.slides img {
    width: 100%;
    flex-shrink: 0;
    /*height: 60vh;*/
    object-fit: cover;
}

/* mobile */
@media (max-width: 768px) {
    .slides img {
        height: auto;
        max-height: 70vh;
        object-fit: contain;
    }
}

/* nav */
.nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border: 0;
    border-radius: 50%;
    background: rgba(0,0,0,.5);
    color: white;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;

    padding: 0;

    line-height: 1;
}

.prev {
    left: 15px;
}

.next {
    right: 15px;
}

/* dots */
.dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,.5);
    cursor: pointer;
    transition: .3s;
}

.dot.active {
    background: white;
    transform: scale(1.2);
}

.video-wrapper {
    width: 100%;
    /*max-width: 1000px;*/
    margin: auto;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,.2);
    background: black;
}

.video-player {
    width: 100%;
    display: block;
    max-height: 80vh;
    object-fit: contain;
}

/**********/
.btn-home-wrapper{
    display: flex;
    justify-content: center;
    align-items: center;
}
.btn-back-home{
    width: 100%;
    max-width: 300px;
}

/* hover */
.btn-hover:hover {
    transform: scale(1.03);
}

/* click */
.btn-hover:active {
    transform: scale(.98);
}


/********************** drag drop ************************/
body.main-mission3{
    background: url('../img/mission3/bg3.jpg') center center / cover no-repeat fixed;
}
.mission3-logo-wrapper, .mission3-title-wrapper{
    display: flex;
    justify-content: center;
    align-items: center;
}
.mission-logo3{
    width: 100%;
    max-width: 500px;
}

.drag-items {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 50px;
}

/* circle */
.drag-item {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: white;
    border: 4px solid #c4b5fd;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: grab;
    transition: .2s;
    box-shadow: 0 5px 15px rgba(0,0,0,.08);
}

.drag-item:hover {
    transform: scale(1.05);
}

/* image */
.drag-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    user-select: none;
}


.answer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,.05);
}

.question {
    font-size: 22px;
    font-weight: bold;
}
/* submit */
.submit-area {
    text-align: center;
    margin-top: 20px;
}
/* wrapper */
.submit-wrapper {
    position: relative;
    display: inline-block;
}

/* image button */
.submit-btn-image {
    border: 0;
    background: transparent;
    padding: 0;
    cursor: pointer;
    transition: .2s;
}

/* image */
.submit-btn-image img {
    width: 250px;
    max-width: 100%;
    display: block;
}

/* hover */
.submit-btn-image:not(:disabled):hover {
    transform: scale(1.04);
}

/* disabled */
.submit-btn-image:disabled {
    filter: grayscale(1);
    cursor: not-allowed;
}

/* tooltip */
.submit-tooltip {
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,.9);
    color: white;
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: .2s;
    pointer-events: none;
}

/* arrow */
.submit-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 7px;
    border-style: solid;
    border-color:
        rgba(0,0,0,.9)
        transparent
        transparent
        transparent;
}

/* show only if disabled */
.submit-wrapper:hover
.submit-btn:disabled
+ .submit-tooltip {
    opacity: 1;
    visibility: visible;
}

/* answer list */
.answer-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-top: 50px;
    padding-left: 2rem;
    padding-right: 2rem;
}

/* card */
.answer-card {
    position: relative;
    background: white;
    border-radius: 30px;
    padding: 90px 20px 30px;
    box-shadow: 0 10px 25px rgba(0,0,0,.08);
    text-align: center;
    min-height: 260px;
}

/* top image */
.question-image {
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    /*height: 110px;*/
    object-fit: cover;

}

/* drop area */
.drop-box {
    /* width: 110px;
    height: 110px;
    margin: auto;
    border: 3px dashed #c4b5fd;
    border-radius: 20px;
    background: #faf7ff;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    transition: .2s; */

    min-height: 140px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
    align-content: flex-start;
    justify-content: center;
    transition: .2s;
}

.drop-box.drag-over {
    border-color: #8b5cf6;
    background: #f3f0ff;
}

/* image in drop */
.drop-box .drag-item {
    /* width: 100%;
    height: 100%;
    border: 0;
    border-radius: 0;
    box-shadow: none; */

    width: 80px;
    height: 80px;
    border-width: 2px;
    margin: 3px;
}

.drop-box .drag-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* tablet */
@media (max-width: 992px) {
    .answer-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* mobile */
@media (max-width: 576px) {
    .answer-list {
        grid-template-columns: 1fr;
    }
}

/* smooth dragging */
.sortable-ghost {
    opacity: .5;
}

/* prevent weird mobile highlight */
.drag-item {
    touch-action: none;
}

/* hide */
.quiz-step {
    display: none;
    animation: fade .35s ease;
}

/* active */
.active-step {
    display: block;
}

/* animation */
@keyframes fade {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* topbar */
.game-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    /*margin-bottom: 30px;*/
    flex-wrap: wrap;
    margin-left: 2rem;
    margin-right: 2rem;
}

/* progress */
.progress-wrapper {
    flex: 1;
}
.progress-text-wrapper{
    display: flex;
    justify-content: space-between;
    margin-left: 1rem;
    margin-right: 1rem;
}

.progress {
    height: 18px;
    border-radius: 50px;
    overflow: hidden;
    background: #ececec;
}

.progress-bar {
    height: 100%;
    background:
        linear-gradient(
            90deg,
            #8b5cf6,
            #6366f1
        );
    transition: .3s;
}

.progress-text {
    margin-top: 8px;
    font-weight: bold;
    font-size: 15px;
}

/* timer */
.timer-wrapper {
    min-width: 120px;
    text-align: right;
    font-size: 22px;
    font-weight: bold;
    color: #6366f1;
}

/**************************************************/
body.main-mission4{
    background: url('../img/mission4/bg.jpg') center center / cover no-repeat fixed;
}

body.main-mission5{
    background: url('../img/mission5/bg.png') center center / cover no-repeat fixed;
}

.card-game {

    text-align: center;
    padding: 50px 20px 20px;
}

/* card */
.game-card {

    width: 240px;
    height: 340px;

    margin: auto;

    perspective: 1200px;
}

/* inner */
.card-inner {

    position: relative;

    width: 100%;
    height: 100%;

    transition: transform .8s;

    transform-style: preserve-3d;
}

/* flip */
.game-card.flipped
.card-inner {

    transform: rotateY(180deg);
}

/* face */
.card-face {

    position: absolute;

    width: 100%;
    height: 100%;

    backface-visibility: hidden;

    border-radius: 25px;

    overflow: hidden;

    box-shadow:
        0 10px 30px rgba(0,0,0,.2);
}

/* image */
.card-face img {

    width: 100%;
    height: 100%;

    object-fit: cover;
}

/* front */
.card-front {

    transform: rotateY(180deg);
}

.cer-wrapper{
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}
.download-cer-img{
    width: 300px;
    max-width: 100%;
}

.logout-btn-wrapper{
    display: flex;
    align-items: center;
    justify-content: center;
}
.logout-img{
    width: 300px;
    max-width: 100%;
}


/******************** modal ********************/

.modal-theme-- .modal-inner{
    background-color: rgba(23, 20, 17, 0.95);
    padding: 15px 15px 15px 15px;
    border-radius: 20px;
    position: relative;
}
.modal-border{
    border-color:rgb(150, 150, 150);
    border-radius:20px;
    border-width:1px 1px 1px 1;
    margin:5px 5px 5px 5px;
    border-style: dashed;
}
.modal-content-wrapper{
    pointer-events: auto;
}

.modal-theme-content-wrapper .img-title{
    width: 25%;
    margin-left: auto;
    margin-right: auto;
}
.modal-theme-content-wrapper .text-title{
    font-size: 1.5rem;
}
.modal-divider{
    margin-left: auto;
    margin-right: auto;
    margin-top: 0.5em;
    margin-bottom: 0.5em;
    max-width: 300px;
    height: 1px;
    background-color: rgb(159, 159, 159);
}
.btn-modal-close{
    cursor: pointer;
    outline: none;
    z-index: 1046;
    -webkit-box-shadow: none;
    box-shadow: none;
    position: fixed;
    top: 0;
    right: 0;
    text-decoration: none;
    text-align: center;
    opacity: 0;
    padding: 0;
    mix-blend-mode: difference;
    margin: 0 !important;
    color: #fff;
    font-style: normal;
    font-weight: 300;
    font-size: 30px;
    min-height: 0;
    width: 50px;
    -webkit-backface-visibility: hidden;
    height: 50px;
    line-height: 50px;
    font-family: Arial,monospace;
    -webkit-transition: opacity .6s,-webkit-transform .6s;
    transition: opacity .6s,-webkit-transform .6s;
    -o-transition: opacity .6s,transform .6s;
    transition: opacity .6s,transform .6s;
    transition: opacity .6s,transform .6s,-webkit-transform .6s;
    -webkit-transform: translateY(50%) translateZ(1px);
    transform: translateY(50%) translateZ(1px);
}
.modal.show .btn-modal-close {
    opacity: .6;
    -webkit-transform: translateY(0) translateZ(1px);
    transform: translateY(0) translateZ(1px);
}
.btn-modal-close:hover {
    opacity: 1;
}
.btn-green{
    background-image: linear-gradient( 186deg , #5cd044 0%, #368530 100%);
    text-shadow: 1px 2px 0px #116c49;
    border-radius: 10px;
    padding: 0px 20px 0px 20px;
    font-size: 1.15em;
}
.modal-theme-content-wrapper .img-title.w-70{
    width: 70%;
}

.button, button, input[type=submit], input[type=reset], input[type=button] {
    position: relative;
    display: inline-block;
    background-color: transparent;
    text-transform: uppercase;
    font-size: .97em;
    letter-spacing: .03em;
    cursor: pointer;
    font-weight: bolder;
    text-align: center;
    color: currentColor;
    text-decoration: none;
    border: 1px solid transparent;
    vertical-align: middle;
    border-radius: 0;
    margin-top: 0;
    text-shadow: none;
    line-height: 2.4em;
    min-height: 2.5em;
    padding: 0 1.2em;
    max-width: 100%;
    -webkit-transition: border .3s,background .3s,opacity .3s,color .3s,-webkit-transform .3s,-webkit-box-shadow .3s;
    transition: border .3s,background .3s,opacity .3s,color .3s,-webkit-transform .3s,-webkit-box-shadow .3s;
    -o-transition: transform .3s,border .3s,background .3s,box-shadow .3s,opacity .3s,color .3s;
    transition: transform .3s,border .3s,background .3s,box-shadow .3s,opacity .3s,color .3s;
    transition: transform .3s,border .3s,background .3s,box-shadow .3s,opacity .3s,color .3s,-webkit-transform .3s,-webkit-box-shadow .3s;
    text-rendering: optimizeLegibility;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}
.button:hover{
    color: inherit;
}
.btn-red {
    color: #fff;
    font-size: 18px;
    border-radius: 10px;
    background-image: linear-gradient( #b20000,#b81a1a,#580909);
    text-shadow: 1px 2px 0px #b20000;
}
.btn-green{
    background-image: linear-gradient( 186deg , #5cd044 0%, #368530 100%);
    text-shadow: 1px 2px 0px #116c49;
    border-radius: 10px;
    padding: 0px 20px 0px 20px;
    font-size: 1.15em;
}

/*************************************/

#manual-popup{
    cursor: pointer;
}
.manual-img{
    max-width: 100%;
}

.rank-main-wrapper{
    /*display: flex;*/
    /*justify-content: center;
    align-items: center;*/
    background: url('../img/rank/bg.jpg') center center / cover no-repeat fixed;
    padding: 15px;

    max-height: 70vh;
    overflow-y: auto;
}
.rank-main-title-wrapper{
    display: flex;
    justify-content: center;
    align-items: center;
}
.rank-title-img{
    width: 300px;
    max-width: 100%;
}
.rank--img{
    width: 20px;
}