body {
    background-color: black;
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
}

#landscape-prompt {
    font-size: 2.5em;
    text-align: center;
    position: absolute;
    display: none;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 2000;
    padding-top: 10%;
    background-color: black;
    color: whitesmoke;
    /* padding: 20% 20% 20% 20%; */
    p{
        margin-left: 15%;
        margin-right: 15%;
    }

    button {
        font-size: 1.5em;
        aspect-ratio: 2.5 / 1;
        max-width: 60%;
        border-radius: 10% 0 10% 0;
        font-family: inherit;
        opacity: 90%;
        background-image: linear-gradient( white, lightgray);
        /* border-bottom: 2px solid grey; */
    }
}

.game-div {
    border-radius: 10px 10px 0 0;
    border: 5px solid rgb(73, 73, 73);
    display: block;
    height: 94vh;
    width: 94vw;
    margin: auto;
    padding: 0;
}
.game-div.fullscreen {
    box-sizing: border-box;
    height: 100vh;
    width: 100vw;
    border-radius: 0;
    /* border: 2px solid rgb(73, 73, 73); */
    border: none;
    margin: 0;
}
.game-bar {
    --bar-height: 30px;
    position: relative;
    border: 5px solid rgb(73, 73, 73);
    border-radius: 0 0 10px 10px;
    background-color: black;
    width: 100%;
    height: var(--bar-height);
    transform: translate(-5px, -7px);
    text-align: right;
    box-sizing: content-box;
    z-index: 600;
}
.game-bar.overlay {
    margin: 0;
    position: absolute;
    bottom: 0;
    right: 0;
    transform: translate(0,0);
    border: none;
    background-color: transparent;
    pointer-events: none;
    * {
        pointer-events: all;
    }
    /* transform: translateY(-60px); */
}
.game-bar.overlay.top {
    bottom: auto;
    top:0;
}
@media (max-width: 1024px) {
    html {
        font-size: clamp(12px, 1.5vw, 16px);
    }
    .game-bar {
    --bar-height: 50px;
    }
}
.game-view {
    background-color: black;
    position: relative;
    padding: 0; margin:0;
    height: 100%;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
}
.split-screen-div {
    position: relative;
    /* 
    display: block;
    width: fit-content;
    height: fit-content;
    margin: 0;
    * {
        position: absolute;
    } */
}
@keyframes spin {
    from {
        transform:rotate(0deg);
    }
    to {
        transform:rotate(360deg);
    }
}
h2 {
    font-size: 1.3em;
    font-weight: 100;
    letter-spacing: 0.2em;
    font-style: italic;
    margin: 0;
}
.smallprint {
    margin-top: 10px;
    width: 280px;
    display: block;
    font-weight: 50;
    font-style: italic;
    font-size: 0.7em;
    font-family: Arial, Helvetica, sans-serif;
    letter-spacing: 0.05em;
    
}
.menu-div {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;height: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    color: whitesmoke;
    font-size: 1.2rem;
    z-index: 200;

    ul {
        margin: 0; padding: 0;
        list-style-type: none;
        li {margin-left:0;}
    }
    
    ul.horizontal{
        display: block;
        width: fit-content;
    }
    .horizontal > li
    {
        display: inline-block;
        margin-right: 5px;
        vertical-align: middle;
    }
    .b0, .b1, .b2, .b3 {
        font-size: inherit;
        background-color: transparent;
        border: none;
        font-family: inherit;
        color: inherit;
        padding: 0, 5px;
        border-radius: 0.3em 0 0.3em 0;
        transition: all 0.1s;
    }
    .b1 {
        margin-top: 8px;
        background-color: darkgray;
        color: black;
    }
    .b3 {
        border-radius: 0 0 0.5em 0;
        background-color: rgb(37, 37, 37);
        color: lightgray;
        font-size: 1.05em;
        padding: 0.25em;
        margin-top: 10px;
    }
    .b3.highlight{
        background-color: lightgray;
        color: black;
    }
    .b0.menu-selected, .b1.menu-selected, .b2.menu-selected, .b3.menu-selected{
        transform: translateX(3px);
        background-color: whitesmoke;
        color: black;
    }
    .b2 {border-radius: 0;}
    .b2.highlight{
        transform: scale(1.2);
        margin-right: 10px;
        margin-left: 15px;
        border-left: 1px solid gray;
        border-right: 1px solid gray;
    }
    
    .b2.highlight::before{
        content: "*";
    }
    .highlight.b3::before{
        content: "> ";
    }
    .lgoutbtn.menu-selected::after {
        content: " - LOGOUT";
    }
    .invalidated {
        background-color: rgb(192, 15, 15);
        text-decoration: line-through;
    }
    .close-btn {
        position: absolute;
        display: block;
        height: 20px; width: 20px;
        top:0;
        right:0;
        font-family: Arial, Helvetica, sans-serif;
        font-weight: 200;
        font-size: 0.8em;
        padding: 0 0 20px 0;
        color: whitesmoke;
        background-color: gray;
        border:  none;
    }
    .close-btn.menu-selected{
        color: black; background-color: whitesmoke;
    }
    .title-div{
        position: absolute;
        left:7%;
        top:30%;
        ul {margin-left: 10px;}
        h1 {margin: 3px;}
    }
    .center-div{
        display: block;
        position: relative;
        width: fit-content; height: fit-content;
        min-width: 300px;
        max-width: 500px;
        margin: auto;
        margin-top:15%;
        h1 {margin: 3px;}
        form {margin-left: 5px; margin-top: 10px;}
    }
    .top-center-div{
        display: block;
        position: relative;
        width: fit-content; height: fit-content;
        min-width: 300px;
        max-width: 500px;
        margin: auto;
        margin-top:5%;
        h1 {margin: 3px;}
        form {margin-left: 5px; margin-top: 10px;}
    }
    .top-right-div{
        display: block;
        position: relative;
        right: 0;
        width: fit-content; height: fit-content;
        min-width: 300px;
        max-width: 500px;
        margin-top:1%;
        h1 {margin: 3px;}
        form {margin-left: 5px; margin-top: 10px;}
    }
    .popup-select-div
    {
        min-width: 50vw;
        h1
        {
            margin-left: 50px;
        }
        /* background-color: red; */
        ul
        {

        }
        .description-div
        {
            background-color: red;
        }

    }
    .select-and-desc-grid
    {
        padding-top: 10px;
        display: grid;
        grid-template-columns: 1fr 1fr;
        height: 50vh;
        min-height: 400px;
        
        > div:nth-child(1)
        {
            max-height: 60vh;
            overflow-y: scroll;
            scrollbar-width: none;
            -ms-overflow-style: none;
            
            padding-right: 8px;
            border-right: 2px solid whitesmoke;
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            align-content: flex-start; 
            justify-content: end;
            /* FIXES: */
            flex: 0 1 auto;       /* Stops the element from growing into empty space */
            width: fit-content;   /* Forces the width to strictly match the wrapped content */
            button {
                /* width: 6vw; */
                border: 1px solid gray;
            }
            button.menu-selected {
                border: 1px solid whitesmoke;
            }
        }
        > div:nth-child(1)::-webkit-scrollbar {
            display: none;
        }
        
        > div:nth-child(2)
        {
            * {
                margin-left: 0.8em;
            }
            img {
                margin-left: 0em;
                width: 100%;
                background-color: rgb(39, 41, 43);
                aspect-ratio: 16 / 9;   
                object-fit: cover;  
            }
        }
    }
    #playerinp-div
    {
        min-width: 500px;
        .rowcard-list {
            display: inline-block;
            width: 60%;
            min-height: 8em;
            height: 8em;
            margin: 10px 0 0 0;
        }
        #bindings-list {width: 28%;}
    }
    .mainmenu-div{
        position: absolute;
        left:7%;
        top:15%;
        h1 {margin-left: -10px;}
    }
    .clps-btn-row {
        overflow: hidden;
        width: fit-content;
        height: 1.4em;
        /* border-bottom: 2px solid gray; */
        transition: all 0.2s;
        margin-bottom: 10px;
        h2 {border-bottom: 2px solid gray; margin-bottom: 4px;}
    }
    .clps-btn-row.expanded { height: 3.5em; }
    /* //ul {border-bottom: 1px solid whitesmoke;}} */
    
    #stopfinding-btn.stoppable.menu-selected::before {
        content: "Stop ";
    }
    .loading-prefix::after {
        display: inline-block;
        font-style: normal;
        font-size: 1em;
        font-weight: 100;
        letter-spacing: 0;
        margin: 0;
        padding: 0;
        content: "◐";
        
        animation-name: spin;
        animation-duration: 700ms;
        animation-iteration-count: infinite;
        animation-timing-function: linear; 
    }
    .loadscreen-div{
        display: block;
        margin: auto;
        width: fit-content;
        height: fit-content;
        margin-top: 22%;
    }
    .top-right-div{
        text-align: right;
        position: absolute;
        right:3%;
        top:3%;
    }
    .full-div{
        width: 100%;
        height: 100%;
        pointer-events: "none";
    }
    #leaderboard{
        text-align: left;
        margin: 0;
        background-color: rgba(0,0,0,0.4);
        display: block;
        width: 250px;
        min-height: 1em;
    }
    .leaderboard-row
    {
        font-size: 0.6em;
        font-family: Arial, Helvetica, sans-serif;
        font-weight: normal;
        padding: 2px;
        border-bottom: 1px solid black;
    }
    .leaderboard-row:nth-child(odd)
    {
        background-color: rgba(0,0,0,0.3);
    }
    .leaderboard-row.party
    {
        background-color: rgba(0,0,150,0.3);
    }
    .leaderboard-row.party:nth-child(odd)
    {
        background-color: rgba(0,0,150,0.4);
    }
    .leaderboard-row.party.leader
    {
        background-color: rgba(0,0,200,0.5);
    }
    .leaderboard-row span
    {
        display: inline-block;
        margin: 0;
        padding: 0;
    }
    .leaderboard-row span:nth-child(1)
    {
        width: 60%;
    }
    .leaderboard-row span:nth-child(2)
    {
        width: 40%;
        text-align: right;
    }
    
    
    .code {
        user-select: all;
        width: 5em;
        background-color: whitesmoke;
        color: black;
        padding: 2px 5px;
        font-size: 0.85em;
        font-weight: bold;
        font-family: Arial, Helvetica, sans-serif;
        outline: none;
    }
    .rowcard-list{
        font-size: 0.9em;
        font-weight: normal;
        
        display: block;
        width: 90%;
        margin-top: 10px;
        margin-left: 15px;
        padding:0;
        background-color: rgba(150,150,150,0.1);
        max-height: 14em;
        min-height: 6em;
        overflow-y: scroll;
        overflow-x: hidden;
    }
    #lobby-list {width: 80%;}
    
    .rowcard-list-title
        {
            padding: 2px 5px;
            background-color: rgba(150,150,150,0.1);
            display: inline-block;
            width: 100%;
            color: lightgray;
            border-bottom: 2px solid rgb(30,30,30);
        }
    .rowcard {
        font-size: 0.8em;
        display: inline-block;
        background-color: rgba(40,40,40,0.4);
        border: none;
        text-align: left;
        border-bottom: 2px solid rgb(30,30,30);
        padding: 5px 10px;
        border-radius: 4px;
        width: 95%;
        color: lightgray;
        font-family: Arial, Helvetica, sans-serif;
    }
    button.rowcard * {
            pointer-events: none;
        }
    button.rowcard.menu-selected {
        background-color: rgba(80,80,80,0.4);
        cursor: pointer;
        color: whitesmoke;
    }
    .rowcard span {
        display: inline-block;
        width: 30%; 
    }
    .rowcard button {
        margin-left: 4px;
        margin-right: 2px;
        height: 20px;
    }
    .rowcard span:nth-child(1)
    {
        width: 7%;
    }
    .rowcard span:nth-child(2)
    {
        width: 30%;
    }
     .rowcard span:nth-child(3)
    {
        width: 56%;
        text-align: right;
    }
    #inpmeth-btn {
        max-width: 120px;
        overflow: hidden;
    }
    .bg-overlay{
        background-color: rgba(0,0,0,0.5);
        backdrop-filter: blur(5px);
    }
}
.select-btn-img {
    display: block;
    background-color: rgb(39, 41, 43);
    border: 1px solid rgb(230, 230, 230);
    border-radius: 0;
    width: 8vw;
    min-width: 110px;
    aspect-ratio: 16 / 9;   
    object-fit: cover;  
    padding: 0;
    text-align: left;
    display: flex;

    span {
        /* display: block; */
        font-weight: bold;
        display: inline-block;
        align-self: flex-end;
        height: fit-content;
        margin: 5px;
        padding: 0;
        color: rgb(201, 201, 201);
        pointer-events: none;
        /* color: reda; */
    }
}
.select-btn-img.menu-selected {
    border: 2px solid white;
    span
    {
        margin-bottom: 4px;
        color: white;
        padding-left: 5px;
    }
}

