* {
    -webkit-touch-callout: none;
    /* iOS Safari */
    -webkit-user-select: none;
    /* Safari */
    -khtml-user-select: none;
    /* Konqueror HTML */
    -moz-user-select: none;
    /* Firefox */
    -ms-user-select: none;
    /* Internet Explorer/Edge */
    user-select: none;
    cursor: url("../img/cursor.png"), auto;
    box-sizing: border-box;
}

button,
input[type=button],
span[role=button],
a {
    cursor: url("../img/cursor2.png"), auto !important;
}

.handcursor {
    cursor: url("../img/cursor2.png"), auto !important;
}

body {
    padding: 0;
    margin: 0;
    overflow: hidden;
}

#overlays {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 200;
}

#title {
    padding: 10px;
}

#imgpos {
    position: fixed;
    right: 10px;
    bottom: 10px;
}

#canvas {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
}

#connecting {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 100;
    background-color: rgba(0, 0, 0, 0.5);
}

#nick {
    width: 65%;
    float: left;
}

#gamemode {
    width: 33%;
    float: right;
}

.cont {
    padding: 3px 0;
    background: rgb(173, 173, 173);
    color: #EEE;
    border-radius: 5px;
    border: thin solid #444;
    overflow: hidden;
    display: flex;
}

input.star {
    display: none;
}

label.star {
    float: right;
    padding: 5px;
    font-size: 15px;
    color: #444;
    transition: all .2s;
}

input.star:checked~label.star:before {
    content: '\f005';
    color: #FD4;
    transition: all .25s;
}

input.star-5:checked~label.star:before {
    color: #FE7;
    text-shadow: 0 0 15px #952;
}

input.star-1:checked~label.star:before {
    color: #F62;
}

label.star:hover {
    transform: rotate(-15deg) scale(1.3);
}

label.star:before {
    content: '\f006';
    font-family: FontAwesome;
}


#scores {
    position: absolute;
    left: 554px;
    width: 260px;
    top: 50.7%;
    height: 100%;
    background: #FFF;
    border-radius: 5px;
    padding: 1px 1px;
    margin: -3px auto;
    -webkit-transform: translate(-50%, -50%);
    -ms-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
    overflow: hidden;
    box-sizing: border-box;
}

.scrollable-content {
    width: 100%;
    height: 420px;
    /* Adjust height as needed */
    overflow-y: auto;
    /* Enable vertical scrolling */
    overflow-x: hidden;
    /* Hide horizontal scrolling if not needed */
    box-sizing: border-box;
    /* Ensure padding is included in height/width calculations */
    padding: 10px;
    /* Optional padding */
}

#helloDialog {
    position: absolute;
    width: 420px;
    background-color: #FFF;
    margin: 10px auto;
    border-radius: 5px;
    padding: 5px 15px 5px 15px;
    top: 50%;
    left: 50%;
    margin-right: -50%;
    -webkit-transform: translate(-50%, -50%);
    -ms-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
}

#moreInfo {
    position: absolute;
    bottom: 0;
    width: 100%;
    left: 0;
}

.stars {
    position: fixed;
    right: 1px;
    bottom: 0px;
}


#moreInfo span {
    color: #000;
    margin-left: 3px;
}

.rate-stats {
    /* text-align: center; */
}

.rate-stats img {
    margin: 0 0 3px 1px;
}


#leftOptions {
    width: 400px;
    background-color: #FFF;
    margin: 10px auto;
    border-radius: 5px;
    padding: 5px 15px 5px 15px;
    position: absolute;
    top: 47.7%;
    left: -48.5%;
    height: 100%;
    -webkit-transform: translate(-50%, -50%);
    -ms-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
}

.username-text {
    margin-bottom: 5px;
}

.username-text a {
    text-decoration: none;
    color: #44b848
}

#chat {
    position: absolute;
    bottom: 10px;
    left: 10px;
    z-index: 1;
    max-height: 40px;
}

#clearchat,
#possender {
    margin-bottom: 2px;
}

#chat_textbox {
    -webkit-transition: all .5s ease-in-out;
    -moz-transition: all .5s ease-in-out;
    -o-transition: all .5s ease-in-out;
    transition: all .5s ease-in-out;
    z-index: 1;
    border-radius: 5px;
    bottom: 10px;
    background: rgba(0, 0, 0, .8);
    outline: none;
    color: #fff;
    height: 35px;
    text-indent: 12px;
    left: 10px;
    width: 300px;
    border: solid 1px #ccc !important;
}

