::before,
::after {
    box-sizing: border-box;
}

:root {
    color-scheme: only light;
}

html,
body {
    margin: 0px;
    padding: 0px;
    overflow: hidden;
    width: 100%;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-user-drag: none;
}

body {
    font-family: sans-serif;
}

img {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-user-drag: none;
}

#gameCanvas {
    display: block;
    background-color: #798e62; /*#768f5a;*/
}

#eventDetector {
    display: block;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#gameUI {
    display: block;
    position: absolute;
    pointer-events: none;
    width: 100%;
    height: 100%;
    z-index: 2;
}

#mainMenu {
    background-color: rgba(0, 0, 0, 0.5);
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 10;
}

#menuContainer {
    width: 100%;
    white-space: nowrap;
    text-align: center;
    position: absolute;
    top: 45%;
    transform: translateY(-50%);
    -ms-transform: translateY(-50%);
    -moz-transform: translateY(-50%);
    -webkit-transform: translateY(-50%);
    -o-transform: translateY(-50%);
}

#gameName {
    font-size: 140px;
    color: #fff;
    text-shadow:
        0 1px 0 #c4c4c4,
        0 2px 0 #c4c4c4,
        0 3px 0 #c4c4c4,
        0 4px 0 #c4c4c4,
        0 5px 0 #c4c4c4;
}

#menuHolder {
    margin-top: 10px;
}

.menuCard {
    vertical-align: top;
    text-align: left;
    white-space: normal;
    word-wrap: break-word;
    margin: 5px;
    display: inline-block;
    width: 300px;
    padding: 18px;
    background-color: #fff;
    -moz-box-shadow: 0px 7px #c4c4c4;
    -webkit-box-shadow: 0px 7px #c4c4c4;
    box-shadow: 0px 7px #c4c4c4;
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    border-radius: 4px;
    overflow: hidden;
}

#mainCard {
    width: 260px;
    margin-top: 4px;
}

#nameInput {
    text-align: center;
    font-size: 26px;
    margin-bottom: 16px;
    padding: 6px;
    border: none;
    outline: none;
    box-sizing: border-box;
    color: #4A4A4A;
    background-color: #e5e3e3;
    width: 100%;
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    border-radius: 4px;
}

.menuButton {
    text-align: center;
    font-size: 23px;
    padding: 6px;
    box-sizing: border-box;
    color: #fff;
    background-color: #7ee559;
    width: 100%;
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    border-radius: 4px;
    cursor: pointer;
}

.menuButton:hover {
    background-color: #6fc94e;
}

#chatHolder {
    position: absolute;
    bottom: 200px;
    width: 100%;
    text-align: center;
}

#chatBox {
    padding: 6px;
    font-size: 20px;
    color: #fff;
    background-color: rgba(0, 0, 0, 0.25);
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    border-radius: 4px;
    pointer-events: all;
    border: 0px;
}

#chatBox:focus {
    outline: none;
}

#storeButton {
    background-image: url(../img/UI/icon_shop.png);
    background-size: 34px;
    background-repeat: no-repeat;
    background-position: bottom 1px center;
    right: 215px;
    width: 25px;
    height: 25px;
}

#storeMenu,
#clanMenu,
#roomMenu {
    display: none;
    width: 100%;
    position: absolute;
    text-align: center;
    top: 50%;
    transform: translateY(-50%);
    -ms-transform: translateY(-50%);
    -moz-transform: translateY(-50%);
    -webkit-transform: translateY(-50%);
    -o-transform: translateY(-50%);
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}

#storeHolder,
#clanHolder,
#roomHolder {
    pointer-events: all;
    width: 200px;
    display: inline-block;
    background-color: rgba(0, 0, 0, 0.25);
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    border-radius: 4px;
    color: #fff;
    padding-left: 10px;
    padding-right: 10px;
    height: 100px;
    max-height: calc(100vh - 200px);
    overflow-y: scroll;
    -webkit-overflow-scrolling: touch;
}

.storeItem {
    color: #fff;
    font-size: 12px;
    text-align: left;
    cursor: pointer;
}

.itemPrice {
    margin-top: 5px;
    display: inline-block;
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    padding-right: 12px;
    float: right;
}

.itemPreview {
    width: 25px;
    height: 25px;
    display: inline-block;
    vertical-align: middle;
    padding-right: 5px;
}

.itemButton {
    font-size: 12px;
    float: right;
    padding-right: 1px;
    cursor: pointer;
    color: #80eefc;
}

.itemButton:hover {
    color: #72d3e0;
}

