body,
html {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
    user-select: none;
}
#container {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    user-select: none;
}
#game {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("img/background.gif") no-repeat left center;
    background-size: cover;
    user-select: none;
}

#hud {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    max-width: 100vw;
    box-sizing: border-box;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    z-index: 10;
    overflow: hidden;
    font-size: 24px;
    background-color: #FFFFFF33;
    font-family: "Tiny5","Noto Sans TC",sans-serif;
    user-select: none;
}
#coins,
#game-title,
#timer {
    font-size: 1em;
    font-weight: 900;
    text-align: center;
    user-select: none;
}
#hud > div {
    width: 33.33%;
    user-select: none;
    pointer-events: none;
}

#question {
    position: absolute;
    top: 30vh;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    text-align: center;
    font-size: 28px;
    font-weight: bold;
    color: white;
    z-index: 9;
    user-select: none;
    pointer-events: none;
}
#answers {
    position: absolute;
    top: 48vh;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    gap: 40px;
    width: auto;
    z-index: 9;
    user-select: none;
    pointer-events: none;
}
.answer-box-1,
.answer-box-2 {
    position: relative;
    width: 192px;
    height: 64px;
    display: flex;
    justify-content: center;
    align-items: center;
    user-select: none;
    pointer-events: none;
}
.answer-blocks-1,
.answer-blocks-2 {
    display: flex;
    flex-direction: row;
    gap: 0;
    user-select: none;
    pointer-events: none;
}
.answer-blocks-1 img,
.answer-blocks-2 img {
    width: 64px;
    height: 64px;
    user-select: none;
    pointer-events: none;
}
.answer-text-1,
.answer-text-2 {
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    color: #000;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    background: rgba(255, 255, 255, 0.8);
    padding: 6px 12px;
    border-radius: 12px;
    white-space: nowrap;
    user-select: none;
    pointer-events: none;
}
.answer-text-1::after,
.answer-text-2::after {
    content: "";
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid rgba(255, 255, 255, 0.8);
    user-select: none;
    pointer-events: none;
}
#player {
    width: 96px;
    height: 96px;
    background-image: url("img/player.png");
    background-size: contain;
    background-repeat: no-repeat;
    position: absolute;
    bottom: 0;
    left: 100px;
    user-select: none;
    pointer-events: none;
}
#question-no {
    position: absolute;
    top: 25vh;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    text-align: center;
    font-size: 22px;
    font-weight: bold;
    color: white;
    z-index: 9;
    font-family: "Tiny5","Noto Sans TC",sans-serif;
    user-select: none;
}
i {
    font-family: "Tiny5","Noto Sans TC",sans-serif;
    user-select: none;
}
body.entrance {
    margin: 0;
    height: 100vh;
    text-align: center;
    background-color: #9f4d4b;
    user-select: none;
}

#game-title-big {
    font-size: 2.5em;
    color: #FFF;
    font-weight: 900;
    width: 100%;
    text-align: center;
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    user-select: none;
}

#ctrlinfo-btn,
#info-btn,
#start-btn {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.5em;
    cursor: pointer;
    text-align: right;
    color: #FFF;
    user-select: none;
}

a {
    text-decoration: none;
    color: #FFF;
    font-weight: 900;
    user-select: none;
}

#start-btn {
    top: 55%;
    margin-top: 30px;
    user-select: none;
}
#ctrlinfo-btn {
    font-size: 1.2em;
    text-align: center;
    top: 45%;
    font-weight: 900;
    user-select: none;
}
#info-btn {
    top: 62%;
    margin-top: 30px;
    user-select: none;
}
    .ctrl-info-up{
        display: none;
    }
@media (max-width: 768px) {
    .ctrl-info-space{
        display: none;
    }
        .ctrl-info-up{
        display:contents;
    }
    #mobile-controls {
        display: flex;
        justify-content: center;
        gap: 20px;
        padding: 16px 0;
        background-color: #9f4d4b;
        touch-action: manipulation;
        user-select: none;
    }

    #mobile-controls button {
        padding: 16px 24px;
        font-size: 24px;
        user-select: none;
        border-radius: 15px;
        touch-action: manipulation;
        user-select: none;

    }
    .block {
        display: none;
        user-select: none;
    }
    body {
        min-height: 100vh;
        /*overflow-y: auto;*/
        touch-action: manipulation;
        user-select: none;
    }

    #container {
        position: relative;
        height: 88vh;
        user-select: none;
    }
    #coins,
    #game-title,
    #timer {
        font-size: 0.8em;
        user-select: none;
    }
    #hud {
        padding: 2px;
        user-select: none;
    }
    #answers {
        padding: 0 10px;
        margin: 0 10px;
        user-select: none;
    }
    .answer-box-1,
    .answer-box-2 {
        width: 140px;
        user-select: none;
    }
    #question-no {
        top: 20vh;
        user-select: none;
    }
    #question {
        top: 25vh;
        width: 80%;
        user-select: none;
    }
    #game-title-big {
        font-size: 2.0em;
        user-select: none;
    }
    #start-btn {
        top: 50%;
        user-select: none;
    }
    #info-btn {
        top: 55%;
        margin-top: 40px;
        user-select: none;

    }

}

button {
    user-select: none;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    /* 背景變暗 */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    user-select: none;
}

.modal.hidden {
    display: none;
    user-select: none;
}

.modal-content {
    background: white;
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    font-size: 24px;
    max-width: 90%;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    user-select: none;
}
/* HTML: <div class="loader"></div> */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: white;
    /* 🔲 全畫面白底 */
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-family: "Tiny5","Noto Sans TC",sans-serif;
    font-size: 1.5em;
    color: #6bd6ff;
    user-select: none;
}

.loader::before {
    content: "防詐知識讀取中...";
    display: inline-block;
    padding-bottom: 8px;
    background: linear-gradient(currentColor 0 0) 0 100% / 0 3px no-repeat;
    animation: l2 2s linear infinite;
    user-select: none;
}

@keyframes l2 {
    to {
        background-size: 100% 3px;
        user-select: none;
    }
}

.loader.hidden {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
    user-select: none;
}



#mobile-controls img {
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  user-select: none;
  pointer-events: none;
}

#mobile-controls button {
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  user-select: none;
  touch-action: manipulation;
}