/* Фэнтезийные стили для элементов

https://codepen.io/arickle/pen/XKjMZY
https://codepen.io/mgkOV/pen/qzNegg

*/

@import url("https://fonts.googleapis.com/css2?family=Andika:wght@400;700&family=Russo+One&display=swap");
@import url(https://fonts.googleapis.com/css?family=Droid+Sans);
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
@font-face {
  font-family: "Revolvingdor";
  font-style: normal;
  font-weight: 400;
  src: local("Revolvingdor"),
    url("https://fonts.cdnfonts.com/s/56474/Revolvingdor-gxvd4.woff")
      format("woff");
}
@font-face {
  font-family: "BreatheFire";
  font-style: normal;
  font-weight: 400;
  src: local("BreatheFire"), url("./BreatheFire.ttf") format("truetype");
}
#preloader {
  display: block;
  position: absolute;
  width: 100%;
  z-index: 2;
  bottom: 0;
}
#start_button {
  width: 160px;
  /* visibility: hidden;
  opacity: 0; */
  transition: 1s all;
}
#start_button.active {
  visibility: visible;
  opacity: 1;
}
:root {
  --background-color: #f8f5ee;
  --text-color: #333333;
  --primary-color: #985632;
  --secondary-color: #773333;
  --accent-color: #ff8108;
  --system-message-bg: #8c919b38;
  --link-color: #3f51b5;
  --highlight-bg: #ffe6e63b;
  --dot-color: #888;
  --tooltip-bg: #f2f2f2;
}

.btnGlobal {
  cursor: pointer;
  transition: all 0.5s;
  margin-top: 6px;
  padding: 7px 12px;
  border-radius: 5px;
  color: lightgreen;
  background-color: #4a3a2e;
  display: inline-block;
  opacity: 0.8;
  margin-right: 10px;
  box-shadow: 0px 5px 10px 2px rgb(0 0 0) inset;
  border: 2px solid #4d3e31;
  outline: 2px solid #31271e;
}
.btnGlobal:hover {
  opacity: 1;
}

body {
  background-color: var(--background-color);
  color: var(--text-color);
  font-family: "Andika", sans-serif;
  scroll-behavior: smooth;
  margin: 0;
  user-select: none;
}
.front_of {
  position: relative;
}
h1,
h2,
h3 {
  color: #00ff80;
}

p {
}

.dice-panel {
  display: flex;
  justify-content: center;
  align-items: center;

  position: absolute;
  z-index: 9;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  width: 100%;
  height: 100%;
  background: #3b3b3b9e;
}

.button {
  display: inline-block;
  padding: 10px 20px;
  background-color: #985632;
  color: #ffffff;
  text-decoration: none;
  border-radius: 4px;
  border: none;
  cursor: pointer;
}

ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