.storeTab,
.clanTab,
.bountyTab,
.roomTab {
    width: 90px;
    font-size: 20px;
    display: inline-block;
    background-color: rgba(0, 0, 0, 0.25);
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    border-radius: 4px;
    color: #fff;
    padding: 5px;
    padding-left: 10px;
    pointer-events: all;
    cursor: pointer;
}

.clanTab {
    display: none;
}

.bountyTab {
    width: 80px;
    padding-left: 5px;
}

.storeTab:hover,
.clanTab:hover,
.bountyTab:hover,
.roomTab:hover {
    background-color: rgba(50, 50, 50, 0.25);
}

#clanButton {
    background-image: url(../img/UI/icon_clans.png);
    background-size: 34px;
    background-repeat: no-repeat;
    background-position: bottom 1px center;
    right: 255px;
    width: 25px;
    height: 25px;
}

#clanInput {
    text-align: left;
    font-size: 16px;
    padding: 6px;
    border: none;
    outline: none;
    box-sizing: border-box;
    color: #fff;
    background-color: rgba(0, 0, 0, 0.25);
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    border-radius: 4px;
    pointer-events: all;
    width: 110px;
    margin-right: 3px;
}

#clanMenuButton1,
#clanMenuButton2,
#clanMenuButton3,
#roomQueue,
#roomLeave {
    width: 80px;
    font-size: 16px;
    display: inline-block;
    background-color: rgba(0, 0, 0, 0.25);
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    border-radius: 4px;
    color: #fff;
    padding: 6px;
    pointer-events: all;
    cursor: pointer;
}

#clanMenuButton2,
#clanMenuButton3,
#roomQueue,
#roomLeave {
    width: 200px;
    display: none;
}

#clanMenuButton1:hover,
#clanMenuButton2:hover,
#clanMenuButton3:hover {
    background-color: rgba(50, 50, 50, 0.25);
}

.clanItem,
.roomItem {
    color: #fff;
    font-size: 16px;
    text-align: left;
    cursor: pointer;
    padding: 5px;
}

.clanReq {
    width: 15px;
    height: 15px;
    vertical-align: middle;
    float: right;
    background: rgba(0, 0, 0, 0.25);
    padding: 4px;
    border-radius: 5px;
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    margin-top: -4px;
    margin-left: 5px;
}

.clanReq:hover {
    background: rgba(50, 50, 50, 0.25);
}

#bountyButton {
    background-image: url(../img/UI/icon_bounty.png);
    background-size: 34px;
    background-repeat: no-repeat;
    background-position: bottom 1px center;
    right: 10px;
    width: 25px;
    height: 25px;
    top: -50px;
}

#bountyMenu {
    background-color: rgba(0, 0, 0, 0.25);
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    border-radius: 4px;
    color: #fff;
    padding: 5px;
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    position: absolute;
    right: 10px;
    width: 190px;
    display: none;
    pointer-events: all;
    text-align: center;
}

#bountyHolder {
    margin-top: 5px;
    max-height: 300px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

#bountyCreateHolder {
    display: none;
    font-size: 16px;
    height: 65px;
}

#bountyTargetButton {
    background-color: rgba(0, 0, 0, 0.25);
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    border-radius: 4px;
    color: #fff;
    padding: 5px;
    pointer-events: all;
    cursor: pointer;
    background-image: url(../img/UI/icon_target.png);
    background-size: 27px;
    background-repeat: no-repeat;
    background-position: bottom 1px center;
    width: 20px;
    height: 20px;
    margin-left: 10px;
}

#bountyTargetButton:hover {
    background-color: rgba(50, 50, 50, 0.25);
}

#bountyRewardInput {
    text-align: center;
    font-size: 16px;
    padding: 6px;
    border: none;
    outline: none;
    box-sizing: border-box;
    color: #fff;
    background-color: rgba(0, 0, 0, 0.25);
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    border-radius: 4px;
    pointer-events: all;
    width: 115px;
}

#bountyConfirmButton {
    background-color: rgba(0, 0, 0, 0.25);
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    border-radius: 4px;
    color: #fff;
    padding: 6px;
    pointer-events: all;
    cursor: pointer;
    margin-left: 5px;
}

#bountyConfirmButton:hover {
    background-color: rgba(50, 50, 50, 0.25);
}

.bountyItem {
    height: 280px;
    width: 172px;
    background-image: url(../img/UI/ui_wantedPoster.png);
    background-size: 195px;
    background-repeat: no-repeat;
    background-position: bottom 1px center;
}

.bountyReward {
    position: relative;
    font-size: 24px;
    bottom: -122px;
    right: -10px;
    color: black;
}

.bountyLastSeen {
    font-size: 18px;
    top: 40px;
    left: 55px;
    color: #ff0000;
    position: relative;
}

