/* ===== GLOBAL ===== */
* {
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}


html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden; /* 👈 verhindert Scrollsprünge */
}
body {
  margin: 0;
  background: radial-gradient(circle at top, #0d2c2c 0%, #041414 100%);
  color: #fff;
}

/* ==== Screensichtbarkeit ==== */
.screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0s linear 0.6s;
  z-index: 0;
}

.screen.active {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
  z-index: 5;
}


h1 {
  font-size: 2rem;
  margin-bottom: 2rem;
  margin-top: 0;
}

button, select {
  background: #f0b85d;
  color: #000000;
  border: none;
  border-radius: 8px;
  padding: 0.45rem 0.7rem;
  cursor: pointer;
  font-size: 1rem;
  transition: 0.2s;
}

#start-screen-inner select {
  text-align: center;         /* Text im Select */
  text-align-last: center;    /* Text der letzten Option */
  -moz-text-align-last: center; /* Firefox */
  height: 40px;
}

button:hover, select:hover {
  filter: brightness(1.1);
}

/* ===== STARTSCREEN ===== */
#start-screen-inner {
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  max-width: 99%;
}

#start-screen-inner-border {
  text-align: center;
  background: radial-gradient(circle at top, #0d2c2c 0%, #041414 100%);
  border-radius: 20px;
  padding: 30px;
  color: #fff;
  border: 4px solid #ffd166;
  box-shadow: 0 1rem 10rem rgba(0,0,0,.375);
  max-width: 90%;
  width:400px;
}

#start-screen-inner button,
#start-screen-inner select {
  width: 100%;
  text-align: center;
  margin-bottom: 10px;
  background-color: rgba(255,255,255,0.09);
  border: 1px solid rgba(255,255,255,0.08);
  color: #fff;
}

/* Start Button Animation */
@keyframes startbtnani {
  0% {
    transform: scale(1);
    box-shadow: 0 0 25px rgba(255,209,102,0);
  }
  70% {
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(255,209,102,0.8);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 25px rgba(255,209,102,0);
  }
}

#start-screen-inner #start-game {
  background: #ffd166;
  margin-top: 50px;
  padding: 12px 24px;
  color: #000;
  font-size: 18px;
  border-radius: 12px;
  transition: all 0.3s ease;
  max-width: 90%;
  will-change: transform, box-shadow;
  animation: startbtnani 1.8s infinite;
}

#start-screen-inner #start-game:hover {
  transform: scale(1.05);
  box-shadow: 0 0 25px rgba(255,209,102,0.8);
  animation: none;
}

#player-name {
  width: 100%;
  padding: 0.5rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.15);
  background-color: rgba(255,255,255,0.08);
  color: #fff;
  font-size: 1rem;
  text-align: center;
  margin-bottom: 10px;
  outline: none;
  transition: border-color 0.2s ease;
}

#player-name:focus {
  border-color: #ffd166;
}

#copyright {
  position: fixed;
  bottom: 15px;
  font-size: 12px;
  color: #fff;
}













/* ===== GAME SCREEN ===== */
#game-screen {
  flex-direction: column;
}





/* --- TOPBAR --- */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #e6c79c;
  color: #000;
  width: 100%;
  gap: 10px;
  position: sticky;
  top: 0;
  z-index: 10;
  box-sizing: border-box;
  overflow: hidden;
  flex-wrap: nowrap; /* 👈 verhindert Zeilenumbruch */

  transition: all 0.3s ease;
  transform: translateY(-100%);
}

#game-screen.active .topbar {
  transform: translateY(0%);
}

.topbar-section {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0.5rem 1rem;
}

#center-info {
  flex-grow: 1;
  display: flex;
  justify-content: center;
  text-align: center;

  background: #0a2323;
  border-radius: 30px;
  color: #ffd166;
  max-width: 500px;

  font-weight: bold;
  font-size: 1.1rem;
}

#center-info::before {
  content: "👤 ";
}

.topbar button,
.topbar select {
  background-color: #f0b85d;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.topbar button:hover,
.topbar select:hover {
  background-color: #ffd166;
}


/* -------- RESPONSIVE ANPASSUNG -------- */

/* Tablet: kompakter, aber weiter einzeilig */
@media (max-width: 900px) {
  #btn-fullscreen {
    display: none;
  }
  .topbar {
    padding: 0.4rem 0.6rem;
    gap: 6px;
  }

  .topbar-section {
    gap: 6px;
  }

  .topbar button,
  .topbar select {
    padding: 6px 10px;
    font-size: 0.9rem;
  }
}