input.menu-selected:not([type="submit"]):not(.code)
{
    /* border-color: black; */
    transform: scale(1.05) translateX(6px);
}
input:focus:not([type="submit"]):not(.code)
{
    outline: auto;
    outline-color: black;
}
.code.menu-selected {
    background-color: lightblue;
    outline: auto;
}

.m-layer-0 {z-index: 1; }
.m-layer-1 {z-index: 2; }
.m-layer-2 {z-index: 3; }
.m-layer-3 {z-index: 4; }
.m-layer-0, .m-layer-1, .m-layer-2, .m-layer-3, .loading-screen
{
    display: inline-block;
    padding: 0; margin: 0; width:100%; height:100%;
    transition: background-color 0.5s;
    position: absolute;
}
.loading-screen
{
    z-index: 20;
}

.centralised-div:has(.crosshair-div) {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

#match-header {
    display: block;
    width: fit-content;
    height: 100px;
    position: absolute;
    top: 2px;
    left: 50%;
    transform: translateX(-50%);
    > span { 
        text-align: center;
        display: inline-block; width: 3em;
        transform: translateY(-0.2em);
    }
}
#weapon-stats {
    display: block;
    width: fit-content;
    height: fit-content;
    position: absolute;
    bottom: 5%;
    right: 10%;
    font-size: 1.5em;
    /* background-color: red; */
    max-width: 20%;
    min-width: 8%;
    max-height: 20%;
    min-height: 8%;
    > span {
        width: fit-content;
        text-align: right;
    }
    /* transform: translateX(-50%); */
}
.progress-bar {
    --fullamnt: 0;
    display: inline-block;
    position: relative;
    width: 100px;
    height: 20px;
    border: 1px solid whitesmoke;
    span {
        position: absolute;
        padding: 0 5px 0 5px;
    }
    div {
        opacity: 0.8;
        top: 0;
        box-sizing: border-box;
        position: absolute;
        display: block;
        width: calc(var(--fullamnt) * 100%);
        height: 100%;
        background-color: skyblue;
        /* border-left: 2px solid rgb(207, 220, 224); */
    }
}