li {
  margin-bottom: 5px;
}
#locationImage {
  width: 100%;
  height: 49vh;
  object-fit: cover;
}
#intro {
  text-align: center;
  margin-top: 100px;
  position: relative;
}
#intro::after {
  content: "";
  /* background: url(img/system/689.png);
  filter: invert(1); */
  background-size: 35px;
  background-repeat: space;
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  /* opacity: 0.2; */
  z-index: -1;
  background: url(img/system/first-min.jpg);
  background-size: cover;
  background-position: center;
  animation: show 4s;
}
@keyframes show {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.highlight {
  background-color: #ffe6e63b;
  color: #ff8108;
}
#introContainer {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  height: 86%;
}
#startButton {
  cursor: pointer;
  padding: 0.5rem 1rem;
}
#game,
#characterCreation,
#intro {
  margin: 50px auto;
  margin: 0px auto;
  width: 100%;
  max-width: 470px;
  /* background-color: #ffffff;
  background-color: #100f0b; */
  background-color: #100f0b;
  padding: 20px;
  padding: 4px;
  padding: 0;
  /* border-radius: 8px; */
  /* box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1); */
  position: relative;
  z-index: 1;
  overflow: hidden;
  box-sizing: border-box;
  height: 100vh;
  box-sizing: border-box;
}
#intro {
}
#intro::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background: url("data:image/jpg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/4gHYSUNDX1BST0ZJTEUAAQEAAAHIAAAAAAQwAABtbnRyUkdCIFhZWiAH4AABAAEAAAAAAABhY3NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA9tYAAQAAAADTLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlkZXNjAAAA8AAAACRyWFlaAAABFAAAABRnWFlaAAABKAAAABRiWFlaAAABPAAAABR3dHB0AAABUAAAABRyVFJDAAABZAAAAChnVFJDAAABZAAAAChiVFJDAAABZAAAAChjcHJ0AAABjAAAADxtbHVjAAAAAAAAAAEAAAAMZW5VUwAAAAgAAAAcAHMAUgBHAEJYWVogAAAAAAAAb6IAADj1AAADkFhZWiAAAAAAAABimQAAt4UAABjaWFlaIAAAAAAAACSgAAAPhAAAts9YWVogAAAAAAAA9tYAAQAAAADTLXBhcmEAAAAAAAQAAAACZmYAAPKnAAANWQAAE9AAAApbAAAAAAAAAABtbHVjAAAAAAAAAAEAAAAMZW5VUwAAACAAAAAcAEcAbwBvAGcAbABlACAASQBuAGMALgAgADIAMAAxADb/2wBDACgcHiMeGSgjISMtKygwPGRBPDc3PHtYXUlkkYCZlo+AjIqgtObDoKrarYqMyP/L2u71////m8H////6/+b9//j/2wBDASstLTw1PHZBQXb4pYyl+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj/wAARCAA6AB0DASIAAhEBAxEB/8QAGQAAAwEBAQAAAAAAAAAAAAAAAAMEBQIB/8QAIhAAAgICAwEBAAMBAAAAAAAAAQIAEQMhBBIxQRMiUWGB/8QAFgEBAQEAAAAAAAAAAAAAAAAAAQAC/8QAFxEBAQEBAAAAAAAAAAAAAAAAAAERMf/aAAwDAQACEQMRAD8AWg/VQyKa81PcrHjAgqA5+EfJPgzZsf8AHCQCTehA4+Q+Ut1JJ3c1rOKsDq5c3Y6+/AYnK64yA3piUTPjZiFK68+TjI7u1sATVaklfDxk4C1aJMoVTYiuDlC4/wA27bJYa1NDCEzDsp/5/UJcFiP8x7RNSHkANmJ1VAipo87MuJeik2famY3oBoUBHTmGYe3RippTLuI4CuwXtquoMzcJZWBXevh8jjyWxAjGo3skmENe5u+UllTXlyfLatRIsD5KByWVWZUIJFEXqSdf9gehSQTRG4WK8Ai52skD8uF3ujBpxezIP//Z");
  background-size: cover;
  z-index: -1;
  filter: blur(27px);
}
/* CHAT WINDOW */
#chatWindow {
  background-color: #f4f4f4;
  box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
  height: 49vh;
  overflow-y: scroll;
}
/* #chatWindow::before {
  background: url(https://img.freepik.com/free-vector/old-paper-texture_1048-3717.jpg?w=826&t=st=1690405877~exp=1690406477~hmac=980ccfd…);
  content: "";
  position: fixed;
  width: 100%;
  height: 100%;
  opacity: 0.2;
  z-index: 0;
  max-width: 467px;
} */
#chatWindow::before {
  /*background: url(https://img.freepik.com/free-vector/old-paper-texture_1048-3717.jpg?w=826&t=st=1690405877~exp=1690406477~hmac=980ccfd…);*/
  background: url(./img/chat-window2.jpg);
  content: "";
  /* background-position: -30px -10px;
  background-size: 113% 496px; */
  background-size: contain;
  /*background-size: 100% 100%;*/
  position: fixed;
  width: 100%;
  height: 100%;
  opacity: 1;
  z-index: 0;
  max-width: 470px;
  height: 51vh;
}

