.main-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px;
}

.canvasContainer{
    display: flex;
    align-items: center;
    justify-content: center; 
       
}
 

  body {
    margin: 0;
    background: #121212;
    font-family: 'Press Start 2P', monospace;
    color: #fff;
  }

  .pixel-navbar {
    display: flex;
    align-items: center;
    gap: 24px;
    background: #222;
     padding: 12px 10px; /* 上下 16px，左右都 16px */
    border-top: 4px solid  #8200fc;
    border-bottom: 4px solid #8200fc;
      box-sizing: border-box;
      font-weight: bold;
  }
#openSettings {
  margin-left: auto; /* 這樣它就會跑到最右邊 */
}


  .pixel-navbar a {
    position: relative;
    color:#8200fc;
    text-decoration: none;
    font-size: 20px;
    padding: 6px 14px;
    border: 3px solid #8200fc;
    box-sizing: border-box;
    transition: color 0.3s;
    user-select: none;
  }

.pixel-navbar a::before {
    content: "";
    position: absolute;
    top: -4px; left: -4px; right: -4px; bottom: -4px;
    border: 4px solid transparent;
    pointer-events: none;
    transition: border-color 0.3s;
  }

.pixel-navbar a:hover {
    color: #121212;
    background: #8200fc;
  }

.pixel-navbar a:hover::before {
    border-color:#8200fc;
    animation: flicker 0.4s infinite alternate;
  }

  @keyframes flicker {
    0% { border-color:#8200fc; }
    100% { border-color:#8200fc; }
  }



  .game-over-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: black;
  color: white;
  font-family: 'Press Start 2P', cursive; /* 像素風 */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 10;
  text-align: center;
}

.game-over-title {
  font-size: 32px;
  margin-bottom: 20px;
}

.score-text {
  font-size: 18px;
}





 form {
    text-align: center; /* 輸入框置中 */
    margin-top: 10px;
  }

  input.pixel-input {
    font-family: 'Press Start 2P', cursive; /* 像素風字體 */
    font-size: 14px;
    text-align: center; /* 文字置中 */
    background-color: black;
    color: white;
    border: 3px solid white;
    padding: 8px 16px;
    outline: none;
    box-shadow:
      2px 2px 0 #fff,
      -2px -2px 0 #fff;
  }

  input.pixel-input::placeholder {
    color: #aaa;
    text-align: center;
  }




  #settingsPanel {
  position: absolute;
  top: 30px;
  right: 200px;
  background: #0a0808;
  padding: 16px;
  border: 3px solid #fff; /* 白色粗邊 */
  border-radius: 0; /* 像素風通常不用圓角 */
  box-shadow: none; /* 去掉陰影 */
  display: none;
  z-index: 1000;

  font-family: 'Press Start 2P', cursive, monospace; /* 像素字體 */
  font-size: 14px;
  color: #fff;
  text-shadow: 1px 1px 0 #000;
  user-select: none; /* 禁止選取文字 */
}

#settingsPanel button {
  background: #222;
  border: 2px solid #fff;
  color: #fff;
  font-family: 'Press Start 2P', cursive, monospace;
  font-size: 12px;
  padding: 6px 12px;
  cursor: pointer;
  box-shadow: none;
  margin-top: 10px;
  text-transform: uppercase;
}

#settingsPanel button:hover {
  background: #555;
}

/* Input 風格 */
#settingsPanel input[type="number"] {
  background: #111;
  border: 2px solid #fff;
  color: #fff;
  width: 60px;
  font-family: 'Press Start 2P', cursive, monospace;
  font-size: 12px;
  padding: 2px 4px;
  text-align: center;
  outline: none;
}

/* Label 風格 */
#settingsPanel label {
  display: block;
  margin-bottom: 8px;
  user-select: none;
}

/* 標題字體 */
#settingsPanel h3 {
  margin: 0 0 10px 0;
  font-weight: bold;
  text-transform: uppercase;
  text-shadow: 2px 2px 0 #000;
}







.color-options {
  display: flex;
  gap: 6px;
  margin: 5px 0 10px;
}

.color-box {
  width: 20px;
  height: 20px;
  border: 2px solid #aaa;
  cursor: pointer;
  image-rendering: pixelated;
}

.color-box.selected {
  border: 2px solid white;
  box-shadow: 0 0 5px white;
}

