body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  background-image: url("resources/beaver1.png"),
    linear-gradient(
      to bottom right,
      rgb(0, 192, 176),
      rgb(0, 0, 0),
      rgb(27, 2, 74)
    );
  background-repeat: no-repeat, no-repeat;
  background-position: calc(20px) calc(20px), center;
  background-size: 50vh, cover;
  background-attachment: fixed, fixed;
  color: white;
  font-family: Arial, sans-serif;
}

/* =============== SIDE MENU ==================*/
.sidenav {
  height: 100%;
  width: 250px;
  position: fixed;
  z-index: 1;
  top: 0;
  right: -250px; /* start off-screen from right */
  background-color: #111;
  overflow-x: hidden;
  transition: 0.5s;
  padding-top: 60px;
}

.sidenav.open {
  right: 0;
}

.sidenav a {
  padding: 8px 8px 8px 32px;
  text-decoration: none;
  font-size: 25px;
  color: #818181;
  display: block;
  transition: 0.3s;
}

.sidenav p {
  padding: 5px 15px 5px 25px;
  text-decoration: none;
  font-size: 16px;
  color: #818181;
  display: block;
  transition: 0.3s;
}

.sidenav a:hover {
  color: #f1f1f1;
}

.sidenav .closebtn {
  position: absolute;
  top: 0;
  right: 25px;
  font-size: 36px;
  margin-left: 50px;
}

@media screen and (max-height: 450px) {
  .sidenav {
    padding-top: 15px;
  }
  .sidenav a {
    font-size: 18px;
  }
}

.nav-toggle {
  font-size: 30px;
  cursor: pointer;
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 0;
}

.nav-toggle:hover {
  opacity: 0.8;
}

.bb-button {
  display: block;
  align-items: center;
  width: 60%;
  margin: 10px 0 0 20px;
  padding: 6px;
  background: rgb(0, 192, 176);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
}

.bb-button:hover {
  background: rgb(0, 121, 111);
}
/* =============== TOP/BOTTOM CONTAINER ==================*/
.top-container {
  display: flex;
  flex-direction: row;
  gap: 30px;
  margin-top: 20px;
  justify-content: center;
  align-items: center;
}

.bottom-container {
  gap: 30px;
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  justify-content: space-around;
  align-items: flex-start;
  margin-top: 20px;
}

/* =============== CARDS ==================*/
.cards {
  display: flex;
  max-width: 45vw; /* Maximum width */
  flex-wrap: wrap;
  gap: 20px;
}

.card {
  background-color: #333;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.card:hover {
  background-color: #1f1f1f;
  box-shadow: 0 0 5px #fff, 0 0 10px rgb(174, 255, 0), 0 0 15px #0fa,
    0 0 20px rgb(0, 242, 255);
  transition: 0.2s ease;
}

.card-label {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 10px;
}

.input-group {
  margin: 5px 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 5px 10px;
  border: 1px solid rgb(90, 90, 90);
  border-radius: 8px;
  background-color: #444;
}

.input-group label {
  font-size: 20px;
  margin-right: 7px;
}

.input-group input {
  padding: 5px;
  border-radius: 5px;
  border: none;
  width: 30px;
  text-align: center;
}

/* =============== TAPE ==================*/

.grid {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  margin: 10vh 5vh 5vh 5vh;
}

.square {
  width: 3.5vw;
  height: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2vw;
  color: black;
  font-weight: bold;
  background-color: grey;
  border: 1px solid black;
  box-shadow: 0 0 5px black;
  aspect-ratio: 1;
}

/* =============== MESSAGES ==================*/

.messages-container {
  background-color: #333;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.7);
  border-radius: 10px;
  max-width: 300px;
  width: 300px;
  overflow: hidden;
  padding: 0;
}

.messages {
  background-color: #1f1f1f;
  border-top: 2px solid white;
  padding: 15px;
  width: 300px;
  min-height: 150px;
  color: #fff;
  font-family: "Courier New", Courier, monospace;
  color: white;
  font-size: 14px;
  white-space: pre-wrap;
}

.messages-header {
  text-align: center;
  padding: 5px;
  font-size: 16px;
  color: white;
  border-bottom: 2px solid white;
}

/* =============== MACHINE ==================*/

#machine {
  position: absolute;
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 20px solid red;
  top: -20px; /* Adjust to position above squares */
  transition: left 0.4s linear; /* Smooth animation */
}

/* =============== MENU ==================*/

.menu {
  display: flex;
  flex-direction: column;
  width: 250px;
  gap: 20px;
  background-color: #333;
  padding: 10px 20px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.6);
}

.menu button {
  padding: 10px 20px;
  font-size: 16px;
  background-color: #555;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.menu button:hover {
  background-color: #777;
}

/* =============== SCORING ==================*/

.scoring {
  display: flex;
  margin: 10px 20px 10px 20px;
  width: fit-content;
  background-color: #2c2c2c;
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.6);
  justify-content: center;
  align-items: center;
  overflow-x: auto;
}

.scoring table {
  border-collapse: collapse;
  color: #fff;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 14px;
}

.scoring th,
.scoring td {
  border: 1px solid #555;
  padding: 10px 16px;
  text-align: center;
  background-color: #3b3b3b;
}

.scoring th {
  background-color: #444;
  font-weight: bold;
  color: #f0f0f0;
}

.scoring tr:nth-child(even) td {
  background-color: #343434;
}

.scoring tr:hover td:hover {
  background-color: #555;
  transition: background-color 0.2s ease;
}

/* =============== STATS BOX ==================*/

.stats-box {
  background-color: #1f1f1f;
  color: white;
  padding: 10px 20px;
  border-radius: 10px;
  margin-top: 10px;
  box-shadow: 0 0 5px #fff, 0 0 10px rgb(174, 255, 0), 0 0 15px #0fa,
    0 0 20px rgb(0, 242, 255);
  font-family: sans-serif;
}
.stats-box p {
  margin: 5px 0;
}