#chatContainer {
  padding: 10px;
  padding: 23px 0 0 29px;
  min-height: 70%;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
  min-height: 59%;
}

.message {
  margin-bottom: 10px;
  display: flex;
  align-items: flex-start;
  margin-top: 12px;
  opacity: 0; /* Начальное значение прозрачности 0 */
  animation: fadeIn 0.3s ease forwards; /* Анимация появления */
}

@keyframes fadeIn {
  from {
    opacity: 0; /* Начальное значение прозрачности 0 */
    transform: translateY(10px); /* Начальное значение смещения по вертикали */
  }
  to {
    opacity: 1; /* Конечное значение прозрачности 1 */
    transform: translateY(0); /* Конечное значение смещения по вертикали */
  }
}

@keyframes open {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.open-animation {
  animation: open 0.5s;
}

.message.right {
  flex-direction: row-reverse;
  align-items: flex-end;
}

.message .author {
  position: absolute;
  top: -28px;
  left: 5px;
  opacity: 1;
  color: #818181;
}

.message .avatar {
  width: 40px;
  height: 40px;
  /* border-radius: 50%; */
  text-align: center;
  background: #9e9e9e;
  margin-right: 10px;
  font-weight: 600;
  color: white;

  -webkit-mask-image: url("data:image/svg+xml;charset=utf8,%3Csvg width='50' height='50' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M49.607 25c0 10.006-1.259 16.1-4.883 19.724C41.1 48.348 35.006 49.607 25 49.607S8.9 48.348 5.276 44.724C1.652 41.1.393 35.006.393 25S1.652 8.9 5.276 5.276C8.9 1.652 14.994.393 25 .393s16.1 1.259 19.724 4.883C48.348 8.9 49.607 14.994 49.607 25Z' stroke='%23000' stroke-width='.8' fill='%23000'/%3E%3C/svg%3E ");
  mask-image: url("data:image/svg+xml;charset=utf8,%3Csvg width='50' height='50' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M49.607 25c0 10.006-1.259 16.1-4.883 19.724C41.1 48.348 35.006 49.607 25 49.607S8.9 48.348 5.276 44.724C1.652 41.1.393 35.006.393 25S1.652 8.9 5.276 5.276C8.9 1.652 14.994.393 25 .393s16.1 1.259 19.724 4.883C48.348 8.9 49.607 14.994 49.607 25Z' stroke='%23000' stroke-width='.8' fill='%23000'/%3E%3C/svg%3E ");
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.message.left .avatar {
  margin-right: 10px;
}

.message.right .avatar {
  margin-left: 10px;
}
.message.authorMessage .avatar {
  display: none;
}
.message .avatar img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  background: #595959;
}

.message .content {
  background-color: #ffffff;
  padding: 10px;
  border-radius: 10px;
  flex: 1;
  max-width: 70%;
  position: relative;
  padding-top: 1px;
  margin-top: 25px;
  border-top-left-radius: 0;
  box-shadow: 0px 5px 4px -4px rgb(0 0 0 / 14%);
}

/* .message .content::after {  
  content: "";  
  position: absolute;  
  top: 50%;  
  right: 100%;  
  margin-top: -5px;  
  border-width: 5px;  
  border-style: solid;  
  border-color: transparent #0da0d5 transparent transparent;  
}   */
.message.authorMessage .content {
  background-color: transparent;
  padding-top: 0;
  max-width: 100%;
  box-shadow: none;
  margin-top: 0px;
}
.message.authorMessage .author {
  display: none;
}

.message .content p {
  margin: 0;
}

.message.system .content {
  font-style: italic;
  /* background-color: #673ab726; */
  background-color: #8c919b38;
}

/* .message.system .content {
} */
/*  */
#typingIndicator {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 10px;
}

