/* :root {

} */

@font-face {
    font-family: '2player'; /*a name to be used later*/
    src: url('./PressStart2P-Regular-DogiNJoF.ttf');
}

@font-face {
    font-family: 'arcadepix'; /*a name to be used later*/
    src: url('./Arcadepix%20Plus-D7lIMGeB.ttf');
}

@font-face {
    font-family: 'eb'; /*a name to be used later*/
    src: url('./earthbound-beginnings-DcBYUBVw.ttf');
}

.ui-loading {
  width: 100px;
  height: 100px;
  margin: auto;
  margin-top: 40svh;
}

#loading {
  vertical-align: middle;
  width: 100svw;
  height: 100svh;
}

#text-status-battle {
  user-select: none;
  pointer-events: none;
}

.disable-events {
  user-select: none;
  pointer-events: none;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  font-weight: normal;
}

/* Ensure hidden attribute works */
[hidden] {
  display: none !important;
}

body {
  min-height: 100vh;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  user-select: none;
}

ul {
  list-style: none;
}

html, body {
  overflow: hidden;
}

game-dialog {
  position: absolute;
  width: auto;
  font-family: 'eb';
  font-size: 1em;

  & > * {
    width: 100%;
    background-color: white;
    user-select: none;
  }

  & ul {
    padding-inline: 0;
    background-color: white;
    user-select: none;
    max-height: 400px;
    overflow-y: auto;
    overflow-x: auto;

    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  & li {
    text-align: center;
    border: 1px solid black;
    padding: 5px 30px;
    width: 100%;
    height: 100%;

    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  & li:hover {
    background-color: gray;
  }

  & h1 {
    text-align: left;
    font-size: 1em;
    padding-left: 5px;
    padding-bottom: 5px;
    padding-top: 5px;
    width: 100%;
    height: 100%;
  }

}

canvas {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  transform-origin: top left;
  text-rendering: geometricPrecision;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing : none;
}

.offline {
  color: gray;
}

.online {
  color: limegreen;
}

#room-owner-tag {
  position: absolute;
  top: 40px;
  right: 20px;
  padding: 5px 10px;
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  font-family: '2player', monospace;
  font-size: 12px;
  border-radius: 5px;
  pointer-events: none;
}
#username-tag {
  position: absolute;
  top: 10px;
  right: 20px;
  padding: 5px 10px;
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  font-family: '2player', monospace;
  font-size: 12px;
  border-radius: 5px;
  pointer-events: none;
}
game-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  pointer-events: none;

  & * {
    pointer-events: none;
  }

  & section * {
    pointer-events: all;
  }
}

game-overlay section.container {
  position: absolute;
  bottom: 0%;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

#inventory-controls {
  width: 60%;
  height: 60%;
  background: #e0e0e0; 
  color: #222; 
  text-align: center;
  font-family: '2player', monospace; 
  font-size: 11px;
  letter-spacing: 0.5px;

  border: 4px solid #999;
  box-shadow: 0 0 0 4px #555; 

  border-radius: 15px;
  text-shadow: none;
}

.editor-card {
  color:white;
  display: flex;
  margin: auto;
  grid-column: 1fr 1fr;
}

.editor-card * {
  height: 100%;
  margin: auto 20px;
}

.loot-controls {
  width: 40%;
  height: 30%;
  padding: 20px;
  background: #e0e0e0; 
  color: #222; 
  text-align: center;
  font-family: '2player', monospace; 
  font-size: 11px;
  letter-spacing: 0.5px;

  border: 4px solid #999;
  box-shadow: 0 0 0 4px #555; 

  border-radius: 15px;
  text-shadow: none;
}
#inventory-controls h1 {
  line-height: 100px;
  color: #222;
}

#toggle-shop,
#toggle-room {
  position: relative;
  margin: 30px 5px 10px 5px;
  padding: 12px 32px;

  color: #555;
  font-family: '2player', monospace;
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 1px;
  text-shadow: 1px 1px 0px rgba(255, 255, 255, 0.8);
  border: 3px solid #999;
  border-radius: 8px;
  box-shadow: 
    0 4px 0 #888,
    0 6px 8px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: all 0.15s ease;
  text-transform: uppercase;
}

