* {
  margin: 0;
  padding: 0;
}

body {
  background: linear-gradient(135deg, rgb(89, 0, 255), violet, rgb(89, 0, 255));
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-size: cover;
  min-height: 100dvh;
  font-family: Arial, Helvetica, sans-serif;
  overflow-x: hidden;
}

header {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100vw;
  height: 4rem;
  background-color: rgba(151, 57, 112, 0.3);
  margin-bottom: 0.5rem;
}

nav a {
  font-size: 1.3rem;
  text-decoration: none;
}

nav a:hover {
  font-size: 1.5rem;
  color: rgb(9, 74, 128);
}

main {
  display: flex;
  margin: 0 auto;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

h1,
h2 {
  margin: 1rem;
}

p {
  margin-bottom: 0.5rem;
}

#infos {
  height: auto;
  text-align: center;
}

#gameField {
  border: 1px solid black;
  background-color: rgb(0, 255, 255, 0.2);
  border-radius: 7px;
  width: 100%;
  max-width: 1050px;
  min-width: 300px;
  height: auto;
  /* Aspect ratio maintenance depends on original width/height attributes */
  display: block;
  /* Removes bottom space */
}

/* Specific Margin/Layout for infos inside wrapper handled by flex gap or margin */
#infos {
  /* margin-top moved to flex gap logic or kept if needed */
  margin: 0 auto;
  align-self: center;
  text-align: center;
}

.game-container {
  position: relative;
  width: 100%;
  /* Allows it to shrink/grow */
  max-width: 1050px;
  /* Redundant but safe */
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

/* Wrapper for Flexbox Layout */
.content-wrapper {
  display: flex;
  flex-direction: column;
  /* Default to Portrait/Narrow */
  align-items: center;
  text-align: center;
  gap: 2rem;
  width: 100%;
  padding: 10px;
  box-sizing: border-box;
}



#cont {
  position: relative;
  width: 100%;
  /* Passt sich dem Container (Canvas) an */
  height: 10px;
  /*background-color: #ddd;
  /* Hintergrund für leeren Lebensbalken? Optional */
  margin-top: 5px;
}

#leben {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: brown;
}

#newgame {
  position: absolute;
  top: 70%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 8px;
  border-radius: 5px;
  background-color: darkcyan;
  font-size: 25px;
  visibility: hidden;
  white-space: nowrap;
}

.buttons {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.buttons button {
  width: clamp(3rem, 10vw, 5rem);
  height: clamp(3rem, 10vw, 5rem);
  margin: 3px;
  font-size: clamp(0.5rem, 2vw, 1rem);
}

@media (min-width: 1300px) {
  .content-wrapper {
    flex-direction: row;
    /* Landscape/Wide */
    justify-content: center;
    align-items: flex-start;
    /* Align top */
  }
}

@media (max-width: 600px) {
  .content-wrapper {
    padding: 0;
  }
}

.nocursor {
  cursor: none;
}