html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

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

  /* Wichtig: kein führender Slash */
  background-image: url('img/background/desert.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  font-family: 'zabras', Arial, Helvetica, sans-serif;
  position: relative;
}

body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  z-index: -1;
}

body::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: -1;
}

.canvas-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  margin: 0;
  padding: 0;
}

.canvas-container canvas {
  width: 100%;
  height: 100%;
  display: block;
  background-color: black;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.canvas-buttons {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 20;
}

.circle-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 16px;
  padding: 0;
  margin: 0 5px;
  border: 2px solid #ccc;
  background-color: #ffc105;
  color: black;
  cursor: pointer;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 0 10px #ffecb3;
}

.circle-icon-btn:hover {
  transform: scale(1.07);
  box-shadow: 0 0 25px #ffecb3;
}

/* Wichtig: Pfad zur Schrift ohne führenden Slash */
@font-face {
  font-family: 'zabras';
  src: url('fonts/zabras.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

h1 {
  font-size: 96px;
  letter-spacing: 4px;
  color: #ffc105;
  text-shadow: 4px 4px 8px rgba(0, 0, 0, 0.5);
  margin-block-start: 0;
  margin-block-end: 0;
}

h2 {
  font-size: 48px;
  letter-spacing: 4px;
  color: #ffc105;
  text-shadow: 4px 4px 8px rgba(0, 0, 0, 0.5);
}

h3 {
  font-size: 24px;
  letter-spacing: 3px;
  color: #fff;
  text-shadow: 4px 4px 8px rgba(0, 0, 0, 0.5);
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('img/background/desert.png') no-repeat center center;
  background-size: cover;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  perspective: 1000px;
  z-index: 9999;
}

.hidden {
  display: none;
}

.overlay img {
  max-width: 50%;
  max-height: 50%;
  border-radius: 20px;
  margin-bottom: 20px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-image 0.3s ease;
  border: 5px solid transparent;
}

.overlay img:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px #ffecb3;
  border-image: linear-gradient(
    to right,
    #006845 0%, #006845 33%,
    #ffffff 33%, #ffffff 66%,
    #cf0821 66%, #cf0821 100%
  );
  border-image-slice: 1;
}

button {
  font-size: 32px;
  border-radius: 10px;
  color: black;
  background-color: #ffc105;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  padding: 16px;
  margin: 8px;
  cursor: pointer;
  font-family: 'zabras';
  letter-spacing: 2px;
  width: 240px;
  border: 3px solid transparent;
  box-shadow: 0 0 10px #ffecb3;
  position: relative;
}

button:hover {
  transform: scale(1.05);
  box-shadow: 0 0 25px #ffecb3;
}

button::before {
  content: "";
  position: absolute;
  top: -5px;
  left: -5px;
  right: -5px;
  bottom: -5px;
  border-radius: 10px;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

button:hover::before {
  opacity: 1;
}

#btn-start {
  background-color: #006845;
}

#btn-settings {
  background-color: #FFFFFF;
}

#btn-help {
  background-color: #cf0821;
}

.impressum-row {
  margin-top: 30px;
}

#impressum-link {
  font-size: 24px;
  color: #fff;
  cursor: pointer;
  font-family: 'zabras';
  letter-spacing: 2px;
  text-shadow: 2px 2px 5px rgba(0,0,0,0.5);
  transition: transform 0.3s ease, color 0.3s ease;
  margin-top: 10px;
}

#impressum-link:hover {
  transform: scale(1.05);
  color: #ffc105;
}

.settings-content {
  max-width: 700px;
  margin: 20px;
  text-align: center;
  color: #fff;
  font-size: 20px;
}

.audio-buttons-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 25px;
  margin-top: 20px;
}

.circle-button {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  box-shadow: 0 0 10px #ffecb3;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  text-decoration: none;
}

.circle-button:hover {
  transform: scale(1.1);
  box-shadow: 0 0 25px #ffecb3;
}

.circle-button svg {
  pointer-events: none;
}

#music-button {
  background-color: #006847;
}

#sfx-button {
  background-color: #FFFFFF;
}

