:root {
  --main-text-color: rgb(161, 204, 165);
  --main-bg-color: rgb(65, 93, 67);
  --main-cursor-hand: url('../assets/imgs/cursor.png') 9 1, auto;
}

/* FONTS */

@font-face {
  font-family: 'Gatchina Regular';
  src: url('../assets/fonts/Gatchina-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Bellota Regular';
  src: url('../assets/fonts/Bellota-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "Ura Bum Bum SP";
  src: url('../assets/fonts/UraBumBumSP.otf') format("opentype");
  font-weight: normal;
  font-style: normal;
}

/* RESET CSS */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
}

/* */

* {
  scrollbar-color: var(--main-text-color) var(--main-bg-color);
}

body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100vh;
  min-width: 1280px;
  min-height: 720px;

  background-image: url(../assets/imgs/tree.png);
  box-shadow: inset 0px 0px 10vh 0vh rgba(0, 0, 0, 1);


  font-family: "Bellota Regular";
  font-size: 1rem;

  cursor: var(--main-cursor-hand);

  overflow: hidden;
  /*чтобы круг звука не добавлял скроллбары*/
}

input {
  cursor: var(--main-cursor-hand);
}

input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
  cursor: var(--main-cursor-hand);
}

/* PREINTRO */

.preintro {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  width: 100%;
  background-color: black;
}

.gotogame {
  width: fit-content;
  position: absolute;
  bottom: 10vh;
  margin: 0 auto;
  color: #a1cca5;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1vw;
}

.glass-card {
  /* Semi-transparent background is mandatory to see the effect */
  background-color: rgba(65, 93, 67, 0.2);
  /* Blurs the content beneath the card */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  /* Styling to make it look nice */
  padding: 2vh 4vh;
  border-radius: 12px;
  border: 1px solid rgb(161, 204, 165, 0.3);
}

.gotogame-show-anim {
  animation: gotogameshow 1s 1 linear;
}

.gotogame-hide-anim {
  animation: gotogamehide 1s 1 linear;
}

@keyframes gotogameshow {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes gotogamehide {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

/* INTRO */

.intro {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  width: 100%;
  background-image: url(../assets/imgs/tree.png);
  box-shadow: inset 0px 0px 10vh 0vh rgba(0, 0, 0, 1);
}

.intro .logo {
  text-transform: capitalize;
  letter-spacing: 0.6vw;
  font-size: 9vh;
}

.intro .logo span:nth-child(9n+1) {
  font-size: 11vh;
}

.transparent-text {
  color: transparent;
  text-shadow: none;
}

.intro-anim {
  animation: intro1 19s 1 ease-out;
}

@keyframes intro1 {

  from {
    background-size: 5%;
    /*                        blur size */
    box-shadow: inset 0px 0px 30vh 50vh rgba(0, 0, 0, 1);
  }

  to {
    background-size: 30px;
    box-shadow: inset 0px 0px 10vh 0vh rgba(0, 0, 0, 1);
  }
}

.intro-letter-anim {
  animation: intro2 2s 1 ease-in;
}

@keyframes intro2 {

  0% {
    color: transparent;
    text-shadow: none;
  }

  50% {
    color: rgba(0, 0, 0, 0.5);
    text-shadow: none;
  }

  100% {
    color: black;
    text-shadow:
      -1px -1px 0 red,
      1px -1px 0 red,
      -1px 1px 0 red,
      1px 1px 0 red;
  }
}

.intro .logo.intro-logo-squeeze-end {
  letter-spacing: -0.7vw;
}

.intro-logo-squeeze {
  animation: intro3 18s 1 ease-out;
}

@keyframes intro3 {

  from {
    letter-spacing: 0.6vw;
  }

  to {
    letter-spacing: -0.7vw;
  }
}

/* LOBBY */

.lobby {

  display: flex;
  flex-direction: column;
  justify-content: stretch;
  align-items: stretch;
  height: 100vh;
  width: 100%;

  background-image: url(../assets/imgs/tree.png);
  box-shadow: inset 0px 0px 10vh 0vh rgba(0, 0, 0, 1);
}

button {
  font-family: "Bellota Regular";
  font-size: 1rem;
  color: var(--main-text-color);
  background-color: var(--main-bg-color);
  cursor: var(--main-cursor-hand);
}

h1 {
  font-family: "Gatchina Regular";
  font-size: 4rem;
  margin: 0.5rem auto;
}

h2 {
  font-family: "Gatchina Regular";
  margin: 0.25rem auto;
  text-align: center;
}

.red-stroke-shadow {
  color: #000000;
  text-shadow:
    -1px -1px 0 red,
    1px -1px 0 red,
    -1px 1px 0 red,
    1px 1px 0 red;
}

menu {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: stretch;
  gap: 1rem;
  width: 100%;
  min-height: 60px;
  height: 60px;
  margin: 0;
  padding: 0;
  /* RESET CSS*/
  background-image: url(../assets/imgs/ui/grass.png);
  background-repeat: repeat-x;
  background-size: contain;

  box-shadow: 0px 0vh 10vh 0px rgba(0, 0, 0, 0.75);
}

menu button {
  border: 1px solid var(--main-text-color);
  border-radius: 1vh;
}

/* KEYCAP */
.start {
  border: none;
  background-color: transparent;
  min-width: 212px;
  overflow-y: hidden;
  overflow-x: hidden;

  transition: all 0.1s ease;
}

.start:active {
  transform: scale(0.95);
}

.start--keycap {
  margin-top: 10px;
  height: 60px;
  width: 211px;
}

.start--keycap:hover {
  /* box-shadow: 0px 0px 5px 5px rgba(161, 204, 165, 0.5); */
  filter: drop-shadow(0px 0px 12px rgba(161, 204, 165, 0.75));
  animation: shake 0.8s ease-in-out 1;
}

@keyframes shake {
  0% {
    transform: rotate(0deg);
  }

  25% {
    transform: rotate(-5deg);
  }

  50% {
    transform: rotate(5deg);
  }

  75% {
    transform: rotate(-3deg);
  }

  100% {
    transform: rotate(0deg);
  }
}

/* GEAR */
.settings-for-new-game {
  border: none;
  background-color: transparent;
  min-width: 100px;
  overflow: hidden;
}

.settings-for-new-game--gear {
  margin-top: 10px;
  height: 100px;
  width: 100px;
  border-radius: 50%;

  /* for animation*/
  transition: transform 0.5s ease-in-out;
}

.settings-for-new-game--gear:hover {
  /* box-shadow: 0px 0px 5px 5px rgba(161, 204, 165, 0.75); */
  filter: drop-shadow(0px 0px 12px rgba(161, 204, 165, 0.75));
  transform: rotate(10deg);
}

/* OST */
.sound-button {
  border: none;
  background-color: transparent;
  min-width: 150px;
  overflow-y: hidden;
}

.sound-button--casette {
  background-image: url(../assets/imgs/ui/casette.png);
  background-size: contain;
  background-repeat: no-repeat;
  margin-top: 10px;
  height: 70px;
  width: 150px;
  position: relative;
}

#uivolumerange {
  width: 60px;
  position: absolute;
  top: 5px;
  left: 17px;
  margin: 0;
}

#uivolumerange:hover {
  box-shadow: 0px 0px 5px 3px rgba(161, 204, 165, 0.66);
}

