body,
html {
  touch-action: manipulation;
}
body {
  font-family: sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* margin-top: 30px; */
}
#status {
  margin-bottom: 15px;
  font-size: 18px;
}
#board-state {
  margin-top: 20px;
  font-family: monospace;
  font-size: 16px;
}
.container {
  display: grid;
  grid-template-columns: auto repeat(7, 40px) auto;
  grid-template-rows: auto repeat(7, 40px) auto;
  gap: 2px;
}
#grid {
  padding-top: 80px;
}
.grid-cell {
  width: 40px;
  height: 40px;
  background: white;
  border: 1px solid #000;
}
.grid-cell[data-color="1"] {
  background: black;
}
.grid-cell[data-color="2"] {
  background: gray;
}

.button-arrow {
  width: 40px;
  height: 40px;
  background: #eee;
  border: 1px solid #aaa;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0px;
}
.empty {
  background: none;
  border: none;
}

.model-container {
  display: grid;
  grid-template-columns: repeat(7, 20px);
  grid-template-rows: repeat(7, 20px);
  gap: 2px;
  margin-top: 5px;
}
.grid-cell-model {
  width: 20px;
  height: 20px;
  background: white;
  border: 1px solid #000;
}
.grid-cell-model[data-color="1"] {
  background: black;
}
.grid-cell-model[data-color="2"] {
  background: gray;
}

#share-popup-container {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  justify-content: center;
  align-items: center;
  overflow: auto;
  z-index: 10;
}

#share-popup {
  position: relative;
  background: #fff;
  margin-top: 75px;

  padding: 20px;
  border-radius: 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.arrow {
  font-weight: bold;
  font-size: 1.25em;
}

.share-button,
#share-button {
  display: none;
  cursor: pointer;
  border-radius: 100px;
  background-color: #000;
  color: white;
  width: 10em;
  height: 3em;
  border: none;
  margin-bottom: 30px;
}

#navbar {
  display: flex;
  justify-content: center;
  align-items: center;
  /* background-color: #f5793a; */
  background-color: #000;

  /* background-color: #d97840; */
  color: #fff;
  padding: 10px;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1;
}

#navbar-logo {
  font-size: 1.5em;
  font-weight: bold;
  margin-right: auto;
  padding-left: 2rem;
}

.navbar-icon {
  width: 50px;
  height: 50px;
  /* margin-right: auto; */
  padding-right: 2rem;
}

.navbar-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5em;
  height: 2.5em;
  border-radius: 50%;
  background-color: white;
  /* margin-right: 2rem; */
  font-weight: bold;
  cursor: pointer;
}

.navbar-back span {
  color: black;
  font-size: 1.5em;
  display: inline-block;
  transform: rotate(180deg);
}

/* Dropdown styles */
.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  right: 2.5em;
  border: 2px solid #000;
  border-radius: 12px;
  /* background-color: #b5d9a9; */
  /* min-width: 120px; */
  overflow: hidden;
  box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2);
  z-index: 2;
  flex-direction: column;
  /* padding-right: 2em; */
}

.dropdown-content button {
  color: #000;
  /* background-color: #b5d9a9; */
  border-radius: 0px;
  border: none;
  padding: 15px;
  text-align: left;
  font-size: 1em;
  cursor: pointer;
  width: 100%;
  border-bottom: 1px solid #000; /* line between buttons */
}

/* Remove the border from the last button */
.dropdown-content button:last-child {
  border-bottom: none;
}

.dropdown-content button:hover {
  background-color: #000;
  color: #fff;
}

#close-share-popup,
#close-rules-popup {
  position: absolute;
  top: 10px;
  right: 10px;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2em;
  height: 2em;
  border-radius: 50%;
  background-color: #d9a9d2;
  font-weight: bold;
  cursor: pointer;
}

#close-share-popup span {
  color: black;
  font-size: 1.5em;
}

#rules-popup-container {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  justify-content: center;
  align-items: center;
  z-index: 2;
  overflow: auto;
}

#rules-popup {
  position: relative;
  margin-top: 100px;
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  text-align: left;
  overflow: auto;
}

#close-rules-popup {
  position: absolute;
  top: 10px;
  right: 10px;
  cursor: pointer;
  font-size: 20px;
  font-weight: bold;
  color: #000;
}

#tutorial {
  margin-top: 10px;
  align-items: center;
  justify-content: center;
  background-color: #b5d9a9;
}
