html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  overflow-x: hidden;
  font-family: 'rye', Arial, Helvetica, sans-serif;
}

h1.fixed-headline {
  position: fixed;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 48px;
  font-family: 'rye', Arial, Helvetica, sans-serif;
  color: black;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
  z-index: 2000;
  pointer-events: none;
}

canvas {
  pointer-events: auto;
  z-index: 1;
}

.content-wrapper {
  width: 100%;
  max-width: 1920px;
  margin: 0 auto;
  position: relative; 
}

.canvas-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 8px 0;
  box-sizing: border-box;
}

.game-content-wrapper {
  width: 100%;
  max-width: 780px;
  aspect-ratio: 780 / 480; 
  background-image: url('assets/img/9_intro_outro_screens/start/startscreen_1.png');
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  padding-right: 30px;
  padding-top: 10px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  background-color: black;
  border: 3px solid;
  border-radius: 20px;
}

canvas {
  display: block;
  margin: 0 auto;
  background-color: black;
  border: 3px solid;
  border-radius: 20px;
}

canvas.fullscreen {
  position: fixed;
  top: 0;
  left: 0;
  margin: 0;
  padding: 0;
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  border-radius: 0;
  z-index: 999;
}

.startscreen {
  width: 100%;
  display: flex;
  justify-content: center;
}

.game-wrapper {
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.main-background {
  position: relative;
  width: 100%;
  height: 100vh; 
  background-image: url('assets/img-main-background/cactus-9085905_1920.jpg');
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed; 
  background-position: center;
  display: flex;
  justify-content: center;  
  align-items: center;      
}

.legal-notice-btn-container {
  position: absolute;
  top: 10px;
  right: 20px;
}

.btn-legal-notice {
  width: 180px;
  height: 60px;
  font-size: 24px;
  background-color: rgb(203, 175, 17);
  color: white;
  border: 2px solid;
  border-radius: 20px;
  font-family: 'rye', Arial, Helvetica, sans-serif;
  cursor: pointer;
}

.fixed-header-container {
  width: 100%;
  max-width: 1920px;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  height: 0;
  z-index: 1000;
}

.d_none {
  display: none !important;
}

.start-btn-container {
  display: flex;
  gap: 40px;
}

.btn-start {
  width: 180px;
  height: 60px;
  font-size: 24px;
  background-color: darkgreen;
  border-radius: 20px;
  font-family: 'rye', Arial, Helvetica, sans-serif;
  color: white;
  cursor: pointer;
  border: unset;
  border: 2px solid;
}

.btn-controls {
  width: 130px;
  height: 60px;
  font-size: 24px;
  background-color: darkred;
  border-radius: 20px;
  font-family: 'rye', Arial, Helvetica, sans-serif;
  color: white;
  cursor: pointer;
  border: unset;
  border: 2px solid;
}

.btn-controls:hover, .btn-close-control-overview:hover {
  background-color: rgb(170, 70, 70);
  color: black;
}

.btn-start:hover {
  background-color: rgb(66, 139, 66);
  color: black;
}

.btn-legal-notice {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 20px;
  width: 180px;
  height: 60px;
  border-radius: 20px;
  font-family: 'rye', Arial, Helvetica, sans-serif;
  color: white;
  cursor: pointer;
  border: unset;
  border: 2px solid;
  background-color: rgb(203, 175, 17);
  font-size: 24px;
}

.btn-legal-notice:hover {
  background-color: rgb(229, 204, 64);
  color: black;
}

.legal-notice-btn-container {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 10; 
}

.btn-restart-game {
  width: 220px;
  height: 60px;
  font-size: 24px;
  background-color: darkgreen;
  border-radius: 20px;
  font-family: 'rye', Arial, Helvetica, sans-serif;
  color: white;
  cursor: pointer;
  border: unset;
  border: 2px solid;
  z-index: 999;
}

.btn-back-to-menu {
  width: 200px;
  height: 60px;
  font-size: 24px;
  background-color: darkred;
  border-radius: 20px;
  font-family: 'rye', Arial, Helvetica, sans-serif;
  color: white;
  cursor: pointer;
  border: unset;
  border: 2px solid;
  z-index: 999;
}

.btn-endscreen-container {
  display: flex;
  flex-direction: row;
  gap: 30px;
  margin-top: 320px;
}

.fullscreen-btn-container {
  position: absolute;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
}

.btn-fullscreen {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.btn-fullscreen img {
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 0 5px rgba(0,0,0,0.5));
  transition: transform 0.2s ease;
}

.btn-fullscreen:hover img {
  transform: scale(1.1);
}

#rotate-message {
  display: none; 
  position: fixed; 
  top: 0;
  left: 0;
  width: 100vw; 
  height: 100vh;    
  background-color: rgba(0, 0, 0, 0.95);
  color: white;
  font-family: 'rye', Arial, Helvetica, sans-serif;
  font-size: 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 20px;
  box-sizing: border-box;
  z-index: 9999;
}

.mobile-btn-container {
  display: none;
}

.overlay-center {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 999;
}

.overlay-wrapper {
  width: 780px;          
  max-height: 100svh;
  overflow-y: auto; 
  padding: 10px;
  box-sizing: border-box;

  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
}

.overlay-center {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 999;
}