* {
  box-sizing: border-box;
}
body {
  font-family: Arial, sans-serif;
  margin: 0px;
  background-color: #f4f4f4;
}
.container {
  padding: 10px;
}
.box {
  position: relative;
  min-height: 400px;
}
h1 {
  color: #fff;
  font-size: 20px;
  margin: 0px;
}
.h3 {
  margin: 10px 0px;
  font-weight: 700;
}
.info {
  margin: 10px auto;
  font-size: 14px;
}
.form {
  position: sticky;
  top: 0px;
  background: #f4f4f4;
  padding: 0px 10px 10px;
}
input {
  padding: 10px;
  margin: 5px 0;
  font-size: 16px;
}
button {
  padding: 10px;
  margin: 5px 0;
  font-size: 14px;
}
#log {
  /* margin-top: 20px; */
  background: #fff;
  padding: 0 10px 10px 10px;
  border: 1px solid #ccc;
}
.log-entry {
  margin-bottom: 5px;
  padding: 5px;
  border-bottom: 1px solid #eee;
}

.table {
  border-spacing: 0;
  border-collapse: collapse;
  width: 100%;
  max-width: 500px;
}
.table th,
.table td {
  text-align: center;
  padding: 10px 10px;
  border: 1px solid #ccc;
  font-size: 12px;
}
#guessInput {
  max-width: 200px;
  width: 35vw;
}
h3 {
  margin: 10px 0px;
}

.btn {
  display: inline-block;
  padding: 10px;
  background-color: #007bbf;
  color: white;
  font-size: 14px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

#footer {
  margin-top: 20px;
}

header {
  background-color: #388e3c;
  color: white;
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.no_newline {
  overflow: hidden;
  -o-text-overflow: ellipsis;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  max-width: 100%;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  /* min-width: 80%; */
}
@media (max-width: 768px) {
  .logo {
    width: 85%;
  }
}
#result {
  font-size: 14px;
  font-weight: 400;
}
nav {
  display: flex;
  gap: 20px;
}

nav a {
  color: white;
  text-decoration: none;
  font-size: 1rem;
  transition: opacity 0.3s;
  padding: 10px 0px;
}

nav a:hover {
  opacity: 0.8;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  height: 24px;
  justify-content: center;
}

.menu-toggle span {
  height: 3px;
  width: 25px;
  background: white;
  margin: 3px 0;
  transition: all 0.3s ease;
}

@media (max-width: 768px) {
  nav {
    gap: 0px;
    display: flex; /* Required for layout */
    flex-direction: column;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  nav.active {
    max-height: 150px; /* Big enough to fit your menu items */
  }

  .menu-toggle {
    display: flex;
  }
}

/* Cross animation */
.menu-toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(7px, 7px);
}

.menu-toggle.open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.keypad {
  background-color: #fff;
  width: 100%;
  position: fixed;
  bottom: 0px;
  left: 0;
  padding: 10px 0;
}
.number-pad {
  display: grid;
  grid-template-columns: repeat(5, 50px);
  grid-gap: 5px;
  justify-content: center;
  align-items: center;
}

.number-pad span,
.extra-pad span {
  font-size: 16px;
  padding: 10px;
  background-color: white;
  border: 1px solid #ccc;
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: background-color 0.1s ease;
  text-align: center;
}

.extra-pad {
  display: grid;
  grid-template-columns: repeat(2, 140px);
  grid-gap: 10px;
  justify-content: center;
  align-items: center;
  margin-top: 5px;
}

.number-pad span:active,
.extra-pad span:active {
  background-color: #e0e0e0;
}

canvas {
  overflow-y: hidden;
  overflow-x: hidden;
  width: 100%;
  margin: 0;
  position: absolute;
}
