@font-face {
  font-family: 'tradeWinds';
  src: url('../fonts/tradeWinds-Regular.ttf') format('truetype');
}

* {
  box-sizing: border-box;
  margin: 0;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  margin: 0;
  background-image: url('../assets/img/5_background/background12.png');
  background-size: cover;
  background-position: center;
  font-family: 'tradeWinds', Arial, Helvetica, sans-serif;
  color: white;
  max-width: 1900px;
  margin: 0 auto;
}

h1 {
  font-size: 72px;
  letter-spacing: 3px;
  text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.5);
  z-index: 20;
}

canvas {
  background-color: rgb(42, 70, 88);
  background-image: url('../assets/img/9_intro_outro_screens/start/startscreen_2.png');
  background-size: cover;
  background-position: center;
  display: block;
  border: 5px solid white;
  border-radius: 6px;
  z-index: 10;
  max-height: 100vh;
  max-width: 100vw;
  width: 100%;
  height: 100%;
}

.backgroundBlur {
  background: url('../assets/img/5_background/complete_background.png');
  background-size: cover;
  z-index: 9;
}

.helpOverlay {
  width: 100%;
  height: 100%;
  z-index: 20;
  display: block;
  border: 5px solid white;
  border-radius: 6px;
  overflow: hidden;
  background-color: #2b4659;
}

.helpOverlay img {
  max-width: 100%;
  object-fit: cover;
}

.helpOverlay img:hover {
  transform: none !important;
  transition: none !important;
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  z-index: 10;
}

.overlayMobileTurn {
  padding-left: 10%;
  padding-right: 20%;
  position: absolute;
  top: 0px;
  left: 0;
  width: 100%;
  height: 100vh;
  max-height: 100%;
  max-width: 100vw;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  display: none;
  align-items: flex-start;
  justify-content: flex-start;
  text-align: center;
  font-size: 1.5em;
  z-index: 1100;
}

.gameContainer {
  width: 720px;
  height: 480px;
  position: relative;
  z-index: 30;
  padding: 0;
}

.mainButtons {
  display: flex;
  flex-direction: row;
}

.mainButtonsAndFullscreenButton {
  display: flex;
  flex-direction: row;
  width: 100%;
  justify-content: space-between;
}

.invisible {
  display: none;
}

.gameButton {
  font-family: 'tradeWinds', Arial, Helvetica, sans-serif;
  position: relative;
  color: white;
  z-index: 20;
  font-size: 24px;
  background-color: rgb(35, 74, 90);
  margin: 16px;
  padding: 8px;
  cursor: pointer;
  border: 2px solid white;
  border-radius: 6px;
}

.gameButton:hover {
  transform: scale(1.1);
  border: 2px solid rgb(120, 193, 218);
}

.disabled-button {
  opacity: 0.5;
}

.buttonContainer {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  -webkit-touch-callout: none;
  user-select: none;
}

.buttonContainerMobilePlay {
  display: none;
}

.hideButton {
  display: none;
}

.gameContainer:fullscreen .mainButtons {
  width: 100%;
  position: absolute;
  bottom: 20px;
  right: 10px;
  z-index: 50;
  justify-content: flex-end;
}

.gameContainer:fullscreen {
  position: relative;
  width: 100%;
  height: auto;
  background-color: rgb(42, 70, 88);
  z-index: 30;
  border-radius: none;
}

.gameContainer:fullscreen canvas {
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 10;
}

.buttonFullscreenContainer {
  position: absolute;
  margin: 0;
  top: 7px;
  right: 5px;
  z-index: 50;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-top: 0px;
  overflow: hidden;
}

.buttonFullscreen {
  font-size: 42px;
  color: white;
  border: none;
  cursor: pointer;
  background-color: transparent;
}

img:hover {
  transform: scale(1.1);
}

.transitionHover:hover {
  transform: scale(1.1);
}

.buttonFullscreenImg {
  background-color: transparent;
  background: transparent;
  height: 24px;
  width: 24px;
}

.imprintButtonBack {
  content: "\2190";
}

.loadingOverlay {
  position: absolute;
  top: 5px;
  left: 5px;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 999;
  overflow: hidden;
  border: 2px solid white;
  border-radius: 0px;
}

.spinner {
  position: absolute;
  border: 12px solid #f3f3f3;
  border-top: 12px solid rgb(42, 70, 88);
  border-radius: 50%;
  width: 80px;
  height: 80px;
  animation: spin 1.5s linear infinite;
}

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

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

@media only screen and (orientation: portrait) and (pointer: coarse) and (hover: none) {
  .canvas {
    width: 100% !important;
    height: 100% !important;
  }
}

@media only screen and (min-width: 900px) and (max-width: 1900px) and (max-height: 1200px) and (orientation: landscape) and (pointer: coarse) and (hover: none) {
  .actionButton {
    width: 108px !important;
    height: 32px !important;
    margin-bottom: 8px !important;
  }

  .gameButton {
    width: 30px;
    height: 32px;
  }

  .buttonFullscreenImg {
    width: 36px !important;
    height: 32px !important;
    margin-top: 12px !important;
  }

}

