/* style.css */

/* Allgemeine Styles */
body {
  background: #fff;
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}
h1 {
  color: #333;
  margin-top: 20px;
}

/* Einheitliche Button-Klasse */
.action-button {
  font-size: 16px;
  padding: 5px 10px;
  margin: 5px;
  border: 2px solid #000;
  border-radius: 5px;
  background: #ffa500;
  cursor: pointer;
  text-decoration: none;
  color: #000;
}

/* Desktop-Menüs */
#stateCodeContainer {
  position: fixed;
  top: 10px;
  right: 10px;
  background: #fff;
  border: 2px solid #000;
  border-radius: 5px;
  padding: 5px;
  font-size: 12px;
  text-align: center;
  width: 170px;
}
#loadStateContainer {
  position: fixed;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border: 2px solid #000;
  border-radius: 5px;
  padding: 5px;
  font-size: 12px;
  text-align: center;
  width: 220px;
}
/* Container für APK und Challenge (Desktop) – Flexbox für Nebeneinander */
#downloadContainerDesktop {
  position: fixed;
  top: 10px;
  left: 10px;
  background: #fff;
  border: 0px solid #000;
  border-radius: 5px;
  padding: 0px;
  font-size: 12px;
  text-align: center;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

/* Mobile Hamburger-Menü */
#menuToggle {
  display: none;
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1100;
  background: #ffa500;
  border: 2px solid #000;
  border-radius: 5px;
  font-size: 20px;
  padding: 5px 10px;
}
/* Challenge-Button im mobilen Header – positioniert neben dem Hamburger-Button */
#challengeBtnMobile {
  display: none;
  position: fixed;
  top: 5px;
  left: 100px;
  z-index: 1100;
  background: #ffa500;
  border: 2px solid #000;
  border-radius: 5px;
  font-size: 20px;
  padding: 6.5px 10px;
}

#mobileMenu {
  display: none;
  position: fixed;
  top: 50px;
  left: 10px;
  right: 10px;
  background: #fff;
  border: 2px solid #000;
  border-radius: 5px;
  padding: 10px;
  z-index: 1100;
  font-size: 14px;
}
#mobileMenu input,
#mobileMenu select,
#mobileMenu button {
  margin: 5px 0;
  width: 90%;
  padding: 5px;
  font-size: 16px;
}
/* Neuer Download-Button im mobilen Menü */
#downloadContainerMobile {
  margin-top: 10px;
}
#downloadContainerMobile a {
  display: inline-block;
}

/* Stoppuhr */
#stopwatch {
  font-size: 24px;
  font-weight: bold;
  text-align: center;
  margin: 10px 0;
}

/* Board Container */
#boardContainer {
  position: relative;
  width: 360px;
  margin: 20px auto;
}
#sudokuBoard {
  display: grid;
  grid-template-columns: repeat(9, 40px);
  grid-template-rows: repeat(9, 40px);
}
.cell {
  width: 40px;
  height: 40px;
  line-height: 40px;
  text-align: center;
  font-size: 20px;
  font-family: "Courier New", Courier, monospace;
  cursor: pointer;
  border: 1px solid #ccc;
  user-select: none;
  background: #fff;
  box-sizing: border-box;
}
.cell.fixed {
  background: #ddd;
  font-weight: bold;
  cursor: default;
}
.cell.selected { background: #ffa500; }
.cell.correct { background: #cfc !important; }
.cell.error { background: #ffcccc; }
.pending {
  background-color: #ffffe0;
}
.hintSingle { background-color: lightblue !important; }
.hintMultiple { background-color: lightyellow !important; }
.border-left-thick { border-left: 3px solid #000 !important; }
.border-right-thick { border-right: 3px solid #000 !important; }
.border-top-thick { border-top: 3px solid #000 !important; }
.border-bottom-thick { border-bottom: 3px solid #000 !important; }

/* Keypad-Overlay */
#keypadOverlay {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255,255,255,0.95);
  z-index: 1050;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
#keypadGrid {
  display: grid;
  grid-template-columns: repeat(3, 60px);
  grid-gap: 10px;
}
#keypadGrid button {
  width: 60px;
  height: 60px;
  font-size: 24px;
  background: #ffa500;
  border: 2px solid #000;
  border-radius: 5px;
  cursor: pointer;
}
#clearBtn {
  margin-top: 20px;
  width: 60px;
  height: 60px;
  font-size: 24px;
  background: #ffa500;
  border: 2px solid #000;
  border-radius: 5px;
  cursor: pointer;
}

/* Steuerungselemente */
#controls {
  position: fixed;
  bottom: 10px;
  width: 100%;
  text-align: center;
}

/* Gewinn-Nachricht */
#winMessage {
  text-align: center;
  font-size: 20px;
  color: green;
  margin: 10px;
  display: none;
}

/* Responsive Anpassungen */
@media (max-width: 600px) {
  .cell {
    width: 35px;
    height: 35px;
    line-height: 35px;
    font-size: 18px;
    align-items: center;
    justify-content: center;
  }
  #sudokuBoard {
    grid-template-columns: repeat(9, 35px);
    grid-template-rows: repeat(9, 35px);
    align-items: center;
    justify-content: center;
  }
  #keypadGrid {
    grid-template-columns: repeat(3, 50px);
    grid-gap: 8px;
  }
  #keypadGrid button {
    width: 50px;
    height: 50px;
    font-size: 20px;
  }
  #clearBtn {
    width: 50px;
    height: 50px;
    font-size: 20px;
    margin-top: 15px;
  }
  /* Verberge Desktop-Menüs */
  #stateCodeContainer,
  #loadStateContainer,
  #downloadContainerDesktop,
  #difficultyContainerDesktop {
    display: none;
  }
  /* Zeige mobile spezifische Elemente */
  #menuToggle, #challengeBtnMobile {
    display: inline-block;
  }
}
