@import url('https://fonts.googleapis.com/css?family=Cabin');

:root {
  --modal-bg-color: #282e37;
  --modal-border-color: transparent;
  --modal-divider-color: transparent;
  --modal-text-color: #fff;
  --modal-tab-active-bg-color: #536075;
  --modal-tab-inactive-bg-color: #636363;
  --modal-tab-text-color: #fff;
  --modal-active-tab-text-color: #fff;
  --modal-header-color: #fff;
  --modal-header-border-color: transparent;
  --modal-coin-background-color: #fff;
  --modal-coin-bg-color: #374151;
  --modal-content-bg-color: #576375;
  --purchasable-bg-color: #282e37;
  --purchasable-border-color: transparent;
  --purchasable-border-color-hover: #536075;
  --purchasable-text-color: #fff;
  --purchasable-text-color-hover: #fff;
  --purchasable-bg-color-hover: #65748b;
  --unpurchasable-bg-color: #3e4755;
  --unpurchasable-bg-color-hover: #535e72;
}

html {
  -webkit-user-select: none;
}

.show-on-mobile {
  display: none;
}

@font-face {
  font-family: 'arcade';
  src: url('/assets/fonts/arcade.ttf');
}

body {
  background-color: #000;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  /*font-family: '04b03', 'Georgia', serif;*/
  font-family: 'Cabin', 'arial', serif;
  line-height: normal;
  -webkit-font-smoothing: antialiased;
  /*overflow: hidden;*/
}

canvas {
  display: block;
  /* necessary to hide scroll bars */
  background-color: black;
}

.absolute-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.absolute-vertical-center {
  position: absolute;
  top: 50%;
  transform: translate(0%, -50%);
  -webkit-transform: translate(0%, -50%);
  -moz-transform: translate(0%, -50%);
  -ms-transform: translate(0%, -50%);
  -o-transform: translate(0%, -50%);
}

/*#expedition-card {
  display: none;
  width: 640px;
  position: absolute;
  top: 10%;
  left: 10%;
1  transform: translate(-10%, -10%);
}
*/

.convoy-tr,
.cursor-pointer {
  cursor: pointer;
}

.cursor-not-allowed {
  cursor: not-allowed !important;
}

.treasure-chest-button {
  background: transparent;
  border: 1px solid #cecece;
  border-radius: 5px;
  -webkit-border-radius: 5px;
  -moz-border-radius: 5px;
  -ms-border-radius: 5px;
  -o-border-radius: 5px;
}

.chest-text-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  -webkit-transform: translate(-50%, -50%);
  -moz-transform: translate(-50%, -50%);
  -ms-transform: translate(-50%, -50%);
  -o-transform: translate(-50%, -50%);
  color: darkblue;
}

.text-align-center {
  text-align: center;
}

.opacity-100 {
  opacity: 1 !important;
}

.opacity-50 {
  opacity: 0.5 !important;
}

#menu-wrapper {
  user-select: text !important;
  height: 100vh;
  min-width: 100%;
  z-index: 1040;
}

#menu-column-main {
  display: flex;
  justify-content: center;
}

.medal {
  min-width: 15px;
  min-height: 25px;
  margin: 0 5px;
}

.gold-medal {
  background: url('/assets/images/gold-medal.png');
  background-repeat: no-repeat !important;
  background-size: contain !important;
}

.silver-medal {
  background: url('/assets/images/silver-medal.png');
  background-repeat: no-repeat !important;
  background-size: contain !important;
}

.bronze-medal {
  background: url('/assets/images/bronze-medal.png');
  background-repeat: no-repeat !important;
  background-size: contain !important;
}

#login-error-message {
  display: none;
}

.footer {
  background-color: white;
  z-index: 10000;
  position: absolute;
  right: 20px;
  bottom: 0;
  padding: 10px;
  margin: 0 auto;
  text-align: center;
  width: 200px;
  -webkit-border-top-left-radius: 5px;
  -webkit-border-top-right-radius: 5px;
  -moz-border-radius-topleft: 5px;
  -moz-border-radius-topright: 5px;
  border-top-left-radius: 5px;
  border-top-right-radius: 5px;
}

.modal {
  z-index: 10000;
}

#login-div {
  padding: 10px;
  color: white;
}

#leaderboard {
  right: 10px;
  top: 46px;
  text-align: right;
  z-index: 999;
  padding: 10px;
  font-family: Arial, sans-serif;
}

#scoreboard-header {
  display: flex;
  align-items: center;
  gap: 2px;
  border-bottom: 1px solid white;
  margin-bottom: 0;
  width: fit-content;
  margin-left: auto;
}

#scoreboard-header.h5 {
  font-size: 13px !important;
}

#leaderboard.h3 {
  font-size: inherit;
}

