body {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  background-color: #e9ecef;
}

@keyframes blink {
  0%,
  100% {
    border-color: #000;
    opacity: 1;
  }

  50% {
    border-color: #808080;
    opacity: 0.5;
  }
}

button {
  border-radius: 10px;
  border: 1px solid #555555;
  font-size: 25px;
  padding: 15px;
  width: 100%;
}

#themeToggle {
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 15px;
  background-color: black;
  color: white;
  border-radius: 10px;
  font-size: 20px;
  cursor: pointer;
}

.blink {
  animation: blink 0.8s infinite;
}

#connectcontainer {
  height: 100dvh;
  display: flex;
  flex-direction: column;
}

#container {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  background-color: rgb(244, 244, 244);
  flex: 1;
}

.title-bar {
  width: 100%;
  padding: 20px 0px;
  border-bottom: 1px solid rgb(170, 170, 170);
  color: black;
  font-size: 25px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

.sub-container {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.grid-container {
  display: grid;
  gap: 30px;
  width: fit-content;
  margin: 20px;
  grid-template-columns: 80px 80px 80px 80px 80px 80px 100px;
  padding: 10px;
  border-radius: 25px;
  border: 5px solid gray;
  pointer-events: none;
}

.empty-cells {
  width: 100px;
  height: 100px;
  border: 1px solid rgb(0, 0, 0);
  border-radius: 50%;
  pointer-events: auto;
}

#btn-container {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 100%;
  padding: 20px 50px;
  pointer-events: auto;
}

#play-btns {
  color: black;
  display: flex;
  flex-direction: row;
  width: 100%;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

#player1-btn,
#player2-btn,
#custom-board-btn,
#continue-btn {
  cursor: pointer;
}

#custom-board-container {
  color: black;
  display: flex;
  flex-direction: column;
  width: 100%;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin: 20px 0px;
}

#board-editor {
  color: black;
  display: none;
  flex-direction: row;
  width: 100%;
  justify-content: space-between;
  align-items: stretch;
  gap: 20px;
}

#turn-txt {
  pointer-events: none;
  cursor: default;
}

#endgame-btn {
  cursor: default;
  margin: 20px 0px;
}

@media (orientation: landscape) and (max-height: 900px) {
  #container {
    flex-direction: row;
  }

  .grid-container {
    gap: 20px;
    margin-top: 20px;
    grid-template-columns: 60px 60px 60px 60px 60px 60px 70px;
  }

  .empty-cells {
    width: 60px;
    height: 60px;
  }
}

@media (orientation: portrait) and (max-width: 900px) {
  .title-bar {
    padding: 10px 0;
  }

  #container {
    flex-direction: column;
  }

  .sub-container {
    height: 100%;
  }

  .grid-container {
    gap: 20px;
    margin-top: 20px;
    grid-template-columns: 80px 80px 80px 80px 80px 80px 80px;
  }

  .empty-cells {
    width: 80px;
    height: 80px;
  }

  #play-btns {
    margin-bottom: 10px;
  }

  #custom-board-container {
    margin: 10px 0px;
  }

  #endgame-btn {
    margin: 10px 0px;
  }
}

@media (orientation: landscape) and (max-width: 768px) {
  .sub-container {
    height: 100%;
  }

  .grid-container {
    gap: 10px;
    grid-template-columns: 35px 35px 35px 35px 35px 35px 31px;
    margin: 10px;
  }

  .empty-cells {
    width: 30px;
    height: 30px;
  }

  #btn-container {
    padding: 20px;
  }

  #play-btns {
    margin-bottom: 10px;
  }

  #custom-board-container {
    margin: 10px 0px;
  }

  #endgame-btn {
    margin: 10px 0px;
  }
}

@media (orientation: landscape) and (max-width: 700px) {
  button {
    font-size: 15px;
    padding: 8px;
  }
}

@media (orientation: portrait) and (max-width: 530px) {
  button {
    font-size: 17px;
    padding: 10px;
  }

  #container {
    flex-direction: column;
  }

  .sub-container {
    height: 100%;
  }

  .grid-container {
    gap: 10px;
    grid-template-columns: 40px 40px 40px 40px 40px 40px 42px;
    margin: 10px;
    margin-top: 20px;
  }

  .empty-cells {
    width: 40px;
    height: 40px;
  }

  #btn-container {
    padding: 20px;
  }

  #play-btns {
    margin-bottom: 10px;
  }

  #custom-board-container {
    margin: 10px 0px;
  }

  #endgame-btn {
    margin: 10px 0px;
  }
}
@media (orientation: landscape) and (max-height: 530px) {
  .title-bar {
    padding: 10px 0;
  }

  button {
    font-size: 17px;
    padding: 10px;
  }

  #container {
    flex-direction: row;
  }

  .sub-container {
    height: 100%;
  }

  .grid-container {
    gap: 5px;
    grid-template-columns: 40px 40px 40px 40px 40px 40px 30px;
    margin: 10px;
  }

  .empty-cells {
    width: 30px;
    height: 30px;
  }

  #btn-container {
    padding: 20px;
  }

  #play-btns {
    margin-bottom: 10px;
  }

  #custom-board-container {
    margin: 10px 0px;
  }

  #endgame-btn {
    margin: 10px 0px;
  }
}