#uimicrophone {
  position: absolute;
  top: 14px;
  left: 93px;
  margin: 0;
}

#uimicrophone:hover {
  box-shadow: 0px 0px 6px 4px rgba(161, 204, 165, 0.66);
}

/* ARMYDOG*/
.about-game {
  border: none;
  background-color: transparent;
  min-width: 161px;
  overflow-y: hidden;
}

.about-game--armydogtag {
  margin-top: 10px;
  height: 60px;
  width: 161px;

  transition: transform 0.3s ease;
  transform-origin: left bottom;
  /* Pivots from the bottom-left corner */
}

.about-game--armydogtag:hover {
  /* box-shadow: 0px 0px 5px 5px rgba(161, 204, 165, 0.5); */
  filter: drop-shadow(0px 0px 12px rgba(161, 204, 165, 0.75));
  transform: translateY(-10px);
  /* Lifts the element up on hover */
}

/* MODALS */

.help {
  display: block;
  position: absolute;
  top: 10%;
  min-width: 640px;
  max-width: 60%;
  margin-left: 25%;
  padding: 1rem;
  font-size: 1rem;
  color: var(--main-text-color);
  overflow-y: scroll;
  max-height: 80%;
}

.settings-new-game {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 0.5rem;
  position: absolute;
  top: 10%;
  min-width: 640px;
  max-width: 60%;
  margin-left: 25%;
  padding: 1rem;
  font-size: 1rem;
  color: var(--main-text-color);
}

.settings-new-game-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
}

.setting-for-smth {
  margin: 0.1rem 0;
}

.setting-for-player-name {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
}

#name-settings-player {
  flex-grow: 1;
}

.settings-new-game input {
  font-family: 'Bellota Regular';
  font-size: 1.1em;
  color: var(--main-text-color);
  background-color: var(--main-bg-color);
  padding: 0.2rem;
  width: 4rem;
  border: 1px solid var(--main-text-color);
  border-radius: 2px;
}

/* UI */

.squad {
  width: calc(200px + 16px);
  position: relative;
  overflow: hidden;

  font-family: "Ura Bum Bum SP", sans-serif;
}

.squad-full {
  position: absolute;
  top: 0;
  width: calc(200px + 16px);
  max-width: calc(200px + 16px);
  background-image: url(../assets/imgs/paper.png);
  background-size: contain;
  background-repeat: no-repeat;
  height: 720px;
}

.squad:hover {
  overflow: unset;
}

.squad:hover .squad-full {
  z-index: 1;
}

.squad-top-row {
  height: 60px;
}

.squad-full-col {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  height: 100%;
  gap: 0.5rem;
}

.squad-person {
  flex-basis: 90px;
  /* flex-grow: 1; */
  width: 200px;
  max-width: 200px;
  min-height: 90px;

  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(3, 1fr);
  grid-template-areas:
    "g-name g-name"
    "g-ava g-state"
    "g-ava g-state";
}