#leaderboard-toggle {
  display: inline;
  cursor: pointer;
}

.leaderboard-arrow {
  width: 10px;
  height: 10px;
  display: block;
  stroke-width: 2.25;
}

#leaderboard-title {
  cursor: pointer;
  text-decoration: none !important;
  font-size: 14px;
  font-weight: 600;
}

#scoreboard {
  height: 175px;
  overflow: auto;
  padding-top: 10px;
}

#scoreboard .scoreboard-user-entry {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 0;
  font-size: 16px;
  line-height: 1.2;
  gap: 8px;
}

#scoreboard .scoreboard-player-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  text-align: left;
}

#scoreboard .scoreboard-player-score {
  flex-shrink: 0;
  font-size: 12px;
  opacity: 0.8;
  text-align: right;
  margin-right: 0;
}

#scoreboard .scoreboard-player-score span {
  display: inline-block;
}

@media only screen and (max-width: 1000px) {
  #scoreboard {
    max-height: 100px;
    font-size: 12px;
  }
}

#scoreboard .scoreboard-mobile {
  width: 100px;
  height: 100px;
}

@media (max-width: 1024px) {
  .game-ui {
    font-size: 12px !important;
    margin: 3px !important;
    margin-left: auto !important;
  }

  #my-score-div {
    font-weight: 500;
    font-size: 12px !important;
    padding: 2px 5px !important;
  }
}

@media (min-width: 1024px) {
  .ui-text-scoreboard {
    font-size: 24px;
  }

  #scoreboard-header {
    gap: 4px;
  }

  #leaderboard-title {
    font-size: 18px;
    font-weight: 500;
  }
}

.context-menu-item.context-menu-hover.context-menu-danger {
  background: #dc3545;
  color: white;
}

#menu-button-container {
  z-index: 1040;
  position: absolute;
  color: white;
  margin: 10px;
}

.game-ui {
  z-index: 1000;
  color: white;
  margin: 10px;
  display: none;
  width: fit-content;
  margin-left: auto;
  padding-left: 10px;
  text-align: right;
}

.dark-bg {
  color: white;
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 5px;
  padding: 20px;
}

.white-bg {
  background-color: white;
  border-radius: 5px;
  padding: 20px;
}

.item-class-normal {
  color: black;
}

.item-class-special {
  color: green;
}

.item-class-rare {
  color: orange;
}

.item-class-legendary {
  color: gold;
}

.item-div {
  z-index: 10000;
}

.inventory-slot .quantity {
  position: absolute;
  bottom: 0px;
  right: 4px;
}

.item-key-stroke {
  width: 49px;
  height: 20px;
  display: inline-block;
}

.inventory-slot {
  width: 45px;
  height: 45px;
  margin: 0px 2px 0px 2px;
  background-color: rgba(0, 0, 0, 0.5);
}

.trade-slot {
  width: 45px !important;
  height: 45px !important;
  margin: 0px 2px 0px 2px;
  background-color: rgba(0, 0, 0, 0.5);
}

#accept-trade-request-button {
  margin-right: 8px;
}

.inventory-slot.active {
  border: 2px solid white;
}

.inventory-slot-mobile,
.trade-offer-slot {
  width: 35px;
  height: 35px;
}

#trade-div,
#trade-request-div {
  display: none;
}

.margin-top-4 {
  margin-top: 4px;
}

#inventory {
  display: none;
  position: relative;
  color: white;
  background-color: rgba(0, 0, 0, 0.5);
  width: 220px;
  text-align: center;
  margin: 10px;
  padding: 20px;
  right: 0px;
  border-radius: 5;
}

/*For inventory item tooltip*/

.popover.top {
  margin-top: -20px;
}

.popover {
  z-index: 120000;
}

#counter {
  position: absolute;
  left: 0px;
  right: 0;
  top: 10px;
  text-align: center;
  color: white;
  display: flex;
  justify-content: center;
  z-index: 1030;
  pointer-events: none;
}

.ui-text-top {
  font-size: 18px;
  padding: 10px;
  display: none;
  color: white;
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 5px;
}

.highscore-text {
  z-index: 1030;
  font-size: 4rem;
}

.ui-text-center-lg {
  font-size: 3em;
  z-index: 1000;
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  -webkit-transform: translate(-50%, -50%);
  -moz-transform: translate(-50%, -50%);
  -ms-transform: translate(-50%, -50%);
  -o-transform: translate(-50%, -50%);
  color: white;
}

.ui-text-scoreboard {
  font-size: 18px;
}

.ui-text-top-left {
  font-size: 1.75rem;
  z-index: 1000;
  display: none;
  position: absolute;
  top: 30px;
  left: 0;
  color: white;
  padding: 10px;
}

