@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;
}

#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;
}


#circle-pad-holder {
    display: block;
    width: 100px;
    height: 100px;
    position: absolute;
    top: 155px;
    left: 22px;
    background-size: contain;
    background-image: url('/img/ui/bt MOVE.png');
    z-index: 1;
}

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

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

    user-select: none;
}

#circle-pad {
    display: block;
    width: 69px;
    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-image: url('/img/ui/bong full.png') !important;
}

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

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

#btn-up {
    top: 18px;
    left: 50%;
    border-bottom: 0;
    border-radius: 3px;
    transform: translateX(-50%);
}

#btn-down {
    bottom: 18px;
    left: 50%;
    border-top: 0;
    border-radius: 3px;
    transform: translateX(-50%);
}


#btn-left {
    left: 18px;
    top: 50%;
    border-right: 0;
    border-radius: 3px;
    transform: translateY(-50%);
}

#btn-right {
    right: 18px;
    top: 50%;
    border-left: 0;
    border-radius: 3px;
    transform: translateY(-50%);
}

#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: 30px;
    background-size: contain;
    position: absolute;
    background-repeat: no-repeat;
}


.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 {
    top: 20px;
    left: 435px;

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

#btn-save {
    top: 60px;
    left: 435px;

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

#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-select {
    width: 46px;
    top: 100px;
    left: 435px;
    height: 25px;

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

#btn-start {
    width: 46px;
    top: 100px;
    left: 489px;

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

#btn-a {
    top: 50%;
    right: 0;

    transform: translateY(-50%);

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


#btn-b {
    bottom: 0;
    left: 50%;

    transform: translateX(-50%);

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

#btn-x {
    top: 0;
    left: 50%;
    transform: translateX(-50%);

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


#btn-y {
    top: 50%;
    left: 0;
    transform: translateY(-50%);

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

#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: #333 !important;
    opacity: 0.75;
}

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

#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: 10px;
    width: 130px;
    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;
}

.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;
}


/* ===== REMILIA ARCADE THEME v5 ===== */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;700;800&family=Space+Grotesk:wght@400;500;700&display=swap');

body {
    background: radial-gradient(ellipse at 55% 0%, #2a0a3a 0%, #0d0d1a 55%, #050510 100%) !important;
    background-image: none !important;
    min-height: 100vh;
}

/* Controller shell — replace grey with dark purple */
#gamebody {
    background-image: none !important;
    background: linear-gradient(160deg, #1a0a28 0%, #0e0618 60%, #120820 100%) !important;
    border: 1px solid rgba(160,80,255,0.35) !important;
    box-shadow: 0 0 40px rgba(140,40,220,0.25), inset 0 0 60px rgba(0,0,0,0.6) !important;
    border-radius: 28px !important;
}

/* Screen border glow */
#screen {
    box-shadow: 0 0 6px 3px rgba(180,80,255,0.5), 0 0 2px 2px rgba(25,25,25,1) !important;
}

/* Buttons */
.btn { filter: hue-rotate(270deg) saturate(0.6) brightness(0.8); }
.btn:active { filter: hue-rotate(270deg) saturate(1.2) brightness(1.1); }
.pressed { filter: hue-rotate(270deg) saturate(1.5) brightness(1.3) !important; }
#btn-a, #btn-b, #btn-x, #btn-y { filter: hue-rotate(250deg) saturate(0.8) brightness(0.9); }

/* Guide text */
#guide-txt { color: #9060c0 !important; font-size: 9px !important; }

/* Room text input */
#room-txt { color: #c090e0; }

/* Player slot container */
#slider-playeridx {
    display: block !important;
    position: absolute !important;
    top: 85px !important;
    left: 8px !important;
    width: 136px !important;
    user-select: none;
    background: rgba(15,5,30,0.92) !important;
    border: 1px solid rgba(180,80,240,0.45) !important;
    border-radius: 10px !important;
    padding: 6px 6px 8px !important;
    color: #bababa;
    text-align: center;
}
.slider.hidden { display: none !important; }
.pslot-label {
    font-family: 'Nunito', sans-serif !important;
    font-weight: 800 !important; font-size: 10px !important;
    color: #e0b0ff !important; text-align: center;
    display: block; margin-bottom: 2px; letter-spacing: 0.5px;
}
.pslot-hint {
    font-family: 'Nunito', sans-serif !important;
    font-size: 8px !important; color: #ff9ecc !important;
    text-align: center; display: block; margin-bottom: 5px;
}
.pslot-btns {
    display: flex !important; gap: 4px !important;
    justify-content: center !important; flex-wrap: nowrap;
}
.pslot-btn {
    background: rgba(40,10,60,0.95) !important;
    border: 1px solid rgba(150,70,210,0.6) !important;
    color: #c090e0 !important;
    font-family: 'Space Grotesk', sans-serif !important;
    font-weight: 700 !important; font-size: 11px !important;
    padding: 5px 0 !important; border-radius: 7px !important;
    cursor: pointer !important; transition: all 0.15s;
    min-width: 28px !important; flex: 1;
}
.pslot-btn:hover {
    background: rgba(100,30,160,0.8) !important;
    border-color: #c060ff !important; color: #fff !important;
}
.pslot-btn.active {
    background: linear-gradient(135deg, #7c2fd4, #e84c8e) !important;
    border-color: #ff80cc !important; color: #fff !important;
    box-shadow: 0 0 10px rgba(232,76,142,0.7) !important;
}

/* Remilia header bar */
#rem-header {
    position: fixed; top: 0; left: 0; right: 0;
    height: 34px; z-index: 2000;
    display: flex !important; align-items: center; gap: 10px;
    padding: 0 16px;
    background: rgba(6,3,16,0.96);
    border-bottom: 1px solid rgba(160,80,255,0.3);
    backdrop-filter: blur(10px);
}
.rem-header-link {
    font-family: 'Nunito', sans-serif !important;
    font-size: 13px !important; font-weight: 800 !important;
    color: #e0a0ff !important; text-decoration: none !important;
    letter-spacing: 0.5px;
}
.rem-header-link:hover { color: #ff80cc !important; }
.rem-header-title {
    font-family: 'Space Grotesk', sans-serif !important;
    font-size: 10px !important; font-weight: 700 !important;
    color: #7040a0 !important; letter-spacing: 3px;
    text-transform: uppercase;
}
#rem-username {
    margin-left: auto !important;
    font-family: 'Nunito', sans-serif !important;
    font-size: 11px !important; font-weight: 700 !important;
    color: #ff9ecc !important;
}

/* Notification box */
#noti-box {
    background: rgba(20,10,40,0.97) !important;
    color: #e0c0ff !important;
    border: 1px solid rgba(160,80,255,0.5) !important;
}

/* Source / footer link */
.source { font-family: 'Nunito', sans-serif !important; }
.rem-back-link { color: #c080ff !important; font-size: 11px !important; text-decoration: none !important; font-weight: 700 !important; text-shadow: 0 0 8px rgba(192,128,255,0.5); }
.rem-back-link:hover { color: #ff80cc !important; }

/* Dpad toggle */
.dpad-toggle-slider { background-color: #2a1045 !important; }
input:checked + .dpad-toggle-slider { background-color: #6020b0 !important; }
.dpad-toggle-slider:before { background-color: #9060d0 !important; }

/* Settings panel */
.panel { background: #0d0820 !important; color: #d0b0f0 !important; }
.panel__header { background: #180b30 !important; }
.panel__button { background: #1a0d35 !important; color: #c090e0 !important; }
.panel__button:hover { background: #6020b0 !important; color: #fff !important; }