#toggle-shop:hover,
#toggle-room:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 6px 0 #888,
    0 8px 12px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

#toggle-shop:active,
#toggle-room:active {
  transform: translateY(2px);
  box-shadow: 
    0 2px 0 #888,
    0 3px 4px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

#toggle-shop.active,
#toggle-room.active {
  background: #42BFDD;
  color: white;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);
  border-color: #2A9DB8;
  box-shadow: 
    0 4px 0 #2A9DB8,
    0 6px 12px rgba(66, 191, 221, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1);
  transform: translateY(0);
}

#inventory-display{
  padding-left: 10px;
  width: 90%;
  height: 80%;
  color: #222; 
  text-align: center;
  display: flex;
  font-family: '2player', monospace; 
  font-size: 11px;
  letter-spacing: 0.5px;
}
.shop-display{
  padding-left: 10px;
  width: 90%;
  height: 80%;
  color: #222; 
  text-align: center;
  display: flex;
  font-family: '2player', monospace; 
  font-size: 11px;
  letter-spacing: 0.5px;
}
data-template {
  display: none;
} 
.loot-display{
  width: 100%;
  height: 80%;
  color: #222; 
  text-align: center;
  display: flex;
  font-family: '2player', monospace; 
  font-size: 11px;
  letter-spacing: 0.5px;


}
#close-inventory{
  position: absolute;
  top: 21.5%;
  right: 76%;
  display: flex;
 
}

game-overlay {
  transform: scale(1);

  & section {
    height: 100%;
    width: 100%;
    display: flex;
  }
}

.round-button.friend::before {
  content: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAAeCAYAAADOziUSAAAAAXNSR0IArs4c6QAAAK1JREFUSInt1M0NgzAMBeBn1OHKla5QpmpXgCsMwQhdpXJPoNRxjEuCBFLfLVH0YecHghFm5nD87EcAQHurSVuvTkpEJoVG2BpkgV+YF0qBlVxARCCKu0/Nh1mwX6sCgHtzBQA8uoHVynJSFLvIiVS3nl3Y9zRzst+l9YLu52Shmx66VZ0FZrUp0ewDCMEi92wGizz0ObQV0io87l8jwqbXuxzmjfbRE+3ZH1vNB6e/cnLLUyIGAAAAAElFTkSuQmCC");
}

.round-button.inventory::before {
  content: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAQCAYAAAAWGF8bAAAAAXNSR0IArs4c6QAAAOxJREFUOI2tkr8OwUAcxz8tubCZLCIxXSwGx6BP4QGYxBOYPIVH6MK7mHSxSFebqVuriTDUUf0TFfdJOvTu229+d/1Y123nLpRkPg8pw12dAVhsuqWZ3a5J7PnU04vtVq0wLJR87selhRrbnna+hqoilMQ21vakUmHs+WYLf8HSf9kUNpkjxZ6fO+J4mTxFZPPWbDi56xftUtq3U6PJ8bAHYDBy6EdvX3V+7fYAuAS3xMO0f0LJl2+X4FY4VZmvwKfYhR8GIYwcAPpRmCsTSoL7Fj5XmNxHL1/6ZbJKE36UVuRvD7NGmBc7rY0JHi5KTAObOzXPAAAAAElFTkSuQmCC");
}

