/* === Reset und Basis === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }

html, body {
  
    background-color:rgb(0, 0, 0);
    overflow: hidden;
   
}

header {
    width: calc(100% - 20px);
    height: 70px;
    margin: 5px auto 0;
    border: 2px solid rgb(245, 140, 0);
    border-radius: 10px;
    display: flex;
  }

   /* === Logo + Seitentitel === */
   .logo-box {
    height: 100%;
    padding-left: 10px;
    display: flex;
    align-items: center;
  }
  .logo-box img {
    height: 32px;
    width: auto;
    max-width: 100%;
  }
  
  .seitentitel {
    font-family: 'Press Start 2P', monospace; /* externe Schriftart */
    font-size: 1.2em;
    margin-left: 5px;
    background: linear-gradient(to right, red, orange, yellow, green, blue, indigo, violet);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    
    align-self: center;
  }

  .seitentitel a.title-link:visited,
  .seitentitel a.title-link:active,
  .seitentitel a.title-link:hover {
  text-decoration: none;
  color: inherit;
}
  
  /* === Datum + Uhrzeit === */
  .datetime-box {
    margin-left: 10px;
    display: flex;
    gap: 5px;
    align-items: center;
    
    font-size: 0.6em;
    white-space: nowrap;
  }
  #date-box {
    font-family: 'Press Start 2P', monospace; 
    color: rgb(0, 255, 0);
  }
  .digital-clock {
    margin-left: 5px;
    font-size: 1.6em;
    color: rgb(0, 255, 0);
    background-color: black;
    padding: 5px;
    border-radius: 5px;
    box-shadow: 0 0 5px limegreen;
    letter-spacing: 2px;
   
    text-align: center;
  }

  .avatar-box {
        margin-left: 15px;
        margin-right: 10px;
        padding-top: 5px; 
        display: flex;
        gap: 5px;
        align-items: center;
        
  }

  .avatar-box a.avatar {
    
     display: inline-block;
     cursor: pointer;
 }
 
 .avatar-box a.avatar img {
   width: 60px;
   height: 65px;
   border-radius: 25px;
   border: 2px solid rgb(200, 100, 0);
   transition: border-color 0.2s;
 }
 
 .avatar-box a.avatar img:hover {
     border-color: rgb(255, 140, 0);
 }

.userName {
    font-family: 'Press Start 2P', monospace; 
    font-size: 0.7em;
    
    color: rgb(0, 255, 0); 
    box-shadow: 0 0 10px rgb(0, 255, 0);
   
    margin: 0 10px;
    align-self: center;
    white-space: nowrap;
}

.user-actions {
    margin-left: auto;
    margin-right: 10px;
    display: flex;
    gap: 5px; /* genau der Abstand, den du willst */
    align-items: center;
  }

  .highScore-box {
    height: 50px;
    margin-right: 5px;
    margin-left: auto;
    padding: 5px 10px;
    color: rgb(255, 120, 0);
    font-family: 'Press Start 2P', monospace;
    font-size: 0.8em;
   
    white-space: nowrap;
    text-align: center;
    align-self: center;

    display: flex;              /* 🧱 Block wird Flex-Container */
    justify-content: center;    /* 📍 Horizontale Zentrierung */
    align-items: center;        /* 📍 Vertikale Zentrierung */
}

.highscore-box {
  color: white;
  background-color: rgb(20, 20, 20);
  border: 2px solid rgb(245, 140, 0);
  padding: 10px;
  border-radius: 8px;
  font-family: monospace;
  font-size: 14px;
  text-align: center;
  margin: 10px auto;
  width: fit-content;
}


  .login-box {
    margin-left: auto;
    margin-right: 10px;
    display: flex;
    gap: 5px;
    align-items: center;
    
  }
  .login-box a {
    text-decoration: none;
    color: white;
    background-color: rgb(255, 140, 0);
    padding: 5px 10px;
    border: 2px solid rgb(200, 100, 0);
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s;
  }
  .login-box a:hover {
    background-color: rgb(200, 100, 0);
    color: white;
  }
 
  /* Seitenstruktur als Wrapper – nimmt den ganzen Platz ein */
  .wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
  
  main {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    width: calc(100% - 20px);
    margin: 2px auto 0;
    border: 2px solid rgb(245, 140, 0);
    border-radius: 5px;
  }

  .play-bereich {
    flex: 1; /* ← das streckt es innerhalb des flex-columns von main */
    display: grid;
    grid-template-columns: 20% 1fr 20%;
    gap: 5px;
    padding-bottom: 2px; /* Platz zum Footer */
}