.bountyPicture {
    width: 180px;
    height: 90px;
    position: relative;
    top: 69px;
    right: 7px;
}

.uiElement,
.resourceDisplay {
    background-color: rgba(0, 0, 0, 0.25);
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    border-radius: 4px;
    color: #fff;
    padding: 10px;
    padding-top: 5px;
    padding-bottom: 5px;
    font-size: 12px;
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}

.gameButton {
    position: absolute;
    top: 10px;
    padding: 5px;
    cursor: pointer;
    pointer-events: all;
}

.gameButton:hover {
    background-color: rgba(50, 50, 50, 0.25);
}

#hotbar {
    width: 100%;
    text-align: center;
    bottom: 10px;
    position: absolute;
}

.hotbarItem {
    width: 60px;
    height: 60px;
    margin-left: 5px;
    margin-right: 5px;
    background-color: rgba(0, 0, 0, 0.25);
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    border-radius: 4px;
    pointer-events: all;
    cursor: pointer;
    display: inline-block;
}

.hotbarItem:hover {
    background-color: rgba(50, 50, 50, 0.25);
}

.hotbarPreview {
    display: inline-block;
    vertical-align: middle;
    position: absolute;
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}

#bottomContainer {
    position: absolute;
    bottom: -5px;
    left: 0px;
    right: 0px;
}

#xpBarContainer {
    width: 100%;
    margin-bottom: 80px;
    text-align: center;
}

#xpBar {
    background-color: rgba(0, 0, 0, 0.25);
    -webkit-border-radius: 10px;
    -moz-border-radius: 10px;
    border-radius: 10px;
    padding: 5px;
    width: 300px;
    height: 10px;
    display: inline-block;
}

#xpAmount {
    background-color: rgba(255, 255, 255, 1);
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    border-radius: 4px;
    width: 0%;
    height: 100%;
}

#ageText {
    width: 100%;
    text-align: center;
    color: #fff;
    font-size: 24px;
    user-select: none;
}

#upgradeHolder {
    width: 100%;
    position: absolute;
    text-align: center;
    top: 10px;
}

#mapDisplay {
    position: absolute;
    bottom: 10px;
    left: 10px;
    display: inline-block;
    pointer-events: none;
    background-color: rgba(0, 0, 0, 0.25);
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    border-radius: 4px;
}

#mapGrid {
    position: absolute;
    bottom: 10px;
    left: 10px;
    width: 120px;
    height: 120px;
    background-image: url(../img/UI/ui_map.png);
    background-size: 120px;
    background-repeat: no-repeat;
    background-position: bottom 1px center;
    opacity: 0.25;
}

.resourceType {
    background-color: rgba(0, 0, 0, 0.25);
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    border-radius: 5px;
    padding: 5px;
    color: #fff;
    padding-top: 2px;
    padding-right: 40px;
    right: 10px;
    position: absolute;
    height: 25px;
    text-align: right;
    font-size: 24px;
    background-size: 28px;
    background-repeat: no-repeat;
    background-position: right 3px center;
}

#goldDisplay {
    bottom: 115px;
    background-image: url(../img/UI/icon_gold.png);
    user-select: none;
}

#foodDisplay {
    bottom: 80px;
    background-image: url(../img/UI/icon_bush.png);
    user-select: none;
}

#woodDisplay {
    bottom: 45px;
    background-image: url(../img/UI/icon_tree.png);
    user-select: none;
}

#stoneDisplay {
    bottom: 10px;
    background-image: url(../img/UI/icon_rock.png);
    user-select: none;
}

#leaderboardDisplay {
    color: #fff;
    font-size: 22px;
    text-align: left;
    padding: 10px;
    padding-top: 7px;
    padding-bottom: 5px;
    width: 180px;
    background-color: rgba(0, 0, 0, 0.25);
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    border-radius: 4px;
    position: absolute;
    right: 10px;
    top: 1%;
    user-select: none;
}

.leaderboardItem {
    overflow: hidden;
    white-space: nowrap;
}

.leaderboardName {
    float: left;
    display: inline-block;
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    -o-text-overflow: ellipsis;
    font-size: 16px;
}

.leaderboardScore {
    text-align: right;
    float: right;
    display: inline-block;
    font-size: 16px;
}

#pingDisplay {
    position: absolute;
    font-size: 12px;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    user-select: none;
}

#killDisplay {
    top: 10px;
    right: 295px;
    background-image: url(../img/UI/icon_skull.png);
    user-select: none;
}

#itemInfo {
    max-width: 250px;
    display: none;
    position: absolute;
    top: 10px;
    left: 10px;
}

#itemName {
    font-size: 20px;
}

#itemDesc {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.6);
}

#itemCostText {
    font-size: 18px;
}

