body {
  cursor: default;
  cursor: url(../images/cursor.png) 2 2, default;
  margin: 0px;
  padding: 0px;
  overflow: hidden;
  background-color: black;
}
.xtest {
  position: relative;
  color: #fff;
  text-align: center;
  width: 3.5vh;
  height: 3.5vh;
  display: block;
  background-size: cover;
  background-position: center;
}
.xtest2 {
  width: 100%;
  height: 3.5vh;
  position: absolute;
  top: 0;
  background-size: cover;
  background-position: center;
  display: none;
}
.xtest:after {
  position: absolute;
  font-size: 1.6vh;
  top: 0;
  left: 110%;
  line-height: 3.7vh;
  color: #fff;
  font-family: arial;
  white-space: nowrap;
}
.bkg:hover .xtest:after {
  color: #fff !important;
}
.bkg:hover .xtest2 {
  display: block;
}
.bkg:hover .bkg2 {
  -webkit-filter: brightness(150%);
          filter: brightness(150%);
  -ms-filter: brightness(150%);
}
#fullscreen .xtest {
  background-image: url(../images/how_btn_fullscreen.png);
}
#fullscreen .xtest2 {
  background-image: url(../images/how_btn_fullscreen.png);
}
#effect3d {
  z-index: 50;
  position: absolute;
  top: 0;
  width: 100%;
  height: 4vh;
  background: url(../images/1px_back.png) repeat-x;
  background-size: 1px 100%;
}
#gradient {
  background: rgb(0,0,0);
  background: linear-gradient(90deg, rgba(0,0,0,0.4) 0%, rgba(255,255,255,0) 50%, rgba(0,0,0,0.4) 100%);
}
#buttonscontainer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  left: 0;
  height: 3.5vh;
  z-index: 100;
  position: absolute;
  padding: 0 20px;
  box-sizing: border-box;
}

.header_links_left,
.header_links_right {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: Arial, sans-serif;
  font-size: 12px;
  color: white;
  flex: 1;
  min-width: 0;
}

.header_links_left {
  justify-content: flex-start;
}

.header_links_right {
  justify-content: flex-end;
}

.header_links_left a,
.header_links_right a {
  color: white;
  text-decoration: none;
  white-space: nowrap;
}

.header_links_left a:hover,
.header_links_right a:hover {
  opacity: 0.7;
}

.header_links_left .separator,
.header_links_right .separator {
  color: white;
}

.header_age_text {
  font-size: 12px;
  color: white;
  white-space: nowrap;
}

.header_age_text a {
  color: white;
  text-decoration: none;
}

.header_age_text a:hover {
  opacity: 0.7;
}

.header_warning_text {
  font-size: 12px;
  color: #ff4444;
  font-weight: bold;
  cursor: pointer;
  white-space: nowrap;
}

.header_warning_text:hover {
  text-decoration: underline;
}

@media (max-width: 767px) {
  .game_logo {
    /*background: url(../images/title.png);*/
    background-size: contain;
    background-repeat: no-repeat;
    width: 300px;
    height: 100px;
    left: 20px;
    z-index: 2;
    position: absolute;
    top: 70px;
	  background-position: left center;
  }
}
@media (min-width: 768px) and (max-width: 1199px) {
  .game_logo {
    /*background: url(../images/title.png);*/
    background-size: contain;
    background-repeat: no-repeat;
    width: 400px;
    height: 120px;
    left: 20px;
    z-index: 2;
    position: absolute;
    top: 70px;
	background-position: left center;
  }
}
@media (min-width: 1200px) and (max-width: 1980px) {
  .game_logo {
    /*background: url(../images/title.png);*/
    background-size: contain;
    background-repeat: no-repeat;
    width: 500px;
    height: 150px;
    left: 20px;
    z-index: 2;
    position: absolute;
    top: 70px;
	background-position: left center;
  }
}
@media (min-width: 1980px) {
  .game_logo {
    /*background: url(../images/title.png);*/
    background-size: contain;
    background-repeat: no-repeat;
    width: 600px;
    height: 180px;
    left: 20px;
    z-index: 2;
    position: absolute;
    top: 70px;
	background-position: left center;
  }
}
.emscripten {
  padding-right: 0px;
  margin-left: auto;
  margin-right: auto;
  display: block;
  z-index: 8;
  height: 100%;
  width: 100%;
  position: absolute;
}
canvas.emscripten {
  border: 0px solid black;
  overflow: hidden;
}
textarea.emscripten {
  font-family: monospace;
  width: 80%;
}
div.emscripten {
  text-align: center;
}
input {
  outline: none;
  z-index: 100500;
}
input:focus {
  outline: 0;
}
textarea {
  outline: none;
  z-index: 100500;
}
textarea:focus {
  outline: 0;
}
div#input_holder {
  top: 0px;
  left: 0px;
  border: none;
}
p {
  font-family: "Arial";
  font-size: 1em;
  font-weight: 400;
}
@font-face {
  font-family: 'NeoSansCyr-Bold';
  src: url('../fonts/NeoSansCyr-Bold.ttf') format('truetype');
  font-weight: bold;
  font-style: normal;
}