.ui-text-inventory {
  font-size: larger;
  margin: 0 0 0.5rem;
  display: none;
}

#headerTopPartner {
  color: #fff;
  font-size: 25px;
  text-transform: uppercase;
  font-weight: bold;
  line-height: 46px;
  vertical-align: middle;
  text-shadow: 1px 1px 1px #00476c;
  float: left;
  margin: 0;
}

#headerTopPartner b {
  font-size: 18px;
  font-weight: normal;
  color: #cdedff;
  line-height: 46px;
}

.green {
  color: #4dff3a;
}

.yellow {
  color: #ffe53a;
}

.orange {
  color: #ffa044;
}

.red {
  color: #ff6c6c;
}

.purple {
  color: #ef68ff;
}

#my-score-div {
  padding: 10px;
  font-size: 18px;
  border: 1px solid gray;
}

.score-div {
  right: 0px;
  bottom: 0px;
  text-align: right;
  user-select: none;
}

.standalone-profile-stats {
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.35;
  color: #d5ecff;
}

.standalone-profile-label {
  color: #9ecdf2;
}

#item-info-div {
  font-size: 24px;
}

#kick-player {
  position: fixed;
  top: 56px;
  left: 10px;
  z-index: 120001;
  pointer-events: auto;
}

#kick-players-outofgame-modal {
  z-index: 22005;
}

.progress {
  margin-bottom: 0px;
  height: 24px;
  background-color: #495057bd;
}

.progress-bar {
  margin: 3px;
}

#unit-status {
  text-align: center;
}

#attribute-bars {
  margin-left: 2px;
  margin-right: 2px;
  position: relative;
  margin: auto;
}

#privacy-policy-modal,
#join-convoy-modal,
#help-modal,
#modd-shop-modal {
  z-index: 22000;
}

#modd-shop-div {
  display: none;
}

#coin-shop-modal,
#confirm-purchase-modal {
  z-index: 25000;
}

#shop-modal {
  z-index: 10000;
}

#shop-modal .inventory-slot {
  margin: 5px;
}

/* Standalone fallback shop styling (matches hosted layout behavior). */
#modd-item-shop-modal .shop-grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
  width: 100%;
  padding: 10px;
  background-color: var(--modal-content-bg-color);
  border-radius: 10px;
}

#modd-item-shop-modal .item-shop-button {
  width: 100% !important;
  min-height: 120px;
  padding: 0;
}

#modd-item-shop-modal .item-shop-button-div {
  width: 100%;
}

.item-shop-button-div:hover {
  cursor: pointer;
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important;
}

.grey-bordered {
  border: 2px solid #374151;
  border-radius: 5px;
  box-sizing: border-box;
}

.can-purchase-item {
  background-color: var(--purchasable-bg-color);
  color: var(--purchasable-text-color);
  border: 6px solid var(--purchasable-border-color);
  border-radius: 10px !important;
}

.can-purchase-item:hover {
  background-color: var(--purchasable-bg-color-hover);
  border: 6px solid var(--purchasable-border-color-hover);
  color: var(--purchasable-text-color-hover);
}

.unpurchasble-item {
  background-color: var(--unpurchasable-bg-color);
  border: 6px solid var(--purchasable-border-color);
  border-radius: 10px !important;
}

.unpurchasble-item:hover {
  background-color: var(--unpurchasable-bg-color-hover);
}

.lowered-visibility {
  opacity: 0.3;
}

.modal-bg-color {
  background-color: #272e37e5;
}

.modal-content-new {
  background-color: var(--modal-bg-color);
  border: 4px solid var(--modal-border-color);
  backdrop-filter: blur(10px);
  color: var(--modal-text-color);
  border-radius: 10px;
  font-family: Arial, sans-serif;
}

.modal-title {
  font-weight: 900;
  font-size: 1.75rem;
}

.modal-header-new {
  border-bottom: 1px solid var(--modal-divider-color);
  padding: 16px;
  display: flex;
  flex-direction: row;
  align-items: center;
}

.modal-body-new {
  padding: 0px;
}

.shop-description {
  color: var(--modal-text-color);
  padding: 0 20px 4px 20px;
  font-size: 14px;
}

.popover {
  background-color: #272e37e5;
  border: 2px solid #6b7280;
  color: white;
  border-radius: 10px;
}

.popover div {
  color: white;
}

.shop-item-popover {
  pointer-events: none;
}

.bottom-radius {
  border-radius: 0 0 8px 8px;
}

@media screen and (max-width: 767px) {

  #modd-item-shop-modal .shop-grid-container,
  #modd-shop-modal .shop-grid-container {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }
}