.dot {
  width: 8px;
  height: 8px;
  background-color: #888;
  border-radius: 50%;
  margin: 0 2px;
  animation: jump 1s infinite;
}

.dot:nth-child(2) {
  animation-delay: 0.2s;
}

.dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes jump {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
  100% {
    transform: translateY(0);
  }
}
/*  */
/* .front_of:before {
  z-index: 2;
  position: absolute;
  left: 0;
  top: 0;    
  width: 100%;
  height: 100%;
  max-height: 560px;
  background: url(/img/icons/batiscaf.png) no-repeat;
  background-size: contain;
  content: "";
  background-color: rgba(255, 255, 255, 0.2);
} */

.get_item_text {
  margin-top: 20px;
  color: #3f51b5;
}

#char_select_pip {
  background: #000;
  padding: 10px;
  border-top: 2px solid #5a5f5b;
  border-radius: 6px;
  color: #ffffff;
  border: 4px solid #de9b72;
  content: "";
  background: #3a3d3e;
}
#char_select_pip h3 {
  color: #ffffff;
}
#char_select_pip span {
  color: #ffffff;
}
#char_select_pip button {
  color: #ffffff;
  background: #3a3d3e;
  border: 2px solid #ffffff;
  border-radius: 6px;
  cursor: pointer;
}
#attributePoints {
}
.attr_label {
  opacity: 0.5;
}
#attributePointsValue {
  background: #5a5f5b;
  padding: 5px;
  display: inline-flex;
  border-radius: 6px;
  border-top: 2px solid #5a5f5b;
}
.attributeSelector {
  margin-bottom: 10px;
}
#char_select_pip button.start_game {
  background: #5a5f5b;
  border: 2px solid #ffffff29;
  border-radius: 6px;
  padding: 5px;
  cursor: pointer;
}

#locationName {
  color: #773333;
  font-weight: bold;
}

#inventoryList {
  font-family: "Courier New", monospace;
}

#message,
#text_area_intro {
  margin-bottom: 10px;
  border: 4px solid #ababab40;
  padding: 15px 12px;
  background: #fff;
  font-family: "Andika", sans-serif;
  text-align: justify;
}
#options {
  content: "";
  position: relative;
}

#optionsList {
  /* font-weight: bold; */
  position: relative;
  padding: 7px 17px;
  /* border-top: 1px solid #dbdbdb;
  background: #69696940; */
  opacity: 0; /* Начальное значение прозрачности 0 */
  animation: fadeIn 0.8s ease forwards; /* Анимация появления */
  margin-left: 14px;
}
#optionsList li {
  cursor: pointer;
  transition: all 0.5s;
  margin-top: 6px;
  padding: 7px 12px;
  border-radius: 5px;
  color: lightgreen;
  background-color: #4a3a2e;
  display: inline-block;
  opacity: 0.9;
  margin-right: 10px;
  /* box-shadow: 0px 5px 10px 2px rgb(0 0 0) inset; */
  box-shadow: 0px 5px 10px 2px rgb(79 90 87);
  background-color: #45372a;
  border: 2px solid #4d3e31;
  outline: 2px solid #31271e;
}
#optionsList li:hover {
  opacity: 1;
  box-shadow: 0px 3px 8px 2px rgb(0 0 0);
}

/* Стили для локаций */
.location {
  margin-bottom: 20px;
  padding: 10px;
  background-color: #f5f5f5;
  border: 1px solid #ddd;
}

.location h2 {
  margin-top: 0;
}

.location pre {
  font-family: monospace;
  white-space: pre-wrap;
}
/* Стили для инвентаря */
.grid-container {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-gap: 10px;
}

