*{
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    font-family: 'Inconsolata', monospace;
    text-decoration: none;
    list-style: none;
    user-select: none;
    /* mache den Selection‑Hintergrund und Textfarbe transparent */

}
*::selection {
  background: transparent;
  color: inherit;
}

/* für Firefox */
*::-moz-selection {
  background: transparent;
  color: inherit;
}
body, html {
  margin: 0;
  overflow-y: auto;
  background: linear-gradient(-45deg, #4b1c3f, #ff6f3c, #ffb347, #6b1f5e);
  background-size: 400% 400%;
  animation: gradientAnimation 30s ease infinite;
  position: relative;
}

@keyframes gradientAnimation {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
  
.main-header {
  display: flex;
  align-items: center;
  padding: 20px;
  max-width: 900px;
  margin: 0 auto;
  /* Standard: horizontal (row) */
  flex-direction: row;
}

@media (max-width: 700px) {
  .main-header {
    flex-direction: column;
    align-items: flex-start; /* optional, wenn du die Elemente linksbündig willst */
    align-items: center;
    gap: 10px;
  }
}

  
  .logo-wrapper {
    flex: 1; /* nimmt maximalen Platz ein */
    display: flex;
    justify-content: center; /* zentriert Logo horizontal */
  }
  
  .main-header img {
    height: 50px;
    width: auto;
  }

  img {
    opacity: 0;
    transform: translateY(-50px); /* Start oberhalb */
    animation-fill-mode: forwards;
    animation-name: slideDownFadeIn;
    animation-duration: 1s;
    animation-timing-function: ease;
    animation-delay: 0.5s; /* optional: Verzögerung vor Animationsstart */
  }
  
  @keyframes slideDownFadeIn {
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  .avatar-button {
    background: none;
    border: 2px solid #eeeeee;
    color: #e8e8e8;
    padding: 8px 15px;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    user-select: none;
  }
  .avatar-button:hover {
    background-color: #ff6f3c;
    color: #e8e8e8;
  }
  .avatar-button {
    opacity: 0;
    transform: translateX(50px); /* Start rechts (für slide left) */
    animation-fill-mode: forwards;
    animation-name: slideLeftFadeIn;
    animation-duration: 1s;
    animation-timing-function: ease;
    animation-delay: 0.5s; /* Verzögerung 0,5 Sekunden */
  }
  
  @keyframes slideLeftFadeIn {
    to {
      opacity: 1;
      transform: translateX(0);
    }
  }
  
  /* Overlay Modal */
  .overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(30,30,30,0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 999;
    padding: 20px;
  }
  .overlay.active {
    display: flex;
  }

  /* Avatar Auswahl Container */
  .avatar-selection {
    background: rgba(255, 255, 255, 0.832); /* leicht transparent weiß */
    backdrop-filter: blur(10px);          /* der Blur-Effekt */
    -webkit-backdrop-filter: blur(10px);  /* für Safari */
    border-radius: 12px;
    padding: 20px 30px;
    max-width: 600px;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.3); /* optional: leichter Rand */
}

  .avatar-selection h2 {
    margin-bottom: 15px;
    font-weight: 700;
    color: #ff6f3c;
  }
  .avatars {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    max-width: 200px; /* 2 Avatare pro Reihe, 90px + Abstand */
    margin: 0 auto;
  }
  
  .avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    cursor: pointer;
    background-image: url('Avatare.jpg');
    background-size: 180px 180px; /* 2 Avatare pro Reihe & Spalte, je 90px */
    border: 3px solid transparent;
    transition: border-color 0.3s, box-shadow 0.3s;
  }
  
  .avatar.selected {
    border-color: #ff6f3c;
    box-shadow: 0 0 12px #ff6f3c;
    opacity: 1;
    filter: none;
  }
  
  .avatar.taken {
    opacity: 0.5;
    filter: grayscale(1);
    pointer-events: none; /* nicht klickbar */
  }
  
  /* Für Avatare, die von anderen Spielern gewählt wurden */
  .avatar.other-selected {
    border-color: #3c9fff; /* z.B. blau als andere Farbe */
    box-shadow: 0 0 8px #3c9fff;
    opacity: 0.8;
    filter: none;
    pointer-events: none; /* auch nicht klickbar */
  }
  
  /* Positionen im 2x2 Grid */
  .avatar[data-id="1"] {
    background-position: -7px 0; /* oben links */
  }
  .avatar[data-id="2"] {
    background-position: -93px 0; /* oben rechts */
  }
  .avatar[data-id="3"] {
    background-position: -3px -90px; /* unten links */
  }
  .avatar[data-id="4"] {
    background-position: -90px -90px; /* unten rechts */
  }
  
  
  .close-btn {
    background: #ff6f3c;
    border: none;
    color: #ffffff;
    padding: 8px 15px;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    margin-bottom: 15px;
  }

  .invite-link {
    background: #ffffff;
    padding: 10px;
    border-radius: 6px;
    font-size: 0.9rem;
    word-break: break-all;
    user-select: all;
    margin-top: 10px;
  }

  .create-lobby {
    margin-top: 20px;
    padding: 10px 16px;
    background: #ff6f3c;
    color: white;
    font-weight: bold;
    border: none;
    border-radius: 6px;
    cursor: pointer;
  }
  
  #generate-link-btn {
    background: #ff6f3c;
    border: none;
    color: #ffffff;
    padding: 8px 15px;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 15px; /* Abstand nach oben, damit er nicht an den Avataren klebt */
    transition: background-color 0.3s ease;
  }
  
  #generate-link-btn:hover {
    background: #e65c29; /* etwas dunkler beim Hover */
  }
  
  a {
    outline: none;
    text-decoration: none;
  }
  
  a:focus,
  a:active {
    outline: none;
  }
 
  .game-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);  /* 3 Spalten */
    grid-template-rows: repeat(3, 1fr);     /* 3 Reihen */
    gap: 15px;
    padding: 20px;
    max-width: 1000px;
    margin: auto;
    position: relative;
  }
  @media (max-width: 720px) {
    .game-grid {
      grid-template-columns: 1fr; /* 1 Spalte */
      grid-template-rows: auto;   /* Automatisch Reihen, je nach Elementanzahl */
    }
  }
  
  .game-box {
    position: relative;
    overflow: visible;
    background: linear-gradient(45deg, #ff6f3c, #ff4a1d);
    border-radius: 15px;
    color: white;
    font-weight: bold;
    padding: 10px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    transition: transform 0.3s ease, background-color 0.3s ease;
    text-align: center;
    align-items: center;
    z-index: 1;
    
  }
  .game-box a.game-box {
    position: relative; /* wichtig für stacking context */
    z-index: 1;          /* liegt über dem äußeren ::before */
}

  /* Das gewölbte Element innen */
  .game-box::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40%;
    background: rgba(255, 111, 60, 0.7);
    clip-path: polygon(
      0% 100%,
      0% 0%,
      20% 0%,
      80% 100%,
      100% 100%,
      100% 30%
    );
    border-radius: 15px 15px 0 0;
    transition: height 0.3s ease, background 0.3s ease;
    pointer-events: none;
    z-index: 1;
  }
  
  .game-box::after {
    content: "";
    position: absolute;
    bottom: 20%; /* z.B. etwas höher als ::before */
    left: 0;
    width: 100%;
    height: 40%;
    background: rgba(255, 60, 60, 0.4); /* leichter, damit es unterscheidbar ist */
    clip-path: polygon(
      0% 100%,
      0% 0%,
      20% 0%,
      80% 100%,
      100% 100%,
      100% 30%
    );
    border-radius: 15px 15px 0 0;
    transition: height 0.3s ease, background 0.3s ease;
    pointer-events: none;
    z-index: 0;
  }
  
  .game-box:hover::after {
    height: 45%;
    background: rgba(255, 60, 60, 0.7); /* intensiver beim Hover */
  }
   
  .game-box:hover::before {
    height: 55%;
    background: rgba(255, 111, 60, 0.9);
  }
  
  
  /* Hover: gewölbter Bereich wird größer und intensiver */
  .game-box:hover::before {
    height: 55%;
    background: rgba(255, 111, 60, 0.9);
  }
  
  .game-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.game-box {
  position: relative; /* damit z-index bei Kindern funktioniert */
  z-index: 0;         /* Basis-Z-Index */
}