@media screen and (min-width: 768px) and (max-width: 1023px) {

  #modd-item-shop-modal .shop-grid-container,
  #modd-shop-modal .shop-grid-container {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media screen and (min-width: 1024px) and (max-width: 1279px) {

  #modd-item-shop-modal .shop-grid-container,
  #modd-shop-modal .shop-grid-container {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media screen and (min-width: 1280px) and (max-width: 2200px) {

  #modd-item-shop-modal .shop-grid-container,
  #modd-shop-modal .shop-grid-container {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ---- Skin Shop (#modd-shop-modal) styles ---- */

.shop-grid-container {
  display: grid;
  background-color: var(--modal-content-bg-color);
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-gap: 10px;
  max-width: 100%;
  padding: 10px;
  border-radius: 10px;
}

.shop-grid-items {
  width: 100%;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  position: relative;
  cursor: pointer;
  justify-content: space-between !important;
  align-items: center;
  padding: 4px;
}

.owned-skins {
  border: 2px solid #6b7280;
  border-radius: 5px;
  padding: 5px;
  margin-bottom: 10px;
}

.owned-skins.active {
  background-color: #4b5563;
}

#modd-shop-modal .shop-sidebar ul,
#modd-shop-modal .shop-sidebar li {
  list-style-type: none;
  margin: 0;
  padding: 0;
}

.other-lists {
  padding: 5px;
  color: var(--modal-text-color);
  border-radius: 5px;
}

.other-lists.active {
  background-color: var(--modal-tab-active-bg-color);
}

.modd-coin-bg {
  background-color: #374151;
}

.page-link {
  background-color: transparent !important;
  border: 0px solid #374151 !important;
  border-radius: 2px !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

#mod-shop-pagination .pagination {
  align-items: center;
}

.page-item.active .page-link {
  background-color: transparent !important;
  border: 4px solid var(--purchasable-border-color) !important;
  border-radius: 8px !important;
}

.blue-hover {
  margin: 5px;
  border: 2px solid transparent;
}

.blue-border {
  border: 2px solid #254edb;
  border-radius: 4px;
}

.blue-hover:hover {
  border: 2px solid #254edb;
  border-radius: 4px;
}

.blue-hover:hover .modd-coin-bg {
  background-color: #254edb;
}

.skin-purchased {
  background-color: #955f3b !important;
  border: 6px solid var(--modal-border-color);
  border-radius: 10px !important;
}

.skin-unpurchased {
  background-color: #d5ad61 !important;
  border: 6px solid var(--modal-border-color);
  border-radius: 10px !important;
}

.skin-purchase-button {
  background-color: transparent;
  border: 2px solid var(--modal-border-color);
  color: var(--modal-border-color);
}

.skin-purchase-button:hover {
  background-color: #2f6a50;
  border: 2px solid #2f6a50;
  color: white;
}

.modd-shop-header {
  font-weight: 900;
  color: var(--modal-header-color);
  font-size: 1.5rem;
  -webkit-text-stroke: 1px var(--modal-header-border-color);
}

.modd-shop-sub-header {
  font-weight: 800;
  color: var(--modal-header-color);
  font-size: 1rem;
  margin-top: 10px;
  margin-left: 5px;
  -webkit-text-stroke: 1px var(--modal-header-border-color);
}

#search-skin {
  color: var(--modal-text-color);
  background-color: transparent;
  border: none;
  height: 28px;
}

.search-input-group {
  background-color: var(--modal-tab-active-bg-color);
  color: var(--modal-text-color);
  border: 2px solid var(--modal-coin-bg-color);
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 6px;
  border-radius: 10px;
}

.justify-center {
  justify-content: center;
}

.justify-end {
  justify-content: end;
}

#chat-box {
  text-align: left;
  position: fixed;
  bottom: 0;
  left: 0;
  margin-left: 0;
}

#chat-box #hide-chat {
  height: 15px;
}

#chat-box #tabs {
  height: 35px;
}

#chat-box .tab-content {
  height: 250px;
}

#mobile-chat-box {
  height: 40vh;
  width: 200px;
  position: absolute;
  top: 75px;
  left: 10px;
  z-index: 1;
}

#friends-list {
  color: white;
  overflow-y: auto;
}

#pending-list {
  color: white;
  overflow-y: auto;
}

#chat-tab-container a.nav-link {
  color: white;
}

#chat-tab-container a.nav-link.active {
  color: white;
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 5px 5px 0 0;
  -webkit-border-radius: 5px 5px 0 0;
  -moz-border-radius: 5px 5px 0 0;
  -ms-border-radius: 5px 5px 0 0;
  -o-border-radius: 5px 5px 0 0;
}

.user-select-none {
  user-select: none
}

#chat-history {
  word-wrap: break-word;
  overflow-y: auto;
}

