#tetris {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
  width: auto;
  max-width: 100%;
  margin: 0 auto;
  text-align: center;
}

#tetriscanvas {
  flex: 0 0 auto;
  background-color: #f0ffff;
  box-shadow: 0 4px 10px 0 grey;
  border: 1px solid #000000;
  width: 150px;
  height: 300px;
  max-width: none;
}

#tetrismenu {
  flex: 0 0 auto;
  position: relative;
  width: 150px;
  height: auto;
}

#tetrismenu p {
  margin: 0.35em 0;
  text-align: center;
}

#tetrisupcoming {
  display: block;
  margin: 0 auto;
  background-color: #f0ffff;
  border: 1px solid #000000;
  width: 75px;
  height: 75px;
  max-width: none;
}

#tetrisscore {
  color: #dc2626;
  font-weight: bold;
  vertical-align: middle;
}

#tetrisrows {
  color: #2563eb;
  font-weight: bold;
  vertical-align: middle;
}

#tetrismenu button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0.25em 0.55em;
  margin: 0.1em;
  background: #e0f2fe;
  color: #1d4ed8;
  border: 1px solid #7dd3fc;
  border-radius: 0.35em;
  font-size: 0.9em;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
}

#tetrismenu button:hover {
  background: #2563eb;
  color: #ffffff;
}

.bodydark #tetriscanvas,
.bodydark #tetrisupcoming {
  background-color: #090d16;
  border-color: #64748b;
  box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.6);
}

.bodydark #tetrisscore {
  color: #f87171;
}

.bodydark #tetrisrows {
  color: #38bdf8;
}

.bodydark #tetrismenu button {
  background: #1e293b;
  color: #38bdf8;
  border-color: #475569;
}

.bodydark #tetrismenu button:hover {
  background: #0284c7;
  color: #ffffff;
}

@media screen and (max-width: 26em) {
  #tetris {
    flex-wrap: wrap;
  }

  #tetrismenu {
    width: 100%;
  }
}