.inventory-item {
  width: 56px;
  height: 54px;
  background: #4b3620;
  line-height: 0;
  border: 2px solid #d5923294;
  border-bottom: 2px solid #875917;
  border-left: 2px solid #bd822e80;
  border-right: 2px solid #bd822e6b;
  outline: 2px solid #31271e;
  color: white;
  padding: 0;
  margin: 5px 0;
  border-radius: 5px;
  /* background: linear-gradient(358deg, #62311a, #823c1a, #b85409); */
  box-shadow: 0px 5px 10px 2px rgb(0 0 0 / 64%) inset;
  position: relative;
  /* opacity: 0.3; */
}
/* .inventory-item::before {
  content: "";
  background: url(img/system/skin.png);
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  opacity: 0.2;
  z-index: 0;
} */
/* .inventory-item:hover {
  opacity: 0.9;
} */

.inventory-item img {
  width: 100%;
  height: 100%;
}
.context-menu {
  width: 148px;
  height: 99px;
  background: #3b2d1f;
  position: absolute;
  z-index: 3;
  bottom: 62px;
  left: 0;
  border: 2px solid #d59232;
  border-radius: 4px;
  line-height: normal;
  padding: 5px;
  visibility: hidden;
  opacity: 0;
  transition: 0.3s cubic-bezier(0.215, 0.61, 0.355, 1);
}
.inventory-item:hover .context-menu {
  visibility: visible;
  opacity: 1;
}

.context-menu .active-button {
  padding: 5px;
  border: 2px solid #dbad6c;
  margin-top: 4px;
  border-radius: 4px;
  cursor: pointer;
  background: #d59232;
}
.context-menu-item {
  cursor: pointer;
  padding: 5px;
}

.context-menu-item:hover {
  background-color: #f1f1f1;
}

/* Стили для кнопки "показать инвентарь" */
.button-show-inventory {
  display: inline-block;
  padding: 10px 20px;
  background-color: #ffcf9c;
  color: #654321;
  font-size: 16px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.3);
  transition: background-color 0.3s;
  position: relative;
  margin-top: 20px;
}

.button-show-inventory:before,
.button-show-inventory:after {
  content: "";
  position: absolute;
  background-color: #fff;
}

