* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --cell-w: 70px;
    --cell-h: 70px;
}

html,
body {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100dvw;
    height: 100dvh;
    background: url("../img/bg/bm.webp") center/cover no-repeat;
    z-index: -2;
    transform: translateZ(0);
    overscroll-behavior: none;
}

@font-face {
    font-family: 'ai_01';
    font-style: normal;
    font-weight: normal;
    src: local('ai01'), url('ttf/ai_01.woff2') format('woff2');
}

@font-face {
    font-family: "ai_02";
    src: url("ttf/ai_02.otf") format("opentype");
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'ai_03';
    font-style: normal;
    font-weight: normal;
    src: local('ai03'), url('ttf/ai_03.woff') format('woff');
}

@font-face {
    font-family: 'st';
    src: url('ttf/st.eot');
    src: local('st'), local('st'),
        url('ttf/st.eot?#iefix') format('embedded-opentype'),
        url('ttf/st.woff2') format('woff2'),
        url('ttf/st.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

.bgf-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.35);
    z-index: -1;
}

#game_main_div {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2%;
    min-height: 99%;
    max-height: 99%;
}

#game_glass {
    max-width: 580px;
    width: 100%;
    padding: 10px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px) saturate(180%);
    border-radius: 20px;
    border: 0px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.35), inset 0 0 20px rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

#game_main_div::-webkit-scrollbar {
    display: none;
}

#game_glass:hover {
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.45),
        inset 0 0 25px rgba(255, 255, 255, 0.15);
}

@media (max-width: 768px) {
    #game_glass {
        height: 98%;
    }

    html,
    body {
        background: url("../img/bg/bm734.webp") center/cover no-repeat;
    }
}

#game_glass::-webkit-scrollbar {
    display: none;
}

#game_glass {
    scrollbar-width: none;
}

webkit-scrollbar {
    display: none;
}

#gametoplogo {
    display: block;
    margin: 0px auto 0 auto;
    height: clamp(30px, 13svw, 80px);
}

#bad {
    display: block;
    margin: 0px auto 0 auto;
    height: clamp(100px, 25svw, 500px);
}

#alert_insert {
    margin: 0px 0px 20px 0px;
}


#first_scr {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    width: 100%;
    text-align: center;
    padding: 2%;
    box-sizing: border-box;
}

#startlogo {
    max-width: 90vw;
    width: 90%;
    height: auto;
    object-fit: contain;
    margin-bottom: 20px;
}

.button-group {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(10px, 2vw, 24px);
    width: 75%;
    max-width: 900px;
    margin: 0 auto;
    padding: clamp(8px, 2vw, 10px) 0;
}

.glass-btn {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(clamp(6px, 1vw, 12px));
    -webkit-backdrop-filter: blur(clamp(6px, 1vw, 12px));
    font-family: 'ai_01', serif;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.35);
    padding: clamp(10px, 1.5vw, 15px);
    font-size: clamp(12px, 1.2vw, 16px);
    font-weight: 600;
    letter-spacing: 0.15em;
    border-radius: clamp(8px, 1vw, 10px);
    cursor: pointer;
    transition: all 0.3s ease;
}

.play-btn {
    flex: 0 0 40%;
}

.rules-btn {
    flex: 0 0 60%;
}

.glass-btn {
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

.glass-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    box-shadow: 0 clamp(6px, 1vw, 20px)
        clamp(15px, 2vw, 35px)
        rgba(255, 255, 255, 0.15);
}

.glass-btn:active {
    transform: translateY(0);
}

.footer_text {
    padding: 15px 3% 0px 3%;
    text-align: justify;
    font-family: 'st', serif;
    color: #ffffff;
    font-size: clamp(12px, 1.4vw, 14px);
    line-height: 1.3;
}

.qr_text_error {
    padding: 15px 3% 0px 3%;
    text-align: justify;
    font-family: 'st', serif;
    color: #ffffff;
    text-align: center;
    font-size: clamp(12px, 1.6vw, 18px);
    line-height: 1.3;
    margin-bottom: 15px;
}

.logo_si {
    width: clamp(38px, 5.0svw, 52px);
    padding-top: 15px;
    cursor: pointer;
}

#lex_scr {
    display: none;
}

.lex_text {
    padding: 15px 3% 20px 3%;
    text-align: justify;
    font-family: 'st', serif;
    color: #ffffff;
    font-size: clamp(12px, 1.4vw, 16px);
    line-height: 1.4;
}

.lex_text p {
     margin-bottom: clamp(15px, 3vw, 20px);
}

.center {
    text-align: center;
}

#second_scr {
    display: none;
}

#f_scr {
}

#gear_scr,
#qr_scr,
#alert_scr {
    display: none;
}

#m_scr {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 2%;
    box-sizing: border-box;
}

table {
    border-collapse: separate;
    border-spacing: 10px;
}

td {
    padding: 0;
}

.cell {
    width: var(--cell-w);
    height: var(--cell-h);
    background-color: rgba(255, 255, 255, 0.98);
    border-radius: 6px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 600;
    padding: 7px;
    box-sizing: border-box;
}

.cell .letter {
    font-family: 'ai_03';
    font-weight: 400;
    font-size: clamp(16px, 7vw, 48px);
    color: #000;
    pointer-events: none;
}

#t_scr {
    position: relative;
}

#t_scr_lex {
    position: relative;
}

#t_scr_gear {
    position: relative;
}

.svg-box {
    position: absolute;
    top: 0px;
    right: 0px;
    display: flex;
    gap: 10px;
}

.svg-box svg {
    width: 28px;
    height: 28px;
    cursor: pointer;
    color: white;
    transition: color 0.2s ease;
}

.svg-box svg:hover {
    color: #1e90ff;
}

#footer {
    font-family: 'ai_01';
    margin: 0 auto;
    max-width: 1000px;
    width: 92%;
    padding: 0px 10px 10px 10px;
    display: flow-root;
    color: #ffffff;
    letter-spacing: 0.2em;
    text-align: center;
    text-align-last: center;
    font-size: clamp(12px, 1.8vw, 16px);
    line-height: 1.4;
    user-select: none;
}

.cell img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.qr-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 10px;
    background-size: cover;
}

.qr-container img {
    max-width: 300px;
    width: 100%;
    height: auto;
    display: block;
}

.vr-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    background-size: cover;
    margin-bottom: 20px;
}

.vr-container img {
    width: 100%;
    height: auto;
    display: block;
}

.lex-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    margin-bottom: clamp(25px, 5vw, 25px);
}

.lex-checkbox input {
    display: none;
}

.box {
    width: clamp(22px, 5vw, 28px);
    height: clamp(22px, 5vw, 28px);
    border: 1.8px solid rgba(255, 255, 255, 0.7);
    border-radius: 6px;
    position: relative;
    transition: 0.2s;
    flex-shrink: 0;
}

.box::after {
    content: "";
    position: absolute;
    width: clamp(6px, 1.5vw, 8px);
    height: clamp(12px, 3vw, 16px);
    border: solid #0f172a;
    border-width: 0 2.5px 2.5px 0;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -60%) rotate(45deg) scale(0);
    transition: 0.2s ease;
}

.lex-checkbox input:checked + .box {
    background: #ffffff;
    border-color: #ffffff;
}

.lex-checkbox input:checked + .box::after {
    transform: translate(-50%, -60%) rotate(45deg) scale(1);
}

.lex-checkbox:hover .box {
    border-color: #ffffff;
}

.label-text {
    user-select: none;
}

.lex_text ul {
    margin: 0;
    padding-left: 0;
    list-style-position: inside;
}

.mt20 {
    margin-top: 20px;
}