/* Smartphone: Icons kompakter, aber einzeilig */
@media (max-width: 700px) {
  .topbar {
    flex-wrap: nowrap;   /* 👈 keine Umbrüche */
    justify-content: space-between;
    align-items: center;
    padding: 0.3rem 0.4rem;
    gap: 4px;
  }
  .topbar-section {
    flex-wrap: nowrap;
  }
  .topbar button span {
    display: none;
  }
  .topbar button,
  .topbar select {
    height: 38px;
    justify-content: center;
  }
  #center-info {
    display: none;
  }
}

/* Fortschrittsbalken Farbe #facc61 */
#scoreProgress {
  width: 400px;
  height: 12px;
  border-radius: 8px;
  margin-top: 0px;
  max-width: 90%;
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255,255,255,0.08);
}
progress#scoreProgress::-webkit-progress-bar {
  background-color: rgba(255,255,255,0.1);
  border-radius: 8px;
}
progress#scoreProgress::-webkit-progress-value {
  background-color: #facc61;
  border-radius: 8px;
}
progress#scoreProgress::-moz-progress-bar {
  background-color: #facc61;
  border-radius: 8px;
}





/* ==============================
   GAME LAYOUT mit gleich hohen Blöcken
   ============================== */
#game-layout {
  display: grid;
  grid-template-columns: 200px 1fr 200px; /* Links, Mitte, Rechts */
  gap: 20px;
  align-items: stretch; /* alle gleich hoch */
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
  flex-grow: 1;
  max-width: 1800px;
}

/* Werbung links & rechts */
#aaddss-left, #aaddss-right {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 1px dashed rgb(255, 209, 102);
  overflow: hidden;
}

#aaddss-left img,
#aaddss-right img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

/* Mittlerer Spielbereich */
#game-content {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  text-align: center;
  padding: 20px;
  min-height: 200px;
}

/* Unten & oben zentriert */
#aaddss-center-top,
#aaddss-center-bottom {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 10px 0;
  width: 90%;
  max-width: 900px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px dashed rgb(255, 209, 102);
  overflow: hidden;
}
#aaddss-center-bottom {
  height: 160px;
}
#aaddss-center-top {
  height: 50px;
  font-size: 20px;
  color: rgb(255, 209, 102);
}

.game-stats-inner {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
}
#difficulty-view,
#timer,
#punkte {
  font-weight: bold;
  color: #fff;
}

.game-stats-inner-hide-mobile {
  display: none;
}



/* Responsive: Seitenwerbung ausblenden */
@media (max-width: 1200px) {
  #game-layout {
    grid-template-columns: 150px 1fr 150px;
  }
}
@media (max-width: 900px) {

  #aaddss-center-bottom {
    height: 80px;
  }
  #aaddss-center-top {
    font-size: 16px;
  }

  #game-layout {
    grid-template-columns: 1fr; /* nur noch Mitte */
  }
  #aaddss-left,
  #aaddss-right {
    display: none;
  }
  #game-layout {
    padding: 0 10px;
  }
  #aaddss-center-top,
  #aaddss-center-bottom {
    width: 95%;
  }
  .game-stats-inner-hide-mobile {
    display: none;
  }
}







/* ===== MODALS ===== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 100;
}

.modal {
  background: radial-gradient(circle at top, #0d2c2c 0%, #041414 100%);
  border: 3px solid #ffd166;
  border-radius: 12px;
  padding: 20px;
  max-width: 500px;
  color: #fff;
  text-align: center;
  box-shadow: 0 0 30px rgba(0,0,0,0.4);
}

.modal h2 {
  margin-top: 0;
}

.modal button {
  background: #ffd166;
  margin-top: 10px;
}


.noAddss #aaddss-left,
.noAddss #aaddss-right {
  display: none;
}
.noAddss #aaddss-center-bottom {
  display: none;
}


.noAddss #game-layout {
  grid-template-columns: 0 1fr 0;
  padding-bottom: 20px;
}

.noAddss #game-content {
  grid-column: 1 / -1;
}