.play-box {
  position: relative;
}

.spielfeld-container {
  display: flex;
  justify-content: center;  /* zentriert das ganze Paket */
  align-items: flex-start;
  gap: 10px;
  margin: 0 auto;
  padding-top: 10px;
}

.sidebar-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

/* Spielfeld bleibt wie es ist */
#spielfeld {
  width: 484px;
  height: 644px;
  display: grid;
  grid-template-columns: repeat(24, 20px);
  grid-template-rows: repeat(32, 20px);
  background-color: rgb(30, 30, 30);
 /* border: 2px solid rgb(255, 140, 0); */
  box-shadow: 0 0 15px rgb(245, 140, 0);
}

/* Spielfeldzellen */
.brick-cell {
  width: 20px;
  height: 20px;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%; /* <-- Das macht die Zellen rund! */
}

/* Vorschaufenster relativ zur oberen rechten Ecke des Spielfelds */
.next-triti-box {
  width: 100px;
  height: 100px;
  background-color: rgb(20, 20, 20);
 /* border: 2px solid rgb(255, 140, 0); */
  box-shadow: 0 0 15px rgb(245, 140, 0);
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.vorschau-seite {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.punkte-box {
  width: 100px;
  margin-top: 10px;
  margin-left: 5px; /* gleiche Ausrichtung wie .next-triti-box */
  color: rgb(0, 255, 0); 
    box-shadow: 0 0 15px rgb(245, 140, 0);
  font-family: 'Press Start 2P', monospace;
  font-size: 1em;
  text-align: center;
  background-color: rgb(20, 20, 20);
/*  border: 2px solid rgb(255, 140, 0); */
  border-radius: 8px;
  padding: 5px;
}

.level-box {
  width: 100px;
  margin-top: 10px;
  margin-left: 5px;
  color: rgb(0, 255, 0); 
    box-shadow: 0 0 15px rgb(245, 140, 0);
  font-family: 'Press Start 2P', monospace;
  font-size: 1em;
  text-align: center;
  background-color: rgb(20, 20, 20);
 /* border: 2px solid rgb(255, 140, 0); */
  border-radius: 8px;
  padding: 5px;
}

.top-ten-table {
  width: 100%;
  margin: 10px auto;
  text-align: center;
}

.top-ten-table table {
  width: 100%;
  border-collapse: collapse;
  background-color: rgb(30, 30, 30);
  color: white;
  font-family: monospace;
  font-size: 14px;
  border: 2px solid rgb(245, 140, 0);
  border-radius: 10px;
}

.top-ten-table th,
.top-ten-table td {
  padding: 6px 10px;
  border-bottom: 1px solid rgb(80, 80, 80);
}

.top-ten-table tr:first-child th {
  border-top: none;
}

.top-ten-table tr:last-child td {
  border-bottom: none;
}

/* Highlight für aktuellen User */
.highlight-user {
  background-color: rgb(245, 140, 0);
  color: black;
  font-weight: bold;
}

/* Anzeige für eigenen Rang außerhalb der Top 10 */
.own-rank-info {
  margin-top: 10px;
  text-align: center;
  color: rgb(245, 140, 0);
  font-family: monospace;
  font-size: 14px;
}



  .info-box, .play-box, .game-box {
    height: 100%;
    padding: 5px; /* für etwas Innenabstand */
    
    font-family: 'Press Start 2P', monospace;
    font-size: 0.6em;
    
    border: 2px solid rgb(245, 140, 0);
    border-radius: 10px;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.1);
    
    /* Kein flex! */
    display: block;
    color:white;
   
  }
  
  .info-box h2,
  .play-box h2,
  .game-box h2 {
    font-size: 1.2em;
      text-align: center;
      margin-top: 5px;
      margin-bottom: 10px; /* Abstand zum Text darunter */
  }

  .info-box h2 {
    color: red;
    
  }

  .play-box h2 {
    color: green;
    
  } 
  
  .game-box h2 {
    color: blue;
    
  } 

  .info-box p,
.play-box p,
.game-box p {
    margin-left: 5px;
    line-height: 1.2; /* oder 1.6 für etwas mehr Luft */
}

.game-box {
  position: relative;
  padding-bottom: 80px; /* Platz für die Buttons */
}

.button-box {
  position: absolute;
  bottom: 20px; /* 10px über Unterkante der .game-box */
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: center;
}

.start-btn {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  font-family: 'Press Start 2P', monospace;
  font-size: 12px;
  color: black;
  background: radial-gradient(circle at 30% 30%, rgb(255, 255, 150), rgb(255, 204, 0));
  border: 4px inset rgb(120, 120, 0);
  box-shadow: 0 6px 0 rgb(80, 80, 0), 0 8px 10px rgba(0, 0, 0, 0.5);
  text-shadow: 1px 1px 1px white;
  cursor: pointer;
  transition: all 0.1s ease;
  outline: none;
  position: relative;
}

@keyframes startBlink {
  0%, 100% {
    box-shadow: 0 0 10px rgb(255, 255, 100), 0 0 5px rgb(255, 255, 0);
    background: radial-gradient(circle at 30% 30%, rgb(255, 255, 255), rgb(255, 255, 0));
  }
  50% {
    box-shadow: 0 0 3px rgb(200, 200, 50), 0 0 2px rgb(200, 200, 0);
    background: radial-gradient(circle at 30% 30%, rgb(255, 255, 180), rgb(255, 255, 100));
  }
}

.start-btn.leuchtend {
  animation: startBlink 1.2s infinite ease-in-out;
}

.start-btn:active {
  top: 2px;
  box-shadow: 0 3px 0 rgb(80, 80, 0), 0 4px 5px rgba(0, 0, 0, 0.5);
  background: radial-gradient(circle at 30% 30%, rgb(255, 255, 200), rgb(255, 230, 100));
}

.start-btn.leuchtend {
  background: radial-gradient(circle at 30% 30%, rgb(255, 255, 255), rgb(255, 255, 0));
  box-shadow: 0 0 20px rgb(255, 255, 100), 0 0 10px rgb(255, 255, 0);
}

.start-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  filter: none;
  background: radial-gradient(circle at 30% 30%, rgb(180, 180, 80), rgb(120, 120, 10));
  color: black;
  box-shadow: none;
  text-shadow: none;
}