/* Chat player list panel */
#chat-player-list {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.chat-player-entry {
  display: flex;
  align-items: center;
  padding: 3px 6px;
  border-radius: 3px;
  cursor: default;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-player-entry:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.chat-player-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  margin-right: 6px;
  flex-shrink: 0;
  object-fit: cover;
}

.chat-player-name {
  color: #ccc;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
}

#reloading-message {
  display: none;
}

.blink {
  animation: blinker 0.5s linear infinite;
}

@keyframes blinker {
  50% {
    opacity: 0;
  }
}

/* TABLE STUFF */

#server-list_filter {
  display: none;
}

.navbar .dropdown-menu li a:hover,
.navbar .dropdown-menu li a:focus,
.navbar .dropdown-menu li a:active,
.navbar.navbar-default .dropdown-menu li a:hover,
.navbar.navbar-default .dropdown-menu li a:focus,
.navbar.navbar-default .dropdown-menu li a:active {
  background-color: #9c27b0;
  color: #FFFFFF;
  box-shadow: 0 12px 20px -10px rgba(156, 39, 176, 0.28), 0 4px 20px 0px rgba(0, 0, 0, 0.12), 0 7px 8px -5px rgba(156, 39, 176, 0.2);
}

.slider {
  overflow-y: hidden;
  height: 100vh;
  /* approximate max height */
  transition-property: all;
  transition-duration: 2s;
  transition-timing-function: cubic-bezier(1, 0, 0.5, 1);
  color: black;
  z-index: 99999;
  background-color: white;
}

.more-games-modal-in {
  display: -webkit-box !important;
  -webkit-transform: translate(0, 100vh) !important;
  /** Chrome & Safari **/
  -o-transform: translate(0, 100vh) !important;
  /** Opera **/
  -moz-transform: translate(0, 100vh) !important;
  /** Firefox **/
  transition: all 2s ease-in-out;
  -webkit-transition: all 2s ease-in-out;
  /** Chrome & Safari **/
  -moz-transition: all 2s ease-in-out;
  /** Firefox **/
  -o-transition: all 2s ease-in-out;
  /** Opera **/
}

.more-games-modal-out {
  -webkit-transform: translate(0, -50vh) !important;
  /** Chrome & Safari **/
  -o-transform: translate(0, -50vh) !important;
  /** Opera **/
  -moz-transform: translate(0, -50vh) !important;
  /** Firefox **/
  transition: all 2s ease-in-out;
  -webkit-transition: all 2s ease-in-out;
  /** Chrome & Safari **/
  -moz-transition: all 2s ease-in-out;
  /** Firefox **/
  -o-transition: all 2s ease-in-out;
  /** Opera **/
}

.slideup-menu-animation {
  animation: 10s slide-up;
  margin-top: 0%;
}

.more-game-defualt {
  position: absolute;
  z-index: 29999;
  bottom: 0px;
  margin: auto;
  right: 0px;
  left: 0px;
  display: none;
  overflow-x: hidden;
  border-radius: 0;
}

.leaderboard-div {
  position: absolute;
  left: 40%;
  bottom: 5px;
}

.slideup-menu-animation {
  display: -webkit-box;
  -webkit-animation: slide-up .3s ease-out;
  -moz-animation: slide-up .3s ease-out;
}

.slidedown-menu-animation {
  display: none;
  -webkit-animation: slide-down .3s ease-out;
  -moz-animation: slide-down .3s ease-out;
}

@-webkit-keyframes slide-down {
  0% {
    opacity: 1;
    -webkit-transform: translateY(100%);
  }

  100% {
    opacity: 0;
    -webkit-transform: translateY(150%);
  }
}

@-moz-keyframes slide-down {
  0% {
    opacity: 1;
    -moz-transform: translateY(100%);
  }

  100% {
    opacity: 0;
    -moz-transform: translateY(150%);
  }
}

@-webkit-keyframes slide-up {
  0% {
    opacity: 0;
    -webkit-transform: translateY(100%);
  }

  100% {
    opacity: 1;
    -webkit-transform: translateY(0);
  }
}

@-moz-keyframes slide-up {
  0% {
    opacity: 0;
    -moz-transform: translateY(100%);
  }

  100% {
    opacity: 1;
    -moz-transform: translateY(0);
  }
}

.slider-out {
  height: 0;
}

.overlay-loading {
  position: fixed;
  /* Sit on top of the page content */
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.standalone-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 119900;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  background: linear-gradient(180deg, #0c1120 0%, #05070d 100%);
  opacity: 1;
  visibility: visible;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.standalone-loading-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.standalone-loading-card {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(15, 23, 42, 0.75);
  color: #e5e7eb;
  font-size: 14px;
  line-height: 1;
}

.standalone-loading-spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.28);
  border-top-color: #22c55e;
  animation: standalone-loading-spin 0.8s linear infinite;
}