.itemCost {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.6);
}

.itemLimit {
    font-size: 18px;
    position: absolute;
    right: 10px;
    bottom: 6px;
}

#itemTypeText {
    font-size: 18px;
}

#clanNotify {
    display: block;
    width: 15px;
    height: 15px;
    margin-left: 15px;
    margin-top: 15px;
}

#rightCardHolder,
#leftCardHolder {
    display: inline-block;
    vertical-align: top;
}

#rightCard,
#leftCard {
    max-height: 200px;
    overflow-y: scroll;
    -webkit-overflow-scrolling: touch;
    width: 250px;
}

.menuHeader {
    font-size: 24px;
    color: #292929;
    margin-bottom: 5px;
}

#skinHolder {
    width: 100%;
    padding: 0px;
    padding-top: 5px;
    padding-bottom: 0px;
}

.activeSkin {
    -webkit-border-radius: 8px !important;
    -moz-border-radius: 8px !important;
    border-radius: 8px !important;
}

.skinItem {
    cursor: pointer;
    display: inline-block;
    margin-right: 10px;
    width: 30px;
    height: 30px;
    -webkit-border-radius: 20px;
    -moz-border-radius: 20px;
    border-radius: 20px;
    border: 3px solid #525252;
}

#hotkeyHolder {}

.hotkeyItem {
    font-size: 20px;
    display: flex;
    padding-left: 5px;
    padding-top: 5px;
}

.hotkey {
    width: 20px;
    height: 20px;
    border: 3px solid #525252;
    background-color: #e5e3e3;
    margin-right: 6px;
    margin-top: -1px;
    font-size: 18px;
    text-align: center;
    user-select: none;
}

.focusHotkey {
    background-color: #ffffff;
    border: 3px solid #000000;
}

#roomHolder {
    text-align: left;
    height: 105px;
}

#roomButton {
    background-image: url(../img/UI/icon_rooms.png);
    background-size: 34px;
    background-repeat: no-repeat;
    background-position: bottom 1px center;
    right: 215px;
    width: 25px;
    height: 25px;
    top: 50px;
    display: none;
}

#roomNameInput,
#roomPassInput,
#roomMaxInput {
    text-align: center;
    font-size: 16px;
    padding: 6px;
    border: none;
    outline: none;
    box-sizing: border-box;
    color: #fff;
    background-color: rgba(0, 0, 0, 0.25);
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    border-radius: 4px;
    pointer-events: all;
    width: 154px;
    margin-top: 4px;
}

#roomMaxInput {
    width: 50px;
}

#roomCreate {
    width: 18px;
    height: 18px;
    vertical-align: middle;
    float: right;
    background: rgba(0, 0, 0, 0.25);
    padding: 4px;
    border-radius: 5px;
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    margin-top: -31px;
}

#roomCreate:hover,
#roomQueue:hover,
#roomLeave:hover {
    background-color: rgba(50, 50, 50, 0.25);
}

.roomPass {
    text-align: center;
    font-size: 16px;
    padding: -5px;
    border: none;
    outline: none;
    box-sizing: border-box;
    color: #fff;
    background-color: rgba(0, 0, 0, 0.25);
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    border-radius: 4px;
    pointer-events: all;
    width: 100px;
}

.roomItem {
    height: 15px;
    margin-top: 3px;
}

.roomInfo {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100px;
}

#lobbyHolder {
    font-size: 16px;
    padding-top: 5px;
    padding-bottom: 5px;
}

#lobbySelect {
    width: 100%;
    height: 20px;
}

.social {
    position: absolute;
    bottom: 10px;
    left: 10px;
    width: 80px;
    height: 80px;
    background-size: 80px;
    background-repeat: no-repeat;
    -webkit-user-drag: none;
    background-image: url(../img/UI/ui_discord.png);
    background-position: bottom 1px center;
}

#adminPanel {
    display: none;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #ddd;
}

#adminCommandInput,
#adminCommandButton {
    width: 100%;
    box-sizing: border-box;
    font: inherit;
}

#adminCommandInput {
    margin: 8px 0;
    padding: 7px;
    border: 1px solid #d2d2d2;
    border-radius: 4px;
    color: var(--menu-text);
}

#deathText {
    display: none;
    font-size: 150px;
    color: #fff;
    background-color: rgba(0, 0, 0, 0.25);
    width: 100%;
    padding: 0px;
    position: absolute;
    text-align: center;
    top: 50%;
    transform: translateY(-50%);
    -ms-transform: translateY(-50%);
    -moz-transform: translateY(-50%);
    -webkit-transform: translateY(-50%);
    -o-transform: translateY(-50%);
    pointer-events: none;
}