/* Reset some basic styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Body */
body {
  background-color: #121212;
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  overflow: hidden;
  text-align: center;
  background-image: url("../asset/image/background.jpg");
  backdrop-filter: blur(10px);
  background-position: center;
  background-repeat: no-repeat;
  font-family: "Press Start 2P", serif;
  background-size: cover;
  animation: fadeIn 1s ease-out;
}

/* Header and Subtitles */
h1,
.subtitle {
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
  font-size: 3rem;
  margin-bottom: 20px;
}

.subtitle {
  font-style: italic;
  font-size: 1.2rem;
  color: #aaa;
}

/* Buttons */
button {
  background: #ff7b00;
  color: #fff;
  font-size: 1.2rem;
  padding: 15px 25px;
  border: none;
  cursor: pointer;
  border-radius: 8px;
  margin: 15px;
  transition: background 0.3s, transform 0.2s ease-in-out;
  font-weight: bold;
}

button:hover {
  background: #ff5500;
  transform: scale(1.05);
}

button:focus {
  outline: none;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.7);
}

/* Start Menu */
#start-menu {
  background: rgba(0, 0, 0, 0.7);
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.2);
}

#credits {
  font-size: 0.9rem;
  color: #bbb;
  margin-top: 20px;
  text-align: center;
}

/* Settings Menu */
#settings-menu {
  background: rgba(0, 0, 0, 0.7);
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.2);
}

.setting-item {
  margin: 20px 0;
}

label {
  display: block;
  font-size: 1rem;
  margin-bottom: 5px;
}

input[type="range"],
select {
  width: 100%;
  padding: 10px;
  margin: 10px 0;
  border-radius: 5px;
  background-color: #333;
  color: #fff;
  border: 1px solid #444;
}

/* Canvas */
#canvas {
  display: block;
  width: 100%;
  height: 100vh;
}
#score {
  position: absolute;
  top: 20px;
  left: 20px;
  font-size: 1.5rem;
  color: #fff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

#pause-button {
  position: absolute;
  top: 20px;
  right: 20px;
  background: #ff0;
  color: #000;
  padding: 12px 20px;
  border: none;
  cursor: pointer;
  border-radius: 5px;
  font-weight: bold;
  transition: background 0.3s, transform 0.2s ease-in-out;
}

#pause-button:hover {
  background: #ffcc00;
  transform: scale(1.1);
}

@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

#gameOverModal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  color: #444;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

#gameOverModal.show {
  visibility: visible;
  opacity: 1;
}

.modal-content {
  background-color: white;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

button {
  background-color: green;
  color: white;
  border: none;
  padding: 10px 20px;
  cursor: pointer;
  font-size: 1.2rem;
  border-radius: 5px;
}

button:hover {
  background-color: darkgreen;
}

#score {
  position: absolute;
  top: 10px;
  left: 10px;
  color: white;
  font-size: 20px;
  background-color: rgba(0, 0, 0, 0.5);
  padding: 5px 10px;
  border-radius: 5px;
}