.crosshair-div {
    display: block;
    box-sizing: border-box;
    aspect-ratio: 1 / 1;
    /* background-color: green; */
    padding: 0;
    margin: 0;
    --cshr-speed: 0.3s;
    height: var(--cshr-size);
    transition: var(--cshr-speed);
    transform: rotate(var(--cshr-rotation));
    --cshr-line-offset: 75%;

    .circle-crosshair {
        box-sizing: border-box;
        border: 1.8px solid var(--cshr-color);
        border-radius: 50%;
        width: 100%;
        height: 100%;
        padding: 0;
        margin: 0;
    }
    .lines-crosshair {
        position: relative;
        box-sizing: border-box;
        width: 100%;
        height: 100%;
        padding: 0;
        margin: 0;

        span {
            transform-origin: 0% 25%;
            position: absolute;
            display: block;
            border-top: 1.8px solid var(--cshr-color);
            width: 25%;
            height: 1px;
            top: 50%;
            left: 50%;
            transition: var(--cshr-speed);
        }
    }
    .lines-crosshair span:nth-child(1) {
        transform: rotate(0deg) translateX(var(--cshr-line-offset));
    }
    .lines-crosshair span:nth-child(2) {
        transform: rotate(90deg) translateX(var(--cshr-line-offset));
    }
    .lines-crosshair span:nth-child(3) {
        transform: rotate(180deg) translateX(var(--cshr-line-offset));
    }
    .lines-crosshair span:nth-child(4) {
        transform: rotate(270deg) translateX(var(--cshr-line-offset));
    }
}
.hitmarker-div {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%; height: 100%;
    /* top: 8%; */
    /* height: 90%; */
    /* aspect-ratio: 1 / 1; */
    div
    {
        top: 0;
        left: 0;
        position: absolute;
        --angle-dir: 180deg;
        background: linear-gradient(var(--angle-dir), rgb(255 0 0 / 0.8), transparent 70.71%);
        display: block;
        /* background-color: red; */
        width: 100%;
        height: 100%;
    }
    /* div {
        --angle-dir: 180deg;
        position: absolute;
        display: block;
        width: 20%;
        height: 37%;
        left:50%;
        top: 50%;
        color: red;
        transform-origin: 50% 100%;
        transform: translate(-50%, -100%) rotate(var(--angle-dir));
        span {
            display: block;
            width: 100%;
            text-align: center;
            transform: scale(5, 1.7);
        }
    } */
}
/* .jam-screen {
    top: 0;
    left: 0;
    position: absolute;
    background: linear-gradient(0deg, rgb(255 0 0 / 0.8), transparent 70.71%);
    display: block;
    width: 100%;
    height: 100%;
} */
.fullscreen-button {
    background-color: transparent;
    display: inline-block;
    width: var(--bar-height);
    height: var(--bar-height);
    padding:0;
    border-radius: 0;
    border: none;
    --scale-dir: -1;
    --btn-scale: 1;
}
.fullscreen-button div{
    display: block;
    width: 100%;
    height: 100%;
    padding:0;
    transition: all 0.2s ease;
    color: gray;
    font-size: var(--bar-height);
    display: flex;
    justify-content: center;
    align-items: center;
    transform: scale(var(--btn-scale));
    /* border: 2px solid gray; */
    
    /* span {
        padding: 0;
        display: block;
        text-align: center;
        width: 100%;
        height: 40%;
        margin: 0;
        font-size: 1em;
        padding-top: 10%;
        font-weight: bolder;
        /* letter-spacing: calc(var(--bar-height) * 0.05); */
    /* } */
    /* span:nth-child(2)
    {
        transform: rotate(180deg);
    } */
}
.fullscreen-button:hover {
    div {
        transform: scale(calc(var(--btn-scale) + (0.2 * var(--scale-dir))));
        color: whitesmoke;
        /* border: 2px solid white; */
    }
}