@keyframes standalone-loading-spin {
  to {
    transform: rotate(360deg);
  }
}

.close-loading-screen {
  position: absolute;
  right: 5px;
  color: rgba(0, 0, 0, 0.6);
  cursor: pointer;
}

#featured-youtuber>a:hover,
#game-samples>a:hover {
  text-decoration: none;
}

#game-samples:hover #game-text {
  background-color: #007bff;
  color: white !important;
  border-bottom-left-radius: 0.25rem;
  border-bottom-right-radius: 0.25rem;
}

#game-samples:hover #game-overlay {
  display: block;
}

#game-text {
  color: black;
}

.game-overlay {
  display: none;
  position: absolute;
  background-color: rgba(0, 123, 255, 0.3);
  width: 100%;
  height: 100%;
  border-top-left-radius: 0.25rem;
  border-top-right-radius: 0.25rem;
}

.bg-azure {
  background-color: azure;
}

.padding-left-4rem {
  padding-left: 4rem !important;
}

.padding-right-4rem {
  padding-right: 4rem !important;
}

#game-div canvas {
  position: fixed;
}

.text-strock {
  color: white;
  -webkit-text-fill-color: white;
  /* Will override color (regardless of order) */
  -webkit-text-stroke-width: 1px;
  -webkit-text-stroke-color: black;
  font-weight: 700;
}

.non-link {
  cursor: pointer;
  color: #0275d8 !important
}

.non-link:hover {
  color: #014c8c !important;
  text-decoration: underline !important;
}

#featured-youtuber {
  position: fixed;
  bottom: 0;
  right: 10px;
  z-index: 10001;
  padding: 10px;
  background-color: white;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

#coin-shop-modal.show {
  display: flex !important;
  align-items: center;
  min-width: 500px;
}

#player-input-modal .modal-body {
  min-width: 450px;
}

#play-game-button {
  font-size: 1rem;
}

.discord-button {
  background: #7289DA;
  height: 35px;
}

.twitter-button {
  background: #1DA1F2;
  height: 35px;
}

.facebook-button {
  background: #4267B2;
  height: 35px;
}

.youtube-button {
  background: #FF0000;
  height: 35px;
}

.android-button {
  background: #689F38;
  height: 35px;
}

.ios-button {
  background: #1C81F3;
  height: 35px;
}

.patron-full-button {
  background-image: url("/assets/images/patron_button.png");
}

/* dev console accordion handles */

div[id$="-div-accordion"] {
  background: black;
  max-height: 30px;
  font-size: 11px;
}

div#dev-console {
  position: absolute;
  top: 60px;
}

div#dev-console-table {
  min-width: 444px;
}

.btn.facebook-login-button {
  background: #4267B2;
  color: white;
}

.coin-offer-button-container {
  /* position: absolute; */
  /* bottom: 0; */
}

.login-card {
  box-shadow: 0 0 40px 17px #ccc;
}

.col-sm-2-5 {
  width: 20%
}

#modd-dialogue-image {
  min-width: 100px;
  min-height: 100px;
}

.menu-row {
  height: 385px;
}

.menu-row-mobile {
  height: 220px;
}

#chat-message-input {
  width: 100%;
  display: none;
}

#chat-input-field-div {
  z-index: 2500;
}

#change-server,
#play-game-button .button-text {
  padding: 15px;
}

.mobile-html-buttons {
  touch-action: manipulation;
}

.main-vertical-mobile {
  margin: auto;
  flex: 0 0 66.666667%;
  max-width: 66.666667%;
}

#friends-panel {
  background: white;
  z-index: 10001;
}

#show-chat {
  position: fixed;
  bottom: 0;
  left: 0;
  z-index: 1000;
  margin: 15px;
}

.small-font {
  font-size: small !important;
}

.smaller-font {
  font-size: smaller !important;
}

@media (max-width: 934px) {

  #change-server,
  #play-game-button .button-text {
    padding: 5px;
  }

  .hidden-vertical-mobile {
    display: none;
  }

  .hide-on-mobile {
    display: none !important;
  }

  .show-on-mobile {
    display: inline !important;
  }

  .ui-text-top {
    font-size: 15px;
    padding: 5px 10px;
  }

  .progress {
    height: 0.7rem;
  }

  .progress-label {
    font-size: 8px;
  }

  .inventory-slot .quantity {
    font-size: 8px;
  }

  .main-vertical-mobile {
    max-width: 250px;
  }

  #shopbutton {
    display: inline !important;
  }

  #menu-column-left-container {
    min-width: 200px !important;
    max-width: 200px;
  }

  #menu-column-left-container>.white-bg {
    padding-bottom: 10px;
    padding-top: 10px;
  }
}

#game-suggestions-card li.list-group-item:hover {
  background: #23272b !important;
}