.round-button.close::before {
  content: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAHpJREFUOI2tk8EVwCAIQ3+co47hSHWoruQYDkJPvbQq+ixHSQJE0HkcliRyrWIhrhitmBGSRDHjitFWyUlC7wevkzdWvcQMGUAewMt9KrWAI2G3VYDRaF3DHhFg6EvoCczG/yNsmbj1jVuLtLXKK+SWSFglA+Ra9VzxDSNws4NPQgI4AAAAAElFTkSuQmCC");
}
.round-button.home::before {
  content: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAQCAYAAAAWGF8bAAAAAXNSR0IArs4c6QAAAUJJREFUOI2llLFLAlEYwH9PxfCE4+jU1hqqUcIlaGpqE5z7B1wam8M/oN2paBSCoCFoanJocJBoqAidBPMuRNAjl2t6r3vn3WH6gwfHx3e/930fH0+cnV/6AJ+9VwAebq8E63K0teufHhz6a4uATDhQsOx/iZ2xq3WkhP2BS8Gy/clsCoBp5FWSjEVRsGw/KFXCt59vgrIkSZDJbKpJhbxlWUEYeblp5HHGrhCryuRIgv+aRv6vwpXKC+GMXZEB2N/Y5Pq5DUAuW1xa4M1H6ntvuyQIr00uW6TZ6QLQckwAnk52YoU3LwPqlbImTgG0hx/aLklZEs1Ol5ZjcvzY0+KpcGKczJuPtFOvlCM7UJW997/8uPnJlhq1KgAXd/cQmLc3H6kZLlQYR6NWpWSlKVlpJY5CE8p21mHhcSC0DklE5f0CMqqFqOQxXzoAAAAASUVORK5CYII=");
}
.round-button.inventory::before {
  content: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAQCAYAAAAWGF8bAAAAAXNSR0IArs4c6QAAAOxJREFUOI2tkr8OwUAcxz8tubCZLCIxXSwGx6BP4QGYxBOYPIVH6MK7mHSxSFebqVuriTDUUf0TFfdJOvTu229+d/1Y123nLpRkPg8pw12dAVhsuqWZ3a5J7PnU04vtVq0wLJR87selhRrbnna+hqoilMQ21vakUmHs+WYLf8HSf9kUNpkjxZ6fO+J4mTxFZPPWbDi56xftUtq3U6PJ8bAHYDBy6EdvX3V+7fYAuAS3xMO0f0LJl2+X4FY4VZmvwKfYhR8GIYwcAPpRmCsTSoL7Fj5XmNxHL1/6ZbJKE36UVuRvD7NGmBc7rY0JHi5KTAObOzXPAAAAAElFTkSuQmCC");
}

.round-button.shop::before {
  content: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAIVJREFUWIVjYBgFo2AUjHTAuEVB6z+ygM+Da4z0dAATPS3DBjB82z15/X/sSmkDBl8IwAAsJEpzAxlpyR/wEBh1wKgDCILuyev/I5cN1OYPeAiMOoDomo9adQSsJISBAQ8BFlI1oPuAUjDgITCaBgiGABsbB4rPf/36QVYawGXOgIfAqAMAlzNUh4NshRcAAAAASUVORK5CYII=");

}
.round-button.status::before {
  content: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAFlJREFUWIXt1DkOwCAMBVF+CsT9TxvRhNYSWwqDm3kd0mBRACkBAILJLnIun13X+qrb4dxqFq0Ge7ZaRaPB3q12kY1PtM+f6CQOEH8Jd/GVZziLb3xEAIBwDT+6USEoN69DAAAAAElFTkSuQmCC");
  
}



.round-button.save {
  content: url("./save-D4V0B7RY.png");
}

.round-button.battle {
  content: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABEUlEQVQ4jaWSsUrDUBSGv4h08Q1Cdodk0bm42Adw6iAUrHPp5uIDFB8gcysUCu10HyAul6wqQjK4Sshqh+t8HOREo21M6Z3uOff8H//5ubDn8QD6o4n8fljFt15rih9E4pyT2FiJjRXnnGyCNgJUqKCdIArojyaVuC3kUC82STnrdbFJCsBV75T75Inp3RhANJPB8UAA5q/zekZ+EFUOmpz4QSTyeCMKqhyURealZiFAo5PULDav0BZyDazNC9D5C2gD2RpiG4hNUpbDd9bme7bxt/lBJN2Ly6r+Er8RznLKIvMADprEABqaiserTm1uqwM/iCQfhrVeOMsBOD864eHjmbLIvH9X+Fmrbe1rvdf5BHoV0m28N3uBAAAAAElFTkSuQmCC");
}

