html,
body {
    height: 99%;
    margin: 0;
    padding: 0;
    padding-top: env(safe-area-inset-top);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
    padding-bottom: env(safe-area-inset-bottom);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    align-content: stretch;
    background-color: #121213;
    color: #ffffff;
    font-family: Monospace;
}

h2 {
    font-size: 2em;
    margin: 0;
}

p {
    font-size: 1.5em;
}

a {
  color: #fff;
  font-size: 1.5em;
}

.box {
  height: 99%;
  width: min(75vh, 100vw); /* 75% of the vertical height */
  max-width: 100%;
}

.cards_canvas {
  display: block;
  height: 100%;
  width: 100%;
}

.modal {
  display: grid;
  background: rgba(0, 0, 0, 0.9);
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}

.modal.hide {
  display: none;
}

.modalBody {
  background: black;
  width: 400px;
  margin: auto;
  max-width: calc(100vw - 100px);
  max-height: calc(100vh - 100px);
  padding: 50px;
  border-radius: 25px;
  border: 1px solid white;
  position: relative;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch; /* Ensures smooth scrolling on iOS */
}

.modalBody>.close {
  cursor: pointer;
  position: absolute;
  top: 0;
  right: 0;
  padding: 10px 20px;
  font-size: 30px;
  color: white;
  background: transparent;
  border: none;
}

.modalBody>.close:after {
  display: inline-block;
  content: "\00d7";
  /* This will render the 'X' */
}

.invisible_button {
  cursor: pointer;
  border: none;
  background: transparent;
  color: white;
  font-size: 1.5em;
}

.boards-list-container {
    max-height: 400px;
    overflow-y: auto;
    margin: 1rem 0;
    border: 1px solid #ccc;
    border-radius: 4px;
}

#boardsDifficultyTable {
    width: 100%;
    border-collapse: collapse;
}

#boardsDifficultyTable th, 
#boardsDifficultyTable td {
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

#boardsDifficultyTable th {
    background-color: #f2f2f2;
    position: sticky;
    top: 0;
    z-index: 1;
}

#boardsDifficultyTable tr:hover {
    background-color: #f5f5f5;
}

.play-board-btn {
    padding: 5px 10px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.play-board-btn:hover {
    background-color: #45a049;
}

.difficulty-btn {
    display: inline-block;
    margin-top: 15px;
    padding: 8px 15px;
    background-color: #4CAF50;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    text-align: center;
    font-size: 1.2em;
}

.difficulty-btn:hover {
    background-color: #45a049;
}