.progress-text {
  z-index: 1;
  font-weight: bold;
}

#home-button {
  position: fixed;
  top: 10px;
  left: 10px;
}

.no-selection {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -khtml-user-select: none;
  -ms-user-select: none;
}

#play-game-button,
#backpack-wrapper,
#game-div>#stats {
  z-index: 9999;
}

#game-div>#stats {
  display: none !important;
}

#game-div>#stats small {
  white-space: nowrap;
}

@media only screen and (max-width: 768px) {
  #kick-player {
    top: 50px;
    left: 8px;
    font-size: 12px;
    padding: 3px 8px;
  }

  .standalone-profile-stats {
    font-size: 12px;
  }

  #game-div>#stats {
    display: none !important;
  }

  #leaderboard {
    right: 0px;
    top: 30px;
    padding: 6px;
  }

  #scoreboard-header,
  #scoreboard-header.h5 {
    gap: 2px;
    font-size: 13px;
  }

  #leaderboard-toggle,
  .leaderboard-arrow {
    width: 9px;
    height: 9px;
  }

  .game-ui {
    margin: 4px;
  }

  .dark-bg {
    padding: 6px;
  }

  #my-score-div {
    padding: 4px 6px;
    font-size: 16px;
    min-width: auto !important;
  }

  #menu-button-container {
    margin: 4px;
  }
}

:where(#custom-ingame-ui-container)>* {
  pointer-events: auto;
}

.ui-draggable-dragging {
  transform: scale(1.8);
}

/* ── Mobile Chat Overlay (top-left message preview) ── */
/* Visibility controlled by JS in chat.ejs (applyMobileState) */
#mobile-chat-overlay {
  position: fixed;
  top: 58px;
  left: 10px;
  z-index: 120001;
  width: 220px;
  pointer-events: auto;
  cursor: pointer;
  font-family: Arial, sans-serif;
  font-size: 12px;
  color: #fff;
}

#mobile-chat-messages {
  max-height: 109px;
  overflow: hidden;
  background: rgba(55, 65, 81, 0.2);
  border-radius: 6px;
  padding: 4px 8px;
  word-break: break-word;
  overflow-wrap: break-word;
  transition: background 0.3s ease;
}

#mobile-chat-messages.mobile-overlay-active {
  background: rgba(55, 65, 81, 0.55);
}

#mobile-chat-messages:hover {
  background: rgba(55, 65, 81, 0.4);
}

#mobile-chat-placeholder {
  background: rgba(55, 65, 81, 0.2);
  border-radius: 6px;
  padding: 6px 8px;
  color: #D1D5DB;
  font-size: 12px;
}

#mobile-chat-placeholder:hover {
  background: rgba(55, 65, 81, 0.1);
}

.mobile-overlay-msg {
  line-height: 1.4;
}

.mobile-msg-author {
  color: #99F000;
  font-weight: 500;
}

.mobile-msg-text {
  color: #fff;
}

.mobile-msg-system {
  color: yellow;
}

/* ── Mobile Chat Modal (fullscreen) ── */
#mobile-chat-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 120002;
  flex-direction: column;
  background: rgba(22, 24, 26, 0.93);
  color: #fff;
  font-family: Arial, sans-serif;
  font-size: 14px;
}

#mobile-chat-close {
  position: absolute;
  top: 8px;
  right: 10px;
  z-index: 10;
  background: #2563eb;
  border: none;
  color: #fff;
  font-size: 24px;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

#mobile-chat-close:hover {
  background: #1d4ed8;
}

#mobile-chat-modal-messages {
  flex: 1;
  overflow-y: auto;
  padding: 50px 14px 10px;
  word-break: break-word;
  overflow-wrap: break-word;
}

.mobile-modal-msg {
  padding: 2px 0;
  line-height: 1.5;
  font-size: 14px;
}

#mobile-chat-form {
  display: flex;
  align-items: center;
  padding: 8px 10px;
  gap: 8px;
  background: rgba(30, 30, 30, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

#mobile-chat-input {
  flex: 1;
  background: rgba(55, 65, 81, 0.5);
  border: none;
  border-radius: 6px;
  color: #fff;
  font-size: 14px;
  padding: 10px 12px;
  outline: none;
  font-family: Arial, sans-serif;
}

#mobile-chat-input::placeholder {
  color: #9CA3AF;
  font-style: italic;
}

#mobile-chat-send {
  background: #2563eb;
  border: none;
  border-radius: 6px;
  color: #fff;
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

#mobile-chat-send:hover {
  background: #1d4ed8;
}

/* Desktop/mobile visibility is controlled entirely by JS in chat.ejs */

/* ── Portrait Overlay (force landscape on mobile) ── */
#portrait-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #000000ee;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

