@font-face {
  font-family: "magical_neverland";
  src: url("fonts/Magical Neverland.ttf");
}

body {
  font-family: "magical_neverland", Arial, Helvetica, sans-serif;
  height: 100vh;
  margin: 0;
  color: #217221;
  text-shadow: 0 0 black;
  background-image: url("assets/img/backgrounds/bg_forest.jpg");
  background-position: center;
}

h1 {
  margin-top: -50px;
}

h2 {
  font-size: 24px;
  margin-top: 36px;
  text-align: center;
}

p {
  font-size: 16px;
  margin-bottom: 20px;
}

a {
  color: white;
  text-decoration: none;
}

a:hover {
  scale: 1.5;
  cursor: pointer;
}

.content {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

.canvas_container {
  position: relative;
  width: 720px;
  height: 480px;
}

.canvas_wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

canvas {
  background-color: black;
  display: block;
  flex-grow: 1;
}

#loading-spinner {
  background-color: black;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
}

.spinner-content {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.spellbook {
  width: 100px;
  height: 100px;
  animation: rotate 2s linear infinite;
}

.flame-effect {
  display: none;
  position: absolute;
  top: 5px;
  left: 5px;
  right: 5px;
  bottom: 5px;
  background: radial-gradient(
    ellipse at center,
    rgba(255, 154, 0, 0) 0%,
    rgba(255, 154, 0, 0.5) 100%
  );
  filter: blur(20px);
  animation: flicker 0.35s infinite alternate;
  z-index: 1;
}

@keyframes rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes flicker {
  0%,
  100% {
    opacity: 0.7;
    transform: scale(1);
  }
  50% {
    opacity: 0.9;
    transform: scale(1.05);
  }
}

.start-screen-container {
  background-image: url("assets/img/backgrounds/bg_startscreen.jpg");
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  width: 100vw;
  height: 100vh;
}

.text-container {
  display: flex;
  text-align: left;
  word-break: break-word;
  flex-direction: column;
}

.start-screen-assets-container {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.start-button,
.endscreen-buttons {
  background-image: url("assets/img/game_objects/button.png");
  background-position: center;
  border: none;
  color: #217221;
  padding: 10px 20px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  cursor: pointer;
  border-radius: 5px;
  font-family: inherit;
}

.start-button:hover,
.endscreen-buttons:hover {
  scale: 1.03;
}

.mobile-buttons-left {
  position: absolute;
  bottom: 20px;
  left: 20px;
  display: flex;
  gap: 20px;
}

.mobile-buttons-right {
  position: absolute;
  bottom: 20px;
  right: 20px;
  display: flex;
  gap: 24px;
}

.arrow-icon.mirror {
  transform: scaleX(-1);
}

.arrow-icon.rotate-up {
  transform: rotate(90deg);
}

.control-buttons {
  display: none;
  position: absolute;
  top: 10px;
  right: 10px;
  gap: 16px;
}

.mobile-buttons {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
}

.mobile-buttons-left,
.mobile-buttons-right {
  display: none;
}

.mobile-buttons:hover {
  background-color: rgba(255, 255, 255, 0.6);
}

.mobile-buttons img {
  width: 24px;
  height: 24px;
}

.orientation-dialog-container {
  width: 100vw;
  height: 100vh;
  justify-content: center;
  align-items: center;
  display: none;
}

#orientation-dialog {
  padding: 20px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  border: none;
  border-radius: 10px;
  font-family: Arial, sans-serif;
  text-align: center;
}

#orientation-dialog::backdrop {
  background: rgba(0, 0, 0, 0.5);
}

#game-over-container,
#win-screen-container {
  background-image: url("assets/img/backgrounds/bg_game-over.jpg");
  display: none;
  justify-content: center;
  align-items: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: none;
  font-family: "magical_neverland", Arial, Helvetica, sans-serif;
  text-align: center;
  width: 100vw;
  height: 100vh;
}

#win-screen-container {
  background-image: url("assets/img/backgrounds/bg_win.jpg");
}

.endscreen-buttons-container {
  display: flex;
  gap: 24px;
}

.dialog-container {
  margin-top: -150px;
}

.keyboard-explanation-container {
  display: flex;
  justify-content: center;
}

.key {
  background: #333;
  text-align: center;
  color: #eee;
  border-radius: 0.3em;
  margin: 0.5em;
  width: 2.5em;
  box-sizing: border-box;
  border: 1px solid #444;
  box-shadow: 0 0.2em 0 0.05em #222;
  border-bottom-color: #555;
}

.key-space {
  width: 8em;
}

.key-text {
  width: 4em;
}

dialog {
  background-color: rgba(0, 0, 0, 0.9);
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 5px 20px black;
  color: white;
  border: none;
}

dialog > h2 {
  margin-bottom: 0;
  font-weight: 100;
}

.info-dialog-container {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.dialog-note {
  margin-bottom: -8px;
}

.button-container {
  display: flex;
  justify-content: center;
  padding-top: 16px;
}

.impressum-link {
  position: absolute;
  bottom: 16px;
}