.game-box p {
  position: relative;
  z-index: 1000;
  color: white;
  font-weight: bold;
  margin: 0;
  padding: 2px 10px;
  border: 2px solid white;
  border-radius: 10px;
  background: transparent;
  display: inline-block;
  user-select: none;
  transition: transform 0.3s ease, font-size 0.3s ease;
  font-size: 1.5rem; /* Grundgröße */
  top: 120px;
  z-index: 100;
}

.game-box:hover p {
  font-size: 25px; /* größer beim hover */
  transform: scale(1.1); /* leichtes Vergrößern zusätzlich */
}

  
.game-box{
  transition: transform 0.3s ease;
  transform-origin: center center;
  /* Grundzustand: keine Skalierung */ /* 2 Reihen */
  height: 400px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  border-radius: 12px;
  transform: scale(1);
}


  
  .page {
    opacity: 1;
    transition: opacity 0.3s ease;
}

.page.hidden {
    opacity: 0;
    pointer-events: none;
    position: absolute;
}

.modal-button {
  background: none;
  border: 2px solid #ff6f3c;
  color: #ff6f3c;
  padding: 8px 15px;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
  user-select: none;
  margin-top: 20px;
}

.GuessSong{
  position: fixed;
  width: 250px;
  height: 250px;
  user-select: none;
  -webkit-user-select: none; /* Safari */
  -moz-user-select: none;    /* Firefox */
  -ms-user-select: none;     /* IE/Edge */
  pointer-events: auto; /* falls du Klicks zulassen willst */
  cursor: pointer;
  top: 5%;
  display: block;
    margin: 0 auto;
    z-index: 100;
}