#resources {
    position: absolute;
    max-width: 170px;
    bottom: 160px;
    right: 20px;
    font-size: 18px;
    width: 150px;
    padding: 5px;
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
    text-align: center;
}

.bomb,
.keys,
.gold {
    width: 100%;
    border-radius: 5px;
    border: 1px dashed rgb(0, 0, 0);
}

#bomb,
#keys,
#gold {
    display: flex;
}

.bomb {
    color: #ff00cc;
}

.keys {
    color: #0099cc;
}

.gold {
    color: gold;
}

#resources img {
    user-drag: none;
    -webkit-user-drag: none;
    user-select: none;
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}

#instructions {
    text-align: center;
}

#chat_textbox:focus {
    background: rgba(0, 0, 0, .5);
}

#footer {
    text-align: center;
    margin-bottom: 10px;
    margin-top: -10px;
}

#play-btn {
    width: 100%;
    float: left;
}

#settings-btn {
    width: 13%;
    float: right;
}

#spectate-btn {
    margin-top: -5px;
}

.checkbox label {
    margin-right: 10px;
}

.mb-10 {
    margin-bottom: 10px;
}

/* === Login Registration Pop === */

.modal-backdrop.fade {
    filter: alpha(opacity=0);
    opacity: 0;
    z-index: -1 !important;
}

.modal {
    display: none;
    position: fixed;
    z-index: 360;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    border: 1px solid #888;
    width: 100%;
}

.modal input[type=text],
input[type=password],
input[type=email] {
    width: 97%;
    margin: 5px;
    padding: 7px;
    background: #ffffcc;
    border: 1px solid #d9d9d9;
    border-top: 1px solid #c0c0c0;
    box-sizing: border-box;
    -moz-box-sizing: border-box;
}

.modal .close {
    border: 0;
    font-size: 25px;
    opacity: 0.7;
}

.login-references {
    position: relative;
    display: flex;
    text-align: center;
    max-width: 50%;
    padding: 5px;
    bottom: 5px;
}

.login-references a {
    opacity: 0.6;
    transition: opacity ease 0.5s;
    text-decoration: none;
    color: #666;
}

.login-references a:hover {
    opacity: 0.9;
}

.overlay {
    width: 400px;
    height: 90%;
    background: rgba(0, 0, 0, .7);
    border-radius: 12px;
    position: fixed;
    left: 50%;
    top: 50%;
    box-shadow: 0px 0px 20px #666;
    padding: 30px;
    transform: translate(-50%, -50%);
    z-index: 300;
}

#cont_overlay {
    line-height: 1;
    position: relative;
    z-index: 4;
    width: 90%;
}

#statsPelletsContainer,
#statsTimeAliveContainer,
#statsHighestMassContainer,
#statsTimeLeaderboardContainer,
#statsPlayerCellsEatenContainer,
#statsTopPositionContainer {
    position: absolute;
    width: 100px;
    height: 100px;
}

#statsPelletsContainer {
    top: 30px;
    left: 50px;
}

#statsHighestMassContainer {
    top: 30px;
    right: 50px;
}

#statsTimeAliveContainer {
    top: 85px;
    left: 50px;
}

#statsTimeLeaderboardContainer {
    top: 85px;
    right: 50px;
}

#statsPlayerCellsEatenContainer {
    top: 140px;
    left: 50px;
}

#statsTopPositionContainer {
    top: 140px;
    right: 50px;
}

#statsText {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    line-height: 100px;
    font-size: 23px;
    color: #3dff44;
    text-align: center;
    font-weight: bold;
}

#statsSubtext {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    line-height: 60px;
    font-size: 10px;
    color: #f8fd23;
    text-align: center;
}

#loading {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    z-index: 9999;
}

#loading img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.controls {
    margin-top: 10px;
    display: flex;
    justify-content: space-evenly;
    gap: 10px;
}

.controls button {
    flex: 1;
    /* Allows the buttons to grow equally */
    max-width: 100%;
    /* Ensures buttons don't exceed the container */
}

.skin-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 80%;
    background-color: white;
    z-index: 999;
    border-radius: 20px;
    box-shadow: 5px 5px 30px rgba(0, 0, 0, 0.2);
    font-family: 'fantasy', cursive;
}

.skin-content {
    padding: 20px;
}

.skin-modal-title {
    text-align: center;
}

.close {
    position: absolute;
    top: 10px;
    right: 10px;
}

.skin-body {
    overflow-y: auto;
    max-height: 73vh;
}

.skin-body ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    list-style-type: none;
}

