* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* width */
::-webkit-scrollbar {
  width: 12px;
}

/* Track */
::-webkit-scrollbar-track {
  background: #6e0b92;
}

/* Handle */
::-webkit-scrollbar-thumb {
  background: #37065b;
  border-radius: 4px;
}

/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
  background: #111;
}

body {
  position: relative;
  width: 100%;
  height: 100vh;
  font-size: 16px;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 24px;
  background-image: radial-gradient(#4b0266, #1d0131);
  background-size: cover;
}

body:after {
  display: block;
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-image: url(../img/game_bg.png);
  background-position: left top;
  z-index: 2;
}

#loader {
  display: flex;
  position: fixed;
  z-index: 99;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-repeat: no-repeat;
  background-position: 0 0;
  background-image: radial-gradient(#4b0266, #1d0131);
}

#loader.hidden {
  display: none;
}

#loader .spinner {
  margin: auto;
  width: 50px;
  height: 50px;
  background-repeat: no-repeat;
  background-position: center;
  background-image: url(../img/loader.png);
  background-size: contain;
  animation-name: spinLoader;
  animation-duration: 1.5s;
  animation-iteration-count: infinite;
  animation-fill-mode: forwards;
  animation-timing-function: linear;
}

@keyframes spinLoader {
  0% {
    transform: rotate(0deg);
  }
  100%{
    transform: rotate(360deg);
  }
}

#app {
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: relative;
  z-index: 3;
  padding: 15px;
  transition: padding, .6s ease;
}

.mobile #app,
#app.active {
  padding-right: 15px;
}

.sidebar {
  position: absolute;
  right: 0;
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 15px 15px 50px 30px;
  max-width: 220px;
  min-width: 170px;
  height: 100%;
  aspect-ratio: auto .4 / 1;
  background-image: linear-gradient(to right, #550084, #3A005F);
  box-shadow: inset 8px 0 10px rgba(121, 11, 176, .5);
  border-radius: 25px 0 0 25px;
  transition: right, .6s ease, padding 0s ease;
}

.sidebar.hide {
  right: -220px;
}

#closeMenu,
#burger {
  background-repeat: no-repeat;
  background-position: center;
  cursor: pointer;
  transition: right, .1s ease;
}

#closeMenu {
  margin-left: auto;
  margin-bottom: 30px;
  width: 45px;
  height: 45px;
  background-image: url(../img/close.png);
  z-index: 540;
}

#burger {
  position: fixed;
  right: 15px;
  top: 17px;
  width: 64px;
  height: 64px;
  background-image: url(../img/burger.png);
  background-size: contain;
  z-index: 0;
}

.game {
  display: flex;
  width: 100%;
  height: 100%;
}

.phone {
  margin: auto;
}

.screen3 .screen {
  width: 100%;
  height: 100%;
  border-radius: 40px;
  position: absolute;
  overflow: hidden
}

.screen3 .screen2 {
  width: calc(100% - 24px);
  height: calc(100% - 24px);
  border-radius: 40px;
  background: #000;
  position: absolute;
  display: flex;
  justify-content: center;
  align-items: center
}