.round-button.battle-attack {
  content: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABEUlEQVQ4jaWSsUrDUBSGv4h08Q1Cdodk0bm42Adw6iAUrHPp5uIDFB8gcysUCu10HyAul6wqQjK4Sshqh+t8HOREo21M6Z3uOff8H//5ubDn8QD6o4n8fljFt15rih9E4pyT2FiJjRXnnGyCNgJUqKCdIArojyaVuC3kUC82STnrdbFJCsBV75T75Inp3RhANJPB8UAA5q/zekZ+EFUOmpz4QSTyeCMKqhyURealZiFAo5PULDav0BZyDazNC9D5C2gD2RpiG4hNUpbDd9bme7bxt/lBJN2Ly6r+Er8RznLKIvMADprEABqaiserTm1uqwM/iCQfhrVeOMsBOD864eHjmbLIvH9X+Fmrbe1rvdf5BHoV0m28N3uBAAAAAElFTkSuQmCC");
}

.round-button.battle-move {
  content: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABMklEQVQ4jaVTLa6DQBD+aAgCDkDSoDAIavYCrdgrkLqKyhoOU4N8nnAFRHsBDBXPPEVIOACIpgkVdPbNLvDMG8MyO/N93/ws8E+z+M822I1LQW1TW0t+ALB5chZGuPx8Q3oCAHA9PpHmDsoAGjAH3KwlJ/6A++2lsUlP4HGONaUbHpCFERJ/QOIPAICic9WZgNPcweMc4xSdRq2EonNn9ZV9BXQCWRgBGJQ/zd3pjjdxqYHSEyj7SrFzYOqDUtA2tbUNdqP0BBJ/mCmiUvYHG/HXr1/rAQ+kr3k2TQFQCUXnKvYl+eZkbEom6fvDE/g0yjQClp5AGWBsm9qyebLO4MwSJwL7QzCBzHqAlZHyEu63F67HSanFSzCNZs3v+JKVffX3HtCslwhoF1ZfmWkmAYG/Abf1j9JFEpIyAAAAAElFTkSuQmCC");
}

.round-button.disconnect {
  content: url("./logout-BoIEWv7b.png");
}
.round-button.quest {
  content: url("./quest-DYUlRkEB.png");
}

img.spinner {
  display: inline-flex;
}

.round-button.editor {
  content: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABHUlEQVQ4jaWTIUgDURzGfyczWcSkx0PkysJdkdUxg0Es58CwtGQyXrLZTRcvjYUFMQjbQNBg2LCKxQsrF4aKCMrCM3nwN+1A7rbdua89/v/fx/e+x4MlZRRZNpUj+2u7AHRGnfxsr3YspnLko/4pcRBKHITSLDcFoJQHdn0LPNg4eE/NVxZFdn0LANe3uLk8B+DrbpP77yeY14GpHHntHSbnvhfh+hZ9L+I0GvH28mzMTDALBqjtlQiscjJLJZgHT7pjhoOYo+G1kWlQFP5j8B841cGkO86E7XaYCScJKtWGDG5bAPxcnLBe307M7HaYNJ6l1CusnrVyw4lM5YipHNFai9ZaKtWGmMqRheD0CtPlrR0bgMeHq0KfbCn9Ak3aj2/kQJY9AAAAAElFTkSuQmCC");
}

.round-button.furniture {
  content: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAKklEQVQ4jWNgGPKAEcb48uXLf1I08vDwMDIwMDAw0cJV9AWjYTAaBlQBAPHRDAoud1l4AAAAAElFTkSuQmCC");
}

.round-button.help {
  content: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAk0lEQVQ4jcWRMQ6FIBBEZz0GoTa/4ADev/IAFMaacAJ6rCQjLhv//4WTUEBmHuwgUOR8qNo5AOQUhffSG5wPdd9WNTx/lhvkArDCI0gDcPg0sRjMkEm7hc05RckpigYFgImNI5M1mloiQ/uwVuRQzodaSmnL+VCtL/4prJbYy3r2I4ClvwFmk/2PfEXmEq323x/hALtibLiwFTDEAAAAAElFTkSuQmCC");
}

.side {
  margin-left: auto;
  width: 30%;
  height: 100%;
  background-color: black;
}

.inventory-item{
  width: 50px;
  height: 50px;
  border: 3px solid #555;
  margin: 5px;
  display: inline-block;
}

.round-button {
  margin: 5px;
  height: 50px;
  aspect-ratio: 1 / 1;
  background: rgba(83, 82, 82, 0.8);
  color: #f0e6d2;
  font-family: '2player', monospace;
  font-size: 11px;
  letter-spacing: 0.5px;
  text-shadow: 1px 1px 0px #000000;

  border: 2px solid #999;
  border-radius: 50%; 
  box-shadow: 0 0 0 2px #555;

  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;

  transition: transform 0.1s ease;
}

