/* Example styling for daily puzzle elements... */
body {
  background: #f3efe0;
  color: #3a3a3c;
  text-align: center;
  margin: 0;
  padding: 0;
  font-family: 'Verdana', sans-serif;
}

h1 {
  margin-top: 20px;
  color: #6aaa64;
  font-size: 2em;
}
  
#infoPanel {
  margin: 10px auto;
  width: 400px;
  font-weight: bold;
}

.letter-container {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 10px 0;
}
.letter-box {
  width: 40px;
  height: 40px;
  border: 2px solid #787c7e;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5em;
  font-weight: bold;
  color: #787c7e;
  background-color: #fafafa;
  border-radius: 4px;
}
.letter-box.active {
  color: #6aaa64;
  border-color: #6aaa64;
}

#timeLabel {
  color: #c9b458;
}

#gameContainer {
  display: inline-block;
  position: relative;
  margin-top: 10px;
}

#gameCanvas {
    background: #000;
    display: block;
    margin: 0 auto; /* Center the canvas horizontally */
    border: 3px solid #787c7e;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Optional shadow for a polished look */
}

#trapPopup, #timePopup {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 20px;
    border-radius: 8px;
    font-size: 1.2em;
    font-weight: bold;
    z-index: 100;
    display: none; /* Initially hidden */
    text-align: center;
}

/* Optional unique styles for each popup */
#trapPopup {
    background: rgba(200, 0, 0, 0.9); /* Red for traps */
}

#timePopup {
    background: rgba(0, 0, 255, 0.9); /* Blue for time items */
}


/* Similar style for #seanSummonedPopup, #endGamePopup, #rulesPopup */
#seanSummonedPopup,
#endGamePopup,
#rulesPopup {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #222;
  color: #fff;
  padding: 20px;
  border-radius: 5px;
  font-weight: bold;
  display: none; 
  z-index: 20;
}

#endGameText {
  margin-bottom: 10px;
}

/* The "Share" button in the end-game popup */
#shareBtn {
  cursor: pointer;
  background: #6aaa64;
  color: #fff;
  border: none;
  padding: 8px 12px;
  font-size: 1em;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
}
#shareBtn:hover {
  background: #5b9657;
}

#joystickArea {
    background: rgba(0, 0, 0, 0); /* Transparent background */
    touch-action: none; /* Disable default touch gestures */
}

/* Start button for the rules popup */
.start-btn {
  margin-top: 10px;
  cursor: pointer;
  background: #6aaa64;
  color: #fff;
  border: none;
  padding: 8px 12px;
  font-size: 1em;
  border-radius: 4px;
}

.start-btn:hover {
  background: #589259;
}

.reset-btn {
    margin-top: 10px;
    cursor: pointer;
    background: #ff6b6b;
    color: #fff;
    border: none;
    padding: 8px 12px;
    font-size: 1em;
    border-radius: 4px;
}

.reset-btn:hover {
    background: #e85c5c;
}

/* Leaderboard Container */
#leaderboardContainer {
  position: fixed;
  right: 20px;
  top: 80px;
  width: 250px;
  background: #f8f9fa;
  border: 1px solid #6aaa64;
  border-radius: 8px;
  padding: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

#leaderboardTitle {
  font-size: 1.2em;
  color: #3a3a3c;
  margin-bottom: 10px;
}

#leaderboardList {
  max-height: 300px;
  overflow-y: auto;
  list-style: none;
  padding: 0;
  margin: 0;
}

#leaderboardList div {
  display: flex;
  justify-content: space-between;
  padding: 4px 8px;
  border-bottom: 1px solid #ddd;
}

#leaderboardList div:last-child {
  border-bottom: none;
}

/* Score Submission */
#submitScoreContainer {
  margin-top: 20px;
  text-align: center;
}

#playerNameInput {
  width: 70%;
  padding: 8px;
  margin-bottom: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

#submitScoreBtn {
  padding: 8px 12px;
  background-color: #6aaa64;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

#submitScoreBtn:hover {
  background-color: #589259;
}

/* End Game Button */
.end-btn {
  margin-top: 10px;
  cursor: pointer;
  background-color: #ffc107;
  color: #000;
  border: none;
  padding: 8px 12px;
  font-size: 1em;
  border-radius: 4px;
}

.end-btn:hover {
  background-color: #e6a700;
}

/* Activate Enemy Button */
.activate-enemy-btn {
  margin-top: 10px;
  cursor: pointer;
  background-color: #dc3545;
  color: white;
  border: none;
  padding: 8px 12px;
  font-size: 1em;
  border-radius: 4px;
}

.activate-enemy-btn:hover {
  background-color: #c82333;
}