p#loading_text {
  margin: 0px !important;
  color: #eacc8a;
}
#loading_progress_text {
  position: absolute;
  bottom: 100px;
  left: 0;
  width: 100%;
  text-align: center;
  color: white;
  font-family: 'NeoSansCyr-Bold', Arial, sans-serif;
  font-size: 24px;
  z-index: 3;
  display: block;
  visibility: visible;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}
#loading_progress_text .loading-dots {
  display: inline-block;
  width: 0.6em;
  text-align: left;
}
div#elem_loading_error {
  text-align: center;
  color: rgb(250, 183, 0);
  position: absolute;
  width: 600px;
  top: 52vh;
  max-width: calc(96% - 20px);
  left: 2%;
  display: block;
  background: #0000007a;
  font-size: 30px;
  margin: auto;
  display: none;
  padding: 10px;
}
@media(min-width:600px) {
  div#elem_loading_error {
    left: calc(50% - 300px);
  }
}
div#elem_loading {
  width: 100%;
  text-align: center;
  margin-top: 0.5vh;
  position: relative;
  z-index: 3;
}
div#elem_loading_bar {
  width: 0%;
  height: calc(100% - 2px);
  position: relative;
  background: #3599E9;
  transition: width 0.1s linear;
  border-radius: 3px;
  margin: 1px;
  z-index: 4;
}
div#elem_loading_bar_bg {
  width: 95%;
  position: absolute;
  bottom: 70px;
  left: 2.5%;
  z-index: 3;
}
.loading-progress-bar {
  width: 100%;
  height: 10px;
  background: rgba(0, 0, 0, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 5px;
  overflow: hidden;
  position: relative;
}
.game_contentdiv {
  /* При загрузке: уменьшенная область с соотношением 16:9–18:9, чёрные полосы по краям */
  position: absolute;
  left: 0;
  right: 0;
  top: 3.5vh;
  bottom: 0;
  margin: auto;
  /* Используем доступную высоту (100vh - 3.5vh хедера) без магического числа 96.5 */
  width: min(100%, (100vh - 3.5vh) * 18 / 9);
  height: min(calc(100vh - 3.5vh), 100vw * 9 / 16);
  overflow: hidden;
  border: none;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #000000;

  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
/* Когда игра запущена: расширить на весь экран, без чёрных полос */
.game_contentdiv.game_started {
  width: 100% !important;
  height: 96.5vh !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  margin: 0 !important;
}
.bkg {
  height: 3.5vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}
.bkg2 {
  position: absolute;
  height: 100%;
  width: calc(50% + 5.5vh);
  left: calc(50% - 5.5vh);
}
@media (max-width: 1200px) {
  .header_age_text {
    display: none;
  }
}

@media (max-width: 800px) {
  #effect3d {
    width: 100%;
    left: 0%;
  }
  #buttonscontainer {
    width: 100%;
    left: 0;
    padding: 0 10px;
  }
  .header_links_left,
  .header_links_right {
    font-size: 10px;
    gap: 5px;
  }
  .header_links_left a,
  .header_links_right a {
    overflow: hidden;
    text-overflow: ellipsis;
  }
}
input::-webkit-input-placeholder,
textarea::-webkit-input-placeholder {
  color: rgba(0, 0, 0, 0.3);
}
input::-moz-placeholder,
textarea::-moz-placeholder {
  color: rgba(0, 0, 0, 0.3);
}
input:-ms-input-placeholder,
textarea:-ms-input-placeholder {
  color: rgba(0, 0, 0, 0.3);
}
input:-moz-placeholder,
textarea:-moz-placeholder {
  color: rgba(0, 0, 0, 0.3);
}
:-webkit-full-screen {
  background: black;
}
:-moz-full-screen {
  background: black;
}
:-webkit-full-screen#contentdiv {
  width: 100vw;
  height: 100vh;
  left: 0;
  top: 0;
  margin-top: 0;
  background-size: cover;
}
:-moz-full-screen#contentdiv {
  width: 100vw;
  height: 100vh;
  left: 0;
  top: 0;
  margin-top: 0;
  background-size: cover;
}
:-webkit-full-screen .emscripten {
  height: 100vh;
}
:-moz-full-screen .emscripten {
  height: 100vh;
}
:-webkit-full-screen #safarifix {
  display: none;
}
:-moz-full-screen #safarifix {
  display: none;
}
:-webkit-full-screen #buttonscontainer {
  display: none;
}
:-moz-full-screen #buttonscontainer {
  display: none;
}

