@font-face {
  font-family: "RixYeoljeongdo_Regular";
  src: url("https://fastly.jsdelivr.net/gh/projectnoonnu/noonfonts_2102-01@1.0/RixYeoljeongdo_Regular.woff")
    format("woff");
  font-weight: normal;
  font-style: normal;
}

* {
  font-family: RixYeoljeongdo_Regular, sans-serif;
}

body {
  text-align: center;
  margin-top: 50px;
  background-color: #f5f5dc;
}

h1 {
  color: #d32f2f;
}

#numpad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-width: 300px;
  margin: 20px auto;
}

#numpad button {
  padding: 15px;
  font-size: 18px;
  cursor: pointer;
  border: none;
  background-color: #d32f2f;
  color: white;
  border-radius: 5px;
  transition: background-color 0.3s;
}

#numpad button:hover {
  background-color: #b71c1c;
}

#userGuess {
  font-size: 24px;
  letter-spacing: 20px;
  margin: 20px 0;
  background-color: rgba(255, 255, 255, 0);
  padding: 10px 10px 10px 30px;
  border-radius: 5px;
  display: inline-block;
  color: #212121;
}

#clearBtn,
#submitBtn {
  font-size: 14px;
}

#mode3,
#mode4 {
  padding: 10px 20px;
  font-size: 16px;
  margin: 0px 0;
  background-color: #4caf50;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

#restartBtn {
  padding: 10px 20px;
  font-size: 16px;
  margin: 20px 0;
  background-color: #4caf50;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

#result {
  margin-top: 20px;
  font-weight: bold;
  color: #212121;
}

#history {
  list-style-type: none;
  padding: 0;
  max-width: 300px;
  margin: 20px auto;
}

#history li {
  background-color: #ffffff;
  margin-bottom: 5px;
  padding: 10px;
  border-radius: 5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  color: #212121;
}

#logo {
  border-radius: 10px;
}

#version {
  font-size: 0.9rem;
  color: #888;
  text-align: center;
  font-style: italic;
  margin-top: -5px;
  margin-bottom: -10px;
}

#copyright {
  font-size: 0.7rem;
  color: #888;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
}

#copyright a {
  color: inherit;
  text-decoration: none;
}

#helpButton {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: #4caf50;
  color: white;
  font-size: 20px;
  text-align: center;
  line-height: 30px;
  cursor: pointer;
  z-index: 1000;
}

#helpPopup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1001;
}

#helpPopupContent {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: white;
  padding: 10px;
  border-radius: 10px;
  text-align: left;
  width: 80%;
  max-width: 640px;
}

#closeHelpButton {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: #f44336;
  color: white;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  font-size: 16px;
  cursor: pointer;
}