.round-button:hover {
  transform: scale(1.05);
}

.round-button:active {
  transform: scale(0.95);
}

#inventory-container {
  width: 80%; 
  height: 100%; 
  display: flex;
  max-width: 100%;
  flex-wrap: wrap;
    overflow-y: auto;      
  pointer-events: all;
  gap: 10px;
  background: rgba(255, 255, 255, 0.5);
  padding: 10px;
  border-radius: 8px;
}
.shop-container {
  width: 80%; 
  height: 100%; 
  display: flex;
  max-width: 100%;
  flex-wrap: wrap;
    overflow-y: auto;      
  pointer-events: all;
  gap: 10px;
  background: rgba(255, 255, 255, 0.5);
  padding: 10px;
  border-radius: 8px;
}
.loot-container {
  width: 100%; 
  height: 100%; 
  display: flex;
  max-width: 100%;
  flex-wrap: wrap;
  pointer-events: all;
  gap: 20px;
  padding-top: 30px;
  justify-content: center;
}
#inventory-items {
  flex: 3;
  display: grid;
  grid-template-columns: repeat(auto-fill, 150px);
  grid-auto-rows: min-content;
  gap: 10px;
  overflow-y: auto;
}


#inventory-detail {
  flex: 1;          /* 1/4 of width */
  padding: 10px;
  border-left: 2px solid #444;
  background: rgba(30,30,30,0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  height: 100%;
  box-sizing: border-box;
}

.inventory-card {
  display: flex;
  flex-direction: column;
  flex: 0 0 180px;  
  height: 150px;  
  background: #fff;
  color: #333;
  font-family: '2player', monospace;
  font-size: 10px;
  letter-spacing: 0.5px;
  border: 2px solid #888;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  text-shadow: none;
  overflow: hidden;
  user-select: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.inventory-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}
.inventory-card > div:first-child {
  flex: 0 0 90px;  
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
}

.inventory-card .card-container {
  flex: 1;         
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: '2player';
  font-size: 9px;
  line-height: 1.2;
  padding: 4px;
}
.item-quantity{
  margin: 10px 10px 10px 10px;
  }
.atlas {
  display: none;
}


.item-detail-card img  {
  height: 130px;
  width: 130px;
}
.item-detail-card {
  flex-direction: column;
  height: 180px;  
  background: #fff;
  color: #333;
  font-family: '2player', monospace;
  font-size: 10px;
  letter-spacing: 0.5px;
  border: 2px solid #888;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  text-shadow: none;
  overflow: hidden;
  user-select: none; 
}
#shop-item-price {
  margin-top: 5px;
  font-weight: bold;
  color: limegreen; 
}


.room-card {
  display: flex;
  flex-direction: column;
  flex: 0 0 180px;  
  height: 200px;  
  background: #fff;
  color: #333;
  font-family: '2player', monospace;
  font-size: 10px;
  letter-spacing: 0.5px;
  border: 2px solid #888;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  text-shadow: none;
  overflow: hidden;
  user-select: none;
  transition: transform 0.2s, box-shadow 0.2s;
}
.room-card-image {
  width: 128px;
  height: auto;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  border: 3px solid #555;
  margin: 5px;
}
.room-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}
.room-card > div:first-child {
  flex: 0 0 90px;  
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
}

.room-card .card-container {
  flex: 1;         
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: '2player';
  font-size: 9px;
  line-height: 1.2;
  padding: 4px;
}
.room-card .card-container {
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  height: 200px;
}

.room-card .card-container p:first-child {
  font-size: 12px;
  font-weight: bold;
  color: #333;
}

.room-card .card-container p:last-child {
  font-size: 10px;
  font-weight: bold;
  color: #ff8c00;
}

#detailItem {
  flex: 1;                
  padding: 15px;
  border-left: 2px solid #ccc;
  background: #f9f9f9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  height: 100%;
  overflow-y: auto;
}

.detailShop {
  flex: 1;
  padding: 15px;
  border-left: 2px solid #ccc;
  background: #f9f9f9;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  height: 100%;
  overflow-y: auto;
  position: relative;
}

