@font-face {
    font-family: '6809';
    src: url('/fonts/6809-Chargen.woff2');
}

/*noinspection CssInvalidPseudoSelector*/
.no-media-controls::-webkit-media-controls {
    display: none !important;
}

html {
    /* force full size for Firefox */
    width: 100%;
    height: 100%;
}

body {
    /*background-image: url('/img/background.jpg');*/
    /*background-repeat: repeat;*/
    background: #000000;
}

#gamebody {
    display: flex;

    overflow: hidden;
    width: 640px;
    height: 286px;

    position: absolute;
    top: 50%;
    left: 50%;
    margin-right: -50%;
    transform: translate(-50%, -50%);

    background-image: url('/img/ui/bg.jpg');
    background-repeat: no-repeat;
    background-size: 100% 100%;
    border-radius: 24px;

    user-select: none;
}

#help-overlay {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
}

#help-overlay-background {
    width: 100%;
    height: 100%;
    position: absolute;

    background-color: gray;
    opacity: 0.4;
}

#help-overlay-detail {
    width: 100%;
    height: 100%;
    position: absolute;

    background-image: url('/img/help_overlay.png');
    background-repeat: no-repeat;
    background-size: 100% 100%;
}

#controls-right {
    position: absolute;
    left: 70px;
}

.dpad-empty {
    background-image: url('/img/ui/bt MOVE EMPTY.png') !important;
}

#guide-txt {
    color: #979797;
    font-size: 8px;
    top: 269px;
    left: 30px;
    position: absolute;

    user-select: none;
}


.start-txt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #272a2c;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    flex-direction: column;
}
.start-txt {
    border: none;
    color: white;
    padding: 15px 32px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 54px;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s;
    margin-top: 100px;
}

/*#circle-pad {*/
/*    display: block;*/
/*    width: 70px;*/
/*    height: 70px;*/
/*    position: absolute;*/
/*    background-size: contain;*/
/*    top: 15px;*/
/*    left: 15px;*/

/*    pointer-events: none;*/

/*    opacity: 0.5;*/
/*    background-image: url('/img/ui/bong.png');*/
/*}*/


.bong-full {
    opacity: 1.0 !important;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 100%;
    /*background-image: url('/img/ui/bong full.png') !important;*/
}

.dpad {
    width: 20px;
    height: 20px;
    display: block;
    position: absolute;
}

.dpad-center {
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.5);
    left: calc(50% - 19px);
    top: calc(50% - 19px);
    display: block;
    position: absolute;
}

#player-index {
    background-repeat: no-repeat;
    background-size: contain;
    background-image: url('/img/ui/bt PlayerIndex.png');
}


#color-button-holder {
    display: block;
    width: 120px;
    height: 120px;
    position: absolute;
    top: 135px;
    left: 425px;
}

.btn {
    display: block;
    /*padding-top: 10px;*/
    text-align: center;
    width: 40px;
    height: 40px;
    background-size: contain;
    position: absolute;
    background-repeat: no-repeat;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.55);
    background-color: #80808080;
}


.btn.big {
    display: block;
    padding-top: 5px;
    text-align: center;
    width: 100px;
    height: 25px;
    position: absolute;
}

#btn-help {
    padding-top: 0;
    width: 20px;
    height: 28px;

    top: 16px;
    left: 23px;

    background-image: url('/img/ui/Help.png');
}

#btn-load {
    position: relative;

    img {
        width: 30px;
        height: 30px;
    }
}

#btn-save {
    position: relative;
    img {
        width: 30px;
        height: 30px;
    }
}

#btn-join {
    width: 46px;
    top: 70px;
    left: 22px;
    height: 25px;

    background-image: url('/img/ui/bt SHARE.png');
}

#btn-quit {
    width: 46px;
    top: 70px;
    left: 75px;
    height: 25px;

    background-image: url('/img/ui/bt QUIT.png');
}