.touch-screen-div{
    --inp-color: rgba(245, 245, 245, 0.696);
    position: absolute;
    top:0;
    display: block;
    left:0;
    width: 100%;
    height: 100%;
    pointer-events: all;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
    /* background-color: green; */
    /* z-index: 200; */
    *{
        pointer-events: none;
    }
    div
    {
        position: absolute;
        display: block;
        border: 1px solid var(--inp-color);
        color: var(--inp-color);
        
    }
    #gameplay-pause-btn{
        pointer-events: all;
        position: absolute;
        top: 6px;
        left: 6px;
        height: 40px;
        width: 40px;
        font-size: 1.7em;
        padding: 0;
        display: flex;
        justify-content: center;
        align-items: center;
        background-color: transparent;
        color: gray;
        border: none;
    }
    .tap-marker {
        --scale: 1;
        --opacity: 0;
        border: 1px solid white;
        opacity: var(--opacity);
        width: 30px;
        height: 30px;
        border-radius: 50%;
        transform: scale(var(--scale));
    }
    .aim-tap-marker {
        --opacity: 0;
        --color: 0;
        display: block;
        position: absolute;
        /* filter: saturate(var(--saturation)) invert(calc(1 - var(--saturation))) brightness(100); */
        opacity: var(--opacity);
        width: 100px;
        height: 100px;
        border: 1px solid var(--color);
    }
    .aim-corner-marker {
        display: block;
        position: absolute;
        width: 50px;
        height: 50px;
        opacity: 0;
    }
    .thumbstick
    {
        --box-opacity: 0;
        --circle-scale: 90%;
        --angle: 0deg;
        --pad-opacity: 0;
        --mag: 1px;
        --x-move: 0;
        --y-move: 0;
        /* background-color: green; */
        /* border: 1px solid var(--inp-color); */
        opacity: calc((var(--pad-opacity) * 0.25) + 0.5);
        /* border-radius: 50%; */
        border: none;
        margin: 0;
        padding: 0;
        span
        {
            display: block;
            width: 100%;
            height: 100%;
            border: 1px solid var(--inp-color);
            position: absolute;
            top: 0; left: 0;
            border-radius: 50%;
            transform: scale(var(--circle-scale));
        }
        > div
        {
            position: relative;
            display: block;
            width: 30px;
            height: 30px;
            border: none;
            /* background-color: var(--inp-color); */
            opacity: var(--pad-opacity);
            /* color: var(--inp-color); */
            /* border-radius: 50%; */
            transform: rotate(var(--angle));
            img
            {
                width: 100%;
                height: 100%;
                transform: scale(50%);
            }
            div
            {
                width: 1px;
                /* background-color: var(--inp-color); */
                border: none;
                border-left: 2px dashed var(--inp-color);
                height: var(--mag);
                transform: translate(14px, 14px) scaleX(50%);
            }
        }
    }
    .thumbstick::after
    {
        display: block;
        position: absolute;
        left: 46%;
        top: 46%;
        width: 6%;
        height: 6%;
        content: "";
        border: 1px solid var(--inp-color);
        margin: 0;
        background-color: rgba(255,255,255, var(--box-opacity));
        opacity: var(--pad-opacity);
        transform: translate(calc(var(--x-move) * 8px), calc(var(--y-move) * -8px)) scale(calc(10 - (var(--circle-scale) * 10)));/*translate(calc(var(--x-move) * 15px), calc(var(--y-move) * 15px));
        /* background-color: red; */
        /* border-radius: 0%; */
        /* transform: translate(50%, 50%); */
    }
    .touch-btn
    {
        text-align: center;
        display: block;
        position: absolute;
        border-color: rgba(255,255,255, 0.5);
    }
    .touch-btn.pressed
    {
        font-weight: bold;
        border-color: white;
        border-color: rgba(255,255,255, 1);
        opacity: 1;
        background-color: rgba(255,255,255,0.2);
    }
}