#quantity-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 15px;
  margin-top: 20px;
  width: calc(100% - 20px);
  background: #fff;
  border: 2px solid #888;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#quantity-section label {
  color: #222;
  font-family: '2player';
  font-size: 10px;
  letter-spacing: 0.5px;
  text-shadow: none;
  margin-bottom: 5px;
}

#quantity-section input[type="number"] {
  width: 120px;
  padding: 10px;
  background: #fff;
  color: #333;
  font-family: '2player';
  font-size: 11px;
  text-align: center;
  border: 2px solid #888;
  border-radius: 8px;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.2s ease;
}

#quantity-section input[type="number"]:focus {
  border-color: #42BFDD;
  outline: none;
}

#quantity-section input[type="number"]::-webkit-inner-spin-button,
#quantity-section input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

#quantity-section input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.text-detail{
  padding-top: 15px;
  width: 100%;
}
.text-detail p {
  padding-bottom: 10px;
  color: #222;
  font-family: '2player';
  font-size: 10px;
}
#tag-ressource {
  color: #27ae60;
  font-weight: bold;
}
#tag-furniture {
  color: #3498db;
  font-weight: bold;
}
#tag-equipment {
  color: #c0392b;
  font-weight: bold;
}

.text-detail button {
  margin-top: 20px;
  background-color: #42BFDD;
  color: white;
  font-family: '2player';
  font-size: 11px;
  padding: 12px 24px;
  border: none;
  border-radius: 20px;
  text-shadow: none;
  box-shadow: 0 4px #BBE6E4;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
}
.friend-popup p {
  color: #222;
  font-family: '2player';
  margin: 3px;
  font-size: 10px;
  line-height: 1.6;

}
 .friend-popup button {
  margin-top: 10px;
  margin-bottom: 10px;
  background-color: #42BFDD;
  color: white;
  font-family: '2player';
  font-size: 11px;
  letter-spacing: 0.5px;
  padding: 7px 15px;
  border: none;
  border-radius: 20px;
  text-shadow: none;
  box-shadow: 0 4px #BBE6E4;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
}
.friend-popup button:hover {
  background-color: #29AFD0;
}

.friend-popup button:active {
  transform: translateY(2px);
  box-shadow: 0 2px #65C2BE;
}


.detailShop .text-detail button {
  margin-top: 20px;
}

.text-detail button:hover {
  background-color: #29AFD0;
}

.text-detail button:active {
  transform: translateY(2px);
  box-shadow: 0 2px #65C2BE;
}

.item-selected{
    border: 3px solid #42BFDD;
    box-shadow: 0 4px 8px rgba(66, 191, 221, 0.5);
}

::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background-color: #f0f0f0; 
  border: 1px solid #ccc;
  border-radius: 6px;
}

::-webkit-scrollbar-thumb {
  background-color: #42BFDD; 
  border: 1px solid #29AFD0;
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background-color: #29AFD0; 
}

::-webkit-scrollbar-corner {
  background-color: #f0f0f0;
}

#controls-editor {
  border: 10px solid green;
}
#friend-container {
  width: 300px;
  height: auto;
  background-color: #f9f9f9;
  color: #222;
  padding: 10px;
  border: 2px solid #888;
  border-radius: 8px;
  font-family: '2player', monospace;
  pointer-events: all;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.friend-container table {
  width: 100%;
  border-collapse: collapse;
}
.friend-container th, .friend-container td {
  padding: 5px;
  border: 1px solid #ccc;
  text-align: left;
}
#friend-controls {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  
  width: 60%;
  height: 60%;
  
  background: #e0e0e0;
  color: #222; 
  text-align: center;
  font-family: '2player', monospace; 
  font-size: 11px;
  letter-spacing: 0.5px;

  border: 2px solid #888;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);

  border-radius: 15px;
  text-shadow: none;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 10px;
}

#friend-display {
  display: flex;
  width: 100%;
  height: 80%;
  gap: 10px;
}

#friend-list {
  flex: 3;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  gap: 5px;
  border-right: 2px solid #ccc;
  padding-right: 5px;
}

