.fileinput-button {
    position: relative;
    overflow: hidden;
    display: inline-block;
}

.fileinput-button input {
    position: absolute;
    top: 0;
    right: 0;
    margin: 0;
    opacity: 0;
    -ms-filter: 'alpha(opacity=0)';
    font-size: 200px !important;
    direction: ltr;
    cursor: pointer;
}

/* Fixes for IE < 8 */
@media screen\9 {
    .fileinput-button input {
        filter: alpha(opacity=0);
        font-size: 100%;
        height: 100%;
    }

}

input[type=file] {
    position: relative;
    width: 100%;
    height: 100%;
    opacity: 0;
    z-index: 30;
}

html, body {

    /* overflow: hidden; */
    font-family: en, zh !important;
    -webkit-touch-action: none;
    -moz-touch-action: none;
    -o-touch-action: none;
    touch-action: none;
}

.ui-container {
    display: none;
    position: absolute;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

button {
    background: none;
    border: none;
    cursor: pointer;
    font-family: en, zh !important;
}

.no-select {
    -webkit-user-select: none;
    -moz-user-select: none;
    -o-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

* {
    -webkit-user-select: none;
    -moz-user-select: none;
    -o-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

input {
    -webkit-user-select: text;
    -moz-user-select: text;
    -o-user-select: text;
    user-select: text;
}

#p1 {
    background-image: url('../image/首頁.png');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}

#stamp1-btn {
    position: absolute;
    width: 26%;
    height: 17%;
    left: 10%;
    top: 52%;
}

#stamp2-btn {
    position: absolute;
    width: 26%;
    height: 17%;
    left: 37%;
    top: 52%;
}

#stamp3-btn {
    position: absolute;
    width: 26%;
    height: 17%;
    left: 64%;
    top: 52%;
}

#stamp1-btn.stamped, #stamp2-btn.stamped, #stamp3-btn.stamped {
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    pointer-events: none;
}

#stamp1-btn.stamped {
    background-image: url('../image/過關章01.png');
}

#stamp2-btn.stamped {
    background-image: url('../image/過關章02.png');
}

#stamp3-btn.stamped {
    background-image: url('../image/過關章03.png');
}

#p2 {
    background-image: url('../image/太空試衣間.png');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}

#p3 {
    background-image: url('../image/艦長日誌.png');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}

#p4 {
    background-image: url('../image/星際守護者.png');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}

.camera-window {
    position: absolute;
    left: 13%;
    top: 34%;
    width: 74%;
    height: 43%;
    overflow: hidden;
    background: #000;
}

.camera-window video {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
}

.upload-preview {
    position: absolute;
    left: 12.96%;
    top: 34.79%;
    width: 73.7%;
    height: 41.25%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.stamp-back-btn, .stamp-upload-btn {
    position: absolute;
    width: 17.96%;
    height: 10.1%;
    top: 85.94%;
    background: transparent;
    border: none;
}

#stamp-1-back-btn {
    left: 29.07%;
}

#stamp-1-upload-btn {
    left: 52.96%;
}

#stamp-2-back-btn, #stamp-3-back-btn {
    left: 40.93%;
}

#redeem-btn {
    position: absolute;
    width: 100%;
    height: 6%;
    left: 0%;
    top: 75%;
    display: none;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

#redeem-btn.active {
    background-image: url('/image/bnt-01.png');
    display: block;
}

#redeem-btn.done {
    background-image: url('/image/bnt-02.png');
    display: block;
}

#p5 {
    background-image: url('../image/成功.png');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}

#qrcode {
    position: absolute;
    left: 26.85%;
    top: 51.15%;
    width: 46.11%;
    height: 25.83%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

#qrcode img, #qrcode canvas {
    max-width: 90%;
    max-height: 90%;
}

.hint1 {
    z-index: 10;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0%;
    left: 0%;
    background-color: rgba(0, 0, 0, 0.8);
    background-image: url('../image/說明彈窗01.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.hint2 {
    z-index: 10;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0%;
    left: 0%;
    background-color: rgba(0, 0, 0, 0.8);
    background-image: url('../image/說明彈窗-太空試衣間.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.hint3 {
    z-index: 10;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0%;
    left: 0%;
    background-color: rgba(0, 0, 0, 0.8);
    background-image: url('../image/說明彈窗-艦長日誌.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.hint4 {
    z-index: 10;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0%;
    left: 0%;
    background-color: rgba(0, 0, 0, 0.8);
    background-image: url('../image/說明彈窗-星際守護者.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.no-stock-alert {
    display: none;
    z-index: 10;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0%;
    left: 0%;
    background-color: rgba(0, 0, 0, 0.8);
    background-image: url('../image/已兌換完畢.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

#loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

#loading-overlay.active {
    display: flex;
}

#loading-spinner {
    width: 48px;
    height: 48px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }

}