#close-button {
  background-color: #CE1126;
}

.slash {
  display: none;
}

.muted .slash {
  display: inline;
}

.help-content {
  max-width: 700px;
  margin: 20px;
  text-align: center;
  color: #fff;
  font-size: 20px;
}

.help-close-container {
  margin-top: 20px;
}

#help-close-button {
  background-color: #006847;
}

.impressum-content {
  max-width: 700px;
  margin: 20px;
  text-align: center;
  color: #fff;
  font-size: 20px;
}

.impressum-close-container {
  margin-top: 20px;
}

#impressum-close-button {
  background-color: #FFFFFF;
}

.linkedin-container {
  display: flex;
  justify-content: center;
}

#linkedin-button {
  background-color: #0077B5;
}

#overlay-levelcomplete.hidden {
  display: none;
}

#mobile-buttons {
  position: fixed;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.help-content {
  font-size: 24px;
}

.canvas-container.paused-overlay {
  position: relative;
}

.canvas-container.paused-overlay::after {
  content: "";
  position: absolute;
  top: 0; 
  left: 0;
  width: 100%; 
  height: 100%;
  background: rgba(0, 0, 0, 0.5); 
  pointer-events: all; 
  z-index: 10;     
}

.canvas-container.paused-overlay::before {
  content: "PAUSED";
  position: absolute;
  top: 50%; 
  left: 50%;
  transform: translate(-50%, -50%);
  color: #ffc105;
  font-size: 48px;
  text-align: center;
  z-index: 1000; 
}

.mobile-btn {
  position: absolute;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin: 0 5px;
  background-color: #ffc105;
  color: black;
  cursor: pointer;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 0 10px #ffecb3;
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-btn img {
  width: 20px;
  height: 20px;
}

#mobile-left,
#mobile-right,
#mobile-jump,
#mobile-throw {
  bottom: -100px;
  opacity: 0;
  transition: all 0.3s ease;
}

@media (max-width: 1400px) {
  #mobile-left,
  #mobile-right,
  #mobile-jump,
  #mobile-throw {
    opacity: 1;
  }

  #mobile-left {
    bottom: 20px;
    left: 20px;
  }

  #mobile-right {
    bottom: 20px;
    left: 80px;
  }

  #mobile-jump {
    bottom: 20px;
    right: 70px;
  }

  #mobile-throw {
    bottom: 20px;
    right: 10px;
  }

  #overlay-rotate {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #131313;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: opacity 0.5s ease;
    opacity: 1;
  }
  
  #overlay-rotate img {
    max-width: 80%;
    max-height: 80%;
    border-radius: 10px;
  }
  
  #overlay-rotate.hidden {
    opacity: 0;
    pointer-events: none;
  }
}

@media only screen and (max-width: 1000px) {
  .canvas-container canvas {
    border-radius: 0;
  }

  body {
    background-image: none;
  }
}

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

@media (max-width: 1000px) {
  #overlay-menu .menu-buttons {
    display: flex; 
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 0px;
  }

  #overlay-menu .menu-buttons button {
    font-size: 12px;
    width: 80px;
  }

  .menu-column {
    margin: 0 5px;
  }

  .menu-buttons {
    margin-top: 0px;
  }

  .impressum-row {
    margin-top: 0px;
  }

  h3 {
    font-size: 12px;
  }

  h1 {
    font-size: 24px;
    margin-bottom: -20px;
  }

  h2 {
    font-size: 16px;
    margin: 8px;
  }

  #impressum-link {
    font-size: 16px;
  }

  .circle-button {
    width: 20px; 
    height: 20px;
  }

  .help-content {
    margin: 4px;
    font-size: 12px;
  }
  .help-close-container {
    margin-top: 8px;
  }
  .impressum-close-container {
    margin-top: -10px;
  }
  .overlay.hidden {
    font-size: 32px;
  }

  button {
    font-size: 16px; 
    width: 100px;
  }
  .overlay img {
    max-width: 30%;
    max-height: 30%;
    margin-bottom: 0px;
  }
  
  .audio-buttons-container {
    margin-top: 0px;
  }
}