#friend-detail {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 10px;
  background: #f9f9f9;
  overflow-y: auto;
}

.friend-card {
  padding: 8px;
  background: #fff;
  border: 2px solid #ccc;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
}

.friend-card:hover {
  background: #f5f5f5;
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}

.friend-selected {
  background-color: rgba(66,191,221,0.2);
  border: 2px solid #42BFDD;
}
.join-btn {
  margin-top: 10px;
  padding: 12px 24px;
  border: none;
  border-radius: 20px;
  background-color: #42BFDD;
  color: white;
  font-family: '2player';
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  box-shadow: 0 4px #BBE6E4;
  transition: all 0.2s;
}

.join-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px #BBE6E4;
}

.join-btn:active {
  transform: translateY(2px);
  box-shadow: 0 2px #BBE6E4;
}

.join-btn.disabled {
  background-color: #ccc;
  cursor: not-allowed;
  opacity: 0.7;
  box-shadow: 0 4px #aaa;
}
.profile-card {
  background-color: #fff;
  border: 2px solid #ccc;
  border-radius: 8px;
  padding: 10px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.equipment-card {
  background-color: #fff;
  border: 2px solid #ccc;
  border-radius: 8px;
  padding: 10px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.equipment-list {
  list-style: none;
  padding: 0;
  margin: 10px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 300px;
  overflow-y: auto;
}

.equipment-list li {
  margin: 0;
  padding: 0;
}

.equip-btn {
  width: 100%;
  background-color: #42BFDD;
  color: white;
  font-family: '2player', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 4px #BBE6E4;
  transition: all 0.2s;
}

.equip-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px #BBE6E4;
}

.equip-btn:active {
  transform: translateY(2px);
  box-shadow: 0 2px #BBE6E4;
}

.equipment-stats-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 10px 0;
}

.equipment-stats-list p {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  border-radius: 4px;
  font-family: '2player', monospace;
  font-size: 10px;
}
.equipment-stats h4 {
  margin-top: 8px;
}

.equipment-stats-list p b {
  font-weight: normal;
  letter-spacing: 0.5px;
}

.equipment-list-item {
  margin: 0;
  padding: 0;
}

.equipment-item-card {
  background: #fff;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 8px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.equipment-item-card:hover {
  border-color: #42BFDD;
  box-shadow: 0 2px 6px rgba(66, 191, 221, 0.2);
  transform: translateY(-2px);
}

.equipment-item-card:active {
  transform: translateY(0);
  box-shadow: 0 1px 3px rgba(66, 191, 221, 0.3);
}

.equipment-item-header {
  margin-bottom: 8px;
}

.equipment-name {
  font-family: '2player', monospace;
  font-size: 12px;
  color: #42BFDD;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-align: center;
}

.friend-selected {
  background-color: rgba(66,191,221,0.1);
}

.friend-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 250px;
  background: #f9f9f9;
  border: 2px solid #888;
  border-radius: 15px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 1000;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  font-family: '2player';
  font-size: 11px;
}

#loading-overlay {
  background-color: black;
  color: white;
}

#loading-overlay h1 {
  text-align: center;
  width: 100%;
  margin: auto 0;
}

.alert-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  backdrop-filter: blur(2px);
}

.alert-box {
  background: #f9f9f9;
  border: 3px solid #888;
  border-radius: 15px;
  padding: 25px 30px;
  min-width: 300px;
  max-width: 500px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  animation: alert-pop 0.2s ease-out;
}

@keyframes alert-pop {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.alert-message {
  color: #222;
  font-family: '2player', monospace;
  font-size: 11px;
  line-height: 1.6;
  text-align: center;
  word-wrap: break-word;
  max-width: 100%;
}

.alert-button {
  background-color: #42BFDD;
  color: white;
  font-family: '2player', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 40px;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  box-shadow: 0 4px #BBE6E4;
  transition: all 0.2s;
  min-width: 120px;
}

.alert-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px #BBE6E4;
}

.alert-button:active {
  transform: translateY(2px);
  box-shadow: 0 2px #BBE6E4;
}

.prompt-message {
  color: #222;
  font-family: '2player', monospace;
  font-size: 11px;
  line-height: 1.6;
  text-align: center;
  word-wrap: break-word;
  max-width: 100%;
  margin-bottom: 10px;
}