.GuessSong {
  filter: grayscale(100%);
  transition: filter 0.3s ease;
}


.game-box {
  opacity: 0;
  animation-fill-mode: forwards;
  animation-name: slideRightFadeIn;
  animation-duration: 1s;
  animation-timing-function: ease;
  animation-delay: 1s;
  /* Entferne transform hier, da wir es animieren */
}
@keyframes slideRightFadeIn {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}


/* Verzögerung je nach Position + 2 Sekunden Startverzögerung */
.game-box:nth-child(1) {
  animation-delay: 1s;       /* erstes startet nach 2 Sekunden */
}
.game-box:nth-child(2) {
  animation-delay: 1.5s;     /* zweites startet 2,5 Sekunden nach Seitenstart */
}
.game-box:nth-child(3) {
  animation-delay: 2s;       /* drittes startet nach 3 Sekunden */
}

.GuessSong1{
  position: fixed;
  width: 280px;
  height: 260px;
  user-select: none;
  -webkit-user-select: none; /* Safari */
  -moz-user-select: none;    /* Firefox */
  -ms-user-select: none;     /* IE/Edge */
  pointer-events: auto; /* falls du Klicks zulassen willst */
  cursor: pointer;
  top: 5%;
  display: block;
    margin: 0 auto;
    z-index: 100;
}

footer {
  position: fixed;
  bottom: 10px;
  width: 100%;
  text-align: center;
  font-family: 'Inconsolata', monospace;
  z-index: 1000;
  opacity: 0;               /* Unsichtbar am Anfang */
  transition: opacity 0.5s ease; /* Sanftes Einblenden */
  pointer-events: none;     /* Klicks verhindern, solange unsichtbar */
}

footer.visible {
  opacity: 1;               /* Sichtbar, wenn Klasse hinzugefügt */
  pointer-events: auto;     /* Klicks erlauben */
}

footer a {
  color: white;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  padding: 8px 12px;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border-radius: 8px;
  font-size: 24px;
}

footer a:visited,
footer a:hover,
footer a:active,
footer a:focus {
  color: white;
  text-decoration: none;
  outline: none;
}

.impressum-container {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