.screen3 {
  width: 100%;
  height: 100%;
  border-radius: 50px;
  background-color: rgb(101, 54, 165);
  box-shadow: inset rgb(74, 37, 127) 0 0px 0px 4px,
              inset rgba(47, 21, 83, 0.8) 0 -1px 5px 4px,
              inset rgba(101, 54, 165,.25) 0 -1px 0px 7px,
              inset rgba(101, 54, 165,.7) 0 2px 1px 7px,
              inset 0px 0px 15px 5px rgb(101, 54, 165),
              0 0 15px 0 #000;
  position: absolute;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Custom dropdown styles */

.select-langs.hidden {
  display: none;
}

.select-langs:before {
  position: absolute;
  left: 5px;
  top: 5px;
  display: block;
  content: "";
  width: 70px;
  height: 70px;
  background-repeat: no-repeat;
  background-position: center;
  background-image: url(../img/lang.png);
  background-size: contain;
}

.select-langs .arrow {
  display: block;
  position: absolute;
  right: 20px;
  top: 50%;
  display: block;
  content: "";
  width: 28px;
  height: 25px;
  background-repeat: no-repeat;
  background-position: center;
  background-image: url(../img/arrow-down.png);
  transform: translateY(-50%);
}

.select-langs .arrow.rotated {
  background-image: url(../img/arrow-up.png);
}

.wrapper-dropdown {
  position: relative;
  display: inline-block;
  width: 100%;
  min-height: 80px;
  border-radius: 40px;
  background: #260040;
  text-align: left;
  color: #fff;
  cursor: pointer;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  font-family: Arial;
  border: 1px solid #2F0049;
  z-index: 105;
  transition: all .3s ease;
}

.wrapper-dropdown.active {
  border-radius: 40px 40px 0 0;
  border-bottom-color: transparent;
}

.scrollable-menu {
  height: auto;
  max-height: 200px;
  overflow-x: hidden;
}

.selected-display {
  margin-left: 85px;
  font-size: 20px;
  font-weight: bold;
  line-height: 78px;
  text-transform: uppercase;
}

.wrapper-dropdown .dropdown {
  transition: 0.3s;

  position: absolute;
  top: 77px;
  width: calc(100% + 1px);
  right: 0;
  left: -.5px;

  margin: 0;
  padding: 0;

  list-style: none;

  z-index: 99;

  border-radius: 0 0 40px 40px;
  background: inherit;

  -webkit-transform-origin: top;
  -moz-transform-origin: top;
  -ms-transform-origin: top;
  transform-origin: top;

  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;

  opacity: 0;
  visibility: hidden;
  overflow: hidden;
  border: 1px solid #2F0049;
}

.wrapper-dropdown .dropdown li {
  padding: 0 15px;
  line-height: 45px;
  font-size: 24px;
  overflow: hidden;
  text-align: center;
  font-weight: bold;
}

.wrapper-dropdown .dropdown li:last-child {
  border-bottom: none;
}

.dropdown {
  padding: 0.5rem;
}

.wrapper-dropdown .dropdown li:hover,
.wrapper-dropdown .dropdown li.active {
  background-color: #39015C;
  color: #ff9f2e;
}

.wrapper-dropdown.active .dropdown {
  opacity: 1;
  visibility: visible;
  border-top-color: transparent;
}

/* End Lang select */

/* Orientation changer */
.change-orientation {
  position: relative;
  height: 100%;
  max-height: 125px;
  aspect-ratio: auto 1 / 0.9123;
  margin: auto 0;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  background-image: url(../img/rotate_portarit.png);
  cursor: pointer;
}

.change-orientation.d-vertical {
  background-image: url(../img/rotate_portarit_na.png);
}

.change-orientation.d-horizontal {
  background-image: url(../img/rotate_landscape_na.png);
}

.change-orientation.disabled:after {
  display: none;
}

.change-orientation:after {
  position: absolute;
  left: 0;
  top: 0;
  display: block;
  content: "";
  width: 100%;
  height: 100%;
  background-image: url(../img/rotate_landscape.png);
  background-size: contain;
  transition: opacity, .3s ease;
  opacity: 0;
}

.change-orientation.active:after {
  opacity: 1;
}

/* Change orientation end */

/* Change device styles */

.device-s {
  position: relative;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  cursor: pointer;
}

.device-s:after {
  display: block;
  content: "";
  width: 100%;
  height: 100%;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: 0;
  transition: opacity, .3s ease;
}

.device-s.active:after {
  opacity: 1;
}

.device-s.device1 {
  aspect-ratio: auto 1 / 1.8;
  height: 100%;
  max-height: 144px;
  background-image: url(../img/wide1_default.png);
}

.device-s.device1:after {
  background-image: url(../img/wide1_selected.png);
}

.device-s.device2 {
  aspect-ratio: auto 1 / 1.649;
  height: 100%;
  max-height: 160px;
  background-image: url(../img/wide2_default.png);
  margin: 25% auto;
}

.device-s.device2:after {
  background-image: url(../img/wide2_selected.png);
}

.device-s.device3 {
  aspect-ratio: 1 / 1.2;
  height: 100%;
  max-height: 160px;
  background-image: url(../img/wide3_default.png);
}

.device-s.device3:after {
  background-image: url(../img/wide3_selected.png);
}

/* Change device end */

.phone {
  display: flex;
  position: relative;
  z-index: 10;
  border-radius: 10px;
}

.game-frame {
  position: absolute;
  left: 50%;
  top: 50%;
  margin: auto;
  z-index: 0;
  border-radius: 40px;
  background-color: #111;
  transform: translate(-50%, -50%);
  border: none;
}

.device1.vertical {
  position: relative;
  aspect-ratio: auto 1/2.1817;
}

.device2.vertical {
  position: relative;
  aspect-ratio: auto 1.2273 /2.1817;
}

.device3.vertical {
  position: relative;
  aspect-ratio: auto 1.637 /2.1817;
}

.game .game-frame {
  width: 100%;
  height: 100%;
}

.game .vertical {
  max-height: 960px;
  height: 100%;
  max-width: 100%;
}

.game .vertical.changed-w {
  width: 100%;
  height: auto;
  max-height: none;
}

.game .device1.vertical.changed-w {
  max-width: 440px;
}

.game .device2.vertical.changed-w {
  max-width: 540px;
}

.game .device3.vertical.changed-w {
  max-width: 720px;
}

.game .horizontal {
  max-width: 960px;
  width: 100%;
}

.game .phone.horizontal.changed-h {
  max-width: 100%;
  width: auto;
  height: 100%;
}

.game .device1.horizontal.changed-h {
  max-height: 440px;
}

.game .device2.horizontal.changed-h {
  max-height: 540px;
}

.game .device3.horizontal.changed-h {
  max-height: 720px;
}

.device1.horizontal {
  aspect-ratio: auto 2.1817/1;
}

.device2.horizontal {
  aspect-ratio: auto 2.1817 / 1.2273;
}

.device3.horizontal {
  aspect-ratio: auto 2.1817 / 1.637;
}

.mobile #game {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  z-index: 888;
  border-radius: 0;
  transform: none;
}