#btn-rec {
    width: 36px;
    top: 2px;
    left: 373px;
    height: 9px;

    background-image: url('/img/ui/bt REC.png');
}

.record-user {
    position: absolute;
    padding-left: 6px;
    font-size: 12px;
    width: 109px;
    top: 4px;
    left: 262px;
    color: #888888;
    border-radius: 6px;
    outline: none;
    border-top-style: hidden;
    border-right-style: hidden;
    border-left-style: hidden;
    border-bottom-style: hidden;
    background-image: url('/img/ui/FrameTEXT.png');
    background-size: cover;
}

.record:before {
    position: absolute;
    content: '';
    background-color: #FF0000;
    border-radius: 50%;
    width: 5px;
    height: 5px;
    pointer-events: none;
    left: 4px;
    top: 7px;
}

.record.blink:before {
    animation: blinker 1s linear infinite;
}

@keyframes blinker {
    50% {
        opacity: 0;
    }
}


#btn-settings {
    width: 65px;
    height: 21px;

    top: 26px;
    left: 55px;

    padding: 0;

    transform: translateY(-50%);
    background-image: url('/img/ui/bt OPTIONS.png');

    opacity: .7;
    z-index: 0;
}

#lights-holder {
    display: block;
    width: 45px;
    height: 10px;
    position: absolute;
    top: 0;
    left: 460px;
}

#room-txt {
    position: absolute;
    width: 59px;
    top: 48px;
    left: 23px;
    color: #bababa;
    padding-left: 0;
    border-radius: 6px;

    outline: none;
    border-top-style: hidden;
    border-right-style: hidden;
    border-left-style: hidden;
    border-bottom-style: hidden;

    background-image: url('/img/ui/FrameTEXT.png');
    background-size: cover;
}


.pressed {
    filter: brightness(50%);
}

.dpad-pressed {
    background-color: rgba(128, 128, 128, 0.5) !important;
    opacity: 0.75;
}

.game-screen {
    position: relative;
    object-fit: contain;
    width: inherit;
    height: inherit;
    background-color: #222222;
}

#menu-screen {
    position: relative; /*must not static*/

    display: block;
    overflow: hidden;
    width: 320px;
    height: 240px;

    /*background-image: url('/img/screen_background5.png');*/
    background-size: cover;
    z-index: 1;
}

#menu-item-choice {
    display: block;
    position: absolute;

    width: 100%;
    height: 36px;
    background-color: #FFCF9E;
    opacity: 0.75;
    mix-blend-mode: lighten;

    top: 50%;
    left: 0;
    transform: translateY(-50%);
}


#menu-container {
    display: block;
    position: absolute;

    width: 100%;

    top: 102px; /* 240px - 36 / 2 */
    left: 0;
    /*z-index: 1;*/
}


.menu-item {
    display: block;
    position: relative;

    width: 100%;
    height: 36px; /* 35 + 1 border = 36px */

    font-family: '6809', monospace;
    font-size: 19px;
}

.menu-item div:first-child {
    overflow: hidden;
    display: block;
    position: absolute;

    left: 15px;
    top: 7px;
    width: 288px;
    height: 25px;
}

.menu-item div span {
    position: absolute;

    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: pre;
    text-align: center;
    color: white;
}

.menu-item div .pick {
    overflow: unset;
}

.menu-item__info {
    color: white;
    opacity: .55;
    font-size: 30%;
    text-align: center;
    padding-top: 3px;
}

#noti-box {
    display: none;
    padding: 5px 10px 0 10px;
    height: 20px;
    background-color: #ddd;
    position: absolute;

    border: 5px #000;
    border-radius: 30px;

    left: 50%;
    transform: translateX(-50%);
    bottom: 35px;

    font-size: 12px;
}