.button-show-inventory:before {
  top: -6px;
  left: -6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.button-show-inventory:after {
  bottom: -6px;
  right: -6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.button-show-inventory:hover {
  background-color: #ffac6e;
}

.button-show-inventory:active {
  background-color: #ff9b4d;
}
/* Стили для вариантов ответа */
.options {
  margin-bottom: 20px;
}

.option {
  margin-bottom: 10px;
}

.option button {
  display: block;
  width: 100%;
  padding: 10px;
  background-color: #f5f5f5;
  border: 1px solid #ddd;
  cursor: pointer;
}

.option button:hover {
  background-color: #e9e9e9;
}

.option button:active {
  background-color: #d5d5d5;
}

/* Стили для инвентаря */
.inventory {
  margin-bottom: 20px;
}

.inventory h2 {
  margin-top: 0;
}

.inventory ul {
  list-style-type: none;
  padding: 0;
}

.inventory li {
  margin-bottom: 5px;
}

/* Стили для характеристик персонажа */
.stats {
  margin-bottom: 20px;
}

.stats h2 {
  margin-top: 0;
}

.stats table {
  width: 100%;
  border-collapse: collapse;
}

.stats th,
.stats td {
  padding: 5px;
  text-align: left;
  border: 1px solid #ddd;
}

.stats th {
  font-weight: bold;
}

/* Стили при наведении и нажатии */
.option button:hover,
.option button:active {
  background-color: #c5c5c5;
}

/* Стили tooltip */
/* --- class="tooltip" aria-label="" --- */

.tooltip:focus::after,
.tooltip:hover::after {
  content: attr(aria-label);
  display: block;
}

.tooltip:focus::after,
.tooltip:hover::after {
  position: absolute;
  top: 100%;
  font-size: 1.2rem;
  background-color: #f2f2f2;
  border-radius: 0.5rem;
  color: initial;
  padding: 1rem;
  width: 13rem;
  margin-top: 0.5rem;
  text-align: left;
}

.tooltip {
  position: relative;
  color: goldenrod;
  display: inline-block;
}

.tooltip:hover::before {
  top: 100%;
  right: 0;
  left: 0;
  margin: -1rem auto 0;
  display: block;
  border: solid transparent;
  content: "";
  height: 0;
  width: 0;
  position: absolute;
  pointer-events: none;
  border-bottom-color: #f2f2f2;
  border-width: 1rem;
}

/* Dice */
@font-face {
  font-family: "Effra";
  src: url("Effra_Std_Md.ttf");
}
#anim-container {
  width: 100%;
  height: 100%;
  /* max-width: 800px;
  max-height: 600px; */
  position: absolute;
  display: flex;
  justify-content: center;
  align-items: center;

  width: 200px;
  height: 200px;
  background: #fff;
  background: #ffffef;
  border-radius: 9px;
  box-shadow: 0 0 27px 0 #ffffff;
  outline: 2px solid #9e9e9e;
  border: 2px solid #918181;
}
#dice {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-style: preserve-3d;
  transition: transform 2s ease-out;
  /* width: 150px;
  height: 150px; */
}
.side {
  position: absolute;
  width: 0;
  height: 0;
  /* width: 40px;
  height: 34.64px; */
  transform-origin: 50% 66.6%;
  z-index: 1;
  background-image: url("triangle.png");
  background-size: 100% 100%;
  filter: sepia(1) hue-rotate(175deg) brightness(1.3);
}
#dice-text {
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  opacity: 0%;
  transition: opacity 0.5s linear 2s;
  font-weight: bold;
  color: white;
  background-size: 100% auto;
  font-family: "Effra";
  margin-top: 38px;
}
#difficult_level {
  border-radius: 14px;
  background: #6d7177;
  color: #ffffff;
  width: 46px;
  height: 30px;
  position: absolute;
  margin-top: -200px;
  z-index: 9999;
  box-shadow: 0 0 16px 0 #517ac3;
  border: 3px solid #999999;
  display: flex;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
}
#difficult_level::after {
  content: "Класс сложности";
  position: absolute;
  top: -46px;
  width: 160px;
  background: #6d7177;
  color: #ffffff;
  padding: 6px 10px 20px;
  z-index: -1;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  /* border: 2px solid #000000eb;
  border: 4px solid #5f5442; */
  border: 3px solid #9e9e9e;
  border-bottom: 0;
}
#difficult_level.success {
  border: 2px solid #19c720;
}
#anim-container.success {
  outline: 2px solid #19c720;
}
#difficult_level.success + div + #buttonDiceOk {
  background: #19c720;
}

#difficult_level.success + div + #buttonDiceOk::after {
  content: "Успешно";
}
#difficult_level.danger + div + #buttonDiceOk {
  background: #c71919;
}
#difficult_level.danger + div + #buttonDiceOk::after {
  content: "Провал";
}
#difficult_level.danger {
  border: 2px solid #c71919;
}
#anim-container.danger {
  outline: 2px solid #c71919;
}
#buttonDiceOk {
  display: none;
  padding: 0.1rem 1rem;
  font-size: 1.2rem;
  border: none;
  color: #ffffff;
  position: relative;
  background-color: #673ab7;
  box-shadow: 0 0 16px 0 #8291ab6e;
  box-shadow: 0 0 16px 0 #517ac3;
  /* background-color: #4f4f4f; */
  border-radius: 4px;
  margin-top: 200px;
  z-index: 9999;
  cursor: pointer;
  transition: all 0.5s;
}
#buttonDiceOk:hover {
  box-shadow: 0 0 16px 0 #517ac3;
  /* background-color: #2a0e5d !important; */
}