.pause-btn {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  font-family: 'Press Start 2P', monospace;
  font-size: 12px;
  color: black;
  background: radial-gradient(circle at 30% 30%, rgb(255, 120, 120), rgb(180, 0, 0));
  border: 4px inset rgb(100, 0, 0);
  box-shadow: 0 6px 0 rgb(80, 0, 0), 0 8px 10px rgba(0, 0, 0, 0.5);
  text-shadow: 1px 1px 1px white;
  cursor: pointer;
  transition: all 0.1s ease;
  outline: none;
  position: relative;
}

.pause-btn:active {
  top: 2px;
  box-shadow: 0 3px 0 rgb(80, 0, 0), 0 4px 5px rgba(0, 0, 0, 0.5);
  background: radial-gradient(circle at 30% 30%, rgb(255, 160, 160), rgb(200, 30, 30));
}

.pause-btn.leuchtend {
  background: radial-gradient(circle at 30% 30%, rgb(255, 200, 200), rgb(255, 0, 0));
  box-shadow: 0 0 20px rgb(255, 100, 100), 0 0 10px rgb(200, 0, 0);
}

.pause-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  filter: grayscale(70%);
}

    footer {
        font-family: 'Press Start 2P', monospace; 
        width: calc(100% - 20px);
        height: 50px;
        margin: 2px auto 10px auto;
        color: rgb(0, 255, 0);
        border: 2px solid rgb(245, 140, 0);
        border-radius: 10px;
        text-align: center;
        font-size: 0.5em;
        line-height: 45px;
        
      }
  
  