#slider-playeridx {
    display: block;
    margin-top: 10px;
    text-align: center;
    font-family: 'Arial', sans-serif;
    font-size: 15px;

    color: #bababa;
    position: absolute;
    top: 90px;
    left: 20px;
    width: 100px;

    user-select: none;
}

/* The slider itself */
.slider {
    -webkit-appearance: none; /* Override default CSS styles */
    appearance: none;
    width: 100%; /* Full-width */
    height: 25px; /* Specified height */
    outline: none; /* Remove outline */
    /*opacity: 0.7; [> Set transparency (for mouse-over effects on hover) <]*/
    transition: opacity .2s;

    background-color: transparent;
    background-repeat: no-repeat;
    background-size: contain;
    background-image: url('/img/ui/FramePlayerIndex.png');
}

/* Mouse-over effects */
.slider:hover {
    opacity: 1; /* Fully shown on mouse-over */
}

/* The slider handle (use -webkit- (Chrome, Opera, Safari, Edge) and -moz- (Firefox) to override default look) */
.slider::-webkit-slider-thumb {
    -webkit-appearance: none; /* Override default look */
    appearance: none;
    width: 25px; /* Set a specific slider handle width */
    height: 25px; /* Slider handle height */
    cursor: pointer; /* Cursor on hover */

    background-color: transparent;
    background-repeat: no-repeat;
    background-size: contain;
    background-image: url('/img/ui/bt PlayerIndex.png');
}

.slider::-moz-range-thumb {
    appearance: none;
    width: 25px; /* Set a specific slider handle width */
    height: 25px; /* Slider handle height */
    cursor: pointer; /* Cursor on hover */

    border: 0;
    background-color: transparent;
    background-repeat: no-repeat;
    background-size: contain;
    background-image: url('/img/ui/bt PlayerIndex.png');
}

* {
    touch-action: manipulation;
}

#stats-overlay {
    position: absolute;
    z-index: 200;
    backface-visibility: hidden;
    cursor: default;

    display: flex;
    flex-direction: column;
    justify-content: space-around;

    top: 1.1em;
    right: 1.1em;
    color: #fff;
    background: #000;
    opacity: .465;

    font-size: 1.1vmin;
    font-family: monospace;
    min-width: 3em;

    padding-right: .2em;

    visibility: hidden;
}

#stats-overlay > div {
    display: flex;
    flex-flow: wrap;
    justify-content: space-between;
    align-items: center;
}

#stats-overlay > div > div {
    display: inline-block;
    font-weight: 500;
}

#stats-overlay .graph {
    width: 100%;
    /* artifacts with pixelated option */
    /*image-rendering: pixelated;*/
    image-rendering: optimizeSpeed;
}

.dpad-toggle-label {
    position: absolute;
    display: inline-block;
    width: 35px;
    height: 20px;

    top: 45px;
    left: 85px;
}

.dpad-toggle-label input {
    opacity: 0;
    width: 0;
    height: 0;
}

.dpad-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #515151;
    transition: .4s;
    border-radius: 20px;
}

.dpad-toggle-slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: #5f5f5f;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .dpad-toggle-slider {
    background-color: #515151;
}

input:checked + .dpad-toggle-slider:before {
    transform: translateX(15px);
}

.source {
    position: fixed;
    bottom: 5px;
    right: 5px;
    color: #dddddd;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
}

.source a {
    color: #dddddd;
}

.touch-menu-icon {
    position: absolute;
    width: 30px;
    height: 30px;
    color: #fff;
    bottom: 22px;
    right: 10px;
    opacity: .5;
    z-index: 9999;
}

.touch-menu-bar {
    position: absolute;
    /*width: 100%;*/
    /*height: 100px;*/
    padding: 10px 14px;
    color: #fff;
    bottom: 50px;
    right: 50px;
    transition: opacity .4s ease-in-out, transform .4s ease-in-out;
    align-items: center;
    display: grid;
    /*一行4个*/
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    text-align: center;
    font-size: 12px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    z-index: 999;
}