.medieval-button {
  /* background-color: #8b4513; 
  border: 2px solid #daa520; 
  background-color: #5f5252c2;     */
  background-color: #2196f340;
  border: none;
  color: white;
  padding: 2px 5px;
  font-size: 16px;
  cursor: pointer;
  border-radius: 100%;
  margin: 5px;
  font-family: "MedievalSharp", cursive; /* Используем средневековый шрифт */
  box-shadow: 0 0 16px 0 #517ac3;
  box-shadow: 0 0 16px 0 #795548d4;
  transition: all 0.2s;
}
.medieval-button.active {
  background-color: #e91e63a1;
  box-shadow: 0 0 16px 0 #ff0057;
}
.medieval-button.active img {
  filter: drop-shadow(2px 4px 6px #3f51b5) sepia(1) hue-rotate(-44deg);
}
.medieval-button img {
  width: 30px;
  filter: drop-shadow(2px 4px 6px #3f51b5) sepia(1);
}

.medieval-button:hover {
  opacity: 0.8;
  /* background-color: #61331e00; */
}
.medieval-button:hover img {
  filter: drop-shadow(2px 4px 6px #0e1c66) sepia(1);
}
div#chatImg::before {
  content: "";
  background: url(./img/chat-window-frame.png);
  background-size: contain;
  position: absolute;
  width: 100%;
  height: 37px;
  opacity: 1;
  z-index: 7;
  max-width: 470px;
  background-repeat: no-repeat;
}
/* .game-buttons {
  display: flex;
  justify-content: space-around;
  position: absolute;
  top: 10px;
  width: 100%;
  z-index: 9;
} */
.game-buttons {
  display: flex;
  justify-content: space-around;
  position: absolute;
  /* top: 22px; */
  top: 2%;
  z-index: 9;
  padding: 0px 25px;
  box-sizing: border-box;
  width: 100%;
}

.inventory-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  padding: 28px 24px;
  height: 100%;
  height: 44.4vh;
  margin: 3px;
  justify-content: space-around;
  position: relative;
  z-index: 1;
}

#statsList {
  list-style-type: none;
  padding: 0;
}

#statsList li {
  border: 2px solid #d5923294;
  border-bottom: 2px solid #875917;
  border-left: 2px solid #bd822e80;
  border-right: 2px solid #bd822e6b;
  outline: 2px solid #31271e;
  color: white;
  padding: 10px;
  margin: 5px 0;
  border-radius: 5px;
  background: linear-gradient(358deg, #62311a, #823c1a, #b85409);
  box-shadow: 0px 5px 10px 2px rgb(0 0 0 / 64%) inset;
  position: relative;
}
#statsList li::before {
  content: "";
  background: url(img/system/skin.png);
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  opacity: 0.2;
  z-index: 0;
}
#inventory-body {
  background: url(./img/inventar_image.jpg);
  height: 49.6vh;
  position: relative;
}
#inventory-content {
  position: relative;
  z-index: 1;
  background: #291e12;
  height: 100%;
}
#inventory-content:after {
  content: "";
  background: url(./img/text_frame.png);
  position: absolute;
  background-size: cover;
  top: -3px;
  width: 100%;
  height: 50.4vh;
  z-index: 0;
}

.item-body-slot {
  position: absolute;
  width: 56px;
  height: 54px;
  background: #ffffff4d;
  line-height: 0;
  border: 2px solid #ffffff36;
  outline: 2px solid #31271e94;
  color: white;
  padding: 0;
  margin: 5px 0;
  border-radius: 5px;
  box-shadow: 0px 5px 10px 2px rgb(0 0 0 / 64%) inset;
}
.item-body-slot.slot0 {
  top: 9vh;
  left: 26%;
}
.item-body-slot:before {
  content: "";
  position: absolute;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 80%;
  width: 100%;
  height: 100%;
  filter: opacity(0.5) grayscale(1) saturate(0.5) drop-shadow(2px 4px 6px white);
}
.item-body-slot.slot0:before {
  background-image: url("./img/icons/interface/Iron Helmet.png");
}
.item-body-slot.slot1:before {
  background-image: url("./img/icons/interface/Wooden Armor.png");
}
.item-body-slot.slot2:before {
  background-image: url("./img/icons/interface/Golden Sword.png");
}
.item-body-slot.slot3:before {
  background-image: url("./img/icons/interface/Leather Boot.png");
}
.item-body-slot.slot4:before {
  background-image: url("./img/icons/interface/Wooden Shield.png");
}