@media (max-width: 600px) and (min-height: 701px) {
  .xtest:after {
    font-size: 1.4vh;
  }
}
@media (max-width: 550px) and (max-height: 350px) {
  .bkg {
    height: 5vh;
  }
  .xtest {
    width: 5vh;
    height: 5vh;
  }
  .xtest2 {
    height: 5vh;
  }
  .xtest:after {
    font-size: 2vh;
    line-height: 5vh;
  }
}
@media (max-width: 480px) and (max-height: 700px) and (min-height: 351px) {
  #effect3d {
    width: 100%;
    left: 0%;
  }
  #buttonscontainer {
    width: 100%;
    left: 0;
    padding: 0 5px;
  }
  .header_links_left,
  .header_links_right {
    font-size: 9px;
    gap: 3px;
  }
  .header_age_text {
    font-size: 9px;
  }
  .xtest:after {
    font-size: 1.2vh;
  }
}
.please-wait-bkg {
  display: none; /* Hidden by default, use 'flex' to show */
  position: fixed;
  z-index: 9;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgb(0,0,0);
  background-color: rgba(0,0,0,0.4);
  align-items: center;
  justify-content: center;
}
.please-wait-content {
  background-color: #fefefe;
  padding: 15px;
  border: 3px solid #888;
  width: 400px;
  border-radius: 20px;
  text-align: center;
}
.please-wait-noselect {
  -webkit-touch-callout: none; /* iOS Safari */
    -webkit-user-select: none; /* Safari */
     -khtml-user-select: none; /* Konqueror HTML */
       -moz-user-select: none; /* Old versions of Firefox */
        -ms-user-select: none; /* Internet Explorer/Edge */
            user-select: none; /* Non-prefixed version, currently
                                  supported by Chrome, Edge, Opera and Firefox */
}
.noselect {
  -webkit-touch-callout: none; /* iOS Safari */
    -webkit-user-select: none; /* Safari */
     -khtml-user-select: none; /* Konqueror HTML */
       -moz-user-select: none; /* Old versions of Firefox */
        -ms-user-select: none; /* Internet Explorer/Edge */
            user-select: none; /* Non-prefixed version, currently
                                  supported by Chrome, Edge, Opera and Firefox */
}
.play_button {
  font-weight: bold;
  font-size: xx-large;
  color: black !important;
  background: rgb(80, 176, 250);
  border: none;
  height: 60px;
  width: 300px;
  top: 40px;
  position: relative;
  display:inline-block;
  border-radius:20px;
}
.play_button:hover {
  background: rgb(120, 216, 250);
}

.launch-step-text {
  position: absolute;
  bottom: 30px;
  left: 0;
  width: 100%;
  text-align: center;
  color: white;
  font-family: sans-serif;
  font-size: 20px;
  background: none;
  padding: 0;
  border-radius: 0;
}
/* Age Verification Modal */