@media only screen and (min-width: 320px) and (max-width: 1900px) and (max-height: 1200px) and (orientation: landscape) and (pointer: coarse) and (hover: none) {
  .mobilePosition {
    justify-content: flex-end;
    overflow: hidden;
    opacity: 0.75;
  }

  .mainButtonsAndFullscreenButton {
    margin-right: 10px;
  }

  .neverHide {
    position: static;
    margin: 0;
    top: 10px;
    right: 5px;
    z-index: 50;
    display: flex !important;
    justify-content: flex-end;
  }

  .canvas {
    max-height: 100vh;
    max-width: 100vw;
    width: 100vw;
    height: 100vh;
    background-size: cover;
    border: none;
    border-radius: 0;
  }

  .helpOverlay {
    height: 120%;
  }

  .helpOverlay img {
    height: 100%;
    max-width: 100%;
  }

  .gameContainer {
    position: relative;
    width: 100%;
    height: auto;
    background-color: rgb(42, 70, 88);
    border-radius: 6px;
  }

  h1 {
    font-size: 32px;
  }

  .gameButton {
    width: 44px;
    border: 1px solid white;
    font-size: 10px;
    font-weight: 100;
    margin: 4px;
    padding: 2px;
  }

  .MobileTransparent {
    color: transparent;
  }

  .gameButton::after {
    transform: translate(-50%, -50%);
    position: absolute;
    left: 50%;
    top: 50%;
    color: white;
    pointer-events: none;
  }

  img:hover {
    transform: none;
  }

  .startButton::after {
    content: "\25B6";
  }

  .startButton.pause::after {
    content: "\23F8";
  }

  .restartButton::after {
    content: "\21BA";
  }

  .explanationButton::after {
    content: "?";
    color: white;
  }

  .explanationButton.back::after {
    content: "\2190";
  }

  .impressumButton::after {
    content: "\2139";
    color: white;
  }

  .buttonContainer {
    width: 100%;
    position: absolute;
    bottom: 3px;
    z-index: 40;
  }

  .buttonContainerMobilePlay {
    color: white;
    gap: 16px;
    margin-left: 48px;
  }

  .actionButton {
    width: 68px;
    height: 24px;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
  }

  .mobileSee {
    display: flex;
  }

  .mainButtonsStart {
    margin-left: 45%;
    transform: scale(2);
    margin-bottom: 14px;
  }

  .buttonFullscreen {
    display: none;
  }
}

@media only screen and (max-width: 730px) {
  .gameContainer {
    position: relative;
    width: 100%;
    height: auto;
    background-color: transparent;
    border-radius: 6px;
  }
}

@media screen and (max-width: 730px) and (orientation: portrait) and (min-height: 1200px) and (pointer: coarse) and (hover: none) {
  .gameContainer {
    padding: 4px;
  }

  .buttonFullscreen {
    margin-top: 4px;
    font-size: 16px;
  }
}

@media only screen and (max-width: 510px) {
  .MobileTransparent {
    font-size: 8px;
    margin-left: 2px;
    margin-right: 2px;
  }

  .buttonFullscreen {
    margin-top: 0;
    font-size: 8px;
  }

  .buttonFullscreenImg {
    height: 18px;
    width: 18px;
  }

  .buttonFullscreenContainer {
    gap: 0;
    margin-top: 2px;
  }
}


@media only screen and (max-width: 490px) {
  .buttonContainerMobilePlay {
    gap: 8px;
    margin-left: 24px;
  }

  .actionButton {
    width: 48px;
  }

  .mainButtonsStart {
    margin-left: 20%;
    transform: scale(1.5);
    margin-bottom: 8px;
  }
}

@media only screen and (max-width: 420px) {
  .buttonContainerMobilePlay {
    gap: 4px;
    margin-left: 12px;
  }

  .actionButton {
    width: 36px;
  }
}

@media only screen and (max-width: 360px) {
  .buttonContainerMobilePlay {
    gap: 2px;
    margin-left: 8px;
  }

  .actionButton {
    width: 36px;
  }

  .mobilePosition {
    margin-right: 2px;
  }

  .buttonContainerMobilePlay {
    margin-left: 2px;
  }
}

@media only screen and (max-height: 480px) {
  canvas {
    height: 100vH;
  }

  .helpOverlay {
    height: 100vH;
  }
}

@media screen and (max-width: 720px),
only screen and (max-width: 1900px) and (max-height: 1200px) and (orientation: landscape) and (pointer: coarse) and (hover: none) {
  h1 {
    display: none;
  }
}

@media screen and (max-width: 1200px) and (orientation: portrait) and (max-height: 1600px) and (pointer: coarse) and (hover: none) {
  .overlayMobileTurn {
    display: flex;
    max-width: 100vw;
    max-height: 100%;
    height: 100%;
  }

  .overlay {
    display: block;
  }

  .canvas {
    border: none;
  }
}

@media screen and (max-width: 1200px) and (orientation: portrait) and (min-height: 800px) and (max-height: 1600px) and (pointer: coarse) and (hover: none) {
  .overlayMobileTurn {
    padding-top: 100px;
    display: flex;
    max-width: 100vw;
    max-height: 750px;
    height: 570px;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
  }

  .overlay {
    display: block;
  }

  .canvas {
    border: none;
  }

  h1 {
    display: none;
  }
}

@media (min-width: 2000px) {
  body {
    background-size: 2000px auto;
    background-repeat: no-repeat;
    background-position: center;
  }
}