.squad-person-name {
  grid-area: g-name;
  width: 200px;
  max-width: 200px;
  min-height: 30px;

  /* Prevents the text from wrapping to a new line */
  white-space: nowrap;
  /* Hides the overflowing text */
  overflow: hidden;
  text-overflow: ellipsis;

  text-align: left;
  font-size: 1.1em;
  padding-left: 1rem;
}

.squad-person-ava {
  grid-area: g-ava;
  width: 100px;
  max-width: 100px;
  min-height: 60px;
}

.squad-person-ava img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.squad-person-state {
  grid-area: g-state;
  width: 100px;
  max-width: 100px;

  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: stretch;

  font-weight: bold;
  font-size: 0.9em;
}

.squad-person-state-stress {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: space-around;
  align-items: center;
  color: #dadada;
}

/* Inventory */

.inventory {
  width: calc(200px + 16px);
  position: relative;
  overflow: hidden;
}

.inventory-full {
  position: absolute;
  top: 0;
  width: calc(200px + 16px);
  height: 700px;
}

.inventory:hover {
  overflow: unset;
}

.inventory:hover .inventory-full {
  z-index: 1;
}

.inventory-top-row {
  height: 60px;
  background-image: url(../assets/imgs/ui/jacket.png);
  background-size: contain;
  background-repeat: no-repeat;
}

.inventory-full-col {
  padding-left: 16px;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0;
}

.inventory-slot {
  height: 100px;
  width: 100px;
  background-image: url(../assets/imgs/ui/pocket.png);
  background-size: contain;
  background-repeat: no-repeat;
  display: flex;
  justify-content: center;
  align-items: center;
}

.flashlight-in-inventory{
  width: 60px;
  height: 60px;
  background-image: url(../assets/imgs/flashlight.png);
}

/* CANVAS */

.content {
  /* margin-top: 4px; */
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  flex-shrink: 1;
  min-height: calc(100% - 60px);
}

.wrapperForCanvas {
  position: relative;
  flex-grow: 0;
  flex-shrink: 0;
}

canvas {
  position: absolute;
}

canvas:focus {
  border: none;
  outline: none;
  /* Use carefully; ensure a clear alternative exists */
}

.step-circle {
  width: 15px;
  height: 15px;
  background: unset;
  border: 1px solid rgba(245, 245, 245, 0.75);
  border-radius: 50%;
  position: absolute;
  animation: step-expand-fade 1s ease-out 1;
}

.scream-circle {
  width: 15px;
  height: 15px;
  background: unset;
  border: 1px solid rgba(245, 245, 245, 0.75);
  border-radius: 50%;
  position: absolute;
  animation: scream-expand-fade 1s ease-out 3;
}

@keyframes step-expand-fade {
  0% {
    transform: scale(0);
    opacity: 1;
  }

  100% {
    transform: scale(4);
    opacity: 0.5;
  }
}

@keyframes scream-expand-fade {
  0% {
    transform: scale(0);
    opacity: 1;
  }

  100% {
    /* 7 cells */
    /* transform: scale(30); */
    /* 11 cells */
    transform: scale(45);
    opacity: 0.5;
  }
}

/* COMMON */

.ui-msg-modal {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 50%;
  position: absolute;
  color: var(--main-text-color);
  bottom: 10%;
}

.press-space-to-continue {}

kbd {
  /* Layout & Spacing */
  display: inline-block;
  padding: 3px 6px;
  min-width: 0.8rem;
  text-align: center;

  /* Typography */
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.8em;
  font-weight: 700;
  line-height: 1;
  color: #333333;

  /* The 3D Keycap Effect */
  background-color: #f7f7f7;
  background-image: linear-gradient(#ffffff, #eaeaea);
  border: 1px solid #cccccc;
  border-radius: 4px;

  /* Shadows representing key depth and bottom edge */
  box-shadow:
    0 1px 0px rgba(0, 0, 0, 0.2),
    0 2px 0px 0px #b5b5b5,
    0 2px 3px rgba(0, 0, 0, 0.1);

  /* Alignment and Animation */
  position: relative;
  top: -1px;
  vertical-align: middle;
  user-select: none;
  transition: all 0.05s ease;

  cursor: var(--main-cursor-hand);
}

/* Interactive "Pressed" Effect */
kbd:active {
  top: 1px;
  box-shadow:
    0 1px 0px rgba(0, 0, 0, 0.2),
    0 0px 0px 0px #b5b5b5,
    0 1px 2px rgba(0, 0, 0, 0.1);
}

.global-hide-anim {
  animation: global-hide-anim1 1s 1 linear;
}

.global-show-anim {
  animation: global-show-anim1 1s 1 linear;
}

@keyframes global-hide-anim1 {
  0% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

@keyframes global-show-anim1 {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

.global-hide-anim-1000 {
  animation: global-hide-anim-1000 1s 1 linear;
}

.global-show-anim-1000 {
  animation: global-show-anim-1000 1s 1 linear;
}

@keyframes global-hide-anim-1000 {
  0% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

@keyframes global-show-anim-1000 {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

.hideme {
  display: none;
}