.item-body-slot.slot1 {
  top: 18vh;
  left: 26%;
}
.item-body-slot.slot2 {
  top: 26vh;
  left: 16%;
}
.item-body-slot.slot3 {
  top: 38vh;
  left: 23%;
}
.item-body-slot.slot4 {
  top: 26vh;
  left: 34%;
}
.item-body-slot img {
  width: 100%;
  height: 100%;
  position: relative;
}

#mapContainer {
  height: 49.6vh;
}
#quest {
  background: url(./img/frame3.jpg);
  background-size: 100% 49.6vh;
  height: 49.6vh;
}
#questsList {
  height: 49.6vh;

  background-size: 100% 100%;
  padding: 89px 74px;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
}

.quest-subquest {
  margin-top: 10px;
  padding: 6px;
  border: 1px solid #a19d9d78;
  background: #ffffff94;
}

#statsList {
  height: 49.6vh;
  padding: 89px 74px;
  box-sizing: border-box;
  background: #eee;
}
#settings.menu_block {
  padding: 89px 74px;
  background: #000000d6;
}
#settings.menu_block::before {
  display: none;
}
.menu_block {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 8;
  /* background: #333333e6;
  background: linear-gradient(
    358deg,
    #333333b5,
    #333333e6,
    #333333e6,
    #333333,
    transparent
  );
  padding: 82px 30px 0px 30px; */
  box-sizing: border-box;
}

.menu_block::before {
  content: "";
  background: url(./img/test-4.png);
  background-size: 100% 100%;
  position: absolute;
  width: 100%;
  height: 49.6vh;
  z-index: 1;
}
.menu_block::after {
  content: "";
  position: absolute;
  /* background: url(./img/chat-window2.jpg); */
  background-size: cover;
  top: 49.6vh;
  width: 100%;
  height: 50.4vh;
  z-index: 0;
}

.quest-item {
  background: aliceblue;
  border-radius: 6px;
  padding: 3px 12px;
  margin-bottom: 10px;
}

.quest-item {
  background-color: #edece2;
  padding: 10px;
  border-radius: 5px;
  cursor: pointer;
  position: relative;
}

.quest-item::before {
  content: "";
  background: url(https://cdn1.ozone.ru/multimedia/1020272124.jpg);
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  opacity: 0.2;
  z-index: 0;
}

.quest-item:hover {
  background-color: #e6e6e6;
}

.quest-item .quest-description {
  display: none;
  padding: 10px 0;
  border-top: 1px solid #afafaf;
  margin-top: 10px;
}

.quest-item.expanded {
  background-color: #e6e6e6;
}

.quest-item.expanded .quest-description {
  display: block;
}

.quest-item::after {
  content: "+";
  position: absolute;
  top: 20px;
  right: 10px;
  transform: translateY(-50%);
  font-size: 20px;
  font-weight: bold;
  color: #666;
}

.quest-item.expanded::after {
  content: "-";
}

.quest-title {
  font-weight: 600;
}

.map-point {
  position: absolute;
  width: 10px;
  height: 10px;
  background-color: #550000;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0px 1px 2px 1px rgb(0 0 0 / 65%) inset;
  border: 2px solid #6d4739;
  outline: 1px solid #3f1a1a;
}

.current-location {
  background-color: green;
}

.map-label {
  position: absolute;
  top: -20px;
  left: 18px;
  font-size: 12px;
  color: white;
  background-color: #550000;
  border-radius: 4px;
  padding: 0 3px;
  cursor: pointer;
  box-shadow: 0px 5px 10px 2px rgb(0 0 0) inset;
  border: 2px solid #6d4739;
  outline: 1px solid #3f1a1a;
}