.mobile #closeMenu {
  display: none;
}

.mobile .sidebar {
  transition: none;
  position: fixed;
  z-index: 800;
}

.mobile .game {
  position: fixed;
  z-index: 300;
}

.mobile .select-langs {
  position: fixed;
  right: 5px;
  left: auto;
  top: 5px;
  border: none;
  z-index: 999;
  width: 210px;
  background: transparent;
}

.mobile .select-langs:before {
  position: relative;
  left: -3px;
  top: 2px;
  z-index: 100;
  width: 38px;
  height: 38px;
}

.mobile .select-langs .selected-display {
  display: none;
}

.mobile .select-langs .arrow {
  display: none;
  left: -161px;
  top: 12px;
  right: auto;
  z-index: 101;
  transform: none;
  opacity: 0;
}

.mobile .select-langs .arrow.rotated {
  opacity: 1;
}

.mobile #dropdown {
  min-height: auto;
  width: max-content;
}

.mobile .wrapper-dropdown .dropdown {
  width: 210px;
  top: 0;
  right: 0;
  left: auto;
  border-radius: 20px;
  background-color: #260040;
}

.mobile .wrapper-dropdown .dropdown li {
  line-height: 42px;
}

@media (max-width: 1919px) {

  .sidebar {
    padding-bottom: 15px;
  }

  #closeMenu {
    width: 30px;
    height: 30px;
    min-height: 30px;
    margin-bottom: 15px;
    background-size: contain;
  }

  #burger {
    width: 45px;
    height: 45px;
  }

  .select-langs:before {
    width: 45px;
    height: 45px;
  }

  .wrapper-dropdown {
    max-width: 140px;
    min-height: 55px;
    border-radius: 27.5px;
  }

  .wrapper-dropdown.active {
    border-radius: 27.5px 27.5px 0 0;
  }

  .wrapper-dropdown .dropdown {
    top: 53px;
  }

  .wrapper-dropdown .dropdown li {
    font-size: 20px;
    line-height: 38px;
  }

  .selected-display {
    margin-left: 55px;
    line-height: 55px;
  }

  .select-langs .arrow {
    width: 25px;
    height: 20px;
    background-size: contain;
  }

  .change-orientation {
    background-size: contain;
  }

  .device-s,
  .change-orientation {
    min-height: 80px;
  }

  .device-s.device2 {
    margin: 15px 0;
  }

  .change-orientation:after {
    background-size: contain;
  }
}

@media (max-height: 800px) {
  .change-orientation {
    margin: 15px auto;
  }
}

@media (max-height: 768x) {
  .change-orientation {
    margin: 12px 0;
  }
}

@media (max-height: 510px) {
  .sidebar {
    overflow-y: scroll;
  }
}

@media (max-height: 490px) {
  .sidebar {
    padding: 15px;
  }
  .game-frame {
    border-radius: 30px;
  }
}