.skin-body ul li {
    margin: 5px;
    flex: 1 0 calc(10% - 20px);
    /* Adjust the width as needed */
    text-align: center;
}

.circular {
    position: relative;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background-color: #3498db;
    color: #fff;
    text-align: center;
    font-size: 18px;
}

#btn_settings img {
    transition: transform 0.3s ease;
    /* Add transition for smooth animation */
}

#btn_settings:hover img {
    animation: rotateBack 0.6s ease;
    /* Apply animation on hover */
}

#btn_settings:active img {
    animation: zoomAndBack 0.3s ease;
    /* Apply animation on click */
}

#notification {
    display: block;
    position: absolute;
    background-color: rgba(0, 0, 0, .6);
    color: #FFF;
    padding: 10px 10px 2px 10px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    right: 10px;
    top: 84px;
    text-align: center;
    line-height: 0.5;
    z-index: 9999;
}

#notification img {
    width: 12px;
    margin-top: 4px;
}

.lang-details {
    position: absolute;
    bottom: 1px;
    left: 1px;
    display: flex;
}

.em-ad {
    padding: 5px;
}

.lang {
    padding: 5px;
    position: fixed;
    right: 1px;
    bottom: 1px;
}

.lang img {
    margin: 4px;
}

.ufps {
    position: absolute;
    left: 49%;
    top: 5px;
    z-index: 2;
    color: #952;
    font-weight: bold;
}

.score-table th {
    text-align: center;
}

.score-table td:nth-of-type(2),
.score-table td:nth-of-type(3) {
    padding-left: 30px;
}

.score-table tr {
    width: 100%;
}

.score-table tr:hover {
    background-color: #f0f0f0;
}

#scores p.scores-title {
    font-weight: bold;
    font-size: 16px;
    text-align: center;
    color: var(--bs-secondary-color);
    margin-top: 2px;
}

.top10s {
    padding: 4px 5px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
    color: #333;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    text-align: center;
    width: 40px;
}

/* Modal content */
.score-modal {
    background-color: #d7d7d7;
    margin: 5% auto;
    padding: 4px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    display: flex;
    /* Use flexbox for layout */
    justify-content: space-between;
    /* Align items to the start and end */
}

/* Header */
.score-modal h2 {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

/* User details */
.score-modal p {
    color: #666;
    margin-bottom: 10px;
}

.score-modal{
    width: 60%;
    min-height: 500px;
}

/* Close button */
.close-custommodal {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 34px !important;
    color: #555;
    cursor: pointer;
    z-index: 15;
}

.close-custommodal:hover,
.close-custommodal:focus {
    color: #ff0000;
}

.user-info {
    display: grid;
    text-align: left;
    grid-template-columns: auto auto;
}

.user-info p {
    text-align: right;
}

.user-info span {
    color: #66F;
    margin-left: 10px;
    font-weight: bold;
}

#user-data-modal {
    margin-top: 10px;
}

@keyframes rotateBack {
    0% {
        transform: rotate(90deg);
        /* Rotate image to 90 degrees */
    }

    100% {
        transform: rotate(0deg);
        /* Rotate image back to 0 degrees */
    }
}

@keyframes zoomAndBack {
    0% {
        transform: scale(1);
        /* Original scale */
    }

    50% {
        transform: scale(0.9);
        /* Zoomed scale */
    }

    100% {
        transform: scale(1);
        /* Back to original scale */
    }
}


/* Styles for screens with a width up to 768px (when decreasing) */
@media (max-width: 768px) {
    #leftOptions {
        position: fixed;
        top: 61%;
        left: 50%;
        height: 63%;
        overflow-y: auto;
        z-index: 1;
    }

    hr {
        z-index: 0;
    }

    #scores {
        position: fixed;
        top: -22%;
        left: 50%;
        /* font-size: 10px; */
        width: 100%;
        height: 43%;
        max-height: 65%;
        overflow: auto;
        max-height: 45%;
    }

    #helloDialog * {
        font-size: 14px;
    }

    #register-modal *,
    #login-modal * {
        font-size: 13px;
    }

    #register-modal button,
    #login-modal button {
        padding: 3px;
    }

    #resources {
        right: 4px;
    }

    #moreInfo {
        position: relative;
    }

    .lang-details {
        position: relative;
        margin-top: 5px;
    }

    #customModal * {
        font-size: 10px;
    }
}

/* Styles for screens with a width between 769px and 1024px */
@media (min-width: 769px) and (max-width: 1100px) {
    #helloDialog {
        left: 56.5%;
    }
}