.prompt-input {
  width: 100%;
  padding: 10px 15px;
  font-family: '2player', monospace;
  font-size: 11px;
  border: 2px solid #888;
  border-radius: 8px;
  background-color: #fff;
  color: #222;
  outline: none;
  transition: border-color 0.2s;
}

.prompt-input:focus {
  border-color: #42BFDD;
}

.prompt-input::placeholder {
  color: #999;
  font-family: '2player', monospace;
}

.prompt-button-ok,
.prompt-button-cancel {
  background-color: #42BFDD;
  color: white;
  font-family: '2player', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 25px;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  box-shadow: 0 4px #BBE6E4;
  transition: all 0.2s;
  min-width: 100px;
}

.prompt-button-cancel {
  background-color: #888;
  box-shadow: 0 4px #666;
}

.prompt-button-ok:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px #BBE6E4;
}

.prompt-button-cancel:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px #666;
}

.prompt-button-ok:active {
  transform: translateY(2px);
  box-shadow: 0 2px #BBE6E4;
}

.prompt-button-cancel:active {
  transform: translateY(2px);
  box-shadow: 0 2px #666;
}


#battle-turns {
  user-select: none;
  pointer-events: none;
}

#battle-turns > div {
  background-color: white;
  border: 1px solid black;
  padding: 10px;
  font-family: '2player';
}

#battle-turns > .selected::before {
  content: '> ';
}

#status-container-wrapper {
  display: flex;
  gap: 15px;
  width: 95%;
  margin: 0 auto;
  position: relative;
  top: -10px;
}

#status-info {
  background: #fff;
  border: 2px solid #888;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  padding: 15px;
  flex: 1;
  font-family: '2player', monospace;
  font-size: 10px;
  letter-spacing: 0.5px;
  color: #222;
  text-shadow: none;
}

#status-display {
  background: #fff;
  border: 2px solid #888;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  padding: 15px;
  flex: 1;
  font-family: '2player', monospace;
  font-size: 10px;
  letter-spacing: 0.5px;
  color: #222;
  text-shadow: none;
  overflow-y: auto;
}
#status-display h2 {
  text-align: center;
  margin-bottom: 10px;
}
#status-display table {
  width: 157%;
  
}

#status-container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  pointer-events: all;
}

.status-info-card p {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  margin: 5px 0;
  background: #f5f5f5;
  border: 1px solid #ccc;
  border-radius: 6px;
  transition: background-color 0.2s ease;
}

.status-info-card p:hover {
  background: #e8f4f8;
  border-color: #42BFDD;
}

.status-info-card p b {

  font-weight: normal;
  text-transform: uppercase;
  letter-spacing: 1px;
  min-width: 130px;
  text-align: left;
}

#status-info data-slot {
  font-weight: bold;
  text-align: right;
  min-width: 50px;
  padding: 4px 8px;
  background: rgba(66, 191, 221, 0.1);
  border-radius: 4px;
  border: 1px solid rgba(66, 191, 221, 0.3);
}
.bonus {
  color: #27ae60;
  font-weight: bold;
  margin-left: 5px;
  min-width: 40px;
  text-align: right;
  display: inline-block;
}

.status-info-card p.health b {
  color: #e74c3c;
}

.status-info-card p.mp b {
  color: #3498db;
}

.status-info-card p.attack b {
  color: #e67e22;
}

.status-info-card p.defense b {
  color: #95a5a6;
}

.status-info-card p.magic b {
  color: #9b59b6;
}

.status-info-card p.magicDefense b {
  color: #8e44ad;
}

.status-info-card p.luck b {
  color: #f1c40f;
}

.status-info-card p.speed b {
  color: #2ecc71;
}

#battle-items-section {
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.8);
  border: 2px solid #888;
  border-radius: 8px;
  overflow-x: scroll;
  max-width: 80svw;
}

#battle-buttons-section {
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.8);
  border: 2px solid #888;
  border-radius: 8px;
  overflow-x: scroll;
  max-width: 80svw;
}

#editor-container {
  color: white;
}

#battle-timer {
  font-family: '2player';
  font-size: 32px;
  padding: 30px;
}