#portrait-overlay-content {
  padding: 2rem;
}

#portrait-rotate-icon {
  animation: portrait-rotate-pulse 2s ease-in-out infinite;
  margin-bottom: 1.5rem;
}

@keyframes portrait-rotate-pulse {
  0%, 100% { transform: rotate(0deg); opacity: 1; }
  50% { transform: rotate(15deg); opacity: 0.7; }
}

#portrait-overlay-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
}

#portrait-overlay-text {
  font-size: 0.95rem;
  opacity: 0.8;
  margin: 0;
  line-height: 1.5;
}

/* Show portrait overlay only on mobile in portrait */
@media (hover: none) and (pointer: coarse) and (orientation: portrait) {
  #portrait-overlay {
    display: flex !important;
  }
}

/* ── Improved mobile joystick zones ── */
.joystick-zone {
  touch-action: none;
}

.joystick-zone-left {
  position: fixed !important;
  left: 0 !important;
  top: 0 !important;
  width: 50vw !important;
  height: 100vh !important;
  z-index: 999 !important;
}

.joystick-zone-right {
  position: fixed !important;
  right: 0 !important;
  top: 0 !important;
  width: 50vw !important;
  height: 100vh !important;
  z-index: 999 !important;
}

/* Styles for mobile devices with touch controls */
@media (hover: none) and (pointer: coarse) {

  /* Styles for landscape orientation */
  @media (orientation: landscape) {
    div.game-editor-widget.tw-fixed.tw-right-0.tw-top-0.tw-mt-1.tw-flex-row.tw-space-x-2.tw-mr-24.tw-flex {
      display: none;
    }

    #inventory-slots-key-stroke {
      display: none;
    }

    .inventory-container {
      position: absolute;
      pointer-events: none;
      left: 0;
      right: 0;
      bottom: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      min-width: 100px;
      width: 100%;
    }

    #attribute-bars {
      position: fixed !important;
      top: 0;
      right: 0;
      margin-top: 10px !important;
      backdrop-filter: blur(4px) !important;
      min-width: 150px !important;
      max-width: 250px !important;
      margin-right: 10px !important;
    }

    #inventory-slots-key-name {
      display: none !important;
    }

    .item-key-stroke {
      width: fit-content !important;
      height: fit-content !important;
    }

    #inventory-slots {
      margin-bottom: 15px !important;
      bottom: 0 !important;
    }

    .leaderboard-container {
      pointer-events: none !important;
    }

    #login-div {
      display: none !important;
    }

    #leaderboard {
      top: 80px !important;
    }

    #scoreboard-header {
      pointer-events: auto !important;
    }

    .inventory-slot {
      width: 2.5rem !important;
      height: 2.5rem !important;
    }

    .button-container {
      display: none !important;
    }

    .progress {
      height: 1.5rem !important;
      border-radius: 5px;
    }
  }

  /* Styles for portrait orientation */
  @media (orientation: portrait) {
    div.game-editor-widget.tw-fixed.tw-right-0.tw-top-0.tw-mt-1.tw-flex-row.tw-space-x-2.tw-mr-24.tw-flex {
      display: none;
    }

    .progress {
      margin-bottom: 5px;
      width: 150% !important;
      height: 2em !important;
    }

    #inventory-slots-key-stroke {
      display: none;
    }

    .backpack-container {
      top: 0 !important;
    }

    #ui-text-top-id {
      margin-top: 85px;
    }

    .inventory-container {
      position: absolute;
      pointer-events: none;
      left: 0;
      right: 0;
      bottom: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      min-width: 100px;
      width: 100%;
    }

    #attribute-bars {
      position: fixed !important;
      bottom: 0;
      margin-bottom: 85px !important;
      left: 50%;
      transform: translate(-75%, 0);
      margin-top: 10px !important;
      backdrop-filter: blur(4px) !important;
      min-width: 150px !important;
      max-width: 250px !important;
      margin-right: 10px !important;
    }

    #inventory-slots-key-name {
      display: none !important;
    }

    .item-key-stroke {
      width: fit-content !important;
      height: fit-content !important;
    }

    #inventory-slots {
      margin-bottom: 15px !important;
      bottom: 0 !important;
    }

    .leaderboard-container {
      pointer-events: none !important;
    }

    #login-div {
      display: none !important;
    }

    #leaderboard {
      top: 80px !important;
    }

    #scoreboard-header {
      pointer-events: auto !important;
    }

    .inventory-slot {
      width: 2.5rem !important;
      height: 2.5rem !important;
    }

    .button-container {
      display: none !important;
    }

    div.game-editor-widget.tw-fixed.tw-right-0.tw-top-0.tw-mt-1.tw-flex-row.tw-space-x-2.tw-mr-24.tw-flex {
      display: none;
    }
  }
}